keppler 2.1.17 → 2.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (571) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/installer/core/.gitignore +88 -0
  4. data/installer/core/app/views/admin/layouts/_sidebar.html.haml +2 -2
  5. data/installer/core/rockets/keppler_frontend/app/controllers/keppler_frontend/app/frontend_controller.rb +0 -1
  6. data/installer/core/rockets/keppler_frontend/app/models/keppler_frontend/view.rb +1 -1
  7. data/installer/core/rockets/keppler_frontend/config/data/views.yml +1 -1
  8. data/lib/keppler/version.rb +1 -1
  9. data/testing-with-2.1.18/.gitignore +88 -0
  10. data/testing-with-2.1.18/.ruby-version +1 -0
  11. data/testing-with-2.1.18/Gemfile +149 -0
  12. data/testing-with-2.1.18/Gemfile.lock +645 -0
  13. data/testing-with-2.1.18/Guardfile +18 -0
  14. data/testing-with-2.1.18/LICENSE +674 -0
  15. data/testing-with-2.1.18/README.md +134 -0
  16. data/testing-with-2.1.18/Rakefile +6 -0
  17. data/testing-with-2.1.18/_config.yml +1 -0
  18. data/testing-with-2.1.18/app/assets/images/.keep +0 -0
  19. data/testing-with-2.1.18/app/assets/images/admin/astronauta_keppler.svg +123 -0
  20. data/testing-with-2.1.18/app/assets/images/admin/avatar_keppler.svg +100 -0
  21. data/testing-with-2.1.18/app/assets/images/admin/en.png +0 -0
  22. data/testing-with-2.1.18/app/assets/images/admin/es.png +0 -0
  23. data/testing-with-2.1.18/app/assets/images/admin/favicon.png +0 -0
  24. data/testing-with-2.1.18/app/assets/images/admin/image_default.png +0 -0
  25. data/testing-with-2.1.18/app/assets/images/admin/logo.png +0 -0
  26. data/testing-with-2.1.18/app/assets/images/admin/logo2.png +0 -0
  27. data/testing-with-2.1.18/app/assets/images/admin/profile-menu.jpg +0 -0
  28. data/testing-with-2.1.18/app/assets/images/admin/search.png +0 -0
  29. data/testing-with-2.1.18/app/assets/images/admin/slice-icon-orange.png +0 -0
  30. data/testing-with-2.1.18/app/assets/images/admin/slice-icon.png +0 -0
  31. data/testing-with-2.1.18/app/assets/images/admin/slice.png +0 -0
  32. data/testing-with-2.1.18/app/assets/images/admin/slice_white.png +0 -0
  33. data/testing-with-2.1.18/app/assets/images/app/Cohete_nubes_new.png +0 -0
  34. data/testing-with-2.1.18/app/assets/images/app/Home_Keppler.png +0 -0
  35. data/testing-with-2.1.18/app/assets/images/app/Home_Keppler2.png +0 -0
  36. data/testing-with-2.1.18/app/assets/images/app/fondo.svg +19 -0
  37. data/testing-with-2.1.18/app/assets/images/app/keppler-front.png +0 -0
  38. data/testing-with-2.1.18/app/assets/images/app/slice-front.png +0 -0
  39. data/testing-with-2.1.18/app/assets/images/app/slice.png +0 -0
  40. data/testing-with-2.1.18/app/assets/javascripts/admin/application.coffee +25 -0
  41. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-colorpicker.js +1322 -0
  42. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/fileinput.js +4463 -0
  43. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/locales/LANG.js +100 -0
  44. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/locales/es.js +100 -0
  45. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/piexif.js +2471 -0
  46. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/piexif.min.js +1 -0
  47. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/purify.js +812 -0
  48. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/purify.min.js +1 -0
  49. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/sortable.js +1590 -0
  50. data/testing-with-2.1.18/app/assets/javascripts/admin/bootstrap-file-input/plugins/sortable.min.js +1 -0
  51. data/testing-with-2.1.18/app/assets/javascripts/admin/code_editor.js +94 -0
  52. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/comment/comment.js +209 -0
  53. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/comment/continuecomment.js +78 -0
  54. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/dialog/dialog.css +32 -0
  55. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/dialog/dialog.js +161 -0
  56. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/autorefresh.js +47 -0
  57. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/fullscreen.css +6 -0
  58. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/fullscreen.js +41 -0
  59. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/panel.js +123 -0
  60. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/placeholder.js +63 -0
  61. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/display/rulers.js +51 -0
  62. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/closebrackets.js +194 -0
  63. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/closetag.js +175 -0
  64. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/continuelist.js +89 -0
  65. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/matchbrackets.js +145 -0
  66. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/matchtags.js +66 -0
  67. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/edit/trailingspace.js +27 -0
  68. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/brace-fold.js +105 -0
  69. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/comment-fold.js +59 -0
  70. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/foldcode.js +152 -0
  71. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/foldgutter.css +20 -0
  72. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/foldgutter.js +146 -0
  73. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/indent-fold.js +48 -0
  74. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/markdown-fold.js +49 -0
  75. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/fold/xml-fold.js +184 -0
  76. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/anyword-hint.js +41 -0
  77. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/css-hint.js +60 -0
  78. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/html-hint.js +348 -0
  79. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/javascript-hint.js +157 -0
  80. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/show-hint.css +36 -0
  81. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/show-hint.js +433 -0
  82. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/sql-hint.js +299 -0
  83. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/hint/xml-hint.js +110 -0
  84. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/mode/loadmode.js +64 -0
  85. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/mode/multiplex.js +131 -0
  86. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/mode/overlay.js +90 -0
  87. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/mode/simple.js +216 -0
  88. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/scroll/annotatescrollbar.js +122 -0
  89. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/scroll/scrollpastend.js +48 -0
  90. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/scroll/simplescrollbars.css +66 -0
  91. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/scroll/simplescrollbars.js +152 -0
  92. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/jump-to-line.js +49 -0
  93. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/match-highlighter.js +165 -0
  94. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/matchesonscrollbar.css +8 -0
  95. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/matchesonscrollbar.js +97 -0
  96. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/search.js +252 -0
  97. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/addon/search/searchcursor.js +293 -0
  98. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/codemirror.js +9683 -0
  99. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/keymap/sublime.js +691 -0
  100. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/css.js +832 -0
  101. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/gss.html +103 -0
  102. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/index.html +75 -0
  103. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/less.html +152 -0
  104. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/css/scss.html +157 -0
  105. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/haml/haml.js +161 -0
  106. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/haml/index.html +79 -0
  107. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlembedded/htmlembedded.js +37 -0
  108. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlembedded/index.html +60 -0
  109. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlmixed/htmlmixed.js +152 -0
  110. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/htmlmixed/index.html +100 -0
  111. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/javascript/index.html +114 -0
  112. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/javascript/javascript.js +896 -0
  113. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/javascript/json-ld.html +72 -0
  114. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/javascript/typescript.html +61 -0
  115. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/ruby/index.html +183 -0
  116. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/ruby/ruby.js +296 -0
  117. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/vue/index.html +69 -0
  118. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/vue/vue.js +77 -0
  119. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/xml/index.html +61 -0
  120. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/xml/xml.js +402 -0
  121. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/yaml-frontmatter/index.html +121 -0
  122. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js +68 -0
  123. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/yaml/index.html +80 -0
  124. data/testing-with-2.1.18/app/assets/javascripts/admin/codemirror/mode/yaml/yaml.js +119 -0
  125. data/testing-with-2.1.18/app/assets/javascripts/admin/file_uploader.coffee +152 -0
  126. data/testing-with-2.1.18/app/assets/javascripts/admin/img_preview.js +32 -0
  127. data/testing-with-2.1.18/app/assets/javascripts/admin/jscolor.js +1855 -0
  128. data/testing-with-2.1.18/app/assets/javascripts/admin/main.coffee +58 -0
  129. data/testing-with-2.1.18/app/assets/javascripts/admin/notification.js +14 -0
  130. data/testing-with-2.1.18/app/assets/javascripts/admin/ruby_console.js +14 -0
  131. data/testing-with-2.1.18/app/assets/javascripts/admin/sidebar.js +24 -0
  132. data/testing-with-2.1.18/app/assets/javascripts/admin/sort.coffee +8 -0
  133. data/testing-with-2.1.18/app/assets/javascripts/admin/swal.js +39 -0
  134. data/testing-with-2.1.18/app/assets/javascripts/admin/sweetalert2/delete-confirm.js +118 -0
  135. data/testing-with-2.1.18/app/assets/javascripts/admin/sweetalert2/sweetalert2.all.min.js +2 -0
  136. data/testing-with-2.1.18/app/assets/javascripts/admin/switch.js +6 -0
  137. data/testing-with-2.1.18/app/assets/javascripts/admin/tooltips.coffee +4 -0
  138. data/testing-with-2.1.18/app/assets/javascripts/admin/upload_records.coffee +8 -0
  139. data/testing-with-2.1.18/app/assets/javascripts/app/application.js.coffee +9 -0
  140. data/testing-with-2.1.18/app/assets/javascripts/app/google_analytics.js.coffee +5 -0
  141. data/testing-with-2.1.18/app/assets/javascripts/ckeditor/config.js +130 -0
  142. data/testing-with-2.1.18/app/assets/javascripts/errors/application.js.coffee +1 -0
  143. data/testing-with-2.1.18/app/assets/javascripts/errors/errors.js +113 -0
  144. data/testing-with-2.1.18/app/assets/javascripts/vue_admin/index.js +111 -0
  145. data/testing-with-2.1.18/app/assets/stylesheets/admin/application.scss +48 -0
  146. data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/fileinput-rtl.scss +133 -0
  147. data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/fileinput.scss +760 -0
  148. data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/themes/explorer-fa/theme.scss +213 -0
  149. data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/themes/explorer-fas/theme.scss +213 -0
  150. data/testing-with-2.1.18/app/assets/stylesheets/admin/bootstrap-file-input/themes/explorer/theme.scss +213 -0
  151. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/comment/comment.js +209 -0
  152. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/comment/continuecomment.js +78 -0
  153. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/dialog/dialog.css +32 -0
  154. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/dialog/dialog.js +161 -0
  155. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/autorefresh.js +47 -0
  156. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/fullscreen.css +6 -0
  157. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/fullscreen.js +41 -0
  158. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/panel.js +123 -0
  159. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/placeholder.js +63 -0
  160. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/display/rulers.js +51 -0
  161. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/closebrackets.js +194 -0
  162. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/closetag.js +175 -0
  163. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/continuelist.js +89 -0
  164. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/matchbrackets.js +145 -0
  165. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/matchtags.js +66 -0
  166. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/edit/trailingspace.js +27 -0
  167. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/brace-fold.js +105 -0
  168. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/comment-fold.js +59 -0
  169. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/foldcode.js +152 -0
  170. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/foldgutter.css +20 -0
  171. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/foldgutter.js +146 -0
  172. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/indent-fold.js +48 -0
  173. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/markdown-fold.js +49 -0
  174. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/fold/xml-fold.js +184 -0
  175. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/anyword-hint.js +41 -0
  176. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/css-hint.js +60 -0
  177. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/html-hint.js +348 -0
  178. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/javascript-hint.js +157 -0
  179. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/show-hint.css +36 -0
  180. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/show-hint.js +433 -0
  181. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/sql-hint.js +299 -0
  182. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/hint/xml-hint.js +110 -0
  183. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/scroll/annotatescrollbar.js +122 -0
  184. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/scroll/scrollpastend.js +48 -0
  185. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/scroll/simplescrollbars.css +66 -0
  186. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/scroll/simplescrollbars.js +152 -0
  187. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/jump-to-line.js +49 -0
  188. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/match-highlighter.js +165 -0
  189. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/matchesonscrollbar.css +8 -0
  190. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/matchesonscrollbar.js +97 -0
  191. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/search.js +252 -0
  192. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/addon/search/searchcursor.js +293 -0
  193. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/codemirror.css +366 -0
  194. data/testing-with-2.1.18/app/assets/stylesheets/admin/codemirror/theme/monokai.css +41 -0
  195. data/testing-with-2.1.18/app/assets/stylesheets/admin/components/layouts/_footer.scss +5 -0
  196. data/testing-with-2.1.18/app/assets/stylesheets/admin/components/layouts/_settings.scss +51 -0
  197. data/testing-with-2.1.18/app/assets/stylesheets/admin/components/navigation/_navbar.scss +187 -0
  198. data/testing-with-2.1.18/app/assets/stylesheets/admin/components/navigation/_sidebar.scss +207 -0
  199. data/testing-with-2.1.18/app/assets/stylesheets/admin/components/navigation/_turbolinks.scss +4 -0
  200. data/testing-with-2.1.18/app/assets/stylesheets/admin/components/paginator/_paginator.scss +53 -0
  201. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/ZXuke1cDvLCKLDcimxB44_lu.woff2 +0 -0
  202. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/boxicons.css +2918 -0
  203. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts.css +8 -0
  204. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/Simple-Line-Icons.eot +0 -0
  205. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/Simple-Line-Icons.ttf +0 -0
  206. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/Simple-Line-Icons.woff +0 -0
  207. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/Simple-Line-Icons.woff2 +0 -0
  208. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.eot +0 -0
  209. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.svg +808 -0
  210. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.ttf +0 -0
  211. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.woff +0 -0
  212. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/fonts/boxicons.woff2 +0 -0
  213. data/testing-with-2.1.18/app/assets/stylesheets/admin/fonts-and-icons/icons.css +778 -0
  214. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_appearance.scss +5 -0
  215. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_bootstrap-colorpicker.scss +269 -0
  216. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_customize.scss +22 -0
  217. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_datepicker.scss +1086 -0
  218. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_devise.scss +189 -0
  219. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_files.scss +229 -0
  220. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_form.scss +190 -0
  221. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_index.scss +466 -0
  222. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_listing.scss +40 -0
  223. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_preloader.scss +224 -0
  224. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_rockets.scss +13 -0
  225. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_roles.scss +3 -0
  226. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_search.scss +244 -0
  227. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_show.scss +23 -0
  228. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_switchs.scss +143 -0
  229. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_themes.scss +45 -0
  230. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_timepicker.scss +14 -0
  231. data/testing-with-2.1.18/app/assets/stylesheets/admin/pages/_user.scss +6 -0
  232. data/testing-with-2.1.18/app/assets/stylesheets/admin/utils/_base.scss +65 -0
  233. data/testing-with-2.1.18/app/assets/stylesheets/admin/utils/_mixins.scss +26 -0
  234. data/testing-with-2.1.18/app/assets/stylesheets/admin/utils/_theme.scss +124 -0
  235. data/testing-with-2.1.18/app/assets/stylesheets/admin/utils/_variables.scss +109 -0
  236. data/testing-with-2.1.18/app/assets/stylesheets/app/application.scss +30 -0
  237. data/testing-with-2.1.18/app/assets/stylesheets/app/base/_base_project.scss +17 -0
  238. data/testing-with-2.1.18/app/assets/stylesheets/app/base/_typography.scss +1 -0
  239. data/testing-with-2.1.18/app/assets/stylesheets/app/components/_buttons.scss +0 -0
  240. data/testing-with-2.1.18/app/assets/stylesheets/app/components/_inputs.scss +0 -0
  241. data/testing-with-2.1.18/app/assets/stylesheets/app/components/_navbar.scss +21 -0
  242. data/testing-with-2.1.18/app/assets/stylesheets/app/layout/_container.scss +0 -0
  243. data/testing-with-2.1.18/app/assets/stylesheets/app/layout/_footer.scss +15 -0
  244. data/testing-with-2.1.18/app/assets/stylesheets/app/layout/_header.scss +39 -0
  245. data/testing-with-2.1.18/app/assets/stylesheets/app/pages/_front.sass +83 -0
  246. data/testing-with-2.1.18/app/assets/stylesheets/app/plugins/_bootstrap_override.scss +37 -0
  247. data/testing-with-2.1.18/app/assets/stylesheets/app/plugins/_font_awesome.scss +2 -0
  248. data/testing-with-2.1.18/app/assets/stylesheets/app/plugins/_keppler.scss +161 -0
  249. data/testing-with-2.1.18/app/assets/stylesheets/app/plugins/_npogress.scss +2 -0
  250. data/testing-with-2.1.18/app/assets/stylesheets/app/utils/_mixins.scss +18 -0
  251. data/testing-with-2.1.18/app/assets/stylesheets/app/utils/_variables.scss +28 -0
  252. data/testing-with-2.1.18/app/assets/stylesheets/errors/application.scss +3 -0
  253. data/testing-with-2.1.18/app/assets/stylesheets/errors/errors.scss +161 -0
  254. data/testing-with-2.1.18/app/assets/stylesheets/vendor/admin-lte/_skin-blue.scss +141 -0
  255. data/testing-with-2.1.18/app/assets/stylesheets/vendor/sweetalert2/sweetalert2.scss +11 -0
  256. data/testing-with-2.1.18/app/controllers/admin/admin_controller.rb +95 -0
  257. data/testing-with-2.1.18/app/controllers/admin/meta_tags_controller.rb +118 -0
  258. data/testing-with-2.1.18/app/controllers/admin/permissions_controller.rb +55 -0
  259. data/testing-with-2.1.18/app/controllers/admin/rockets_controller.rb +95 -0
  260. data/testing-with-2.1.18/app/controllers/admin/roles_controller.rb +124 -0
  261. data/testing-with-2.1.18/app/controllers/admin/scripts_controller.rb +104 -0
  262. data/testing-with-2.1.18/app/controllers/admin/seos_controller.rb +31 -0
  263. data/testing-with-2.1.18/app/controllers/admin/settings_controller.rb +131 -0
  264. data/testing-with-2.1.18/app/controllers/admin/users_controller.rb +122 -0
  265. data/testing-with-2.1.18/app/controllers/app/app_controller.rb +38 -0
  266. data/testing-with-2.1.18/app/controllers/app/front_controller.rb +8 -0
  267. data/testing-with-2.1.18/app/controllers/application_controller.rb +151 -0
  268. data/testing-with-2.1.18/app/controllers/concerns/.keep +0 -0
  269. data/testing-with-2.1.18/app/controllers/concerns/devise_params.rb +33 -0
  270. data/testing-with-2.1.18/app/controllers/concerns/mailer_config.rb +37 -0
  271. data/testing-with-2.1.18/app/controllers/concerns/object_query.rb +50 -0
  272. data/testing-with-2.1.18/app/controllers/concerns/settings.rb +105 -0
  273. data/testing-with-2.1.18/app/controllers/devise/sessions_controller.rb +108 -0
  274. data/testing-with-2.1.18/app/controllers/errors_controller.rb +30 -0
  275. data/testing-with-2.1.18/app/helpers/admin_helper.rb +138 -0
  276. data/testing-with-2.1.18/app/helpers/application_helper.rb +33 -0
  277. data/testing-with-2.1.18/app/helpers/fronts_helper.rb +38 -0
  278. data/testing-with-2.1.18/app/helpers/rockets_helper.rb +8 -0
  279. data/testing-with-2.1.18/app/helpers/roles_helper.rb +5 -0
  280. data/testing-with-2.1.18/app/helpers/scaffolds_helper.rb +5 -0
  281. data/testing-with-2.1.18/app/inputs/keppler_boolean_input.rb +52 -0
  282. data/testing-with-2.1.18/app/inputs/keppler_file_input.rb +124 -0
  283. data/testing-with-2.1.18/app/mailers/.keep +0 -0
  284. data/testing-with-2.1.18/app/mailers/application_mailer.rb +42 -0
  285. data/testing-with-2.1.18/app/models/.keep +0 -0
  286. data/testing-with-2.1.18/app/models/appearance.rb +7 -0
  287. data/testing-with-2.1.18/app/models/application_record.rb +6 -0
  288. data/testing-with-2.1.18/app/models/concerns/.keep +0 -0
  289. data/testing-with-2.1.18/app/models/concerns/activity_history.rb +11 -0
  290. data/testing-with-2.1.18/app/models/concerns/clone_record.rb +14 -0
  291. data/testing-with-2.1.18/app/models/concerns/downloadable.rb +16 -0
  292. data/testing-with-2.1.18/app/models/concerns/searchable.rb +27 -0
  293. data/testing-with-2.1.18/app/models/concerns/sortable.rb +13 -0
  294. data/testing-with-2.1.18/app/models/concerns/uploadable.rb +13 -0
  295. data/testing-with-2.1.18/app/models/front.rb +5 -0
  296. data/testing-with-2.1.18/app/models/google_analytics_setting.rb +6 -0
  297. data/testing-with-2.1.18/app/models/meta_tag.rb +54 -0
  298. data/testing-with-2.1.18/app/models/permission.rb +6 -0
  299. data/testing-with-2.1.18/app/models/rocket.rb +105 -0
  300. data/testing-with-2.1.18/app/models/role.rb +134 -0
  301. data/testing-with-2.1.18/app/models/script.rb +21 -0
  302. data/testing-with-2.1.18/app/models/seo.rb +49 -0
  303. data/testing-with-2.1.18/app/models/setting.rb +19 -0
  304. data/testing-with-2.1.18/app/models/smtp_setting.rb +7 -0
  305. data/testing-with-2.1.18/app/models/social_account.rb +6 -0
  306. data/testing-with-2.1.18/app/models/user.rb +75 -0
  307. data/testing-with-2.1.18/app/policies/application_policy.rb +18 -0
  308. data/testing-with-2.1.18/app/policies/controller_policy.rb +59 -0
  309. data/testing-with-2.1.18/app/policies/meta_tag_policy.rb +11 -0
  310. data/testing-with-2.1.18/app/policies/permission_policy.rb +23 -0
  311. data/testing-with-2.1.18/app/policies/rocket_policy.rb +11 -0
  312. data/testing-with-2.1.18/app/policies/role_policy.rb +31 -0
  313. data/testing-with-2.1.18/app/policies/script_policy.rb +11 -0
  314. data/testing-with-2.1.18/app/policies/seo_policy.rb +23 -0
  315. data/testing-with-2.1.18/app/policies/setting_policy.rb +15 -0
  316. data/testing-with-2.1.18/app/policies/user_policy.rb +19 -0
  317. data/testing-with-2.1.18/app/services/admin/appearance_service.rb +49 -0
  318. data/testing-with-2.1.18/app/services/admin/git_handler.rb +28 -0
  319. data/testing-with-2.1.18/app/uploaders/attachment_uploader.rb +61 -0
  320. data/testing-with-2.1.18/app/uploaders/ckeditor_attachment_file_uploader.rb +38 -0
  321. data/testing-with-2.1.18/app/uploaders/ckeditor_picture_uploader.rb +49 -0
  322. data/testing-with-2.1.18/app/uploaders/template_uploader.rb +44 -0
  323. data/testing-with-2.1.18/app/views/admin/layouts/_footer.html.haml +0 -0
  324. data/testing-with-2.1.18/app/views/admin/layouts/_git_info.html.haml +13 -0
  325. data/testing-with-2.1.18/app/views/admin/layouts/_head.html.haml +7 -0
  326. data/testing-with-2.1.18/app/views/admin/layouts/_keppler_boolean_script.haml +12 -0
  327. data/testing-with-2.1.18/app/views/admin/layouts/_listing_preloader.haml +4 -0
  328. data/testing-with-2.1.18/app/views/admin/layouts/_messages.html.haml +4 -0
  329. data/testing-with-2.1.18/app/views/admin/layouts/_navigation.html.haml +59 -0
  330. data/testing-with-2.1.18/app/views/admin/layouts/_preloader.html.haml +14 -0
  331. data/testing-with-2.1.18/app/views/admin/layouts/_sidebar.html.haml +83 -0
  332. data/testing-with-2.1.18/app/views/admin/layouts/application.html.haml +23 -0
  333. data/testing-with-2.1.18/app/views/admin/layouts/index/remote_messages.js.haml +9 -0
  334. data/testing-with-2.1.18/app/views/admin/meta_tags/_description.html.haml +13 -0
  335. data/testing-with-2.1.18/app/views/admin/meta_tags/_form.html.haml +35 -0
  336. data/testing-with-2.1.18/app/views/admin/meta_tags/_listing.html.haml +40 -0
  337. data/testing-with-2.1.18/app/views/admin/meta_tags/edit.html.haml +2 -0
  338. data/testing-with-2.1.18/app/views/admin/meta_tags/index.html.haml +69 -0
  339. data/testing-with-2.1.18/app/views/admin/meta_tags/new.html.haml +2 -0
  340. data/testing-with-2.1.18/app/views/admin/meta_tags/reload.js.haml +5 -0
  341. data/testing-with-2.1.18/app/views/admin/meta_tags/show.html.haml +28 -0
  342. data/testing-with-2.1.18/app/views/admin/permissions/_switch.html.haml +13 -0
  343. data/testing-with-2.1.18/app/views/admin/permissions/add.html.haml +95 -0
  344. data/testing-with-2.1.18/app/views/admin/permissions/create.html.haml +0 -0
  345. data/testing-with-2.1.18/app/views/admin/permissions/create.js.erb +2 -0
  346. data/testing-with-2.1.18/app/views/admin/permissions/show.js.erb +2 -0
  347. data/testing-with-2.1.18/app/views/admin/permissions/toggle_permissions.js.erb +6 -0
  348. data/testing-with-2.1.18/app/views/admin/rockets/_create_rocket.haml +61 -0
  349. data/testing-with-2.1.18/app/views/admin/rockets/_install_rocket.haml +28 -0
  350. data/testing-with-2.1.18/app/views/admin/rockets/rockets.haml +54 -0
  351. data/testing-with-2.1.18/app/views/admin/roles/_description.html.haml +13 -0
  352. data/testing-with-2.1.18/app/views/admin/roles/_form.html.haml +27 -0
  353. data/testing-with-2.1.18/app/views/admin/roles/_listing.html.haml +42 -0
  354. data/testing-with-2.1.18/app/views/admin/roles/_switch.html.haml +24 -0
  355. data/testing-with-2.1.18/app/views/admin/roles/edit.html.haml +1 -0
  356. data/testing-with-2.1.18/app/views/admin/roles/index.html.haml +64 -0
  357. data/testing-with-2.1.18/app/views/admin/roles/new.html.haml +1 -0
  358. data/testing-with-2.1.18/app/views/admin/roles/reload.js.haml +5 -0
  359. data/testing-with-2.1.18/app/views/admin/roles/show.html.haml +29 -0
  360. data/testing-with-2.1.18/app/views/admin/scripts/_description.html.haml +13 -0
  361. data/testing-with-2.1.18/app/views/admin/scripts/_form.html.haml +30 -0
  362. data/testing-with-2.1.18/app/views/admin/scripts/_listing.html.haml +40 -0
  363. data/testing-with-2.1.18/app/views/admin/scripts/edit.html.haml +1 -0
  364. data/testing-with-2.1.18/app/views/admin/scripts/index.html.haml +70 -0
  365. data/testing-with-2.1.18/app/views/admin/scripts/new.html.haml +1 -0
  366. data/testing-with-2.1.18/app/views/admin/scripts/reload.js.haml +5 -0
  367. data/testing-with-2.1.18/app/views/admin/scripts/show.html.haml +28 -0
  368. data/testing-with-2.1.18/app/views/admin/seos/robots.html.haml +35 -0
  369. data/testing-with-2.1.18/app/views/admin/seos/sitemap.html.haml +36 -0
  370. data/testing-with-2.1.18/app/views/admin/settings/_form.html.haml +10 -0
  371. data/testing-with-2.1.18/app/views/admin/settings/components/_preview.html.haml +30 -0
  372. data/testing-with-2.1.18/app/views/admin/settings/edit.html.haml +4 -0
  373. data/testing-with-2.1.18/app/views/admin/settings/fields/_appearance.html.haml +64 -0
  374. data/testing-with-2.1.18/app/views/admin/settings/fields/_basic_information.html.haml +40 -0
  375. data/testing-with-2.1.18/app/views/admin/settings/fields/_email_setting.html.haml +18 -0
  376. data/testing-with-2.1.18/app/views/admin/settings/fields/_google_analytics_setting.html.haml +21 -0
  377. data/testing-with-2.1.18/app/views/admin/settings/fields/_social_accounts.html.haml +43 -0
  378. data/testing-with-2.1.18/app/views/admin/users/_description.html.haml +13 -0
  379. data/testing-with-2.1.18/app/views/admin/users/_form.html.haml +45 -0
  380. data/testing-with-2.1.18/app/views/admin/users/_listing.html.haml +47 -0
  381. data/testing-with-2.1.18/app/views/admin/users/delete_avatar.js.haml +3 -0
  382. data/testing-with-2.1.18/app/views/admin/users/edit.html.haml +1 -0
  383. data/testing-with-2.1.18/app/views/admin/users/filter_by_role.js.erb +9 -0
  384. data/testing-with-2.1.18/app/views/admin/users/index.html.haml +69 -0
  385. data/testing-with-2.1.18/app/views/admin/users/new.html.haml +1 -0
  386. data/testing-with-2.1.18/app/views/admin/users/reload.js.haml +5 -0
  387. data/testing-with-2.1.18/app/views/admin/users/show.html.haml +34 -0
  388. data/testing-with-2.1.18/app/views/app/front/index.html.haml +223 -0
  389. data/testing-with-2.1.18/app/views/app/front/message.haml +1 -0
  390. data/testing-with-2.1.18/app/views/app/layouts/_footer.html.haml +3 -0
  391. data/testing-with-2.1.18/app/views/app/layouts/_google_analytics.html.haml +13 -0
  392. data/testing-with-2.1.18/app/views/app/layouts/_head.html.haml +15 -0
  393. data/testing-with-2.1.18/app/views/app/layouts/_messages.html.haml +6 -0
  394. data/testing-with-2.1.18/app/views/app/layouts/_meta_tags.html.haml +40 -0
  395. data/testing-with-2.1.18/app/views/app/layouts/_navigation.html.haml +13 -0
  396. data/testing-with-2.1.18/app/views/app/layouts/_navigation_links.html.haml +6 -0
  397. data/testing-with-2.1.18/app/views/app/layouts/application.html.haml +10 -0
  398. data/testing-with-2.1.18/app/views/application_mailer/testing.html.haml +1 -0
  399. data/testing-with-2.1.18/app/views/devise/confirmations/new.html.erb +16 -0
  400. data/testing-with-2.1.18/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
  401. data/testing-with-2.1.18/app/views/devise/passwords/edit.html.haml +31 -0
  402. data/testing-with-2.1.18/app/views/devise/passwords/new.html.haml +27 -0
  403. data/testing-with-2.1.18/app/views/devise/registrations/edit.html.erb +48 -0
  404. data/testing-with-2.1.18/app/views/devise/registrations/new.html.erb +19 -0
  405. data/testing-with-2.1.18/app/views/devise/sessions/new.html.haml +35 -0
  406. data/testing-with-2.1.18/app/views/devise/shared/_links.html.erb +21 -0
  407. data/testing-with-2.1.18/app/views/errors/internal_server_error.html.haml +50 -0
  408. data/testing-with-2.1.18/app/views/errors/not_authorized.html.haml +76 -0
  409. data/testing-with-2.1.18/app/views/errors/not_found.html.haml +101 -0
  410. data/testing-with-2.1.18/app/views/errors/unprocessable.html.haml +50 -0
  411. data/testing-with-2.1.18/app/views/kaminari/_first_page.html.haml +11 -0
  412. data/testing-with-2.1.18/app/views/kaminari/_gap.html.haml +8 -0
  413. data/testing-with-2.1.18/app/views/kaminari/_last_page.html.haml +11 -0
  414. data/testing-with-2.1.18/app/views/kaminari/_next_page.html.haml +11 -0
  415. data/testing-with-2.1.18/app/views/kaminari/_page.html.haml +10 -0
  416. data/testing-with-2.1.18/app/views/kaminari/_paginator.html.haml +18 -0
  417. data/testing-with-2.1.18/app/views/kaminari/_prev_page.html.haml +11 -0
  418. data/testing-with-2.1.18/app/views/layouts/errors/_head.html.haml +3 -0
  419. data/testing-with-2.1.18/app/views/layouts/errors/application.html.haml +11 -0
  420. data/testing-with-2.1.18/app/views/layouts/mailers/mailer.html.haml +3 -0
  421. data/testing-with-2.1.18/app/views/layouts/mailers/mailer.text.haml +1 -0
  422. data/testing-with-2.1.18/app/views/layouts/templates/application.html.haml +1 -0
  423. data/testing-with-2.1.18/app/views/public_activity/layout/_create.html.haml +44 -0
  424. data/testing-with-2.1.18/app/views/public_activity/layout/_destroy.html.haml +15 -0
  425. data/testing-with-2.1.18/app/views/public_activity/layout/_update.html.haml +44 -0
  426. data/testing-with-2.1.18/app/views/public_activity/session/_create.html.haml +13 -0
  427. data/testing-with-2.1.18/app/views/public_activity/session/_destroy.html.haml +13 -0
  428. data/testing-with-2.1.18/app/views/templates/kaminari/_first_page.html.haml +9 -0
  429. data/testing-with-2.1.18/app/views/templates/kaminari/_gap.html.haml +8 -0
  430. data/testing-with-2.1.18/app/views/templates/kaminari/_last_page.html.haml +9 -0
  431. data/testing-with-2.1.18/app/views/templates/kaminari/_next_page.html.haml +9 -0
  432. data/testing-with-2.1.18/app/views/templates/kaminari/_page.html.haml +10 -0
  433. data/testing-with-2.1.18/app/views/templates/kaminari/_paginator.html.haml +18 -0
  434. data/testing-with-2.1.18/app/views/templates/kaminari/_prev_page.html.haml +9 -0
  435. data/testing-with-2.1.18/bin/bundle +3 -0
  436. data/testing-with-2.1.18/bin/rails +4 -0
  437. data/testing-with-2.1.18/bin/rake +4 -0
  438. data/testing-with-2.1.18/bin/setup +29 -0
  439. data/testing-with-2.1.18/bin/spring +15 -0
  440. data/testing-with-2.1.18/bin/update +31 -0
  441. data/testing-with-2.1.18/bin/yarn +11 -0
  442. data/testing-with-2.1.18/config.ru +4 -0
  443. data/testing-with-2.1.18/config/application.rb +46 -0
  444. data/testing-with-2.1.18/config/attachments.yml +24 -0
  445. data/testing-with-2.1.18/config/boot.rb +7 -0
  446. data/testing-with-2.1.18/config/circleci/db_config.yml +51 -0
  447. data/testing-with-2.1.18/config/database.yml +25 -0
  448. data/testing-with-2.1.18/config/environment.rb +10 -0
  449. data/testing-with-2.1.18/config/environments/development.rb +61 -0
  450. data/testing-with-2.1.18/config/environments/production.rb +109 -0
  451. data/testing-with-2.1.18/config/environments/test.rb +45 -0
  452. data/testing-with-2.1.18/config/gaAuth/gauth_key.p12 +0 -0
  453. data/testing-with-2.1.18/config/initializers/assets.rb +14 -0
  454. data/testing-with-2.1.18/config/initializers/carrierwave.rb +12 -0
  455. data/testing-with-2.1.18/config/initializers/compression.rb +47 -0
  456. data/testing-with-2.1.18/config/initializers/cookies_serializer.rb +3 -0
  457. data/testing-with-2.1.18/config/initializers/date_formats.rb +2 -0
  458. data/testing-with-2.1.18/config/initializers/devise.rb +259 -0
  459. data/testing-with-2.1.18/config/initializers/filter_parameter_logging.rb +5 -0
  460. data/testing-with-2.1.18/config/initializers/inflections.rb +16 -0
  461. data/testing-with-2.1.18/config/initializers/keppler_configuration.rb +9 -0
  462. data/testing-with-2.1.18/config/initializers/mime_types.rb +6 -0
  463. data/testing-with-2.1.18/config/initializers/paginate_kaminari_configuration.rb +12 -0
  464. data/testing-with-2.1.18/config/initializers/ransack.rb +7 -0
  465. data/testing-with-2.1.18/config/initializers/rolify.rb +10 -0
  466. data/testing-with-2.1.18/config/initializers/route_traslator.rb +3 -0
  467. data/testing-with-2.1.18/config/initializers/session_store.rb +5 -0
  468. data/testing-with-2.1.18/config/initializers/simple_form.rb +170 -0
  469. data/testing-with-2.1.18/config/initializers/simple_form_bootstrap.rb +174 -0
  470. data/testing-with-2.1.18/config/initializers/simple_form_components.rb +61 -0
  471. data/testing-with-2.1.18/config/initializers/time_formats.rb +2 -0
  472. data/testing-with-2.1.18/config/initializers/wrap_parameters.rb +15 -0
  473. data/testing-with-2.1.18/config/jshint.yml +21 -0
  474. data/testing-with-2.1.18/config/locales/devise.en.yml +61 -0
  475. data/testing-with-2.1.18/config/locales/devise.es.yml +62 -0
  476. data/testing-with-2.1.18/config/locales/en.yml +477 -0
  477. data/testing-with-2.1.18/config/locales/es.yml +510 -0
  478. data/testing-with-2.1.18/config/locales/routes.en.yml +4 -0
  479. data/testing-with-2.1.18/config/locales/routes.es.yml +5 -0
  480. data/testing-with-2.1.18/config/locales/simple_form.en.yml +46 -0
  481. data/testing-with-2.1.18/config/locales/simple_form.es.yml +96 -0
  482. data/testing-with-2.1.18/config/locales/social_share_button.es.yml +10 -0
  483. data/testing-with-2.1.18/config/menu.yml +58 -0
  484. data/testing-with-2.1.18/config/permissions.yml +39 -0
  485. data/testing-with-2.1.18/config/puma.rb +56 -0
  486. data/testing-with-2.1.18/config/roles.yml +2 -0
  487. data/testing-with-2.1.18/config/routes.rb +191 -0
  488. data/testing-with-2.1.18/config/settings.yml +30 -0
  489. data/testing-with-2.1.18/config/sitemap.rb +30 -0
  490. data/testing-with-2.1.18/config/spring.rb +6 -0
  491. data/testing-with-2.1.18/db/migrate/20140812203549_devise_create_users.rb +50 -0
  492. data/testing-with-2.1.18/db/migrate/20140812210925_rolify_create_roles.rb +21 -0
  493. data/testing-with-2.1.18/db/migrate/20151221173228_create_activities.rb +23 -0
  494. data/testing-with-2.1.18/db/migrate/20160122201215_create_settings.rb +15 -0
  495. data/testing-with-2.1.18/db/migrate/20160126141856_create_smtp_settings.rb +15 -0
  496. data/testing-with-2.1.18/db/migrate/20160128131802_create_scripts.rb +12 -0
  497. data/testing-with-2.1.18/db/migrate/20160128151351_create_google_analytics_settings.rb +13 -0
  498. data/testing-with-2.1.18/db/migrate/20160128193740_create_social_accounts.rb +26 -0
  499. data/testing-with-2.1.18/db/migrate/20160201134918_create_meta_tags.rb +13 -0
  500. data/testing-with-2.1.18/db/migrate/20160201210520_create_appearances.rb +14 -0
  501. data/testing-with-2.1.18/db/migrate/20171225023933_create_scaffolds.rb +10 -0
  502. data/testing-with-2.1.18/db/migrate/20180503174351_create_permissions.rb +11 -0
  503. data/testing-with-2.1.18/db/migrate/20180717160308_create_keppler_frontend_views.keppler_frontend.rb +17 -0
  504. data/testing-with-2.1.18/db/migrate/20180730194655_create_keppler_frontend_themes.rb +13 -0
  505. data/testing-with-2.1.18/db/migrate/20180802184429_create_keppler_capsules_capsules.keppler_capsules.rb +13 -0
  506. data/testing-with-2.1.18/db/migrate/20180802184430_create_keppler_capsules_capsule_fields.keppler_capsules.rb +12 -0
  507. data/testing-with-2.1.18/db/migrate/20180806192023_create_keppler_capsules_capsule_validations.keppler_capsules.rb +13 -0
  508. data/testing-with-2.1.18/db/migrate/20180806203410_create_keppler_frontend_partials.keppler_frontend.rb +13 -0
  509. data/testing-with-2.1.18/db/migrate/20180807204310_create_keppler_capsules_capsule_associations.keppler_capsules.rb +13 -0
  510. data/testing-with-2.1.18/db/migrate/20180813160624_create_keppler_languages_languages.keppler_languages.rb +14 -0
  511. data/testing-with-2.1.18/db/migrate/20180813160625_create_keppler_languages_fields.keppler_languages.rb +14 -0
  512. data/testing-with-2.1.18/db/migrate/20180818073305_create_active_storage_tables.active_storage.rb +26 -0
  513. data/testing-with-2.1.18/db/migrate/20180827120841_create_keppler_frontend_callback_functions.keppler_frontend.rb +14 -0
  514. data/testing-with-2.1.18/db/migrate/20180827154329_create_keppler_frontend_view_callbacks.keppler_frontend.rb +12 -0
  515. data/testing-with-2.1.18/db/migrate/20180827154647_add_position_to_users_table.rb +5 -0
  516. data/testing-with-2.1.18/db/migrate/20180830153221_create_keppler_frontend_functions.keppler_frontend.rb +14 -0
  517. data/testing-with-2.1.18/db/migrate/20180830153222_create_keppler_frontend_parameters.keppler_frontend.rb +13 -0
  518. data/testing-with-2.1.18/db/migrate/20180904144238_create_seos.rb +11 -0
  519. data/testing-with-2.1.18/db/seeds.rb +162 -0
  520. data/testing-with-2.1.18/docs/diagrams/keppler_core/config +0 -0
  521. data/testing-with-2.1.18/docs/diagrams/keppler_frontend/editor/resources_editor.dia +0 -0
  522. data/testing-with-2.1.18/docs/diagrams/keppler_frontend/views/create_view.dia +0 -0
  523. data/testing-with-2.1.18/docs/diagrams/keppler_frontend/views/delete_view.dia +0 -0
  524. data/testing-with-2.1.18/docs/diagrams/keppler_frontend/views/delete_view.dia.autosave +0 -0
  525. data/testing-with-2.1.18/lib/generators/install_rocket/USAGE +44 -0
  526. data/testing-with-2.1.18/lib/generators/install_rocket/install_rocket_generator.rb +107 -0
  527. data/testing-with-2.1.18/lib/generators/keppler_add_module/USAGE +5 -0
  528. data/testing-with-2.1.18/lib/generators/keppler_add_module/keppler_add_module_generator.rb +324 -0
  529. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/controllers/controller.rb +106 -0
  530. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/models/model.rb +29 -0
  531. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/policies/policy.rb +11 -0
  532. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/_description.haml +13 -0
  533. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/_form.haml +49 -0
  534. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/_listing.haml +58 -0
  535. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/edit.haml +1 -0
  536. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/index.haml +70 -0
  537. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/new.haml +1 -0
  538. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/reload.js.haml +5 -0
  539. data/testing-with-2.1.18/lib/generators/keppler_add_module/templates/views/show.haml +35 -0
  540. data/testing-with-2.1.18/lib/generators/keppler_delete_module/USAGE +5 -0
  541. data/testing-with-2.1.18/lib/generators/keppler_delete_module/keppler_delete_module_generator.rb +305 -0
  542. data/testing-with-2.1.18/lib/generators/keppler_front/keppler_front_generator.rb +139 -0
  543. data/testing-with-2.1.18/lib/generators/keppler_front/templates/controllers/controller.rb +17 -0
  544. data/testing-with-2.1.18/lib/generators/keppler_front/templates/views/template.html.haml +225 -0
  545. data/testing-with-2.1.18/lib/generators/keppler_relation/keppler_relation_generator.rb +219 -0
  546. data/testing-with-2.1.18/lib/generators/new_rocket/USAGE +44 -0
  547. data/testing-with-2.1.18/lib/generators/new_rocket/new_rocket_generator.rb +258 -0
  548. data/testing-with-2.1.18/lib/generators/uninstall_rocket/USAGE +32 -0
  549. data/testing-with-2.1.18/lib/generators/uninstall_rocket/uninstall_rocket_generator.rb +140 -0
  550. data/testing-with-2.1.18/lib/keppler_configuration.rb +12 -0
  551. data/testing-with-2.1.18/lib/plugins/config/locales/en.yml +16 -0
  552. data/testing-with-2.1.18/lib/plugins/config/locales/es.yml +16 -0
  553. data/testing-with-2.1.18/lib/plugins/config/menu.yml +16 -0
  554. data/testing-with-2.1.18/lib/plugins/config/permissions.yml +1 -0
  555. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/keppler_scaffold_generator.rb +223 -0
  556. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/controllers/controller.rb +107 -0
  557. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/models/model.rb +29 -0
  558. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/policies/policy.rb +14 -0
  559. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/_description.haml +13 -0
  560. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/_form.haml +49 -0
  561. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/_listing.haml +58 -0
  562. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/edit.haml +1 -0
  563. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/index.haml +69 -0
  564. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/new.haml +1 -0
  565. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/reload.js.haml +5 -0
  566. data/testing-with-2.1.18/lib/plugins/generators/keppler_scaffold/templates/views/show.haml +35 -0
  567. data/testing-with-2.1.18/lib/plugins/install.rb +151 -0
  568. data/testing-with-2.1.18/lib/plugins/layouts/application.html.haml +23 -0
  569. data/testing-with-2.1.18/lib/templates/haml/scaffold/_form.html.haml +10 -0
  570. metadata +564 -3
  571. data/installer/core/.sass-cache/c3e12133096533fa0f5c2d91446553934f6099d2/(__TEMPLATE__)c +0 -0
