bedrock_sass 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (534) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -5
  3. data/assets/_vendor/ace/ace.js +21635 -0
  4. data/assets/_vendor/ace/ext-beautify.js +318 -0
  5. data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +277 -0
  6. data/assets/_vendor/ace/ext-emmet.js +1226 -0
  7. data/assets/_vendor/ace/ext-error_marker.js +10 -0
  8. data/assets/_vendor/ace/ext-keybinding_menu.js +189 -0
  9. data/assets/_vendor/ace/ext-language_tools.js +1997 -0
  10. data/assets/_vendor/ace/ext-linking.js +65 -0
  11. data/assets/_vendor/ace/ext-modelist.js +228 -0
  12. data/assets/_vendor/ace/ext-options.js +750 -0
  13. data/assets/_vendor/ace/ext-rtl.js +110 -0
  14. data/assets/_vendor/ace/ext-searchbox.js +512 -0
  15. data/assets/_vendor/ace/ext-settings_menu.js +771 -0
  16. data/assets/_vendor/ace/ext-spellcheck.js +75 -0
  17. data/assets/_vendor/ace/ext-split.js +208 -0
  18. data/assets/_vendor/ace/ext-static_highlight.js +226 -0
  19. data/assets/_vendor/ace/ext-statusbar.js +57 -0
  20. data/assets/_vendor/ace/ext-textarea.js +567 -0
  21. data/assets/_vendor/ace/ext-themelist.js +67 -0
  22. data/assets/_vendor/ace/ext-whitespace.js +210 -0
  23. data/assets/_vendor/ace/keybinding-emacs.js +1165 -0
  24. data/assets/_vendor/ace/keybinding-vim.js +5673 -0
  25. data/assets/_vendor/ace/mode-abap.js +222 -0
  26. data/assets/_vendor/ace/mode-abc.js +267 -0
  27. data/assets/_vendor/ace/mode-actionscript.js +274 -0
  28. data/assets/_vendor/ace/mode-ada.js +138 -0
  29. data/assets/_vendor/ace/mode-apache_conf.js +363 -0
  30. data/assets/_vendor/ace/mode-applescript.js +279 -0
  31. data/assets/_vendor/ace/mode-asciidoc.js +349 -0
  32. data/assets/_vendor/ace/mode-asl.js +422 -0
  33. data/assets/_vendor/ace/mode-assembly_x86.js +193 -0
  34. data/assets/_vendor/ace/mode-autohotkey.js +243 -0
  35. data/assets/_vendor/ace/mode-batchfile.js +230 -0
  36. data/assets/_vendor/ace/mode-bro.js +334 -0
  37. data/assets/_vendor/ace/mode-c9search.js +294 -0
  38. data/assets/_vendor/ace/mode-c_cpp.js +502 -0
  39. data/assets/_vendor/ace/mode-cirru.js +211 -0
  40. data/assets/_vendor/ace/mode-clojure.js +314 -0
  41. data/assets/_vendor/ace/mode-cobol.js +102 -0
  42. data/assets/_vendor/ace/mode-coffee.js +400 -0
  43. data/assets/_vendor/ace/mode-coldfusion.js +2596 -0
  44. data/assets/_vendor/ace/mode-csharp.js +502 -0
  45. data/assets/_vendor/ace/mode-csound_document.js +3749 -0
  46. data/assets/_vendor/ace/mode-csound_orchestra.js +2687 -0
  47. data/assets/_vendor/ace/mode-csound_score.js +454 -0
  48. data/assets/_vendor/ace/mode-csp.js +60 -0
  49. data/assets/_vendor/ace/mode-css.js +723 -0
  50. data/assets/_vendor/ace/mode-curly.js +2564 -0
  51. data/assets/_vendor/ace/mode-d.js +520 -0
  52. data/assets/_vendor/ace/mode-dart.js +703 -0
  53. data/assets/_vendor/ace/mode-diff.js +146 -0
  54. data/assets/_vendor/ace/mode-django.js +2594 -0
  55. data/assets/_vendor/ace/mode-dockerfile.js +498 -0
  56. data/assets/_vendor/ace/mode-dot.js +418 -0
  57. data/assets/_vendor/ace/mode-drools.js +496 -0
  58. data/assets/_vendor/ace/mode-edifact.js +165 -0
  59. data/assets/_vendor/ace/mode-eiffel.js +136 -0
  60. data/assets/_vendor/ace/mode-ejs.js +3026 -0
  61. data/assets/_vendor/ace/mode-elixir.js +501 -0
  62. data/assets/_vendor/ace/mode-elm.js +307 -0
  63. data/assets/_vendor/ace/mode-erlang.js +1009 -0
  64. data/assets/_vendor/ace/mode-forth.js +297 -0
  65. data/assets/_vendor/ace/mode-fortran.js +431 -0
  66. data/assets/_vendor/ace/mode-fsharp.js +314 -0
  67. data/assets/_vendor/ace/mode-ftl.js +1192 -0
  68. data/assets/_vendor/ace/mode-gcode.js +94 -0
  69. data/assets/_vendor/ace/mode-gherkin.js +172 -0
  70. data/assets/_vendor/ace/mode-gitignore.js +60 -0
  71. data/assets/_vendor/ace/mode-glsl.js +579 -0
  72. data/assets/_vendor/ace/mode-gobstones.js +929 -0
  73. data/assets/_vendor/ace/mode-golang.js +414 -0
  74. data/assets/_vendor/ace/mode-graphqlschema.js +214 -0
  75. data/assets/_vendor/ace/mode-groovy.js +986 -0
  76. data/assets/_vendor/ace/mode-haml.js +1555 -0
  77. data/assets/_vendor/ace/mode-handlebars.js +2622 -0
  78. data/assets/_vendor/ace/mode-haskell.js +379 -0
  79. data/assets/_vendor/ace/mode-haskell_cabal.js +142 -0
  80. data/assets/_vendor/ace/mode-haxe.js +386 -0
  81. data/assets/_vendor/ace/mode-hjson.js +353 -0
  82. data/assets/_vendor/ace/mode-html.js +2509 -0
  83. data/assets/_vendor/ace/mode-html_elixir.js +3087 -0
  84. data/assets/_vendor/ace/mode-html_ruby.js +3043 -0
  85. data/assets/_vendor/ace/mode-ini.js +163 -0
  86. data/assets/_vendor/ace/mode-io.js +253 -0
  87. data/assets/_vendor/ace/mode-jack.js +347 -0
  88. data/assets/_vendor/ace/mode-jade.js +2126 -0
  89. data/assets/_vendor/ace/mode-java.js +975 -0
  90. data/assets/_vendor/ace/mode-javascript.js +797 -0
  91. data/assets/_vendor/ace/mode-json.js +327 -0
  92. data/assets/_vendor/ace/mode-jsoniq.js +4940 -0
  93. data/assets/_vendor/ace/mode-jsp.js +1430 -0
  94. data/assets/_vendor/ace/mode-jssm.js +325 -0
  95. data/assets/_vendor/ace/mode-jsx.js +412 -0
  96. data/assets/_vendor/ace/mode-julia.js +303 -0
  97. data/assets/_vendor/ace/mode-kotlin.js +795 -0
  98. data/assets/_vendor/ace/mode-latex.js +297 -0
  99. data/assets/_vendor/ace/mode-less.js +841 -0
  100. data/assets/_vendor/ace/mode-liquid.js +1193 -0
  101. data/assets/_vendor/ace/mode-lisp.js +112 -0
  102. data/assets/_vendor/ace/mode-livescript.js +280 -0
  103. data/assets/_vendor/ace/mode-logiql.js +317 -0
  104. data/assets/_vendor/ace/mode-lsl.js +343 -0
  105. data/assets/_vendor/ace/mode-lua.js +432 -0
  106. data/assets/_vendor/ace/mode-luapage.js +3007 -0
  107. data/assets/_vendor/ace/mode-lucene.js +87 -0
  108. data/assets/_vendor/ace/mode-makefile.js +410 -0
  109. data/assets/_vendor/ace/mode-markdown.js +3189 -0
  110. data/assets/_vendor/ace/mode-mask.js +1802 -0
  111. data/assets/_vendor/ace/mode-matlab.js +264 -0
  112. data/assets/_vendor/ace/mode-maze.js +291 -0
  113. data/assets/_vendor/ace/mode-mel.js +263 -0
  114. data/assets/_vendor/ace/mode-mixal.js +123 -0
  115. data/assets/_vendor/ace/mode-mushcode.js +681 -0
  116. data/assets/_vendor/ace/mode-mysql.js +168 -0
  117. data/assets/_vendor/ace/mode-nix.js +646 -0
  118. data/assets/_vendor/ace/mode-nsis.js +312 -0
  119. data/assets/_vendor/ace/mode-objectivec.js +739 -0
  120. data/assets/_vendor/ace/mode-ocaml.js +422 -0
  121. data/assets/_vendor/ace/mode-pascal.js +205 -0
  122. data/assets/_vendor/ace/mode-perl.js +380 -0
  123. data/assets/_vendor/ace/mode-pgsql.js +1508 -0
  124. data/assets/_vendor/ace/mode-php.js +13088 -0
  125. data/assets/_vendor/ace/mode-php_laravel_blade.js +13289 -0
  126. data/assets/_vendor/ace/mode-pig.js +310 -0
  127. data/assets/_vendor/ace/mode-plain_text.js +33 -0
  128. data/assets/_vendor/ace/mode-powershell.js +418 -0
  129. data/assets/_vendor/ace/mode-praat.js +478 -0
  130. data/assets/_vendor/ace/mode-prolog.js +371 -0
  131. data/assets/_vendor/ace/mode-properties.js +81 -0
  132. data/assets/_vendor/ace/mode-protobuf.js +592 -0
  133. data/assets/_vendor/ace/mode-puppet.js +370 -0
  134. data/assets/_vendor/ace/mode-python.js +273 -0
  135. data/assets/_vendor/ace/mode-r.js +310 -0
  136. data/assets/_vendor/ace/mode-razor.js +2869 -0
  137. data/assets/_vendor/ace/mode-rdoc.js +243 -0
  138. data/assets/_vendor/ace/mode-red.js +450 -0
  139. data/assets/_vendor/ace/mode-redshift.js +361 -0
  140. data/assets/_vendor/ace/mode-rhtml.js +2806 -0
  141. data/assets/_vendor/ace/mode-rst.js +257 -0
  142. data/assets/_vendor/ace/mode-ruby.js +497 -0
  143. data/assets/_vendor/ace/mode-rust.js +279 -0
  144. data/assets/_vendor/ace/mode-sass.js +441 -0
  145. data/assets/_vendor/ace/mode-scad.js +414 -0
  146. data/assets/_vendor/ace/mode-scala.js +982 -0
  147. data/assets/_vendor/ace/mode-scheme.js +232 -0
  148. data/assets/_vendor/ace/mode-scss.js +606 -0
  149. data/assets/_vendor/ace/mode-sh.js +447 -0
  150. data/assets/_vendor/ace/mode-sjs.js +1014 -0
  151. data/assets/_vendor/ace/mode-slim.js +4736 -0
  152. data/assets/_vendor/ace/mode-smarty.js +2635 -0
  153. data/assets/_vendor/ace/mode-snippets.js +207 -0
  154. data/assets/_vendor/ace/mode-soy_template.js +2847 -0
  155. data/assets/_vendor/ace/mode-space.js +168 -0
  156. data/assets/_vendor/ace/mode-sparql.js +320 -0
  157. data/assets/_vendor/ace/mode-sql.js +111 -0
  158. data/assets/_vendor/ace/mode-sqlserver.js +444 -0
  159. data/assets/_vendor/ace/mode-stylus.js +471 -0
  160. data/assets/_vendor/ace/mode-svg.js +1581 -0
  161. data/assets/_vendor/ace/mode-swift.js +390 -0
  162. data/assets/_vendor/ace/mode-tcl.js +383 -0
  163. data/assets/_vendor/ace/mode-terraform.js +398 -0
  164. data/assets/_vendor/ace/mode-tex.js +159 -0
  165. data/assets/_vendor/ace/mode-text.js +10 -0
  166. data/assets/_vendor/ace/mode-textile.js +150 -0
  167. data/assets/_vendor/ace/mode-toml.js +154 -0
  168. data/assets/_vendor/ace/mode-tsx.js +887 -0
  169. data/assets/_vendor/ace/mode-turtle.js +296 -0
  170. data/assets/_vendor/ace/mode-twig.js +2693 -0
  171. data/assets/_vendor/ace/mode-typescript.js +868 -0
  172. data/assets/_vendor/ace/mode-vala.js +676 -0
  173. data/assets/_vendor/ace/mode-vbscript.js +207 -0
  174. data/assets/_vendor/ace/mode-velocity.js +2790 -0
  175. data/assets/_vendor/ace/mode-verilog.js +119 -0
  176. data/assets/_vendor/ace/mode-vhdl.js +118 -0
  177. data/assets/_vendor/ace/mode-wollok.js +911 -0
  178. data/assets/_vendor/ace/mode-xml.js +677 -0
  179. data/assets/_vendor/ace/mode-xquery.js +4922 -0
  180. data/assets/_vendor/ace/mode-yaml.js +300 -0
  181. data/assets/_vendor/ace/snippets/abap.js +15 -0
  182. data/assets/_vendor/ace/snippets/abc.js +46 -0
  183. data/assets/_vendor/ace/snippets/actionscript.js +172 -0
  184. data/assets/_vendor/ace/snippets/ada.js +15 -0
  185. data/assets/_vendor/ace/snippets/apache_conf.js +15 -0
  186. data/assets/_vendor/ace/snippets/applescript.js +15 -0
  187. data/assets/_vendor/ace/snippets/asciidoc.js +15 -0
  188. data/assets/_vendor/ace/snippets/asl.js +14 -0
  189. data/assets/_vendor/ace/snippets/assembly_x86.js +15 -0
  190. data/assets/_vendor/ace/snippets/autohotkey.js +15 -0
  191. data/assets/_vendor/ace/snippets/batchfile.js +15 -0
  192. data/assets/_vendor/ace/snippets/bro.js +15 -0
  193. data/assets/_vendor/ace/snippets/c9search.js +15 -0
  194. data/assets/_vendor/ace/snippets/c_cpp.js +146 -0
  195. data/assets/_vendor/ace/snippets/cirru.js +15 -0
  196. data/assets/_vendor/ace/snippets/clojure.js +105 -0
  197. data/assets/_vendor/ace/snippets/cobol.js +15 -0
  198. data/assets/_vendor/ace/snippets/coffee.js +110 -0
  199. data/assets/_vendor/ace/snippets/coldfusion.js +15 -0
  200. data/assets/_vendor/ace/snippets/csharp.js +15 -0
  201. data/assets/_vendor/ace/snippets/csound_document.js +25 -0
  202. data/assets/_vendor/ace/snippets/csound_orchestra.js +62 -0
  203. data/assets/_vendor/ace/snippets/csound_score.js +15 -0
  204. data/assets/_vendor/ace/snippets/csp.js +15 -0
  205. data/assets/_vendor/ace/snippets/css.js +982 -0
  206. data/assets/_vendor/ace/snippets/curly.js +15 -0
  207. data/assets/_vendor/ace/snippets/d.js +15 -0
  208. data/assets/_vendor/ace/snippets/dart.js +98 -0
  209. data/assets/_vendor/ace/snippets/diff.js +26 -0
  210. data/assets/_vendor/ace/snippets/django.js +123 -0
  211. data/assets/_vendor/ace/snippets/dockerfile.js +15 -0
  212. data/assets/_vendor/ace/snippets/dot.js +15 -0
  213. data/assets/_vendor/ace/snippets/drools.js +34 -0
  214. data/assets/_vendor/ace/snippets/edifact.js +255 -0
  215. data/assets/_vendor/ace/snippets/eiffel.js +15 -0
  216. data/assets/_vendor/ace/snippets/ejs.js +15 -0
  217. data/assets/_vendor/ace/snippets/elixir.js +15 -0
  218. data/assets/_vendor/ace/snippets/elm.js +15 -0
  219. data/assets/_vendor/ace/snippets/erlang.js +175 -0
  220. data/assets/_vendor/ace/snippets/forth.js +15 -0
  221. data/assets/_vendor/ace/snippets/fortran.js +15 -0
  222. data/assets/_vendor/ace/snippets/fsharp.js +15 -0
  223. data/assets/_vendor/ace/snippets/ftl.js +15 -0
  224. data/assets/_vendor/ace/snippets/gcode.js +15 -0
  225. data/assets/_vendor/ace/snippets/gherkin.js +15 -0
  226. data/assets/_vendor/ace/snippets/gitignore.js +15 -0
  227. data/assets/_vendor/ace/snippets/glsl.js +15 -0
  228. data/assets/_vendor/ace/snippets/gobstones.js +49 -0
  229. data/assets/_vendor/ace/snippets/golang.js +15 -0
  230. data/assets/_vendor/ace/snippets/graphqlschema.js +47 -0
  231. data/assets/_vendor/ace/snippets/groovy.js +15 -0
  232. data/assets/_vendor/ace/snippets/haml.js +35 -0
  233. data/assets/_vendor/ace/snippets/handlebars.js +15 -0
  234. data/assets/_vendor/ace/snippets/haskell.js +97 -0
  235. data/assets/_vendor/ace/snippets/haskell_cabal.js +15 -0
  236. data/assets/_vendor/ace/snippets/haxe.js +15 -0
  237. data/assets/_vendor/ace/snippets/hjson.js +15 -0
  238. data/assets/_vendor/ace/snippets/html.js +870 -0
  239. data/assets/_vendor/ace/snippets/html_elixir.js +15 -0
  240. data/assets/_vendor/ace/snippets/html_ruby.js +15 -0
  241. data/assets/_vendor/ace/snippets/ini.js +15 -0
  242. data/assets/_vendor/ace/snippets/io.js +77 -0
  243. data/assets/_vendor/ace/snippets/jack.js +15 -0
  244. data/assets/_vendor/ace/snippets/jade.js +15 -0
  245. data/assets/_vendor/ace/snippets/java.js +255 -0
  246. data/assets/_vendor/ace/snippets/javascript.js +210 -0
  247. data/assets/_vendor/ace/snippets/json.js +15 -0
  248. data/assets/_vendor/ace/snippets/jsoniq.js +76 -0
  249. data/assets/_vendor/ace/snippets/jsp.js +114 -0
  250. data/assets/_vendor/ace/snippets/jssm.js +15 -0
  251. data/assets/_vendor/ace/snippets/jsx.js +15 -0
  252. data/assets/_vendor/ace/snippets/julia.js +15 -0
  253. data/assets/_vendor/ace/snippets/kotlin.js +15 -0
  254. data/assets/_vendor/ace/snippets/latex.js +15 -0
  255. data/assets/_vendor/ace/snippets/less.js +15 -0
  256. data/assets/_vendor/ace/snippets/liquid.js +15 -0
  257. data/assets/_vendor/ace/snippets/lisp.js +15 -0
  258. data/assets/_vendor/ace/snippets/livescript.js +15 -0
  259. data/assets/_vendor/ace/snippets/logiql.js +15 -0
  260. data/assets/_vendor/ace/snippets/lsl.js +1247 -0
  261. data/assets/_vendor/ace/snippets/lua.js +36 -0
  262. data/assets/_vendor/ace/snippets/luapage.js +15 -0
  263. data/assets/_vendor/ace/snippets/lucene.js +15 -0
  264. data/assets/_vendor/ace/snippets/makefile.js +19 -0
  265. data/assets/_vendor/ace/snippets/markdown.js +103 -0
  266. data/assets/_vendor/ace/snippets/mask.js +15 -0
  267. data/assets/_vendor/ace/snippets/matlab.js +15 -0
  268. data/assets/_vendor/ace/snippets/maze.js +24 -0
  269. data/assets/_vendor/ace/snippets/mel.js +15 -0
  270. data/assets/_vendor/ace/snippets/mixal.js +15 -0
  271. data/assets/_vendor/ace/snippets/mushcode.js +15 -0
  272. data/assets/_vendor/ace/snippets/mysql.js +15 -0
  273. data/assets/_vendor/ace/snippets/nix.js +15 -0
  274. data/assets/_vendor/ace/snippets/nsis.js +15 -0
  275. data/assets/_vendor/ace/snippets/objectivec.js +15 -0
  276. data/assets/_vendor/ace/snippets/ocaml.js +15 -0
  277. data/assets/_vendor/ace/snippets/pascal.js +15 -0
  278. data/assets/_vendor/ace/snippets/perl.js +362 -0
  279. data/assets/_vendor/ace/snippets/pgsql.js +15 -0
  280. data/assets/_vendor/ace/snippets/php.js +398 -0
  281. data/assets/_vendor/ace/snippets/php_laravel_blade.js +15 -0
  282. data/assets/_vendor/ace/snippets/pig.js +15 -0
  283. data/assets/_vendor/ace/snippets/plain_text.js +15 -0
  284. data/assets/_vendor/ace/snippets/powershell.js +15 -0
  285. data/assets/_vendor/ace/snippets/praat.js +15 -0
  286. data/assets/_vendor/ace/snippets/prolog.js +15 -0
  287. data/assets/_vendor/ace/snippets/properties.js +15 -0
  288. data/assets/_vendor/ace/snippets/protobuf.js +15 -0
  289. data/assets/_vendor/ace/snippets/puppet.js +15 -0
  290. data/assets/_vendor/ace/snippets/python.js +173 -0
  291. data/assets/_vendor/ace/snippets/r.js +136 -0
  292. data/assets/_vendor/ace/snippets/razor.js +18 -0
  293. data/assets/_vendor/ace/snippets/rdoc.js +15 -0
  294. data/assets/_vendor/ace/snippets/red.js +15 -0
  295. data/assets/_vendor/ace/snippets/redshift.js +15 -0
  296. data/assets/_vendor/ace/snippets/rhtml.js +15 -0
  297. data/assets/_vendor/ace/snippets/rst.js +37 -0
  298. data/assets/_vendor/ace/snippets/ruby.js +943 -0
  299. data/assets/_vendor/ace/snippets/rust.js +15 -0
  300. data/assets/_vendor/ace/snippets/sass.js +15 -0
  301. data/assets/_vendor/ace/snippets/scad.js +15 -0
  302. data/assets/_vendor/ace/snippets/scala.js +15 -0
  303. data/assets/_vendor/ace/snippets/scheme.js +15 -0
  304. data/assets/_vendor/ace/snippets/scss.js +15 -0
  305. data/assets/_vendor/ace/snippets/sh.js +98 -0
  306. data/assets/_vendor/ace/snippets/sjs.js +15 -0
  307. data/assets/_vendor/ace/snippets/slim.js +15 -0
  308. data/assets/_vendor/ace/snippets/smarty.js +15 -0
  309. data/assets/_vendor/ace/snippets/snippets.js +24 -0
  310. data/assets/_vendor/ace/snippets/soy_template.js +15 -0
  311. data/assets/_vendor/ace/snippets/space.js +15 -0
  312. data/assets/_vendor/ace/snippets/sparql.js +15 -0
  313. data/assets/_vendor/ace/snippets/sql.js +41 -0
  314. data/assets/_vendor/ace/snippets/sqlserver.js +84 -0
  315. data/assets/_vendor/ace/snippets/stylus.js +15 -0
  316. data/assets/_vendor/ace/snippets/svg.js +15 -0
  317. data/assets/_vendor/ace/snippets/swift.js +15 -0
  318. data/assets/_vendor/ace/snippets/tcl.js +107 -0
  319. data/assets/_vendor/ace/snippets/terraform.js +15 -0
  320. data/assets/_vendor/ace/snippets/tex.js +205 -0
  321. data/assets/_vendor/ace/snippets/text.js +15 -0
  322. data/assets/_vendor/ace/snippets/textile.js +45 -0
  323. data/assets/_vendor/ace/snippets/toml.js +15 -0
  324. data/assets/_vendor/ace/snippets/tsx.js +15 -0
  325. data/assets/_vendor/ace/snippets/turtle.js +15 -0
  326. data/assets/_vendor/ace/snippets/twig.js +15 -0
  327. data/assets/_vendor/ace/snippets/typescript.js +15 -0
  328. data/assets/_vendor/ace/snippets/vala.js +201 -0
  329. data/assets/_vendor/ace/snippets/vbscript.js +15 -0
  330. data/assets/_vendor/ace/snippets/velocity.js +44 -0
  331. data/assets/_vendor/ace/snippets/verilog.js +15 -0
  332. data/assets/_vendor/ace/snippets/vhdl.js +15 -0
  333. data/assets/_vendor/ace/snippets/wollok.js +99 -0
  334. data/assets/_vendor/ace/snippets/xml.js +15 -0
  335. data/assets/_vendor/ace/snippets/xquery.js +76 -0
  336. data/assets/_vendor/ace/snippets/yaml.js +15 -0
  337. data/assets/_vendor/ace/theme-ambiance.js +185 -0
  338. data/assets/_vendor/ace/theme-chaos.js +164 -0
  339. data/assets/_vendor/ace/theme-chrome.js +136 -0
  340. data/assets/_vendor/ace/theme-clouds.js +103 -0
  341. data/assets/_vendor/ace/theme-clouds_midnight.js +104 -0
  342. data/assets/_vendor/ace/theme-cobalt.js +121 -0
  343. data/assets/_vendor/ace/theme-crimson_editor.js +126 -0
  344. data/assets/_vendor/ace/theme-dawn.js +116 -0
  345. data/assets/_vendor/ace/theme-dracula.js +136 -0
  346. data/assets/_vendor/ace/theme-dreamweaver.js +149 -0
  347. data/assets/_vendor/ace/theme-eclipse.js +106 -0
  348. data/assets/_vendor/ace/theme-github.js +110 -0
  349. data/assets/_vendor/ace/theme-gob.js +120 -0
  350. data/assets/_vendor/ace/theme-gruvbox.js +90 -0
  351. data/assets/_vendor/ace/theme-idle_fingers.js +104 -0
  352. data/assets/_vendor/ace/theme-iplastic.js +129 -0
  353. data/assets/_vendor/ace/theme-katzenmilch.js +129 -0
  354. data/assets/_vendor/ace/theme-kr_theme.js +112 -0
  355. data/assets/_vendor/ace/theme-kuroir.js +69 -0
  356. data/assets/_vendor/ace/theme-merbivore.js +103 -0
  357. data/assets/_vendor/ace/theme-merbivore_soft.js +104 -0
  358. data/assets/_vendor/ace/theme-mono_industrial.js +115 -0
  359. data/assets/_vendor/ace/theme-monokai.js +113 -0
  360. data/assets/_vendor/ace/theme-pastel_on_dark.js +116 -0
  361. data/assets/_vendor/ace/theme-solarized_dark.js +96 -0
  362. data/assets/_vendor/ace/theme-solarized_light.js +99 -0
  363. data/assets/_vendor/ace/theme-sqlserver.js +146 -0
  364. data/assets/_vendor/ace/theme-terminal.js +122 -0
  365. data/assets/_vendor/ace/theme-textmate.js +138 -0
  366. data/assets/_vendor/ace/theme-tomorrow.js +116 -0
  367. data/assets/_vendor/ace/theme-tomorrow_night.js +116 -0
  368. data/assets/_vendor/ace/theme-tomorrow_night_blue.js +114 -0
  369. data/assets/_vendor/ace/theme-tomorrow_night_bright.js +129 -0
  370. data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +116 -0
  371. data/assets/_vendor/ace/theme-twilight.js +117 -0
  372. data/assets/_vendor/ace/theme-vibrant_ink.js +102 -0
  373. data/assets/_vendor/ace/theme-xcode.js +96 -0
  374. data/assets/_vendor/ace/worker-coffee.js +2165 -0
  375. data/assets/_vendor/ace/worker-css.js +8764 -0
  376. data/assets/_vendor/ace/worker-html.js +11614 -0
  377. data/assets/_vendor/ace/worker-javascript.js +12491 -0
  378. data/assets/_vendor/ace/worker-json.js +2396 -0
  379. data/assets/_vendor/ace/worker-lua.js +3637 -0
  380. data/assets/_vendor/ace/worker-php.js +4313 -0
  381. data/assets/_vendor/ace/worker-xml.js +3899 -0
  382. data/assets/_vendor/ace/worker-xquery.js +70688 -0
  383. data/assets/_vendor/motion-ui/_settings.scss +1 -0
  384. data/assets/_vendor/motion-ui/effects/_fade.scss +1 -4
  385. data/assets/_vendor/motion-ui/effects/_hinge.scss +4 -3
  386. data/assets/_vendor/motion-ui/effects/_shake.scss +1 -1
  387. data/assets/_vendor/motion-ui/effects/_slide.scss +4 -3
  388. data/assets/_vendor/motion-ui/effects/_spin.scss +4 -3
  389. data/assets/_vendor/motion-ui/effects/_wiggle.scss +1 -1
  390. data/assets/_vendor/motion-ui/effects/_zoom.scss +2 -2
  391. data/assets/_vendor/motion-ui/motion-ui.scss +2 -0
  392. data/assets/_vendor/motion-ui/transitions/_fade.scss +6 -4
  393. data/assets/_vendor/motion-ui/transitions/_hinge.scss +3 -2
  394. data/assets/_vendor/motion-ui/transitions/_slide.scss +3 -2
  395. data/assets/_vendor/motion-ui/transitions/_spin.scss +2 -1
  396. data/assets/_vendor/motion-ui/transitions/_zoom.scss +6 -4
  397. data/assets/_vendor/motion-ui/util/_animation.scss +1 -1
  398. data/assets/_vendor/motion-ui/util/_args.scss +2 -2
  399. data/assets/_vendor/motion-ui/util/_function.scss +94 -0
  400. data/assets/_vendor/motion-ui/util/_keyframe.scss +5 -5
  401. data/assets/_vendor/motion-ui/util/_series.scss +20 -17
  402. data/assets/_vendor/motion-ui/util/_string.scss +36 -0
  403. data/assets/_vendor/tinymce/plugins/advlist/plugin.js +136 -404
  404. data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -1
  405. data/assets/_vendor/tinymce/plugins/anchor/plugin.js +103 -323
  406. data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -1
  407. data/assets/_vendor/tinymce/plugins/autolink/plugin.js +153 -377
  408. data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -1
  409. data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -427
  410. data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -1
  411. data/assets/_vendor/tinymce/plugins/autosave/plugin.js +197 -579
  412. data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
  413. data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +88 -251
  414. data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -1
  415. data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1243 -818
  416. data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -1
  417. data/assets/_vendor/tinymce/plugins/code/plugin.js +82 -326
  418. data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -1
  419. data/assets/_vendor/tinymce/plugins/codesample/plugin.js +829 -1444
  420. data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -1
  421. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +111 -257
  422. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -1
  423. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +141 -469
  424. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -1
  425. data/assets/_vendor/tinymce/plugins/directionality/plugin.js +57 -261
  426. data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -1
  427. data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +78 -247
  428. data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -1
  429. data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +463 -906
  430. data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -1
  431. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +149 -427
  432. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  433. data/assets/_vendor/tinymce/plugins/help/plugin.js +634 -1434
  434. data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
  435. data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -185
  436. data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -1
  437. data/assets/_vendor/tinymce/plugins/image/plugin.js +1147 -1508
  438. data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
  439. data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3319 -4079
  440. data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -2
  441. data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -543
  442. data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -1
  443. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +151 -460
  444. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
  445. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +204 -379
  446. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -1
  447. data/assets/_vendor/tinymce/plugins/link/plugin.js +644 -1162
  448. data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -1
  449. data/assets/_vendor/tinymce/plugins/lists/plugin.js +1005 -1875
  450. data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
  451. data/assets/_vendor/tinymce/plugins/media/plugin.js +1066 -1926
  452. data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -1
  453. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +70 -298
  454. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -1
  455. data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +96 -294
  456. data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -1
  457. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +92 -337
  458. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -1
  459. data/assets/_vendor/tinymce/plugins/paste/plugin.js +1363 -2801
  460. data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
  461. data/assets/_vendor/tinymce/plugins/preview/plugin.js +106 -393
  462. data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -1
  463. data/assets/_vendor/tinymce/plugins/print/plugin.js +29 -185
  464. data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -1
  465. data/assets/_vendor/tinymce/plugins/save/plugin.js +100 -350
  466. data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -1
  467. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +491 -865
  468. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  469. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +630 -1292
  470. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
  471. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +96 -391
  472. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -1
  473. data/assets/_vendor/tinymce/plugins/table/plugin.js +9537 -14920
  474. data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -5
  475. data/assets/_vendor/tinymce/plugins/template/plugin.js +309 -771
  476. data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
  477. data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +319 -592
  478. data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -1
  479. data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +326 -674
  480. data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
  481. data/assets/_vendor/tinymce/plugins/toc/plugin.js +199 -530
  482. data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -1
  483. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +112 -436
  484. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -1
  485. data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +428 -1248
  486. data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
  487. data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +307 -699
  488. data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
  489. data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -1
  490. data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -1
  491. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  492. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -1
  493. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  494. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  495. data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -1
  496. data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +1 -1
  497. data/assets/_vendor/tinymce/themes/inlite/theme.js +9693 -18245
  498. data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -5
  499. data/assets/_vendor/tinymce/themes/mobile/theme.js +12629 -22467
  500. data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -8
  501. data/assets/_vendor/tinymce/themes/modern/theme.js +9510 -17780
  502. data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -5
  503. data/assets/_vendor/tinymce/tinymce.js +25087 -42606
  504. data/assets/_vendor/yoastseo/css/_icons.scss +7 -7
  505. data/assets/_vendor/yoastseo/css/_snippet-editor.scss +1 -1
  506. data/assets/bedrock/js/bedrock.js +1 -71697
  507. data/assets/bedrock/scss/_bedrock-components.scss +20 -0
  508. data/assets/bedrock/scss/_bedrock-settings.scss +12 -4
  509. data/assets/bedrock/scss/_foundation-settings.scss +4 -2
  510. data/assets/bedrock/scss/components/ace-editor.scss +21 -0
  511. data/assets/bedrock/scss/components/attachments-grid.scss +18 -15
  512. data/assets/bedrock/scss/components/date-picker.scss +146 -0
  513. data/assets/bedrock/scss/components/dropzone-upload.scss +7 -0
  514. data/assets/bedrock/scss/components/file-input.scss +7 -0
  515. data/assets/bedrock/scss/components/file-preview.scss +36 -0
  516. data/assets/bedrock/scss/components/frame-embed.scss +23 -0
  517. data/assets/bedrock/scss/components/global.scss +27 -0
  518. data/assets/bedrock/scss/components/helper-classes.scss +1 -0
  519. data/assets/bedrock/scss/components/icon-box.scss +38 -0
  520. data/assets/bedrock/scss/components/item-list.scss +66 -0
  521. data/assets/bedrock/scss/components/lists.scss +58 -0
  522. data/assets/bedrock/scss/components/off-canvas-menu.scss +27 -15
  523. data/assets/bedrock/scss/components/place-autocomplete.scss +90 -0
  524. data/assets/bedrock/scss/components/rrule-generator.scss +102 -0
  525. data/assets/bedrock/scss/components/rrule-reveal.scss +14 -0
  526. data/assets/bedrock/scss/components/select-box.scss +1 -0
  527. data/assets/bedrock/scss/components/seo-analysis.scss +5 -0
  528. data/assets/bedrock/scss/components/textarea.scss +14 -2
  529. data/assets/bedrock/scss/components/tiny-mce-editor.scss +5 -16
  530. data/lib/bedrock_sass.rb +5 -0
  531. data/lib/bedrock_sass/version.rb +1 -1
  532. data/lib/tasks/before_assets_precompile.rake +1 -0
  533. metadata +395 -4
  534. data/CODE_OF_CONDUCT.md +0 -74
