bedrock_sass 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (466) hide show
  1. checksums.yaml +4 -4
  2. data/assets/_vendor/ace/ace.js +255 -589
  3. data/assets/_vendor/ace/ext-beautify.js +1 -2
  4. data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +2 -2
  5. data/assets/_vendor/ace/ext-emmet.js +4 -4
  6. data/assets/_vendor/ace/ext-error_marker.js +1 -2
  7. data/assets/_vendor/ace/ext-keybinding_menu.js +1 -2
  8. data/assets/_vendor/ace/ext-language_tools.js +5 -9
  9. data/assets/_vendor/ace/ext-linking.js +1 -2
  10. data/assets/_vendor/ace/ext-modelist.js +9 -5
  11. data/assets/_vendor/ace/ext-options.js +10 -7
  12. data/assets/_vendor/ace/ext-rtl.js +1 -2
  13. data/assets/_vendor/ace/ext-searchbox.js +8 -4
  14. data/assets/_vendor/ace/ext-settings_menu.js +10 -7
  15. data/assets/_vendor/ace/ext-spellcheck.js +1 -2
  16. data/assets/_vendor/ace/ext-split.js +1 -2
  17. data/assets/_vendor/ace/ext-static_highlight.js +11 -8
  18. data/assets/_vendor/ace/ext-statusbar.js +1 -2
  19. data/assets/_vendor/ace/ext-textarea.js +1 -5
  20. data/assets/_vendor/ace/ext-themelist.js +2 -4
  21. data/assets/_vendor/ace/ext-whitespace.js +1 -2
  22. data/assets/_vendor/ace/keybinding-emacs.js +6 -2
  23. data/assets/_vendor/ace/keybinding-vim.js +13 -25
  24. data/assets/_vendor/ace/mode-abap.js +2 -3
  25. data/assets/_vendor/ace/mode-abc.js +3 -2
  26. data/assets/_vendor/ace/mode-actionscript.js +2 -2
  27. data/assets/_vendor/ace/mode-ada.js +1 -2
  28. data/assets/_vendor/ace/mode-apache_conf.js +2 -2
  29. data/assets/_vendor/ace/mode-apex.js +457 -0
  30. data/assets/_vendor/ace/mode-applescript.js +1 -2
  31. data/assets/_vendor/ace/mode-asciidoc.js +2 -2
  32. data/assets/_vendor/ace/mode-asl.js +1 -2
  33. data/assets/_vendor/ace/mode-assembly_x86.js +2 -2
  34. data/assets/_vendor/ace/mode-autohotkey.js +1 -2
  35. data/assets/_vendor/ace/mode-batchfile.js +2 -2
  36. data/assets/_vendor/ace/mode-bro.js +2 -2
  37. data/assets/_vendor/ace/mode-c9search.js +1 -2
  38. data/assets/_vendor/ace/mode-c_cpp.js +2 -2
  39. data/assets/_vendor/ace/mode-cirru.js +1 -2
  40. data/assets/_vendor/ace/mode-clojure.js +2 -2
  41. data/assets/_vendor/ace/mode-cobol.js +1 -2
  42. data/assets/_vendor/ace/mode-coffee.js +1 -2
  43. data/assets/_vendor/ace/mode-coldfusion.js +3 -2
  44. data/assets/_vendor/ace/mode-csharp.js +3 -3
  45. data/assets/_vendor/ace/mode-csound_document.js +319 -80
  46. data/assets/_vendor/ace/mode-csound_orchestra.js +323 -86
  47. data/assets/_vendor/ace/mode-csound_score.js +1 -2
  48. data/assets/_vendor/ace/mode-csp.js +1 -2
  49. data/assets/_vendor/ace/mode-css.js +2 -2
  50. data/assets/_vendor/ace/mode-curly.js +3 -2
  51. data/assets/_vendor/ace/mode-d.js +2 -2
  52. data/assets/_vendor/ace/mode-dart.js +24 -14
  53. data/assets/_vendor/ace/mode-diff.js +4 -4
  54. data/assets/_vendor/ace/mode-django.js +3 -2
  55. data/assets/_vendor/ace/mode-dockerfile.js +3 -2
  56. data/assets/_vendor/ace/mode-dot.js +1 -2
  57. data/assets/_vendor/ace/mode-drools.js +3 -2
  58. data/assets/_vendor/ace/mode-edifact.js +2 -2
  59. data/assets/_vendor/ace/mode-eiffel.js +1 -2
  60. data/assets/_vendor/ace/mode-ejs.js +5 -2
  61. data/assets/_vendor/ace/mode-elixir.js +2 -2
  62. data/assets/_vendor/ace/mode-elm.js +1 -2
  63. data/assets/_vendor/ace/mode-erlang.js +2 -2
  64. data/assets/_vendor/ace/mode-forth.js +2 -2
  65. data/assets/_vendor/ace/mode-fortran.js +1 -2
  66. data/assets/_vendor/ace/mode-fsharp.js +1 -2
  67. data/assets/_vendor/ace/mode-fsl.js +258 -0
  68. data/assets/_vendor/ace/mode-ftl.js +3 -2
  69. data/assets/_vendor/ace/mode-gcode.js +1 -2
  70. data/assets/_vendor/ace/mode-gherkin.js +2 -4
  71. data/assets/_vendor/ace/mode-gitignore.js +1 -2
  72. data/assets/_vendor/ace/mode-glsl.js +2 -2
  73. data/assets/_vendor/ace/mode-gobstones.js +3 -2
  74. data/assets/_vendor/ace/mode-golang.js +1 -2
  75. data/assets/_vendor/ace/mode-graphqlschema.js +1 -2
  76. data/assets/_vendor/ace/mode-groovy.js +4 -2
  77. data/assets/_vendor/ace/mode-haml.js +5 -2
  78. data/assets/_vendor/ace/mode-handlebars.js +3 -2
  79. data/assets/_vendor/ace/mode-haskell.js +2 -2
  80. data/assets/_vendor/ace/mode-haskell_cabal.js +1 -2
  81. data/assets/_vendor/ace/mode-haxe.js +2 -2
  82. data/assets/_vendor/ace/mode-hjson.js +2 -2
  83. data/assets/_vendor/ace/mode-html.js +3 -2
  84. data/assets/_vendor/ace/mode-html_elixir.js +4 -2
  85. data/assets/_vendor/ace/mode-html_ruby.js +5 -2
  86. data/assets/_vendor/ace/mode-ini.js +1 -2
  87. data/assets/_vendor/ace/mode-io.js +2 -2
  88. data/assets/_vendor/ace/mode-jack.js +1 -2
  89. data/assets/_vendor/ace/mode-jade.js +14 -115
  90. data/assets/_vendor/ace/mode-java.js +64 -3
  91. data/assets/_vendor/ace/mode-javascript.js +2 -2
  92. data/assets/_vendor/ace/mode-json.js +1 -2
  93. data/assets/_vendor/ace/mode-jsoniq.js +8 -2317
  94. data/assets/_vendor/ace/mode-jsp.js +4 -2
  95. data/assets/_vendor/ace/mode-jssm.js +2 -2
  96. data/assets/_vendor/ace/mode-jsx.js +1 -2
  97. data/assets/_vendor/ace/mode-julia.js +2 -2
  98. data/assets/_vendor/ace/mode-kotlin.js +2 -2
  99. data/assets/_vendor/ace/mode-latex.js +1 -2
  100. data/assets/_vendor/ace/mode-less.js +4 -2
  101. data/assets/_vendor/ace/mode-liquid.js +2026 -477
  102. data/assets/_vendor/ace/mode-lisp.js +2 -2
  103. data/assets/_vendor/ace/mode-livescript.js +1 -2
  104. data/assets/_vendor/ace/mode-logiql.js +2 -2
  105. data/assets/_vendor/ace/mode-logtalk.js +352 -0
  106. data/assets/_vendor/ace/mode-lsl.js +1 -2
  107. data/assets/_vendor/ace/mode-lua.js +1 -2
  108. data/assets/_vendor/ace/mode-luapage.js +3 -2
  109. data/assets/_vendor/ace/mode-lucene.js +2 -3
  110. data/assets/_vendor/ace/mode-makefile.js +3 -2
  111. data/assets/_vendor/ace/mode-markdown.js +5 -2
  112. data/assets/_vendor/ace/mode-mask.js +3 -2
  113. data/assets/_vendor/ace/mode-matlab.js +1 -2
  114. data/assets/_vendor/ace/mode-maze.js +2 -2
  115. data/assets/_vendor/ace/mode-mel.js +2 -2
  116. data/assets/_vendor/ace/mode-mixal.js +1 -2
  117. data/assets/_vendor/ace/mode-mushcode.js +2 -2
  118. data/assets/_vendor/ace/mode-mysql.js +3 -4
  119. data/assets/_vendor/ace/mode-nix.js +2 -2
  120. data/assets/_vendor/ace/mode-nsis.js +2 -2
  121. data/assets/_vendor/ace/mode-objectivec.js +3 -2
  122. data/assets/_vendor/ace/mode-ocaml.js +1 -2
  123. data/assets/_vendor/ace/mode-pascal.js +2 -2
  124. data/assets/_vendor/ace/mode-perl.js +2 -2
  125. data/assets/_vendor/ace/mode-perl6.js +593 -0
  126. data/assets/_vendor/ace/mode-pgsql.js +304 -69
  127. data/assets/_vendor/ace/mode-php.js +844 -1029
  128. data/assets/_vendor/ace/mode-php_laravel_blade.js +844 -1029
  129. data/assets/_vendor/ace/mode-pig.js +2 -2
  130. data/assets/_vendor/ace/mode-plain_text.js +1 -2
  131. data/assets/_vendor/ace/mode-powershell.js +2 -2
  132. data/assets/_vendor/ace/mode-praat.js +2 -2
  133. data/assets/_vendor/ace/mode-prolog.js +2 -2
  134. data/assets/_vendor/ace/mode-properties.js +1 -2
  135. data/assets/_vendor/ace/mode-protobuf.js +2 -2
  136. data/assets/_vendor/ace/mode-puppet.js +1 -2
  137. data/assets/_vendor/ace/mode-python.js +297 -63
  138. data/assets/_vendor/ace/mode-r.js +3 -2
  139. data/assets/_vendor/ace/mode-razor.js +9 -3
  140. data/assets/_vendor/ace/mode-rdoc.js +2 -2
  141. data/assets/_vendor/ace/mode-red.js +2 -2
  142. data/assets/_vendor/ace/mode-redshift.js +1 -2
  143. data/assets/_vendor/ace/mode-rhtml.js +5 -2
  144. data/assets/_vendor/ace/mode-rst.js +1 -2
  145. data/assets/_vendor/ace/mode-ruby.js +3 -2
  146. data/assets/_vendor/ace/mode-rust.js +2 -2
  147. data/assets/_vendor/ace/mode-sass.js +205 -117
  148. data/assets/_vendor/ace/mode-scad.js +2 -2
  149. data/assets/_vendor/ace/mode-scala.js +3 -2
  150. data/assets/_vendor/ace/mode-scheme.js +2 -2
  151. data/assets/_vendor/ace/mode-scss.js +204 -115
  152. data/assets/_vendor/ace/mode-sh.js +3 -2
  153. data/assets/_vendor/ace/mode-sjs.js +2 -2
  154. data/assets/_vendor/ace/mode-slim.js +18 -117
  155. data/assets/_vendor/ace/mode-smarty.js +3 -2
  156. data/assets/_vendor/ace/mode-snippets.js +1 -2
  157. data/assets/_vendor/ace/mode-soy_template.js +4 -2
  158. data/assets/_vendor/ace/mode-space.js +1 -2
  159. data/assets/_vendor/ace/mode-sparql.js +2 -2
  160. data/assets/_vendor/ace/mode-sql.js +2 -3
  161. data/assets/_vendor/ace/mode-sqlserver.js +2 -2
  162. data/assets/_vendor/ace/mode-stylus.js +3 -2
  163. data/assets/_vendor/ace/mode-svg.js +2 -2
  164. data/assets/_vendor/ace/mode-swift.js +1 -2
  165. data/assets/_vendor/ace/mode-tcl.js +2 -2
  166. data/assets/_vendor/ace/mode-terraform.js +1 -2
  167. data/assets/_vendor/ace/mode-tex.js +2 -2
  168. data/assets/_vendor/ace/mode-text.js +1 -2
  169. data/assets/_vendor/ace/mode-textile.js +1 -2
  170. data/assets/_vendor/ace/mode-toml.js +1 -2
  171. data/assets/_vendor/ace/mode-tsx.js +2 -2
  172. data/assets/_vendor/ace/mode-turtle.js +2 -2
  173. data/assets/_vendor/ace/mode-twig.js +3 -2
  174. data/assets/_vendor/ace/mode-typescript.js +2 -2
  175. data/assets/_vendor/ace/mode-vala.js +2 -2
  176. data/assets/_vendor/ace/mode-vbscript.js +1 -2
  177. data/assets/_vendor/ace/mode-velocity.js +4 -2
  178. data/assets/_vendor/ace/mode-verilog.js +1 -2
  179. data/assets/_vendor/ace/mode-vhdl.js +1 -2
  180. data/assets/_vendor/ace/mode-visualforce.js +2641 -0
  181. data/assets/_vendor/ace/mode-wollok.js +3 -2
  182. data/assets/_vendor/ace/mode-xml.js +1 -2
  183. data/assets/_vendor/ace/mode-xquery.js +8 -2287
  184. data/assets/_vendor/ace/mode-yaml.js +1 -2
  185. data/assets/_vendor/ace/snippets/abap.js +2 -3
  186. data/assets/_vendor/ace/snippets/abc.js +1 -2
  187. data/assets/_vendor/ace/snippets/actionscript.js +1 -2
  188. data/assets/_vendor/ace/snippets/ada.js +2 -3
  189. data/assets/_vendor/ace/snippets/apache_conf.js +2 -3
  190. data/assets/_vendor/ace/snippets/apex.js +14 -0
  191. data/assets/_vendor/ace/snippets/applescript.js +2 -3
  192. data/assets/_vendor/ace/snippets/asciidoc.js +2 -3
  193. data/assets/_vendor/ace/snippets/asl.js +2 -3
  194. data/assets/_vendor/ace/snippets/assembly_x86.js +2 -3
  195. data/assets/_vendor/ace/snippets/autohotkey.js +2 -3
  196. data/assets/_vendor/ace/snippets/batchfile.js +2 -3
  197. data/assets/_vendor/ace/snippets/bro.js +1 -2
  198. data/assets/_vendor/ace/snippets/c9search.js +2 -3
  199. data/assets/_vendor/ace/snippets/c_cpp.js +1 -2
  200. data/assets/_vendor/ace/snippets/cirru.js +2 -3
  201. data/assets/_vendor/ace/snippets/clojure.js +1 -2
  202. data/assets/_vendor/ace/snippets/cobol.js +2 -3
  203. data/assets/_vendor/ace/snippets/coffee.js +1 -2
  204. data/assets/_vendor/ace/snippets/coldfusion.js +2 -3
  205. data/assets/_vendor/ace/snippets/csharp.js +2 -3
  206. data/assets/_vendor/ace/snippets/csound_document.js +1 -2
  207. data/assets/_vendor/ace/snippets/csound_orchestra.js +1 -2
  208. data/assets/_vendor/ace/snippets/csound_score.js +2 -3
  209. data/assets/_vendor/ace/snippets/csp.js +1 -2
  210. data/assets/_vendor/ace/snippets/css.js +1 -2
  211. data/assets/_vendor/ace/snippets/curly.js +2 -3
  212. data/assets/_vendor/ace/snippets/d.js +2 -3
  213. data/assets/_vendor/ace/snippets/dart.js +1 -2
  214. data/assets/_vendor/ace/snippets/diff.js +1 -2
  215. data/assets/_vendor/ace/snippets/django.js +1 -2
  216. data/assets/_vendor/ace/snippets/dockerfile.js +2 -3
  217. data/assets/_vendor/ace/snippets/dot.js +2 -3
  218. data/assets/_vendor/ace/snippets/drools.js +1 -2
  219. data/assets/_vendor/ace/snippets/edifact.js +1 -2
  220. data/assets/_vendor/ace/snippets/eiffel.js +2 -3
  221. data/assets/_vendor/ace/snippets/ejs.js +2 -3
  222. data/assets/_vendor/ace/snippets/elixir.js +1 -2
  223. data/assets/_vendor/ace/snippets/elm.js +2 -3
  224. data/assets/_vendor/ace/snippets/erlang.js +1 -2
  225. data/assets/_vendor/ace/snippets/forth.js +2 -3
  226. data/assets/_vendor/ace/snippets/fortran.js +2 -3
  227. data/assets/_vendor/ace/snippets/fsharp.js +2 -3
  228. data/assets/_vendor/ace/snippets/fsl.js +14 -0
  229. data/assets/_vendor/ace/snippets/ftl.js +2 -3
  230. data/assets/_vendor/ace/snippets/gcode.js +2 -3
  231. data/assets/_vendor/ace/snippets/gherkin.js +2 -3
  232. data/assets/_vendor/ace/snippets/gitignore.js +2 -3
  233. data/assets/_vendor/ace/snippets/glsl.js +2 -3
  234. data/assets/_vendor/ace/snippets/gobstones.js +1 -2
  235. data/assets/_vendor/ace/snippets/golang.js +2 -3
  236. data/assets/_vendor/ace/snippets/graphqlschema.js +1 -2
  237. data/assets/_vendor/ace/snippets/groovy.js +2 -3
  238. data/assets/_vendor/ace/snippets/haml.js +1 -2
  239. data/assets/_vendor/ace/snippets/handlebars.js +2 -3
  240. data/assets/_vendor/ace/snippets/haskell.js +1 -2
  241. data/assets/_vendor/ace/snippets/haskell_cabal.js +2 -3
  242. data/assets/_vendor/ace/snippets/haxe.js +2 -3
  243. data/assets/_vendor/ace/snippets/hjson.js +1 -2
  244. data/assets/_vendor/ace/snippets/html.js +1 -2
  245. data/assets/_vendor/ace/snippets/html_elixir.js +2 -3
  246. data/assets/_vendor/ace/snippets/html_ruby.js +2 -3
  247. data/assets/_vendor/ace/snippets/ini.js +2 -3
  248. data/assets/_vendor/ace/snippets/io.js +1 -2
  249. data/assets/_vendor/ace/snippets/jack.js +2 -3
  250. data/assets/_vendor/ace/snippets/jade.js +2 -3
  251. data/assets/_vendor/ace/snippets/java.js +1 -2
  252. data/assets/_vendor/ace/snippets/javascript.js +1 -2
  253. data/assets/_vendor/ace/snippets/json.js +2 -3
  254. data/assets/_vendor/ace/snippets/jsoniq.js +1 -2
  255. data/assets/_vendor/ace/snippets/jsp.js +1 -2
  256. data/assets/_vendor/ace/snippets/jssm.js +1 -2
  257. data/assets/_vendor/ace/snippets/jsx.js +2 -3
  258. data/assets/_vendor/ace/snippets/julia.js +2 -3
  259. data/assets/_vendor/ace/snippets/kotlin.js +1 -2
  260. data/assets/_vendor/ace/snippets/latex.js +2 -3
  261. data/assets/_vendor/ace/snippets/less.js +2 -3
  262. data/assets/_vendor/ace/snippets/liquid.js +883 -3
  263. data/assets/_vendor/ace/snippets/lisp.js +2 -3
  264. data/assets/_vendor/ace/snippets/livescript.js +2 -3
  265. data/assets/_vendor/ace/snippets/logiql.js +2 -3
  266. data/assets/_vendor/ace/snippets/logtalk.js +14 -0
  267. data/assets/_vendor/ace/snippets/lsl.js +1 -2
  268. data/assets/_vendor/ace/snippets/lua.js +1 -2
  269. data/assets/_vendor/ace/snippets/luapage.js +2 -3
  270. data/assets/_vendor/ace/snippets/lucene.js +2 -3
  271. data/assets/_vendor/ace/snippets/makefile.js +1 -2
  272. data/assets/_vendor/ace/snippets/markdown.js +1 -2
  273. data/assets/_vendor/ace/snippets/mask.js +2 -3
  274. data/assets/_vendor/ace/snippets/matlab.js +2 -3
  275. data/assets/_vendor/ace/snippets/maze.js +1 -2
  276. data/assets/_vendor/ace/snippets/mel.js +2 -3
  277. data/assets/_vendor/ace/snippets/mixal.js +2 -3
  278. data/assets/_vendor/ace/snippets/mushcode.js +2 -3
  279. data/assets/_vendor/ace/snippets/mysql.js +2 -3
  280. data/assets/_vendor/ace/snippets/nix.js +2 -3
  281. data/assets/_vendor/ace/snippets/nsis.js +1 -2
  282. data/assets/_vendor/ace/snippets/objectivec.js +2 -3
  283. data/assets/_vendor/ace/snippets/ocaml.js +2 -3
  284. data/assets/_vendor/ace/snippets/pascal.js +2 -3
  285. data/assets/_vendor/ace/snippets/perl.js +1 -2
  286. data/assets/_vendor/ace/snippets/perl6.js +14 -0
  287. data/assets/_vendor/ace/snippets/pgsql.js +2 -3
  288. data/assets/_vendor/ace/snippets/php.js +1 -2
  289. data/assets/_vendor/ace/snippets/php_laravel_blade.js +2 -3
  290. data/assets/_vendor/ace/snippets/pig.js +2 -3
  291. data/assets/_vendor/ace/snippets/plain_text.js +2 -3
  292. data/assets/_vendor/ace/snippets/powershell.js +2 -3
  293. data/assets/_vendor/ace/snippets/praat.js +2 -3
  294. data/assets/_vendor/ace/snippets/prolog.js +2 -3
  295. data/assets/_vendor/ace/snippets/properties.js +2 -3
  296. data/assets/_vendor/ace/snippets/protobuf.js +1 -2
  297. data/assets/_vendor/ace/snippets/puppet.js +2 -3
  298. data/assets/_vendor/ace/snippets/python.js +1 -2
  299. data/assets/_vendor/ace/snippets/r.js +1 -2
  300. data/assets/_vendor/ace/snippets/razor.js +1 -2
  301. data/assets/_vendor/ace/snippets/rdoc.js +2 -3
  302. data/assets/_vendor/ace/snippets/red.js +1 -2
  303. data/assets/_vendor/ace/snippets/redshift.js +2 -3
  304. data/assets/_vendor/ace/snippets/rhtml.js +2 -3
  305. data/assets/_vendor/ace/snippets/rst.js +1 -2
  306. data/assets/_vendor/ace/snippets/ruby.js +1 -2
  307. data/assets/_vendor/ace/snippets/rust.js +2 -3
  308. data/assets/_vendor/ace/snippets/sass.js +2 -3
  309. data/assets/_vendor/ace/snippets/scad.js +2 -3
  310. data/assets/_vendor/ace/snippets/scala.js +2 -3
  311. data/assets/_vendor/ace/snippets/scheme.js +2 -3
  312. data/assets/_vendor/ace/snippets/scss.js +2 -3
  313. data/assets/_vendor/ace/snippets/sh.js +1 -2
  314. data/assets/_vendor/ace/snippets/sjs.js +2 -3
  315. data/assets/_vendor/ace/snippets/slim.js +2 -3
  316. data/assets/_vendor/ace/snippets/smarty.js +2 -3
  317. data/assets/_vendor/ace/snippets/snippets.js +1 -2
  318. data/assets/_vendor/ace/snippets/soy_template.js +2 -3
  319. data/assets/_vendor/ace/snippets/space.js +2 -3
  320. data/assets/_vendor/ace/snippets/sparql.js +1 -2
  321. data/assets/_vendor/ace/snippets/sql.js +1 -2
  322. data/assets/_vendor/ace/snippets/sqlserver.js +1 -2
  323. data/assets/_vendor/ace/snippets/stylus.js +2 -3
  324. data/assets/_vendor/ace/snippets/svg.js +2 -3
  325. data/assets/_vendor/ace/snippets/swift.js +2 -3
  326. data/assets/_vendor/ace/snippets/tcl.js +1 -2
  327. data/assets/_vendor/ace/snippets/terraform.js +2 -3
  328. data/assets/_vendor/ace/snippets/tex.js +1 -2
  329. data/assets/_vendor/ace/snippets/text.js +2 -3
  330. data/assets/_vendor/ace/snippets/textile.js +1 -2
  331. data/assets/_vendor/ace/snippets/toml.js +2 -3
  332. data/assets/_vendor/ace/snippets/tsx.js +2 -3
  333. data/assets/_vendor/ace/snippets/turtle.js +1 -2
  334. data/assets/_vendor/ace/snippets/twig.js +2 -3
  335. data/assets/_vendor/ace/snippets/typescript.js +2 -3
  336. data/assets/_vendor/ace/snippets/vala.js +1 -2
  337. data/assets/_vendor/ace/snippets/vbscript.js +2 -3
  338. data/assets/_vendor/ace/snippets/velocity.js +1 -2
  339. data/assets/_vendor/ace/snippets/verilog.js +2 -3
  340. data/assets/_vendor/ace/snippets/vhdl.js +2 -3
  341. data/assets/_vendor/ace/snippets/visualforce.js +14 -0
  342. data/assets/_vendor/ace/snippets/wollok.js +1 -2
  343. data/assets/_vendor/ace/snippets/xml.js +2 -3
  344. data/assets/_vendor/ace/snippets/xquery.js +1 -2
  345. data/assets/_vendor/ace/snippets/yaml.js +2 -3
  346. data/assets/_vendor/ace/theme-ambiance.js +1 -2
  347. data/assets/_vendor/ace/theme-chaos.js +1 -2
  348. data/assets/_vendor/ace/theme-chrome.js +1 -2
  349. data/assets/_vendor/ace/theme-clouds.js +1 -2
  350. data/assets/_vendor/ace/theme-clouds_midnight.js +1 -2
  351. data/assets/_vendor/ace/theme-cobalt.js +1 -2
  352. data/assets/_vendor/ace/theme-crimson_editor.js +1 -2
  353. data/assets/_vendor/ace/theme-dawn.js +1 -2
  354. data/assets/_vendor/ace/theme-dracula.js +1 -2
  355. data/assets/_vendor/ace/theme-dreamweaver.js +1 -2
  356. data/assets/_vendor/ace/theme-eclipse.js +1 -2
  357. data/assets/_vendor/ace/theme-github.js +3 -3
  358. data/assets/_vendor/ace/theme-gob.js +1 -2
  359. data/assets/_vendor/ace/theme-gruvbox.js +1 -2
  360. data/assets/_vendor/ace/theme-idle_fingers.js +1 -2
  361. data/assets/_vendor/ace/theme-iplastic.js +1 -2
  362. data/assets/_vendor/ace/theme-katzenmilch.js +1 -2
  363. data/assets/_vendor/ace/theme-kr_theme.js +1 -2
  364. data/assets/_vendor/ace/theme-kuroir.js +1 -2
  365. data/assets/_vendor/ace/theme-merbivore.js +1 -2
  366. data/assets/_vendor/ace/theme-merbivore_soft.js +1 -2
  367. data/assets/_vendor/ace/theme-mono_industrial.js +1 -2
  368. data/assets/_vendor/ace/theme-monokai.js +1 -2
  369. data/assets/_vendor/ace/theme-pastel_on_dark.js +1 -2
  370. data/assets/_vendor/ace/theme-solarized_dark.js +1 -2
  371. data/assets/_vendor/ace/theme-solarized_light.js +1 -2
  372. data/assets/_vendor/ace/theme-sqlserver.js +1 -2
  373. data/assets/_vendor/ace/theme-terminal.js +1 -2
  374. data/assets/_vendor/ace/theme-textmate.js +1 -2
  375. data/assets/_vendor/ace/theme-tomorrow.js +1 -2
  376. data/assets/_vendor/ace/theme-tomorrow_night.js +1 -2
  377. data/assets/_vendor/ace/theme-tomorrow_night_blue.js +1 -2
  378. data/assets/_vendor/ace/theme-tomorrow_night_bright.js +1 -2
  379. data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +1 -2
  380. data/assets/_vendor/ace/theme-twilight.js +1 -2
  381. data/assets/_vendor/ace/theme-vibrant_ink.js +1 -2
  382. data/assets/_vendor/ace/theme-xcode.js +1 -2
  383. data/assets/_vendor/ace/worker-coffee.js +11 -20
  384. data/assets/_vendor/ace/worker-css.js +23 -20
  385. data/assets/_vendor/ace/worker-html.js +25 -31
  386. data/assets/_vendor/ace/worker-javascript.js +76 -36
  387. data/assets/_vendor/ace/worker-json.js +25 -20
  388. data/assets/_vendor/ace/worker-lua.js +68 -69
  389. data/assets/_vendor/ace/worker-php.js +12 -20
  390. data/assets/_vendor/ace/worker-xml.js +12 -22
  391. data/assets/_vendor/ace/worker-xquery.js +44 -12378
  392. data/assets/_vendor/tinymce/plugins/advlist/plugin.js +137 -137
  393. data/assets/_vendor/tinymce/plugins/anchor/plugin.js +102 -102
  394. data/assets/_vendor/tinymce/plugins/autolink/plugin.js +154 -154
  395. data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -145
  396. data/assets/_vendor/tinymce/plugins/autosave/plugin.js +207 -217
  397. data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
  398. data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +89 -89
  399. data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1246 -1246
  400. data/assets/_vendor/tinymce/plugins/code/plugin.js +80 -80
  401. data/assets/_vendor/tinymce/plugins/codesample/plugin.js +852 -852
  402. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +109 -109
  403. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +144 -144
  404. data/assets/_vendor/tinymce/plugins/directionality/plugin.js +53 -53
  405. data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +74 -74
  406. data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +464 -464
  407. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +152 -152
  408. data/assets/_vendor/tinymce/plugins/help/plugin.js +639 -678
  409. data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
  410. data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -29
  411. data/assets/_vendor/tinymce/plugins/image/plugin.js +1119 -1126
  412. data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
  413. data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3414 -3445
  414. data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -1
  415. data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -230
  416. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +152 -152
  417. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +193 -193
  418. data/assets/_vendor/tinymce/plugins/link/plugin.js +646 -646
  419. data/assets/_vendor/tinymce/plugins/lists/plugin.js +2103 -1037
  420. data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
  421. data/assets/_vendor/tinymce/plugins/media/plugin.js +1050 -1050
  422. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +69 -69
  423. data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +98 -98
  424. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +91 -91
  425. data/assets/_vendor/tinymce/plugins/paste/plugin.js +1725 -1364
  426. data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
  427. data/assets/_vendor/tinymce/plugins/preview/plugin.js +107 -107
  428. data/assets/_vendor/tinymce/plugins/print/plugin.js +28 -28
  429. data/assets/_vendor/tinymce/plugins/save/plugin.js +101 -101
  430. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +535 -537
  431. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  432. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +683 -681
  433. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
  434. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +95 -95
  435. data/assets/_vendor/tinymce/plugins/table/plugin.js +8927 -9805
  436. data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -1
  437. data/assets/_vendor/tinymce/plugins/template/plugin.js +305 -311
  438. data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
  439. data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +317 -317
  440. data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +575 -329
  441. data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
  442. data/assets/_vendor/tinymce/plugins/toc/plugin.js +201 -201
  443. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +113 -113
  444. data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +419 -471
  445. data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
  446. data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +371 -308
  447. data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
  448. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  449. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -0
  450. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  451. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  452. data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -1
  453. data/assets/_vendor/tinymce/themes/inlite/theme.js +9272 -9686
  454. data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -1
  455. data/assets/_vendor/tinymce/themes/mobile/theme.js +12130 -13042
  456. data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -1
  457. data/assets/_vendor/tinymce/themes/modern/theme.js +9090 -9504
  458. data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -1
  459. data/assets/_vendor/tinymce/tinymce.js +24914 -25218
  460. data/assets/bedrock/js/bedrock.js +1 -1
  461. data/assets/bedrock/scss/components/no-content.scss +5 -0
  462. data/assets/bedrock/scss/components/select-box.scss +1 -1
  463. data/lib/bedrock_sass.rb +51 -16
  464. data/lib/bedrock_sass/engine.rb +3 -2
  465. data/lib/bedrock_sass/version.rb +1 -1
  466. metadata +17 -7
