treport 0.2.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (950) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/connect.rb +12 -10
  3. data/app/models/db.rb +52 -0
  4. data/app/models/map.rb +25 -0
  5. data/app/models/map_requirement.rb +54 -0
  6. data/app/models/report.rb +40 -14
  7. data/app/models/requirement.rb +17 -5
  8. data/app/views/layouts/report_admin.html.erb +177 -0
  9. data/db/migrate/_create_reports.rb +70 -0
  10. data/lib/generators/treport/install_generator.rb +23 -0
  11. data/lib/treport/engine.rb +4 -0
  12. data/lib/treport.rb +3 -2
  13. data/public/{report → treport}/css/AdminLTE.min.css +0 -0
  14. data/public/treport/css/ace-ie.min.css +1 -0
  15. data/public/treport/css/ace-part2.min.css +1 -0
  16. data/public/treport/css/ace-rtl.min.css +1 -0
  17. data/public/treport/css/ace-skins.min.css +1 -0
  18. data/public/treport/css/ace.min.css +1 -0
  19. data/public/treport/css/blue.css +62 -0
  20. data/public/treport/css/blue.png +0 -0
  21. data/public/treport/css/blue@2x.png +0 -0
  22. data/public/treport/css/bootstrap-colorpicker.min.css +9 -0
  23. data/public/treport/css/bootstrap-datepicker3.min.css +7 -0
  24. data/public/treport/css/bootstrap-datetimepicker.min.css +5 -0
  25. data/public/treport/css/bootstrap-duallistbox.min.css +1 -0
  26. data/public/treport/css/bootstrap-editable.min.css +12 -0
  27. data/public/treport/css/bootstrap-multiselect.min.css +1 -0
  28. data/public/treport/css/bootstrap-timepicker.min.css +10 -0
  29. data/public/treport/css/bootstrap.min.css +5 -0
  30. data/public/treport/css/chosen.min.css +11 -0
  31. data/public/treport/css/colorbox.min.css +1 -0
  32. data/public/treport/css/daterangepicker.min.css +1 -0
  33. data/public/treport/css/dropzone.min.css +1 -0
  34. data/public/treport/css/font-awesome.min.css +4 -0
  35. data/public/treport/css/fonts.googleapis.com.css +12 -0
  36. data/public/treport/css/fullcalendar.min.css +5 -0
  37. data/public/treport/css/ionicons.min.css +11 -0
  38. data/public/treport/css/jquery-ui.custom.min.css +4 -0
  39. data/public/treport/css/jquery-ui.min.css +4 -0
  40. data/public/treport/css/jquery.gritter.min.css +1 -0
  41. data/public/treport/css/lkmain.css +1 -0
  42. data/public/treport/css/prettify.min.css +1 -0
  43. data/public/treport/css/select2.min.css +1 -0
  44. data/public/treport/css/test.html +221 -0
  45. data/public/treport/css/ui.jqgrid.min.css +1 -0
  46. data/public/treport/font-awesome/4.5.0/css/font-awesome.min.css +4 -0
  47. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.eot +0 -0
  48. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.svg +655 -0
  49. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.ttf +0 -0
  50. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.woff +0 -0
  51. data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.woff2 +0 -0
  52. data/public/treport/fonts/glyphicons-halflings-regular.eot +0 -0
  53. data/public/treport/fonts/glyphicons-halflings-regular.svg +288 -0
  54. data/public/treport/fonts/glyphicons-halflings-regular.ttf +0 -0
  55. data/public/treport/fonts/glyphicons-halflings-regular.woff +0 -0
  56. data/public/treport/fonts/glyphicons-halflings-regular.woff2 +0 -0
  57. data/public/treport/images/avatars/avatar.png +0 -0
  58. data/public/treport/images/avatars/avatar1.png +0 -0
  59. data/public/treport/images/avatars/avatar2.png +0 -0
  60. data/public/treport/images/avatars/avatar3.png +0 -0
  61. data/public/treport/images/avatars/avatar4.png +0 -0
  62. data/public/treport/images/avatars/avatar5.png +0 -0
  63. data/public/treport/images/avatars/profile-pic.jpg +0 -0
  64. data/public/treport/images/avatars/user.jpg +0 -0
  65. data/public/treport/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  66. data/public/treport/images/bootstrap-colorpicker/alpha.png +0 -0
  67. data/public/treport/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
  68. data/public/treport/images/bootstrap-colorpicker/hue.png +0 -0
  69. data/public/treport/images/bootstrap-colorpicker/saturation.png +0 -0
  70. data/public/treport/images/email/email1.png +0 -0
  71. data/public/treport/images/email/email2.png +0 -0
  72. data/public/treport/images/email/email3.png +0 -0
  73. data/public/treport/images/email/email4.png +0 -0
  74. data/public/treport/images/gallery/image-1.jpg +0 -0
  75. data/public/treport/images/gallery/image-2.jpg +0 -0
  76. data/public/treport/images/gallery/image-3.jpg +0 -0
  77. data/public/treport/images/gallery/image-4.jpg +0 -0
  78. data/public/treport/images/gallery/image-5.jpg +0 -0
  79. data/public/treport/images/gallery/image-6.jpg +0 -0
  80. data/public/treport/images/gallery/thumb-1.jpg +0 -0
  81. data/public/treport/images/gallery/thumb-2.jpg +0 -0
  82. data/public/treport/images/gallery/thumb-3.jpg +0 -0
  83. data/public/treport/images/gallery/thumb-4.jpg +0 -0
  84. data/public/treport/images/gallery/thumb-5.jpg +0 -0
  85. data/public/treport/images/gallery/thumb-6.jpg +0 -0
  86. data/public/treport/images/placeholder/165x90.png +0 -0
  87. data/public/treport/images/placeholder/255x150.png +0 -0
  88. data/public/treport/images/placeholder/530x270.png +0 -0
  89. data/public/treport/images/placeholder/550x280.png +0 -0
  90. data/public/treport/images/ui-icons_ffffff_256x240.png +0 -0
  91. data/public/treport/js/ace-editable.min.js +4 -0
  92. data/public/treport/js/ace-elements.min.js +5 -0
  93. data/public/treport/js/ace-extra.min.js +1 -0
  94. data/public/treport/js/ace.min.js +5 -0
  95. data/public/treport/js/autosize.min.js +6 -0
  96. data/public/treport/js/bootbox.js +6 -0
  97. data/public/treport/js/bootstrap-colorpicker.min.js +11 -0
  98. data/public/treport/js/bootstrap-datepicker.min.js +9 -0
  99. data/public/treport/js/bootstrap-datetimepicker.min.js +9 -0
  100. data/public/treport/js/bootstrap-editable.min.js +6 -0
  101. data/public/treport/js/bootstrap-markdown.min.js +19 -0
  102. data/public/treport/js/bootstrap-multiselect.min.js +44 -0
  103. data/public/treport/js/bootstrap-tag.min.js +19 -0
  104. data/public/treport/js/bootstrap-timepicker.min.js +11 -0
  105. data/public/treport/js/bootstrap-wysiwyg.min.js +2 -0
  106. data/public/treport/js/bootstrap.min.js +7 -0
  107. data/public/treport/js/buttons.colVis.min.js +5 -0
  108. data/public/treport/js/buttons.flash.min.js +8 -0
  109. data/public/treport/js/buttons.html5.min.js +8 -0
  110. data/public/treport/js/buttons.print.min.js +5 -0
  111. data/public/treport/js/chosen.jquery.min.js +1 -0
  112. data/public/treport/js/dataTables.buttons.min.js +4 -0
  113. data/public/treport/js/dataTables.select.min.js +4 -0
  114. data/public/treport/js/daterangepicker.min.js +9 -0
  115. data/public/treport/js/dropzone.min.js +2 -0
  116. data/public/{report → treport}/js/echarts.min.js +0 -0
  117. data/public/treport/js/excanvas.min.js +1 -0
  118. data/public/treport/js/fullcalendar.min.js +9 -0
  119. data/public/treport/js/grid.locale-en.js +1 -0
  120. data/public/treport/js/holder.min.js +13 -0
  121. data/public/treport/js/html5shiv.min.js +4 -0
  122. data/public/treport/js/jquery-1.11.3.min.js +6 -0
  123. data/public/treport/js/jquery-2.1.4.min.js +5 -0
  124. data/public/treport/js/jquery-additional-methods.min.js +9 -0
  125. data/public/treport/js/jquery-typeahead.js +6 -0
  126. data/public/treport/js/jquery-ui.custom.min.js +8 -0
  127. data/public/treport/js/jquery-ui.min.js +12 -0
  128. data/public/treport/js/jquery.bootstrap-duallistbox.min.js +9 -0
  129. data/public/treport/js/jquery.colorbox.min.js +6 -0
  130. data/public/treport/js/jquery.dataTables.bootstrap.min.js +2 -0
  131. data/public/treport/js/jquery.dataTables.min.js +6 -0
  132. data/public/treport/js/jquery.easypiechart.min.js +9 -0
  133. data/public/treport/js/jquery.flot.min.js +8 -0
  134. data/public/treport/js/jquery.flot.pie.min.js +57 -0
  135. data/public/treport/js/jquery.flot.resize.min.js +13 -0
  136. data/public/treport/js/jquery.gritter.min.js +11 -0
  137. data/public/treport/js/jquery.hotkeys.index.min.js +3 -0
  138. data/public/treport/js/jquery.inputlimiter.min.js +28 -0
  139. data/public/treport/js/jquery.jqGrid.min.js +17 -0
  140. data/public/treport/js/jquery.knob.min.js +1 -0
  141. data/public/treport/js/jquery.maskedinput.min.js +7 -0
  142. data/public/treport/js/jquery.mobile.custom.min.js +10 -0
  143. data/public/treport/js/jquery.nestable.min.js +5 -0
  144. data/public/treport/js/jquery.raty.min.js +11 -0
  145. data/public/treport/js/jquery.sparkline.index.min.js +203 -0
  146. data/public/treport/js/jquery.ui.touch-punch.min.js +11 -0
  147. data/public/treport/js/jquery.validate.min.js +9 -0
  148. data/public/treport/js/markdown.min.js +3 -0
  149. data/public/treport/js/moment.min.js +5 -0
  150. data/public/treport/js/prettify.min.js +30 -0
  151. data/public/treport/js/respond.min.js +5 -0
  152. data/public/treport/js/select2.min.js +9 -0
  153. data/public/treport/js/spin.js +32 -0
  154. data/public/treport/js/spinbox.min.js +8 -0
  155. data/public/treport/js/tree.min.js +8 -0
  156. data/public/treport/js/wizard.min.js +8 -0
  157. data/public/treport/plugins/datePicker/My97DatePicker.htm +49 -0
  158. data/public/treport/plugins/datePicker/WdatePicker.js +53 -0
  159. data/public/treport/plugins/datePicker/calendar.js +5 -0
  160. data/public/treport/plugins/datePicker/config.js +17 -0
  161. data/public/treport/plugins/datePicker/lang/en.js +14 -0
  162. data/public/treport/plugins/datePicker/lang/zh-cn.js +14 -0
  163. data/public/treport/plugins/datePicker/lang/zh-tw.js +14 -0
  164. data/public/treport/plugins/datePicker/skin/Thumbs.db +0 -0
  165. data/public/treport/plugins/datePicker/skin/WdatePicker.css +10 -0
  166. data/public/treport/plugins/datePicker/skin/areo/Thumbs.db +0 -0
  167. data/public/treport/plugins/datePicker/skin/areo/datepicker.css +302 -0
  168. data/public/treport/plugins/datePicker/skin/areo/dateselect.gif +0 -0
  169. data/public/treport/plugins/datePicker/skin/areo/glass-bg.gif +0 -0
  170. data/public/treport/plugins/datePicker/skin/areo/hd-sprite.gif +0 -0
  171. data/public/treport/plugins/datePicker/skin/areo/img.gif +0 -0
  172. data/public/treport/plugins/datePicker/skin/areo/left-btn.gif +0 -0
  173. data/public/treport/plugins/datePicker/skin/areo/left-btn2.gif +0 -0
  174. data/public/treport/plugins/datePicker/skin/areo/right-btn.gif +0 -0
  175. data/public/treport/plugins/datePicker/skin/areo/right-btn2.gif +0 -0
  176. data/public/treport/plugins/datePicker/skin/armyGreen/Thumbs.db +0 -0
  177. data/public/treport/plugins/datePicker/skin/armyGreen/datepicker.css +302 -0
  178. data/public/treport/plugins/datePicker/skin/armyGreen/dateselect.gif +0 -0
  179. data/public/treport/plugins/datePicker/skin/armyGreen/glass-bg.gif +0 -0
  180. data/public/treport/plugins/datePicker/skin/armyGreen/hd-sprite.gif +0 -0
  181. data/public/treport/plugins/datePicker/skin/armyGreen/img.gif +0 -0
  182. data/public/treport/plugins/datePicker/skin/armyGreen/left-btn.gif +0 -0
  183. data/public/treport/plugins/datePicker/skin/armyGreen/left-btn2.gif +0 -0
  184. data/public/treport/plugins/datePicker/skin/armyGreen/right-btn.gif +0 -0
  185. data/public/treport/plugins/datePicker/skin/armyGreen/right-btn2.gif +0 -0
  186. data/public/treport/plugins/datePicker/skin/blue/Thumbs.db +0 -0
  187. data/public/treport/plugins/datePicker/skin/blue/bg.gif +0 -0
  188. data/public/treport/plugins/datePicker/skin/blue/datepicker.css +115 -0
  189. data/public/treport/plugins/datePicker/skin/blue/dateselect.gif +0 -0
  190. data/public/treport/plugins/datePicker/skin/blue/glass-bg.gif +0 -0
  191. data/public/treport/plugins/datePicker/skin/blue/hd-sprite.gif +0 -0
  192. data/public/treport/plugins/datePicker/skin/blue/img.gif +0 -0
  193. data/public/treport/plugins/datePicker/skin/blue/left-btn.gif +0 -0
  194. data/public/treport/plugins/datePicker/skin/blue/left-btn2.gif +0 -0
  195. data/public/treport/plugins/datePicker/skin/blue/qs.jpg +0 -0
  196. data/public/treport/plugins/datePicker/skin/blue/right-btn.gif +0 -0
  197. data/public/treport/plugins/datePicker/skin/blue/right-btn2.gif +0 -0
  198. data/public/treport/plugins/datePicker/skin/blueGreen/Thumbs.db +0 -0
  199. data/public/treport/plugins/datePicker/skin/blueGreen/datepicker.css +302 -0
  200. data/public/treport/plugins/datePicker/skin/blueGreen/dateselect.gif +0 -0
  201. data/public/treport/plugins/datePicker/skin/blueGreen/glass-bg.gif +0 -0
  202. data/public/treport/plugins/datePicker/skin/blueGreen/hd-sprite.gif +0 -0
  203. data/public/treport/plugins/datePicker/skin/blueGreen/img.gif +0 -0
  204. data/public/treport/plugins/datePicker/skin/blueGreen/left-btn.gif +0 -0
  205. data/public/treport/plugins/datePicker/skin/blueGreen/left-btn2.gif +0 -0
  206. data/public/treport/plugins/datePicker/skin/blueGreen/right-btn.gif +0 -0
  207. data/public/treport/plugins/datePicker/skin/blueGreen/right-btn2.gif +0 -0
  208. data/public/treport/plugins/datePicker/skin/darkBlue/Thumbs.db +0 -0
  209. data/public/treport/plugins/datePicker/skin/darkBlue/datepicker.css +309 -0
  210. data/public/treport/plugins/datePicker/skin/darkBlue/dateselect.gif +0 -0
  211. data/public/treport/plugins/datePicker/skin/darkBlue/glass-bg.gif +0 -0
  212. data/public/treport/plugins/datePicker/skin/darkBlue/hd-sprite.gif +0 -0
  213. data/public/treport/plugins/datePicker/skin/darkBlue/img.gif +0 -0
  214. data/public/treport/plugins/datePicker/skin/darkBlue/left-btn.gif +0 -0
  215. data/public/treport/plugins/datePicker/skin/darkBlue/left-btn2.gif +0 -0
  216. data/public/treport/plugins/datePicker/skin/darkBlue/right-btn.gif +0 -0
  217. data/public/treport/plugins/datePicker/skin/darkBlue/right-btn2.gif +0 -0
  218. data/public/treport/plugins/datePicker/skin/darkYellow/Thumbs.db +0 -0
  219. data/public/treport/plugins/datePicker/skin/darkYellow/bg.gif +0 -0
  220. data/public/treport/plugins/datePicker/skin/darkYellow/datepicker.css +115 -0
  221. data/public/treport/plugins/datePicker/skin/darkYellow/qs.jpg +0 -0
  222. data/public/treport/plugins/datePicker/skin/datePicker.gif +0 -0
  223. data/public/treport/plugins/datePicker/skin/deepBlue/Thumbs.db +0 -0
  224. data/public/treport/plugins/datePicker/skin/deepBlue/datepicker.css +301 -0
  225. data/public/treport/plugins/datePicker/skin/deepBlue/dateselect.gif +0 -0
  226. data/public/treport/plugins/datePicker/skin/deepBlue/glass-bg.gif +0 -0
  227. data/public/treport/plugins/datePicker/skin/deepBlue/hd-sprite.gif +0 -0
  228. data/public/treport/plugins/datePicker/skin/deepBlue/img.gif +0 -0
  229. data/public/treport/plugins/datePicker/skin/deepBlue/left-btn.gif +0 -0
  230. data/public/treport/plugins/datePicker/skin/deepBlue/left-btn2.gif +0 -0
  231. data/public/treport/plugins/datePicker/skin/deepBlue/right-btn.gif +0 -0
  232. data/public/treport/plugins/datePicker/skin/deepBlue/right-btn2.gif +0 -0
  233. data/public/treport/plugins/datePicker/skin/default/Thumbs.db +0 -0
  234. data/public/treport/plugins/datePicker/skin/default/datepicker.css +246 -0
  235. data/public/treport/plugins/datePicker/skin/default/img.gif +0 -0
  236. data/public/treport/plugins/datePicker/skin/green/Thumbs.db +0 -0
  237. data/public/treport/plugins/datePicker/skin/green/bg.gif +0 -0
  238. data/public/treport/plugins/datePicker/skin/green/datepicker.css +115 -0
  239. data/public/treport/plugins/datePicker/skin/green/dateselect.gif +0 -0
  240. data/public/treport/plugins/datePicker/skin/green/glass-bg.gif +0 -0
  241. data/public/treport/plugins/datePicker/skin/green/hd-sprite.gif +0 -0
  242. data/public/treport/plugins/datePicker/skin/green/img.gif +0 -0
  243. data/public/treport/plugins/datePicker/skin/green/left-btn.gif +0 -0
  244. data/public/treport/plugins/datePicker/skin/green/left-btn2.gif +0 -0
  245. data/public/treport/plugins/datePicker/skin/green/qs.jpg +0 -0
  246. data/public/treport/plugins/datePicker/skin/green/right-btn.gif +0 -0
  247. data/public/treport/plugins/datePicker/skin/green/right-btn2.gif +0 -0
  248. data/public/treport/plugins/datePicker/skin/lightBlue/Thumbs.db +0 -0
  249. data/public/treport/plugins/datePicker/skin/lightBlue/bg.gif +0 -0
  250. data/public/treport/plugins/datePicker/skin/lightBlue/btn.jpg +0 -0
  251. data/public/treport/plugins/datePicker/skin/lightBlue/datepicker.css +115 -0
  252. data/public/treport/plugins/datePicker/skin/lightBlue/dateselect.gif +0 -0
  253. data/public/treport/plugins/datePicker/skin/lightBlue/glass-bg.gif +0 -0
  254. data/public/treport/plugins/datePicker/skin/lightBlue/hd-sprite.gif +0 -0
  255. data/public/treport/plugins/datePicker/skin/lightBlue/img.gif +0 -0
  256. data/public/treport/plugins/datePicker/skin/lightBlue/left-btn.gif +0 -0
  257. data/public/treport/plugins/datePicker/skin/lightBlue/left-btn2.gif +0 -0
  258. data/public/treport/plugins/datePicker/skin/lightBlue/qs.jpg +0 -0
  259. data/public/treport/plugins/datePicker/skin/lightBlue/right-btn.gif +0 -0
  260. data/public/treport/plugins/datePicker/skin/lightBlue/right-btn2.gif +0 -0
  261. data/public/treport/plugins/datePicker/skin/lightBlue/titlebar.jpg +0 -0
  262. data/public/treport/plugins/datePicker/skin/modernBlue/Thumbs.db +0 -0
  263. data/public/treport/plugins/datePicker/skin/modernBlue/datepicker.css +302 -0
  264. data/public/treport/plugins/datePicker/skin/modernBlue/dateselect.gif +0 -0
  265. data/public/treport/plugins/datePicker/skin/modernBlue/glass-bg.gif +0 -0
  266. data/public/treport/plugins/datePicker/skin/modernBlue/hd-sprite.gif +0 -0
  267. data/public/treport/plugins/datePicker/skin/modernBlue/img.gif +0 -0
  268. data/public/treport/plugins/datePicker/skin/modernBlue/left-btn.gif +0 -0
  269. data/public/treport/plugins/datePicker/skin/modernBlue/left-btn2.gif +0 -0
  270. data/public/treport/plugins/datePicker/skin/modernBlue/right-btn.gif +0 -0
  271. data/public/treport/plugins/datePicker/skin/modernBlue/right-btn2.gif +0 -0
  272. data/public/treport/plugins/datePicker/skin/orange/Thumbs.db +0 -0
  273. data/public/treport/plugins/datePicker/skin/orange/datepicker.css +115 -0
  274. data/public/treport/plugins/datePicker/skin/orange/dateselect.gif +0 -0
  275. data/public/treport/plugins/datePicker/skin/orange/glass-bg.gif +0 -0
  276. data/public/treport/plugins/datePicker/skin/orange/hd-sprite.gif +0 -0
  277. data/public/treport/plugins/datePicker/skin/orange/img.gif +0 -0
  278. data/public/treport/plugins/datePicker/skin/orange/left-btn.gif +0 -0
  279. data/public/treport/plugins/datePicker/skin/orange/left-btn2.gif +0 -0
  280. data/public/treport/plugins/datePicker/skin/orange/right-btn.gif +0 -0
  281. data/public/treport/plugins/datePicker/skin/orange/right-btn2.gif +0 -0
  282. data/public/treport/plugins/datePicker/skin/red/Thumbs.db +0 -0
  283. data/public/treport/plugins/datePicker/skin/red/bg.gif +0 -0
  284. data/public/treport/plugins/datePicker/skin/red/datepicker.css +115 -0
  285. data/public/treport/plugins/datePicker/skin/red/dateselect.gif +0 -0
  286. data/public/treport/plugins/datePicker/skin/red/glass-bg.gif +0 -0
  287. data/public/treport/plugins/datePicker/skin/red/hd-sprite.gif +0 -0
  288. data/public/treport/plugins/datePicker/skin/red/img.gif +0 -0
  289. data/public/treport/plugins/datePicker/skin/red/left-btn.gif +0 -0
  290. data/public/treport/plugins/datePicker/skin/red/left-btn2.gif +0 -0
  291. data/public/treport/plugins/datePicker/skin/red/qs.jpg +0 -0
  292. data/public/treport/plugins/datePicker/skin/red/right-btn.gif +0 -0
  293. data/public/treport/plugins/datePicker/skin/red/right-btn2.gif +0 -0
  294. data/public/treport/plugins/datePicker/skin/whyGreen/Thumbs.db +0 -0
  295. data/public/treport/plugins/datePicker/skin/whyGreen/bg.jpg +0 -0
  296. data/public/treport/plugins/datePicker/skin/whyGreen/datepicker.css +256 -0
  297. data/public/treport/plugins/datePicker/skin/whyGreen/img.gif +0 -0
  298. data/public/treport/plugins/datePicker/skin/yellowGreen/Thumbs.db +0 -0
  299. data/public/treport/plugins/datePicker/skin/yellowGreen/bg.gif +0 -0
  300. data/public/treport/plugins/datePicker/skin/yellowGreen/datepicker.css +115 -0
  301. data/public/treport/plugins/datePicker/skin/yellowGreen/qs.jpg +0 -0
  302. data/public/treport/plugins/datePicker//351/222/203/346/277/212/345/243/212/351/220/250/356/206/277/345/201/206/351/217/200/347/221/260/345/217/276/346/265/240/346/240/255/356/227/223/351/217/215_txt +1 -0
  303. data/public/treport/plugins/heandlebars/handlebars-v4.0.5.js +4608 -0
  304. data/public/treport/plugins/jquery-ui/iframeTab.js +42 -0
  305. data/public/treport/plugins/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
  306. data/public/treport/plugins/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
  307. data/public/treport/plugins/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
  308. data/public/treport/plugins/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
  309. data/public/treport/plugins/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
  310. data/public/treport/plugins/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
  311. data/public/treport/plugins/jquery-ui/jquery-ui.css +1312 -0
  312. data/public/treport/plugins/jquery-ui/jquery-ui.js +18706 -0
  313. data/public/treport/plugins/layer/layer.js +2 -0
  314. data/public/treport/plugins/layer/mobile/layer.js +2 -0
  315. data/public/treport/plugins/layer/mobile/need/layer.css +1 -0
  316. data/public/treport/plugins/layer/skin/default/icon-ext.png +0 -0
  317. data/public/treport/plugins/layer/skin/default/icon.png +0 -0
  318. data/public/treport/plugins/layer/skin/default/layer.css +1 -0
  319. data/public/treport/plugins/layer/skin/default/loading-0.gif +0 -0
  320. data/public/treport/plugins/layer/skin/default/loading-1.gif +0 -0
  321. data/public/treport/plugins/layer/skin/default/loading-2.gif +0 -0
  322. data/public/treport/plugins/selectize/css/selectize.bootstrap2.css +494 -0
  323. data/public/treport/plugins/selectize/css/selectize.bootstrap3.css +408 -0
  324. data/public/treport/plugins/selectize/css/selectize.css +324 -0
  325. data/public/treport/plugins/selectize/css/selectize.default.css +394 -0
  326. data/public/treport/plugins/selectize/css/selectize.legacy.css +371 -0
  327. data/public/treport/plugins/selectize/js/selectize.js +3193 -0
  328. data/public/treport/plugins/selectize/js/selectize.min.js +3 -0
  329. data/public/treport/plugins/selectize/js/standalone/selectize.js +3829 -0
  330. data/public/treport/plugins/selectize/js/standalone/selectize.min.js +3 -0
  331. data/public/treport/plugins/selectize/less/plugins/drag_drop.less +16 -0
  332. data/public/treport/plugins/selectize/less/plugins/dropdown_header.less +20 -0
  333. data/public/treport/plugins/selectize/less/plugins/optgroup_columns.less +17 -0
  334. data/public/treport/plugins/selectize/less/plugins/remove_button.less +43 -0
  335. data/public/treport/plugins/selectize/less/selectize.bootstrap2.less +161 -0
  336. data/public/treport/plugins/selectize/less/selectize.bootstrap3.less +150 -0
  337. data/public/treport/plugins/selectize/less/selectize.default.less +84 -0
  338. data/public/treport/plugins/selectize/less/selectize.legacy.less +75 -0
  339. data/public/treport/plugins/selectize/less/selectize.less +296 -0
  340. data/public/treport/plugins/tools/tab_enter.js +30 -0
  341. data/public/treport/plugins/typeahead/typeahead.bundle.js +2451 -0
  342. data/public/treport/plugins/validationEngine/jquery.validationEngine-zh_CN.js +181 -0
  343. data/public/treport/plugins/validationEngine/jquery.validationEngine.js +2160 -0
  344. data/public/treport/plugins/validationEngine/template.css +125 -0
  345. data/public/treport/plugins/validationEngine/validationEngine.jquery.css +182 -0
  346. data/public/treport/plugins/zDialog/dialog.js +1313 -0
  347. data/public/treport/plugins/zDialog/drag.js +92 -0
  348. data/public/treport/plugins/zDialog/skins/blue/dialog_bg.jpg +0 -0
  349. data/public/treport/plugins/zDialog/skins/blue/dialog_cb.gif +0 -0
  350. data/public/treport/plugins/zDialog/skins/blue/dialog_cb.png +0 -0
  351. data/public/treport/plugins/zDialog/skins/blue/dialog_closebtn.gif +0 -0
  352. data/public/treport/plugins/zDialog/skins/blue/dialog_closebtn_over.gif +0 -0
  353. data/public/treport/plugins/zDialog/skins/blue/dialog_ct.gif +0 -0
  354. data/public/treport/plugins/zDialog/skins/blue/dialog_ct.png +0 -0
  355. data/public/treport/plugins/zDialog/skins/blue/dialog_lb.gif +0 -0
  356. data/public/treport/plugins/zDialog/skins/blue/dialog_lb.png +0 -0
  357. data/public/treport/plugins/zDialog/skins/blue/dialog_lt.gif +0 -0
  358. data/public/treport/plugins/zDialog/skins/blue/dialog_lt.png +0 -0
  359. data/public/treport/plugins/zDialog/skins/blue/dialog_mlm.gif +0 -0
  360. data/public/treport/plugins/zDialog/skins/blue/dialog_mlm.png +0 -0
  361. data/public/treport/plugins/zDialog/skins/blue/dialog_mrm.gif +0 -0
  362. data/public/treport/plugins/zDialog/skins/blue/dialog_mrm.png +0 -0
  363. data/public/treport/plugins/zDialog/skins/blue/dialog_rb.gif +0 -0
  364. data/public/treport/plugins/zDialog/skins/blue/dialog_rb.png +0 -0
  365. data/public/treport/plugins/zDialog/skins/blue/dialog_rt.gif +0 -0
  366. data/public/treport/plugins/zDialog/skins/blue/dialog_rt.png +0 -0
  367. data/public/treport/plugins/zDialog/skins/blue/dir.txt +24 -0
  368. data/public/treport/plugins/zDialog/skins/blue/icon_alert.gif +0 -0
  369. data/public/treport/plugins/zDialog/skins/blue/icon_dialog.gif +0 -0
  370. data/public/treport/plugins/zDialog/skins/blue/icon_query.gif +0 -0
  371. data/public/treport/plugins/zDialog/skins/blue/window.gif +0 -0
  372. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_bg.jpg +0 -0
  373. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_cb.gif +0 -0
  374. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_cb.png +0 -0
  375. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_closebtn.gif +0 -0
  376. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_closebtn_over.gif +0 -0
  377. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_ct.gif +0 -0
  378. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_ct.png +0 -0
  379. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lb.gif +0 -0
  380. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lb.png +0 -0
  381. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lt.gif +0 -0
  382. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lt.png +0 -0
  383. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mlm.gif +0 -0
  384. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mlm.png +0 -0
  385. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mrm.gif +0 -0
  386. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mrm.png +0 -0
  387. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rb.gif +0 -0
  388. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rb.png +0 -0
  389. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rt.gif +0 -0
  390. data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rt.png +0 -0
  391. data/public/treport/plugins/zDialog/skins/darkBlue/dir.txt +24 -0
  392. data/public/treport/plugins/zDialog/skins/darkBlue/icon_alert.gif +0 -0
  393. data/public/treport/plugins/zDialog/skins/darkBlue/icon_dialog.gif +0 -0
  394. data/public/treport/plugins/zDialog/skins/darkBlue/icon_query.gif +0 -0
  395. data/public/treport/plugins/zDialog/skins/darkBlue/window.gif +0 -0
  396. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_bg.jpg +0 -0
  397. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_cb.gif +0 -0
  398. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_cb.png +0 -0
  399. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_closebtn.gif +0 -0
  400. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_closebtn_over.gif +0 -0
  401. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_ct.gif +0 -0
  402. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_ct.png +0 -0
  403. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lb.gif +0 -0
  404. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lb.png +0 -0
  405. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lt.gif +0 -0
  406. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lt.png +0 -0
  407. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mlm.gif +0 -0
  408. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mlm.png +0 -0
  409. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mrm.gif +0 -0
  410. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mrm.png +0 -0
  411. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rb.gif +0 -0
  412. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rb.png +0 -0
  413. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rt.gif +0 -0
  414. data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rt.png +0 -0
  415. data/public/treport/plugins/zDialog/skins/darkYellow/dir.txt +24 -0
  416. data/public/treport/plugins/zDialog/skins/darkYellow/icon_alert.gif +0 -0
  417. data/public/treport/plugins/zDialog/skins/darkYellow/icon_dialog.gif +0 -0
  418. data/public/treport/plugins/zDialog/skins/darkYellow/icon_query.gif +0 -0
  419. data/public/treport/plugins/zDialog/skins/darkYellow/window.gif +0 -0
  420. data/public/treport/plugins/zDialog/skins/green/dialog_bg.jpg +0 -0
  421. data/public/treport/plugins/zDialog/skins/green/dialog_cb.gif +0 -0
  422. data/public/treport/plugins/zDialog/skins/green/dialog_cb.png +0 -0
  423. data/public/treport/plugins/zDialog/skins/green/dialog_closebtn.gif +0 -0
  424. data/public/treport/plugins/zDialog/skins/green/dialog_closebtn_over.gif +0 -0
  425. data/public/treport/plugins/zDialog/skins/green/dialog_ct.gif +0 -0
  426. data/public/treport/plugins/zDialog/skins/green/dialog_ct.png +0 -0
  427. data/public/treport/plugins/zDialog/skins/green/dialog_lb.gif +0 -0
  428. data/public/treport/plugins/zDialog/skins/green/dialog_lb.png +0 -0
  429. data/public/treport/plugins/zDialog/skins/green/dialog_lt.gif +0 -0
  430. data/public/treport/plugins/zDialog/skins/green/dialog_lt.png +0 -0
  431. data/public/treport/plugins/zDialog/skins/green/dialog_mlm.gif +0 -0
  432. data/public/treport/plugins/zDialog/skins/green/dialog_mlm.png +0 -0
  433. data/public/treport/plugins/zDialog/skins/green/dialog_mrm.gif +0 -0
  434. data/public/treport/plugins/zDialog/skins/green/dialog_mrm.png +0 -0
  435. data/public/treport/plugins/zDialog/skins/green/dialog_rb.gif +0 -0
  436. data/public/treport/plugins/zDialog/skins/green/dialog_rb.png +0 -0
  437. data/public/treport/plugins/zDialog/skins/green/dialog_rt.gif +0 -0
  438. data/public/treport/plugins/zDialog/skins/green/dialog_rt.png +0 -0
  439. data/public/treport/plugins/zDialog/skins/green/dir.txt +24 -0
  440. data/public/treport/plugins/zDialog/skins/green/icon_alert.gif +0 -0
  441. data/public/treport/plugins/zDialog/skins/green/icon_dialog.gif +0 -0
  442. data/public/treport/plugins/zDialog/skins/green/icon_query.gif +0 -0
  443. data/public/treport/plugins/zDialog/skins/green/window.gif +0 -0
  444. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_bg.jpg +0 -0
  445. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_cb.gif +0 -0
  446. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_cb.png +0 -0
  447. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_closebtn.gif +0 -0
  448. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_closebtn_over.gif +0 -0
  449. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_ct.gif +0 -0
  450. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_ct.png +0 -0
  451. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lb.gif +0 -0
  452. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lb.png +0 -0
  453. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lt.gif +0 -0
  454. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lt.png +0 -0
  455. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mlm.gif +0 -0
  456. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mlm.png +0 -0
  457. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mrm.gif +0 -0
  458. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mrm.png +0 -0
  459. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rb.gif +0 -0
  460. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rb.png +0 -0
  461. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rt.gif +0 -0
  462. data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rt.png +0 -0
  463. data/public/treport/plugins/zDialog/skins/lightBlue/dir.txt +24 -0
  464. data/public/treport/plugins/zDialog/skins/lightBlue/icon_alert.gif +0 -0
  465. data/public/treport/plugins/zDialog/skins/lightBlue/icon_dialog.gif +0 -0
  466. data/public/treport/plugins/zDialog/skins/lightBlue/icon_query.gif +0 -0
  467. data/public/treport/plugins/zDialog/skins/lightBlue/window.gif +0 -0
  468. data/public/treport/plugins/zDialog/skins/orange/dialog_bg.jpg +0 -0
  469. data/public/treport/plugins/zDialog/skins/orange/dialog_cb.gif +0 -0
  470. data/public/treport/plugins/zDialog/skins/orange/dialog_cb.png +0 -0
  471. data/public/treport/plugins/zDialog/skins/orange/dialog_closebtn.gif +0 -0
  472. data/public/treport/plugins/zDialog/skins/orange/dialog_closebtn_over.gif +0 -0
  473. data/public/treport/plugins/zDialog/skins/orange/dialog_ct.gif +0 -0
  474. data/public/treport/plugins/zDialog/skins/orange/dialog_ct.png +0 -0
  475. data/public/treport/plugins/zDialog/skins/orange/dialog_decreasebtn.gif +0 -0
  476. data/public/treport/plugins/zDialog/skins/orange/dialog_lb.gif +0 -0
  477. data/public/treport/plugins/zDialog/skins/orange/dialog_lb.png +0 -0
  478. data/public/treport/plugins/zDialog/skins/orange/dialog_lt.gif +0 -0
  479. data/public/treport/plugins/zDialog/skins/orange/dialog_lt.png +0 -0
  480. data/public/treport/plugins/zDialog/skins/orange/dialog_maxbtn.gif +0 -0
  481. data/public/treport/plugins/zDialog/skins/orange/dialog_minbtn.gif +0 -0
  482. data/public/treport/plugins/zDialog/skins/orange/dialog_mlm.gif +0 -0
  483. data/public/treport/plugins/zDialog/skins/orange/dialog_mlm.png +0 -0
  484. data/public/treport/plugins/zDialog/skins/orange/dialog_mrm.gif +0 -0
  485. data/public/treport/plugins/zDialog/skins/orange/dialog_mrm.png +0 -0
  486. data/public/treport/plugins/zDialog/skins/orange/dialog_rb.gif +0 -0
  487. data/public/treport/plugins/zDialog/skins/orange/dialog_rb.png +0 -0
  488. data/public/treport/plugins/zDialog/skins/orange/dialog_rt.gif +0 -0
  489. data/public/treport/plugins/zDialog/skins/orange/dialog_rt.png +0 -0
  490. data/public/treport/plugins/zDialog/skins/orange/icon_alert.gif +0 -0
  491. data/public/treport/plugins/zDialog/skins/orange/icon_dialog.gif +0 -0
  492. data/public/treport/plugins/zDialog/skins/orange/icon_dialog.png +0 -0
  493. data/public/treport/plugins/zDialog/skins/orange/icon_query.gif +0 -0
  494. data/public/treport/plugins/zDialog/skins/orange/item_leftBtn.gif +0 -0
  495. data/public/treport/plugins/zDialog/skins/orange/item_rightBtn.gif +0 -0
  496. data/public/treport/plugins/zDialog/skins/orange/shadow_cb.gif +0 -0
  497. data/public/treport/plugins/zDialog/skins/orange/shadow_cb.png +0 -0
  498. data/public/treport/plugins/zDialog/skins/orange/shadow_ct.gif +0 -0
  499. data/public/treport/plugins/zDialog/skins/orange/shadow_lb.gif +0 -0
  500. data/public/treport/plugins/zDialog/skins/orange/shadow_lb.png +0 -0
  501. data/public/treport/plugins/zDialog/skins/orange/shadow_lm.gif +0 -0
  502. data/public/treport/plugins/zDialog/skins/orange/shadow_lt.gif +0 -0
  503. data/public/treport/plugins/zDialog/skins/orange/shadow_rb.gif +0 -0
  504. data/public/treport/plugins/zDialog/skins/orange/shadow_rb.png +0 -0
  505. data/public/treport/plugins/zDialog/skins/orange/shadow_rm.gif +0 -0
  506. data/public/treport/plugins/zDialog/skins/orange/shadow_rt.gif +0 -0
  507. data/public/treport/plugins/zDialog/skins/orange/simple_bottomLine.gif +0 -0
  508. data/public/treport/plugins/zDialog/skins/orange/simple_close.gif +0 -0
  509. data/public/treport/plugins/zDialog/skins/orange/simple_tip.gif +0 -0
  510. data/public/treport/plugins/zDialog/skins/orange/simple_tip.png +0 -0
  511. data/public/treport/plugins/zDialog/skins/orange/taskBar.jpg +0 -0
  512. data/public/treport/plugins/zDialog/skins/orange/taskItemLeft.jpg +0 -0
  513. data/public/treport/plugins/zDialog/skins/orange/taskItemLeftCurrent.jpg +0 -0
  514. data/public/treport/plugins/zDialog/skins/orange/taskItemRight.jpg +0 -0
  515. data/public/treport/plugins/zDialog/skins/orange/taskItemRightCurrent.jpg +0 -0
  516. data/public/treport/plugins/zDialog/skins/orange/trans.gif +0 -0
  517. data/public/treport/plugins/zDialog/skins/orange/window.gif +0 -0
  518. data/public/treport/plugins/zDialog/skins/red/dialog_bg.jpg +0 -0
  519. data/public/treport/plugins/zDialog/skins/red/dialog_cb.gif +0 -0
  520. data/public/treport/plugins/zDialog/skins/red/dialog_cb.png +0 -0
  521. data/public/treport/plugins/zDialog/skins/red/dialog_closebtn.gif +0 -0
  522. data/public/treport/plugins/zDialog/skins/red/dialog_closebtn_over.gif +0 -0
  523. data/public/treport/plugins/zDialog/skins/red/dialog_ct.gif +0 -0
  524. data/public/treport/plugins/zDialog/skins/red/dialog_ct.png +0 -0
  525. data/public/treport/plugins/zDialog/skins/red/dialog_lb.gif +0 -0
  526. data/public/treport/plugins/zDialog/skins/red/dialog_lb.png +0 -0
  527. data/public/treport/plugins/zDialog/skins/red/dialog_lt.gif +0 -0
  528. data/public/treport/plugins/zDialog/skins/red/dialog_lt.png +0 -0
  529. data/public/treport/plugins/zDialog/skins/red/dialog_mlm.gif +0 -0
  530. data/public/treport/plugins/zDialog/skins/red/dialog_mlm.png +0 -0
  531. data/public/treport/plugins/zDialog/skins/red/dialog_mrm.gif +0 -0
  532. data/public/treport/plugins/zDialog/skins/red/dialog_mrm.png +0 -0
  533. data/public/treport/plugins/zDialog/skins/red/dialog_rb.gif +0 -0
  534. data/public/treport/plugins/zDialog/skins/red/dialog_rb.png +0 -0
  535. data/public/treport/plugins/zDialog/skins/red/dialog_rt.gif +0 -0
  536. data/public/treport/plugins/zDialog/skins/red/dialog_rt.png +0 -0
  537. data/public/treport/plugins/zDialog/skins/red/dir.txt +24 -0
  538. data/public/treport/plugins/zDialog/skins/red/icon_alert.gif +0 -0
  539. data/public/treport/plugins/zDialog/skins/red/icon_dialog.gif +0 -0
  540. data/public/treport/plugins/zDialog/skins/red/icon_query.gif +0 -0
  541. data/public/treport/plugins/zDialog/skins/red/window.gif +0 -0
  542. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_bg.jpg +0 -0
  543. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_cb.gif +0 -0
  544. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_cb.png +0 -0
  545. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_closebtn.gif +0 -0
  546. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_closebtn_over.gif +0 -0
  547. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_ct.gif +0 -0
  548. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_ct.png +0 -0
  549. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lb.gif +0 -0
  550. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lb.png +0 -0
  551. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lt.gif +0 -0
  552. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lt.png +0 -0
  553. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mlm.gif +0 -0
  554. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mlm.png +0 -0
  555. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mrm.gif +0 -0
  556. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mrm.png +0 -0
  557. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rb.gif +0 -0
  558. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rb.png +0 -0
  559. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rt.gif +0 -0
  560. data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rt.png +0 -0
  561. data/public/treport/plugins/zDialog/skins/yellowGreen/dir.txt +24 -0
  562. data/public/treport/plugins/zDialog/skins/yellowGreen/icon_alert.gif +0 -0
  563. data/public/treport/plugins/zDialog/skins/yellowGreen/icon_dialog.gif +0 -0
  564. data/public/treport/plugins/zDialog/skins/yellowGreen/icon_query.gif +0 -0
  565. data/public/treport/plugins/zDialog/skins/yellowGreen/window.gif +0 -0
  566. data/public/treport/plugins/zDialog/zDialog.js +764 -0
  567. data/public/treport/plugins/zDialog/zDrag.js +1 -0
  568. data/public/treport/src-noconflict/ace.js +18673 -0
  569. data/public/treport/src-noconflict/ext-beautify.js +334 -0
  570. data/public/treport/src-noconflict/ext-chromevox.js +540 -0
  571. data/public/treport/src-noconflict/ext-elastic_tabstops_lite.js +274 -0
  572. data/public/treport/src-noconflict/ext-emmet.js +1218 -0
  573. data/public/treport/src-noconflict/ext-error_marker.js +6 -0
  574. data/public/treport/src-noconflict/ext-keybinding_menu.js +170 -0
  575. data/public/treport/src-noconflict/ext-language_tools.js +1938 -0
  576. data/public/treport/src-noconflict/ext-linking.js +52 -0
  577. data/public/treport/src-noconflict/ext-modelist.js +201 -0
  578. data/public/treport/src-noconflict/ext-old_ie.js +501 -0
  579. data/public/treport/src-noconflict/ext-searchbox.js +416 -0
  580. data/public/treport/src-noconflict/ext-settings_menu.js +653 -0
  581. data/public/treport/src-noconflict/ext-spellcheck.js +71 -0
  582. data/public/treport/src-noconflict/ext-split.js +246 -0
  583. data/public/treport/src-noconflict/ext-static_highlight.js +161 -0
  584. data/public/treport/src-noconflict/ext-statusbar.js +53 -0
  585. data/public/treport/src-noconflict/ext-textarea.js +559 -0
  586. data/public/treport/src-noconflict/ext-themelist.js +60 -0
  587. data/public/treport/src-noconflict/ext-whitespace.js +185 -0
  588. data/public/treport/src-noconflict/keybinding-emacs.js +1181 -0
  589. data/public/treport/src-noconflict/keybinding-vim.js +5580 -0
  590. data/public/treport/src-noconflict/mode-abap.js +214 -0
  591. data/public/treport/src-noconflict/mode-abc.js +260 -0
  592. data/public/treport/src-noconflict/mode-actionscript.js +266 -0
  593. data/public/treport/src-noconflict/mode-ada.js +87 -0
  594. data/public/treport/src-noconflict/mode-apache_conf.js +355 -0
  595. data/public/treport/src-noconflict/mode-applescript.js +271 -0
  596. data/public/treport/src-noconflict/mode-asciidoc.js +342 -0
  597. data/public/treport/src-noconflict/mode-assembly_x86.js +185 -0
  598. data/public/treport/src-noconflict/mode-autohotkey.js +234 -0
  599. data/public/treport/src-noconflict/mode-batchfile.js +222 -0
  600. data/public/treport/src-noconflict/mode-c9search.js +275 -0
  601. data/public/treport/src-noconflict/mode-c_cpp.js +845 -0
  602. data/public/treport/src-noconflict/mode-cirru.js +202 -0
  603. data/public/treport/src-noconflict/mode-clojure.js +306 -0
  604. data/public/treport/src-noconflict/mode-cobol.js +94 -0
  605. data/public/treport/src-noconflict/mode-coffee.js +393 -0
  606. data/public/treport/src-noconflict/mode-coldfusion.js +2867 -0
  607. data/public/treport/src-noconflict/mode-csharp.js +853 -0
  608. data/public/treport/src-noconflict/mode-css.js +1008 -0
  609. data/public/treport/src-noconflict/mode-curly.js +2836 -0
  610. data/public/treport/src-noconflict/mode-d.js +512 -0
  611. data/public/treport/src-noconflict/mode-dart.js +1049 -0
  612. data/public/treport/src-noconflict/mode-diff.js +139 -0
  613. data/public/treport/src-noconflict/mode-django.js +2870 -0
  614. data/public/treport/src-noconflict/mode-dockerfile.js +849 -0
  615. data/public/treport/src-noconflict/mode-dot.js +412 -0
  616. data/public/treport/src-noconflict/mode-eiffel.js +128 -0
  617. data/public/treport/src-noconflict/mode-ejs.js +3294 -0
  618. data/public/treport/src-noconflict/mode-elixir.js +493 -0
  619. data/public/treport/src-noconflict/mode-elm.js +296 -0
  620. data/public/treport/src-noconflict/mode-erlang.js +1001 -0
  621. data/public/treport/src-noconflict/mode-forth.js +289 -0
  622. data/public/treport/src-noconflict/mode-ftl.js +1137 -0
  623. data/public/treport/src-noconflict/mode-gcode.js +85 -0
  624. data/public/treport/src-noconflict/mode-gherkin.js +162 -0
  625. data/public/treport/src-noconflict/mode-gitignore.js +51 -0
  626. data/public/treport/src-noconflict/mode-glsl.js +922 -0
  627. data/public/treport/src-noconflict/mode-gobstones.js +1273 -0
  628. data/public/treport/src-noconflict/mode-golang.js +763 -0
  629. data/public/treport/src-noconflict/mode-groovy.js +1332 -0
  630. data/public/treport/src-noconflict/mode-haml.js +1482 -0
  631. data/public/treport/src-noconflict/mode-handlebars.js +2895 -0
  632. data/public/treport/src-noconflict/mode-haskell.js +371 -0
  633. data/public/treport/src-noconflict/mode-haxe.js +737 -0
  634. data/public/treport/src-noconflict/mode-html.js +2780 -0
  635. data/public/treport/src-noconflict/mode-html_elixir.js +3358 -0
  636. data/public/treport/src-noconflict/mode-html_ruby.js +3311 -0
  637. data/public/treport/src-noconflict/mode-ini.js +154 -0
  638. data/public/treport/src-noconflict/mode-io.js +246 -0
  639. data/public/treport/src-noconflict/mode-jack.js +696 -0
  640. data/public/treport/src-noconflict/mode-jade.js +2066 -0
  641. data/public/treport/src-noconflict/mode-java.js +1287 -0
  642. data/public/treport/src-noconflict/mode-javascript.js +1140 -0
  643. data/public/treport/src-noconflict/mode-json.js +668 -0
  644. data/public/treport/src-noconflict/mode-jsoniq.js +2956 -0
  645. data/public/treport/src-noconflict/mode-jsp.js +1701 -0
  646. data/public/treport/src-noconflict/mode-jsx.js +762 -0
  647. data/public/treport/src-noconflict/mode-julia.js +295 -0
  648. data/public/treport/src-noconflict/mode-latex.js +223 -0
  649. data/public/treport/src-noconflict/mode-lean.js +281 -0
  650. data/public/treport/src-noconflict/mode-less.js +1129 -0
  651. data/public/treport/src-noconflict/mode-liquid.js +1139 -0
  652. data/public/treport/src-noconflict/mode-lisp.js +104 -0
  653. data/public/treport/src-noconflict/mode-live_script.js +481 -0
  654. data/public/treport/src-noconflict/mode-livescript.js +271 -0
  655. data/public/treport/src-noconflict/mode-logiql.js +667 -0
  656. data/public/treport/src-noconflict/mode-lsl.js +692 -0
  657. data/public/treport/src-noconflict/mode-lua.js +423 -0
  658. data/public/treport/src-noconflict/mode-luapage.js +3277 -0
  659. data/public/treport/src-noconflict/mode-lucene.js +69 -0
  660. data/public/treport/src-noconflict/mode-makefile.js +403 -0
  661. data/public/treport/src-noconflict/mode-markdown.js +3165 -0
  662. data/public/treport/src-noconflict/mode-mask.js +2099 -0
  663. data/public/treport/src-noconflict/mode-matlab.js +256 -0
  664. data/public/treport/src-noconflict/mode-mavens_mate_log.js +160 -0
  665. data/public/treport/src-noconflict/mode-maze.js +283 -0
  666. data/public/treport/src-noconflict/mode-mel.js +613 -0
  667. data/public/treport/src-noconflict/mode-mips_assembler.js +235 -0
  668. data/public/treport/src-noconflict/mode-mipsassembler.js +196 -0
  669. data/public/treport/src-noconflict/mode-mushcode.js +673 -0
  670. data/public/treport/src-noconflict/mode-mysql.js +160 -0
  671. data/public/treport/src-noconflict/mode-nix.js +989 -0
  672. data/public/treport/src-noconflict/mode-nsis.js +304 -0
  673. data/public/treport/src-noconflict/mode-objectivec.js +726 -0
  674. data/public/treport/src-noconflict/mode-ocaml.js +414 -0
  675. data/public/treport/src-noconflict/mode-pascal.js +197 -0
  676. data/public/treport/src-noconflict/mode-perl.js +373 -0
  677. data/public/treport/src-noconflict/mode-pgsql.js +1489 -0
  678. data/public/treport/src-noconflict/mode-php.js +13328 -0
  679. data/public/treport/src-noconflict/mode-plain_text.js +25 -0
  680. data/public/treport/src-noconflict/mode-powershell.js +768 -0
  681. data/public/treport/src-noconflict/mode-praat.js +468 -0
  682. data/public/treport/src-noconflict/mode-prolog.js +363 -0
  683. data/public/treport/src-noconflict/mode-properties.js +72 -0
  684. data/public/treport/src-noconflict/mode-protobuf.js +936 -0
  685. data/public/treport/src-noconflict/mode-python.js +264 -0
  686. data/public/treport/src-noconflict/mode-r.js +302 -0
  687. data/public/treport/src-noconflict/mode-razor.js +3136 -0
  688. data/public/treport/src-noconflict/mode-rdoc.js +205 -0
  689. data/public/treport/src-noconflict/mode-rhtml.js +3079 -0
  690. data/public/treport/src-noconflict/mode-rst.js +249 -0
  691. data/public/treport/src-noconflict/mode-ruby.js +843 -0
  692. data/public/treport/src-noconflict/mode-rust.js +270 -0
  693. data/public/treport/src-noconflict/mode-sass.js +412 -0
  694. data/public/treport/src-noconflict/mode-scad.js +766 -0
  695. data/public/treport/src-noconflict/mode-scala.js +1329 -0
  696. data/public/treport/src-noconflict/mode-scheme.js +224 -0
  697. data/public/treport/src-noconflict/mode-scss.js +922 -0
  698. data/public/treport/src-noconflict/mode-sh.js +798 -0
  699. data/public/treport/src-noconflict/mode-sjs.js +1357 -0
  700. data/public/treport/src-noconflict/mode-smarty.js +2906 -0
  701. data/public/treport/src-noconflict/mode-snippets.js +198 -0
  702. data/public/treport/src-noconflict/mode-soy_template.js +3119 -0
  703. data/public/treport/src-noconflict/mode-space.js +159 -0
  704. data/public/treport/src-noconflict/mode-sql.js +100 -0
  705. data/public/treport/src-noconflict/mode-sqlserver.js +437 -0
  706. data/public/treport/src-noconflict/mode-stylus.js +414 -0
  707. data/public/treport/src-noconflict/mode-svg.js +1916 -0
  708. data/public/treport/src-noconflict/mode-swift.js +738 -0
  709. data/public/treport/src-noconflict/mode-swig.js +1099 -0
  710. data/public/treport/src-noconflict/mode-tcl.js +375 -0
  711. data/public/treport/src-noconflict/mode-tex.js +151 -0
  712. data/public/treport/src-noconflict/mode-text.js +1 -0
  713. data/public/treport/src-noconflict/mode-textile.js +141 -0
  714. data/public/treport/src-noconflict/mode-toml.js +145 -0
  715. data/public/treport/src-noconflict/mode-twig.js +2964 -0
  716. data/public/treport/src-noconflict/mode-typescript.js +1223 -0
  717. data/public/treport/src-noconflict/mode-vala.js +1026 -0
  718. data/public/treport/src-noconflict/mode-vbscript.js +226 -0
  719. data/public/treport/src-noconflict/mode-velocity.js +3062 -0
  720. data/public/treport/src-noconflict/mode-verilog.js +103 -0
  721. data/public/treport/src-noconflict/mode-vhdl.js +110 -0
  722. data/public/treport/src-noconflict/mode-wollok.js +1256 -0
  723. data/public/treport/src-noconflict/mode-xml.js +661 -0
  724. data/public/treport/src-noconflict/mode-xquery.js +2968 -0
  725. data/public/treport/src-noconflict/mode-yaml.js +256 -0
  726. data/public/treport/src-noconflict/snippets/abap.js +7 -0
  727. data/public/treport/src-noconflict/snippets/abc.js +38 -0
  728. data/public/treport/src-noconflict/snippets/actionscript.js +164 -0
  729. data/public/treport/src-noconflict/snippets/ada.js +7 -0
  730. data/public/treport/src-noconflict/snippets/apache_conf.js +7 -0
  731. data/public/treport/src-noconflict/snippets/applescript.js +7 -0
  732. data/public/treport/src-noconflict/snippets/asciidoc.js +7 -0
  733. data/public/treport/src-noconflict/snippets/assembly_x86.js +7 -0
  734. data/public/treport/src-noconflict/snippets/autohotkey.js +7 -0
  735. data/public/treport/src-noconflict/snippets/batchfile.js +7 -0
  736. data/public/treport/src-noconflict/snippets/c9search.js +7 -0
  737. data/public/treport/src-noconflict/snippets/c_cpp.js +138 -0
  738. data/public/treport/src-noconflict/snippets/cirru.js +7 -0
  739. data/public/treport/src-noconflict/snippets/clojure.js +97 -0
  740. data/public/treport/src-noconflict/snippets/cobol.js +7 -0
  741. data/public/treport/src-noconflict/snippets/coffee.js +102 -0
  742. data/public/treport/src-noconflict/snippets/coldfusion.js +7 -0
  743. data/public/treport/src-noconflict/snippets/csharp.js +7 -0
  744. data/public/treport/src-noconflict/snippets/css.js +974 -0
  745. data/public/treport/src-noconflict/snippets/curly.js +7 -0
  746. data/public/treport/src-noconflict/snippets/d.js +7 -0
  747. data/public/treport/src-noconflict/snippets/dart.js +90 -0
  748. data/public/treport/src-noconflict/snippets/diff.js +18 -0
  749. data/public/treport/src-noconflict/snippets/django.js +115 -0
  750. data/public/treport/src-noconflict/snippets/dockerfile.js +7 -0
  751. data/public/treport/src-noconflict/snippets/dot.js +7 -0
  752. data/public/treport/src-noconflict/snippets/eiffel.js +7 -0
  753. data/public/treport/src-noconflict/snippets/ejs.js +7 -0
  754. data/public/treport/src-noconflict/snippets/elixir.js +7 -0
  755. data/public/treport/src-noconflict/snippets/elm.js +7 -0
  756. data/public/treport/src-noconflict/snippets/erlang.js +167 -0
  757. data/public/treport/src-noconflict/snippets/forth.js +7 -0
  758. data/public/treport/src-noconflict/snippets/ftl.js +7 -0
  759. data/public/treport/src-noconflict/snippets/gcode.js +7 -0
  760. data/public/treport/src-noconflict/snippets/gherkin.js +7 -0
  761. data/public/treport/src-noconflict/snippets/gitignore.js +7 -0
  762. data/public/treport/src-noconflict/snippets/glsl.js +7 -0
  763. data/public/treport/src-noconflict/snippets/gobstones.js +41 -0
  764. data/public/treport/src-noconflict/snippets/golang.js +7 -0
  765. data/public/treport/src-noconflict/snippets/groovy.js +7 -0
  766. data/public/treport/src-noconflict/snippets/haml.js +27 -0
  767. data/public/treport/src-noconflict/snippets/handlebars.js +7 -0
  768. data/public/treport/src-noconflict/snippets/haskell.js +89 -0
  769. data/public/treport/src-noconflict/snippets/haxe.js +7 -0
  770. data/public/treport/src-noconflict/snippets/html.js +835 -0
  771. data/public/treport/src-noconflict/snippets/html_elixir.js +7 -0
  772. data/public/treport/src-noconflict/snippets/html_ruby.js +7 -0
  773. data/public/treport/src-noconflict/snippets/ini.js +7 -0
  774. data/public/treport/src-noconflict/snippets/io.js +69 -0
  775. data/public/treport/src-noconflict/snippets/jack.js +7 -0
  776. data/public/treport/src-noconflict/snippets/jade.js +7 -0
  777. data/public/treport/src-noconflict/snippets/java.js +247 -0
  778. data/public/treport/src-noconflict/snippets/javascript.js +202 -0
  779. data/public/treport/src-noconflict/snippets/json.js +7 -0
  780. data/public/treport/src-noconflict/snippets/jsoniq.js +68 -0
  781. data/public/treport/src-noconflict/snippets/jsp.js +106 -0
  782. data/public/treport/src-noconflict/snippets/jsx.js +7 -0
  783. data/public/treport/src-noconflict/snippets/julia.js +7 -0
  784. data/public/treport/src-noconflict/snippets/latex.js +7 -0
  785. data/public/treport/src-noconflict/snippets/lean.js +7 -0
  786. data/public/treport/src-noconflict/snippets/less.js +7 -0
  787. data/public/treport/src-noconflict/snippets/liquid.js +7 -0
  788. data/public/treport/src-noconflict/snippets/lisp.js +7 -0
  789. data/public/treport/src-noconflict/snippets/live_script.js +7 -0
  790. data/public/treport/src-noconflict/snippets/livescript.js +7 -0
  791. data/public/treport/src-noconflict/snippets/logiql.js +7 -0
  792. data/public/treport/src-noconflict/snippets/lsl.js +1239 -0
  793. data/public/treport/src-noconflict/snippets/lua.js +28 -0
  794. data/public/treport/src-noconflict/snippets/luapage.js +7 -0
  795. data/public/treport/src-noconflict/snippets/lucene.js +7 -0
  796. data/public/treport/src-noconflict/snippets/makefile.js +11 -0
  797. data/public/treport/src-noconflict/snippets/markdown.js +95 -0
  798. data/public/treport/src-noconflict/snippets/mask.js +7 -0
  799. data/public/treport/src-noconflict/snippets/matlab.js +7 -0
  800. data/public/treport/src-noconflict/snippets/maze.js +16 -0
  801. data/public/treport/src-noconflict/snippets/mel.js +7 -0
  802. data/public/treport/src-noconflict/snippets/mips_assembler.js +7 -0
  803. data/public/treport/src-noconflict/snippets/mipsassembler.js +7 -0
  804. data/public/treport/src-noconflict/snippets/mushcode.js +7 -0
  805. data/public/treport/src-noconflict/snippets/mysql.js +7 -0
  806. data/public/treport/src-noconflict/snippets/nix.js +7 -0
  807. data/public/treport/src-noconflict/snippets/nsis.js +7 -0
  808. data/public/treport/src-noconflict/snippets/objectivec.js +7 -0
  809. data/public/treport/src-noconflict/snippets/ocaml.js +7 -0
  810. data/public/treport/src-noconflict/snippets/pascal.js +7 -0
  811. data/public/treport/src-noconflict/snippets/perl.js +354 -0
  812. data/public/treport/src-noconflict/snippets/pgsql.js +7 -0
  813. data/public/treport/src-noconflict/snippets/php.js +384 -0
  814. data/public/treport/src-noconflict/snippets/plain_text.js +7 -0
  815. data/public/treport/src-noconflict/snippets/powershell.js +7 -0
  816. data/public/treport/src-noconflict/snippets/praat.js +7 -0
  817. data/public/treport/src-noconflict/snippets/prolog.js +7 -0
  818. data/public/treport/src-noconflict/snippets/properties.js +7 -0
  819. data/public/treport/src-noconflict/snippets/protobuf.js +7 -0
  820. data/public/treport/src-noconflict/snippets/python.js +165 -0
  821. data/public/treport/src-noconflict/snippets/r.js +128 -0
  822. data/public/treport/src-noconflict/snippets/razor.js +10 -0
  823. data/public/treport/src-noconflict/snippets/rdoc.js +7 -0
  824. data/public/treport/src-noconflict/snippets/rhtml.js +7 -0
  825. data/public/treport/src-noconflict/snippets/rst.js +7 -0
  826. data/public/treport/src-noconflict/snippets/ruby.js +935 -0
  827. data/public/treport/src-noconflict/snippets/rust.js +7 -0
  828. data/public/treport/src-noconflict/snippets/sass.js +7 -0
  829. data/public/treport/src-noconflict/snippets/scad.js +7 -0
  830. data/public/treport/src-noconflict/snippets/scala.js +7 -0
  831. data/public/treport/src-noconflict/snippets/scheme.js +7 -0
  832. data/public/treport/src-noconflict/snippets/scss.js +7 -0
  833. data/public/treport/src-noconflict/snippets/sh.js +90 -0
  834. data/public/treport/src-noconflict/snippets/sjs.js +7 -0
  835. data/public/treport/src-noconflict/snippets/smarty.js +7 -0
  836. data/public/treport/src-noconflict/snippets/snippets.js +16 -0
  837. data/public/treport/src-noconflict/snippets/soy_template.js +7 -0
  838. data/public/treport/src-noconflict/snippets/space.js +7 -0
  839. data/public/treport/src-noconflict/snippets/sql.js +33 -0
  840. data/public/treport/src-noconflict/snippets/sqlserver.js +76 -0
  841. data/public/treport/src-noconflict/snippets/stylus.js +7 -0
  842. data/public/treport/src-noconflict/snippets/svg.js +7 -0
  843. data/public/treport/src-noconflict/snippets/swift.js +7 -0
  844. data/public/treport/src-noconflict/snippets/swig.js +7 -0
  845. data/public/treport/src-noconflict/snippets/tcl.js +99 -0
  846. data/public/treport/src-noconflict/snippets/tex.js +197 -0
  847. data/public/treport/src-noconflict/snippets/text.js +7 -0
  848. data/public/treport/src-noconflict/snippets/textile.js +37 -0
  849. data/public/treport/src-noconflict/snippets/toml.js +7 -0
  850. data/public/treport/src-noconflict/snippets/twig.js +7 -0
  851. data/public/treport/src-noconflict/snippets/typescript.js +7 -0
  852. data/public/treport/src-noconflict/snippets/vala.js +193 -0
  853. data/public/treport/src-noconflict/snippets/vbscript.js +7 -0
  854. data/public/treport/src-noconflict/snippets/velocity.js +36 -0
  855. data/public/treport/src-noconflict/snippets/verilog.js +7 -0
  856. data/public/treport/src-noconflict/snippets/vhdl.js +7 -0
  857. data/public/treport/src-noconflict/snippets/wollok.js +91 -0
  858. data/public/treport/src-noconflict/snippets/xml.js +7 -0
  859. data/public/treport/src-noconflict/snippets/xquery.js +68 -0
  860. data/public/treport/src-noconflict/snippets/yaml.js +7 -0
  861. data/public/treport/src-noconflict/theme-ambiance.js +182 -0
  862. data/public/treport/src-noconflict/theme-chaos.js +156 -0
  863. data/public/treport/src-noconflict/theme-chrome.js +128 -0
  864. data/public/treport/src-noconflict/theme-clouds.js +95 -0
  865. data/public/treport/src-noconflict/theme-clouds_midnight.js +96 -0
  866. data/public/treport/src-noconflict/theme-cobalt.js +113 -0
  867. data/public/treport/src-noconflict/theme-crimson_editor.js +118 -0
  868. data/public/treport/src-noconflict/theme-dawn.js +108 -0
  869. data/public/treport/src-noconflict/theme-dreamweaver.js +141 -0
  870. data/public/treport/src-noconflict/theme-eclipse.js +98 -0
  871. data/public/treport/src-noconflict/theme-github.js +103 -0
  872. data/public/treport/src-noconflict/theme-idle_fingers.js +96 -0
  873. data/public/treport/src-noconflict/theme-iplastic.js +121 -0
  874. data/public/treport/src-noconflict/theme-katzenmilch.js +121 -0
  875. data/public/treport/src-noconflict/theme-kr_theme.js +104 -0
  876. data/public/treport/src-noconflict/theme-kuroir.js +61 -0
  877. data/public/treport/src-noconflict/theme-merbivore.js +95 -0
  878. data/public/treport/src-noconflict/theme-merbivore_soft.js +96 -0
  879. data/public/treport/src-noconflict/theme-mono_industrial.js +107 -0
  880. data/public/treport/src-noconflict/theme-monokai.js +105 -0
  881. data/public/treport/src-noconflict/theme-pastel_on_dark.js +108 -0
  882. data/public/treport/src-noconflict/theme-solarized_dark.js +88 -0
  883. data/public/treport/src-noconflict/theme-solarized_light.js +91 -0
  884. data/public/treport/src-noconflict/theme-sqlserver.js +138 -0
  885. data/public/treport/src-noconflict/theme-terminal.js +114 -0
  886. data/public/treport/src-noconflict/theme-textmate.js +129 -0
  887. data/public/treport/src-noconflict/theme-tomorrow.js +108 -0
  888. data/public/treport/src-noconflict/theme-tomorrow_night.js +108 -0
  889. data/public/treport/src-noconflict/theme-tomorrow_night_blue.js +106 -0
  890. data/public/treport/src-noconflict/theme-tomorrow_night_bright.js +121 -0
  891. data/public/treport/src-noconflict/theme-tomorrow_night_eighties.js +108 -0
  892. data/public/treport/src-noconflict/theme-twilight.js +109 -0
  893. data/public/treport/src-noconflict/theme-vibrant_ink.js +94 -0
  894. data/public/treport/src-noconflict/theme-xcode.js +88 -0
  895. data/public/treport/src-noconflict/worker-coffee.js +2159 -0
  896. data/public/treport/src-noconflict/worker-css.js +8762 -0
  897. data/public/treport/src-noconflict/worker-html.js +11607 -0
  898. data/public/treport/src-noconflict/worker-javascript.js +12530 -0
  899. data/public/treport/src-noconflict/worker-json.js +2398 -0
  900. data/public/treport/src-noconflict/worker-lua.js +3634 -0
  901. data/public/treport/src-noconflict/worker-php.js +7021 -0
  902. data/public/treport/src-noconflict/worker-xml.js +3889 -0
  903. data/public/treport/src-noconflict/worker-xquery.js +49612 -0
  904. data/public/treport/swf/flashExport.swf +0 -0
  905. metadata +906 -54
  906. data/app/controllers/connects_controller.rb +0 -56
  907. data/app/controllers/dictionaries_controller.rb +0 -56
  908. data/app/controllers/reports_controller.rb +0 -62
  909. data/app/controllers/requirements_controller.rb +0 -60
  910. data/app/controllers/series_controller.rb +0 -60
  911. data/app/models/.keep +0 -0
  912. data/app/models/dictionary.rb +0 -4
  913. data/app/models/series.rb +0 -4
  914. data/app/views/connects/_form.html.erb +0 -68
  915. data/app/views/connects/edit.html.erb +0 -1
  916. data/app/views/connects/index.html.erb +0 -48
  917. data/app/views/connects/new.html.erb +0 -1
  918. data/app/views/dictionaries/_form.html.erb +0 -49
  919. data/app/views/dictionaries/edit.html.erb +0 -1
  920. data/app/views/dictionaries/index.html.erb +0 -42
  921. data/app/views/dictionaries/new.html.erb +0 -1
  922. data/app/views/layouts/report.html.erb +0 -54
  923. data/app/views/reports/_form.html.erb +0 -65
  924. data/app/views/reports/edit.html.erb +0 -1
  925. data/app/views/reports/index.html.erb +0 -50
  926. data/app/views/reports/new.html.erb +0 -1
  927. data/app/views/requirements/_form.html.erb +0 -72
  928. data/app/views/requirements/edit.html.erb +0 -1
  929. data/app/views/requirements/index.html.erb +0 -51
  930. data/app/views/requirements/new.html.erb +0 -1
  931. data/app/views/series/_form.html.erb +0 -47
  932. data/app/views/series/edit.html.erb +0 -1
  933. data/app/views/series/index.html.erb +0 -40
  934. data/app/views/series/new.html.erb +0 -1
  935. data/app/views/templates/public_one.html.erb +0 -75
  936. data/app/views/templates/public_two.html.erb +0 -76
  937. data/app/views/templates/text.html.erb +0 -9
  938. data/db/migrate/20160607002137_create_connects.rb +0 -15
  939. data/db/migrate/20160608123333_create_reports.rb +0 -15
  940. data/db/migrate/20160608124539_create_requirements.rb +0 -16
  941. data/db/migrate/20160608124549_create_dictionaries.rb +0 -12
  942. data/db/migrate/20160608124602_create_series.rb +0 -11
  943. data/lib/generators/report/install_generator.rb +0 -26
  944. data/lib/treport/db.rb +0 -49
  945. data/public/report/css/AdminLTE.css +0 -4906
  946. data/public/report/css/bootstrap.min.css +0 -6
  947. data/public/report/css/skins/_all-skins.css +0 -1799
  948. data/public/report/css/skins/_all-skins.min.css +0 -1
  949. data/public/report/js/app.js +0 -44
  950. data/treport.gemspec +0 -12