@@ -1 +1 @@
1
- !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};g("1",[],function(){var a=function(b){var c=b,d=function(){return c},e=function(a){c=a},f=function(){return a(d())};return{get:d,set:e,clone:f}};return a}),h("6",tinymce.util.Tools.resolve),g("2",["6"],function(a){return a("tinymce.PluginManager")}),g("9",[],function(){var a=function(a,b){a.fire("VisualBlocks",{state:b})};return{fireVisualBlocks:a}}),g("8",[],function(){var a=function(a){return a.getParam("visualblocks_default_state",!1)},b=function(a){return a.settings.visualblocks_content_css};return{isEnabledByDefault:a,getContentCss:b}}),g("b",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("c",["6"],function(a){return a("tinymce.util.Tools")}),g("a",["b","c"],function(a,b){var c=a.DOM.uniqueId(),d=function(d,e){var f=b.toArray(d.getElementsByTagName("link")),g=b.grep(f,function(a){return a.id===c});if(0===g.length){var h=a.DOM.create("link",{id:c,rel:"stylesheet",href:e});d.getElementsByTagName("head")[0].appendChild(h)}};return{load:d}}),g("7",["9","8","a"],function(a,b,c){var d=function(d,e,f){var g=d.dom,h=b.getContentCss(d);c.load(d.getDoc(),h?h:e+"/css/visualblocks.css"),g.toggleClass(d.getBody(),"mce-visualblocks"),f.set(!f.get()),a.fireVisualBlocks(d,f.get())};return{toggleVisualBlocks:d}}),g("3",["7"],function(a){var b=function(b,c,d){b.addCommand("mceVisualBlocks",function(){a.toggleVisualBlocks(b,c,d)})};return{register:b}}),g("4",["8","7"],function(a,b){var c=function(c,d,e){c.on("PreviewFormats AfterPreviewFormats",function(a){e.get()&&c.dom.toggleClass(c.getBody(),"mce-visualblocks","afterpreviewformats"===a.type)}),c.on("init",function(){a.isEnabledByDefault(c)&&b.toggleVisualBlocks(c,d,e)}),c.on("remove",function(){c.dom.removeClass(c.getBody(),"mce-visualblocks")})};return{setup:c}}),g("5",["7"],function(a){var b=function(a,b){return function(c){var d=c.control;d.active(b.get()),a.on("VisualBlocks",function(a){d.active(a.state)})}},c=function(a,c){a.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:b(a,c)}),a.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:b(a,c),selectable:!0,context:"view",prependToContext:!0})};return{register:c}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return b.add("visualblocks",function(b,f){var g=a(!1);c.register(b,f,g),e.register(b,g),d.setup(b,f,g)}),function(){}}),d("0")()}();
1
+ !function(){"use strict";var o=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return o(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){e.fire("VisualBlocks",{state:t})},s=function(e){return e.getParam("visualblocks_default_state",!1)},c=function(e){return e.settings.visualblocks_content_css},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=l.DOM.uniqueId(),r=function(e,t){var n=u.toArray(e.getElementsByTagName("link"));if(0===u.grep(n,function(e){return e.id===a}).length){var o=l.DOM.create("link",{id:a,rel:"stylesheet",href:t});e.getElementsByTagName("head")[0].appendChild(o)}},m=function(e,t,n){var o=e.dom,s=c(e);r(e.getDoc(),s||t+"/css/visualblocks.css"),o.toggleClass(e.getBody(),"mce-visualblocks"),n.set(!n.get()),i(e,n.get())},f=function(e,t,n){e.addCommand("mceVisualBlocks",function(){m(e,t,n)})},d=function(t,e,n){t.on("PreviewFormats AfterPreviewFormats",function(e){n.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===e.type)}),t.on("init",function(){s(t)&&m(t,e,n)}),t.on("remove",function(){t.dom.removeClass(t.getBody(),"mce-visualblocks")})},n=function(n,o){return function(e){var t=e.control;t.active(o.get()),n.on("VisualBlocks",function(e){t.active(e.state)})}},v=function(e,t){e.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n(e,t)}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n(e,t),selectable:!0,context:"view",prependToContext:!0})};e.add("visualblocks",function(e,t){var n=o(!1);f(e,t,n),v(e,n),d(e,t,n)})}();
@@ -1,1325 +1,505 @@
1
1
  (function () {
2
+ var visualchars = (function () {
3
+ 'use strict';
2
4
 
3
- var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
4
-
5
- // Used when there is no 'main' module.
6
- // The name is probably (hopefully) unique so minification removes for releases.
7
- var register_3795 = function (id) {
8
- var module = dem(id);
9
- var fragments = id.split('.');
10
- var target = Function('return this;')();
11
- for (var i = 0; i < fragments.length - 1; ++i) {
12
- if (target[fragments[i]] === undefined)
13
- target[fragments[i]] = {};
14
- target = target[fragments[i]];
15
- }
16
- target[fragments[fragments.length - 1]] = module;
17
- };
18
-
19
- var instantiate = function (id) {
20
- var actual = defs[id];
21
- var dependencies = actual.deps;
22
- var definition = actual.defn;
23
- var len = dependencies.length;
24
- var instances = new Array(len);
25
- for (var i = 0; i < len; ++i)
26
- instances[i] = dem(dependencies[i]);
27
- var defResult = definition.apply(null, instances);
28
- if (defResult === undefined)
29
- throw 'module [' + id + '] returned undefined';
30
- actual.instance = defResult;
31
- };
32
-
33
- var def = function (id, dependencies, definition) {
34
- if (typeof id !== 'string')
35
- throw 'module id must be a string';
36
- else if (dependencies === undefined)
37
- throw 'no dependencies for ' + id;
38
- else if (definition === undefined)
39
- throw 'no definition function for ' + id;
40
- defs[id] = {
41
- deps: dependencies,
42
- defn: definition,
43
- instance: undefined
44
- };
45
- };
46
-
47
- var dem = function (id) {
48
- var actual = defs[id];
49
- if (actual === undefined)
50
- throw 'module [' + id + '] was undefined';
51
- else if (actual.instance === undefined)
52
- instantiate(id);
53
- return actual.instance;
54
- };
55
-
56
- var req = function (ids, callback) {
57
- var len = ids.length;
58
- var instances = new Array(len);
59
- for (var i = 0; i < len; ++i)
60
- instances[i] = dem(ids[i]);
61
- callback.apply(null, instances);
62
- };
63
-
64
- var ephox = {};
65
-
66
- ephox.bolt = {
67
- module: {
68
- api: {
69
- define: def,
70
- require: req,
71
- demand: dem
72
- }
73
- }
74
- };
75
-
76
- var define = def;
77
- var require = req;
78
- var demand = dem;
79
- // this helps with minification when using a lot of global references
80
- var defineGlobal = function (id, ref) {
81
- define(id, [], function () { return ref; });
82
- };
83
- /*jsc
84
- ["tinymce.plugins.visualchars.Plugin","ephox.katamari.api.Cell","tinymce.core.PluginManager","tinymce.plugins.visualchars.api.Api","tinymce.plugins.visualchars.api.Commands","tinymce.plugins.visualchars.core.Keyboard","tinymce.plugins.visualchars.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.visualchars.core.Actions","tinymce.core.util.Delay","tinymce.plugins.visualchars.core.VisualChars","tinymce.plugins.visualchars.api.Events","tinymce.plugins.visualchars.core.Data","tinymce.plugins.visualchars.core.Nodes","ephox.katamari.api.Arr","ephox.sugar.api.node.Element","ephox.sugar.api.node.Node","ephox.katamari.api.Option","global!Array","global!Error","global!String","ephox.katamari.api.Fun","global!console","global!document","ephox.sugar.api.node.NodeTypes","tinymce.plugins.visualchars.core.Html","global!Object"]
85
- jsc*/
86
- define(
87
- 'ephox.katamari.api.Cell',
88
-
89
- [
90
- ],
91
-
92
- function () {
93
- var Cell = function (initial) {
94
- var value = initial;
95
-
96
- var get = function () {
97
- return value;
98
- };
99
-
100
- var set = function (v) {
101
- value = v;
102
- };
103
-
104
- var clone = function () {
105
- return Cell(get());
106
- };
107
-
108
- return {
109
- get: get,
110
- set: set,
111
- clone: clone
112
- };
113
- };
114
-
115
- return Cell;
116
- }
117
- );
118
-
119
- defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
120
- /**
121
- * ResolveGlobal.js
122
- *
123
- * Released under LGPL License.
124
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
125
- *
126
- * License: http://www.tinymce.com/license
127
- * Contributing: http://www.tinymce.com/contributing
128
- */
129
-
130
- define(
131
- 'tinymce.core.PluginManager',
132
- [
133
- 'global!tinymce.util.Tools.resolve'
134
- ],
135
- function (resolve) {
136
- return resolve('tinymce.PluginManager');
137
- }
138
- );
139
-
140
- /**
141
- * Api.js
142
- *
143
- * Released under LGPL License.
144
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
145
- *
146
- * License: http://www.tinymce.com/license
147
- * Contributing: http://www.tinymce.com/contributing
148
- */
149
-
150
- define(
151
- 'tinymce.plugins.visualchars.api.Api',
152
- [
153
- ],
154
- function () {
155
- var get = function (toggleState) {
156
- var isEnabled = function () {
157
- return toggleState.get();
158
- };
159
-
160
- return {
161
- isEnabled: isEnabled
162
- };
5
+ var Cell = function (initial) {
6
+ var value = initial;
7
+ var get = function () {
8
+ return value;
163
9
  };
164
-
165
- return {
166
- get: get
10
+ var set = function (v) {
11
+ value = v;
167
12
  };
168
- }
169
- );
170
- /**
171
- * Events.js
172
- *
173
- * Released under LGPL License.
174
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
175
- *
176
- * License: http://www.tinymce.com/license
177
- * Contributing: http://www.tinymce.com/contributing
178
- */
179
-
180
- define(
181
- 'tinymce.plugins.visualchars.api.Events',
182
- [
183
- ],
184
- function () {
185
- var fireVisualChars = function (editor, state) {
186
- return editor.fire('VisualChars', { state: state });
13
+ var clone = function () {
14
+ return Cell(get());
187
15
  };
188
-
189
16
  return {
190
- fireVisualChars: fireVisualChars
191
- };
192
- }
193
- );
194
- /**
195
- * Data.js
196
- *
197
- * Released under LGPL License.
198
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
199
- *
200
- * License: http://www.tinymce.com/license
201
- * Contributing: http://www.tinymce.com/contributing
202
- */
203
-
204
- define(
205
- 'tinymce.plugins.visualchars.core.Data',
206
- [
207
- ],
208
- function () {
209
- var charMap = {
210
- '\u00a0': 'nbsp',
211
- '\u00ad': 'shy'
17
+ get: get,
18
+ set: set,
19
+ clone: clone
212
20
  };
21
+ };
213
22
 
214
- var charMapToRegExp = function (charMap, global) {
215
- var key, regExp = '';
216
-
217
- for (key in charMap) {
218
- regExp += key;
219
- }
23
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
220
24
 
221
- return new RegExp('[' + regExp + ']', global ? 'g' : '');
25
+ var get = function (toggleState) {
26
+ var isEnabled = function () {
27
+ return toggleState.get();
222
28
  };
29
+ return { isEnabled: isEnabled };
30
+ };
31
+ var $_91givrssjm0og28e = { get: get };
223
32
 
224
- var charMapToSelector = function (charMap) {
225
- var key, selector = '';
33
+ var fireVisualChars = function (editor, state) {
34
+ return editor.fire('VisualChars', { state: state });
35
+ };
36
+ var $_bdr3mcsvjm0og28h = { fireVisualChars: fireVisualChars };
226
37
 
227
- for (key in charMap) {
228
- if (selector) {
229
- selector += ',';
230
- }
231
- selector += 'span.mce-' + charMap[key];
38
+ var charMap = {
39
+ '\xA0': 'nbsp',
40
+ '\xAD': 'shy'
41
+ };
42
+ var charMapToRegExp = function (charMap, global) {
43
+ var key, regExp = '';
44
+ for (key in charMap) {
45
+ regExp += key;
46
+ }
47
+ return new RegExp('[' + regExp + ']', global ? 'g' : '');
48
+ };
49
+ var charMapToSelector = function (charMap) {
50
+ var key, selector = '';
51
+ for (key in charMap) {
52
+ if (selector) {
53
+ selector += ',';
232
54
  }
55
+ selector += 'span.mce-' + charMap[key];
56
+ }
57
+ return selector;
58
+ };
59
+ var $_aa0v31sxjm0og28p = {
60
+ charMap: charMap,
61
+ regExp: charMapToRegExp(charMap),
62
+ regExpGlobal: charMapToRegExp(charMap, true),
63
+ selector: charMapToSelector(charMap),
64
+ charMapToRegExp: charMapToRegExp,
65
+ charMapToSelector: charMapToSelector
66
+ };
233
67
 
234
- return selector;
235
- };
236
-
237
- return {
238
- charMap: charMap,
239
- regExp: charMapToRegExp(charMap),
240
- regExpGlobal: charMapToRegExp(charMap, true),
241
- selector: charMapToSelector(charMap),
242
- charMapToRegExp: charMapToRegExp,
243
- charMapToSelector: charMapToSelector
244
- };
245
- }
246
- );
247
- defineGlobal("global!Array", Array);
248
- defineGlobal("global!Error", Error);
249
- define(
250
- 'ephox.katamari.api.Fun',
251
-
252
- [
253
- 'global!Array',
254
- 'global!Error'
255
- ],
256
-
257
- function (Array, Error) {
258
-
259
- var noop = function () { };
260
-
261
- var noarg = function (f) {
262
- return function () {
263
- return f();
264
- };
265
- };
266
-
267
- var compose = function (fa, fb) {
268
- return function () {
269
- return fa(fb.apply(null, arguments));
270
- };
271
- };
272
-
273
- var constant = function (value) {
274
- return function () {
275
- return value;
276
- };
277
- };
278
-
279
- var identity = function (x) {
280
- return x;
281
- };
282
-
283
- var tripleEquals = function(a, b) {
284
- return a === b;
285
- };
286
-
287
- // Don't use array slice(arguments), makes the whole function unoptimisable on Chrome
288
- var curry = function (f) {
289
- // equivalent to arguments.slice(1)
290
- // starting at 1 because 0 is the f, makes things tricky.
291
- // Pay attention to what variable is where, and the -1 magic.
292
- // thankfully, we have tests for this.
293
- var args = new Array(arguments.length - 1);
294
- for (var i = 1; i < arguments.length; i++) args[i-1] = arguments[i];
295
-
296
- return function () {
297
- var newArgs = new Array(arguments.length);
298
- for (var j = 0; j < newArgs.length; j++) newArgs[j] = arguments[j];
299
-
300
- var all = args.concat(newArgs);
301
- return f.apply(null, all);
302
- };
303
- };
304
-
305
- var not = function (f) {
306
- return function () {
307
- return !f.apply(null, arguments);
308
- };
309
- };
310
-
311
- var die = function (msg) {
312
- return function () {
313
- throw new Error(msg);
314
- };
315
- };
316
-
317
- var apply = function (f) {
318
- return f();
319
- };
320
-
321
- var call = function(f) {
322
- f();
323
- };
324
-
325
- var never = constant(false);
326
- var always = constant(true);
327
-
328
-
329
- return {
330
- noop: noop,
331
- noarg: noarg,
332
- compose: compose,
333
- constant: constant,
334
- identity: identity,
335
- tripleEquals: tripleEquals,
336
- curry: curry,
337
- not: not,
338
- die: die,
339
- apply: apply,
340
- call: call,
341
- never: never,
342
- always: always
343
- };
344
- }
345
- );
346
-
347
- defineGlobal("global!Object", Object);
348
- define(
349
- 'ephox.katamari.api.Option',
350
-
351
- [
352
- 'ephox.katamari.api.Fun',
353
- 'global!Object'
354
- ],
355
-
356
- function (Fun, Object) {
357
-
358
- var never = Fun.never;
359
- var always = Fun.always;
360
-
361
- /**
362
- Option objects support the following methods:
363
-
364
- fold :: this Option a -> ((() -> b, a -> b)) -> Option b
365
-
366
- is :: this Option a -> a -> Boolean
367
-
368
- isSome :: this Option a -> () -> Boolean
369
-
370
- isNone :: this Option a -> () -> Boolean
371
-
372
- getOr :: this Option a -> a -> a
373
-
374
- getOrThunk :: this Option a -> (() -> a) -> a
375
-
376
- getOrDie :: this Option a -> String -> a
377
-
378
- or :: this Option a -> Option a -> Option a
379
- - if some: return self
380
- - if none: return opt
381
-
382
- orThunk :: this Option a -> (() -> Option a) -> Option a
383
- - Same as "or", but uses a thunk instead of a value
384
-
385
- map :: this Option a -> (a -> b) -> Option b
386
- - "fmap" operation on the Option Functor.
387
- - same as 'each'
388
-
389
- ap :: this Option a -> Option (a -> b) -> Option b
390
- - "apply" operation on the Option Apply/Applicative.
391
- - Equivalent to <*> in Haskell/PureScript.
392
-
393
- each :: this Option a -> (a -> b) -> undefined
394
- - similar to 'map', but doesn't return a value.
395
- - intended for clarity when performing side effects.
396
-
397
- bind :: this Option a -> (a -> Option b) -> Option b
398
- - "bind"/"flatMap" operation on the Option Bind/Monad.
399
- - Equivalent to >>= in Haskell/PureScript; flatMap in Scala.
400
-
401
- flatten :: {this Option (Option a))} -> () -> Option a
402
- - "flatten"/"join" operation on the Option Monad.
403
-
404
- exists :: this Option a -> (a -> Boolean) -> Boolean
405
-
406
- forall :: this Option a -> (a -> Boolean) -> Boolean
407
-
408
- filter :: this Option a -> (a -> Boolean) -> Option a
409
-
410
- equals :: this Option a -> Option a -> Boolean
411
-
412
- equals_ :: this Option a -> (Option a, a -> Boolean) -> Boolean
413
-
414
- toArray :: this Option a -> () -> [a]
415
-
416
- */
417
-
418
- var none = function () { return NONE; };
419
-
420
- var NONE = (function () {
421
- var eq = function (o) {
422
- return o.isNone();
423
- };
424
-
425
- // inlined from peanut, maybe a micro-optimisation?
426
- var call = function (thunk) { return thunk(); };
427
- var id = function (n) { return n; };
428
- var noop = function () { };
429
-
430
- var me = {
431
- fold: function (n, s) { return n(); },
432
- is: never,
433
- isSome: never,
434
- isNone: always,
435
- getOr: id,
436
- getOrThunk: call,
437
- getOrDie: function (msg) {
438
- throw new Error(msg || 'error: getOrDie called on none.');
439
- },
440
- or: id,
441
- orThunk: call,
442
- map: none,
443
- ap: none,
444
- each: noop,
445
- bind: none,
446
- flatten: none,
447
- exists: never,
448
- forall: always,
449
- filter: none,
450
- equals: eq,
451
- equals_: eq,
452
- toArray: function () { return []; },
453
- toString: Fun.constant("none()")
454
- };
455
- if (Object.freeze) Object.freeze(me);
456
- return me;
457
- })();
458
-
459
-
460
- /** some :: a -> Option a */
461
- var some = function (a) {
462
-
463
- // inlined from peanut, maybe a micro-optimisation?
464
- var constant_a = function () { return a; };
465
-
466
- var self = function () {
467
- // can't Fun.constant this one
468
- return me;
469
- };
470
-
471
- var map = function (f) {
472
- return some(f(a));
473
- };
474
-
475
- var bind = function (f) {
476
- return f(a);
477
- };
478
-
479
- var me = {
480
- fold: function (n, s) { return s(a); },
481
- is: function (v) { return a === v; },
482
- isSome: always,
483
- isNone: never,
484
- getOr: constant_a,
485
- getOrThunk: constant_a,
486
- getOrDie: constant_a,
487
- or: self,
488
- orThunk: self,
489
- map: map,
490
- ap: function (optfab) {
491
- return optfab.fold(none, function(fab) {
492
- return some(fab(a));
493
- });
494
- },
495
- each: function (f) {
496
- f(a);
497
- },
498
- bind: bind,
499
- flatten: constant_a,
500
- exists: bind,
501
- forall: bind,
502
- filter: function (f) {
503
- return f(a) ? me : NONE;
504
- },
505
- equals: function (o) {
506
- return o.is(a);
507
- },
508
- equals_: function (o, elementEq) {
509
- return o.fold(
510
- never,
511
- function (b) { return elementEq(a, b); }
512
- );
513
- },
514
- toArray: function () {
515
- return [a];
516
- },
517
- toString: function () {
518
- return 'some(' + a + ')';
519
- }
520
- };
521
- return me;
522
- };
523
-
524
- /** from :: undefined|null|a -> Option a */
525
- var from = function (value) {
526
- return value === null || value === undefined ? NONE : some(value);
527
- };
528
-
529
- return {
530
- some: some,
531
- none: none,
532
- from: from
533
- };
534
- }
535
- );
536
-
537
- defineGlobal("global!String", String);
538
- define(
539
- 'ephox.katamari.api.Arr',
540
-
541
- [
542
- 'ephox.katamari.api.Option',
543
- 'global!Array',
544
- 'global!Error',
545
- 'global!String'
546
- ],
547
-
548
- function (Option, Array, Error, String) {
549
- // Use the native Array.indexOf if it is available (IE9+) otherwise fall back to manual iteration
550
- // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
551
- var rawIndexOf = (function () {
552
- var pIndexOf = Array.prototype.indexOf;
553
-
554
- var fastIndex = function (xs, x) { return pIndexOf.call(xs, x); };
555
-
556
- var slowIndex = function(xs, x) { return slowIndexOf(xs, x); };
557
-
558
- return pIndexOf === undefined ? slowIndex : fastIndex;
559
- })();
560
-
561
- var indexOf = function (xs, x) {
562
- // The rawIndexOf method does not wrap up in an option. This is for performance reasons.
563
- var r = rawIndexOf(xs, x);
564
- return r === -1 ? Option.none() : Option.some(r);
565
- };
566
-
567
- var contains = function (xs, x) {
568
- return rawIndexOf(xs, x) > -1;
569
- };
570
-
571
- // Using findIndex is likely less optimal in Chrome (dynamic return type instead of bool)
572
- // but if we need that micro-optimisation we can inline it later.
573
- var exists = function (xs, pred) {
574
- return findIndex(xs, pred).isSome();
575
- };
576
-
577
- var range = function (num, f) {
578
- var r = [];
579
- for (var i = 0; i < num; i++) {
580
- r.push(f(i));
581
- }
582
- return r;
68
+ var constant = function (value) {
69
+ return function () {
70
+ return value;
583
71
  };
72
+ };
584
73
 
585
- // It's a total micro optimisation, but these do make some difference.
586
- // Particularly for browsers other than Chrome.
587
- // - length caching
588
- // http://jsperf.com/browser-diet-jquery-each-vs-for-loop/69
589
- // - not using push
590
- // http://jsperf.com/array-direct-assignment-vs-push/2
591
74
 
592
- var chunk = function (array, size) {
593
- var r = [];
594
- for (var i = 0; i < array.length; i += size) {
595
- var s = array.slice(i, i + size);
596
- r.push(s);
597
- }
598
- return r;
599
- };
600
75
 
601
- var map = function(xs, f) {
602
- // pre-allocating array size when it's guaranteed to be known
603
- // http://jsperf.com/push-allocated-vs-dynamic/22
604
- var len = xs.length;
605
- var r = new Array(len);
606
- for (var i = 0; i < len; i++) {
607
- var x = xs[i];
608
- r[i] = f(x, i, xs);
609
- }
610
- return r;
611
- };
612
76
 
613
- // Unwound implementing other functions in terms of each.
614
- // The code size is roughly the same, and it should allow for better optimisation.
615
- var each = function(xs, f) {
616
- for (var i = 0, len = xs.length; i < len; i++) {
617
- var x = xs[i];
618
- f(x, i, xs);
619
- }
620
- };
621
77
 
622
- var eachr = function (xs, f) {
623
- for (var i = xs.length - 1; i >= 0; i--) {
624
- var x = xs[i];
625
- f(x, i, xs);
626
- }
627
- };
628
78
 
629
- var partition = function(xs, pred) {
630
- var pass = [];
631
- var fail = [];
632
- for (var i = 0, len = xs.length; i < len; i++) {
633
- var x = xs[i];
634
- var arr = pred(x, i, xs) ? pass : fail;
635
- arr.push(x);
636
- }
637
- return { pass: pass, fail: fail };
638
- };
639
79
 
640
- var filter = function(xs, pred) {
641
- var r = [];
642
- for (var i = 0, len = xs.length; i < len; i++) {
643
- var x = xs[i];
644
- if (pred(x, i, xs)) {
645
- r.push(x);
646
- }
647
- }
648
- return r;
649
- };
80
+ var never = constant(false);
81
+ var always = constant(true);
650
82
 
651
- /*
652
- * Groups an array into contiguous arrays of like elements. Whether an element is like or not depends on f.
653
- *
654
- * f is a function that derives a value from an element - e.g. true or false, or a string.
655
- * Elements are like if this function generates the same value for them (according to ===).
656
- *
657
- *
658
- * Order of the elements is preserved. Arr.flatten() on the result will return the original list, as with Haskell groupBy function.
659
- * For a good explanation, see the group function (which is a special case of groupBy)
660
- * http://hackage.haskell.org/package/base-4.7.0.0/docs/Data-List.html#v:group
661
- */
662
- var groupBy = function (xs, f) {
663
- if (xs.length === 0) {
83
+ var never$1 = never;
84
+ var always$1 = always;
85
+ var none = function () {
86
+ return NONE;
87
+ };
88
+ var NONE = function () {
89
+ var eq = function (o) {
90
+ return o.isNone();
91
+ };
92
+ var call$$1 = function (thunk) {
93
+ return thunk();
94
+ };
95
+ var id = function (n) {
96
+ return n;
97
+ };
98
+ var noop$$1 = function () {
99
+ };
100
+ var nul = function () {
101
+ return null;
102
+ };
103
+ var undef = function () {
104
+ return undefined;
105
+ };
106
+ var me = {
107
+ fold: function (n, s) {
108
+ return n();
109
+ },
110
+ is: never$1,
111
+ isSome: never$1,
112
+ isNone: always$1,
113
+ getOr: id,
114
+ getOrThunk: call$$1,
115
+ getOrDie: function (msg) {
116
+ throw new Error(msg || 'error: getOrDie called on none.');
117
+ },
118
+ getOrNull: nul,
119
+ getOrUndefined: undef,
120
+ or: id,
121
+ orThunk: call$$1,
122
+ map: none,
123
+ ap: none,
124
+ each: noop$$1,
125
+ bind: none,
126
+ flatten: none,
127
+ exists: never$1,
128
+ forall: always$1,
129
+ filter: none,
130
+ equals: eq,
131
+ equals_: eq,
132
+ toArray: function () {
664
133
  return [];
665
- } else {
666
- var wasType = f(xs[0]); // initial case for matching
667
- var r = [];
668
- var group = [];
669
-
670
- for (var i = 0, len = xs.length; i < len; i++) {
671
- var x = xs[i];
672
- var type = f(x);
673
- if (type !== wasType) {
674
- r.push(group);
675
- group = [];
676
- }
677
- wasType = type;
678
- group.push(x);
679
- }
680
- if (group.length !== 0) {
681
- r.push(group);
682
- }
683
- return r;
684
- }
685
- };
686
-
687
- var foldr = function (xs, f, acc) {
688
- eachr(xs, function (x) {
689
- acc = f(acc, x);
690
- });
691
- return acc;
692
- };
693
-
694
- var foldl = function (xs, f, acc) {
695
- each(xs, function (x) {
696
- acc = f(acc, x);
697
- });
698
- return acc;
699
- };
700
-
701
- var find = function (xs, pred) {
702
- for (var i = 0, len = xs.length; i < len; i++) {
703
- var x = xs[i];
704
- if (pred(x, i, xs)) {
705
- return Option.some(x);
706
- }
707
- }
708
- return Option.none();
709
- };
710
-
711
- var findIndex = function (xs, pred) {
712
- for (var i = 0, len = xs.length; i < len; i++) {
713
- var x = xs[i];
714
- if (pred(x, i, xs)) {
715
- return Option.some(i);
716
- }
717
- }
718
-
719
- return Option.none();
720
- };
721
-
722
- var slowIndexOf = function (xs, x) {
723
- for (var i = 0, len = xs.length; i < len; ++i) {
724
- if (xs[i] === x) {
725
- return i;
726
- }
727
- }
728
-
729
- return -1;
730
- };
731
-
732
- var push = Array.prototype.push;
733
- var flatten = function (xs) {
734
- // Note, this is possible because push supports multiple arguments:
735
- // http://jsperf.com/concat-push/6
736
- // Note that in the past, concat() would silently work (very slowly) for array-like objects.
737
- // With this change it will throw an error.
738
- var r = [];
739
- for (var i = 0, len = xs.length; i < len; ++i) {
740
- // Ensure that each value is an array itself
741
- if (! Array.prototype.isPrototypeOf(xs[i])) throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
742
- push.apply(r, xs[i]);
743
- }
744
- return r;
745
- };
746
-
747
- var bind = function (xs, f) {
748
- var output = map(xs, f);
749
- return flatten(output);
750
- };
751
-
752
- var forall = function (xs, pred) {
753
- for (var i = 0, len = xs.length; i < len; ++i) {
754
- var x = xs[i];
755
- if (pred(x, i, xs) !== true) {
756
- return false;
757
- }
758
- }
759
- return true;
760
- };
761
-
762
- var equal = function (a1, a2) {
763
- return a1.length === a2.length && forall(a1, function (x, i) {
764
- return x === a2[i];
765
- });
766
- };
767
-
768
- var slice = Array.prototype.slice;
769
- var reverse = function (xs) {
770
- var r = slice.call(xs, 0);
771
- r.reverse();
772
- return r;
773
- };
774
-
775
- var difference = function (a1, a2) {
776
- return filter(a1, function (x) {
777
- return !contains(a2, x);
778
- });
779
- };
780
-
781
- var mapToObject = function(xs, f) {
782
- var r = {};
783
- for (var i = 0, len = xs.length; i < len; i++) {
784
- var x = xs[i];
785
- r[String(x)] = f(x, i);
786
- }
787
- return r;
788
- };
789
-
790
- var pure = function(x) {
791
- return [x];
792
- };
793
-
794
- var sort = function (xs, comparator) {
795
- var copy = slice.call(xs, 0);
796
- copy.sort(comparator);
797
- return copy;
798
- };
799
-
800
- var head = function (xs) {
801
- return xs.length === 0 ? Option.none() : Option.some(xs[0]);
802
- };
803
-
804
- var last = function (xs) {
805
- return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
134
+ },
135
+ toString: constant('none()')
136
+ };
137
+ if (Object.freeze)
138
+ Object.freeze(me);
139
+ return me;
140
+ }();
141
+ var some = function (a) {
142
+ var constant_a = function () {
143
+ return a;
144
+ };
145
+ var self = function () {
146
+ return me;
806
147
  };
807
-
808
- return {
148
+ var map = function (f) {
149
+ return some(f(a));
150
+ };
151
+ var bind = function (f) {
152
+ return f(a);
153
+ };
154
+ var me = {
155
+ fold: function (n, s) {
156
+ return s(a);
157
+ },
158
+ is: function (v) {
159
+ return a === v;
160
+ },
161
+ isSome: always$1,
162
+ isNone: never$1,
163
+ getOr: constant_a,
164
+ getOrThunk: constant_a,
165
+ getOrDie: constant_a,
166
+ getOrNull: constant_a,
167
+ getOrUndefined: constant_a,
168
+ or: self,
169
+ orThunk: self,
809
170
  map: map,
810
- each: each,
811
- eachr: eachr,
812
- partition: partition,
813
- filter: filter,
814
- groupBy: groupBy,
815
- indexOf: indexOf,
816
- foldr: foldr,
817
- foldl: foldl,
818
- find: find,
819
- findIndex: findIndex,
820
- flatten: flatten,
171
+ ap: function (optfab) {
172
+ return optfab.fold(none, function (fab) {
173
+ return some(fab(a));
174
+ });
175
+ },
176
+ each: function (f) {
177
+ f(a);
178
+ },
821
179
  bind: bind,
822
- forall: forall,
823
- exists: exists,
824
- contains: contains,
825
- equal: equal,
826
- reverse: reverse,
827
- chunk: chunk,
828
- difference: difference,
829
- mapToObject: mapToObject,
830
- pure: pure,
831
- sort: sort,
832
- range: range,
833
- head: head,
834
- last: last
835
- };
836
- }
837
- );
838
- define("global!console", [], function () { if (typeof console === "undefined") console = { log: function () {} }; return console; });
839
- defineGlobal("global!document", document);
840
- define(
841
- 'ephox.sugar.api.node.Element',
842
-
843
- [
844
- 'ephox.katamari.api.Fun',
845
- 'ephox.katamari.api.Option',
846
- 'global!Error',
847
- 'global!console',
848
- 'global!document'
849
- ],
850
-
851
- function (Fun, Option, Error, console, document) {
852
- var fromHtml = function (html, scope) {
853
- var doc = scope || document;
854
- var div = doc.createElement('div');
855
- div.innerHTML = html;
856
- if (!div.hasChildNodes() || div.childNodes.length > 1) {
857
- console.error('HTML does not have a single root node', html);
858
- throw 'HTML must have a single root node';
180
+ flatten: constant_a,
181
+ exists: bind,
182
+ forall: bind,
183
+ filter: function (f) {
184
+ return f(a) ? me : NONE;
185
+ },
186
+ equals: function (o) {
187
+ return o.is(a);
188
+ },
189
+ equals_: function (o, elementEq) {
190
+ return o.fold(never$1, function (b) {
191
+ return elementEq(a, b);
192
+ });
193
+ },
194
+ toArray: function () {
195
+ return [a];
196
+ },
197
+ toString: function () {
198
+ return 'some(' + a + ')';
859
199
  }
860
- return fromDom(div.childNodes[0]);
861
200
  };
201
+ return me;
202
+ };
203
+ var from = function (value) {
204
+ return value === null || value === undefined ? NONE : some(value);
205
+ };
206
+ var Option = {
207
+ some: some,
208
+ none: none,
209
+ from: from
210
+ };
862
211
 
863
- var fromTag = function (tag, scope) {
864
- var doc = scope || document;
865
- var node = doc.createElement(tag);
866
- return fromDom(node);
867
- };
868
-
869
- var fromText = function (text, scope) {
870
- var doc = scope || document;
871
- var node = doc.createTextNode(text);
872
- return fromDom(node);
873
- };
874
-
875
- var fromDom = function (node) {
876
- if (node === null || node === undefined) throw new Error('Node cannot be null or undefined');
877
- return {
878
- dom: Fun.constant(node)
879
- };
880
- };
881
-
882
- var fromPoint = function (doc, x, y) {
883
- return Option.from(doc.dom().elementFromPoint(x, y)).map(fromDom);
884
- };
885
-
886
- return {
887
- fromHtml: fromHtml,
888
- fromTag: fromTag,
889
- fromText: fromText,
890
- fromDom: fromDom,
891
- fromPoint: fromPoint
892
- };
893
- }
894
- );
895
-
896
- define(
897
- 'ephox.sugar.api.node.NodeTypes',
898
-
899
- [
900
-
901
- ],
902
-
903
- function () {
904
- return {
905
- ATTRIBUTE: 2,
906
- CDATA_SECTION: 4,
907
- COMMENT: 8,
908
- DOCUMENT: 9,
909
- DOCUMENT_TYPE: 10,
910
- DOCUMENT_FRAGMENT: 11,
911
- ELEMENT: 1,
912
- TEXT: 3,
913
- PROCESSING_INSTRUCTION: 7,
914
- ENTITY_REFERENCE: 5,
915
- ENTITY: 6,
916
- NOTATION: 12
212
+ var typeOf = function (x) {
213
+ if (x === null)
214
+ return 'null';
215
+ var t = typeof x;
216
+ if (t === 'object' && Array.prototype.isPrototypeOf(x))
217
+ return 'array';
218
+ if (t === 'object' && String.prototype.isPrototypeOf(x))
219
+ return 'string';
220
+ return t;
221
+ };
222
+ var isType = function (type) {
223
+ return function (value) {
224
+ return typeOf(value) === type;
917
225
  };
918
- }
919
- );
920
- define(
921
- 'ephox.sugar.api.node.Node',
226
+ };
922
227
 
923
- [
924
- 'ephox.sugar.api.node.NodeTypes'
925
- ],
926
228
 
927
- function (NodeTypes) {
928
- var name = function (element) {
929
- var r = element.dom().nodeName;
930
- return r.toLowerCase();
931
- };
932
229
 
933
- var type = function (element) {
934
- return element.dom().nodeType;
935
- };
936
230
 
937
- var value = function (element) {
938
- return element.dom().nodeValue;
939
- };
940
231
 
941
- var isType = function (t) {
942
- return function (element) {
943
- return type(element) === t;
944
- };
945
- };
946
232
 
947
- var isComment = function (element) {
948
- return type(element) === NodeTypes.COMMENT || name(element) === '#comment';
949
- };
233
+ var isFunction = isType('function');
950
234
 
951
- var isElement = isType(NodeTypes.ELEMENT);
952
- var isText = isType(NodeTypes.TEXT);
953
- var isDocument = isType(NodeTypes.DOCUMENT);
235
+ var map = function (xs, f) {
236
+ var len = xs.length;
237
+ var r = new Array(len);
238
+ for (var i = 0; i < len; i++) {
239
+ var x = xs[i];
240
+ r[i] = f(x, i, xs);
241
+ }
242
+ return r;
243
+ };
244
+ var each = function (xs, f) {
245
+ for (var i = 0, len = xs.length; i < len; i++) {
246
+ var x = xs[i];
247
+ f(x, i, xs);
248
+ }
249
+ };
954
250
 
955
- return {
956
- name: name,
957
- type: type,
958
- value: value,
959
- isElement: isElement,
960
- isText: isText,
961
- isDocument: isDocument,
962
- isComment: isComment
963
- };
964
- }
965
- );
966
251
 
967
- /**
968
- * Html.js
969
- *
970
- * Released under LGPL License.
971
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
972
- *
973
- * License: http://www.tinymce.com/license
974
- * Contributing: http://www.tinymce.com/contributing
975
- */
976
252
 
977
- define(
978
- 'tinymce.plugins.visualchars.core.Html',
979
- [
980
- 'tinymce.plugins.visualchars.core.Data'
981
- ],
982
- function (Data) {
983
- var wrapCharWithSpan = function (value) {
984
- return '<span data-mce-bogus="1" class="mce-' + Data.charMap[value] + '">' + value + '</span>';
985
- };
986
253
 
987
- return {
988
- wrapCharWithSpan: wrapCharWithSpan
989
- };
990
- }
991
- );
992
254
 
993
- /**
994
- * Nodes.js
995
- *
996
- * Released under LGPL License.
997
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
998
- *
999
- * License: http://www.tinymce.com/license
1000
- * Contributing: http://www.tinymce.com/contributing
1001
- */
1002
255
 
1003
- define(
1004
- 'tinymce.plugins.visualchars.core.Nodes',
1005
- [
1006
- 'ephox.katamari.api.Arr',
1007
- 'ephox.sugar.api.node.Element',
1008
- 'ephox.sugar.api.node.Node',
1009
- 'tinymce.plugins.visualchars.core.Data',
1010
- 'tinymce.plugins.visualchars.core.Html'
1011
- ],
1012
- function (Arr, Element, Node, Data, Html) {
1013
- var isMatch = function (n) {
1014
- return Node.isText(n) &&
1015
- Node.value(n) !== undefined &&
1016
- Data.regExp.test(Node.value(n));
1017
- };
1018
256
 
1019
- // inlined sugars PredicateFilter.descendants for file size
1020
- var filterDescendants = function (scope, predicate) {
1021
- var result = [];
1022
- var dom = scope.dom();
1023
- var children = Arr.map(dom.childNodes, Element.fromDom);
1024
257
 
1025
- Arr.each(children, function (x) {
1026
- if (predicate(x)) {
1027
- result = result.concat([ x ]);
1028
- }
1029
- result = result.concat(filterDescendants(x, predicate));
1030
- });
1031
- return result;
1032
- };
1033
258
 
1034
- var findParentElm = function (elm, rootElm) {
1035
- while (elm.parentNode) {
1036
- if (elm.parentNode === rootElm) {
1037
- return elm;
1038
- }
1039
- elm = elm.parentNode;
1040
- }
1041
- };
1042
259
 
1043
- var replaceWithSpans = function (html) {
1044
- return html.replace(Data.regExpGlobal, Html.wrapCharWithSpan);
1045
- };
1046
260
 
1047
- return {
1048
- isMatch: isMatch,
1049
- filterDescendants: filterDescendants,
1050
- findParentElm: findParentElm,
1051
- replaceWithSpans: replaceWithSpans
1052
- };
1053
- }
1054
- );
1055
- /**
1056
- * VisualChars.js
1057
- *
1058
- * Released under LGPL License.
1059
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1060
- *
1061
- * License: http://www.tinymce.com/license
1062
- * Contributing: http://www.tinymce.com/contributing
1063
- */
1064
261
 
1065
- define(
1066
- 'tinymce.plugins.visualchars.core.VisualChars',
1067
- [
1068
- 'tinymce.plugins.visualchars.core.Data',
1069
- 'tinymce.plugins.visualchars.core.Nodes',
1070
- 'ephox.katamari.api.Arr',
1071
- 'ephox.sugar.api.node.Element',
1072
- 'ephox.sugar.api.node.Node'
1073
- ],
1074
- function (Data, Nodes, Arr, Element, Node) {
1075
- var show = function (editor, rootElm) {
1076
- var node, div;
1077
- var nodeList = Nodes.filterDescendants(Element.fromDom(rootElm), Nodes.isMatch);
262
+ var slice = Array.prototype.slice;
1078
263
 
1079
- Arr.each(nodeList, function (n) {
1080
- var withSpans = Nodes.replaceWithSpans(Node.value(n));
1081
264
 
1082
- div = editor.dom.create('div', null, withSpans);
1083
- while ((node = div.lastChild)) {
1084
- editor.dom.insertAfter(node, n.dom());
1085
- }
1086
265
 
1087
- editor.dom.remove(n.dom());
1088
- });
1089
- };
1090
266
 
1091
- var hide = function (editor, body) {
1092
- var nodeList = editor.dom.select(Data.selector, body);
1093
267
 
1094
- Arr.each(nodeList, function (node) {
1095
- editor.dom.remove(node, 1);
1096
- });
1097
- };
1098
268
 
1099
- var toggle = function (editor) {
1100
- var body = editor.getBody();
1101
- var bookmark = editor.selection.getBookmark();
1102
- var parentNode = Nodes.findParentElm(editor.selection.getNode(), body);
1103
269
 
1104
- // if user does select all the parentNode will be undefined
1105
- parentNode = parentNode !== undefined ? parentNode : body;
270
+ var from$1 = isFunction(Array.from) ? Array.from : function (x) {
271
+ return slice.call(x);
272
+ };
1106
273
 
1107
- hide(editor, parentNode);
1108
- show(editor, parentNode);
274
+ var fromHtml = function (html, scope) {
275
+ var doc = scope || document;
276
+ var div = doc.createElement('div');
277
+ div.innerHTML = html;
278
+ if (!div.hasChildNodes() || div.childNodes.length > 1) {
279
+ console.error('HTML does not have a single root node', html);
280
+ throw 'HTML must have a single root node';
281
+ }
282
+ return fromDom(div.childNodes[0]);
283
+ };
284
+ var fromTag = function (tag, scope) {
285
+ var doc = scope || document;
286
+ var node = doc.createElement(tag);
287
+ return fromDom(node);
288
+ };
289
+ var fromText = function (text, scope) {
290
+ var doc = scope || document;
291
+ var node = doc.createTextNode(text);
292
+ return fromDom(node);
293
+ };
294
+ var fromDom = function (node) {
295
+ if (node === null || node === undefined)
296
+ throw new Error('Node cannot be null or undefined');
297
+ return { dom: constant(node) };
298
+ };
299
+ var fromPoint = function (docElm, x, y) {
300
+ var doc = docElm.dom();
301
+ return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
302
+ };
303
+ var Element$$1 = {
304
+ fromHtml: fromHtml,
305
+ fromTag: fromTag,
306
+ fromText: fromText,
307
+ fromDom: fromDom,
308
+ fromPoint: fromPoint
309
+ };
1109
310
 
1110
- editor.selection.moveToBookmark(bookmark);
1111
- };
311
+ var $_5ao1w8t6jm0og29y = {
312
+ ATTRIBUTE: Node.ATTRIBUTE_NODE,
313
+ CDATA_SECTION: Node.CDATA_SECTION_NODE,
314
+ COMMENT: Node.COMMENT_NODE,
315
+ DOCUMENT: Node.DOCUMENT_NODE,
316
+ DOCUMENT_TYPE: Node.DOCUMENT_TYPE_NODE,
317
+ DOCUMENT_FRAGMENT: Node.DOCUMENT_FRAGMENT_NODE,
318
+ ELEMENT: Node.ELEMENT_NODE,
319
+ TEXT: Node.TEXT_NODE,
320
+ PROCESSING_INSTRUCTION: Node.PROCESSING_INSTRUCTION_NODE,
321
+ ENTITY_REFERENCE: Node.ENTITY_REFERENCE_NODE,
322
+ ENTITY: Node.ENTITY_NODE,
323
+ NOTATION: Node.NOTATION_NODE
324
+ };
1112
325
 
1113
- return {
1114
- show: show,
1115
- hide: hide,
1116
- toggle: toggle
326
+ var name = function (element) {
327
+ var r = element.dom().nodeName;
328
+ return r.toLowerCase();
329
+ };
330
+ var type = function (element) {
331
+ return element.dom().nodeType;
332
+ };
333
+ var value = function (element) {
334
+ return element.dom().nodeValue;
335
+ };
336
+ var isType$1 = function (t) {
337
+ return function (element) {
338
+ return type(element) === t;
1117
339
  };
1118
- }
1119
- );
1120
- /**
1121
- * Actions.js
1122
- *
1123
- * Released under LGPL License.
1124
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1125
- *
1126
- * License: http://www.tinymce.com/license
1127
- * Contributing: http://www.tinymce.com/contributing
1128
- */
1129
-
1130
- define(
1131
- 'tinymce.plugins.visualchars.core.Actions',
1132
- [
1133
- 'tinymce.plugins.visualchars.api.Events',
1134
- 'tinymce.plugins.visualchars.core.VisualChars'
1135
- ],
1136
- function (Events, VisualChars) {
1137
- var toggleVisualChars = function (editor, toggleState) {
1138
- var body = editor.getBody(), selection = editor.selection, bookmark;
1139
-
1140
- toggleState.set(!toggleState.get());
1141
- Events.fireVisualChars(editor, toggleState.get());
340
+ };
341
+ var isComment = function (element) {
342
+ return type(element) === $_5ao1w8t6jm0og29y.COMMENT || name(element) === '#comment';
343
+ };
344
+ var isElement = isType$1($_5ao1w8t6jm0og29y.ELEMENT);
345
+ var isText = isType$1($_5ao1w8t6jm0og29y.TEXT);
346
+ var isDocument = isType$1($_5ao1w8t6jm0og29y.DOCUMENT);
347
+ var $_6qboq0t5jm0og29x = {
348
+ name: name,
349
+ type: type,
350
+ value: value,
351
+ isElement: isElement,
352
+ isText: isText,
353
+ isDocument: isDocument,
354
+ isComment: isComment
355
+ };
1142
356
 
1143
- bookmark = selection.getBookmark();
357
+ var wrapCharWithSpan = function (value) {
358
+ return '<span data-mce-bogus="1" class="mce-' + $_aa0v31sxjm0og28p.charMap[value] + '">' + value + '</span>';
359
+ };
360
+ var $_724dsdt7jm0og2a0 = { wrapCharWithSpan: wrapCharWithSpan };
1144
361
 
1145
- if (toggleState.get() === true) {
1146
- VisualChars.show(editor, body);
1147
- } else {
1148
- VisualChars.hide(editor, body);
362
+ var isMatch = function (n) {
363
+ return $_6qboq0t5jm0og29x.isText(n) && $_6qboq0t5jm0og29x.value(n) !== undefined && $_aa0v31sxjm0og28p.regExp.test($_6qboq0t5jm0og29x.value(n));
364
+ };
365
+ var filterDescendants = function (scope, predicate) {
366
+ var result = [];
367
+ var dom = scope.dom();
368
+ var children = map(dom.childNodes, Element$$1.fromDom);
369
+ each(children, function (x) {
370
+ if (predicate(x)) {
371
+ result = result.concat([x]);
1149
372
  }
1150
-
1151
- selection.moveToBookmark(bookmark);
1152
- };
1153
-
1154
- return {
1155
- toggleVisualChars: toggleVisualChars
1156
- };
1157
- }
1158
- );
1159
- /**
1160
- * Commands.js
1161
- *
1162
- * Released under LGPL License.
1163
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1164
- *
1165
- * License: http://www.tinymce.com/license
1166
- * Contributing: http://www.tinymce.com/contributing
1167
- */
1168
-
1169
- define(
1170
- 'tinymce.plugins.visualchars.api.Commands',
1171
- [
1172
- 'tinymce.plugins.visualchars.core.Actions'
1173
- ],
1174
- function (Actions) {
1175
- var register = function (editor, toggleState) {
1176
- editor.addCommand('mceVisualChars', function () {
1177
- Actions.toggleVisualChars(editor, toggleState);
1178
- });
1179
- };
1180
-
1181
- return {
1182
- register: register
1183
- };
1184
- }
1185
- );
1186
- /**
1187
- * ResolveGlobal.js
1188
- *
1189
- * Released under LGPL License.
1190
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1191
- *
1192
- * License: http://www.tinymce.com/license
1193
- * Contributing: http://www.tinymce.com/contributing
1194
- */
1195
-
1196
- define(
1197
- 'tinymce.core.util.Delay',
1198
- [
1199
- 'global!tinymce.util.Tools.resolve'
1200
- ],
1201
- function (resolve) {
1202
- return resolve('tinymce.util.Delay');
1203
- }
1204
- );
1205
-
1206
- /**
1207
- * Keyboard.js
1208
- *
1209
- * Released under LGPL License.
1210
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1211
- *
1212
- * License: http://www.tinymce.com/license
1213
- * Contributing: http://www.tinymce.com/contributing
1214
- */
1215
-
1216
- define(
1217
- 'tinymce.plugins.visualchars.core.Keyboard',
1218
- [
1219
- 'tinymce.core.util.Delay',
1220
- 'tinymce.plugins.visualchars.core.VisualChars'
1221
- ],
1222
- function (Delay, VisualChars) {
1223
- var setup = function (editor, toggleState) {
1224
- var debouncedToggle = Delay.debounce(function () {
1225
- VisualChars.toggle(editor);
1226
- }, 300);
1227
-
1228
- if (editor.settings.forced_root_block !== false) {
1229
- editor.on('keydown', function (e) {
1230
- if (toggleState.get() === true) {
1231
- e.keyCode === 13 ? VisualChars.toggle(editor) : debouncedToggle();
1232
- }
1233
- });
373
+ result = result.concat(filterDescendants(x, predicate));
374
+ });
375
+ return result;
376
+ };
377
+ var findParentElm = function (elm, rootElm) {
378
+ while (elm.parentNode) {
379
+ if (elm.parentNode === rootElm) {
380
+ return elm;
1234
381
  }
1235
- };
1236
-
1237
- return {
1238
- setup: setup
1239
- };
1240
- }
1241
- );
1242
- /**
1243
- * Buttons.js
1244
- *
1245
- * Released under LGPL License.
1246
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1247
- *
1248
- * License: http://www.tinymce.com/license
1249
- * Contributing: http://www.tinymce.com/contributing
1250
- */
382
+ elm = elm.parentNode;
383
+ }
384
+ };
385
+ var replaceWithSpans = function (html) {
386
+ return html.replace($_aa0v31sxjm0og28p.regExpGlobal, $_724dsdt7jm0og2a0.wrapCharWithSpan);
387
+ };
388
+ var $_4qefmtsyjm0og28r = {
389
+ isMatch: isMatch,
390
+ filterDescendants: filterDescendants,
391
+ findParentElm: findParentElm,
392
+ replaceWithSpans: replaceWithSpans
393
+ };
1251
394
 
1252
- define(
1253
- 'tinymce.plugins.visualchars.ui.Buttons',
1254
- [
1255
- ],
1256
- function () {
1257
- var toggleActiveState = function (editor) {
1258
- return function (e) {
1259
- var ctrl = e.control;
395
+ var show = function (editor, rootElm) {
396
+ var node, div;
397
+ var nodeList = $_4qefmtsyjm0og28r.filterDescendants(Element$$1.fromDom(rootElm), $_4qefmtsyjm0og28r.isMatch);
398
+ each(nodeList, function (n) {
399
+ var withSpans = $_4qefmtsyjm0og28r.replaceWithSpans($_6qboq0t5jm0og29x.value(n));
400
+ div = editor.dom.create('div', null, withSpans);
401
+ while (node = div.lastChild) {
402
+ editor.dom.insertAfter(node, n.dom());
403
+ }
404
+ editor.dom.remove(n.dom());
405
+ });
406
+ };
407
+ var hide = function (editor, body) {
408
+ var nodeList = editor.dom.select($_aa0v31sxjm0og28p.selector, body);
409
+ each(nodeList, function (node) {
410
+ editor.dom.remove(node, 1);
411
+ });
412
+ };
413
+ var toggle = function (editor) {
414
+ var body = editor.getBody();
415
+ var bookmark = editor.selection.getBookmark();
416
+ var parentNode = $_4qefmtsyjm0og28r.findParentElm(editor.selection.getNode(), body);
417
+ parentNode = parentNode !== undefined ? parentNode : body;
418
+ hide(editor, parentNode);
419
+ show(editor, parentNode);
420
+ editor.selection.moveToBookmark(bookmark);
421
+ };
422
+ var $_d6h2shswjm0og28i = {
423
+ show: show,
424
+ hide: hide,
425
+ toggle: toggle
426
+ };
1260
427
 
1261
- editor.on('VisualChars', function (e) {
1262
- ctrl.active(e.state);
1263
- });
1264
- };
1265
- };
428
+ var toggleVisualChars = function (editor, toggleState) {
429
+ var body = editor.getBody();
430
+ var selection = editor.selection;
431
+ var bookmark;
432
+ toggleState.set(!toggleState.get());
433
+ $_bdr3mcsvjm0og28h.fireVisualChars(editor, toggleState.get());
434
+ bookmark = selection.getBookmark();
435
+ if (toggleState.get() === true) {
436
+ $_d6h2shswjm0og28i.show(editor, body);
437
+ } else {
438
+ $_d6h2shswjm0og28i.hide(editor, body);
439
+ }
440
+ selection.moveToBookmark(bookmark);
441
+ };
442
+ var $_9adayusujm0og28g = { toggleVisualChars: toggleVisualChars };
1266
443
 
1267
- var register = function (editor) {
1268
- editor.addButton('visualchars', {
1269
- active: false,
1270
- title: 'Show invisible characters',
1271
- cmd: 'mceVisualChars',
1272
- onPostRender: toggleActiveState(editor)
444
+ var register = function (editor, toggleState) {
445
+ editor.addCommand('mceVisualChars', function () {
446
+ $_9adayusujm0og28g.toggleVisualChars(editor, toggleState);
447
+ });
448
+ };
449
+ var $_77bhnbstjm0og28f = { register: register };
450
+
451
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
452
+
453
+ var setup = function (editor, toggleState) {
454
+ var debouncedToggle = global$1.debounce(function () {
455
+ $_d6h2shswjm0og28i.toggle(editor);
456
+ }, 300);
457
+ if (editor.settings.forced_root_block !== false) {
458
+ editor.on('keydown', function (e) {
459
+ if (toggleState.get() === true) {
460
+ e.keyCode === 13 ? $_d6h2shswjm0og28i.toggle(editor) : debouncedToggle();
461
+ }
1273
462
  });
463
+ }
464
+ };
465
+ var $_n2t3xt8jm0og2a9 = { setup: setup };
1274
466
 
1275
- editor.addMenuItem('visualchars', {
1276
- text: 'Show invisible characters',
1277
- cmd: 'mceVisualChars',
1278
- onPostRender: toggleActiveState(editor),
1279
- selectable: true,
1280
- context: 'view',
1281
- prependToContext: true
467
+ var toggleActiveState = function (editor) {
468
+ return function (e) {
469
+ var ctrl = e.control;
470
+ editor.on('VisualChars', function (e) {
471
+ ctrl.active(e.state);
1282
472
  });
1283
473
  };
474
+ };
475
+ var register$1 = function (editor) {
476
+ editor.addButton('visualchars', {
477
+ active: false,
478
+ title: 'Show invisible characters',
479
+ cmd: 'mceVisualChars',
480
+ onPostRender: toggleActiveState(editor)
481
+ });
482
+ editor.addMenuItem('visualchars', {
483
+ text: 'Show invisible characters',
484
+ cmd: 'mceVisualChars',
485
+ onPostRender: toggleActiveState(editor),
486
+ selectable: true,
487
+ context: 'view',
488
+ prependToContext: true
489
+ });
490
+ };
1284
491
 
1285
- return {
1286
- register: register
1287
- };
492
+ global.add('visualchars', function (editor) {
493
+ var toggleState = Cell(false);
494
+ $_77bhnbstjm0og28f.register(editor, toggleState);
495
+ register$1(editor);
496
+ $_n2t3xt8jm0og2a9.setup(editor, toggleState);
497
+ return $_91givrssjm0og28e.get(toggleState);
498
+ });
499
+ function Plugin () {
1288
500
  }
1289
- );
1290
- /**
1291
- * Plugin.js
1292
- *
1293
- * Released under LGPL License.
1294
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1295
- *
1296
- * License: http://www.tinymce.com/license
1297
- * Contributing: http://www.tinymce.com/contributing
1298
- */
1299
-
1300
- define(
1301
- 'tinymce.plugins.visualchars.Plugin',
1302
- [
1303
- 'ephox.katamari.api.Cell',
1304
- 'tinymce.core.PluginManager',
1305
- 'tinymce.plugins.visualchars.api.Api',
1306
- 'tinymce.plugins.visualchars.api.Commands',
1307
- 'tinymce.plugins.visualchars.core.Keyboard',
1308
- 'tinymce.plugins.visualchars.ui.Buttons'
1309
- ],
1310
- function (Cell, PluginManager, Api, Commands, Keyboard, Buttons) {
1311
- PluginManager.add('visualchars', function (editor) {
1312
- var toggleState = Cell(false);
1313
501
 
1314
- Commands.register(editor, toggleState);
1315
- Buttons.register(editor);
1316
- Keyboard.setup(editor, toggleState);
502
+ return Plugin;
1317
503
 
1318
- return Api.get(toggleState);
1319
- });
1320
-
1321
- return function () {};
1322
- }
1323
- );
1324
- dem('tinymce.plugins.visualchars.Plugin')();
504
+ }());
1325
505
  })();