@@ -1,603 +1,601 @@
1
1
  (function () {
2
2
  var searchreplace = (function () {
3
- 'use strict';
3
+ 'use strict';
4
4
 
5
- var Cell = function (initial) {
6
- var value = initial;
7
- var get = function () {
8
- return value;
9
- };
10
- var set = function (v) {
11
- value = v;
12
- };
13
- var clone = function () {
14
- return Cell(get());
15
- };
16
- return {
17
- get: get,
18
- set: set,
19
- clone: clone
5
+ var Cell = function (initial) {
6
+ var value = initial;
7
+ var get = function () {
8
+ return value;
9
+ };
10
+ var set = function (v) {
11
+ value = v;
12
+ };
13
+ var clone = function () {
14
+ return Cell(get());
15
+ };
16
+ return {
17
+ get: get,
18
+ set: set,
19
+ clone: clone
20
+ };
20
21
  };
21
- };
22
22
 
23
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
23
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
24
24
 
25
- var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
25
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
26
26
 
27
- function isContentEditableFalse(node) {
28
- return node && node.nodeType === 1 && node.contentEditable === 'false';
29
- }
30
- function findAndReplaceDOMText(regex, node, replacementNode, captureGroup, schema) {
31
- var m;
32
- var matches = [];
33
- var text, count = 0, doc;
34
- var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
35
- doc = node.ownerDocument;
36
- blockElementsMap = schema.getBlockElements();
37
- hiddenTextElementsMap = schema.getWhiteSpaceElements();
38
- shortEndedElementsMap = schema.getShortEndedElements();
39
- function getMatchIndexes(m, captureGroup) {
40
- captureGroup = captureGroup || 0;
41
- if (!m[0]) {
42
- throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
43
- }
44
- var index = m.index;
45
- if (captureGroup > 0) {
46
- var cg = m[captureGroup];
47
- if (!cg) {
48
- throw new Error('Invalid capture group');
49
- }
50
- index += m[0].indexOf(cg);
51
- m[0] = cg;
52
- }
53
- return [
54
- index,
55
- index + m[0].length,
56
- [m[0]]
57
- ];
27
+ function isContentEditableFalse(node) {
28
+ return node && node.nodeType === 1 && node.contentEditable === 'false';
58
29
  }
59
- function getText(node) {
60
- var txt;
61
- if (node.nodeType === 3) {
62
- return node.data;
63
- }
64
- if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
65
- return '';
66
- }
67
- txt = '';
68
- if (isContentEditableFalse(node)) {
69
- return '\n';
70
- }
71
- if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
72
- txt += '\n';
30
+ function findAndReplaceDOMText(regex, node, replacementNode, captureGroup, schema) {
31
+ var m;
32
+ var matches = [];
33
+ var text, count = 0, doc;
34
+ var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
35
+ doc = node.ownerDocument;
36
+ blockElementsMap = schema.getBlockElements();
37
+ hiddenTextElementsMap = schema.getWhiteSpaceElements();
38
+ shortEndedElementsMap = schema.getShortEndedElements();
39
+ function getMatchIndexes(m, captureGroup) {
40
+ captureGroup = captureGroup || 0;
41
+ if (!m[0]) {
42
+ throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
43
+ }
44
+ var index = m.index;
45
+ if (captureGroup > 0) {
46
+ var cg = m[captureGroup];
47
+ if (!cg) {
48
+ throw new Error('Invalid capture group');
49
+ }
50
+ index += m[0].indexOf(cg);
51
+ m[0] = cg;
52
+ }
53
+ return [
54
+ index,
55
+ index + m[0].length,
56
+ [m[0]]
57
+ ];
73
58
  }
74
- if (node = node.firstChild) {
75
- do {
76
- txt += getText(node);
77
- } while (node = node.nextSibling);
59
+ function getText(node) {
60
+ var txt;
61
+ if (node.nodeType === 3) {
62
+ return node.data;
63
+ }
64
+ if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
65
+ return '';
66
+ }
67
+ txt = '';
68
+ if (isContentEditableFalse(node)) {
69
+ return '\n';
70
+ }
71
+ if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
72
+ txt += '\n';
73
+ }
74
+ if (node = node.firstChild) {
75
+ do {
76
+ txt += getText(node);
77
+ } while (node = node.nextSibling);
78
+ }
79
+ return txt;
78
80
  }
79
- return txt;
80
- }
81
- function stepThroughMatches(node, matches, replaceFn) {
82
- var startNode, endNode, startNodeIndex, endNodeIndex, innerNodes = [], atIndex = 0, curNode = node, matchLocation = matches.shift(), matchIndex = 0;
83
- out:
84
- while (true) {
85
- if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
86
- atIndex++;
87
- }
88
- if (curNode.nodeType === 3) {
89
- if (!endNode && curNode.length + atIndex >= matchLocation[1]) {
90
- endNode = curNode;
91
- endNodeIndex = matchLocation[1] - atIndex;
92
- } else if (startNode) {
93
- innerNodes.push(curNode);
94
- }
95
- if (!startNode && curNode.length + atIndex > matchLocation[0]) {
96
- startNode = curNode;
97
- startNodeIndex = matchLocation[0] - atIndex;
81
+ function stepThroughMatches(node, matches, replaceFn) {
82
+ var startNode, endNode, startNodeIndex, endNodeIndex, innerNodes = [], atIndex = 0, curNode = node, matchLocation = matches.shift(), matchIndex = 0;
83
+ out:
84
+ while (true) {
85
+ if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
86
+ atIndex++;
98
87
  }
99
- atIndex += curNode.length;
100
- }
101
- if (startNode && endNode) {
102
- curNode = replaceFn({
103
- startNode: startNode,
104
- startNodeIndex: startNodeIndex,
105
- endNode: endNode,
106
- endNodeIndex: endNodeIndex,
107
- innerNodes: innerNodes,
108
- match: matchLocation[2],
109
- matchIndex: matchIndex
110
- });
111
- atIndex -= endNode.length - endNodeIndex;
112
- startNode = null;
113
- endNode = null;
114
- innerNodes = [];
115
- matchLocation = matches.shift();
116
- matchIndex++;
117
- if (!matchLocation) {
118
- break;
88
+ if (curNode.nodeType === 3) {
89
+ if (!endNode && curNode.length + atIndex >= matchLocation[1]) {
90
+ endNode = curNode;
91
+ endNodeIndex = matchLocation[1] - atIndex;
92
+ } else if (startNode) {
93
+ innerNodes.push(curNode);
94
+ }
95
+ if (!startNode && curNode.length + atIndex > matchLocation[0]) {
96
+ startNode = curNode;
97
+ startNodeIndex = matchLocation[0] - atIndex;
98
+ }
99
+ atIndex += curNode.length;
119
100
  }
120
- } else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
121
- if (!isContentEditableFalse(curNode)) {
122
- curNode = curNode.firstChild;
101
+ if (startNode && endNode) {
102
+ curNode = replaceFn({
103
+ startNode: startNode,
104
+ startNodeIndex: startNodeIndex,
105
+ endNode: endNode,
106
+ endNodeIndex: endNodeIndex,
107
+ innerNodes: innerNodes,
108
+ match: matchLocation[2],
109
+ matchIndex: matchIndex
110
+ });
111
+ atIndex -= endNode.length - endNodeIndex;
112
+ startNode = null;
113
+ endNode = null;
114
+ innerNodes = [];
115
+ matchLocation = matches.shift();
116
+ matchIndex++;
117
+ if (!matchLocation) {
118
+ break;
119
+ }
120
+ } else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
121
+ if (!isContentEditableFalse(curNode)) {
122
+ curNode = curNode.firstChild;
123
+ continue;
124
+ }
125
+ } else if (curNode.nextSibling) {
126
+ curNode = curNode.nextSibling;
123
127
  continue;
124
128
  }
125
- } else if (curNode.nextSibling) {
126
- curNode = curNode.nextSibling;
127
- continue;
128
- }
129
- while (true) {
130
- if (curNode.nextSibling) {
131
- curNode = curNode.nextSibling;
132
- break;
133
- } else if (curNode.parentNode !== node) {
134
- curNode = curNode.parentNode;
135
- } else {
136
- break out;
129
+ while (true) {
130
+ if (curNode.nextSibling) {
131
+ curNode = curNode.nextSibling;
132
+ break;
133
+ } else if (curNode.parentNode !== node) {
134
+ curNode = curNode.parentNode;
135
+ } else {
136
+ break out;
137
+ }
137
138
  }
138
139
  }
140
+ }
141
+ function genReplacer(nodeName) {
142
+ var makeReplacementNode;
143
+ if (typeof nodeName !== 'function') {
144
+ var stencilNode_1 = nodeName.nodeType ? nodeName : doc.createElement(nodeName);
145
+ makeReplacementNode = function (fill, matchIndex) {
146
+ var clone = stencilNode_1.cloneNode(false);
147
+ clone.setAttribute('data-mce-index', matchIndex);
148
+ if (fill) {
149
+ clone.appendChild(doc.createTextNode(fill));
150
+ }
151
+ return clone;
152
+ };
153
+ } else {
154
+ makeReplacementNode = nodeName;
139
155
  }
140
- }
141
- function genReplacer(nodeName) {
142
- var makeReplacementNode;
143
- if (typeof nodeName !== 'function') {
144
- var stencilNode_1 = nodeName.nodeType ? nodeName : doc.createElement(nodeName);
145
- makeReplacementNode = function (fill, matchIndex) {
146
- var clone = stencilNode_1.cloneNode(false);
147
- clone.setAttribute('data-mce-index', matchIndex);
148
- if (fill) {
149
- clone.appendChild(doc.createTextNode(fill));
156
+ return function (range) {
157
+ var before;
158
+ var after;
159
+ var parentNode;
160
+ var startNode = range.startNode;
161
+ var endNode = range.endNode;
162
+ var matchIndex = range.matchIndex;
163
+ if (startNode === endNode) {
164
+ var node_1 = startNode;
165
+ parentNode = node_1.parentNode;
166
+ if (range.startNodeIndex > 0) {
167
+ before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
168
+ parentNode.insertBefore(before, node_1);
169
+ }
170
+ var el = makeReplacementNode(range.match[0], matchIndex);
171
+ parentNode.insertBefore(el, node_1);
172
+ if (range.endNodeIndex < node_1.length) {
173
+ after = doc.createTextNode(node_1.data.substring(range.endNodeIndex));
174
+ parentNode.insertBefore(after, node_1);
175
+ }
176
+ node_1.parentNode.removeChild(node_1);
177
+ return el;
178
+ }
179
+ before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
180
+ after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
181
+ var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
182
+ for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
183
+ var innerNode = range.innerNodes[i];
184
+ var innerEl = makeReplacementNode(innerNode.data, matchIndex);
185
+ innerNode.parentNode.replaceChild(innerEl, innerNode);
150
186
  }
151
- return clone;
187
+ var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
188
+ parentNode = startNode.parentNode;
189
+ parentNode.insertBefore(before, startNode);
190
+ parentNode.insertBefore(elA, startNode);
191
+ parentNode.removeChild(startNode);
192
+ parentNode = endNode.parentNode;
193
+ parentNode.insertBefore(elB, endNode);
194
+ parentNode.insertBefore(after, endNode);
195
+ parentNode.removeChild(endNode);
196
+ return elB;
152
197
  };
153
- } else {
154
- makeReplacementNode = nodeName;
155
198
  }
156
- return function (range) {
157
- var before;
158
- var after;
159
- var parentNode;
160
- var startNode = range.startNode;
161
- var endNode = range.endNode;
162
- var matchIndex = range.matchIndex;
163
- if (startNode === endNode) {
164
- var node_1 = startNode;
165
- parentNode = node_1.parentNode;
166
- if (range.startNodeIndex > 0) {
167
- before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
168
- parentNode.insertBefore(before, node_1);
169
- }
170
- var el = makeReplacementNode(range.match[0], matchIndex);
171
- parentNode.insertBefore(el, node_1);
172
- if (range.endNodeIndex < node_1.length) {
173
- after = doc.createTextNode(node_1.data.substring(range.endNodeIndex));
174
- parentNode.insertBefore(after, node_1);
175
- }
176
- node_1.parentNode.removeChild(node_1);
177
- return el;
178
- }
179
- before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
180
- after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
181
- var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
182
- var innerEls = [];
183
- for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
184
- var innerNode = range.innerNodes[i];
185
- var innerEl = makeReplacementNode(innerNode.data, matchIndex);
186
- innerNode.parentNode.replaceChild(innerEl, innerNode);
187
- innerEls.push(innerEl);
199
+ text = getText(node);
200
+ if (!text) {
201
+ return;
202
+ }
203
+ if (regex.global) {
204
+ while (m = regex.exec(text)) {
205
+ matches.push(getMatchIndexes(m, captureGroup));
188
206
  }
189
- var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
190
- parentNode = startNode.parentNode;
191
- parentNode.insertBefore(before, startNode);
192
- parentNode.insertBefore(elA, startNode);
193
- parentNode.removeChild(startNode);
194
- parentNode = endNode.parentNode;
195
- parentNode.insertBefore(elB, endNode);
196
- parentNode.insertBefore(after, endNode);
197
- parentNode.removeChild(endNode);
198
- return elB;
199
- };
200
- }
201
- text = getText(node);
202
- if (!text) {
203
- return;
204
- }
205
- if (regex.global) {
206
- while (m = regex.exec(text)) {
207
+ } else {
208
+ m = text.match(regex);
207
209
  matches.push(getMatchIndexes(m, captureGroup));
208
210
  }
209
- } else {
210
- m = text.match(regex);
211
- matches.push(getMatchIndexes(m, captureGroup));
212
- }
213
- if (matches.length) {
214
- count = matches.length;
215
- stepThroughMatches(node, matches, genReplacer(replacementNode));
211
+ if (matches.length) {
212
+ count = matches.length;
213
+ stepThroughMatches(node, matches, genReplacer(replacementNode));
214
+ }
215
+ return count;
216
216
  }
217
- return count;
218
- }
219
- var $_g9bydlk0jm0ofzvp = { findAndReplaceDOMText: findAndReplaceDOMText };
217
+ var FindReplaceText = { findAndReplaceDOMText: findAndReplaceDOMText };
220
218
 
221
- var getElmIndex = function (elm) {
222
- var value = elm.getAttribute('data-mce-index');
223
- if (typeof value === 'number') {
224
- return '' + value;
225
- }
226
- return value;
227
- };
228
- var markAllMatches = function (editor, currentIndexState, regex) {
229
- var node, marker;
230
- marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
231
- marker.className = 'mce-match-marker';
232
- node = editor.getBody();
233
- done(editor, currentIndexState, false);
234
- return $_g9bydlk0jm0ofzvp.findAndReplaceDOMText(regex, node, marker, false, editor.schema);
235
- };
236
- var unwrap = function (node) {
237
- var parentNode = node.parentNode;
238
- if (node.firstChild) {
239
- parentNode.insertBefore(node.firstChild, node);
240
- }
241
- node.parentNode.removeChild(node);
242
- };
243
- var findSpansByIndex = function (editor, index) {
244
- var nodes;
245
- var spans = [];
246
- nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
247
- if (nodes.length) {
248
- for (var i = 0; i < nodes.length; i++) {
249
- var nodeIndex = getElmIndex(nodes[i]);
250
- if (nodeIndex === null || !nodeIndex.length) {
251
- continue;
252
- }
253
- if (nodeIndex === index.toString()) {
254
- spans.push(nodes[i]);
255
- }
219
+ var getElmIndex = function (elm) {
220
+ var value = elm.getAttribute('data-mce-index');
221
+ if (typeof value === 'number') {
222
+ return '' + value;
256
223
  }
257
- }
258
- return spans;
259
- };
260
- var moveSelection = function (editor, currentIndexState, forward) {
261
- var testIndex = currentIndexState.get();
262
- var dom = editor.dom;
263
- forward = forward !== false;
264
- if (forward) {
265
- testIndex++;
266
- } else {
267
- testIndex--;
268
- }
269
- dom.removeClass(findSpansByIndex(editor, currentIndexState.get()), 'mce-match-marker-selected');
270
- var spans = findSpansByIndex(editor, testIndex);
271
- if (spans.length) {
272
- dom.addClass(findSpansByIndex(editor, testIndex), 'mce-match-marker-selected');
273
- editor.selection.scrollIntoView(spans[0]);
274
- return testIndex;
275
- }
276
- return -1;
277
- };
278
- var removeNode = function (dom, node) {
279
- var parent = node.parentNode;
280
- dom.remove(node);
281
- if (dom.isEmpty(parent)) {
282
- dom.remove(parent);
283
- }
284
- };
285
- var find = function (editor, currentIndexState, text, matchCase, wholeWord) {
286
- text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
287
- text = text.replace(/\s/g, '\\s');
288
- text = wholeWord ? '\\b' + text + '\\b' : text;
289
- var count = markAllMatches(editor, currentIndexState, new RegExp(text, matchCase ? 'g' : 'gi'));
290
- if (count) {
291
- currentIndexState.set(-1);
292
- currentIndexState.set(moveSelection(editor, currentIndexState, true));
293
- }
294
- return count;
295
- };
296
- var next = function (editor, currentIndexState) {
297
- var index = moveSelection(editor, currentIndexState, true);
298
- if (index !== -1) {
299
- currentIndexState.set(index);
300
- }
301
- };
302
- var prev = function (editor, currentIndexState) {
303
- var index = moveSelection(editor, currentIndexState, false);
304
- if (index !== -1) {
305
- currentIndexState.set(index);
306
- }
307
- };
308
- var isMatchSpan = function (node) {
309
- var matchIndex = getElmIndex(node);
310
- return matchIndex !== null && matchIndex.length > 0;
311
- };
312
- var replace = function (editor, currentIndexState, text, forward, all) {
313
- var i, nodes, node, matchIndex, currentMatchIndex, nextIndex = currentIndexState.get(), hasMore;
314
- forward = forward !== false;
315
- node = editor.getBody();
316
- nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
317
- for (i = 0; i < nodes.length; i++) {
318
- var nodeIndex = getElmIndex(nodes[i]);
319
- matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
320
- if (all || matchIndex === currentIndexState.get()) {
321
- if (text.length) {
322
- nodes[i].firstChild.nodeValue = text;
323
- unwrap(nodes[i]);
324
- } else {
325
- removeNode(editor.dom, nodes[i]);
224
+ return value;
225
+ };
226
+ var markAllMatches = function (editor, currentIndexState, regex) {
227
+ var node, marker;
228
+ marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
229
+ marker.className = 'mce-match-marker';
230
+ node = editor.getBody();
231
+ done(editor, currentIndexState, false);
232
+ return FindReplaceText.findAndReplaceDOMText(regex, node, marker, false, editor.schema);
233
+ };
234
+ var unwrap = function (node) {
235
+ var parentNode = node.parentNode;
236
+ if (node.firstChild) {
237
+ parentNode.insertBefore(node.firstChild, node);
238
+ }
239
+ node.parentNode.removeChild(node);
240
+ };
241
+ var findSpansByIndex = function (editor, index) {
242
+ var nodes;
243
+ var spans = [];
244
+ nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
245
+ if (nodes.length) {
246
+ for (var i = 0; i < nodes.length; i++) {
247
+ var nodeIndex = getElmIndex(nodes[i]);
248
+ if (nodeIndex === null || !nodeIndex.length) {
249
+ continue;
250
+ }
251
+ if (nodeIndex === index.toString()) {
252
+ spans.push(nodes[i]);
253
+ }
326
254
  }
327
- while (nodes[++i]) {
328
- matchIndex = parseInt(getElmIndex(nodes[i]), 10);
329
- if (matchIndex === currentMatchIndex) {
330
- removeNode(editor.dom, nodes[i]);
255
+ }
256
+ return spans;
257
+ };
258
+ var moveSelection = function (editor, currentIndexState, forward) {
259
+ var testIndex = currentIndexState.get();
260
+ var dom = editor.dom;
261
+ forward = forward !== false;
262
+ if (forward) {
263
+ testIndex++;
264
+ } else {
265
+ testIndex--;
266
+ }
267
+ dom.removeClass(findSpansByIndex(editor, currentIndexState.get()), 'mce-match-marker-selected');
268
+ var spans = findSpansByIndex(editor, testIndex);
269
+ if (spans.length) {
270
+ dom.addClass(findSpansByIndex(editor, testIndex), 'mce-match-marker-selected');
271
+ editor.selection.scrollIntoView(spans[0]);
272
+ return testIndex;
273
+ }
274
+ return -1;
275
+ };
276
+ var removeNode = function (dom, node) {
277
+ var parent = node.parentNode;
278
+ dom.remove(node);
279
+ if (dom.isEmpty(parent)) {
280
+ dom.remove(parent);
281
+ }
282
+ };
283
+ var find = function (editor, currentIndexState, text, matchCase, wholeWord) {
284
+ text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
285
+ text = text.replace(/\s/g, '[^\\S\\r\\n]');
286
+ text = wholeWord ? '\\b' + text + '\\b' : text;
287
+ var count = markAllMatches(editor, currentIndexState, new RegExp(text, matchCase ? 'g' : 'gi'));
288
+ if (count) {
289
+ currentIndexState.set(-1);
290
+ currentIndexState.set(moveSelection(editor, currentIndexState, true));
291
+ }
292
+ return count;
293
+ };
294
+ var next = function (editor, currentIndexState) {
295
+ var index = moveSelection(editor, currentIndexState, true);
296
+ if (index !== -1) {
297
+ currentIndexState.set(index);
298
+ }
299
+ };
300
+ var prev = function (editor, currentIndexState) {
301
+ var index = moveSelection(editor, currentIndexState, false);
302
+ if (index !== -1) {
303
+ currentIndexState.set(index);
304
+ }
305
+ };
306
+ var isMatchSpan = function (node) {
307
+ var matchIndex = getElmIndex(node);
308
+ return matchIndex !== null && matchIndex.length > 0;
309
+ };
310
+ var replace = function (editor, currentIndexState, text, forward, all) {
311
+ var i, nodes, node, matchIndex, currentMatchIndex, nextIndex = currentIndexState.get(), hasMore;
312
+ forward = forward !== false;
313
+ node = editor.getBody();
314
+ nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
315
+ for (i = 0; i < nodes.length; i++) {
316
+ var nodeIndex = getElmIndex(nodes[i]);
317
+ matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
318
+ if (all || matchIndex === currentIndexState.get()) {
319
+ if (text.length) {
320
+ nodes[i].firstChild.nodeValue = text;
321
+ unwrap(nodes[i]);
331
322
  } else {
332
- i--;
333
- break;
323
+ removeNode(editor.dom, nodes[i]);
334
324
  }
325
+ while (nodes[++i]) {
326
+ matchIndex = parseInt(getElmIndex(nodes[i]), 10);
327
+ if (matchIndex === currentMatchIndex) {
328
+ removeNode(editor.dom, nodes[i]);
329
+ } else {
330
+ i--;
331
+ break;
332
+ }
333
+ }
334
+ if (forward) {
335
+ nextIndex--;
336
+ }
337
+ } else if (currentMatchIndex > currentIndexState.get()) {
338
+ nodes[i].setAttribute('data-mce-index', currentMatchIndex - 1);
335
339
  }
336
- if (forward) {
337
- nextIndex--;
338
- }
339
- } else if (currentMatchIndex > currentIndexState.get()) {
340
- nodes[i].setAttribute('data-mce-index', currentMatchIndex - 1);
341
340
  }
342
- }
343
- currentIndexState.set(nextIndex);
344
- if (forward) {
345
- hasMore = hasNext(editor, currentIndexState);
346
- next(editor, currentIndexState);
347
- } else {
348
- hasMore = hasPrev(editor, currentIndexState);
349
- prev(editor, currentIndexState);
350
- }
351
- return !all && hasMore;
352
- };
353
- var done = function (editor, currentIndexState, keepEditorSelection) {
354
- var i, nodes, startContainer, endContainer;
355
- nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
356
- for (i = 0; i < nodes.length; i++) {
357
- var nodeIndex = getElmIndex(nodes[i]);
358
- if (nodeIndex !== null && nodeIndex.length) {
359
- if (nodeIndex === currentIndexState.get().toString()) {
360
- if (!startContainer) {
361
- startContainer = nodes[i].firstChild;
341
+ currentIndexState.set(nextIndex);
342
+ if (forward) {
343
+ hasMore = hasNext(editor, currentIndexState);
344
+ next(editor, currentIndexState);
345
+ } else {
346
+ hasMore = hasPrev(editor, currentIndexState);
347
+ prev(editor, currentIndexState);
348
+ }
349
+ return !all && hasMore;
350
+ };
351
+ var done = function (editor, currentIndexState, keepEditorSelection) {
352
+ var i, nodes, startContainer, endContainer;
353
+ nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
354
+ for (i = 0; i < nodes.length; i++) {
355
+ var nodeIndex = getElmIndex(nodes[i]);
356
+ if (nodeIndex !== null && nodeIndex.length) {
357
+ if (nodeIndex === currentIndexState.get().toString()) {
358
+ if (!startContainer) {
359
+ startContainer = nodes[i].firstChild;
360
+ }
361
+ endContainer = nodes[i].firstChild;
362
362
  }
363
- endContainer = nodes[i].firstChild;
363
+ unwrap(nodes[i]);
364
364
  }
365
- unwrap(nodes[i]);
366
365
  }
367
- }
368
- if (startContainer && endContainer) {
369
- var rng = editor.dom.createRng();
370
- rng.setStart(startContainer, 0);
371
- rng.setEnd(endContainer, endContainer.data.length);
372
- if (keepEditorSelection !== false) {
373
- editor.selection.setRng(rng);
366
+ if (startContainer && endContainer) {
367
+ var rng = editor.dom.createRng();
368
+ rng.setStart(startContainer, 0);
369
+ rng.setEnd(endContainer, endContainer.data.length);
370
+ if (keepEditorSelection !== false) {
371
+ editor.selection.setRng(rng);
372
+ }
373
+ return rng;
374
374
  }
375
- return rng;
376
- }
377
- };
378
- var hasNext = function (editor, currentIndexState) {
379
- return findSpansByIndex(editor, currentIndexState.get() + 1).length > 0;
380
- };
381
- var hasPrev = function (editor, currentIndexState) {
382
- return findSpansByIndex(editor, currentIndexState.get() - 1).length > 0;
383
- };
384
- var $_czmqpkjyjm0ofzvi = {
385
- done: done,
386
- find: find,
387
- next: next,
388
- prev: prev,
389
- replace: replace,
390
- hasNext: hasNext,
391
- hasPrev: hasPrev
392
- };
393
-
394
- var get = function (editor, currentIndexState) {
395
- var done = function (keepEditorSelection) {
396
- return $_czmqpkjyjm0ofzvi.done(editor, currentIndexState, keepEditorSelection);
397
- };
398
- var find = function (text, matchCase, wholeWord) {
399
- return $_czmqpkjyjm0ofzvi.find(editor, currentIndexState, text, matchCase, wholeWord);
400
- };
401
- var next = function () {
402
- return $_czmqpkjyjm0ofzvi.next(editor, currentIndexState);
403
375
  };
404
- var prev = function () {
405
- return $_czmqpkjyjm0ofzvi.prev(editor, currentIndexState);
376
+ var hasNext = function (editor, currentIndexState) {
377
+ return findSpansByIndex(editor, currentIndexState.get() + 1).length > 0;
406
378
  };
407
- var replace = function (text, forward, all) {
408
- return $_czmqpkjyjm0ofzvi.replace(editor, currentIndexState, text, forward, all);
379
+ var hasPrev = function (editor, currentIndexState) {
380
+ return findSpansByIndex(editor, currentIndexState.get() - 1).length > 0;
409
381
  };
410
- return {
382
+ var Actions = {
411
383
  done: done,
412
384
  find: find,
413
385
  next: next,
414
386
  prev: prev,
415
- replace: replace
387
+ replace: replace,
388
+ hasNext: hasNext,
389
+ hasPrev: hasPrev
416
390
  };
417
- };
418
- var $_nqujjxjm0ofzvg = { get: get };
419
391
 
420
- var open = function (editor, currentIndexState) {
421
- var last = {}, selectedText;
422
- editor.undoManager.add();
423
- selectedText = global$1.trim(editor.selection.getContent({ format: 'text' }));
424
- function updateButtonStates() {
425
- win.statusbar.find('#next').disabled($_czmqpkjyjm0ofzvi.hasNext(editor, currentIndexState) === false);
426
- win.statusbar.find('#prev').disabled($_czmqpkjyjm0ofzvi.hasPrev(editor, currentIndexState) === false);
427
- }
428
- function notFoundAlert() {
429
- editor.windowManager.alert('Could not find the specified string.', function () {
430
- win.find('#find')[0].focus();
431
- });
432
- }
433
- var win = editor.windowManager.open({
434
- layout: 'flex',
435
- pack: 'center',
436
- align: 'center',
437
- onClose: function () {
438
- editor.focus();
439
- $_czmqpkjyjm0ofzvi.done(editor, currentIndexState);
440
- editor.undoManager.add();
441
- },
442
- onSubmit: function (e) {
443
- var count, caseState, text, wholeWord;
444
- e.preventDefault();
445
- caseState = win.find('#case').checked();
446
- wholeWord = win.find('#words').checked();
447
- text = win.find('#find').value();
448
- if (!text.length) {
449
- $_czmqpkjyjm0ofzvi.done(editor, currentIndexState, false);
450
- win.statusbar.items().slice(1).disabled(true);
451
- return;
452
- }
453
- if (last.text === text && last.caseState === caseState && last.wholeWord === wholeWord) {
454
- if (!$_czmqpkjyjm0ofzvi.hasNext(editor, currentIndexState)) {
455
- notFoundAlert();
456
- return;
457
- }
458
- $_czmqpkjyjm0ofzvi.next(editor, currentIndexState);
459
- updateButtonStates();
460
- return;
461
- }
462
- count = $_czmqpkjyjm0ofzvi.find(editor, currentIndexState, text, caseState, wholeWord);
463
- if (!count) {
464
- notFoundAlert();
465
- }
466
- win.statusbar.items().slice(1).disabled(count === 0);
467
- updateButtonStates();
468
- last = {
469
- text: text,
470
- caseState: caseState,
471
- wholeWord: wholeWord
472
- };
473
- },
474
- buttons: [
475
- {
476
- text: 'Find',
477
- subtype: 'primary',
478
- onclick: function () {
479
- win.submit();
480
- }
481
- },
482
- {
483
- text: 'Replace',
484
- disabled: true,
485
- onclick: function () {
486
- if (!$_czmqpkjyjm0ofzvi.replace(editor, currentIndexState, win.find('#replace').value())) {
487
- win.statusbar.items().slice(1).disabled(true);
488
- currentIndexState.set(-1);
489
- last = {};
490
- }
491
- }
392
+ var get = function (editor, currentIndexState) {
393
+ var done = function (keepEditorSelection) {
394
+ return Actions.done(editor, currentIndexState, keepEditorSelection);
395
+ };
396
+ var find = function (text, matchCase, wholeWord) {
397
+ return Actions.find(editor, currentIndexState, text, matchCase, wholeWord);
398
+ };
399
+ var next = function () {
400
+ return Actions.next(editor, currentIndexState);
401
+ };
402
+ var prev = function () {
403
+ return Actions.prev(editor, currentIndexState);
404
+ };
405
+ var replace = function (text, forward, all) {
406
+ return Actions.replace(editor, currentIndexState, text, forward, all);
407
+ };
408
+ return {
409
+ done: done,
410
+ find: find,
411
+ next: next,
412
+ prev: prev,
413
+ replace: replace
414
+ };
415
+ };
416
+ var Api = { get: get };
417
+
418
+ var open = function (editor, currentIndexState) {
419
+ var last = {}, selectedText;
420
+ editor.undoManager.add();
421
+ selectedText = global$1.trim(editor.selection.getContent({ format: 'text' }));
422
+ function updateButtonStates() {
423
+ win.statusbar.find('#next').disabled(Actions.hasNext(editor, currentIndexState) === false);
424
+ win.statusbar.find('#prev').disabled(Actions.hasPrev(editor, currentIndexState) === false);
425
+ }
426
+ function notFoundAlert() {
427
+ editor.windowManager.alert('Could not find the specified string.', function () {
428
+ win.find('#find')[0].focus();
429
+ });
430
+ }
431
+ var win = editor.windowManager.open({
432
+ layout: 'flex',
433
+ pack: 'center',
434
+ align: 'center',
435
+ onClose: function () {
436
+ editor.focus();
437
+ Actions.done(editor, currentIndexState);
438
+ editor.undoManager.add();
492
439
  },
493
- {
494
- text: 'Replace all',
495
- disabled: true,
496
- onclick: function () {
497
- $_czmqpkjyjm0ofzvi.replace(editor, currentIndexState, win.find('#replace').value(), true, true);
440
+ onSubmit: function (e) {
441
+ var count, caseState, text, wholeWord;
442
+ e.preventDefault();
443
+ caseState = win.find('#case').checked();
444
+ wholeWord = win.find('#words').checked();
445
+ text = win.find('#find').value();
446
+ if (!text.length) {
447
+ Actions.done(editor, currentIndexState, false);
498
448
  win.statusbar.items().slice(1).disabled(true);
499
- last = {};
449
+ return;
500
450
  }
501
- },
502
- {
503
- type: 'spacer',
504
- flex: 1
505
- },
506
- {
507
- text: 'Prev',
508
- name: 'prev',
509
- disabled: true,
510
- onclick: function () {
511
- $_czmqpkjyjm0ofzvi.prev(editor, currentIndexState);
451
+ if (last.text === text && last.caseState === caseState && last.wholeWord === wholeWord) {
452
+ if (!Actions.hasNext(editor, currentIndexState)) {
453
+ notFoundAlert();
454
+ return;
455
+ }
456
+ Actions.next(editor, currentIndexState);
512
457
  updateButtonStates();
458
+ return;
513
459
  }
514
- },
515
- {
516
- text: 'Next',
517
- name: 'next',
518
- disabled: true,
519
- onclick: function () {
520
- $_czmqpkjyjm0ofzvi.next(editor, currentIndexState);
521
- updateButtonStates();
460
+ count = Actions.find(editor, currentIndexState, text, caseState, wholeWord);
461
+ if (!count) {
462
+ notFoundAlert();
522
463
  }
523
- }
524
- ],
525
- title: 'Find and replace',
526
- items: {
527
- type: 'form',
528
- padding: 20,
529
- labelGap: 30,
530
- spacing: 10,
531
- items: [
464
+ win.statusbar.items().slice(1).disabled(count === 0);
465
+ updateButtonStates();
466
+ last = {
467
+ text: text,
468
+ caseState: caseState,
469
+ wholeWord: wholeWord
470
+ };
471
+ },
472
+ buttons: [
473
+ {
474
+ text: 'Find',
475
+ subtype: 'primary',
476
+ onclick: function () {
477
+ win.submit();
478
+ }
479
+ },
480
+ {
481
+ text: 'Replace',
482
+ disabled: true,
483
+ onclick: function () {
484
+ if (!Actions.replace(editor, currentIndexState, win.find('#replace').value())) {
485
+ win.statusbar.items().slice(1).disabled(true);
486
+ currentIndexState.set(-1);
487
+ last = {};
488
+ }
489
+ }
490
+ },
532
491
  {
533
- type: 'textbox',
534
- name: 'find',
535
- size: 40,
536
- label: 'Find',
537
- value: selectedText
492
+ text: 'Replace all',
493
+ disabled: true,
494
+ onclick: function () {
495
+ Actions.replace(editor, currentIndexState, win.find('#replace').value(), true, true);
496
+ win.statusbar.items().slice(1).disabled(true);
497
+ last = {};
498
+ }
538
499
  },
539
500
  {
540
- type: 'textbox',
541
- name: 'replace',
542
- size: 40,
543
- label: 'Replace with'
501
+ type: 'spacer',
502
+ flex: 1
544
503
  },
545
504
  {
546
- type: 'checkbox',
547
- name: 'case',
548
- text: 'Match case',
549
- label: ' '
505
+ text: 'Prev',
506
+ name: 'prev',
507
+ disabled: true,
508
+ onclick: function () {
509
+ Actions.prev(editor, currentIndexState);
510
+ updateButtonStates();
511
+ }
550
512
  },
551
513
  {
552
- type: 'checkbox',
553
- name: 'words',
554
- text: 'Whole words',
555
- label: ' '
514
+ text: 'Next',
515
+ name: 'next',
516
+ disabled: true,
517
+ onclick: function () {
518
+ Actions.next(editor, currentIndexState);
519
+ updateButtonStates();
520
+ }
556
521
  }
557
- ]
558
- }
559
- });
560
- };
561
- var $_aq7glrk2jm0ofzvv = { open: open };
522
+ ],
523
+ title: 'Find and replace',
524
+ items: {
525
+ type: 'form',
526
+ padding: 20,
527
+ labelGap: 30,
528
+ spacing: 10,
529
+ items: [
530
+ {
531
+ type: 'textbox',
532
+ name: 'find',
533
+ size: 40,
534
+ label: 'Find',
535
+ value: selectedText
536
+ },
537
+ {
538
+ type: 'textbox',
539
+ name: 'replace',
540
+ size: 40,
541
+ label: 'Replace with'
542
+ },
543
+ {
544
+ type: 'checkbox',
545
+ name: 'case',
546
+ text: 'Match case',
547
+ label: ' '
548
+ },
549
+ {
550
+ type: 'checkbox',
551
+ name: 'words',
552
+ text: 'Whole words',
553
+ label: ' '
554
+ }
555
+ ]
556
+ }
557
+ });
558
+ };
559
+ var Dialog = { open: open };
562
560
 
563
- var register = function (editor, currentIndexState) {
564
- editor.addCommand('SearchReplace', function () {
565
- $_aq7glrk2jm0ofzvv.open(editor, currentIndexState);
566
- });
567
- };
568
- var $_624vfk1jm0ofzvt = { register: register };
561
+ var register = function (editor, currentIndexState) {
562
+ editor.addCommand('SearchReplace', function () {
563
+ Dialog.open(editor, currentIndexState);
564
+ });
565
+ };
566
+ var Commands = { register: register };
569
567
 
570
- var showDialog = function (editor, currentIndexState) {
571
- return function () {
572
- $_aq7glrk2jm0ofzvv.open(editor, currentIndexState);
568
+ var showDialog = function (editor, currentIndexState) {
569
+ return function () {
570
+ Dialog.open(editor, currentIndexState);
571
+ };
573
572
  };
574
- };
575
- var register$1 = function (editor, currentIndexState) {
576
- editor.addMenuItem('searchreplace', {
577
- text: 'Find and replace',
578
- shortcut: 'Meta+F',
579
- onclick: showDialog(editor, currentIndexState),
580
- separator: 'before',
581
- context: 'edit'
582
- });
583
- editor.addButton('searchreplace', {
584
- tooltip: 'Find and replace',
585
- onclick: showDialog(editor, currentIndexState)
586
- });
587
- editor.shortcuts.add('Meta+F', '', showDialog(editor, currentIndexState));
588
- };
589
- var $_d1nvw7k3jm0ofzvz = { register: register$1 };
573
+ var register$1 = function (editor, currentIndexState) {
574
+ editor.addMenuItem('searchreplace', {
575
+ text: 'Find and replace',
576
+ shortcut: 'Meta+F',
577
+ onclick: showDialog(editor, currentIndexState),
578
+ separator: 'before',
579
+ context: 'edit'
580
+ });
581
+ editor.addButton('searchreplace', {
582
+ tooltip: 'Find and replace',
583
+ onclick: showDialog(editor, currentIndexState)
584
+ });
585
+ editor.shortcuts.add('Meta+F', '', showDialog(editor, currentIndexState));
586
+ };
587
+ var Buttons = { register: register$1 };
590
588
 
591
- global.add('searchreplace', function (editor) {
592
- var currentIndexState = Cell(-1);
593
- $_624vfk1jm0ofzvt.register(editor, currentIndexState);
594
- $_d1nvw7k3jm0ofzvz.register(editor, currentIndexState);
595
- return $_nqujjxjm0ofzvg.get(editor, currentIndexState);
596
- });
597
- function Plugin () {
598
- }
589
+ global.add('searchreplace', function (editor) {
590
+ var currentIndexState = Cell(-1);
591
+ Commands.register(editor, currentIndexState);
592
+ Buttons.register(editor, currentIndexState);
593
+ return Api.get(editor, currentIndexState);
594
+ });
595
+ function Plugin () {
596
+ }
599
597
 
600
- return Plugin;
598
+ return Plugin;
601
599
 
602
600
  }());
603
601
  })();