@@ -0,0 +1,100 @@
1
+ <!doctype html>
2
+
3
+ <title>CodeMirror: HTML mixed mode</title>
4
+ <meta charset="utf-8"/>
5
+ <link rel=stylesheet href="../../doc/docs.css">
6
+
7
+ <link rel="stylesheet" href="../../lib/codemirror.css">
8
+ <script src="../../lib/codemirror.js"></script>
9
+ <script src="../../addon/selection/selection-pointer.js"></script>
10
+ <script src="../xml/xml.js"></script>
11
+ <script src="../javascript/javascript.js"></script>
12
+ <script src="../css/css.js"></script>
13
+ <script src="../vbscript/vbscript.js"></script>
14
+ <script src="htmlmixed.js"></script>
15
+ <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
16
+ <div id=nav>
17
+ <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
18
+
19
+ <ul>
20
+ <li><a href="../../index.html">Home</a>
21
+ <li><a href="../../doc/manual.html">Manual</a>
22
+ <li><a href="https://github.com/codemirror/codemirror">Code</a>
23
+ </ul>
24
+ <ul>
25
+ <li><a href="../index.html">Language modes</a>
26
+ <li><a class=active href="#">HTML mixed</a>
27
+ </ul>
28
+ </div>
29
+
30
+ <article>
31
+ <h2>HTML mixed mode</h2>
32
+ <form><textarea id="code" name="code">
33
+ <html style="color: green">
34
+ <!-- this is a comment -->
35
+ <head>
36
+ <title>Mixed HTML Example</title>
37
+ <style type="text/css">
38
+ h1 {font-family: comic sans; color: #f0f;}
39
+ div {background: yellow !important;}
40
+ body {
41
+ max-width: 50em;
42
+ margin: 1em 2em 1em 5em;
43
+ }
44
+ </style>
45
+ </head>
46
+ <body>
47
+ <h1>Mixed HTML Example</h1>
48
+ <script>
49
+ function jsFunc(arg1, arg2) {
50
+ if (arg1 && arg2) document.body.innerHTML = "achoo";
51
+ }
52
+ </script>
53
+ </body>
54
+ </html>
55
+ </textarea></form>
56
+ <script>
57
+ // Define an extended mixed-mode that understands vbscript and
58
+ // leaves mustache/handlebars embedded templates in html mode
59
+ var mixedMode = {
60
+ name: "htmlmixed",
61
+ scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
62
+ mode: null},
63
+ {matches: /(text|application)\/(x-)?vb(a|script)/i,
64
+ mode: "vbscript"}]
65
+ };
66
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
67
+ mode: mixedMode,
68
+ selectionPointer: true
69
+ });
70
+ </script>
71
+
72
+ <p>The HTML mixed mode depends on the XML, JavaScript, and CSS modes.</p>
73
+
74
+ <p>It takes an optional mode configuration
75
+ option, <code>tags</code>, which can be used to add custom
76
+ behavior for specific tags. When given, it should be an object
77
+ mapping tag names (for example <code>script</code>) to arrays or
78
+ three-element arrays. Those inner arrays indicate [attributeName,
79
+ valueRegexp, <a href="../../doc/manual.html#option_mode">modeSpec</a>]
80
+ specifications. For example, you could use <code>["type", /^foo$/,
81
+ "foo"]</code> to map the attribute <code>type="foo"</code> to
82
+ the <code>foo</code> mode. When the first two fields are null
83
+ (<code>[null, null, "mode"]</code>), the given mode is used for
84
+ any such tag that doesn't match any of the previously given
85
+ attributes. For example:</p>
86
+
87
+ <pre>var myModeSpec = {
88
+ name: "htmlmixed",
89
+ tags: {
90
+ style: [["type", /^text\/(x-)?scss$/, "text/x-scss"],
91
+ [null, null, "css"]],
92
+ custom: [[null, null, "customMode"]]
93
+ }
94
+ }</pre>
95
+
96
+ <p><strong>MIME types defined:</strong> <code>text/html</code>
97
+ (redefined, only takes effect if you load this parser after the
98
+ XML parser).</p>
99
+
100
+ </article>
@@ -0,0 +1,114 @@
1
+ <!doctype html>
2
+
3
+ <title>CodeMirror: JavaScript mode</title>
4
+ <meta charset="utf-8"/>
5
+ <link rel=stylesheet href="../../doc/docs.css">
6
+
7
+ <link rel="stylesheet" href="../../lib/codemirror.css">
8
+ <script src="../../lib/codemirror.js"></script>
9
+ <script src="../../addon/edit/matchbrackets.js"></script>
10
+ <script src="../../addon/comment/continuecomment.js"></script>
11
+ <script src="../../addon/comment/comment.js"></script>
12
+ <script src="javascript.js"></script>
13
+ <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
14
+ <div id=nav>
15
+ <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
16
+
17
+ <ul>
18
+ <li><a href="../../index.html">Home</a>
19
+ <li><a href="../../doc/manual.html">Manual</a>
20
+ <li><a href="https://github.com/codemirror/codemirror">Code</a>
21
+ </ul>
22
+ <ul>
23
+ <li><a href="../index.html">Language modes</a>
24
+ <li><a class=active href="#">JavaScript</a>
25
+ </ul>
26
+ </div>
27
+
28
+ <article>
29
+ <h2>JavaScript mode</h2>
30
+
31
+
32
+ <div><textarea id="code" name="code">
33
+ // Demo code (the actual new parser character stream implementation)
34
+
35
+ function StringStream(string) {
36
+ this.pos = 0;
37
+ this.string = string;
38
+ }
39
+
40
+ StringStream.prototype = {
41
+ done: function() {return this.pos >= this.string.length;},
42
+ peek: function() {return this.string.charAt(this.pos);},
43
+ next: function() {
44
+ if (this.pos &lt; this.string.length)
45
+ return this.string.charAt(this.pos++);
46
+ },
47
+ eat: function(match) {
48
+ var ch = this.string.charAt(this.pos);
49
+ if (typeof match == "string") var ok = ch == match;
50
+ else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);
51
+ if (ok) {this.pos++; return ch;}
52
+ },
53
+ eatWhile: function(match) {
54
+ var start = this.pos;
55
+ while (this.eat(match));
56
+ if (this.pos > start) return this.string.slice(start, this.pos);
57
+ },
58
+ backUp: function(n) {this.pos -= n;},
59
+ column: function() {return this.pos;},
60
+ eatSpace: function() {
61
+ var start = this.pos;
62
+ while (/\s/.test(this.string.charAt(this.pos))) this.pos++;
63
+ return this.pos - start;
64
+ },
65
+ match: function(pattern, consume, caseInsensitive) {
66
+ if (typeof pattern == "string") {
67
+ function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
68
+ if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
69
+ if (consume !== false) this.pos += str.length;
70
+ return true;
71
+ }
72
+ }
73
+ else {
74
+ var match = this.string.slice(this.pos).match(pattern);
75
+ if (match &amp;&amp; consume !== false) this.pos += match[0].length;
76
+ return match;
77
+ }
78
+ }
79
+ };
80
+ </textarea></div>
81
+
82
+ <script>
83
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
84
+ lineNumbers: true,
85
+ matchBrackets: true,
86
+ continueComments: "Enter",
87
+ extraKeys: {"Ctrl-Q": "toggleComment"}
88
+ });
89
+ </script>
90
+
91
+ <p>
92
+ JavaScript mode supports several configuration options:
93
+ <ul>
94
+ <li><code>json</code> which will set the mode to expect JSON
95
+ data rather than a JavaScript program.</li>
96
+ <li><code>jsonld</code> which will set the mode to expect
97
+ <a href="http://json-ld.org">JSON-LD</a> linked data rather
98
+ than a JavaScript program (<a href="json-ld.html">demo</a>).</li>
99
+ <li><code>typescript</code> which will activate additional
100
+ syntax highlighting and some other things for TypeScript code
101
+ (<a href="typescript.html">demo</a>).</li>
102
+ <li><code>statementIndent</code> which (given a number) will
103
+ determine the amount of indentation to use for statements
104
+ continued on a new line.</li>
105
+ <li><code>wordCharacters</code>, a regexp that indicates which
106
+ characters should be considered part of an identifier.
107
+ Defaults to <code>/[\w$]/</code>, which does not handle
108
+ non-ASCII identifiers. Can be set to something more elaborate
109
+ to improve Unicode support.</li>
110
+ </ul>
111
+ </p>
112
+
113
+ <p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/json</code>, <code>application/ld+json</code>, <code>text/typescript</code>, <code>application/typescript</code>.</p>
114
+ </article>
@@ -0,0 +1,896 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineMode("javascript", function(config, parserConfig) {
15
+ var indentUnit = config.indentUnit;
16
+ var statementIndent = parserConfig.statementIndent;
17
+ var jsonldMode = parserConfig.jsonld;
18
+ var jsonMode = parserConfig.json || jsonldMode;
19
+ var isTS = parserConfig.typescript;
20
+ var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
21
+
22
+ // Tokenizer
23
+
24
+ var keywords = function(){
25
+ function kw(type) {return {type: type, style: "keyword"};}
26
+ var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
27
+ var operator = kw("operator"), atom = {type: "atom", style: "atom"};
28
+
29
+ return {
30
+ "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
31
+ "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
32
+ "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
33
+ "function": kw("function"), "catch": kw("catch"),
34
+ "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
35
+ "in": operator, "typeof": operator, "instanceof": operator,
36
+ "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
37
+ "this": kw("this"), "class": kw("class"), "super": kw("atom"),
38
+ "yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
39
+ "await": C
40
+ };
41
+ }();
42
+
43
+ var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
44
+ var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
45
+
46
+ function readRegexp(stream) {
47
+ var escaped = false, next, inSet = false;
48
+ while ((next = stream.next()) != null) {
49
+ if (!escaped) {
50
+ if (next == "/" && !inSet) return;
51
+ if (next == "[") inSet = true;
52
+ else if (inSet && next == "]") inSet = false;
53
+ }
54
+ escaped = !escaped && next == "\\";
55
+ }
56
+ }
57
+
58
+ // Used as scratch variables to communicate multiple values without
59
+ // consing up tons of objects.
60
+ var type, content;
61
+ function ret(tp, style, cont) {
62
+ type = tp; content = cont;
63
+ return style;
64
+ }
65
+ function tokenBase(stream, state) {
66
+ var ch = stream.next();
67
+ if (ch == '"' || ch == "'") {
68
+ state.tokenize = tokenString(ch);
69
+ return state.tokenize(stream, state);
70
+ } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
71
+ return ret("number", "number");
72
+ } else if (ch == "." && stream.match("..")) {
73
+ return ret("spread", "meta");
74
+ } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
75
+ return ret(ch);
76
+ } else if (ch == "=" && stream.eat(">")) {
77
+ return ret("=>", "operator");
78
+ } else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) {
79
+ return ret("number", "number");
80
+ } else if (/\d/.test(ch)) {
81
+ stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);
82
+ return ret("number", "number");
83
+ } else if (ch == "/") {
84
+ if (stream.eat("*")) {
85
+ state.tokenize = tokenComment;
86
+ return tokenComment(stream, state);
87
+ } else if (stream.eat("/")) {
88
+ stream.skipToEnd();
89
+ return ret("comment", "comment");
90
+ } else if (expressionAllowed(stream, state, 1)) {
91
+ readRegexp(stream);
92
+ stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
93
+ return ret("regexp", "string-2");
94
+ } else {
95
+ stream.eat("=");
96
+ return ret("operator", "operator", stream.current());
97
+ }
98
+ } else if (ch == "`") {
99
+ state.tokenize = tokenQuasi;
100
+ return tokenQuasi(stream, state);
101
+ } else if (ch == "#") {
102
+ stream.skipToEnd();
103
+ return ret("error", "error");
104
+ } else if (isOperatorChar.test(ch)) {
105
+ if (ch != ">" || !state.lexical || state.lexical.type != ">") {
106
+ if (stream.eat("=")) {
107
+ if (ch == "!" || ch == "=") stream.eat("=")
108
+ } else if (/[<>*+\-]/.test(ch)) {
109
+ stream.eat(ch)
110
+ if (ch == ">") stream.eat(ch)
111
+ }
112
+ }
113
+ return ret("operator", "operator", stream.current());
114
+ } else if (wordRE.test(ch)) {
115
+ stream.eatWhile(wordRE);
116
+ var word = stream.current()
117
+ if (state.lastType != ".") {
118
+ if (keywords.propertyIsEnumerable(word)) {
119
+ var kw = keywords[word]
120
+ return ret(kw.type, kw.style, word)
121
+ }
122
+ if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
123
+ return ret("async", "keyword", word)
124
+ }
125
+ return ret("variable", "variable", word)
126
+ }
127
+ }
128
+
129
+ function tokenString(quote) {
130
+ return function(stream, state) {
131
+ var escaped = false, next;
132
+ if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
133
+ state.tokenize = tokenBase;
134
+ return ret("jsonld-keyword", "meta");
135
+ }
136
+ while ((next = stream.next()) != null) {
137
+ if (next == quote && !escaped) break;
138
+ escaped = !escaped && next == "\\";
139
+ }
140
+ if (!escaped) state.tokenize = tokenBase;
141
+ return ret("string", "string");
142
+ };
143
+ }
144
+
145
+ function tokenComment(stream, state) {
146
+ var maybeEnd = false, ch;
147
+ while (ch = stream.next()) {
148
+ if (ch == "/" && maybeEnd) {
149
+ state.tokenize = tokenBase;
150
+ break;
151
+ }
152
+ maybeEnd = (ch == "*");
153
+ }
154
+ return ret("comment", "comment");
155
+ }
156
+
157
+ function tokenQuasi(stream, state) {
158
+ var escaped = false, next;
159
+ while ((next = stream.next()) != null) {
160
+ if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
161
+ state.tokenize = tokenBase;
162
+ break;
163
+ }
164
+ escaped = !escaped && next == "\\";
165
+ }
166
+ return ret("quasi", "string-2", stream.current());
167
+ }
168
+
169
+ var brackets = "([{}])";
170
+ // This is a crude lookahead trick to try and notice that we're
171
+ // parsing the argument patterns for a fat-arrow function before we
172
+ // actually hit the arrow token. It only works if the arrow is on
173
+ // the same line as the arguments and there's no strange noise
174
+ // (comments) in between. Fallback is to only notice when we hit the
175
+ // arrow, and not declare the arguments as locals for the arrow
176
+ // body.
177
+ function findFatArrow(stream, state) {
178
+ if (state.fatArrowAt) state.fatArrowAt = null;
179
+ var arrow = stream.string.indexOf("=>", stream.start);
180
+ if (arrow < 0) return;
181
+
182
+ if (isTS) { // Try to skip TypeScript return type declarations after the arguments
183
+ var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow))
184
+ if (m) arrow = m.index
185
+ }
186
+
187
+ var depth = 0, sawSomething = false;
188
+ for (var pos = arrow - 1; pos >= 0; --pos) {
189
+ var ch = stream.string.charAt(pos);
190
+ var bracket = brackets.indexOf(ch);
191
+ if (bracket >= 0 && bracket < 3) {
192
+ if (!depth) { ++pos; break; }
193
+ if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
194
+ } else if (bracket >= 3 && bracket < 6) {
195
+ ++depth;
196
+ } else if (wordRE.test(ch)) {
197
+ sawSomething = true;
198
+ } else if (/["'\/]/.test(ch)) {
199
+ return;
200
+ } else if (sawSomething && !depth) {
201
+ ++pos;
202
+ break;
203
+ }
204
+ }
205
+ if (sawSomething && !depth) state.fatArrowAt = pos;
206
+ }
207
+
208
+ // Parser
209
+
210
+ var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
211
+
212
+ function JSLexical(indented, column, type, align, prev, info) {
213
+ this.indented = indented;
214
+ this.column = column;
215
+ this.type = type;
216
+ this.prev = prev;
217
+ this.info = info;
218
+ if (align != null) this.align = align;
219
+ }
220
+
221
+ function inScope(state, varname) {
222
+ for (var v = state.localVars; v; v = v.next)
223
+ if (v.name == varname) return true;
224
+ for (var cx = state.context; cx; cx = cx.prev) {
225
+ for (var v = cx.vars; v; v = v.next)
226
+ if (v.name == varname) return true;
227
+ }
228
+ }
229
+
230
+ function parseJS(state, style, type, content, stream) {
231
+ var cc = state.cc;
232
+ // Communicate our context to the combinators.
233
+ // (Less wasteful than consing up a hundred closures on every call.)
234
+ cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
235
+
236
+ if (!state.lexical.hasOwnProperty("align"))
237
+ state.lexical.align = true;
238
+
239
+ while(true) {
240
+ var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
241
+ if (combinator(type, content)) {
242
+ while(cc.length && cc[cc.length - 1].lex)
243
+ cc.pop()();
244
+ if (cx.marked) return cx.marked;
245
+ if (type == "variable" && inScope(state, content)) return "variable-2";
246
+ return style;
247
+ }
248
+ }
249
+ }
250
+
251
+ // Combinator utils
252
+
253
+ var cx = {state: null, column: null, marked: null, cc: null};
254
+ function pass() {
255
+ for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
256
+ }
257
+ function cont() {
258
+ pass.apply(null, arguments);
259
+ return true;
260
+ }
261
+ function inList(name, list) {
262
+ for (var v = list; v; v = v.next) if (v.name == name) return true
263
+ return false;
264
+ }
265
+ function register(varname) {
266
+ var state = cx.state;
267
+ cx.marked = "def";
268
+ if (state.context) {
269
+ if (state.lexical.info == "var" && state.context && state.context.block) {
270
+ // FIXME function decls are also not block scoped
271
+ var newContext = registerVarScoped(varname, state.context)
272
+ if (newContext != null) {
273
+ state.context = newContext
274
+ return
275
+ }
276
+ } else if (!inList(varname, state.localVars)) {
277
+ state.localVars = new Var(varname, state.localVars)
278
+ return
279
+ }
280
+ }
281
+ // Fall through means this is global
282
+ if (parserConfig.globalVars && !inList(varname, state.globalVars))
283
+ state.globalVars = new Var(varname, state.globalVars)
284
+ }
285
+ function registerVarScoped(varname, context) {
286
+ if (!context) {
287
+ return null
288
+ } else if (context.block) {
289
+ var inner = registerVarScoped(varname, context.prev)
290
+ if (!inner) return null
291
+ if (inner == context.prev) return context
292
+ return new Context(inner, context.vars, true)
293
+ } else if (inList(varname, context.vars)) {
294
+ return context
295
+ } else {
296
+ return new Context(context.prev, new Var(varname, context.vars), false)
297
+ }
298
+ }
299
+
300
+ function isModifier(name) {
301
+ return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
302
+ }
303
+
304
+ // Combinators
305
+
306
+ function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
307
+ function Var(name, next) { this.name = name; this.next = next }
308
+
309
+ var defaultVars = new Var("this", new Var("arguments", null))
310
+ function pushcontext() {
311
+ cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
312
+ cx.state.localVars = defaultVars
313
+ }
314
+ function pushblockcontext() {
315
+ cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
316
+ cx.state.localVars = null
317
+ }
318
+ function popcontext() {
319
+ cx.state.localVars = cx.state.context.vars
320
+ cx.state.context = cx.state.context.prev
321
+ }
322
+ popcontext.lex = true
323
+ function pushlex(type, info) {
324
+ var result = function() {
325
+ var state = cx.state, indent = state.indented;
326
+ if (state.lexical.type == "stat") indent = state.lexical.indented;
327
+ else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
328
+ indent = outer.indented;
329
+ state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
330
+ };
331
+ result.lex = true;
332
+ return result;
333
+ }
334
+ function poplex() {
335
+ var state = cx.state;
336
+ if (state.lexical.prev) {
337
+ if (state.lexical.type == ")")
338
+ state.indented = state.lexical.indented;
339
+ state.lexical = state.lexical.prev;
340
+ }
341
+ }
342
+ poplex.lex = true;
343
+
344
+ function expect(wanted) {
345
+ function exp(type) {
346
+ if (type == wanted) return cont();
347
+ else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
348
+ else return cont(exp);
349
+ };
350
+ return exp;
351
+ }
352
+
353
+ function statement(type, value) {
354
+ if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
355
+ if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
356
+ if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
357
+ if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
358
+ if (type == "debugger") return cont(expect(";"));
359
+ if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
360
+ if (type == ";") return cont();
361
+ if (type == "if") {
362
+ if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
363
+ cx.state.cc.pop()();
364
+ return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
365
+ }
366
+ if (type == "function") return cont(functiondef);
367
+ if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
368
+ if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), className, poplex); }
369
+ if (type == "variable") {
370
+ if (isTS && value == "declare") {
371
+ cx.marked = "keyword"
372
+ return cont(statement)
373
+ } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
374
+ cx.marked = "keyword"
375
+ if (value == "enum") return cont(enumdef);
376
+ else if (value == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
377
+ else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
378
+ } else if (isTS && value == "namespace") {
379
+ cx.marked = "keyword"
380
+ return cont(pushlex("form"), expression, block, poplex)
381
+ } else if (isTS && value == "abstract") {
382
+ cx.marked = "keyword"
383
+ return cont(statement)
384
+ } else {
385
+ return cont(pushlex("stat"), maybelabel);
386
+ }
387
+ }
388
+ if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
389
+ block, poplex, poplex, popcontext);
390
+ if (type == "case") return cont(expression, expect(":"));
391
+ if (type == "default") return cont(expect(":"));
392
+ if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
393
+ if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
394
+ if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
395
+ if (type == "async") return cont(statement)
396
+ if (value == "@") return cont(expression, statement)
397
+ return pass(pushlex("stat"), expression, expect(";"), poplex);
398
+ }
399
+ function maybeCatchBinding(type) {
400
+ if (type == "(") return cont(funarg, expect(")"))
401
+ }
402
+ function expression(type, value) {
403
+ return expressionInner(type, value, false);
404
+ }
405
+ function expressionNoComma(type, value) {
406
+ return expressionInner(type, value, true);
407
+ }
408
+ function parenExpr(type) {
409
+ if (type != "(") return pass()
410
+ return cont(pushlex(")"), expression, expect(")"), poplex)
411
+ }
412
+ function expressionInner(type, value, noComma) {
413
+ if (cx.state.fatArrowAt == cx.stream.start) {
414
+ var body = noComma ? arrowBodyNoComma : arrowBody;
415
+ if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
416
+ else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
417
+ }
418
+
419
+ var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
420
+ if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
421
+ if (type == "function") return cont(functiondef, maybeop);
422
+ if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
423
+ if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
424
+ if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
425
+ if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
426
+ if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
427
+ if (type == "{") return contCommasep(objprop, "}", null, maybeop);
428
+ if (type == "quasi") return pass(quasi, maybeop);
429
+ if (type == "new") return cont(maybeTarget(noComma));
430
+ if (type == "import") return cont(expression);
431
+ return cont();
432
+ }
433
+ function maybeexpression(type) {
434
+ if (type.match(/[;\}\)\],]/)) return pass();
435
+ return pass(expression);
436
+ }
437
+
438
+ function maybeoperatorComma(type, value) {
439
+ if (type == ",") return cont(expression);
440
+ return maybeoperatorNoComma(type, value, false);
441
+ }
442
+ function maybeoperatorNoComma(type, value, noComma) {
443
+ var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
444
+ var expr = noComma == false ? expression : expressionNoComma;
445
+ if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
446
+ if (type == "operator") {
447
+ if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
448
+ if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false))
449
+ return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
450
+ if (value == "?") return cont(expression, expect(":"), expr);
451
+ return cont(expr);
452
+ }
453
+ if (type == "quasi") { return pass(quasi, me); }
454
+ if (type == ";") return;
455
+ if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
456
+ if (type == ".") return cont(property, me);
457
+ if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
458
+ if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }
459
+ if (type == "regexp") {
460
+ cx.state.lastType = cx.marked = "operator"
461
+ cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)
462
+ return cont(expr)
463
+ }
464
+ }
465
+ function quasi(type, value) {
466
+ if (type != "quasi") return pass();
467
+ if (value.slice(value.length - 2) != "${") return cont(quasi);
468
+ return cont(expression, continueQuasi);
469
+ }
470
+ function continueQuasi(type) {
471
+ if (type == "}") {
472
+ cx.marked = "string-2";
473
+ cx.state.tokenize = tokenQuasi;
474
+ return cont(quasi);
475
+ }
476
+ }
477
+ function arrowBody(type) {
478
+ findFatArrow(cx.stream, cx.state);
479
+ return pass(type == "{" ? statement : expression);
480
+ }
481
+ function arrowBodyNoComma(type) {
482
+ findFatArrow(cx.stream, cx.state);
483
+ return pass(type == "{" ? statement : expressionNoComma);
484
+ }
485
+ function maybeTarget(noComma) {
486
+ return function(type) {
487
+ if (type == ".") return cont(noComma ? targetNoComma : target);
488
+ else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
489
+ else return pass(noComma ? expressionNoComma : expression);
490
+ };
491
+ }
492
+ function target(_, value) {
493
+ if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
494
+ }
495
+ function targetNoComma(_, value) {
496
+ if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
497
+ }
498
+ function maybelabel(type) {
499
+ if (type == ":") return cont(poplex, statement);
500
+ return pass(maybeoperatorComma, expect(";"), poplex);
501
+ }
502
+ function property(type) {
503
+ if (type == "variable") {cx.marked = "property"; return cont();}
504
+ }
505
+ function objprop(type, value) {
506
+ if (type == "async") {
507
+ cx.marked = "property";
508
+ return cont(objprop);
509
+ } else if (type == "variable" || cx.style == "keyword") {
510
+ cx.marked = "property";
511
+ if (value == "get" || value == "set") return cont(getterSetter);
512
+ var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params
513
+ if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
514
+ cx.state.fatArrowAt = cx.stream.pos + m[0].length
515
+ return cont(afterprop);
516
+ } else if (type == "number" || type == "string") {
517
+ cx.marked = jsonldMode ? "property" : (cx.style + " property");
518
+ return cont(afterprop);
519
+ } else if (type == "jsonld-keyword") {
520
+ return cont(afterprop);
521
+ } else if (isTS && isModifier(value)) {
522
+ cx.marked = "keyword"
523
+ return cont(objprop)
524
+ } else if (type == "[") {
525
+ return cont(expression, maybetype, expect("]"), afterprop);
526
+ } else if (type == "spread") {
527
+ return cont(expressionNoComma, afterprop);
528
+ } else if (value == "*") {
529
+ cx.marked = "keyword";
530
+ return cont(objprop);
531
+ } else if (type == ":") {
532
+ return pass(afterprop)
533
+ }
534
+ }
535
+ function getterSetter(type) {
536
+ if (type != "variable") return pass(afterprop);
537
+ cx.marked = "property";
538
+ return cont(functiondef);
539
+ }
540
+ function afterprop(type) {
541
+ if (type == ":") return cont(expressionNoComma);
542
+ if (type == "(") return pass(functiondef);
543
+ }
544
+ function commasep(what, end, sep) {
545
+ function proceed(type, value) {
546
+ if (sep ? sep.indexOf(type) > -1 : type == ",") {
547
+ var lex = cx.state.lexical;
548
+ if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
549
+ return cont(function(type, value) {
550
+ if (type == end || value == end) return pass()
551
+ return pass(what)
552
+ }, proceed);
553
+ }
554
+ if (type == end || value == end) return cont();
555
+ return cont(expect(end));
556
+ }
557
+ return function(type, value) {
558
+ if (type == end || value == end) return cont();
559
+ return pass(what, proceed);
560
+ };
561
+ }
562
+ function contCommasep(what, end, info) {
563
+ for (var i = 3; i < arguments.length; i++)
564
+ cx.cc.push(arguments[i]);
565
+ return cont(pushlex(end, info), commasep(what, end), poplex);
566
+ }
567
+ function block(type) {
568
+ if (type == "}") return cont();
569
+ return pass(statement, block);
570
+ }
571
+ function maybetype(type, value) {
572
+ if (isTS) {
573
+ if (type == ":") return cont(typeexpr);
574
+ if (value == "?") return cont(maybetype);
575
+ }
576
+ }
577
+ function mayberettype(type) {
578
+ if (isTS && type == ":") {
579
+ if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
580
+ else return cont(typeexpr)
581
+ }
582
+ }
583
+ function isKW(_, value) {
584
+ if (value == "is") {
585
+ cx.marked = "keyword"
586
+ return cont()
587
+ }
588
+ }
589
+ function typeexpr(type, value) {
590
+ if (value == "keyof" || value == "typeof") {
591
+ cx.marked = "keyword"
592
+ return cont(value == "keyof" ? typeexpr : expressionNoComma)
593
+ }
594
+ if (type == "variable" || value == "void") {
595
+ cx.marked = "type"
596
+ return cont(afterType)
597
+ }
598
+ if (type == "string" || type == "number" || type == "atom") return cont(afterType);
599
+ if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
600
+ if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
601
+ if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
602
+ if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
603
+ }
604
+ function maybeReturnType(type) {
605
+ if (type == "=>") return cont(typeexpr)
606
+ }
607
+ function typeprop(type, value) {
608
+ if (type == "variable" || cx.style == "keyword") {
609
+ cx.marked = "property"
610
+ return cont(typeprop)
611
+ } else if (value == "?") {
612
+ return cont(typeprop)
613
+ } else if (type == ":") {
614
+ return cont(typeexpr)
615
+ } else if (type == "[") {
616
+ return cont(expression, maybetype, expect("]"), typeprop)
617
+ }
618
+ }
619
+ function typearg(type, value) {
620
+ if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
621
+ if (type == ":") return cont(typeexpr)
622
+ return pass(typeexpr)
623
+ }
624
+ function afterType(type, value) {
625
+ if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
626
+ if (value == "|" || type == "." || value == "&") return cont(typeexpr)
627
+ if (type == "[") return cont(expect("]"), afterType)
628
+ if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
629
+ }
630
+ function maybeTypeArgs(_, value) {
631
+ if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
632
+ }
633
+ function typeparam() {
634
+ return pass(typeexpr, maybeTypeDefault)
635
+ }
636
+ function maybeTypeDefault(_, value) {
637
+ if (value == "=") return cont(typeexpr)
638
+ }
639
+ function vardef(_, value) {
640
+ if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
641
+ return pass(pattern, maybetype, maybeAssign, vardefCont);
642
+ }
643
+ function pattern(type, value) {
644
+ if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
645
+ if (type == "variable") { register(value); return cont(); }
646
+ if (type == "spread") return cont(pattern);
647
+ if (type == "[") return contCommasep(pattern, "]");
648
+ if (type == "{") return contCommasep(proppattern, "}");
649
+ }
650
+ function proppattern(type, value) {
651
+ if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
652
+ register(value);
653
+ return cont(maybeAssign);
654
+ }
655
+ if (type == "variable") cx.marked = "property";
656
+ if (type == "spread") return cont(pattern);
657
+ if (type == "}") return pass();
658
+ return cont(expect(":"), pattern, maybeAssign);
659
+ }
660
+ function maybeAssign(_type, value) {
661
+ if (value == "=") return cont(expressionNoComma);
662
+ }
663
+ function vardefCont(type) {
664
+ if (type == ",") return cont(vardef);
665
+ }
666
+ function maybeelse(type, value) {
667
+ if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
668
+ }
669
+ function forspec(type, value) {
670
+ if (value == "await") return cont(forspec);
671
+ if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
672
+ }
673
+ function forspec1(type) {
674
+ if (type == "var") return cont(vardef, expect(";"), forspec2);
675
+ if (type == ";") return cont(forspec2);
676
+ if (type == "variable") return cont(formaybeinof);
677
+ return pass(expression, expect(";"), forspec2);
678
+ }
679
+ function formaybeinof(_type, value) {
680
+ if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
681
+ return cont(maybeoperatorComma, forspec2);
682
+ }
683
+ function forspec2(type, value) {
684
+ if (type == ";") return cont(forspec3);
685
+ if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
686
+ return pass(expression, expect(";"), forspec3);
687
+ }
688
+ function forspec3(type) {
689
+ if (type != ")") cont(expression);
690
+ }
691
+ function functiondef(type, value) {
692
+ if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
693
+ if (type == "variable") {register(value); return cont(functiondef);}
694
+ if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
695
+ if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
696
+ }
697
+ function funarg(type, value) {
698
+ if (value == "@") cont(expression, funarg)
699
+ if (type == "spread") return cont(funarg);
700
+ if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
701
+ return pass(pattern, maybetype, maybeAssign);
702
+ }
703
+ function classExpression(type, value) {
704
+ // Class expressions may have an optional name.
705
+ if (type == "variable") return className(type, value);
706
+ return classNameAfter(type, value);
707
+ }
708
+ function className(type, value) {
709
+ if (type == "variable") {register(value); return cont(classNameAfter);}
710
+ }
711
+ function classNameAfter(type, value) {
712
+ if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
713
+ if (value == "extends" || value == "implements" || (isTS && type == ",")) {
714
+ if (value == "implements") cx.marked = "keyword";
715
+ return cont(isTS ? typeexpr : expression, classNameAfter);
716
+ }
717
+ if (type == "{") return cont(pushlex("}"), classBody, poplex);
718
+ }
719
+ function classBody(type, value) {
720
+ if (type == "async" ||
721
+ (type == "variable" &&
722
+ (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
723
+ cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
724
+ cx.marked = "keyword";
725
+ return cont(classBody);
726
+ }
727
+ if (type == "variable" || cx.style == "keyword") {
728
+ cx.marked = "property";
729
+ return cont(isTS ? classfield : functiondef, classBody);
730
+ }
731
+ if (type == "[")
732
+ return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody)
733
+ if (value == "*") {
734
+ cx.marked = "keyword";
735
+ return cont(classBody);
736
+ }
737
+ if (type == ";") return cont(classBody);
738
+ if (type == "}") return cont();
739
+ if (value == "@") return cont(expression, classBody)
740
+ }
741
+ function classfield(type, value) {
742
+ if (value == "?") return cont(classfield)
743
+ if (type == ":") return cont(typeexpr, maybeAssign)
744
+ if (value == "=") return cont(expressionNoComma)
745
+ return pass(functiondef)
746
+ }
747
+ function afterExport(type, value) {
748
+ if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
749
+ if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
750
+ if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
751
+ return pass(statement);
752
+ }
753
+ function exportField(type, value) {
754
+ if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
755
+ if (type == "variable") return pass(expressionNoComma, exportField);
756
+ }
757
+ function afterImport(type) {
758
+ if (type == "string") return cont();
759
+ if (type == "(") return pass(expression);
760
+ return pass(importSpec, maybeMoreImports, maybeFrom);
761
+ }
762
+ function importSpec(type, value) {
763
+ if (type == "{") return contCommasep(importSpec, "}");
764
+ if (type == "variable") register(value);
765
+ if (value == "*") cx.marked = "keyword";
766
+ return cont(maybeAs);
767
+ }
768
+ function maybeMoreImports(type) {
769
+ if (type == ",") return cont(importSpec, maybeMoreImports)
770
+ }
771
+ function maybeAs(_type, value) {
772
+ if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
773
+ }
774
+ function maybeFrom(_type, value) {
775
+ if (value == "from") { cx.marked = "keyword"; return cont(expression); }
776
+ }
777
+ function arrayLiteral(type) {
778
+ if (type == "]") return cont();
779
+ return pass(commasep(expressionNoComma, "]"));
780
+ }
781
+ function enumdef() {
782
+ return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
783
+ }
784
+ function enummember() {
785
+ return pass(pattern, maybeAssign);
786
+ }
787
+
788
+ function isContinuedStatement(state, textAfter) {
789
+ return state.lastType == "operator" || state.lastType == "," ||
790
+ isOperatorChar.test(textAfter.charAt(0)) ||
791
+ /[,.]/.test(textAfter.charAt(0));
792
+ }
793
+
794
+ function expressionAllowed(stream, state, backUp) {
795
+ return state.tokenize == tokenBase &&
796
+ /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
797
+ (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
798
+ }
799
+
800
+ // Interface
801
+
802
+ return {
803
+ startState: function(basecolumn) {
804
+ var state = {
805
+ tokenize: tokenBase,
806
+ lastType: "sof",
807
+ cc: [],
808
+ lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
809
+ localVars: parserConfig.localVars,
810
+ context: parserConfig.localVars && new Context(null, null, false),
811
+ indented: basecolumn || 0
812
+ };
813
+ if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
814
+ state.globalVars = parserConfig.globalVars;
815
+ return state;
816
+ },
817
+
818
+ token: function(stream, state) {
819
+ if (stream.sol()) {
820
+ if (!state.lexical.hasOwnProperty("align"))
821
+ state.lexical.align = false;
822
+ state.indented = stream.indentation();
823
+ findFatArrow(stream, state);
824
+ }
825
+ if (state.tokenize != tokenComment && stream.eatSpace()) return null;
826
+ var style = state.tokenize(stream, state);
827
+ if (type == "comment") return style;
828
+ state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
829
+ return parseJS(state, style, type, content, stream);
830
+ },
831
+
832
+ indent: function(state, textAfter) {
833
+ if (state.tokenize == tokenComment) return CodeMirror.Pass;
834
+ if (state.tokenize != tokenBase) return 0;
835
+ var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
836
+ // Kludge to prevent 'maybelse' from blocking lexical scope pops
837
+ if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
838
+ var c = state.cc[i];
839
+ if (c == poplex) lexical = lexical.prev;
840
+ else if (c != maybeelse) break;
841
+ }
842
+ while ((lexical.type == "stat" || lexical.type == "form") &&
843
+ (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
844
+ (top == maybeoperatorComma || top == maybeoperatorNoComma) &&
845
+ !/^[,\.=+\-*:?[\(]/.test(textAfter))))
846
+ lexical = lexical.prev;
847
+ if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
848
+ lexical = lexical.prev;
849
+ var type = lexical.type, closing = firstChar == type;
850
+
851
+ if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
852
+ else if (type == "form" && firstChar == "{") return lexical.indented;
853
+ else if (type == "form") return lexical.indented + indentUnit;
854
+ else if (type == "stat")
855
+ return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
856
+ else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
857
+ return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
858
+ else if (lexical.align) return lexical.column + (closing ? 0 : 1);
859
+ else return lexical.indented + (closing ? 0 : indentUnit);
860
+ },
861
+
862
+ electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
863
+ blockCommentStart: jsonMode ? null : "/*",
864
+ blockCommentEnd: jsonMode ? null : "*/",
865
+ blockCommentContinue: jsonMode ? null : " * ",
866
+ lineComment: jsonMode ? null : "//",
867
+ fold: "brace",
868
+ closeBrackets: "()[]{}''\"\"``",
869
+
870
+ helperType: jsonMode ? "json" : "javascript",
871
+ jsonldMode: jsonldMode,
872
+ jsonMode: jsonMode,
873
+
874
+ expressionAllowed: expressionAllowed,
875
+
876
+ skipExpression: function(state) {
877
+ var top = state.cc[state.cc.length - 1]
878
+ if (top == expression || top == expressionNoComma) state.cc.pop()
879
+ }
880
+ };
881
+ });
882
+
883
+ CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
884
+
885
+ CodeMirror.defineMIME("text/javascript", "javascript");
886
+ CodeMirror.defineMIME("text/ecmascript", "javascript");
887
+ CodeMirror.defineMIME("application/javascript", "javascript");
888
+ CodeMirror.defineMIME("application/x-javascript", "javascript");
889
+ CodeMirror.defineMIME("application/ecmascript", "javascript");
890
+ CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
891
+ CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
892
+ CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
893
+ CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
894
+ CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
895
+
896
+ });