@@ -0,0 +1,1938 @@
1
+ ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) {
2
+ "use strict";
3
+ var oop = require("./lib/oop");
4
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
5
+ var lang = require("./lib/lang");
6
+ var Range = require("./range").Range;
7
+ var Anchor = require("./anchor").Anchor;
8
+ var HashHandler = require("./keyboard/hash_handler").HashHandler;
9
+ var Tokenizer = require("./tokenizer").Tokenizer;
10
+ var comparePoints = Range.comparePoints;
11
+
12
+ var SnippetManager = function() {
13
+ this.snippetMap = {};
14
+ this.snippetNameMap = {};
15
+ };
16
+
17
+ (function() {
18
+ oop.implement(this, EventEmitter);
19
+
20
+ this.getTokenizer = function() {
21
+ function TabstopToken(str, _, stack) {
22
+ str = str.substr(1);
23
+ if (/^\d+$/.test(str) && !stack.inFormatString)
24
+ return [{tabstopId: parseInt(str, 10)}];
25
+ return [{text: str}];
26
+ }
27
+ function escape(ch) {
28
+ return "(?:[^\\\\" + ch + "]|\\\\.)";
29
+ }
30
+ SnippetManager.$tokenizer = new Tokenizer({
31
+ start: [
32
+ {regex: /:/, onMatch: function(val, state, stack) {
33
+ if (stack.length && stack[0].expectIf) {
34
+ stack[0].expectIf = false;
35
+ stack[0].elseBranch = stack[0];
36
+ return [stack[0]];
37
+ }
38
+ return ":";
39
+ }},
40
+ {regex: /\\./, onMatch: function(val, state, stack) {
41
+ var ch = val[1];
42
+ if (ch == "}" && stack.length) {
43
+ val = ch;
44
+ }else if ("`$\\".indexOf(ch) != -1) {
45
+ val = ch;
46
+ } else if (stack.inFormatString) {
47
+ if (ch == "n")
48
+ val = "\n";
49
+ else if (ch == "t")
50
+ val = "\n";
51
+ else if ("ulULE".indexOf(ch) != -1) {
52
+ val = {changeCase: ch, local: ch > "a"};
53
+ }
54
+ }
55
+
56
+ return [val];
57
+ }},
58
+ {regex: /}/, onMatch: function(val, state, stack) {
59
+ return [stack.length ? stack.shift() : val];
60
+ }},
61
+ {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken},
62
+ {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) {
63
+ var t = TabstopToken(str.substr(1), state, stack);
64
+ stack.unshift(t[0]);
65
+ return t;
66
+ }, next: "snippetVar"},
67
+ {regex: /\n/, token: "newline", merge: false}
68
+ ],
69
+ snippetVar: [
70
+ {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
71
+ stack[0].choices = val.slice(1, -1).split(",");
72
+ }, next: "start"},
73
+ {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?",
74
+ onMatch: function(val, state, stack) {
75
+ var ts = stack[0];
76
+ ts.fmtString = val;
77
+
78
+ val = this.splitRegex.exec(val);
79
+ ts.guard = val[1];
80
+ ts.fmt = val[2];
81
+ ts.flag = val[3];
82
+ return "";
83
+ }, next: "start"},
84
+ {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) {
85
+ stack[0].code = val.splice(1, -1);
86
+ return "";
87
+ }, next: "start"},
88
+ {regex: "\\?", onMatch: function(val, state, stack) {
89
+ if (stack[0])
90
+ stack[0].expectIf = true;
91
+ }, next: "start"},
92
+ {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"}
93
+ ],
94
+ formatString: [
95
+ {regex: "/(" + escape("/") + "+)/", token: "regex"},
96
+ {regex: "", onMatch: function(val, state, stack) {
97
+ stack.inFormatString = true;
98
+ }, next: "start"}
99
+ ]
100
+ });
101
+ SnippetManager.prototype.getTokenizer = function() {
102
+ return SnippetManager.$tokenizer;
103
+ };
104
+ return SnippetManager.$tokenizer;
105
+ };
106
+
107
+ this.tokenizeTmSnippet = function(str, startState) {
108
+ return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) {
109
+ return x.value || x;
110
+ });
111
+ };
112
+
113
+ this.$getDefaultValue = function(editor, name) {
114
+ if (/^[A-Z]\d+$/.test(name)) {
115
+ var i = name.substr(1);
116
+ return (this.variables[name[0] + "__"] || {})[i];
117
+ }
118
+ if (/^\d+$/.test(name)) {
119
+ return (this.variables.__ || {})[name];
120
+ }
121
+ name = name.replace(/^TM_/, "");
122
+
123
+ if (!editor)
124
+ return;
125
+ var s = editor.session;
126
+ switch(name) {
127
+ case "CURRENT_WORD":
128
+ var r = s.getWordRange();
129
+ case "SELECTION":
130
+ case "SELECTED_TEXT":
131
+ return s.getTextRange(r);
132
+ case "CURRENT_LINE":
133
+ return s.getLine(editor.getCursorPosition().row);
134
+ case "PREV_LINE": // not possible in textmate
135
+ return s.getLine(editor.getCursorPosition().row - 1);
136
+ case "LINE_INDEX":
137
+ return editor.getCursorPosition().column;
138
+ case "LINE_NUMBER":
139
+ return editor.getCursorPosition().row + 1;
140
+ case "SOFT_TABS":
141
+ return s.getUseSoftTabs() ? "YES" : "NO";
142
+ case "TAB_SIZE":
143
+ return s.getTabSize();
144
+ case "FILENAME":
145
+ case "FILEPATH":
146
+ return "";
147
+ case "FULLNAME":
148
+ return "Ace";
149
+ }
150
+ };
151
+ this.variables = {};
152
+ this.getVariableValue = function(editor, varName) {
153
+ if (this.variables.hasOwnProperty(varName))
154
+ return this.variables[varName](editor, varName) || "";
155
+ return this.$getDefaultValue(editor, varName) || "";
156
+ };
157
+ this.tmStrFormat = function(str, ch, editor) {
158
+ var flag = ch.flag || "";
159
+ var re = ch.guard;
160
+ re = new RegExp(re, flag.replace(/[^gi]/, ""));
161
+ var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString");
162
+ var _self = this;
163
+ var formatted = str.replace(re, function() {
164
+ _self.variables.__ = arguments;
165
+ var fmtParts = _self.resolveVariables(fmtTokens, editor);
166
+ var gChangeCase = "E";
167
+ for (var i = 0; i < fmtParts.length; i++) {
168
+ var ch = fmtParts[i];
169
+ if (typeof ch == "object") {
170
+ fmtParts[i] = "";
171
+ if (ch.changeCase && ch.local) {
172
+ var next = fmtParts[i + 1];
173
+ if (next && typeof next == "string") {
174
+ if (ch.changeCase == "u")
175
+ fmtParts[i] = next[0].toUpperCase();
176
+ else
177
+ fmtParts[i] = next[0].toLowerCase();
178
+ fmtParts[i + 1] = next.substr(1);
179
+ }
180
+ } else if (ch.changeCase) {
181
+ gChangeCase = ch.changeCase;
182
+ }
183
+ } else if (gChangeCase == "U") {
184
+ fmtParts[i] = ch.toUpperCase();
185
+ } else if (gChangeCase == "L") {
186
+ fmtParts[i] = ch.toLowerCase();
187
+ }
188
+ }
189
+ return fmtParts.join("");
190
+ });
191
+ this.variables.__ = null;
192
+ return formatted;
193
+ };
194
+
195
+ this.resolveVariables = function(snippet, editor) {
196
+ var result = [];
197
+ for (var i = 0; i < snippet.length; i++) {
198
+ var ch = snippet[i];
199
+ if (typeof ch == "string") {
200
+ result.push(ch);
201
+ } else if (typeof ch != "object") {
202
+ continue;
203
+ } else if (ch.skip) {
204
+ gotoNext(ch);
205
+ } else if (ch.processed < i) {
206
+ continue;
207
+ } else if (ch.text) {
208
+ var value = this.getVariableValue(editor, ch.text);
209
+ if (value && ch.fmtString)
210
+ value = this.tmStrFormat(value, ch);
211
+ ch.processed = i;
212
+ if (ch.expectIf == null) {
213
+ if (value) {
214
+ result.push(value);
215
+ gotoNext(ch);
216
+ }
217
+ } else {
218
+ if (value) {
219
+ ch.skip = ch.elseBranch;
220
+ } else
221
+ gotoNext(ch);
222
+ }
223
+ } else if (ch.tabstopId != null) {
224
+ result.push(ch);
225
+ } else if (ch.changeCase != null) {
226
+ result.push(ch);
227
+ }
228
+ }
229
+ function gotoNext(ch) {
230
+ var i1 = snippet.indexOf(ch, i + 1);
231
+ if (i1 != -1)
232
+ i = i1;
233
+ }
234
+ return result;
235
+ };
236
+
237
+ this.insertSnippetForSelection = function(editor, snippetText) {
238
+ var cursor = editor.getCursorPosition();
239
+ var line = editor.session.getLine(cursor.row);
240
+ var tabString = editor.session.getTabString();
241
+ var indentString = line.match(/^\s*/)[0];
242
+
243
+ if (cursor.column < indentString.length)
244
+ indentString = indentString.slice(0, cursor.column);
245
+
246
+ var tokens = this.tokenizeTmSnippet(snippetText);
247
+ tokens = this.resolveVariables(tokens, editor);
248
+ tokens = tokens.map(function(x) {
249
+ if (x == "\n")
250
+ return x + indentString;
251
+ if (typeof x == "string")
252
+ return x.replace(/\t/g, tabString);
253
+ return x;
254
+ });
255
+ var tabstops = [];
256
+ tokens.forEach(function(p, i) {
257
+ if (typeof p != "object")
258
+ return;
259
+ var id = p.tabstopId;
260
+ var ts = tabstops[id];
261
+ if (!ts) {
262
+ ts = tabstops[id] = [];
263
+ ts.index = id;
264
+ ts.value = "";
265
+ }
266
+ if (ts.indexOf(p) !== -1)
267
+ return;
268
+ ts.push(p);
269
+ var i1 = tokens.indexOf(p, i + 1);
270
+ if (i1 === -1)
271
+ return;
272
+
273
+ var value = tokens.slice(i + 1, i1);
274
+ var isNested = value.some(function(t) {return typeof t === "object"});
275
+ if (isNested && !ts.value) {
276
+ ts.value = value;
277
+ } else if (value.length && (!ts.value || typeof ts.value !== "string")) {
278
+ ts.value = value.join("");
279
+ }
280
+ });
281
+ tabstops.forEach(function(ts) {ts.length = 0});
282
+ var expanding = {};
283
+ function copyValue(val) {
284
+ var copy = [];
285
+ for (var i = 0; i < val.length; i++) {
286
+ var p = val[i];
287
+ if (typeof p == "object") {
288
+ if (expanding[p.tabstopId])
289
+ continue;
290
+ var j = val.lastIndexOf(p, i - 1);
291
+ p = copy[j] || {tabstopId: p.tabstopId};
292
+ }
293
+ copy[i] = p;
294
+ }
295
+ return copy;
296
+ }
297
+ for (var i = 0; i < tokens.length; i++) {
298
+ var p = tokens[i];
299
+ if (typeof p != "object")
300
+ continue;
301
+ var id = p.tabstopId;
302
+ var i1 = tokens.indexOf(p, i + 1);
303
+ if (expanding[id]) {
304
+ if (expanding[id] === p)
305
+ expanding[id] = null;
306
+ continue;
307
+ }
308
+
309
+ var ts = tabstops[id];
310
+ var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value);
311
+ arg.unshift(i + 1, Math.max(0, i1 - i));
312
+ arg.push(p);
313
+ expanding[id] = p;
314
+ tokens.splice.apply(tokens, arg);
315
+
316
+ if (ts.indexOf(p) === -1)
317
+ ts.push(p);
318
+ }
319
+ var row = 0, column = 0;
320
+ var text = "";
321
+ tokens.forEach(function(t) {
322
+ if (typeof t === "string") {
323
+ if (t[0] === "\n"){
324
+ column = t.length - 1;
325
+ row ++;
326
+ } else
327
+ column += t.length;
328
+ text += t;
329
+ } else {
330
+ if (!t.start)
331
+ t.start = {row: row, column: column};
332
+ else
333
+ t.end = {row: row, column: column};
334
+ }
335
+ });
336
+ var range = editor.getSelectionRange();
337
+ var end = editor.session.replace(range, text);
338
+
339
+ var tabstopManager = new TabstopManager(editor);
340
+ var selectionId = editor.inVirtualSelectionMode && editor.selection.index;
341
+ tabstopManager.addTabstops(tabstops, range.start, end, selectionId);
342
+ };
343
+
344
+ this.insertSnippet = function(editor, snippetText) {
345
+ var self = this;
346
+ if (editor.inVirtualSelectionMode)
347
+ return self.insertSnippetForSelection(editor, snippetText);
348
+
349
+ editor.forEachSelection(function() {
350
+ self.insertSnippetForSelection(editor, snippetText);
351
+ }, null, {keepOrder: true});
352
+
353
+ if (editor.tabstopManager)
354
+ editor.tabstopManager.tabNext();
355
+ };
356
+
357
+ this.$getScope = function(editor) {
358
+ var scope = editor.session.$mode.$id || "";
359
+ scope = scope.split("/").pop();
360
+ if (scope === "html" || scope === "php") {
361
+ if (scope === "php" && !editor.session.$mode.inlinePhp)
362
+ scope = "html";
363
+ var c = editor.getCursorPosition();
364
+ var state = editor.session.getState(c.row);
365
+ if (typeof state === "object") {
366
+ state = state[0];
367
+ }
368
+ if (state.substring) {
369
+ if (state.substring(0, 3) == "js-")
370
+ scope = "javascript";
371
+ else if (state.substring(0, 4) == "css-")
372
+ scope = "css";
373
+ else if (state.substring(0, 4) == "php-")
374
+ scope = "php";
375
+ }
376
+ }
377
+
378
+ return scope;
379
+ };
380
+
381
+ this.getActiveScopes = function(editor) {
382
+ var scope = this.$getScope(editor);
383
+ var scopes = [scope];
384
+ var snippetMap = this.snippetMap;
385
+ if (snippetMap[scope] && snippetMap[scope].includeScopes) {
386
+ scopes.push.apply(scopes, snippetMap[scope].includeScopes);
387
+ }
388
+ scopes.push("_");
389
+ return scopes;
390
+ };
391
+
392
+ this.expandWithTab = function(editor, options) {
393
+ var self = this;
394
+ var result = editor.forEachSelection(function() {
395
+ return self.expandSnippetForSelection(editor, options);
396
+ }, null, {keepOrder: true});
397
+ if (result && editor.tabstopManager)
398
+ editor.tabstopManager.tabNext();
399
+ return result;
400
+ };
401
+
402
+ this.expandSnippetForSelection = function(editor, options) {
403
+ var cursor = editor.getCursorPosition();
404
+ var line = editor.session.getLine(cursor.row);
405
+ var before = line.substring(0, cursor.column);
406
+ var after = line.substr(cursor.column);
407
+
408
+ var snippetMap = this.snippetMap;
409
+ var snippet;
410
+ this.getActiveScopes(editor).some(function(scope) {
411
+ var snippets = snippetMap[scope];
412
+ if (snippets)
413
+ snippet = this.findMatchingSnippet(snippets, before, after);
414
+ return !!snippet;
415
+ }, this);
416
+ if (!snippet)
417
+ return false;
418
+ if (options && options.dryRun)
419
+ return true;
420
+ editor.session.doc.removeInLine(cursor.row,
421
+ cursor.column - snippet.replaceBefore.length,
422
+ cursor.column + snippet.replaceAfter.length
423
+ );
424
+
425
+ this.variables.M__ = snippet.matchBefore;
426
+ this.variables.T__ = snippet.matchAfter;
427
+ this.insertSnippetForSelection(editor, snippet.content);
428
+
429
+ this.variables.M__ = this.variables.T__ = null;
430
+ return true;
431
+ };
432
+
433
+ this.findMatchingSnippet = function(snippetList, before, after) {
434
+ for (var i = snippetList.length; i--;) {
435
+ var s = snippetList[i];
436
+ if (s.startRe && !s.startRe.test(before))
437
+ continue;
438
+ if (s.endRe && !s.endRe.test(after))
439
+ continue;
440
+ if (!s.startRe && !s.endRe)
441
+ continue;
442
+
443
+ s.matchBefore = s.startRe ? s.startRe.exec(before) : [""];
444
+ s.matchAfter = s.endRe ? s.endRe.exec(after) : [""];
445
+ s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : "";
446
+ s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : "";
447
+ return s;
448
+ }
449
+ };
450
+
451
+ this.snippetMap = {};
452
+ this.snippetNameMap = {};
453
+ this.register = function(snippets, scope) {
454
+ var snippetMap = this.snippetMap;
455
+ var snippetNameMap = this.snippetNameMap;
456
+ var self = this;
457
+
458
+ if (!snippets)
459
+ snippets = [];
460
+
461
+ function wrapRegexp(src) {
462
+ if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
463
+ src = "(?:" + src + ")";
464
+
465
+ return src || "";
466
+ }
467
+ function guardedRegexp(re, guard, opening) {
468
+ re = wrapRegexp(re);
469
+ guard = wrapRegexp(guard);
470
+ if (opening) {
471
+ re = guard + re;
472
+ if (re && re[re.length - 1] != "$")
473
+ re = re + "$";
474
+ } else {
475
+ re = re + guard;
476
+ if (re && re[0] != "^")
477
+ re = "^" + re;
478
+ }
479
+ return new RegExp(re);
480
+ }
481
+
482
+ function addSnippet(s) {
483
+ if (!s.scope)
484
+ s.scope = scope || "_";
485
+ scope = s.scope;
486
+ if (!snippetMap[scope]) {
487
+ snippetMap[scope] = [];
488
+ snippetNameMap[scope] = {};
489
+ }
490
+
491
+ var map = snippetNameMap[scope];
492
+ if (s.name) {
493
+ var old = map[s.name];
494
+ if (old)
495
+ self.unregister(old);
496
+ map[s.name] = s;
497
+ }
498
+ snippetMap[scope].push(s);
499
+
500
+ if (s.tabTrigger && !s.trigger) {
501
+ if (!s.guard && /^\w/.test(s.tabTrigger))
502
+ s.guard = "\\b";
503
+ s.trigger = lang.escapeRegExp(s.tabTrigger);
504
+ }
505
+
506
+ if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard)
507
+ return;
508
+
509
+ s.startRe = guardedRegexp(s.trigger, s.guard, true);
510
+ s.triggerRe = new RegExp(s.trigger, "", true);
511
+
512
+ s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
513
+ s.endTriggerRe = new RegExp(s.endTrigger, "", true);
514
+ }
515
+
516
+ if (snippets && snippets.content)
517
+ addSnippet(snippets);
518
+ else if (Array.isArray(snippets))
519
+ snippets.forEach(addSnippet);
520
+
521
+ this._signal("registerSnippets", {scope: scope});
522
+ };
523
+ this.unregister = function(snippets, scope) {
524
+ var snippetMap = this.snippetMap;
525
+ var snippetNameMap = this.snippetNameMap;
526
+
527
+ function removeSnippet(s) {
528
+ var nameMap = snippetNameMap[s.scope||scope];
529
+ if (nameMap && nameMap[s.name]) {
530
+ delete nameMap[s.name];
531
+ var map = snippetMap[s.scope||scope];
532
+ var i = map && map.indexOf(s);
533
+ if (i >= 0)
534
+ map.splice(i, 1);
535
+ }
536
+ }
537
+ if (snippets.content)
538
+ removeSnippet(snippets);
539
+ else if (Array.isArray(snippets))
540
+ snippets.forEach(removeSnippet);
541
+ };
542
+ this.parseSnippetFile = function(str) {
543
+ str = str.replace(/\r/g, "");
544
+ var list = [], snippet = {};
545
+ var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
546
+ var m;
547
+ while (m = re.exec(str)) {
548
+ if (m[1]) {
549
+ try {
550
+ snippet = JSON.parse(m[1]);
551
+ list.push(snippet);
552
+ } catch (e) {}
553
+ } if (m[4]) {
554
+ snippet.content = m[4].replace(/^\t/gm, "");
555
+ list.push(snippet);
556
+ snippet = {};
557
+ } else {
558
+ var key = m[2], val = m[3];
559
+ if (key == "regex") {
560
+ var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g;
561
+ snippet.guard = guardRe.exec(val)[1];
562
+ snippet.trigger = guardRe.exec(val)[1];
563
+ snippet.endTrigger = guardRe.exec(val)[1];
564
+ snippet.endGuard = guardRe.exec(val)[1];
565
+ } else if (key == "snippet") {
566
+ snippet.tabTrigger = val.match(/^\S*/)[0];
567
+ if (!snippet.name)
568
+ snippet.name = val;
569
+ } else {
570
+ snippet[key] = val;
571
+ }
572
+ }
573
+ }
574
+ return list;
575
+ };
576
+ this.getSnippetByName = function(name, editor) {
577
+ var snippetMap = this.snippetNameMap;
578
+ var snippet;
579
+ this.getActiveScopes(editor).some(function(scope) {
580
+ var snippets = snippetMap[scope];
581
+ if (snippets)
582
+ snippet = snippets[name];
583
+ return !!snippet;
584
+ }, this);
585
+ return snippet;
586
+ };
587
+
588
+ }).call(SnippetManager.prototype);
589
+
590
+
591
+ var TabstopManager = function(editor) {
592
+ if (editor.tabstopManager)
593
+ return editor.tabstopManager;
594
+ editor.tabstopManager = this;
595
+ this.$onChange = this.onChange.bind(this);
596
+ this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;
597
+ this.$onChangeSession = this.onChangeSession.bind(this);
598
+ this.$onAfterExec = this.onAfterExec.bind(this);
599
+ this.attach(editor);
600
+ };
601
+ (function() {
602
+ this.attach = function(editor) {
603
+ this.index = 0;
604
+ this.ranges = [];
605
+ this.tabstops = [];
606
+ this.$openTabstops = null;
607
+ this.selectedTabstop = null;
608
+
609
+ this.editor = editor;
610
+ this.editor.on("change", this.$onChange);
611
+ this.editor.on("changeSelection", this.$onChangeSelection);
612
+ this.editor.on("changeSession", this.$onChangeSession);
613
+ this.editor.commands.on("afterExec", this.$onAfterExec);
614
+ this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
615
+ };
616
+ this.detach = function() {
617
+ this.tabstops.forEach(this.removeTabstopMarkers, this);
618
+ this.ranges = null;
619
+ this.tabstops = null;
620
+ this.selectedTabstop = null;
621
+ this.editor.removeListener("change", this.$onChange);
622
+ this.editor.removeListener("changeSelection", this.$onChangeSelection);
623
+ this.editor.removeListener("changeSession", this.$onChangeSession);
624
+ this.editor.commands.removeListener("afterExec", this.$onAfterExec);
625
+ this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
626
+ this.editor.tabstopManager = null;
627
+ this.editor = null;
628
+ };
629
+
630
+ this.onChange = function(delta) {
631
+ var changeRange = delta;
632
+ var isRemove = delta.action[0] == "r";
633
+ var start = delta.start;
634
+ var end = delta.end;
635
+ var startRow = start.row;
636
+ var endRow = end.row;
637
+ var lineDif = endRow - startRow;
638
+ var colDiff = end.column - start.column;
639
+
640
+ if (isRemove) {
641
+ lineDif = -lineDif;
642
+ colDiff = -colDiff;
643
+ }
644
+ if (!this.$inChange && isRemove) {
645
+ var ts = this.selectedTabstop;
646
+ var changedOutside = ts && !ts.some(function(r) {
647
+ return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0;
648
+ });
649
+ if (changedOutside)
650
+ return this.detach();
651
+ }
652
+ var ranges = this.ranges;
653
+ for (var i = 0; i < ranges.length; i++) {
654
+ var r = ranges[i];
655
+ if (r.end.row < start.row)
656
+ continue;
657
+
658
+ if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
659
+ this.removeRange(r);
660
+ i--;
661
+ continue;
662
+ }
663
+
664
+ if (r.start.row == startRow && r.start.column > start.column)
665
+ r.start.column += colDiff;
666
+ if (r.end.row == startRow && r.end.column >= start.column)
667
+ r.end.column += colDiff;
668
+ if (r.start.row >= startRow)
669
+ r.start.row += lineDif;
670
+ if (r.end.row >= startRow)
671
+ r.end.row += lineDif;
672
+
673
+ if (comparePoints(r.start, r.end) > 0)
674
+ this.removeRange(r);
675
+ }
676
+ if (!ranges.length)
677
+ this.detach();
678
+ };
679
+ this.updateLinkedFields = function() {
680
+ var ts = this.selectedTabstop;
681
+ if (!ts || !ts.hasLinkedRanges)
682
+ return;
683
+ this.$inChange = true;
684
+ var session = this.editor.session;
685
+ var text = session.getTextRange(ts.firstNonLinked);
686
+ for (var i = ts.length; i--;) {
687
+ var range = ts[i];
688
+ if (!range.linked)
689
+ continue;
690
+ var fmt = exports.snippetManager.tmStrFormat(text, range.original);
691
+ session.replace(range, fmt);
692
+ }
693
+ this.$inChange = false;
694
+ };
695
+ this.onAfterExec = function(e) {
696
+ if (e.command && !e.command.readOnly)
697
+ this.updateLinkedFields();
698
+ };
699
+ this.onChangeSelection = function() {
700
+ if (!this.editor)
701
+ return;
702
+ var lead = this.editor.selection.lead;
703
+ var anchor = this.editor.selection.anchor;
704
+ var isEmpty = this.editor.selection.isEmpty();
705
+ for (var i = this.ranges.length; i--;) {
706
+ if (this.ranges[i].linked)
707
+ continue;
708
+ var containsLead = this.ranges[i].contains(lead.row, lead.column);
709
+ var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);
710
+ if (containsLead && containsAnchor)
711
+ return;
712
+ }
713
+ this.detach();
714
+ };
715
+ this.onChangeSession = function() {
716
+ this.detach();
717
+ };
718
+ this.tabNext = function(dir) {
719
+ var max = this.tabstops.length;
720
+ var index = this.index + (dir || 1);
721
+ index = Math.min(Math.max(index, 1), max);
722
+ if (index == max)
723
+ index = 0;
724
+ this.selectTabstop(index);
725
+ if (index === 0)
726
+ this.detach();
727
+ };
728
+ this.selectTabstop = function(index) {
729
+ this.$openTabstops = null;
730
+ var ts = this.tabstops[this.index];
731
+ if (ts)
732
+ this.addTabstopMarkers(ts);
733
+ this.index = index;
734
+ ts = this.tabstops[this.index];
735
+ if (!ts || !ts.length)
736
+ return;
737
+
738
+ this.selectedTabstop = ts;
739
+ if (!this.editor.inVirtualSelectionMode) {
740
+ var sel = this.editor.multiSelect;
741
+ sel.toSingleRange(ts.firstNonLinked.clone());
742
+ for (var i = ts.length; i--;) {
743
+ if (ts.hasLinkedRanges && ts[i].linked)
744
+ continue;
745
+ sel.addRange(ts[i].clone(), true);
746
+ }
747
+ if (sel.ranges[0])
748
+ sel.addRange(sel.ranges[0].clone());
749
+ } else {
750
+ this.editor.selection.setRange(ts.firstNonLinked);
751
+ }
752
+
753
+ this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
754
+ };
755
+ this.addTabstops = function(tabstops, start, end) {
756
+ if (!this.$openTabstops)
757
+ this.$openTabstops = [];
758
+ if (!tabstops[0]) {
759
+ var p = Range.fromPoints(end, end);
760
+ moveRelative(p.start, start);
761
+ moveRelative(p.end, start);
762
+ tabstops[0] = [p];
763
+ tabstops[0].index = 0;
764
+ }
765
+
766
+ var i = this.index;
767
+ var arg = [i + 1, 0];
768
+ var ranges = this.ranges;
769
+ tabstops.forEach(function(ts, index) {
770
+ var dest = this.$openTabstops[index] || ts;
771
+
772
+ for (var i = ts.length; i--;) {
773
+ var p = ts[i];
774
+ var range = Range.fromPoints(p.start, p.end || p.start);
775
+ movePoint(range.start, start);
776
+ movePoint(range.end, start);
777
+ range.original = p;
778
+ range.tabstop = dest;
779
+ ranges.push(range);
780
+ if (dest != ts)
781
+ dest.unshift(range);
782
+ else
783
+ dest[i] = range;
784
+ if (p.fmtString) {
785
+ range.linked = true;
786
+ dest.hasLinkedRanges = true;
787
+ } else if (!dest.firstNonLinked)
788
+ dest.firstNonLinked = range;
789
+ }
790
+ if (!dest.firstNonLinked)
791
+ dest.hasLinkedRanges = false;
792
+ if (dest === ts) {
793
+ arg.push(dest);
794
+ this.$openTabstops[index] = dest;
795
+ }
796
+ this.addTabstopMarkers(dest);
797
+ }, this);
798
+
799
+ if (arg.length > 2) {
800
+ if (this.tabstops.length)
801
+ arg.push(arg.splice(2, 1)[0]);
802
+ this.tabstops.splice.apply(this.tabstops, arg);
803
+ }
804
+ };
805
+
806
+ this.addTabstopMarkers = function(ts) {
807
+ var session = this.editor.session;
808
+ ts.forEach(function(range) {
809
+ if (!range.markerId)
810
+ range.markerId = session.addMarker(range, "ace_snippet-marker", "text");
811
+ });
812
+ };
813
+ this.removeTabstopMarkers = function(ts) {
814
+ var session = this.editor.session;
815
+ ts.forEach(function(range) {
816
+ session.removeMarker(range.markerId);
817
+ range.markerId = null;
818
+ });
819
+ };
820
+ this.removeRange = function(range) {
821
+ var i = range.tabstop.indexOf(range);
822
+ range.tabstop.splice(i, 1);
823
+ i = this.ranges.indexOf(range);
824
+ this.ranges.splice(i, 1);
825
+ this.editor.session.removeMarker(range.markerId);
826
+ if (!range.tabstop.length) {
827
+ i = this.tabstops.indexOf(range.tabstop);
828
+ if (i != -1)
829
+ this.tabstops.splice(i, 1);
830
+ if (!this.tabstops.length)
831
+ this.detach();
832
+ }
833
+ };
834
+
835
+ this.keyboardHandler = new HashHandler();
836
+ this.keyboardHandler.bindKeys({
837
+ "Tab": function(ed) {
838
+ if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) {
839
+ return;
840
+ }
841
+
842
+ ed.tabstopManager.tabNext(1);
843
+ },
844
+ "Shift-Tab": function(ed) {
845
+ ed.tabstopManager.tabNext(-1);
846
+ },
847
+ "Esc": function(ed) {
848
+ ed.tabstopManager.detach();
849
+ },
850
+ "Return": function(ed) {
851
+ return false;
852
+ }
853
+ });
854
+ }).call(TabstopManager.prototype);
855
+
856
+
857
+
858
+ var changeTracker = {};
859
+ changeTracker.onChange = Anchor.prototype.onChange;
860
+ changeTracker.setPosition = function(row, column) {
861
+ this.pos.row = row;
862
+ this.pos.column = column;
863
+ };
864
+ changeTracker.update = function(pos, delta, $insertRight) {
865
+ this.$insertRight = $insertRight;
866
+ this.pos = pos;
867
+ this.onChange(delta);
868
+ };
869
+
870
+ var movePoint = function(point, diff) {
871
+ if (point.row == 0)
872
+ point.column += diff.column;
873
+ point.row += diff.row;
874
+ };
875
+
876
+ var moveRelative = function(point, start) {
877
+ if (point.row == start.row)
878
+ point.column -= start.column;
879
+ point.row -= start.row;
880
+ };
881
+
882
+
883
+ require("./lib/dom").importCssString("\
884
+ .ace_snippet-marker {\
885
+ -moz-box-sizing: border-box;\
886
+ box-sizing: border-box;\
887
+ background: rgba(194, 193, 208, 0.09);\
888
+ border: 1px dotted rgba(211, 208, 235, 0.62);\
889
+ position: absolute;\
890
+ }");
891
+
892
+ exports.snippetManager = new SnippetManager();
893
+
894
+
895
+ var Editor = require("./editor").Editor;
896
+ (function() {
897
+ this.insertSnippet = function(content, options) {
898
+ return exports.snippetManager.insertSnippet(this, content, options);
899
+ };
900
+ this.expandSnippet = function(options) {
901
+ return exports.snippetManager.expandWithTab(this, options);
902
+ };
903
+ }).call(Editor.prototype);
904
+
905
+ });
906
+
907
+ ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) {
908
+ "use strict";
909
+
910
+ var Renderer = require("../virtual_renderer").VirtualRenderer;
911
+ var Editor = require("../editor").Editor;
912
+ var Range = require("../range").Range;
913
+ var event = require("../lib/event");
914
+ var lang = require("../lib/lang");
915
+ var dom = require("../lib/dom");
916
+
917
+ var $singleLineEditor = function(el) {
918
+ var renderer = new Renderer(el);
919
+
920
+ renderer.$maxLines = 4;
921
+
922
+ var editor = new Editor(renderer);
923
+
924
+ editor.setHighlightActiveLine(false);
925
+ editor.setShowPrintMargin(false);
926
+ editor.renderer.setShowGutter(false);
927
+ editor.renderer.setHighlightGutterLine(false);
928
+
929
+ editor.$mouseHandler.$focusWaitTimout = 0;
930
+ editor.$highlightTagPending = true;
931
+
932
+ return editor;
933
+ };
934
+
935
+ var AcePopup = function(parentNode) {
936
+ var el = dom.createElement("div");
937
+ var popup = new $singleLineEditor(el);
938
+
939
+ if (parentNode)
940
+ parentNode.appendChild(el);
941
+ el.style.display = "none";
942
+ popup.renderer.content.style.cursor = "default";
943
+ popup.renderer.setStyle("ace_autocomplete");
944
+
945
+ popup.setOption("displayIndentGuides", false);
946
+ popup.setOption("dragDelay", 150);
947
+
948
+ var noop = function(){};
949
+
950
+ popup.focus = noop;
951
+ popup.$isFocused = true;
952
+
953
+ popup.renderer.$cursorLayer.restartTimer = noop;
954
+ popup.renderer.$cursorLayer.element.style.opacity = 0;
955
+
956
+ popup.renderer.$maxLines = 8;
957
+ popup.renderer.$keepTextAreaAtCursor = false;
958
+
959
+ popup.setHighlightActiveLine(false);
960
+ popup.session.highlight("");
961
+ popup.session.$searchHighlight.clazz = "ace_highlight-marker";
962
+
963
+ popup.on("mousedown", function(e) {
964
+ var pos = e.getDocumentPosition();
965
+ popup.selection.moveToPosition(pos);
966
+ selectionMarker.start.row = selectionMarker.end.row = pos.row;
967
+ e.stop();
968
+ });
969
+
970
+ var lastMouseEvent;
971
+ var hoverMarker = new Range(-1,0,-1,Infinity);
972
+ var selectionMarker = new Range(-1,0,-1,Infinity);
973
+ selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine");
974
+ popup.setSelectOnHover = function(val) {
975
+ if (!val) {
976
+ hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine");
977
+ } else if (hoverMarker.id) {
978
+ popup.session.removeMarker(hoverMarker.id);
979
+ hoverMarker.id = null;
980
+ }
981
+ };
982
+ popup.setSelectOnHover(false);
983
+ popup.on("mousemove", function(e) {
984
+ if (!lastMouseEvent) {
985
+ lastMouseEvent = e;
986
+ return;
987
+ }
988
+ if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {
989
+ return;
990
+ }
991
+ lastMouseEvent = e;
992
+ lastMouseEvent.scrollTop = popup.renderer.scrollTop;
993
+ var row = lastMouseEvent.getDocumentPosition().row;
994
+ if (hoverMarker.start.row != row) {
995
+ if (!hoverMarker.id)
996
+ popup.setRow(row);
997
+ setHoverMarker(row);
998
+ }
999
+ });
1000
+ popup.renderer.on("beforeRender", function() {
1001
+ if (lastMouseEvent && hoverMarker.start.row != -1) {
1002
+ lastMouseEvent.$pos = null;
1003
+ var row = lastMouseEvent.getDocumentPosition().row;
1004
+ if (!hoverMarker.id)
1005
+ popup.setRow(row);
1006
+ setHoverMarker(row, true);
1007
+ }
1008
+ });
1009
+ popup.renderer.on("afterRender", function() {
1010
+ var row = popup.getRow();
1011
+ var t = popup.renderer.$textLayer;
1012
+ var selected = t.element.childNodes[row - t.config.firstRow];
1013
+ if (selected == t.selectedNode)
1014
+ return;
1015
+ if (t.selectedNode)
1016
+ dom.removeCssClass(t.selectedNode, "ace_selected");
1017
+ t.selectedNode = selected;
1018
+ if (selected)
1019
+ dom.addCssClass(selected, "ace_selected");
1020
+ });
1021
+ var hideHoverMarker = function() { setHoverMarker(-1) };
1022
+ var setHoverMarker = function(row, suppressRedraw) {
1023
+ if (row !== hoverMarker.start.row) {
1024
+ hoverMarker.start.row = hoverMarker.end.row = row;
1025
+ if (!suppressRedraw)
1026
+ popup.session._emit("changeBackMarker");
1027
+ popup._emit("changeHoverMarker");
1028
+ }
1029
+ };
1030
+ popup.getHoveredRow = function() {
1031
+ return hoverMarker.start.row;
1032
+ };
1033
+
1034
+ event.addListener(popup.container, "mouseout", hideHoverMarker);
1035
+ popup.on("hide", hideHoverMarker);
1036
+ popup.on("changeSelection", hideHoverMarker);
1037
+
1038
+ popup.session.doc.getLength = function() {
1039
+ return popup.data.length;
1040
+ };
1041
+ popup.session.doc.getLine = function(i) {
1042
+ var data = popup.data[i];
1043
+ if (typeof data == "string")
1044
+ return data;
1045
+ return (data && data.value) || "";
1046
+ };
1047
+
1048
+ var bgTokenizer = popup.session.bgTokenizer;
1049
+ bgTokenizer.$tokenizeRow = function(row) {
1050
+ var data = popup.data[row];
1051
+ var tokens = [];
1052
+ if (!data)
1053
+ return tokens;
1054
+ if (typeof data == "string")
1055
+ data = {value: data};
1056
+ if (!data.caption)
1057
+ data.caption = data.value || data.name;
1058
+
1059
+ var last = -1;
1060
+ var flag, c;
1061
+ for (var i = 0; i < data.caption.length; i++) {
1062
+ c = data.caption[i];
1063
+ flag = data.matchMask & (1 << i) ? 1 : 0;
1064
+ if (last !== flag) {
1065
+ tokens.push({type: data.className || "" + ( flag ? "completion-highlight" : ""), value: c});
1066
+ last = flag;
1067
+ } else {
1068
+ tokens[tokens.length - 1].value += c;
1069
+ }
1070
+ }
1071
+
1072
+ if (data.meta) {
1073
+ var maxW = popup.renderer.$size.scrollerWidth / popup.renderer.layerConfig.characterWidth;
1074
+ var metaData = data.meta;
1075
+ if (metaData.length + data.caption.length > maxW - 2) {
1076
+ metaData = metaData.substr(0, maxW - data.caption.length - 3) + "\u2026"
1077
+ }
1078
+ tokens.push({type: "rightAlignedText", value: metaData});
1079
+ }
1080
+ return tokens;
1081
+ };
1082
+ bgTokenizer.$updateOnChange = noop;
1083
+ bgTokenizer.start = noop;
1084
+
1085
+ popup.session.$computeWidth = function() {
1086
+ return this.screenWidth = 0;
1087
+ };
1088
+
1089
+ popup.$blockScrolling = Infinity;
1090
+ popup.isOpen = false;
1091
+ popup.isTopdown = false;
1092
+
1093
+ popup.data = [];
1094
+ popup.setData = function(list) {
1095
+ popup.setValue(lang.stringRepeat("\n", list.length), -1);
1096
+ popup.data = list || [];
1097
+ popup.setRow(0);
1098
+ };
1099
+ popup.getData = function(row) {
1100
+ return popup.data[row];
1101
+ };
1102
+
1103
+ popup.getRow = function() {
1104
+ return selectionMarker.start.row;
1105
+ };
1106
+ popup.setRow = function(line) {
1107
+ line = Math.max(0, Math.min(this.data.length, line));
1108
+ if (selectionMarker.start.row != line) {
1109
+ popup.selection.clearSelection();
1110
+ selectionMarker.start.row = selectionMarker.end.row = line || 0;
1111
+ popup.session._emit("changeBackMarker");
1112
+ popup.moveCursorTo(line || 0, 0);
1113
+ if (popup.isOpen)
1114
+ popup._signal("select");
1115
+ }
1116
+ };
1117
+
1118
+ popup.on("changeSelection", function() {
1119
+ if (popup.isOpen)
1120
+ popup.setRow(popup.selection.lead.row);
1121
+ popup.renderer.scrollCursorIntoView();
1122
+ });
1123
+
1124
+ popup.hide = function() {
1125
+ this.container.style.display = "none";
1126
+ this._signal("hide");
1127
+ popup.isOpen = false;
1128
+ };
1129
+ popup.show = function(pos, lineHeight, topdownOnly) {
1130
+ var el = this.container;
1131
+ var screenHeight = window.innerHeight;
1132
+ var screenWidth = window.innerWidth;
1133
+ var renderer = this.renderer;
1134
+ var maxH = renderer.$maxLines * lineHeight * 1.4;
1135
+ var top = pos.top + this.$borderSize;
1136
+ if (top + maxH > screenHeight - lineHeight && !topdownOnly) {
1137
+ el.style.top = "";
1138
+ el.style.bottom = screenHeight - top + "px";
1139
+ popup.isTopdown = false;
1140
+ } else {
1141
+ top += lineHeight;
1142
+ el.style.top = top + "px";
1143
+ el.style.bottom = "";
1144
+ popup.isTopdown = true;
1145
+ }
1146
+
1147
+ el.style.display = "";
1148
+ this.renderer.$textLayer.checkForSizeChanges();
1149
+
1150
+ var left = pos.left;
1151
+ if (left + el.offsetWidth > screenWidth)
1152
+ left = screenWidth - el.offsetWidth;
1153
+
1154
+ el.style.left = left + "px";
1155
+
1156
+ this._signal("show");
1157
+ lastMouseEvent = null;
1158
+ popup.isOpen = true;
1159
+ };
1160
+
1161
+ popup.getTextLeftOffset = function() {
1162
+ return this.$borderSize + this.renderer.$padding + this.$imageSize;
1163
+ };
1164
+
1165
+ popup.$imageSize = 0;
1166
+ popup.$borderSize = 1;
1167
+
1168
+ return popup;
1169
+ };
1170
+
1171
+ dom.importCssString("\
1172
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\
1173
+ background-color: #CAD6FA;\
1174
+ z-index: 1;\
1175
+ }\
1176
+ .ace_editor.ace_autocomplete .ace_line-hover {\
1177
+ border: 1px solid #abbffe;\
1178
+ margin-top: -1px;\
1179
+ background: rgba(233,233,253,0.4);\
1180
+ }\
1181
+ .ace_editor.ace_autocomplete .ace_line-hover {\
1182
+ position: absolute;\
1183
+ z-index: 2;\
1184
+ }\
1185
+ .ace_editor.ace_autocomplete .ace_scroller {\
1186
+ background: none;\
1187
+ border: none;\
1188
+ box-shadow: none;\
1189
+ }\
1190
+ .ace_rightAlignedText {\
1191
+ color: gray;\
1192
+ display: inline-block;\
1193
+ position: absolute;\
1194
+ right: 4px;\
1195
+ text-align: right;\
1196
+ z-index: -1;\
1197
+ }\
1198
+ .ace_editor.ace_autocomplete .ace_completion-highlight{\
1199
+ color: #000;\
1200
+ text-shadow: 0 0 0.01em;\
1201
+ }\
1202
+ .ace_editor.ace_autocomplete {\
1203
+ width: 280px;\
1204
+ z-index: 200000;\
1205
+ background: #fbfbfb;\
1206
+ color: #444;\
1207
+ border: 1px lightgray solid;\
1208
+ position: fixed;\
1209
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);\
1210
+ line-height: 1.4;\
1211
+ }");
1212
+
1213
+ exports.AcePopup = AcePopup;
1214
+
1215
+ });
1216
+
1217
+ ace.define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module) {
1218
+ "use strict";
1219
+
1220
+ exports.parForEach = function(array, fn, callback) {
1221
+ var completed = 0;
1222
+ var arLength = array.length;
1223
+ if (arLength === 0)
1224
+ callback();
1225
+ for (var i = 0; i < arLength; i++) {
1226
+ fn(array[i], function(result, err) {
1227
+ completed++;
1228
+ if (completed === arLength)
1229
+ callback(result, err);
1230
+ });
1231
+ }
1232
+ };
1233
+
1234
+ var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;
1235
+
1236
+ exports.retrievePrecedingIdentifier = function(text, pos, regex) {
1237
+ regex = regex || ID_REGEX;
1238
+ var buf = [];
1239
+ for (var i = pos-1; i >= 0; i--) {
1240
+ if (regex.test(text[i]))
1241
+ buf.push(text[i]);
1242
+ else
1243
+ break;
1244
+ }
1245
+ return buf.reverse().join("");
1246
+ };
1247
+
1248
+ exports.retrieveFollowingIdentifier = function(text, pos, regex) {
1249
+ regex = regex || ID_REGEX;
1250
+ var buf = [];
1251
+ for (var i = pos; i < text.length; i++) {
1252
+ if (regex.test(text[i]))
1253
+ buf.push(text[i]);
1254
+ else
1255
+ break;
1256
+ }
1257
+ return buf;
1258
+ };
1259
+
1260
+ exports.getCompletionPrefix = function (editor) {
1261
+ var pos = editor.getCursorPosition();
1262
+ var line = editor.session.getLine(pos.row);
1263
+ var prefix;
1264
+ editor.completers.forEach(function(completer) {
1265
+ if (completer.identifierRegexps) {
1266
+ completer.identifierRegexps.forEach(function(identifierRegex) {
1267
+ if (!prefix && identifierRegex)
1268
+ prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex);
1269
+ }.bind(this));
1270
+ }
1271
+ }.bind(this));
1272
+ return prefix || this.retrievePrecedingIdentifier(line, pos.column);
1273
+ };
1274
+
1275
+ });
1276
+
1277
+ ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"], function(require, exports, module) {
1278
+ "use strict";
1279
+
1280
+ var HashHandler = require("./keyboard/hash_handler").HashHandler;
1281
+ var AcePopup = require("./autocomplete/popup").AcePopup;
1282
+ var util = require("./autocomplete/util");
1283
+ var event = require("./lib/event");
1284
+ var lang = require("./lib/lang");
1285
+ var dom = require("./lib/dom");
1286
+ var snippetManager = require("./snippets").snippetManager;
1287
+
1288
+ var Autocomplete = function() {
1289
+ this.autoInsert = false;
1290
+ this.autoSelect = true;
1291
+ this.exactMatch = false;
1292
+ this.gatherCompletionsId = 0;
1293
+ this.keyboardHandler = new HashHandler();
1294
+ this.keyboardHandler.bindKeys(this.commands);
1295
+
1296
+ this.blurListener = this.blurListener.bind(this);
1297
+ this.changeListener = this.changeListener.bind(this);
1298
+ this.mousedownListener = this.mousedownListener.bind(this);
1299
+ this.mousewheelListener = this.mousewheelListener.bind(this);
1300
+
1301
+ this.changeTimer = lang.delayedCall(function() {
1302
+ this.updateCompletions(true);
1303
+ }.bind(this));
1304
+
1305
+ this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50);
1306
+ };
1307
+
1308
+ (function() {
1309
+
1310
+ this.$init = function() {
1311
+ this.popup = new AcePopup(document.body || document.documentElement);
1312
+ this.popup.on("click", function(e) {
1313
+ this.insertMatch();
1314
+ e.stop();
1315
+ }.bind(this));
1316
+ this.popup.focus = this.editor.focus.bind(this.editor);
1317
+ this.popup.on("show", this.tooltipTimer.bind(null, null));
1318
+ this.popup.on("select", this.tooltipTimer.bind(null, null));
1319
+ this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null));
1320
+ return this.popup;
1321
+ };
1322
+
1323
+ this.getPopup = function() {
1324
+ return this.popup || this.$init();
1325
+ };
1326
+
1327
+ this.openPopup = function(editor, prefix, keepPopupPosition) {
1328
+ if (!this.popup)
1329
+ this.$init();
1330
+
1331
+ this.popup.setData(this.completions.filtered);
1332
+
1333
+ editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
1334
+
1335
+ var renderer = editor.renderer;
1336
+ this.popup.setRow(this.autoSelect ? 0 : -1);
1337
+ if (!keepPopupPosition) {
1338
+ this.popup.setTheme(editor.getTheme());
1339
+ this.popup.setFontSize(editor.getFontSize());
1340
+
1341
+ var lineHeight = renderer.layerConfig.lineHeight;
1342
+
1343
+ var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
1344
+ pos.left -= this.popup.getTextLeftOffset();
1345
+
1346
+ var rect = editor.container.getBoundingClientRect();
1347
+ pos.top += rect.top - renderer.layerConfig.offset;
1348
+ pos.left += rect.left - editor.renderer.scrollLeft;
1349
+ pos.left += renderer.gutterWidth;
1350
+
1351
+ this.popup.show(pos, lineHeight);
1352
+ } else if (keepPopupPosition && !prefix) {
1353
+ this.detach();
1354
+ }
1355
+ };
1356
+
1357
+ this.detach = function() {
1358
+ this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
1359
+ this.editor.off("changeSelection", this.changeListener);
1360
+ this.editor.off("blur", this.blurListener);
1361
+ this.editor.off("mousedown", this.mousedownListener);
1362
+ this.editor.off("mousewheel", this.mousewheelListener);
1363
+ this.changeTimer.cancel();
1364
+ this.hideDocTooltip();
1365
+
1366
+ this.gatherCompletionsId += 1;
1367
+ if (this.popup && this.popup.isOpen)
1368
+ this.popup.hide();
1369
+
1370
+ if (this.base)
1371
+ this.base.detach();
1372
+ this.activated = false;
1373
+ this.completions = this.base = null;
1374
+ };
1375
+
1376
+ this.changeListener = function(e) {
1377
+ var cursor = this.editor.selection.lead;
1378
+ if (cursor.row != this.base.row || cursor.column < this.base.column) {
1379
+ this.detach();
1380
+ }
1381
+ if (this.activated)
1382
+ this.changeTimer.schedule();
1383
+ else
1384
+ this.detach();
1385
+ };
1386
+
1387
+ this.blurListener = function(e) {
1388
+ var el = document.activeElement;
1389
+ var text = this.editor.textInput.getElement();
1390
+ var fromTooltip = e.relatedTarget && e.relatedTarget == this.tooltipNode;
1391
+ var container = this.popup && this.popup.container;
1392
+ if (el != text && el.parentNode != container && !fromTooltip
1393
+ && el != this.tooltipNode && e.relatedTarget != text
1394
+ ) {
1395
+ this.detach();
1396
+ }
1397
+ };
1398
+
1399
+ this.mousedownListener = function(e) {
1400
+ this.detach();
1401
+ };
1402
+
1403
+ this.mousewheelListener = function(e) {
1404
+ this.detach();
1405
+ };
1406
+
1407
+ this.goTo = function(where) {
1408
+ var row = this.popup.getRow();
1409
+ var max = this.popup.session.getLength() - 1;
1410
+
1411
+ switch(where) {
1412
+ case "up": row = row <= 0 ? max : row - 1; break;
1413
+ case "down": row = row >= max ? -1 : row + 1; break;
1414
+ case "start": row = 0; break;
1415
+ case "end": row = max; break;
1416
+ }
1417
+
1418
+ this.popup.setRow(row);
1419
+ };
1420
+
1421
+ this.insertMatch = function(data, options) {
1422
+ if (!data)
1423
+ data = this.popup.getData(this.popup.getRow());
1424
+ if (!data)
1425
+ return false;
1426
+
1427
+ if (data.completer && data.completer.insertMatch) {
1428
+ data.completer.insertMatch(this.editor, data);
1429
+ } else {
1430
+ if (this.completions.filterText) {
1431
+ var ranges = this.editor.selection.getAllRanges();
1432
+ for (var i = 0, range; range = ranges[i]; i++) {
1433
+ range.start.column -= this.completions.filterText.length;
1434
+ this.editor.session.remove(range);
1435
+ }
1436
+ }
1437
+ if (data.snippet)
1438
+ snippetManager.insertSnippet(this.editor, data.snippet);
1439
+ else
1440
+ this.editor.execCommand("insertstring", data.value || data);
1441
+ }
1442
+ this.detach();
1443
+ };
1444
+
1445
+
1446
+ this.commands = {
1447
+ "Up": function(editor) { editor.completer.goTo("up"); },
1448
+ "Down": function(editor) { editor.completer.goTo("down"); },
1449
+ "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); },
1450
+ "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); },
1451
+
1452
+ "Esc": function(editor) { editor.completer.detach(); },
1453
+ "Return": function(editor) { return editor.completer.insertMatch(); },
1454
+ "Shift-Return": function(editor) { editor.completer.insertMatch(null, {deleteSuffix: true}); },
1455
+ "Tab": function(editor) {
1456
+ var result = editor.completer.insertMatch();
1457
+ if (!result && !editor.tabstopManager)
1458
+ editor.completer.goTo("down");
1459
+ else
1460
+ return result;
1461
+ },
1462
+
1463
+ "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); },
1464
+ "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); }
1465
+ };
1466
+
1467
+ this.gatherCompletions = function(editor, callback) {
1468
+ var session = editor.getSession();
1469
+ var pos = editor.getCursorPosition();
1470
+
1471
+ var line = session.getLine(pos.row);
1472
+ var prefix = util.getCompletionPrefix(editor);
1473
+
1474
+ this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length);
1475
+ this.base.$insertRight = true;
1476
+
1477
+ var matches = [];
1478
+ var total = editor.completers.length;
1479
+ editor.completers.forEach(function(completer, i) {
1480
+ completer.getCompletions(editor, session, pos, prefix, function(err, results) {
1481
+ if (!err && results)
1482
+ matches = matches.concat(results);
1483
+ var pos = editor.getCursorPosition();
1484
+ var line = session.getLine(pos.row);
1485
+ callback(null, {
1486
+ prefix: prefix,
1487
+ matches: matches,
1488
+ finished: (--total === 0)
1489
+ });
1490
+ });
1491
+ });
1492
+ return true;
1493
+ };
1494
+
1495
+ this.showPopup = function(editor) {
1496
+ if (this.editor)
1497
+ this.detach();
1498
+
1499
+ this.activated = true;
1500
+
1501
+ this.editor = editor;
1502
+ if (editor.completer != this) {
1503
+ if (editor.completer)
1504
+ editor.completer.detach();
1505
+ editor.completer = this;
1506
+ }
1507
+
1508
+ editor.on("changeSelection", this.changeListener);
1509
+ editor.on("blur", this.blurListener);
1510
+ editor.on("mousedown", this.mousedownListener);
1511
+ editor.on("mousewheel", this.mousewheelListener);
1512
+
1513
+ this.updateCompletions();
1514
+ };
1515
+
1516
+ this.updateCompletions = function(keepPopupPosition) {
1517
+ if (keepPopupPosition && this.base && this.completions) {
1518
+ var pos = this.editor.getCursorPosition();
1519
+ var prefix = this.editor.session.getTextRange({start: this.base, end: pos});
1520
+ if (prefix == this.completions.filterText)
1521
+ return;
1522
+ this.completions.setFilter(prefix);
1523
+ if (!this.completions.filtered.length)
1524
+ return this.detach();
1525
+ if (this.completions.filtered.length == 1
1526
+ && this.completions.filtered[0].value == prefix
1527
+ && !this.completions.filtered[0].snippet)
1528
+ return this.detach();
1529
+ this.openPopup(this.editor, prefix, keepPopupPosition);
1530
+ return;
1531
+ }
1532
+ var _id = this.gatherCompletionsId;
1533
+ this.gatherCompletions(this.editor, function(err, results) {
1534
+ var detachIfFinished = function() {
1535
+ if (!results.finished) return;
1536
+ return this.detach();
1537
+ }.bind(this);
1538
+
1539
+ var prefix = results.prefix;
1540
+ var matches = results && results.matches;
1541
+
1542
+ if (!matches || !matches.length)
1543
+ return detachIfFinished();
1544
+ if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId)
1545
+ return;
1546
+
1547
+ this.completions = new FilteredList(matches);
1548
+
1549
+ if (this.exactMatch)
1550
+ this.completions.exactMatch = true;
1551
+
1552
+ this.completions.setFilter(prefix);
1553
+ var filtered = this.completions.filtered;
1554
+ if (!filtered.length)
1555
+ return detachIfFinished();
1556
+ if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet)
1557
+ return detachIfFinished();
1558
+ if (this.autoInsert && filtered.length == 1 && results.finished)
1559
+ return this.insertMatch(filtered[0]);
1560
+
1561
+ this.openPopup(this.editor, prefix, keepPopupPosition);
1562
+ }.bind(this));
1563
+ };
1564
+
1565
+ this.cancelContextMenu = function() {
1566
+ this.editor.$mouseHandler.cancelContextMenu();
1567
+ };
1568
+
1569
+ this.updateDocTooltip = function() {
1570
+ var popup = this.popup;
1571
+ var all = popup.data;
1572
+ var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]);
1573
+ var doc = null;
1574
+ if (!selected || !this.editor || !this.popup.isOpen)
1575
+ return this.hideDocTooltip();
1576
+ this.editor.completers.some(function(completer) {
1577
+ if (completer.getDocTooltip)
1578
+ doc = completer.getDocTooltip(selected);
1579
+ return doc;
1580
+ });
1581
+ if (!doc)
1582
+ doc = selected;
1583
+
1584
+ if (typeof doc == "string")
1585
+ doc = {docText: doc};
1586
+ if (!doc || !(doc.docHTML || doc.docText))
1587
+ return this.hideDocTooltip();
1588
+ this.showDocTooltip(doc);
1589
+ };
1590
+
1591
+ this.showDocTooltip = function(item) {
1592
+ if (!this.tooltipNode) {
1593
+ this.tooltipNode = dom.createElement("div");
1594
+ this.tooltipNode.className = "ace_tooltip ace_doc-tooltip";
1595
+ this.tooltipNode.style.margin = 0;
1596
+ this.tooltipNode.style.pointerEvents = "auto";
1597
+ this.tooltipNode.tabIndex = -1;
1598
+ this.tooltipNode.onblur = this.blurListener.bind(this);
1599
+ }
1600
+
1601
+ var tooltipNode = this.tooltipNode;
1602
+ if (item.docHTML) {
1603
+ tooltipNode.innerHTML = item.docHTML;
1604
+ } else if (item.docText) {
1605
+ tooltipNode.textContent = item.docText;
1606
+ }
1607
+
1608
+ if (!tooltipNode.parentNode)
1609
+ document.body.appendChild(tooltipNode);
1610
+ var popup = this.popup;
1611
+ var rect = popup.container.getBoundingClientRect();
1612
+ tooltipNode.style.top = popup.container.style.top;
1613
+ tooltipNode.style.bottom = popup.container.style.bottom;
1614
+
1615
+ if (window.innerWidth - rect.right < 320) {
1616
+ tooltipNode.style.right = window.innerWidth - rect.left + "px";
1617
+ tooltipNode.style.left = "";
1618
+ } else {
1619
+ tooltipNode.style.left = (rect.right + 1) + "px";
1620
+ tooltipNode.style.right = "";
1621
+ }
1622
+ tooltipNode.style.display = "block";
1623
+ };
1624
+
1625
+ this.hideDocTooltip = function() {
1626
+ this.tooltipTimer.cancel();
1627
+ if (!this.tooltipNode) return;
1628
+ var el = this.tooltipNode;
1629
+ if (!this.editor.isFocused() && document.activeElement == el)
1630
+ this.editor.focus();
1631
+ this.tooltipNode = null;
1632
+ if (el.parentNode)
1633
+ el.parentNode.removeChild(el);
1634
+ };
1635
+
1636
+ }).call(Autocomplete.prototype);
1637
+
1638
+ Autocomplete.startCommand = {
1639
+ name: "startAutocomplete",
1640
+ exec: function(editor) {
1641
+ if (!editor.completer)
1642
+ editor.completer = new Autocomplete();
1643
+ editor.completer.autoInsert = false;
1644
+ editor.completer.autoSelect = true;
1645
+ editor.completer.showPopup(editor);
1646
+ editor.completer.cancelContextMenu();
1647
+ },
1648
+ bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
1649
+ };
1650
+
1651
+ var FilteredList = function(array, filterText) {
1652
+ this.all = array;
1653
+ this.filtered = array;
1654
+ this.filterText = filterText || "";
1655
+ this.exactMatch = false;
1656
+ };
1657
+ (function(){
1658
+ this.setFilter = function(str) {
1659
+ if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0)
1660
+ var matches = this.filtered;
1661
+ else
1662
+ var matches = this.all;
1663
+
1664
+ this.filterText = str;
1665
+ matches = this.filterCompletions(matches, this.filterText);
1666
+ matches = matches.sort(function(a, b) {
1667
+ return b.exactMatch - a.exactMatch || b.score - a.score;
1668
+ });
1669
+ var prev = null;
1670
+ matches = matches.filter(function(item){
1671
+ var caption = item.snippet || item.caption || item.value;
1672
+ if (caption === prev) return false;
1673
+ prev = caption;
1674
+ return true;
1675
+ });
1676
+
1677
+ this.filtered = matches;
1678
+ };
1679
+ this.filterCompletions = function(items, needle) {
1680
+ var results = [];
1681
+ var upper = needle.toUpperCase();
1682
+ var lower = needle.toLowerCase();
1683
+ loop: for (var i = 0, item; item = items[i]; i++) {
1684
+ var caption = item.value || item.caption || item.snippet;
1685
+ if (!caption) continue;
1686
+ var lastIndex = -1;
1687
+ var matchMask = 0;
1688
+ var penalty = 0;
1689
+ var index, distance;
1690
+
1691
+ if (this.exactMatch) {
1692
+ if (needle !== caption.substr(0, needle.length))
1693
+ continue loop;
1694
+ }else{
1695
+ for (var j = 0; j < needle.length; j++) {
1696
+ var i1 = caption.indexOf(lower[j], lastIndex + 1);
1697
+ var i2 = caption.indexOf(upper[j], lastIndex + 1);
1698
+ index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2;
1699
+ if (index < 0)
1700
+ continue loop;
1701
+ distance = index - lastIndex - 1;
1702
+ if (distance > 0) {
1703
+ if (lastIndex === -1)
1704
+ penalty += 10;
1705
+ penalty += distance;
1706
+ }
1707
+ matchMask = matchMask | (1 << index);
1708
+ lastIndex = index;
1709
+ }
1710
+ }
1711
+ item.matchMask = matchMask;
1712
+ item.exactMatch = penalty ? 0 : 1;
1713
+ item.score = (item.score || 0) - penalty;
1714
+ results.push(item);
1715
+ }
1716
+ return results;
1717
+ };
1718
+ }).call(FilteredList.prototype);
1719
+
1720
+ exports.Autocomplete = Autocomplete;
1721
+ exports.FilteredList = FilteredList;
1722
+
1723
+ });
1724
+
1725
+ ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module) {
1726
+ var Range = require("../range").Range;
1727
+
1728
+ var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;
1729
+
1730
+ function getWordIndex(doc, pos) {
1731
+ var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos));
1732
+ return textBefore.split(splitRegex).length - 1;
1733
+ }
1734
+ function wordDistance(doc, pos) {
1735
+ var prefixPos = getWordIndex(doc, pos);
1736
+ var words = doc.getValue().split(splitRegex);
1737
+ var wordScores = Object.create(null);
1738
+
1739
+ var currentWord = words[prefixPos];
1740
+
1741
+ words.forEach(function(word, idx) {
1742
+ if (!word || word === currentWord) return;
1743
+
1744
+ var distance = Math.abs(prefixPos - idx);
1745
+ var score = words.length - distance;
1746
+ if (wordScores[word]) {
1747
+ wordScores[word] = Math.max(score, wordScores[word]);
1748
+ } else {
1749
+ wordScores[word] = score;
1750
+ }
1751
+ });
1752
+ return wordScores;
1753
+ }
1754
+
1755
+ exports.getCompletions = function(editor, session, pos, prefix, callback) {
1756
+ var wordScore = wordDistance(session, pos, prefix);
1757
+ var wordList = Object.keys(wordScore);
1758
+ callback(null, wordList.map(function(word) {
1759
+ return {
1760
+ caption: word,
1761
+ value: word,
1762
+ score: wordScore[word],
1763
+ meta: "local"
1764
+ };
1765
+ }));
1766
+ };
1767
+ });
1768
+
1769
+ ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module) {
1770
+ "use strict";
1771
+
1772
+ var snippetManager = require("../snippets").snippetManager;
1773
+ var Autocomplete = require("../autocomplete").Autocomplete;
1774
+ var config = require("../config");
1775
+ var lang = require("../lib/lang");
1776
+ var util = require("../autocomplete/util");
1777
+
1778
+ var textCompleter = require("../autocomplete/text_completer");
1779
+ var keyWordCompleter = {
1780
+ getCompletions: function(editor, session, pos, prefix, callback) {
1781
+ if (session.$mode.completer) {
1782
+ return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback);
1783
+ }
1784
+ var state = editor.session.getState(pos.row);
1785
+ var completions = session.$mode.getCompletions(state, session, pos, prefix);
1786
+ callback(null, completions);
1787
+ }
1788
+ };
1789
+
1790
+ var snippetCompleter = {
1791
+ getCompletions: function(editor, session, pos, prefix, callback) {
1792
+ var snippetMap = snippetManager.snippetMap;
1793
+ var completions = [];
1794
+ snippetManager.getActiveScopes(editor).forEach(function(scope) {
1795
+ var snippets = snippetMap[scope] || [];
1796
+ for (var i = snippets.length; i--;) {
1797
+ var s = snippets[i];
1798
+ var caption = s.name || s.tabTrigger;
1799
+ if (!caption)
1800
+ continue;
1801
+ completions.push({
1802
+ caption: caption,
1803
+ snippet: s.content,
1804
+ meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet",
1805
+ type: "snippet"
1806
+ });
1807
+ }
1808
+ }, this);
1809
+ callback(null, completions);
1810
+ },
1811
+ getDocTooltip: function(item) {
1812
+ if (item.type == "snippet" && !item.docHTML) {
1813
+ item.docHTML = [
1814
+ "<b>", lang.escapeHTML(item.caption), "</b>", "<hr></hr>",
1815
+ lang.escapeHTML(item.snippet)
1816
+ ].join("");
1817
+ }
1818
+ }
1819
+ };
1820
+
1821
+ var completers = [snippetCompleter, textCompleter, keyWordCompleter];
1822
+ exports.setCompleters = function(val) {
1823
+ completers.length = 0;
1824
+ if (val) completers.push.apply(completers, val);
1825
+ };
1826
+ exports.addCompleter = function(completer) {
1827
+ completers.push(completer);
1828
+ };
1829
+ exports.textCompleter = textCompleter;
1830
+ exports.keyWordCompleter = keyWordCompleter;
1831
+ exports.snippetCompleter = snippetCompleter;
1832
+
1833
+ var expandSnippet = {
1834
+ name: "expandSnippet",
1835
+ exec: function(editor) {
1836
+ return snippetManager.expandWithTab(editor);
1837
+ },
1838
+ bindKey: "Tab"
1839
+ };
1840
+
1841
+ var onChangeMode = function(e, editor) {
1842
+ loadSnippetsForMode(editor.session.$mode);
1843
+ };
1844
+
1845
+ var loadSnippetsForMode = function(mode) {
1846
+ var id = mode.$id;
1847
+ if (!snippetManager.files)
1848
+ snippetManager.files = {};
1849
+ loadSnippetFile(id);
1850
+ if (mode.modes)
1851
+ mode.modes.forEach(loadSnippetsForMode);
1852
+ };
1853
+
1854
+ var loadSnippetFile = function(id) {
1855
+ if (!id || snippetManager.files[id])
1856
+ return;
1857
+ var snippetFilePath = id.replace("mode", "snippets");
1858
+ snippetManager.files[id] = {};
1859
+ config.loadModule(snippetFilePath, function(m) {
1860
+ if (m) {
1861
+ snippetManager.files[id] = m;
1862
+ if (!m.snippets && m.snippetText)
1863
+ m.snippets = snippetManager.parseSnippetFile(m.snippetText);
1864
+ snippetManager.register(m.snippets || [], m.scope);
1865
+ if (m.includeScopes) {
1866
+ snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes;
1867
+ m.includeScopes.forEach(function(x) {
1868
+ loadSnippetFile("ace/mode/" + x);
1869
+ });
1870
+ }
1871
+ }
1872
+ });
1873
+ };
1874
+
1875
+ var doLiveAutocomplete = function(e) {
1876
+ var editor = e.editor;
1877
+ var hasCompleter = editor.completer && editor.completer.activated;
1878
+ if (e.command.name === "backspace") {
1879
+ if (hasCompleter && !util.getCompletionPrefix(editor))
1880
+ editor.completer.detach();
1881
+ }
1882
+ else if (e.command.name === "insertstring") {
1883
+ var prefix = util.getCompletionPrefix(editor);
1884
+ if (prefix && !hasCompleter) {
1885
+ if (!editor.completer) {
1886
+ editor.completer = new Autocomplete();
1887
+ }
1888
+ editor.completer.autoInsert = false;
1889
+ editor.completer.showPopup(editor);
1890
+ }
1891
+ }
1892
+ };
1893
+
1894
+ var Editor = require("../editor").Editor;
1895
+ require("../config").defineOptions(Editor.prototype, "editor", {
1896
+ enableBasicAutocompletion: {
1897
+ set: function(val) {
1898
+ if (val) {
1899
+ if (!this.completers)
1900
+ this.completers = Array.isArray(val)? val: completers;
1901
+ this.commands.addCommand(Autocomplete.startCommand);
1902
+ } else {
1903
+ this.commands.removeCommand(Autocomplete.startCommand);
1904
+ }
1905
+ },
1906
+ value: false
1907
+ },
1908
+ enableLiveAutocompletion: {
1909
+ set: function(val) {
1910
+ if (val) {
1911
+ if (!this.completers)
1912
+ this.completers = Array.isArray(val)? val: completers;
1913
+ this.commands.on('afterExec', doLiveAutocomplete);
1914
+ } else {
1915
+ this.commands.removeListener('afterExec', doLiveAutocomplete);
1916
+ }
1917
+ },
1918
+ value: false
1919
+ },
1920
+ enableSnippets: {
1921
+ set: function(val) {
1922
+ if (val) {
1923
+ this.commands.addCommand(expandSnippet);
1924
+ this.on("changeMode", onChangeMode);
1925
+ onChangeMode(null, this);
1926
+ } else {
1927
+ this.commands.removeCommand(expandSnippet);
1928
+ this.off("changeMode", onChangeMode);
1929
+ }
1930
+ },
1931
+ value: false
1932
+ }
1933
+ });
1934
+ });
1935
+ (function() {
1936
+ ace.require(["ace/ext/language_tools"], function() {});
1937
+ })();
1938
+