ckeditor 4.2.2 → 4.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/ckeditor/version.rb +2 -2
  4. data/lib/tasks/ckeditor.rake +1 -1
  5. data/vendor/assets/javascripts/ckeditor/CHANGES.md +22 -0
  6. data/vendor/assets/javascripts/ckeditor/LICENSE.md +2 -2
  7. data/vendor/assets/javascripts/ckeditor/README.md +1 -1
  8. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +1 -1
  9. data/vendor/assets/javascripts/ckeditor/ckeditor.js +383 -381
  10. data/vendor/assets/javascripts/ckeditor/config.js +1 -1
  11. data/vendor/assets/javascripts/ckeditor/contents.css +1 -1
  12. data/vendor/assets/javascripts/ckeditor/lang/af.js +2 -2
  13. data/vendor/assets/javascripts/ckeditor/lang/ar.js +2 -2
  14. data/vendor/assets/javascripts/ckeditor/lang/az.js +5 -0
  15. data/vendor/assets/javascripts/ckeditor/lang/bg.js +2 -2
  16. data/vendor/assets/javascripts/ckeditor/lang/bn.js +2 -2
  17. data/vendor/assets/javascripts/ckeditor/lang/bs.js +2 -2
  18. data/vendor/assets/javascripts/ckeditor/lang/ca.js +2 -2
  19. data/vendor/assets/javascripts/ckeditor/lang/cs.js +2 -2
  20. data/vendor/assets/javascripts/ckeditor/lang/cy.js +2 -2
  21. data/vendor/assets/javascripts/ckeditor/lang/da.js +2 -2
  22. data/vendor/assets/javascripts/ckeditor/lang/de-ch.js +2 -2
  23. data/vendor/assets/javascripts/ckeditor/lang/de.js +2 -2
  24. data/vendor/assets/javascripts/ckeditor/lang/el.js +2 -2
  25. data/vendor/assets/javascripts/ckeditor/lang/en-au.js +2 -2
  26. data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +2 -2
  27. data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +2 -2
  28. data/vendor/assets/javascripts/ckeditor/lang/en.js +2 -2
  29. data/vendor/assets/javascripts/ckeditor/lang/eo.js +2 -2
  30. data/vendor/assets/javascripts/ckeditor/lang/es.js +2 -2
  31. data/vendor/assets/javascripts/ckeditor/lang/et.js +2 -2
  32. data/vendor/assets/javascripts/ckeditor/lang/eu.js +2 -2
  33. data/vendor/assets/javascripts/ckeditor/lang/fa.js +2 -2
  34. data/vendor/assets/javascripts/ckeditor/lang/fi.js +2 -2
  35. data/vendor/assets/javascripts/ckeditor/lang/fo.js +2 -2
  36. data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +2 -2
  37. data/vendor/assets/javascripts/ckeditor/lang/fr.js +2 -2
  38. data/vendor/assets/javascripts/ckeditor/lang/gl.js +2 -2
  39. data/vendor/assets/javascripts/ckeditor/lang/gu.js +2 -2
  40. data/vendor/assets/javascripts/ckeditor/lang/he.js +2 -2
  41. data/vendor/assets/javascripts/ckeditor/lang/hi.js +2 -2
  42. data/vendor/assets/javascripts/ckeditor/lang/hr.js +2 -2
  43. data/vendor/assets/javascripts/ckeditor/lang/hu.js +2 -2
  44. data/vendor/assets/javascripts/ckeditor/lang/id.js +2 -2
  45. data/vendor/assets/javascripts/ckeditor/lang/is.js +2 -2
  46. data/vendor/assets/javascripts/ckeditor/lang/it.js +2 -2
  47. data/vendor/assets/javascripts/ckeditor/lang/ja.js +2 -2
  48. data/vendor/assets/javascripts/ckeditor/lang/ka.js +2 -2
  49. data/vendor/assets/javascripts/ckeditor/lang/km.js +2 -2
  50. data/vendor/assets/javascripts/ckeditor/lang/ko.js +2 -2
  51. data/vendor/assets/javascripts/ckeditor/lang/ku.js +2 -2
  52. data/vendor/assets/javascripts/ckeditor/lang/lt.js +2 -2
  53. data/vendor/assets/javascripts/ckeditor/lang/lv.js +2 -2
  54. data/vendor/assets/javascripts/ckeditor/lang/mk.js +2 -2
  55. data/vendor/assets/javascripts/ckeditor/lang/mn.js +2 -2
  56. data/vendor/assets/javascripts/ckeditor/lang/ms.js +2 -2
  57. data/vendor/assets/javascripts/ckeditor/lang/nb.js +2 -2
  58. data/vendor/assets/javascripts/ckeditor/lang/nl.js +2 -2
  59. data/vendor/assets/javascripts/ckeditor/lang/no.js +2 -2
  60. data/vendor/assets/javascripts/ckeditor/lang/oc.js +2 -2
  61. data/vendor/assets/javascripts/ckeditor/lang/pl.js +2 -2
  62. data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +2 -2
  63. data/vendor/assets/javascripts/ckeditor/lang/pt.js +2 -2
  64. data/vendor/assets/javascripts/ckeditor/lang/ro.js +2 -2
  65. data/vendor/assets/javascripts/ckeditor/lang/ru.js +2 -2
  66. data/vendor/assets/javascripts/ckeditor/lang/si.js +2 -2
  67. data/vendor/assets/javascripts/ckeditor/lang/sk.js +2 -2
  68. data/vendor/assets/javascripts/ckeditor/lang/sl.js +2 -2
  69. data/vendor/assets/javascripts/ckeditor/lang/sq.js +2 -2
  70. data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +2 -2
  71. data/vendor/assets/javascripts/ckeditor/lang/sr.js +2 -2
  72. data/vendor/assets/javascripts/ckeditor/lang/sv.js +2 -2
  73. data/vendor/assets/javascripts/ckeditor/lang/th.js +2 -2
  74. data/vendor/assets/javascripts/ckeditor/lang/tr.js +2 -2
  75. data/vendor/assets/javascripts/ckeditor/lang/tt.js +2 -2
  76. data/vendor/assets/javascripts/ckeditor/lang/ug.js +2 -2
  77. data/vendor/assets/javascripts/ckeditor/lang/uk.js +2 -2
  78. data/vendor/assets/javascripts/ckeditor/lang/vi.js +2 -2
  79. data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +2 -2
  80. data/vendor/assets/javascripts/ckeditor/lang/zh.js +2 -2
  81. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -1
  82. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +1 -1
  83. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +1 -1
  84. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +1 -1
  85. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
  86. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +1 -1
  87. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +1 -1
  88. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +1 -1
  89. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +1 -1
  90. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +1 -1
  91. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +1 -1
  92. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +1 -1
  93. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +1 -1
  94. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +1 -1
  95. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +1 -1
  96. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +1 -1
  97. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +1 -1
  98. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +1 -1
  99. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +1 -1
  100. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +1 -1
  101. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +1 -1
  102. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +1 -1
  103. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +1 -1
  104. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +1 -1
  105. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +1 -1
  106. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +1 -1
  107. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +1 -1
  108. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +1 -1
  109. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +1 -1
  110. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +1 -1
  111. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +1 -1
  112. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +1 -1
  113. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +1 -1
  114. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +1 -1
  115. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +1 -1
  116. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +1 -1
  117. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +1 -1
  118. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +1 -1
  119. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +1 -1
  120. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +1 -1
  121. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +1 -1
  122. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +1 -1
  123. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +1 -1
  124. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +1 -1
  125. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +1 -1
  126. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +1 -1
  127. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +1 -1
  128. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +1 -1
  129. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +1 -1
  130. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +1 -1
  131. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +1 -1
  132. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +1 -1
  133. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +1 -1
  134. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +1 -1
  135. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +1 -1
  136. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +1 -1
  137. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +1 -1
  138. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +1 -1
  139. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +1 -1
  140. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +1 -1
  141. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +1 -1
  142. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +1 -1
  143. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +1 -1
  144. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +1 -1
  145. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
  146. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
  147. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.css +1 -1
  148. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
  149. data/vendor/assets/javascripts/ckeditor/plugins/copyformatting/styles/copyformatting.css +1 -1
  150. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  151. data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +2 -2
  152. data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +1 -1
  153. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
  154. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
  155. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +1 -1
  156. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
  157. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
  158. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +1 -1
  159. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
  160. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
  161. data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
  162. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +1 -1
  163. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
  164. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +1 -1
  165. data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
  166. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +40 -37
  167. data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
  168. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +1 -1
  169. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +2 -2
  170. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +2 -2
  171. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
  172. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +2 -2
  173. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +1 -1
  174. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +1 -1
  175. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +1 -1
  176. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +1 -1
  177. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +1 -1
  178. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +1 -1
  179. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +1 -1
  180. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +1 -1
  181. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +2 -2
  182. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +1 -1
  183. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +1 -1
  184. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +2 -2
  185. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.js +2 -2
  186. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +1 -1
  187. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +2 -2
  188. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +1 -1
  189. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +1 -1
  190. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +1 -1
  191. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +1 -1
  192. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +2 -2
  193. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +1 -1
  194. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +2 -2
  195. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +1 -1
  196. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +1 -1
  197. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +2 -2
  198. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +1 -1
  199. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +1 -1
  200. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +2 -2
  201. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +1 -1
  202. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +1 -1
  203. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +1 -1
  204. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +1 -1
  205. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/oc.js +1 -1
  206. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +1 -1
  207. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +1 -1
  208. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +1 -1
  209. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
  210. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +2 -2
  211. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +1 -1
  212. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +1 -1
  213. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +1 -1
  214. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +1 -1
  215. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +2 -2
  216. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +1 -1
  217. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +1 -1
  218. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +2 -2
  219. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +1 -1
  220. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +1 -1
  221. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +1 -1
  222. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +1 -1
  223. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
  224. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +1 -1
  225. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
  226. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
  227. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
  228. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +1 -1
  229. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog.css +1 -1
  230. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie.css +1 -1
  231. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie8.css +1 -1
  232. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_iequirks.css +1 -1
  233. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor.css +2 -2
  234. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_gecko.css +2 -2
  235. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie.css +2 -2
  236. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie8.css +2 -2
  237. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_iequirks.css +2 -2
  238. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/readme.md +1 -1
  239. data/vendor/assets/javascripts/ckeditor/styles.js +11 -11
  240. metadata +6 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d652d98d704ef8782a089d255da989124754810
4
- data.tar.gz: 50afe28640c1c50b7b53b9e5d6c14cc091a7ee2d
3
+ metadata.gz: 5f01d39fd69d31cd2d055978561b4bcbe3f1777b
4
+ data.tar.gz: 80a0c2fc15842b9ff6403f6d213c58f306726f7d
5
5
  SHA512:
6
- metadata.gz: 3639f86c5848f725529c3f9a28780de3c374a2b25dd2a44c78afaa80b8504f03087549c6e324d80f6ead7b6ac7e15510c027689fcd18a2a8fe65c38129443552
7
- data.tar.gz: 0ec0fcb249900dadd3d5d552f563b6ab7e194c9de136beb400e06692829092c587de5958c2c3483ac50fdc65a0720fa8ace138ad2dec92093c6cde15e76bcbd9
6
+ metadata.gz: 3dcd349b482553c6cbe7a3dccfaf61934c9a4c3b1b8bdcd9949dd6831d03252e23aa633b084cca7a74a6e23369d8a0416eb5e28d148f8f88d36c4ab736e21894
7
+ data.tar.gz: bada24f9807287455e3d5c208abf5e7c2cf2cdf0d64da638a68cea8d78bf9bab1b0525e1d50223151da6def6d94b6bde47b719c238aac4e5a69737ff63d134e1
data/README.md CHANGED
@@ -8,7 +8,7 @@ CKEditor is a WYSIWYG text editor designed to simplify web content creation. It
8
8
 
9
9
  ## Features
10
10
 
11
- * CKEditor version 4.6.1 full (08 Dec 2016)
11
+ * CKEditor version 4.6.2 full (12 Jan 2017)
12
12
  * Rails 5.0.x, 4.2.x integration
13
13
  * Files browser
14
14
  * HTML5 file uploader
@@ -1,6 +1,6 @@
1
1
  module Ckeditor
2
2
  module Version
3
- GEM = '4.2.2'.freeze
4
- EDITOR = '4.6.1'.freeze
3
+ GEM = '4.2.3'.freeze
4
+ EDITOR = '4.6.2'.freeze
5
5
  end
6
6
  end
@@ -4,7 +4,7 @@ namespace :ckeditor do
4
4
  desc 'Create nondigest versions of all ckeditor digest assets'
5
5
  task nondigest: :environment do
6
6
  fingerprint = /\-[0-9a-f]{32,64}\./
7
- path = Rails.root.join('public', Ckeditor.base_path, '**/*')
7
+ path = Rails.root.join("public#{Ckeditor.base_path}**/*")
8
8
 
9
9
  Dir[path].each do |file|
10
10
  next unless file =~ fingerprint
@@ -1,6 +1,28 @@
1
1
  CKEditor 4 Changelog
2
2
  ====================
3
3
 
4
+ ## CKEditor 4.6.2
5
+
6
+ New Features:
7
+
8
+ * [#16733](http://dev.ckeditor.com/ticket/16733): Added a new pastel color palette for the [Color Button](http://ckeditor.com/addon/colorbutton) plugin and a new [`config.colorButton_colorsPerRow`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-colorButton_colorsPerRow) configuration option for setting the number of rows in the color selector.
9
+ * [#16752](http://dev.ckeditor.com/ticket/16752): Added a new Azerbaijani localization. Thanks to the [Azerbaijani language team](https://www.transifex.com/ckeditor/teams/11143/az/)!
10
+ * [#13818](http://dev.ckeditor.com/ticket/13818): It is now possible to group [Widget](http://ckeditor.com/addon/widget) [style definitions](http://docs.ckeditor.com/#!/guide/dev_styles-section-widget-styles), so applying one style disables the other.
11
+
12
+ Fixed Issues:
13
+
14
+ * [#13446](http://dev.ckeditor.com/ticket/13446): [Chrome] Fixed: It is possible to type in an unfocused inline editor.
15
+ * [#14856](http://dev.ckeditor.com/ticket/14856): Fixed: [Font size and font family](http://ckeditor.com/addon/font) reset each other when modified at certain positions.
16
+ * [#16745](http://dev.ckeditor.com/ticket/16745): [Edge] Fixed: List items are lost when [pasted from Word](http://ckeditor.com/addon/pastefromword).
17
+ * [#16682](http://dev.ckeditor.com/ticket/16682): [Edge] Fixed: A list gets [pasted from Word](http://ckeditor.com/addon/pastefromword) as a set of paragraphs. Added the [`config.pasteFromWord_heuristicsEdgeList`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWord_heuristicsEdgeList) configuration option.
18
+ * [#10373](http://dev.ckeditor.com/ticket/10373): Fixed: Context menu items can be dragged into the editor.
19
+ * [#16728](http://dev.ckeditor.com/ticket/16728): [IE] Fixed: [Copy Formatting](http://ckeditor.com/addon/copyformatting) breaks the editor in Quirks Mode.
20
+ * [#16795](http://dev.ckeditor.com/ticket/16795): [IE] Fixed: [Copy Formatting](http://ckeditor.com/addon/copyformatting) breaks the editor in Compatibility Mode.
21
+ * [#16675](http://dev.ckeditor.com/ticket/16675): Fixed: Styles applied with [Copy Formatting](http://ckeditor.com/addon/copyformatting) to a single table cell are applied to the whole table.
22
+ * [#16753](http://dev.ckeditor.com/ticket/16753): Fixed: [`element.setSize`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-setSize) sets incorrect editor dimensions if the border width is represented as a fraction of pixels.
23
+ * [#16705](http://dev.ckeditor.com/ticket/16705): [Firefox] Fixed: Unable to paste images as Base64 strings when using [Clipboard](http://ckeditor.com/addon/clipboard).
24
+ * [#14869](http://dev.ckeditor.com/ticket/14869): Fixed: JavaScript error is thrown when trying to use [Find](http://ckeditor.com/addon/find) in a [`<div>`-based editor](http://ckeditor.com/addon/divarea).
25
+
4
26
  ## CKEditor 4.6.1
5
27
 
6
28
  New Features:
@@ -2,7 +2,7 @@ Software License Agreement
2
2
  ==========================
3
3
 
4
4
  CKEditor - The text editor for Internet - http://ckeditor.com
5
- Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
5
+ Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
6
6
 
7
7
  Licensed under the terms of any of the following licenses at your
8
8
  choice:
@@ -37,7 +37,7 @@ done by developers outside of CKSource with their express permission.
37
37
 
38
38
  The following libraries are included in CKEditor under the MIT license (see Appendix D):
39
39
 
40
- * CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2016, CKSource - Frederico Knabben.
40
+ * CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2017, CKSource - Frederico Knabben.
41
41
  * PicoModal (included in `samples/js/sf.js`) - Copyright (c) 2012 James Frasca.
42
42
  * CodeMirror (included in the samples) - Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others.
43
43
 
@@ -1,7 +1,7 @@
1
1
  CKEditor 4
2
2
  ==========
3
3
 
4
- Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
4
+ Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
5
5
  http://ckeditor.com - See LICENSE.md for license information.
6
6
 
7
7
  CKEditor is a text editor to be used inside web pages. It's not a replacement
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.md or http://ckeditor.com/license
4
4
  */
5
5
  (function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},
@@ -1,15 +1,15 @@
1
1
  /*
2
- Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.md or http://ckeditor.com/license
4
4
  */
5
- (function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"GB8C",version:"4.6.1",revision:"580bcaf",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var l=c[d].src.match(a);if(l){b=l[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
5
+ (function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"H0CG",version:"4.6.2",revision:"20af917",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var h=c[d].src.match(a);if(h){b=h[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
6
6
  b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",
7
7
  a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),b())}catch(c){}}function b(){for(var a;a=c.shift();)a()}var c=[];return function(b){function d(){try{document.documentElement.doScroll("left")}catch(f){setTimeout(d,1);return}a()}c.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",
8
8
  a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(r){}document.documentElement.doScroll&&b&&d()}}}()},b=window.CKEDITOR_GETURL;if(b){var c=d.getUrl;d.getUrl=function(a){return b.call(d,a)||c.call(d,a)}}return d}());
9
9
  CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var d=CKEDITOR.event.prototype,b;for(b in d)null==a[b]&&(a[b]=d[b])},CKEDITOR.event.prototype=function(){function a(a){var e=d(this);return e[a]||(e[a]=new b(a))}var d=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var b=0,d=this.listeners;b<d.length;b++)if(d[b].fn==a)return b;return-1}};
10
- return{define:function(b,d){var g=a.call(this,b);CKEDITOR.tools.extend(g,d,!0)},on:function(b,d,g,h,l){function m(a,f,C,l){a={name:b,sender:this,editor:a,data:f,listenerData:h,stop:C,cancel:l,removeListener:r};return!1===d.call(g,a)?!1:a.data}function r(){C.removeListener(b,d)}var f=a.call(this,b);if(0>f.getListenerIndex(d)){f=f.listeners;g||(g=this);isNaN(l)&&(l=10);var C=this;m.fn=d;m.priority=l;for(var u=f.length-1;0<=u;u--)if(f[u].priority<=l)return f.splice(u+1,0,m),{removeListener:r};f.unshift(m)}return{removeListener:r}},
11
- once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},g=0,h=function(){g=1};return function(l,m,r){var f=d(this)[l];l=a;var C=g;a=g=0;if(f){var u=f.listeners;if(u.length)for(var u=u.slice(0),A,y=0;y<u.length;y++){if(f.errorProof)try{A=
12
- u[y].call(this,r,m,b,h)}catch(q){}else A=u[y].call(this,r,m,b,h);!1===A?g=1:"undefined"!=typeof A&&(m=A);if(a||g)break}}m=g?!1:"undefined"==typeof m?!0:m;a=l;g=C;return m}}(),fireOnce:function(a,b,g){b=this.fire(a,b,g);delete d(this)[a];return b},removeListener:function(a,b){var g=d(this)[a];if(g){var h=g.getListenerIndex(b);0<=h&&g.listeners.splice(h,1)}},removeAllListeners:function(){var a=d(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=d(this)[a])&&0<a.listeners.length}}}());
10
+ return{define:function(b,d){var g=a.call(this,b);CKEDITOR.tools.extend(g,d,!0)},on:function(b,d,g,k,h){function p(a,f,B,h){a={name:b,sender:this,editor:a,data:f,listenerData:k,stop:B,cancel:h,removeListener:r};return!1===d.call(g,a)?!1:a.data}function r(){B.removeListener(b,d)}var f=a.call(this,b);if(0>f.getListenerIndex(d)){f=f.listeners;g||(g=this);isNaN(h)&&(h=10);var B=this;p.fn=d;p.priority=h;for(var u=f.length-1;0<=u;u--)if(f[u].priority<=h)return f.splice(u+1,0,p),{removeListener:r};f.unshift(p)}return{removeListener:r}},
11
+ once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},g=0,k=function(){g=1};return function(h,p,r){var f=d(this)[h];h=a;var B=g;a=g=0;if(f){var u=f.listeners;if(u.length)for(var u=u.slice(0),z,y=0;y<u.length;y++){if(f.errorProof)try{z=
12
+ u[y].call(this,r,p,b,k)}catch(m){}else z=u[y].call(this,r,p,b,k);!1===z?g=1:"undefined"!=typeof z&&(p=z);if(a||g)break}}p=g?!1:"undefined"==typeof p?!0:p;a=h;g=B;return p}}(),fireOnce:function(a,b,g){b=this.fire(a,b,g);delete d(this)[a];return b},removeListener:function(a,b){var g=d(this)[a];if(g){var k=g.getListenerIndex(b);0<=k&&g.listeners.splice(k,1)}},removeAllListeners:function(){var a=d(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=d(this)[a])&&0<a.listeners.length}}}());
13
13
  CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,d,this)},CKEDITOR.editor.prototype.fireOnce=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
14
14
  CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),d=a.match(/edge[ \/](\d+.?\d*)/),b=-1<a.indexOf("trident/"),b=!(!d&&!b),b={ie:b,edge:!!d,webkit:!b&&-1<a.indexOf(" applewebkit/"),air:-1<a.indexOf(" adobeair/"),mac:-1<a.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<a.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;
15
15
  return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};b.gecko="Gecko"==navigator.product&&!b.webkit&&!b.ie;b.webkit&&(-1<a.indexOf("chrome")?b.chrome=!0:b.safari=!0);var c=0;b.ie&&(c=d?parseFloat(d[1]):b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,b.ie9Compat=9==c,b.ie8Compat=8==c,b.ie7Compat=7==c,b.ie6Compat=7>c||b.quirks);b.gecko&&(d=a.match(/rv:([\d\.]+)/))&&(d=d[1].split("."),c=1E4*d[0]+100*(d[1]||0)+1*(d[2]||0));b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));
@@ -19,39 +19,39 @@ b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");retu
19
19
  CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*d))})})();CKEDITOR.status="basic_loaded"}();"use strict";CKEDITOR.VERBOSITY_WARN=1;CKEDITOR.VERBOSITY_ERROR=2;CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR;CKEDITOR.warn=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:d})};
20
20
  CKEDITOR.error=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:d})};
21
21
  CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var d=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[d]("[CKEDITOR] Error code: "+b+".",a);else console[d]("[CKEDITOR] Error code: "+b+".");console[d]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+b)}},null,null,999);CKEDITOR.dom={};
22
- (function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,e=/</g,g=/"/g,h=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,l={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},m=function(a,f){return"#"==f[0]?String.fromCharCode(parseInt(f.slice(1),10)):l[f]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,f){if(!a&&!f)return!0;if(!a||!f||a.length!=f.length)return!1;for(var b=0;b<a.length;b++)if(a[b]!=f[b])return!1;
22
+ (function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,e=/</g,g=/"/g,k=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,h={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},p=function(a,f){return"#"==f[0]?String.fromCharCode(parseInt(f.slice(1),10)):h[f]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,f){if(!a&&!f)return!0;if(!a||!f||a.length!=f.length)return!1;for(var b=0;b<a.length;b++)if(a[b]!=f[b])return!1;
23
23
  return!0},getIndex:function(a,f){for(var b=0;b<a.length;++b)if(f(a[b]))return b;return-1},clone:function(a){var f;if(a&&a instanceof Array){f=[];for(var b=0;b<a.length;b++)f[b]=CKEDITOR.tools.clone(a[b]);return f}if(null===a||"object"!=typeof a||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp||a.nodeType||a.window===a)return a;f=new a.constructor;for(b in a)f[b]=CKEDITOR.tools.clone(a[b]);return f},capitalize:function(a,f){return a.charAt(0).toUpperCase()+
24
- (f?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var f=arguments.length,b,c;"boolean"==typeof(b=arguments[f-1])?f--:"boolean"==typeof(b=arguments[f-2])&&(c=arguments[f-1],f-=2);for(var l=1;l<f;l++){var d=arguments[l],q;for(q in d)if(!0===b||null==a[q])if(!c||q in c)a[q]=d[q]}return a},prototypedCopy:function(a){var f=function(){};f.prototype=a;return new f},copy:function(a){var f={},b;for(b in a)f[b]=a[b];return f},isArray:function(a){return"[object Array]"==Object.prototype.toString.call(a)},
24
+ (f?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var f=arguments.length,b,c;"boolean"==typeof(b=arguments[f-1])?f--:"boolean"==typeof(b=arguments[f-2])&&(c=arguments[f-1],f-=2);for(var h=1;h<f;h++){var d=arguments[h],m;for(m in d)if(!0===b||null==a[m])if(!c||m in c)a[m]=d[m]}return a},prototypedCopy:function(a){var f=function(){};f.prototype=a;return new f},copy:function(a){var f={},b;for(b in a)f[b]=a[b];return f},isArray:function(a){return"[object Array]"==Object.prototype.toString.call(a)},
25
25
  isEmpty:function(a){for(var f in a)if(a.hasOwnProperty(f))return!1;return!0},cssVendorPrefix:function(a,f,b){if(b)return d+a+":"+f+";"+a+":"+f;b={};b[a]=f;b[d+a]=f;return b},cssStyleToDomStyle:function(){var a=document.createElement("div").style,f="undefined"!=typeof a.cssFloat?"cssFloat":"undefined"!=typeof a.styleFloat?"styleFloat":"float";return function(a){return"float"==a?f:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a=[].concat(a);for(var f,
26
- b=[],c=0;c<a.length;c++)if(f=a[c])/@import|[{}]/.test(f)?b.push("\x3cstyle\x3e"+f+"\x3c/style\x3e"):b.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+f+'"\x3e');return b.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(b,"\x26amp;").replace(c,"\x26gt;").replace(e,"\x26lt;")},htmlDecode:function(a){return a.replace(h,m)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(g,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},
27
- transformPlainTextToHtml:function(a,f){var b=f==CKEDITOR.ENTER_BR,c=this.htmlEncode(a.replace(/\r\n/g,"\n")),c=c.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),l=f==CKEDITOR.ENTER_P?"p":"div";if(!b){var d=/\n{2}/g;if(d.test(c))var q="\x3c"+l+"\x3e",m="\x3c/"+l+"\x3e",c=q+c.replace(d,function(){return m+q})+m}c=c.replace(/\n/g,"\x3cbr\x3e");b||(c=c.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+l+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));c=c.replace(/^ | $/g,"\x26nbsp;");return c=c.replace(/(>|\s) /g,
28
- function(a,f){return f+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",f=0;8>f;f++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,f){var b=f(a);b.prototype=a.prototype;return b},setTimeout:function(a,f,b,c,l){l||(l=window);b||(b=l);return l.setTimeout(function(){c?a.apply(b,[].concat(c)):a.apply(b)},
26
+ b=[],c=0;c<a.length;c++)if(f=a[c])/@import|[{}]/.test(f)?b.push("\x3cstyle\x3e"+f+"\x3c/style\x3e"):b.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+f+'"\x3e');return b.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(b,"\x26amp;").replace(c,"\x26gt;").replace(e,"\x26lt;")},htmlDecode:function(a){return a.replace(k,p)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(g,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},
27
+ transformPlainTextToHtml:function(a,f){var b=f==CKEDITOR.ENTER_BR,c=this.htmlEncode(a.replace(/\r\n/g,"\n")),c=c.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),h=f==CKEDITOR.ENTER_P?"p":"div";if(!b){var d=/\n{2}/g;if(d.test(c))var m="\x3c"+h+"\x3e",p="\x3c/"+h+"\x3e",c=m+c.replace(d,function(){return p+m})+p}c=c.replace(/\n/g,"\x3cbr\x3e");b||(c=c.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+h+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));c=c.replace(/^ | $/g,"\x26nbsp;");return c=c.replace(/(>|\s) /g,
28
+ function(a,f){return f+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",f=0;8>f;f++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,f){var b=f(a);b.prototype=a.prototype;return b},setTimeout:function(a,f,b,c,h){h||(h=window);b||(b=h);return h.setTimeout(function(){c?a.apply(b,[].concat(c)):a.apply(b)},
29
29
  f||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(f){return f.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(f){return f.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(f){return f.replace(a,"")}}(),indexOf:function(a,f){if("function"==typeof f)for(var b=0,c=a.length;b<c;b++){if(f(a[b]))return b}else{if(a.indexOf)return a.indexOf(f);b=0;for(c=a.length;b<c;b++)if(a[b]===f)return b}return-1},search:function(a,f){var b=CKEDITOR.tools.indexOf(a,
30
- f);return 0<=b?a[b]:null},bind:function(a,f){return function(){return a.apply(f,arguments)}},createClass:function(a){var f=a.$,b=a.base,c=a.privates||a._,l=a.proto;a=a.statics;!f&&(f=function(){b&&this.base.apply(this,arguments)});if(c)var d=f,f=function(){var a=this._||(this._={}),f;for(f in c){var b=c[f];a[f]="function"==typeof b?CKEDITOR.tools.bind(b,this):b}d.apply(this,arguments)};b&&(f.prototype=this.prototypedCopy(b.prototype),f.prototype.constructor=f,f.base=b,f.baseProto=b.prototype,f.prototype.base=
31
- function(){this.base=b.prototype.base;b.apply(this,arguments);this.base=arguments.callee});l&&this.extend(f.prototype,l,!0);a&&this.extend(f,a,!0);return f},addFunction:function(b,f){return a.push(function(){return b.apply(f||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var f=a[b];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,f;return function(b){f=CKEDITOR.tools.trim(b+"")+"px";return a.test(f)?
32
- f:b||""}}(),convertToPx:function(){var a;return function(f){a||(a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(a));return/%$/.test(f)?f:(a.setStyle("width",f),a.$.clientWidth)}}(),repeat:function(a,f){return Array(f+1).join(a)},tryThese:function(){for(var a,f=0,b=arguments.length;f<b;f++){var c=arguments[f];try{a=c();break}catch(l){}}return a},
33
- genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var f=arguments,b=this;window.setTimeout(function(){a.apply(b,f)},0)}},normalizeCssText:function(a,f){var b=[],c,l=CKEDITOR.tools.parseCssText(a,!0,f);for(c in l)b.push(c+":"+l[c]);b.sort();return b.length?b.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,b,c,l){a=[b,c,l];for(b=0;3>b;b++)a[b]=("0"+parseInt(a[b],10).toString(16)).slice(-2);
34
- return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,b,c,l){a=b.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+l})},parseCssText:function(a,b,c){var l={};c&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return l;a.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
35
- function(a,c,q){b&&(c=c.toLowerCase(),"font-family"==c&&(q=q.replace(/\s*,\s*/g,",")),q=CKEDITOR.tools.trim(q));l[c]=q});return l},writeCssText:function(a,b){var c,l=[];for(c in a)l.push(c+":"+a[c]);b&&l.sort();return l.join("; ")},objectCompare:function(a,b,c){var l;if(!a&&!b)return!0;if(!a||!b)return!1;for(l in a)if(a[l]!=b[l])return!1;if(!c)for(l in b)if(a[l]!=b[l])return!1;return!0},objectKeys:function(a){var b=[],c;for(c in a)b.push(c);return b},convertArrayToObject:function(a,b){var c={};1==
36
- arguments.length&&(b=!0);for(var l=0,d=a.length;l<d;++l)c[a[l]]=b;return c},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(b){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,b,c){function l(){m=(new Date).getTime();d=!1;c?b.call(c):b()}var d,m=0;return{input:function(){if(!d){var b=(new Date).getTime()-m;b<a?d=setTimeout(l,a-b):l()}},reset:function(){d&&clearTimeout(d);d=m=0}}},enableHtml5Elements:function(a,
37
- b){for(var c="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),l=c.length,d;l--;)d=a.createElement(c[l]),b&&a.appendChild(d)},checkIfAnyArrayItemMatches:function(a,b){for(var c=0,l=a.length;c<l;++c)if(a[c].match(b))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,b){for(var c in a)if(c.match(b))return!0;return!1},keystrokeToString:function(a,b){var c=b&16711680,l=
38
- b&65535,d=CKEDITOR.env.mac,m=[],q=[];c&CKEDITOR.CTRL&&(m.push(d?"⌘":a[17]),q.push(d?a[224]:a[17]));c&CKEDITOR.ALT&&(m.push(d?"⌥":a[18]),q.push(a[18]));c&CKEDITOR.SHIFT&&(m.push(d?"⇧":a[16]),q.push(a[16]));l&&(a[l]?(m.push(a[l]),q.push(a[l])):(m.push(String.fromCharCode(l)),q.push(String.fromCharCode(l))));return{display:m.join("+"),aria:q.join("+")}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();
39
- for(var b=document.cookie.split(";"),c,l,d=0;d<b.length;d++)if(c=b[d].split("\x3d"),l=decodeURIComponent(CKEDITOR.tools.trim(c[0]).toLowerCase()),l===a)return decodeURIComponent(1<c.length?c[1]:"");return null},setCookie:function(a,b){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(b)+";path\x3d/"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],b="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);
40
- else for(var c=0;40>c;c++)a.push(Math.floor(256*Math.random()));for(c=0;c<a.length;c++)var l="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[c]%36),b=b+(.5<Math.random()?l.toUpperCase():l);a=b;CKEDITOR.tools.setCookie("ckCsrfToken",a)}return a},escapeCss:function(a){return a?window.CSS&&CSS.escape?CSS.escape(a):isNaN(parseInt(a.charAt(0),10))?a:"\\3"+a.charAt(0)+" "+a.substring(1,a.length):""},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",
30
+ f);return 0<=b?a[b]:null},bind:function(a,f){return function(){return a.apply(f,arguments)}},createClass:function(a){var f=a.$,b=a.base,c=a.privates||a._,h=a.proto;a=a.statics;!f&&(f=function(){b&&this.base.apply(this,arguments)});if(c)var d=f,f=function(){var a=this._||(this._={}),f;for(f in c){var b=c[f];a[f]="function"==typeof b?CKEDITOR.tools.bind(b,this):b}d.apply(this,arguments)};b&&(f.prototype=this.prototypedCopy(b.prototype),f.prototype.constructor=f,f.base=b,f.baseProto=b.prototype,f.prototype.base=
31
+ function(){this.base=b.prototype.base;b.apply(this,arguments);this.base=arguments.callee});h&&this.extend(f.prototype,h,!0);a&&this.extend(f,a,!0);return f},addFunction:function(b,f){return a.push(function(){return b.apply(f||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var f=a[b];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,f;return function(b){f=CKEDITOR.tools.trim(b+"")+"px";return a.test(f)?
32
+ f:b||""}}(),convertToPx:function(){var a;return function(f){a||(a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(a));return/%$/.test(f)?f:(a.setStyle("width",f),a.$.clientWidth)}}(),repeat:function(a,f){return Array(f+1).join(a)},tryThese:function(){for(var a,f=0,b=arguments.length;f<b;f++){var c=arguments[f];try{a=c();break}catch(h){}}return a},
33
+ genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var f=arguments,b=this;window.setTimeout(function(){a.apply(b,f)},0)}},normalizeCssText:function(a,f){var b=[],c,h=CKEDITOR.tools.parseCssText(a,!0,f);for(c in h)b.push(c+":"+h[c]);b.sort();return b.length?b.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,b,c,h){a=[b,c,h];for(b=0;3>b;b++)a[b]=("0"+parseInt(a[b],10).toString(16)).slice(-2);
34
+ return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,b,c,h){a=b.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+h})},parseCssText:function(a,f,b){var c={};b&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return c;a.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
35
+ function(a,b,h){f&&(b=b.toLowerCase(),"font-family"==b&&(h=h.replace(/\s*,\s*/g,",")),h=CKEDITOR.tools.trim(h));c[b]=h});return c},writeCssText:function(a,b){var c,h=[];for(c in a)h.push(c+":"+a[c]);b&&h.sort();return h.join("; ")},objectCompare:function(a,b,c){var h;if(!a&&!b)return!0;if(!a||!b)return!1;for(h in a)if(a[h]!=b[h])return!1;if(!c)for(h in b)if(a[h]!=b[h])return!1;return!0},objectKeys:function(a){var b=[],c;for(c in a)b.push(c);return b},convertArrayToObject:function(a,b){var c={};1==
36
+ arguments.length&&(b=!0);for(var h=0,d=a.length;h<d;++h)c[a[h]]=b;return c},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(b){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,b,c){function h(){p=(new Date).getTime();d=!1;c?b.call(c):b()}var d,p=0;return{input:function(){if(!d){var b=(new Date).getTime()-p;b<a?d=setTimeout(h,a-b):h()}},reset:function(){d&&clearTimeout(d);d=p=0}}},enableHtml5Elements:function(a,
37
+ b){for(var c="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),h=c.length,d;h--;)d=a.createElement(c[h]),b&&a.appendChild(d)},checkIfAnyArrayItemMatches:function(a,b){for(var c=0,h=a.length;c<h;++c)if(a[c].match(b))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,b){for(var c in a)if(c.match(b))return!0;return!1},keystrokeToString:function(a,b){var c=b&16711680,h=
38
+ b&65535,d=CKEDITOR.env.mac,p=[],m=[];c&CKEDITOR.CTRL&&(p.push(d?"⌘":a[17]),m.push(d?a[224]:a[17]));c&CKEDITOR.ALT&&(p.push(d?"⌥":a[18]),m.push(a[18]));c&CKEDITOR.SHIFT&&(p.push(d?"⇧":a[16]),m.push(a[16]));h&&(a[h]?(p.push(a[h]),m.push(a[h])):(p.push(String.fromCharCode(h)),m.push(String.fromCharCode(h))));return{display:p.join("+"),aria:m.join("+")}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();
39
+ for(var b=document.cookie.split(";"),c,h,d=0;d<b.length;d++)if(c=b[d].split("\x3d"),h=decodeURIComponent(CKEDITOR.tools.trim(c[0]).toLowerCase()),h===a)return decodeURIComponent(1<c.length?c[1]:"");return null},setCookie:function(a,b){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(b)+";path\x3d/"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],b="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);
40
+ else for(var c=0;40>c;c++)a.push(Math.floor(256*Math.random()));for(c=0;c<a.length;c++)var h="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[c]%36),b=b+(.5<Math.random()?h.toUpperCase():h);a=b;CKEDITOR.tools.setCookie("ckCsrfToken",a)}return a},escapeCss:function(a){return a?window.CSS&&CSS.escape?CSS.escape(a):isNaN(parseInt(a.charAt(0),10))?a:"\\3"+a.charAt(0)+" "+a.substring(1,a.length):""},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",
41
41
  beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",
42
42
  darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",
43
43
  grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",
44
44
  lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",
45
45
  orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",
46
46
  slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(a){var b=[],c=[],c=this._findColor(a);
47
- c.length&&(b.color=c[0],CKEDITOR.tools.array.forEach(c,function(b){a=a.replace(b,"")}));if(a=CKEDITOR.tools.trim(a))b.unprocessed=a;return b},margin:function(a){function b(a){c.top=l[a[0]];c.right=l[a[1]];c.bottom=l[a[2]];c.left=l[a[3]]}var c={},l=a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(l.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}return c},_findColor:function(a){var b=[],c=CKEDITOR.tools.array,b=
48
- b.concat(a.match(this._rgbaRegExp)||[]),b=b.concat(a.match(this._hslaRegExp)||[]);return b=b.concat(c.filter(a.split(/\s+/),function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,b,c){var l=[];this.forEach(a,function(d,m){b.call(c,d,m,a)&&l.push(d)});return l},forEach:function(a,b,c){var l=a.length,d;for(d=0;d<l;d++)b.call(c,a[d],d,a)}}};CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=
49
- CKEDITOR.tools.isArray})();
50
- CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,d=function(a,b){for(var c=CKEDITOR.tools.clone(a),l=1;l<arguments.length;l++){b=arguments[l];for(var d in b)delete c[d]}return c},b={},c={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},g={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},l={"#":1},m={center:1,dir:1,noframes:1};
51
- a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},l,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,e,b,m);d={a:d(b,{a:1,button:1}),abbr:b,address:c,
52
- area:h,article:c,aside:c,audio:a({source:1,track:1},c),b:b,base:h,bdi:b,bdo:b,blockquote:c,body:c,br:h,button:d(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:c,dl:{dt:1,dd:1},dt:c,em:b,embed:h,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},g),header:c,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,
53
- body:1},c,g),i:b,iframe:l,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:c,link:h,main:c,map:c,mark:b,menu:a({li:1},c),meta:h,meter:d(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:l,output:b,p:b,param:h,pre:b,progress:d(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:l,section:c,select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:l,sub:b,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},b),
54
- sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:l,tfoot:{tr:1},th:c,thead:{tr:1},time:d(b,{time:1}),title:l,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:h,acronym:b,applet:a({param:1},c),basefont:h,big:b,center:c,dialog:h,dir:{li:1},font:b,isindex:h,noframes:c,strike:b,tt:b};a(d,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,m),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,
47
+ c.length&&(b.color=c[0],CKEDITOR.tools.array.forEach(c,function(b){a=a.replace(b,"")}));if(a=CKEDITOR.tools.trim(a))b.unprocessed=a;return b},margin:function(a){function b(a){c.top=h[a[0]];c.right=h[a[1]];c.bottom=h[a[2]];c.left=h[a[3]]}var c={},h=a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(h.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}return c},_findColor:function(a){var b=[],c=CKEDITOR.tools.array,b=
48
+ b.concat(a.match(this._rgbaRegExp)||[]),b=b.concat(a.match(this._hslaRegExp)||[]);return b=b.concat(c.filter(a.split(/\s+/),function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,b,c){var h=[];this.forEach(a,function(d,p){b.call(c,d,p,a)&&h.push(d)});return h},forEach:function(a,b,c){var h=a.length,d;for(d=0;d<h;d++)b.call(c,a[d],d,a)},map:function(a,b,c){for(var h=[],d=0;d<a.length;d++)h.push(b.call(c,
49
+ a[d],d,a));return h},reduce:function(a,b,c,h){for(var d=0;d<a.length;d++)c=b.call(h,c,a[d],d,a);return c}}};CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray})();
50
+ CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,d=function(a,b){for(var c=CKEDITOR.tools.clone(a),h=1;h<arguments.length;h++){b=arguments[h];for(var d in b)delete c[d]}return c},b={},c={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},g={command:1,link:1,meta:1,noscript:1,script:1,style:1},k={},h={"#":1},p={center:1,dir:1,noframes:1};
51
+ a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},h,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,e,b,p);d={a:d(b,{a:1,button:1}),abbr:b,address:c,
52
+ area:k,article:c,aside:c,audio:a({source:1,track:1},c),b:b,base:k,bdi:b,bdo:b,blockquote:c,body:c,br:k,button:d(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:k,colgroup:{col:1},command:k,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:c,dl:{dt:1,dd:1},dt:c,em:b,embed:k,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},g),header:c,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:k,html:a({head:1,
53
+ body:1},c,g),i:b,iframe:h,img:k,input:k,ins:b,kbd:b,keygen:k,label:b,legend:b,li:c,link:k,main:c,map:c,mark:b,menu:a({li:1},c),meta:k,meter:d(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:h,output:b,p:b,param:k,pre:b,progress:d(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:h,section:c,select:{optgroup:1,option:1},small:b,source:k,span:b,strong:b,style:h,sub:b,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},b),
54
+ sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:h,tfoot:{tr:1},th:c,thead:{tr:1},time:d(b,{time:1}),title:h,tr:{th:1,td:1},track:k,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:k,acronym:b,applet:a({param:1},c),basefont:k,big:b,center:c,dialog:k,dir:{li:1},font:b,isindex:k,noframes:c,strike:b,tt:b};a(d,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,p),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,
55
55
  fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,
56
56
  track:1,wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},d.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,
57
57
  s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return d}();
@@ -68,8 +68,8 @@ CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NOD
68
68
  CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16;
69
69
  CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,d){a.append(this,d);return a},clone:function(a,d){function b(c){c["data-cke-expando"]&&(c["data-cke-expando"]=!1);if(c.nodeType==CKEDITOR.NODE_ELEMENT||c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(d||c.nodeType!=CKEDITOR.NODE_ELEMENT||c.removeAttribute("id",!1),a){c=c.childNodes;for(var e=0;e<c.length;e++)b(c[e])}}function c(b){if(b.type==CKEDITOR.NODE_ELEMENT||b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=
70
70
  b.getName();":"==d[0]&&b.renameNode(d.substring(1))}if(a)for(d=0;d<b.getChildCount();d++)c(b.getChild(d))}}var e=this.$.cloneNode(a);b(e);e=new CKEDITOR.dom.node(e);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&c(e);return e},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,
71
- a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var d=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var e=c.parentNode;e&&d.unshift(this.getIndex.call({$:c},a));c=e}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function d(a,c){var m=c?a.nextSibling:a.previousSibling;return m&&m.nodeType==CKEDITOR.NODE_TEXT?b(m)?d(m,
72
- c):m:null}function b(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var c=this.$,e=-1,g;if(!this.$.parentNode||a&&c.nodeType==CKEDITOR.NODE_TEXT&&b(c)&&!d(c)&&!d(c,!0))return-1;do a&&c!=this.$&&c.nodeType==CKEDITOR.NODE_TEXT&&(g||b(c))||(e++,g=c.nodeType==CKEDITOR.NODE_TEXT);while(c=c.previousSibling);return e},getNextSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getFirst&&this.getFirst();var e;if(!a){if(this.type==
71
+ a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var d=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var e=c.parentNode;e&&d.unshift(this.getIndex.call({$:c},a));c=e}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function d(a,c){var p=c?a.nextSibling:a.previousSibling;return p&&p.nodeType==CKEDITOR.NODE_TEXT?b(p)?d(p,
72
+ c):p:null}function b(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var c=this.$,e=-1,g;if(!this.$.parentNode||a&&c.nodeType==CKEDITOR.NODE_TEXT&&b(c)&&!d(c)&&!d(c,!0))return-1;do a&&c!=this.$&&c.nodeType==CKEDITOR.NODE_TEXT&&(g||b(c))||(e++,g=c.nodeType==CKEDITOR.NODE_TEXT);while(c=c.previousSibling);return e},getNextSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getFirst&&this.getFirst();var e;if(!a){if(this.type==
73
73
  CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(e=(e||this).getParent());){if(b&&!1===b(e,!0))return null;a=e.getNext()}return!a||b&&!1===b(a)?null:d&&d!=a.type?a.getNextSourceNode(!1,d,b):a},getPreviousSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getLast&&this.getLast();var e;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&&(e=(e||this).getParent());){if(b&&!1===
74
74
  b(e,!0))return null;a=e.getPrevious()}return!a||b&&!1===b(a)?null:d&&a.type!=d?a.getPreviousSourceNode(!1,d,b):a},getPrevious:function(a){var d=this.$,b;do b=(d=d.previousSibling)&&10!=d.nodeType&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getNext:function(a){var d=this.$,b;do b=(d=d.nextSibling)&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getParent:function(a){var d=this.$.parentNode;return d&&(d.nodeType==CKEDITOR.NODE_ELEMENT||a&&d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?
75
75
  new CKEDITOR.dom.node(d):null},getParents:function(a){var d=this,b=[];do b[a?"push":"unshift"](d);while(d=d.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var d=this.contains?this:this.getParent();do if(d.contains(a))return d;while(d=d.getParent());return null},getPosition:function(a){var d=this.$,b=a.$;if(d.compareDocumentPosition)return d.compareDocumentPosition(b);if(d==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==
@@ -83,13 +83,13 @@ CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.foc
83
83
  a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}});CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject;
84
84
  CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var d=new CKEDITOR.dom.element("link");d.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(d)}},appendStyleText:function(a){if(this.$.createStyleSheet){var d=this.$.createStyleSheet("");d.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return d||
85
85
  b.$.sheet},createElement:function(a,d){var b=new CKEDITOR.dom.element(a,this);d&&(d.attributes&&b.setAttributes(d.attributes),d.styles&&b.setStyles(d.styles));return b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(d){return null}return new CKEDITOR.dom.element(a)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,d){for(var b=
86
- this.$.documentElement,c=0;b&&c<a.length;c++){var e=a[c];if(d)for(var g=-1,h=0;h<b.childNodes.length;h++){var l=b.childNodes[h];if(!0!==d||3!=l.nodeType||!l.previousSibling||3!=l.previousSibling.nodeType)if(g++,g==e){b=l;break}}else b=b.childNodes[e]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,d){CKEDITOR.env.ie&&8>=document.documentMode||!d||(a=d+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];
86
+ this.$.documentElement,c=0;b&&c<a.length;c++){var e=a[c];if(d)for(var g=-1,k=0;k<b.childNodes.length;k++){var h=b.childNodes[k];if(!0!==d||3!=h.nodeType||!h.previousSibling||3!=h.previousSibling.nodeType)if(g++,g==e){b=h;break}}else b=b.childNodes[e]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,d){CKEDITOR.env.ie&&8>=document.documentMode||!d||(a=d+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];
87
87
  return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+
88
88
  CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}});CKEDITOR.dom.nodeList=function(a){this.$=a};
89
89
  CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null}};CKEDITOR.dom.element=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;
90
90
  CKEDITOR.dom.element.createFromHtml=function(a,d){var b=new CKEDITOR.dom.element("div",d);b.setHtml(a);return b.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(a,d,b,c){var e=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),g=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[e]=d;g[b]=1;return d.setCustomData(b,c)};
91
91
  CKEDITOR.dom.element.clearAllMarkers=function(a){for(var d in a)CKEDITOR.dom.element.clearMarkers(a,a[d],1)};CKEDITOR.dom.element.clearMarkers=function(a,d,b){var c=d.getCustomData("list_marker_names"),e=d.getCustomData("list_marker_id"),g;for(g in c)d.removeCustomData(g);d.removeCustomData("list_marker_names");b&&(d.removeCustomData("list_marker_id"),delete a[e])};
92
- (function(){function a(a,b){return-1<(" "+a+" ").replace(g," ").indexOf(" "+b+" ")}function d(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function b(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function c(a){for(var b=0,c=0,f=h[a].length;c<f;c++)b+=parseInt(this.getComputedStyle(h[a][c])||0,10)||0;return b}var e=document.createElement("_").classList,e="undefined"!==typeof e&&
92
+ (function(){function a(a,b){return-1<(" "+a+" ").replace(g," ").indexOf(" "+b+" ")}function d(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function b(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function c(a){for(var b=0,c=0,f=k[a].length;c<f;c++)b+=parseFloat(this.getComputedStyle(k[a][c])||0,10)||0;return b}var e=document.createElement("_").classList,e="undefined"!==typeof e&&
93
93
  null!==String(e.add).match(/\[Native code\]/gi),g=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:e?function(a){this.$.classList.add(a);return this}:function(b){var c=this.$.className;c&&(a(c,b)||(c+=" "+b));this.$.className=c||b;return this},removeClass:e?function(a){var b=this.$;b.classList.remove(a);b.className||b.removeAttribute("class");return this}:function(b){var c=this.getAttribute("class");c&&a(c,b)&&((c=c.replace(new RegExp("(?:^|\\s+)"+
94
94
  b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",c):this.removeAttribute("class"));return this},hasClass:function(b){return a(this.$.className,b)},append:function(a,b){"string"==typeof a&&(a=this.getDocument().createElement(a));b?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var b=new CKEDITOR.dom.element("div",this.getDocument());b.setHtml(a);b.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=
95
95
  this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a);
@@ -107,174 +107,174 @@ a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var c
107
107
  for(var a=this.getChildren(),b=0,c=a.count();b<c;b++){var f=a.getItem(b);if(f.type!=CKEDITOR.NODE_ELEMENT||!f.data("cke-bookmark"))if(f.type==CKEDITOR.NODE_ELEMENT&&!f.isEmptyInlineRemoveable()||f.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(f.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,b=0;b<a.length;b++){var c=a[b];switch(c.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;
108
108
  default:if(c.specified)return!0}}return!1}:function(){var a=this.$.attributes,b=a.length,c={"data-cke-expando":1,_moz_dirty:1};return 0<b&&(2<b||!c[a[0].nodeName]||2==b&&!c[a[1].nodeName])},hasAttribute:function(){function a(b){var c=this.$.attributes.getNamedItem(b);if("input"==this.getName())switch(b){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return b=this.getAttribute("type"),"checkbox"==b||"radio"==b?"on"!=this.$.value:!!this.$.value}return c?
109
109
  c.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$;a=a.$;if(c!=a){var f;if(b)for(;f=c.lastChild;)a.insertBefore(c.removeChild(f),a.firstChild);else for(;f=c.firstChild;)a.appendChild(c.removeChild(f))}},mergeSiblings:function(){function a(b,c,f){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d=
110
- [];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=f?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var l=f?b.getLast():b.getFirst();d.length;)d.shift().move(b,!f);c.moveChildren(b,!f);c.remove();l&&l.type==CKEDITOR.NODE_ELEMENT&&l.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",
110
+ [];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=f?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var h=f?b.getLast():b.getFirst();d.length;)d.shift().move(b,!f);c.moveChildren(b,!f);c.remove();h&&h.type==CKEDITOR.NODE_ELEMENT&&h.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",
111
111
  visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){"class"==b?this.$.className=c:"style"==b?this.$.style.cssText=c:"tabindex"==b?this.$.tabIndex=c:"checked"==b?this.$.checked=c:"contenteditable"==b?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if("src"==b&&c.match(/^http:\/\//))try{a.apply(this,
112
112
  arguments)}catch(f){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=
113
113
  0;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a=a||this.getAttributes(),a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(b.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var c=["top","left","right","bottom"],f;"border"==a&&(f=["color","style","width"]);for(var b=[],d=0;d<c.length;d++)if(f)for(var u=
114
114
  0;u<f.length;u++)b.push([a,c[d],f[u]].join("-"));else b.push([a,c[d]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select",
115
115
  "none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,f=b.count();c<f;c++)a=b.getItem(c),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,c=0,f=this.getDocument(),d=f.getBody(),u="BackCompat"==f.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
116
- 8!==CKEDITOR.env.version:1)){var e=this.$.getBoundingClientRect(),g=f.$.documentElement,q=g.clientTop||d.$.clientTop||0,x=g.clientLeft||d.$.clientLeft||0,h=!0;CKEDITOR.env.ie&&(h=f.getDocumentElement().contains(this),f=f.getBody().contains(this),h=u&&f||!u&&h);h&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=d.$.scrollLeft||g.scrollLeft,c=d.$.scrollTop||g.scrollTop):(c=u?d.$:g,b=c.scrollLeft,c=c.scrollTop),b=e.left+b-x,c=e.top+c-q)}else for(q=this,x=null;q&&"body"!=q.getName()&&
117
- "html"!=q.getName();){b+=q.$.offsetLeft-q.$.scrollLeft;c+=q.$.offsetTop-q.$.scrollTop;q.equals(this)||(b+=q.$.clientLeft||0,c+=q.$.clientTop||0);for(;x&&!x.equals(q);)b-=x.$.scrollLeft,c-=x.$.scrollTop,x=x.getParent();x=q;q=(e=q.$.offsetParent)?new CKEDITOR.dom.element(e):null}a&&(e=this.getWindow(),q=a.getWindow(),!e.equals(q)&&e.$.frameElement&&(a=(new CKEDITOR.dom.element(e.$.frameElement)).getDocumentPosition(a),b+=a.x,c+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
118
- u||(b+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1),b.is("html")){var c=b.getWindow();try{var f=c.$.frameElement;f&&(b=new CKEDITOR.dom.element(f))}catch(d){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var f,d,e,A;function g(b,c){/body|html/.test(a.getName())?
119
- a.getWindow().$.scrollBy(b,c):(a.$.scrollLeft+=b,a.$.scrollTop+=c)}function q(a,b){var c={x:0,y:0};if(!a.is(h?"body":"html")){var f=a.$.getBoundingClientRect();c.x=f.left;c.y=f.top}f=a.getWindow();f.equals(b)||(f=q(CKEDITOR.dom.element.get(f.$.frameElement),b),c.x+=f.x,c.y+=f.y);return c}function x(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());e=a.getDocument();var h="BackCompat"==e.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=h?e.getBody():e.getDocumentElement());
120
- CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=null);e=a.getWindow();d=q(this,e);var w=q(a,e),E=this.$.offsetHeight;f=this.$.offsetWidth;var k=a.$.clientHeight,p=a.$.clientWidth;e=d.x-x(this,"left")-w.x||0;A=d.y-x(this,"top")-w.y||0;f=d.x+f+x(this,"right")-(w.x+p)||0;d=d.y+E+x(this,"bottom")-(w.y+k)||0;(0>A||0<d)&&g(0,!0===b?A:!1===b?d:0>A?A:d);c&&(0>e||0<f)&&g(0>e?e:f,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
116
+ 8!==CKEDITOR.env.version:1)){var e=this.$.getBoundingClientRect(),g=f.$.documentElement,m=g.clientTop||d.$.clientTop||0,x=g.clientLeft||d.$.clientLeft||0,k=!0;CKEDITOR.env.ie&&(k=f.getDocumentElement().contains(this),f=f.getBody().contains(this),k=u&&f||!u&&k);k&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=d.$.scrollLeft||g.scrollLeft,c=d.$.scrollTop||g.scrollTop):(c=u?d.$:g,b=c.scrollLeft,c=c.scrollTop),b=e.left+b-x,c=e.top+c-m)}else for(m=this,x=null;m&&"body"!=m.getName()&&
117
+ "html"!=m.getName();){b+=m.$.offsetLeft-m.$.scrollLeft;c+=m.$.offsetTop-m.$.scrollTop;m.equals(this)||(b+=m.$.clientLeft||0,c+=m.$.clientTop||0);for(;x&&!x.equals(m);)b-=x.$.scrollLeft,c-=x.$.scrollTop,x=x.getParent();x=m;m=(e=m.$.offsetParent)?new CKEDITOR.dom.element(e):null}a&&(e=this.getWindow(),m=a.getWindow(),!e.equals(m)&&e.$.frameElement&&(a=(new CKEDITOR.dom.element(e.$.frameElement)).getDocumentPosition(a),b+=a.x,c+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
118
+ u||(b+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1),b.is("html")){var c=b.getWindow();try{var f=c.$.frameElement;f&&(b=new CKEDITOR.dom.element(f))}catch(d){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var f,d,e,z;function g(b,c){/body|html/.test(a.getName())?
119
+ a.getWindow().$.scrollBy(b,c):(a.$.scrollLeft+=b,a.$.scrollTop+=c)}function m(a,b){var c={x:0,y:0};if(!a.is(k?"body":"html")){var f=a.$.getBoundingClientRect();c.x=f.left;c.y=f.top}f=a.getWindow();f.equals(b)||(f=m(CKEDITOR.dom.element.get(f.$.frameElement),b),c.x+=f.x,c.y+=f.y);return c}function x(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());e=a.getDocument();var k="BackCompat"==e.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=k?e.getBody():e.getDocumentElement());
120
+ CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=null);e=a.getWindow();d=m(this,e);var w=m(a,e),F=this.$.offsetHeight;f=this.$.offsetWidth;var l=a.$.clientHeight,q=a.$.clientWidth;e=d.x-x(this,"left")-w.x||0;z=d.y-x(this,"top")-w.y||0;f=d.x+f+x(this,"right")-(w.x+q)||0;d=d.y+F+x(this,"bottom")-(w.y+l)||0;(0>z||0<d)&&g(0,!0===b?z:!1===b?d:0>z?z:d);c&&(0>e||0<f)&&g(0>e?e:f,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
121
121
  "_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},
122
122
  getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var f=0;f<c.length;f++){var d=c[f],e=d.nodeName.toLowerCase(),g;if(!(e in b))if("checked"==e&&(g=this.getAttribute(e)))a.setAttribute(e,g);else if(!CKEDITOR.env.ie||this.hasAttribute(e))g=this.getAttribute(e),null===g&&(g=d.nodeValue),a.setAttribute(e,g)}""!==this.$.style.cssText&&
123
123
  (a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument();a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent(!0)&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,c){var f=b.childNodes;if(0<=c&&c<f.length)return f[c]}return function(b){var c=this.$;if(b.slice)for(b=b.slice();0<b.length&&c;)c=a(c,
124
124
  b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(b){b.data.getTarget().getAscendant(a,!0)||b.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||
125
125
  "ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(a){var b=CKEDITOR.instances,c,f,d;a=a||void 0===a;for(c in b)if(f=b[c],f.element.equals(this)&&f.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(d=f.editable())&&(d.equals(this)||d.contains(this)))return f;return null},find:function(a){var c=d(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b(this,
126
- a)));c();return a},findOne:function(a){var c=d(this);a=this.$.querySelector(b(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var f=a(this);if(!1!==f){c=this.getChildren();for(var d=0;d<c.count();d++)f=c.getItem(d),f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):b&&f.type!=b||a(f)}}});var h={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
126
+ a)));c();return a},findOne:function(a){var c=d(this);a=this.$.querySelector(b(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var f=a(this);if(!1!==f){c=this.getChildren();for(var d=0;d<c.count();d++)f=c.getItem(d),f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):b&&f.type!=b||a(f)}}});var k={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
127
127
  CKEDITOR.dom.element.prototype.setSize=function(a,b,d){"number"==typeof b&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(b-=c.call(this,a)),this.setStyle(a,b+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,b){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;b&&(d-=c.call(this,a));return d}})();CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a};
128
128
  CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)},getHtml:function(){var a=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(a);return a.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,
129
129
  insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});
130
- (function(){function a(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(),null;c.optimize()}var f,d=c.startContainer;f=c.endContainer;var e=c.startOffset,C=c.endOffset,g,k=this.guard,p=this.type,n=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var t=f.type==CKEDITOR.NODE_ELEMENT?f:f.getParent(),z=f.type==CKEDITOR.NODE_ELEMENT?f.getChild(C):f.getNext();this._.guardLTR=function(a,b){return(!b||!t.equals(a))&&(!z||
131
- !a.equals(z))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var B=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),h=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,b){return(!b||!B.equals(a))&&(!h||!a.equals(h))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var L=a?this._.guardRTL:this._.guardLTR;g=k?function(a,b){return!1===L(a,b)?!1:k(a,b)}:L;this.current?f=this.current[n](!1,p,g):(a?f.type==CKEDITOR.NODE_ELEMENT&&
132
- (f=0<C?f.getChild(C-1):!1===g(f,!0)?null:f.getPreviousSourceNode(!0,p,g)):(f=d,f.type==CKEDITOR.NODE_ELEMENT&&((f=f.getChild(e))||(f=!1===g(d,!0)?null:d.getNextSourceNode(!0,p,g)))),f&&!1===g(f)&&(f=null));for(;f&&!this._.end;){this.current=f;if(!this.evaluator||!1!==this.evaluator(f)){if(!b)return f}else if(b&&this.evaluator)return!1;f=f[n](!1,p,g)}this.end();return this.current=null}function d(b){for(var c,f=null;c=a.call(this,b);)f=c;return f}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=
130
+ (function(){function a(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(),null;c.optimize()}var f,d=c.startContainer;f=c.endContainer;var e=c.startOffset,B=c.endOffset,g,l=this.guard,q=this.type,n=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var t=f.type==CKEDITOR.NODE_ELEMENT?f:f.getParent(),A=f.type==CKEDITOR.NODE_ELEMENT?f.getChild(B):f.getNext();this._.guardLTR=function(a,b){return(!b||!t.equals(a))&&(!A||
131
+ !a.equals(A))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var C=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),h=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,b){return(!b||!C.equals(a))&&(!h||!a.equals(h))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var k=a?this._.guardRTL:this._.guardLTR;g=l?function(a,b){return!1===k(a,b)?!1:l(a,b)}:k;this.current?f=this.current[n](!1,q,g):(a?f.type==CKEDITOR.NODE_ELEMENT&&
132
+ (f=0<B?f.getChild(B-1):!1===g(f,!0)?null:f.getPreviousSourceNode(!0,q,g)):(f=d,f.type==CKEDITOR.NODE_ELEMENT&&((f=f.getChild(e))||(f=!1===g(d,!0)?null:d.getNextSourceNode(!0,q,g)))),f&&!1===g(f)&&(f=null));for(;f&&!this._.end;){this.current=f;if(!this.evaluator||!1!==this.evaluator(f)){if(!b)return f}else if(b&&this.evaluator)return!1;f=f[n](!1,q,g)}this.end();return this.current=null}function d(b){for(var c,f=null;c=a.call(this,b);)f=c;return f}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=
133
133
  a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return!1!==a.call(this,0,1)},checkBackward:function(){return!1!==a.call(this,1,1)},lastForward:function(){return d.call(this)},lastBackward:function(){return d.call(this,1)},reset:function(){delete this.current;this._={}}}});var b={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,
134
134
  "table-column":1,"table-cell":1,"table-caption":1},c={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in c||!b[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};
135
135
  CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(f){var d,e;d=f&&f.type!=CKEDITOR.NODE_ELEMENT&&(e=f.getParent())&&c(e);d=a?d:d||c(f);return!!(b^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^c)}};CKEDITOR.dom.walker.invisible=
136
- function(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(f){b(f)?f=1:(f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent()),f=f.$.offsetWidth<=c);return!!(a^f)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!g(a)&&!h(a)}return function(c){var f=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&e.test(c.getText());f&&(f=c.getParent(),c=c.getNext(b),f=f.isBlockBoundary()&&
137
- (!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(a^f)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var e=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,g=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark(),l=CKEDITOR.dom.walker.temp(),m=function(a){return h(a)||g(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=
138
- function(a){return function(b){b=g(b)||h(b)||l(b);return!!(a^b)}};var r=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var c=0,f=b.getChildCount();c<f;++c)if(!r(b.getChild(c)))return!!a;return!a}};var f=CKEDITOR.dom.walker.empty(),C=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(b){b=
139
- r(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(C)&&f(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(m(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&e.test(a.getText()))?a:!1}})();
136
+ function(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(f){b(f)?f=1:(f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent()),f=f.$.offsetWidth<=c);return!!(a^f)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!g(a)&&!k(a)}return function(c){var f=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&e.test(c.getText());f&&(f=c.getParent(),c=c.getNext(b),f=f.isBlockBoundary()&&
137
+ (!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(a^f)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var e=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,g=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),h=CKEDITOR.dom.walker.temp(),p=function(a){return k(a)||g(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=
138
+ function(a){return function(b){b=g(b)||k(b)||h(b);return!!(a^b)}};var r=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var c=0,f=b.getChildCount();c<f;++c)if(!r(b.getChild(c)))return!!a;return!a}};var f=CKEDITOR.dom.walker.empty(),B=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(b){b=
139
+ r(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(B)&&f(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(p(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&e.test(a.getText()))?a:!1}})();
140
140
  CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var d=a instanceof CKEDITOR.dom.document;this.document=d?a:a.getDocument();this.root=d?a.getBody():a};
141
- (function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function d(a,b,c,d,e){function q(a,b,c,f){var d=c?a.getPrevious():a.getNext();if(f&&l)return d;k||f?b.append(a.clone(!0,e),c):(a.remove(),r&&b.append(a));return d}function g(){var a,b,c,f=Math.min(P.length,v.length);for(a=0;a<f;a++)if(b=P[a],c=v[a],!b.equals(c))return a;return a-1}function h(){var b=G-1,c=L&&H&&!p.equals(n);b<D-1||b<I-1||c?(c?a.moveToPosition(n,
142
- CKEDITOR.POSITION_BEFORE_START):I==b+1&&F?a.moveToPosition(v[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(v[b+1],CKEDITOR.POSITION_BEFORE_START),d&&(b=P[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),c.insertAfter(b),b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var l=0===b,r=1==b,k=2==b;b=k||r;var p=a.startContainer,n=a.endContainer,
143
- t=a.startOffset,z=a.endOffset,B,F,L,H,m,Q;if(k&&n.type==CKEDITOR.NODE_TEXT&&p.equals(n))p=a.document.createText(p.substring(t,z)),c.append(p);else{n.type==CKEDITOR.NODE_TEXT?k?Q=!0:n=n.split(z):0<n.getChildCount()?z>=n.getChildCount()?(n=n.getChild(z-1),F=!0):n=n.getChild(z):H=F=!0;p.type==CKEDITOR.NODE_TEXT?k?m=!0:p.split(t):0<p.getChildCount()?0===t?(p=p.getChild(t),B=!0):p=p.getChild(t-1):L=B=!0;for(var P=p.getParents(),v=n.getParents(),G=g(),D=P.length-1,I=v.length-1,K=c,M,Z,X,fa=-1,S=G;S<=D;S++){Z=
144
- P[S];X=Z.getNext();for(S!=D||Z.equals(v[S])&&D<I?b&&(M=K.append(Z.clone(0,e))):B?q(Z,K,!1,L):m&&K.append(a.document.createText(Z.substring(t)));X;){if(X.equals(v[S])){fa=S;break}X=q(X,K)}K=M}K=c;for(S=G;S<=I;S++)if(c=v[S],X=c.getPrevious(),c.equals(P[S]))b&&(K=K.getChild(0));else{S!=I||c.equals(P[S])&&I<D?b&&(M=K.append(c.clone(0,e))):F?q(c,K,!1,H):Q&&K.append(a.document.createText(c.substring(0,z)));if(S>fa)for(;X;)X=q(X,K,!0);K=M}k||h()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),
145
- c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||b(e)?!0:d(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(g)?!1:!0}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&h(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function e(a){return function(){var b;return this[a?
146
- "getPreviousNode":"getNextNode"](function(a){!b&&r(a)&&(b=a);return m(a)&&!(h(a)&&a.equals(b))})}}var g={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},h=CKEDITOR.dom.walker.bogus(),l=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,m=CKEDITOR.dom.walker.editable(),r=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);
141
+ (function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function d(a,b,c,d,e){function m(a,b,c,f){var d=c?a.getPrevious():a.getNext();if(f&&k)return d;l||f?b.append(a.clone(!0,e),c):(a.remove(),r&&b.append(a));return d}function g(){var a,b,c,f=Math.min(P.length,v.length);for(a=0;a<f;a++)if(b=P[a],c=v[a],!b.equals(c))return a;return a-1}function h(){var b=G-1,c=M&&H&&!q.equals(n);b<E-1||b<I-1||c?(c?a.moveToPosition(n,
142
+ CKEDITOR.POSITION_BEFORE_START):I==b+1&&D?a.moveToPosition(v[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(v[b+1],CKEDITOR.POSITION_BEFORE_START),d&&(b=P[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),c.insertAfter(b),b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var k=0===b,r=1==b,l=2==b;b=l||r;var q=a.startContainer,n=a.endContainer,
143
+ t=a.startOffset,A=a.endOffset,C,D,M,H,p,Q;if(l&&n.type==CKEDITOR.NODE_TEXT&&q.equals(n))q=a.document.createText(q.substring(t,A)),c.append(q);else{n.type==CKEDITOR.NODE_TEXT?l?Q=!0:n=n.split(A):0<n.getChildCount()?A>=n.getChildCount()?(n=n.getChild(A-1),D=!0):n=n.getChild(A):H=D=!0;q.type==CKEDITOR.NODE_TEXT?l?p=!0:q.split(t):0<q.getChildCount()?0===t?(q=q.getChild(t),C=!0):q=q.getChild(t-1):M=C=!0;for(var P=q.getParents(),v=n.getParents(),G=g(),E=P.length-1,I=v.length-1,K=c,L,Z,X,fa=-1,S=G;S<=E;S++){Z=
144
+ P[S];X=Z.getNext();for(S!=E||Z.equals(v[S])&&E<I?b&&(L=K.append(Z.clone(0,e))):C?m(Z,K,!1,M):p&&K.append(a.document.createText(Z.substring(t)));X;){if(X.equals(v[S])){fa=S;break}X=m(X,K)}K=L}K=c;for(S=G;S<=I;S++)if(c=v[S],X=c.getPrevious(),c.equals(P[S]))b&&(K=K.getChild(0));else{S!=I||c.equals(P[S])&&I<E?b&&(L=K.append(c.clone(0,e))):D?m(c,K,!1,H):Q&&K.append(a.document.createText(c.substring(0,A)));if(S>fa)for(;X;)X=m(X,K,!0);K=L}l||h()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),
145
+ c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||b(e)?!0:d(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(g)?!1:!0}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&k(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function e(a){return function(){var b;return this[a?
146
+ "getPreviousNode":"getNextNode"](function(a){!b&&r(a)&&(b=a);return p(a)&&!(k(a)&&a.equals(b))})}}var g={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},k=CKEDITOR.dom.walker.bogus(),h=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,p=CKEDITOR.dom.walker.editable(),r=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);
147
147
  a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||
148
- d(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,c,a,"undefined"==typeof b?!0:b);return c},createBookmark:function(a){var b,c,d,e,q=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");a&&(d="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",d+(q?"C":"S")));q||(c=b.clone(),c.setHtml("\x26nbsp;"),a&&c.setAttribute("id",d+"E"),e=this.clone(),
149
- e.collapse(),e.insertNode(c));e=this.clone();e.collapse(!0);e.insertNode(b);c?(this.setStartAfter(b),this.setEndBefore(c)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(q?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:q}},createBookmark2:function(){function a(b){var f=b.container,d=b.offset,e;e=f;var g=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===g||g==e.getChildCount()?0:e.getChild(g-1).type==CKEDITOR.NODE_TEXT&&e.getChild(g).type==CKEDITOR.NODE_TEXT;e&&(f=f.getChild(d-
148
+ d(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,c,a,"undefined"==typeof b?!0:b);return c},createBookmark:function(a){var b,c,d,e,m=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");a&&(d="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",d+(m?"C":"S")));m||(c=b.clone(),c.setHtml("\x26nbsp;"),a&&c.setAttribute("id",d+"E"),e=this.clone(),
149
+ e.collapse(),e.insertNode(c));e=this.clone();e.collapse(!0);e.insertNode(b);c?(this.setStartAfter(b),this.setEndBefore(c)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(m?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:m}},createBookmark2:function(){function a(b){var f=b.container,d=b.offset,e;e=f;var g=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===g||g==e.getChildCount()?0:e.getChild(g-1).type==CKEDITOR.NODE_TEXT&&e.getChild(g).type==CKEDITOR.NODE_TEXT;e&&(f=f.getChild(d-
150
150
  1),d=f.getLength());if(f.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(e=f;d--;)if(g=e.getChild(d).getIndex(!0),0<=g){d=g;break a}d=-1}d+=1}if(f.type==CKEDITOR.NODE_TEXT){e=f;for(g=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)g+=e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;e=g;f.getText()?d+=e:(g=f.getPrevious(c),e?(d=e,f=g?g.getNext():f.getParent().getFirst()):(f=f.getParent(),d=g?g.getIndex(!0)+1:0))}b.container=f;b.offset=d}function b(a,c){var f=c.getCustomData("cke-fillingChar");
151
151
  if(f){var d=a.container;f.equals(d)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var d=this.collapsed,e={container:this.startContainer,offset:this.startOffset},g={container:this.endContainer,offset:this.endOffset};c&&(a(e),b(e,this.root),d||(a(g),b(g,this.root)));return{start:e.container.getAddress(c),end:d?null:g.container.getAddress(c),
152
152
  startOffset:e.offset,endOffset:g.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):
153
153
  this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>c)a=a.getChild(c);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(e=b.getChildCount(),e>d)b=b.getChild(d).getPreviousSourceNode(!0);else if(1>e)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=
154
154
  b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):
155
155
  this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,e=this.collapsed;if((!a||
156
- e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var q=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(q,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||e||!c||c.type!=CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):
157
- d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var q=function(a,b){var c=new CKEDITOR.dom.range(h);c.setStart(a,b);c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),f;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};f=
158
- c.next();){if(f.type!=CKEDITOR.NODE_TEXT)return!1;B=f!=a?f.getText():f.substring(b);if(d.test(B))return!1}return!0};if(this.collapsed)break;var g=this.getCommonAncestor(),h=this.root,l,r,k,p,n,t=!1,z,B;z=this.startContainer;var F=this.startOffset;z.type==CKEDITOR.NODE_TEXT?(F&&(z=!CKEDITOR.tools.trim(z.substring(0,F)).length&&z,t=!!z),z&&((p=z.getPrevious())||(k=z.getParent()))):(F&&(p=z.getChild(F-1)||z.getLast()),p||(k=z));for(k=c(k);k||p;){if(k&&!p){!n&&k.equals(g)&&(n=!0);if(e?k.isBlockBoundary():
159
- !h.contains(k))break;t&&"inline"==k.getComputedStyle("display")||(t=!1,n?l=k:this.setStartBefore(k));p=k.getPrevious()}for(;p;)if(z=!1,p.type==CKEDITOR.NODE_COMMENT)p=p.getPrevious();else{if(p.type==CKEDITOR.NODE_TEXT)B=p.getText(),d.test(B)&&(p=null),z=/[\s\ufeff]$/.test(B);else if((p.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&p.is("br"))&&!p.data("cke-bookmark"))if(t&&CKEDITOR.dtd.$removeEmpty[p.getName()]){B=p.getText();if(d.test(B))p=null;else for(var F=p.$.getElementsByTagName("*"),L=0,H;H=
160
- F[L++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){p=null;break}p&&(z=!!B.length)}else p=null;z&&(t?n?l=k:k&&this.setStartBefore(k):t=!0);if(p){z=p.getPrevious();if(!k&&!z){k=p;p=null;break}p=z}else k=null}k&&(k=c(k.getParent()))}z=this.endContainer;F=this.endOffset;k=p=null;n=t=!1;z.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(z.substring(F)).length?t=!0:(t=!z.getLength(),F==z.getLength()?(p=z.getNext())||(k=z.getParent()):q(z,F)&&(k=z.getParent())):(p=z.getChild(F))||(k=z);for(;k||
161
- p;){if(k&&!p){!n&&k.equals(g)&&(n=!0);if(e?k.isBlockBoundary():!h.contains(k))break;t&&"inline"==k.getComputedStyle("display")||(t=!1,n?r=k:k&&this.setEndAfter(k));p=k.getNext()}for(;p;){z=!1;if(p.type==CKEDITOR.NODE_TEXT)B=p.getText(),q(p,0)||(p=null),z=/^[\s\ufeff]/.test(B);else if(p.type==CKEDITOR.NODE_ELEMENT){if((0<p.$.offsetWidth||b&&p.is("br"))&&!p.data("cke-bookmark"))if(t&&CKEDITOR.dtd.$removeEmpty[p.getName()]){B=p.getText();if(d.test(B))p=null;else for(F=p.$.getElementsByTagName("*"),L=
162
- 0;H=F[L++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){p=null;break}p&&(z=!!B.length)}else p=null}else z=1;z&&t&&(n?r=k:this.setEndAfter(k));if(p){z=p.getNext();if(!k&&!z){k=p;p=null;break}p=z}else k=null}k&&(k=c(k.getParent()))}l&&r&&(g=l.contains(r)?r:l,this.setStartBefore(g),this.setEndAfter(g));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:k=new CKEDITOR.dom.range(this.root);h=this.root;k.setStartAt(h,CKEDITOR.POSITION_AFTER_START);k.setEnd(this.startContainer,
163
- this.startOffset);k=new CKEDITOR.dom.walker(k);var m,Q,P=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),v=null,G=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(v){if(v.equals(a)){v=null;return}}else v=a;else if(v)return;var b=P(a);b||(m=a);return b},e=function(a){var b=G(a);!b&&a.is&&a.is("br")&&(Q=a);return b};k.guard=G;k=k.lastBackward();m=m||h;this.setStartAt(m,!m.is("br")&&(!k&&this.checkStartOfBlock()||k&&m.contains(k))?
164
- CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){k=this.clone();k=new CKEDITOR.dom.walker(k);var D=CKEDITOR.dom.walker.whitespaces(),I=CKEDITOR.dom.walker.bookmark();k.evaluator=function(a){return!D(a)&&!I(a)};if((k=k.previous())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br"))break}k=this.clone();k.collapse();k.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);k=new CKEDITOR.dom.walker(k);k.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:G;m=v=Q=null;k=k.lastForward();
165
- m=m||h;this.setEndAt(m,!k&&this.checkEndOfBlock()||k&&m.contains(k)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);Q&&this.setEndAfter(Q)}},shrink:function(a,b,c){if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var d=this.clone(),e=this.startContainer,q=this.endContainer,g=this.startOffset,h=this.endOffset,l=1,r=1;e&&e.type==CKEDITOR.NODE_TEXT&&(g?g>=e.getLength()?d.setStartAfter(e):(d.setStartBefore(e),l=0):d.setStartBefore(e));q&&q.type==CKEDITOR.NODE_TEXT&&(h?h>=q.getLength()?d.setEndAfter(q):
166
- (d.setEndAfter(q),r=0):d.setEndBefore(q));var d=new CKEDITOR.dom.walker(d),k=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var p;d.guard=function(b,d){if(k(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(p)||!1===c&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT||
167
- (p=b);return!0};l&&(e=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);r&&(d.reset(),(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!l&&!r)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&
156
+ e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var m=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(m,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||e||!c||c.type!=CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):
157
+ d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var m=function(a,b){var c=new CKEDITOR.dom.range(h);c.setStart(a,b);c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),f;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};f=
158
+ c.next();){if(f.type!=CKEDITOR.NODE_TEXT)return!1;C=f!=a?f.getText():f.substring(b);if(d.test(C))return!1}return!0};if(this.collapsed)break;var g=this.getCommonAncestor(),h=this.root,k,r,l,q,n,t=!1,A,C;A=this.startContainer;var D=this.startOffset;A.type==CKEDITOR.NODE_TEXT?(D&&(A=!CKEDITOR.tools.trim(A.substring(0,D)).length&&A,t=!!A),A&&((q=A.getPrevious())||(l=A.getParent()))):(D&&(q=A.getChild(D-1)||A.getLast()),q||(l=A));for(l=c(l);l||q;){if(l&&!q){!n&&l.equals(g)&&(n=!0);if(e?l.isBlockBoundary():
159
+ !h.contains(l))break;t&&"inline"==l.getComputedStyle("display")||(t=!1,n?k=l:this.setStartBefore(l));q=l.getPrevious()}for(;q;)if(A=!1,q.type==CKEDITOR.NODE_COMMENT)q=q.getPrevious();else{if(q.type==CKEDITOR.NODE_TEXT)C=q.getText(),d.test(C)&&(q=null),A=/[\s\ufeff]$/.test(C);else if((q.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&q.is("br"))&&!q.data("cke-bookmark"))if(t&&CKEDITOR.dtd.$removeEmpty[q.getName()]){C=q.getText();if(d.test(C))q=null;else for(var D=q.$.getElementsByTagName("*"),M=0,H;H=
160
+ D[M++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){q=null;break}q&&(A=!!C.length)}else q=null;A&&(t?n?k=l:l&&this.setStartBefore(l):t=!0);if(q){A=q.getPrevious();if(!l&&!A){l=q;q=null;break}q=A}else l=null}l&&(l=c(l.getParent()))}A=this.endContainer;D=this.endOffset;l=q=null;n=t=!1;A.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(A.substring(D)).length?t=!0:(t=!A.getLength(),D==A.getLength()?(q=A.getNext())||(l=A.getParent()):m(A,D)&&(l=A.getParent())):(q=A.getChild(D))||(l=A);for(;l||
161
+ q;){if(l&&!q){!n&&l.equals(g)&&(n=!0);if(e?l.isBlockBoundary():!h.contains(l))break;t&&"inline"==l.getComputedStyle("display")||(t=!1,n?r=l:l&&this.setEndAfter(l));q=l.getNext()}for(;q;){A=!1;if(q.type==CKEDITOR.NODE_TEXT)C=q.getText(),m(q,0)||(q=null),A=/^[\s\ufeff]/.test(C);else if(q.type==CKEDITOR.NODE_ELEMENT){if((0<q.$.offsetWidth||b&&q.is("br"))&&!q.data("cke-bookmark"))if(t&&CKEDITOR.dtd.$removeEmpty[q.getName()]){C=q.getText();if(d.test(C))q=null;else for(D=q.$.getElementsByTagName("*"),M=
162
+ 0;H=D[M++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){q=null;break}q&&(A=!!C.length)}else q=null}else A=1;A&&t&&(n?r=l:this.setEndAfter(l));if(q){A=q.getNext();if(!l&&!A){l=q;q=null;break}q=A}else l=null}l&&(l=c(l.getParent()))}k&&r&&(g=k.contains(r)?r:k,this.setStartBefore(g),this.setEndAfter(g));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:l=new CKEDITOR.dom.range(this.root);h=this.root;l.setStartAt(h,CKEDITOR.POSITION_AFTER_START);l.setEnd(this.startContainer,
163
+ this.startOffset);l=new CKEDITOR.dom.walker(l);var p,Q,P=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),v=null,G=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(v){if(v.equals(a)){v=null;return}}else v=a;else if(v)return;var b=P(a);b||(p=a);return b},e=function(a){var b=G(a);!b&&a.is&&a.is("br")&&(Q=a);return b};l.guard=G;l=l.lastBackward();p=p||h;this.setStartAt(p,!p.is("br")&&(!l&&this.checkStartOfBlock()||l&&p.contains(l))?
164
+ CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){l=this.clone();l=new CKEDITOR.dom.walker(l);var E=CKEDITOR.dom.walker.whitespaces(),I=CKEDITOR.dom.walker.bookmark();l.evaluator=function(a){return!E(a)&&!I(a)};if((l=l.previous())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br"))break}l=this.clone();l.collapse();l.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);l=new CKEDITOR.dom.walker(l);l.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:G;p=v=Q=null;l=l.lastForward();
165
+ p=p||h;this.setEndAt(p,!l&&this.checkEndOfBlock()||l&&p.contains(l)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);Q&&this.setEndAfter(Q)}},shrink:function(a,b,c){if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var d=this.clone(),e=this.startContainer,m=this.endContainer,g=this.startOffset,h=this.endOffset,k=1,r=1;e&&e.type==CKEDITOR.NODE_TEXT&&(g?g>=e.getLength()?d.setStartAfter(e):(d.setStartBefore(e),k=0):d.setStartBefore(e));m&&m.type==CKEDITOR.NODE_TEXT&&(h?h>=m.getLength()?d.setEndAfter(m):
166
+ (d.setEndAfter(m),r=0):d.setEndBefore(m));var d=new CKEDITOR.dom.walker(d),l=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var q;d.guard=function(b,d){if(l(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(q)||!1===c&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT||
167
+ (q=b);return!0};k&&(e=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);r&&(d.reset(),(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!k&&!r)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&
168
168
  this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=
169
169
  c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer||(this._setStartContainer(b),this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),
170
170
  a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,
171
171
  0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var e=d.getBogus();e&&e.remove();
172
- d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=c.block,q=d.block,g=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),q=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),q||(q=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=q&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(q)&&
173
- (d?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(q,CKEDITOR.POSITION_AFTER_END),q=null):c?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(q=this.splitElement(e,b||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:q,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:g}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);
172
+ d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=c.block,m=d.block,g=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),m=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),m||(m=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=m&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(m)&&
173
+ (d?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(m,CKEDITOR.POSITION_AFTER_END),m=null):c?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(m=this.splitElement(e,b||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:m,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:g}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);
174
174
  var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||d.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block||
175
175
  d.blockLimit,g;e&&!e.equals(d.root)&&!e.getFirst(a(e));)g=e.getParent(),this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=g;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:
176
- CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=c(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,c)),l.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);
177
- a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),l.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();
176
+ CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=c(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,c)),h.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);
177
+ a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),h.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();
178
178
  d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||
179
- "true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&l.test(a.getText())?this.moveToPosition(a,
179
+ "true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&h.test(a.getText())?this.moveToPosition(a,
180
180
  CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),
181
- !0;var d=a,e=c,q=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(q=d[b?"getLast":"getFirst"](r));e||q||(q=d[b?"getPrevious":"getNext"](r));a=q}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,e,q,g=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,g[b?0:1])):c=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(q=e.type==CKEDITOR.NODE_ELEMENT)&&
182
- e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&q&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,g[b?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=
181
+ !0;var d=a,e=c,m=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(m=d[b?"getLast":"getFirst"](r));e||m||(m=d[b?"getPrevious":"getNext"](r));a=m}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,e,m,g=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,g[b?0:1])):c=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(m=e.type==CKEDITOR.NODE_ELEMENT)&&
182
+ e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&m&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,g[b?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=
183
183
  this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=
184
184
  this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:e(),getPreviousEditableNode:e(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,d,e=this.clone();e.optimize();(d=e.startContainer.type==CKEDITOR.NODE_TEXT)?(c=e.startContainer.getText(),b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();
185
- d&&(e.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),e=[],q,g,h,l;if(c&&c.find)for(g=c.find(a),q=0;q<g.count();q++)if(c=g.getItem(q),b||!c.isReadOnly())h=c.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||d.startNode.equals(c),l=c.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED,
186
- h&&l&&e.push(c);return e}}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict";
185
+ d&&(e.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),e=[],m,g,h,k;if(c&&c.find)for(g=c.find(a),m=0;m<g.count();m++)if(c=g.getItem(m),b||!c.isReadOnly())h=c.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||d.startNode.equals(c),k=c.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED,
186
+ h&&k&&e.push(c);return e}}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict";
187
187
  (function(){function a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function d(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a,c,e,g){a:{null==g&&(g=d(e));for(var h;h=g.shift();)if(h.getDtd().p){g={element:h,remaining:g};break a}g=null}if(!g)return 0;if((h=CKEDITOR.filter.instances[g.element.data("cke-filter")])&&!h.check(c))return b(a,
188
- c,e,g.remaining);c=new CKEDITOR.dom.range(g.element);c.selectNodeContents(g.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=h;a._.nestedEditable={element:g.element,container:e,remaining:g.remaining,iterator:c};return 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var e=/^[\r\n\t ]+$/,g=CKEDITOR.dom.walker.bookmark(!1,!0),h=CKEDITOR.dom.walker.whitespaces(!0),
189
- l=function(a){return g(a)&&h(a)},m={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var d,h,u,A,y;a=a||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=
190
- null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var q=this.range.clone();h=q.startPath();var x=q.endPath(),J=!q.collapsed&&c(q,h.block),w=!q.collapsed&&c(q,x.block,1);q.shrink(CKEDITOR.SHRINK_ELEMENT,!0);J&&q.setStartAt(h.block,CKEDITOR.POSITION_BEFORE_END);w&&q.setEndAt(x.block,CKEDITOR.POSITION_AFTER_START);h=q.endContainer.hasAscendant("pre",!0)||q.startContainer.hasAscendant("pre",!0);q.enlarge(this.forceBrBreak&&!h||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);
191
- q.collapsed||(h=new CKEDITOR.dom.walker(q.clone()),x=CKEDITOR.dom.walker.bookmark(!0,!0),h.evaluator=x,this._.nextNode=h.next(),h=new CKEDITOR.dom.walker(q.clone()),h.evaluator=x,h=h.previous(),this._.lastNode=h.getNextSourceNode(!0,null,q.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(x=this.range.clone(),x.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),x.checkEndOfBlock()&&
192
- (x=new CKEDITOR.dom.elementPath(x.endContainer,x.root),this._.lastNode=(x.block||x.blockLimit).getNextSourceNode(!0))),this._.lastNode&&q.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=q.document.createText(""),this._.lastNode.insertAfter(h)),q=null);this._.started=1;h=q}x=this._.nextNode;q=this._.lastNode;for(this._.nextNode=null;x;){var J=0,w=x.hasAscendant("pre"),E=x.type!=CKEDITOR.NODE_ELEMENT,k=0;if(E)x.type==CKEDITOR.NODE_TEXT&&e.test(x.getText())&&(E=0);else{var p=x.getName();
193
- if(CKEDITOR.dtd.$block[p]&&"false"==x.getAttribute("contenteditable")){d=x;b(this,a,d);break}else if(x.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){if("br"==p)E=1;else if(!h&&!x.getChildCount()&&"hr"!=p){d=x;u=x.equals(q);break}h&&(h.setEndAt(x,CKEDITOR.POSITION_BEFORE_START),"br"!=p&&(this._.nextNode=x));J=1}else{if(x.getFirst()){h||(h=this.range.clone(),h.setStartAt(x,CKEDITOR.POSITION_BEFORE_START));x=x.getFirst();continue}E=1}}E&&!h&&(h=this.range.clone(),h.setStartAt(x,CKEDITOR.POSITION_BEFORE_START));
194
- u=(!J||E)&&x.equals(q);if(h&&!J)for(;!x.getNext(l)&&!u;){p=x.getParent();if(p.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){J=1;E=0;u||p.equals(q);h.setEndAt(p,CKEDITOR.POSITION_BEFORE_END);break}x=p;E=1;u=x.equals(q);k=1}E&&h.setEndAt(x,CKEDITOR.POSITION_AFTER_END);x=this._getNextSourceNode(x,k,q);if((u=!x)||J&&h)break}if(!d){if(!h)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(h.startContainer,h.root);x=d.blockLimit;J={div:1,th:1,td:1};
195
- d=d.block;!d&&x&&!this.enforceRealBlocks&&J[x.getName()]&&h.checkStartOfBlock()&&h.checkEndOfBlock()&&!x.equals(h.root)?d=x:!d||this.enforceRealBlocks&&d.is(m)?(d=this.range.document.createElement(a),h.extractContents().appendTo(d),d.trim(),h.insertNode(d),A=y=!0):"li"!=d.getName()?h.checkStartOfBlock()&&h.checkEndOfBlock()||(d=d.clone(!1),h.extractContents().appendTo(d),d.trim(),y=h.splitBlock(),A=!y.wasStartOfBlock,y=!y.wasEndOfBlock,h.insertNode(d)):u||(this._.nextNode=d.equals(q)?null:this._getNextSourceNode(h.getBoundaryNodes().endNode,
196
- 1,q))}A&&(A=d.getPrevious())&&A.type==CKEDITOR.NODE_ELEMENT&&("br"==A.getName()?A.remove():A.getLast()&&"br"==A.getLast().$.nodeName.toLowerCase()&&A.getLast().remove());y&&(A=d.getLast())&&A.type==CKEDITOR.NODE_ELEMENT&&"br"==A.getName()&&(!CKEDITOR.env.needsBrFiller||A.getPrevious(g)||A.getNext(g))&&A.remove();this._.nextNode||(this._.nextNode=u||d.equals(q)||!q?null:this._getNextSourceNode(d,1,q));return d},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(e))}var e=
188
+ c,e,g.remaining);c=new CKEDITOR.dom.range(g.element);c.selectNodeContents(g.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=h;a._.nestedEditable={element:g.element,container:e,remaining:g.remaining,iterator:c};return 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var e=/^[\r\n\t ]+$/,g=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0),
189
+ h=function(a){return g(a)&&k(a)},p={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var d,k,u,z,y;a=a||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=
190
+ null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var m=this.range.clone();k=m.startPath();var x=m.endPath(),J=!m.collapsed&&c(m,k.block),w=!m.collapsed&&c(m,x.block,1);m.shrink(CKEDITOR.SHRINK_ELEMENT,!0);J&&m.setStartAt(k.block,CKEDITOR.POSITION_BEFORE_END);w&&m.setEndAt(x.block,CKEDITOR.POSITION_AFTER_START);k=m.endContainer.hasAscendant("pre",!0)||m.startContainer.hasAscendant("pre",!0);m.enlarge(this.forceBrBreak&&!k||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);
191
+ m.collapsed||(k=new CKEDITOR.dom.walker(m.clone()),x=CKEDITOR.dom.walker.bookmark(!0,!0),k.evaluator=x,this._.nextNode=k.next(),k=new CKEDITOR.dom.walker(m.clone()),k.evaluator=x,k=k.previous(),this._.lastNode=k.getNextSourceNode(!0,null,m.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(x=this.range.clone(),x.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),x.checkEndOfBlock()&&
192
+ (x=new CKEDITOR.dom.elementPath(x.endContainer,x.root),this._.lastNode=(x.block||x.blockLimit).getNextSourceNode(!0))),this._.lastNode&&m.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=m.document.createText(""),this._.lastNode.insertAfter(k)),m=null);this._.started=1;k=m}x=this._.nextNode;m=this._.lastNode;for(this._.nextNode=null;x;){var J=0,w=x.hasAscendant("pre"),F=x.type!=CKEDITOR.NODE_ELEMENT,l=0;if(F)x.type==CKEDITOR.NODE_TEXT&&e.test(x.getText())&&(F=0);else{var q=x.getName();
193
+ if(CKEDITOR.dtd.$block[q]&&"false"==x.getAttribute("contenteditable")){d=x;b(this,a,d);break}else if(x.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){if("br"==q)F=1;else if(!k&&!x.getChildCount()&&"hr"!=q){d=x;u=x.equals(m);break}k&&(k.setEndAt(x,CKEDITOR.POSITION_BEFORE_START),"br"!=q&&(this._.nextNode=x));J=1}else{if(x.getFirst()){k||(k=this.range.clone(),k.setStartAt(x,CKEDITOR.POSITION_BEFORE_START));x=x.getFirst();continue}F=1}}F&&!k&&(k=this.range.clone(),k.setStartAt(x,CKEDITOR.POSITION_BEFORE_START));
194
+ u=(!J||F)&&x.equals(m);if(k&&!J)for(;!x.getNext(h)&&!u;){q=x.getParent();if(q.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){J=1;F=0;u||q.equals(m);k.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);break}x=q;F=1;u=x.equals(m);l=1}F&&k.setEndAt(x,CKEDITOR.POSITION_AFTER_END);x=this._getNextSourceNode(x,l,m);if((u=!x)||J&&k)break}if(!d){if(!k)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(k.startContainer,k.root);x=d.blockLimit;J={div:1,th:1,td:1};
195
+ d=d.block;!d&&x&&!this.enforceRealBlocks&&J[x.getName()]&&k.checkStartOfBlock()&&k.checkEndOfBlock()&&!x.equals(k.root)?d=x:!d||this.enforceRealBlocks&&d.is(p)?(d=this.range.document.createElement(a),k.extractContents().appendTo(d),d.trim(),k.insertNode(d),z=y=!0):"li"!=d.getName()?k.checkStartOfBlock()&&k.checkEndOfBlock()||(d=d.clone(!1),k.extractContents().appendTo(d),d.trim(),y=k.splitBlock(),z=!y.wasStartOfBlock,y=!y.wasEndOfBlock,k.insertNode(d)):u||(this._.nextNode=d.equals(m)?null:this._getNextSourceNode(k.getBoundaryNodes().endNode,
196
+ 1,m))}z&&(z=d.getPrevious())&&z.type==CKEDITOR.NODE_ELEMENT&&("br"==z.getName()?z.remove():z.getLast()&&"br"==z.getLast().$.nodeName.toLowerCase()&&z.getLast().remove());y&&(z=d.getLast())&&z.type==CKEDITOR.NODE_ELEMENT&&"br"==z.getName()&&(!CKEDITOR.env.needsBrFiller||z.getPrevious(g)||z.getNext(g))&&z.remove();this._.nextNode||(this._.nextNode=u||d.equals(m)||!m?null:this._getNextSourceNode(d,1,m));return d},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(e))}var e=
197
197
  this.range.root;for(a=a.getNextSourceNode(b,null,d);!g(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})();
198
198
  CKEDITOR.command=function(a,d){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==d.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",
199
199
  {editor:a,path:b})?!0:d.refresh&&!1!==d.refresh.apply(this,arguments)};var b;this.checkAllowed=function(c){return c||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!d.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)};
200
200
  CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?
201
201
  this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3;
202
202
  CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]};
203
- (function(){function a(a,b,c,d,k){var e,p;a=[];for(e in b){p=b[e];p="boolean"==typeof p?{}:"function"==typeof p?{match:p}:L(p);"$"!=e.charAt(0)&&(p.elements=e);c&&(p.featureName=c.toLowerCase());var n=p;n.elements=h(n.elements,/\s+/)||null;n.propertiesOnly=n.propertiesOnly||!0===n.elements;var f=/\s*,\s*/,t=void 0;for(t in Q){n[t]=h(n[t],f)||null;var q=n,g=P[t],D=h(n[P[t]],f),v=n[t],z=[],I=!0,B=void 0;D?I=!1:D={};for(B in v)"!"==B.charAt(0)&&(B=B.slice(1),z.push(B),D[B]=!0,I=!1);for(;B=z.pop();)v[B]=
204
- v["!"+B],delete v["!"+B];q[g]=(I?!1:D)||null}n.match=n.match||null;d.push(p);a.push(p)}b=k.elements;k=k.generic;var l;c=0;for(d=a.length;c<d;++c){e=L(a[c]);p=!0===e.classes||!0===e.styles||!0===e.attributes;n=e;t=g=f=void 0;for(f in Q)n[f]=J(n[f]);q=!0;for(t in P){f=P[t];g=n[f];D=[];v=void 0;for(v in g)-1<v.indexOf("*")?D.push(new RegExp("^"+v.replace(/\*/g,".*")+"$")):D.push(v);g=D;g.length&&(n[f]=g,q=!1)}n.nothingRequired=q;n.noProperties=!(n.attributes||n.classes||n.styles);if(!0===e.elements||
205
- null===e.elements)k[p?"unshift":"push"](e);else for(l in n=e.elements,delete e.elements,n)if(b[l])b[l][p?"unshift":"push"](e);else b[l]=[e]}}function d(a,c,d,k){if(!a.match||a.match(c))if(k||l(a,c))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=b(a.attributes,c.attributes,d.validAttributes)),d.allStyles||(d.allStyles=b(a.styles,c.styles,d.validStyles)),!d.allClasses){a=a.classes;c=c.classes;k=d.validClasses;if(a)if(!0===a)a=!0;else{for(var e=0,p=c.length,n;e<p;++e)n=c[e],k[n]||
206
- (k[n]=a(n));a=!1}else a=!1;d.allClasses=a}}function b(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var d in b)c[d]||(c[d]=a(d));return!1}function c(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=e(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=e(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var d=!1,k=!0===a,p=b.length;p--;)if(k||a(b[p]))b.splice(p,1),d=!0;a=d}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function e(a,
207
- b){if(!a)return!1;var c=!1,d=!0===a,k;for(k in b)if(d||a(k))delete b[k],c=!0;return c}function g(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function h(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=H(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var c={},d=0,k;for(k in a)c[k]=a[k],d++;return d?c:!1}function l(a,b){if(a.nothingRequired)return!0;
208
- var c,d,k,e;if(k=a.requiredClasses)for(e=b.classes,c=0;c<k.length;++c)if(d=k[c],"string"==typeof d){if(-1==CKEDITOR.tools.indexOf(e,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(e,d))return!1;return m(b.styles,a.requiredStyles)&&m(b.attributes,a.requiredAttributes)}function m(a,b){if(!b)return!0;for(var c=0,d;c<b.length;++c)if(d=b[c],"string"==typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function r(a){if(!a)return{};
209
- a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function f(a){var b,c,d,k,e={},p=1;for(a=H(a);b=a.match(v);)(c=b[2])?(d=C(c,"styles"),k=C(c,"attrs"),c=C(c,"classes")):d=k=c=null,e["$"+p++]={elements:b[1],classes:c,styles:d,attributes:k},a=a.slice(b[0].length);return e}function C(a,b){var c=a.match(G[b]);return c?H(c[1]):null}function u(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||
210
- "",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function A(a,b,k,e){var n=0,f;e.toHtml&&(b.name=b.name.replace(D,"$1"));if(e.doCallbacks&&a.elementCallbacks){a:{f=a.elementCallbacks;for(var t=0,g=f.length,v;t<g;++t)if(v=f[t](b)){f=v;break a}f=void 0}if(f)return f}if(e.doTransform&&(f=a._.transformations[b.name])){u(b);for(t=0;t<f.length;++t)p(a,b,f[t]);q(b)}if(e.doFilter){a:{t=b.name;g=a._;a=g.allowedRules.elements[t];f=g.allowedRules.generic;t=g.disallowedRules.elements[t];g=g.disallowedRules.generic;
211
- v=e.skipRequired;var h={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},z,B;if(a||f){u(b);if(t)for(z=0,B=t.length;z<B;++z)if(!1===c(t[z],b,h)){a=null;break a}if(g)for(z=0,B=g.length;z<B;++z)c(g[z],b,h);if(a)for(z=0,B=a.length;z<B;++z)d(a[z],b,h,v);if(f)for(z=0,B=f.length;z<B;++z)d(f[z],b,h,v);a=h}else a=null}if(!a||!a.valid)return k.push(b),1;B=a.validAttributes;var l=a.validStyles;
212
- f=a.validClasses;var t=b.attributes,L=b.styles,g=b.classes;v=b.classBackup;var K=b.styleBackup,G,F,m=[],h=[],H=/^data-cke-/;z=!1;delete t.style;delete t["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(G in t)B[G]||(H.test(G)?G==(F=G.replace(/^data-cke-saved-/,""))||B[F]||(delete t[G],z=!0):(delete t[G],z=!0));if(!a.allStyles||a.hadInvalidStyle){for(G in L)a.allStyles||l[G]?m.push(G+":"+L[G]):z=!0;m.length&&(t.style=m.sort().join("; "))}else K&&(t.style=K);if(!a.allClasses||
213
- a.hadInvalidClass){for(G=0;G<g.length;++G)(a.allClasses||f[g[G]])&&h.push(g[G]);h.length&&(t["class"]=h.sort().join(" "));v&&h.length<v.split(/\s+/).length&&(z=!0)}else v&&(t["class"]=v);z&&(n=1);if(!e.skipFinalValidation&&!x(b))return k.push(b),1}e.toHtml&&(b.name=b.name.replace(I,"cke:$1"));return n}function y(a){var b=[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?new RegExp("^(?:"+b.join("|")+")$"):null}function q(a){var b=a.attributes,c;delete b.style;delete b["class"];
214
- if(c=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function x(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function J(a){if(!a)return!1;if(!0===a)return!0;var b=y(a);return function(c){return c in a||b&&c.match(b)}}function w(){return new CKEDITOR.htmlParser.element("br")}function E(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==
215
- a.name||F.$block[a.name])}function k(a,b,c){var d=a.name;if(F.$empty[d]||!a.children.length)"hr"==d&&"br"==b?a.replaceWith(w()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(F.$block[d]||"tr"==d)if("br"==b)a.previous&&!E(a.previous)&&(b=w(),b.insertBefore(a)),a.next&&!E(a.next)&&(b=w(),b.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,k;b:{k=F[b];for(var e=0,p=d.length,n;e<p;++e)if(n=d[e],n.type==CKEDITOR.NODE_ELEMENT&&!k[n.name]){k=!1;break b}k=!0}if(k)a.name=b,a.attributes=
216
- {},c.push({check:"parent-down",el:a});else{k=a.parent;for(var e=k.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==k.name,t,f,p=d.length;0<p;)n=d[--p],e&&(n.type==CKEDITOR.NODE_TEXT||n.type==CKEDITOR.NODE_ELEMENT&&F.$inline[n.name])?(t||(t=new CKEDITOR.htmlParser.element(b),t.insertAfter(a),c.push({check:"parent-down",el:t})),t.add(n,0)):(t=null,f=F[k.name]||F.span,n.insertAfter(a),k.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n.type!=CKEDITOR.NODE_ELEMENT||f[n.name]||c.push({check:"el-up",el:n}));a.remove()}}else d in
217
- {style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function p(a,b,c){var d,k;for(d=0;d<c.length;++d)if(k=c[d],!(k.check&&!a.check(k.check,!1)||k.left&&!k.left(b))){k.right(b,K);break}}function n(a,b){var c=b.getDefinition(),d=c.attributes,k=c.styles,e,p,n,t;if(a.name!=c.element)return!1;for(e in d)if("class"==e)for(c=d[e].split(/\s+/),n=a.classes.join("|");t=c.pop();){if(-1==n.indexOf(t))return!1}else if(a.attributes[e]!=d[e])return!1;for(p in k)if(a.styles[p]!=
218
- k[p])return!1;return!0}function t(a,b){var c,d;"string"==typeof a?c=a:a instanceof CKEDITOR.style?d=a:(c=a[0],d=a[1]);return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function z(a){return function(b){return n(b,a)}}function B(a){return function(b,c){c[a](b)}}var F=CKEDITOR.dtd,L=CKEDITOR.tools.copy,H=CKEDITOR.tools.trim,R=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=
203
+ (function(){function a(a,b,c,d,l){var e,q;a=[];for(e in b){q=b[e];q="boolean"==typeof q?{}:"function"==typeof q?{match:q}:M(q);"$"!=e.charAt(0)&&(q.elements=e);c&&(q.featureName=c.toLowerCase());var n=q;n.elements=k(n.elements,/\s+/)||null;n.propertiesOnly=n.propertiesOnly||!0===n.elements;var f=/\s*,\s*/,t=void 0;for(t in Q){n[t]=k(n[t],f)||null;var m=n,g=P[t],E=k(n[P[t]],f),v=n[t],A=[],I=!0,C=void 0;E?I=!1:E={};for(C in v)"!"==C.charAt(0)&&(C=C.slice(1),A.push(C),E[C]=!0,I=!1);for(;C=A.pop();)v[C]=
204
+ v["!"+C],delete v["!"+C];m[g]=(I?!1:E)||null}n.match=n.match||null;d.push(q);a.push(q)}b=l.elements;l=l.generic;var h;c=0;for(d=a.length;c<d;++c){e=M(a[c]);q=!0===e.classes||!0===e.styles||!0===e.attributes;n=e;t=g=f=void 0;for(f in Q)n[f]=J(n[f]);m=!0;for(t in P){f=P[t];g=n[f];E=[];v=void 0;for(v in g)-1<v.indexOf("*")?E.push(new RegExp("^"+v.replace(/\*/g,".*")+"$")):E.push(v);g=E;g.length&&(n[f]=g,m=!1)}n.nothingRequired=m;n.noProperties=!(n.attributes||n.classes||n.styles);if(!0===e.elements||
205
+ null===e.elements)l[q?"unshift":"push"](e);else for(h in n=e.elements,delete e.elements,n)if(b[h])b[h][q?"unshift":"push"](e);else b[h]=[e]}}function d(a,c,d,l){if(!a.match||a.match(c))if(l||h(a,c))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=b(a.attributes,c.attributes,d.validAttributes)),d.allStyles||(d.allStyles=b(a.styles,c.styles,d.validStyles)),!d.allClasses){a=a.classes;c=c.classes;l=d.validClasses;if(a)if(!0===a)a=!0;else{for(var e=0,q=c.length,n;e<q;++e)n=c[e],l[n]||
206
+ (l[n]=a(n));a=!1}else a=!1;d.allClasses=a}}function b(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var d in b)c[d]||(c[d]=a(d));return!1}function c(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=e(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=e(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var d=!1,l=!0===a,q=b.length;q--;)if(l||a(b[q]))b.splice(q,1),d=!0;a=d}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function e(a,
207
+ b){if(!a)return!1;var c=!1,d=!0===a,l;for(l in b)if(d||a(l))delete b[l],c=!0;return c}function g(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function k(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=H(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var c={},d=0,l;for(l in a)c[l]=a[l],d++;return d?c:!1}function h(a,b){if(a.nothingRequired)return!0;
208
+ var c,d,l,e;if(l=a.requiredClasses)for(e=b.classes,c=0;c<l.length;++c)if(d=l[c],"string"==typeof d){if(-1==CKEDITOR.tools.indexOf(e,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(e,d))return!1;return p(b.styles,a.requiredStyles)&&p(b.attributes,a.requiredAttributes)}function p(a,b){if(!b)return!0;for(var c=0,d;c<b.length;++c)if(d=b[c],"string"==typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function r(a){if(!a)return{};
209
+ a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function f(a){var b,c,d,l,e={},q=1;for(a=H(a);b=a.match(v);)(c=b[2])?(d=B(c,"styles"),l=B(c,"attrs"),c=B(c,"classes")):d=l=c=null,e["$"+q++]={elements:b[1],classes:c,styles:d,attributes:l},a=a.slice(b[0].length);return e}function B(a,b){var c=a.match(G[b]);return c?H(c[1]):null}function u(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||
210
+ "",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function z(a,b,l,e){var n=0,f;e.toHtml&&(b.name=b.name.replace(E,"$1"));if(e.doCallbacks&&a.elementCallbacks){a:{f=a.elementCallbacks;for(var t=0,g=f.length,v;t<g;++t)if(v=f[t](b)){f=v;break a}f=void 0}if(f)return f}if(e.doTransform&&(f=a._.transformations[b.name])){u(b);for(t=0;t<f.length;++t)q(a,b,f[t]);m(b)}if(e.doFilter){a:{t=b.name;g=a._;a=g.allowedRules.elements[t];f=g.allowedRules.generic;t=g.disallowedRules.elements[t];g=g.disallowedRules.generic;
211
+ v=e.skipRequired;var A={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},k,C;if(a||f){u(b);if(t)for(k=0,C=t.length;k<C;++k)if(!1===c(t[k],b,A)){a=null;break a}if(g)for(k=0,C=g.length;k<C;++k)c(g[k],b,A);if(a)for(k=0,C=a.length;k<C;++k)d(a[k],b,A,v);if(f)for(k=0,C=f.length;k<C;++k)d(f[k],b,A,v);a=A}else a=null}if(!a||!a.valid)return l.push(b),1;C=a.validAttributes;var h=a.validStyles;
212
+ f=a.validClasses;var t=b.attributes,M=b.styles,g=b.classes;v=b.classBackup;var K=b.styleBackup,G,D,p=[],A=[],H=/^data-cke-/;k=!1;delete t.style;delete t["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(G in t)C[G]||(H.test(G)?G==(D=G.replace(/^data-cke-saved-/,""))||C[D]||(delete t[G],k=!0):(delete t[G],k=!0));if(!a.allStyles||a.hadInvalidStyle){for(G in M)a.allStyles||h[G]?p.push(G+":"+M[G]):k=!0;p.length&&(t.style=p.sort().join("; "))}else K&&(t.style=K);if(!a.allClasses||
213
+ a.hadInvalidClass){for(G=0;G<g.length;++G)(a.allClasses||f[g[G]])&&A.push(g[G]);A.length&&(t["class"]=A.sort().join(" "));v&&A.length<v.split(/\s+/).length&&(k=!0)}else v&&(t["class"]=v);k&&(n=1);if(!e.skipFinalValidation&&!x(b))return l.push(b),1}e.toHtml&&(b.name=b.name.replace(I,"cke:$1"));return n}function y(a){var b=[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?new RegExp("^(?:"+b.join("|")+")$"):null}function m(a){var b=a.attributes,c;delete b.style;delete b["class"];
214
+ if(c=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function x(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function J(a){if(!a)return!1;if(!0===a)return!0;var b=y(a);return function(c){return c in a||b&&c.match(b)}}function w(){return new CKEDITOR.htmlParser.element("br")}function F(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==
215
+ a.name||D.$block[a.name])}function l(a,b,c){var d=a.name;if(D.$empty[d]||!a.children.length)"hr"==d&&"br"==b?a.replaceWith(w()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(D.$block[d]||"tr"==d)if("br"==b)a.previous&&!F(a.previous)&&(b=w(),b.insertBefore(a)),a.next&&!F(a.next)&&(b=w(),b.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,l;b:{l=D[b];for(var e=0,q=d.length,n;e<q;++e)if(n=d[e],n.type==CKEDITOR.NODE_ELEMENT&&!l[n.name]){l=!1;break b}l=!0}if(l)a.name=b,a.attributes=
216
+ {},c.push({check:"parent-down",el:a});else{l=a.parent;for(var e=l.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==l.name,t,f,q=d.length;0<q;)n=d[--q],e&&(n.type==CKEDITOR.NODE_TEXT||n.type==CKEDITOR.NODE_ELEMENT&&D.$inline[n.name])?(t||(t=new CKEDITOR.htmlParser.element(b),t.insertAfter(a),c.push({check:"parent-down",el:t})),t.add(n,0)):(t=null,f=D[l.name]||D.span,n.insertAfter(a),l.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n.type!=CKEDITOR.NODE_ELEMENT||f[n.name]||c.push({check:"el-up",el:n}));a.remove()}}else d in
217
+ {style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function q(a,b,c){var d,l;for(d=0;d<c.length;++d)if(l=c[d],!(l.check&&!a.check(l.check,!1)||l.left&&!l.left(b))){l.right(b,K);break}}function n(a,b){var c=b.getDefinition(),d=c.attributes,l=c.styles,e,q,n,t;if(a.name!=c.element)return!1;for(e in d)if("class"==e)for(c=d[e].split(/\s+/),n=a.classes.join("|");t=c.pop();){if(-1==n.indexOf(t))return!1}else if(a.attributes[e]!=d[e])return!1;for(q in l)if(a.styles[q]!=
218
+ l[q])return!1;return!0}function t(a,b){var c,d;"string"==typeof a?c=a:a instanceof CKEDITOR.style?d=a:(c=a[0],d=a[1]);return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function A(a){return function(b){return n(b,a)}}function C(a){return function(b,c){c[a](b)}}var D=CKEDITOR.dtd,M=CKEDITOR.tools.copy,H=CKEDITOR.tools.trim,R=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=
219
219
  !1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=!0;var b=a.config.allowedContent;!0===b?this.disabled=!0:(b||(this.customConfig=!1),this.allow(b,"config",1),this.allow(a.config.extraAllowedContent,"extra",1),this.allow(R[a.enterMode]+" "+R[a.shiftEnterMode],"default",
220
- 1),this.disallow(a.config.disallowedContent))}else this.customConfig=!1,this.allow(a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,d){if(!g(this,b,d))return!1;var k,e;if("string"==typeof b)b=f(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,d);k=b.getDefinition();b={};d=k.attributes;b[k.element]=k={styles:k.styles,requiredStyles:k.styles&&CKEDITOR.tools.objectKeys(k.styles)};d&&(d=
221
- L(d),k.classes=d["class"]?d["class"].split(/\s+/):null,k.requiredClasses=k.classes,delete d["class"],k.attributes=d,k.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(b)){for(k=0;k<b.length;++k)e=this.allow(b[k],c,d);return e}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var e=this,p=[],n=this.editor&&this.editor.config.protectedSource,t,f=!1,g={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};
222
- a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(t=A(e,a,p,g),t&1)f=!0;else if(t&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var k,q,D;if(n)for(q=0;q<n.length;++q)if((D=d.match(n[q]))&&D[0].length==d.length){c=!0;
223
- break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(k=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&A(e,k,c,g);c=!c.length}c||p.push(a)}},null,!0);p.length&&(f=!0);var q;a=[];d=R[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var D;c=p.pop();)c.type==CKEDITOR.NODE_ELEMENT?k(c,d,a):c.remove();for(;q=a.pop();)if(c=q.el,c.parent)switch(D=F[c.parent.name]||F.span,q.check){case "it":F.$removeEmpty[c.name]&&!c.children.length?k(c,d,a):x(c)||k(c,d,a);break;case "el-up":c.parent.type==
224
- CKEDITOR.NODE_DOCUMENT_FRAGMENT||D[c.name]||k(c,d,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||D[c.name]||k(c.parent,d,a)}return f},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!g(this,b,!0))return!1;"string"==typeof b&&(b=f(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},
225
- addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],k;for(b=0;b<a.length&&!k;++b)c=a[b],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(k=c);if(k){for(b=0;b<a.length;++b)d.push(t(a[b],k));this.addTransformations(d)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);
226
- this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,k;for(k=0;k<a.length;++k){b=a[k];var e=void 0,p=void 0,n=void 0,t=void 0,f=void 0,g=void 0;c=[];for(p=0;p<b.length;++p)n=b[p],"string"==typeof n?(n=n.split(/\s*:\s*/),t=n[0],f=null,g=n[1]):(t=n.check,f=n.left,g=n.right),e||(e=n,e=e.element?e.element:t?t.match(/^([a-z0-9]+)/i)[0]:
227
- e.left.getDefinition().element),f instanceof CKEDITOR.style&&(f=z(f)),c.push({check:t==e?null:t,left:f,right:"string"==typeof g?B(g):g});b=e;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return!0;return!1}var k,e;if("string"==typeof a){e=a+"\x3c"+(!1===b?"0":"1")+(c?"1":"0")+"\x3e";if(e in this._.cachedChecks)return this._.cachedChecks[e];d=f(a).$1;k=d.styles;var n=d.classes;d.name=d.elements;
228
- d.classes=n=n?n.split(/\s*,\s*/):[];d.styles=r(k);d.attributes=r(d.attributes);d.children=[];n.length&&(d.attributes["class"]=n.join(" "));k&&(d.attributes.style=CKEDITOR.tools.writeCssText(d.styles));k=d}else d=a.getDefinition(),k=d.styles,n=d.attributes||{},k&&!CKEDITOR.tools.isEmpty(k)?(k=L(k),n.style=CKEDITOR.tools.writeCssText(k,!0)):k={},k={name:d.element,attributes:n,classes:n["class"]?n["class"].split(/\s+/):[],styles:k,children:[]};var n=CKEDITOR.tools.clone(k),t=[],g;if(!1!==b&&(g=this._.transformations[k.name])){for(d=
229
- 0;d<g.length;++d)p(this,k,g[d]);q(k)}A(this,n,t,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});b=0<t.length?!1:CKEDITOR.tools.objectCompare(k.attributes,n.attributes,!0)?!0:!1;"string"==typeof a&&(this._.cachedChecks[e]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var k=a.slice(),e;if(this.check(R[c]))return c;for(d||(k=k.reverse());e=k.pop();)if(this.check(e))return b[e];
230
- return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var Q={styles:1,attributes:1,classes:1},P={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},v=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,G={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},D=/^cke:(object|embed|param)$/,
231
- I=/^(object|embed|param)$/,K;K=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];d&&(/^\d+$/.test(d)&&(d+="px"),a.styles[c]=d)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],k=d&&d.match(/^(\d+)(?:\.\d*)?px$/);
232
- k?a.attributes[c]=k[1]:"cke-test"==d&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){function b(d){a.styles["border-top-width"]=c[d[0]];a.styles["border-right-width"]=
220
+ 1),this.disallow(a.config.disallowedContent))}else this.customConfig=!1,this.allow(a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,d){if(!g(this,b,d))return!1;var l,e;if("string"==typeof b)b=f(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,d);l=b.getDefinition();b={};d=l.attributes;b[l.element]=l={styles:l.styles,requiredStyles:l.styles&&CKEDITOR.tools.objectKeys(l.styles)};d&&(d=
221
+ M(d),l.classes=d["class"]?d["class"].split(/\s+/):null,l.requiredClasses=l.classes,delete d["class"],l.attributes=d,l.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(b)){for(l=0;l<b.length;++l)e=this.allow(b[l],c,d);return e}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var e=this,q=[],n=this.editor&&this.editor.config.protectedSource,t,f=!1,g={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};
222
+ a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(t=z(e,a,q,g),t&1)f=!0;else if(t&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var l,m,E;if(n)for(m=0;m<n.length;++m)if((E=d.match(n[m]))&&E[0].length==d.length){c=!0;
223
+ break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(l=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&z(e,l,c,g);c=!c.length}c||q.push(a)}},null,!0);q.length&&(f=!0);var m;a=[];d=R[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var E;c=q.pop();)c.type==CKEDITOR.NODE_ELEMENT?l(c,d,a):c.remove();for(;m=a.pop();)if(c=m.el,c.parent)switch(E=D[c.parent.name]||D.span,m.check){case "it":D.$removeEmpty[c.name]&&!c.children.length?l(c,d,a):x(c)||l(c,d,a);break;case "el-up":c.parent.type==
224
+ CKEDITOR.NODE_DOCUMENT_FRAGMENT||E[c.name]||l(c,d,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||E[c.name]||l(c.parent,d,a)}return f},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!g(this,b,!0))return!1;"string"==typeof b&&(b=f(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},
225
+ addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],l;for(b=0;b<a.length&&!l;++b)c=a[b],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(l=c);if(l){for(b=0;b<a.length;++b)d.push(t(a[b],l));this.addTransformations(d)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);
226
+ this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,l;for(l=0;l<a.length;++l){b=a[l];var e=void 0,q=void 0,n=void 0,t=void 0,f=void 0,g=void 0;c=[];for(q=0;q<b.length;++q)n=b[q],"string"==typeof n?(n=n.split(/\s*:\s*/),t=n[0],f=null,g=n[1]):(t=n.check,f=n.left,g=n.right),e||(e=n,e=e.element?e.element:t?t.match(/^([a-z0-9]+)/i)[0]:
227
+ e.left.getDefinition().element),f instanceof CKEDITOR.style&&(f=A(f)),c.push({check:t==e?null:t,left:f,right:"string"==typeof g?C(g):g});b=e;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return!0;return!1}var l,e;if("string"==typeof a){e=a+"\x3c"+(!1===b?"0":"1")+(c?"1":"0")+"\x3e";if(e in this._.cachedChecks)return this._.cachedChecks[e];d=f(a).$1;l=d.styles;var n=d.classes;d.name=d.elements;
228
+ d.classes=n=n?n.split(/\s*,\s*/):[];d.styles=r(l);d.attributes=r(d.attributes);d.children=[];n.length&&(d.attributes["class"]=n.join(" "));l&&(d.attributes.style=CKEDITOR.tools.writeCssText(d.styles));l=d}else d=a.getDefinition(),l=d.styles,n=d.attributes||{},l&&!CKEDITOR.tools.isEmpty(l)?(l=M(l),n.style=CKEDITOR.tools.writeCssText(l,!0)):l={},l={name:d.element,attributes:n,classes:n["class"]?n["class"].split(/\s+/):[],styles:l,children:[]};var n=CKEDITOR.tools.clone(l),t=[],g;if(!1!==b&&(g=this._.transformations[l.name])){for(d=
229
+ 0;d<g.length;++d)q(this,l,g[d]);m(l)}z(this,n,t,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});b=0<t.length?!1:CKEDITOR.tools.objectCompare(l.attributes,n.attributes,!0)?!0:!1;"string"==typeof a&&(this._.cachedChecks[e]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var l=a.slice(),e;if(this.check(R[c]))return c;for(d||(l=l.reverse());e=l.pop();)if(this.check(e))return b[e];
230
+ return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var Q={styles:1,attributes:1,classes:1},P={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},v=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,G={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},E=/^cke:(object|embed|param)$/,
231
+ I=/^(object|embed|param)$/,K;K=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];d&&(/^\d+$/.test(d)&&(d+="px"),a.styles[c]=d)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],l=d&&d.match(/^(\d+)(?:\.\d*)?px$/);
232
+ l?a.attributes[c]=l[1]:"cke-test"==d&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){function b(d){a.styles["border-top-width"]=c[d[0]];a.styles["border-right-width"]=
233
233
  c[d[1]];a.styles["border-bottom-width"]=c[d[2]];a.styles["border-left-width"]=c[d[3]]}if(a.styles.border){var c=a.styles.border.match(/([\.\d]+\w+)/g)||["0px"];switch(c.length){case 1:a.styles["border-width"]=c[0];break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}a.styles["border-style"]=a.styles["border-style"]||(a.styles.border.match(/(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit)/)||[])[0];a.styles["border-style"]||delete a.styles["border-style"];
234
234
  delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function b(d){a.styles["margin-top"]=
235
- c[d[0]];a.styles["margin-right"]=c[d[1]];a.styles["margin-bottom"]=c[d[2]];a.styles["margin-left"]=c[d[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(c.length){case 1:a.styles.margin=c[0];break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:n,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),d=c.styles,k=c.attributes,e,p,n,t;a.name=c.element;for(e in k)if("class"==
236
- e)for(c=a.classes.join("|"),n=k[e].split(/\s+/);t=n.pop();)-1==c.indexOf(t)&&a.classes.push(t);else a.attributes[e]=k[e];for(p in d)a.styles[p]=d[p]}}}})();
235
+ c[d[0]];a.styles["margin-right"]=c[d[1]];a.styles["margin-bottom"]=c[d[2]];a.styles["margin-left"]=c[d[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(c.length){case 1:a.styles.margin=c[0];break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:n,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),d=c.styles,l=c.attributes,e,q,n,t;a.name=c.element;for(e in l)if("class"==
236
+ e)for(c=a.classes.join("|"),n=l[e].split(/\s+/);t=n.pop();)-1==c.indexOf(t)&&a.classes.push(t);else a.attributes[e]=l[e];for(q in d)a.styles[q]=d[q]}}}})();
237
237
  (function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=CKEDITOR.currentInstance)&&a.focusManager.blur(1),this.hasFocus=!0,(a=this._.editor.container)&&a.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=
238
- 1},unlock:function(){delete this._.locked},blur:function(a){function d(){if(this.hasFocus){this.hasFocus=!1;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?d.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;d.call(this)},b,this)}},add:function(a,d){var b=a.getCustomData("focusmanager");if(!b||b!=this){b&&b.remove(a);var b=
239
- "focus",c="blur";d&&(CKEDITOR.env.ie?(b="focusin",c="focusout"):CKEDITOR.event.useCapture=1);var e={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,e.focus,this);a.on(c,e.blur,this);d&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",e)}},remove:function(a){a.removeCustomData("focusmanager");var d=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",d.blur);a.removeListener("focus",
240
- d.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this};
241
- (function(){var a,d=function(b){b=b.data;var d=b.getKeystroke(),g=this.keystrokes[d],h=this._.editor;a=!1===h.fire("key",{keyCode:d,domEvent:b});a||(g&&(a=!1!==h.execCommand(g,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[d]));a&&b.preventDefault(!0);return!a},b=function(b){a&&(a=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",d,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}})();
242
- (function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,d,b){a&&CKEDITOR.lang.languages[a]||
238
+ 1},unlock:function(){delete this._.locked},blur:function(a){function d(){var a=this._.editor;this.hasFocus&&(this.hasFocus=!1,CKEDITOR.env.chrome&&a.editable().isInline()&&a.window.$.getSelection().removeAllRanges(),(a=this._.editor.container)&&a.removeClass("cke_focus"),this._.editor.fire("blur"))}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?d.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;d.call(this)},
239
+ b,this)}},add:function(a,d){var b=a.getCustomData("focusmanager");if(!b||b!=this){b&&b.remove(a);var b="focus",c="blur";d&&(CKEDITOR.env.ie?(b="focusin",c="focusout"):CKEDITOR.event.useCapture=1);var e={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,e.focus,this);a.on(c,e.blur,this);d&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",e)}},remove:function(a){a.removeCustomData("focusmanager");
240
+ var d=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",d.blur);a.removeListener("focus",d.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this};
241
+ (function(){var a,d=function(b){b=b.data;var d=b.getKeystroke(),g=this.keystrokes[d],k=this._.editor;a=!1===k.fire("key",{keyCode:d,domEvent:b});a||(g&&(a=!1!==k.execCommand(g,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[d]));a&&b.preventDefault(!0);return!a},b=function(b){a&&(a=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",d,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}})();
242
+ (function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,d,b){a&&CKEDITOR.lang.languages[a]||
243
243
  (a=this.detect(d,a));var c=this;d=function(){c[a].dir=c.rtl[a]?"rtl":"ltr";b(a,c[a])};this[a]?d():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),d,this)},detect:function(a,d){var b=this.languages;d=d||navigator.userLanguage||navigator.language||a;var c=d.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=c[1],c=c[2];b[e+"-"+c]?e=e+"-"+c:b[e]||(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||a}}})();
244
- CKEDITOR.scriptLoader=function(){var a={},d={};return{load:function(b,c,e,g){var h="string"==typeof b;h&&(b=[b]);e||(e=CKEDITOR);var l=b.length,m=[],r=[],f=function(a){c&&(h?c.call(e,a):c.call(e,m,r))};if(0===l)f(!0);else{var C=function(a,b){(b?m:r).push(a);0>=--l&&(g&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),f(b))},u=function(b,c){a[b]=1;var e=d[b];delete d[b];for(var f=0;f<e.length;f++)e[f](b,c)},A=function(b){if(a[b])C(b,!0);else{var e=d[b]||(d[b]=[]);e.push(C);if(!(1<e.length)){var f=
245
- new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:b});c&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,u(b,!0)}:(f.$.onload=function(){setTimeout(function(){u(b,!0)},0)},f.$.onerror=function(){u(b,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};g&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var y=0;y<l;y++)A(b[y])}},
246
- queue:function(){function a(){var b;(b=c[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var c=[];return function(d,g){var h=this;c.push({scriptUrl:d,callback:function(){g&&g.apply(this,arguments);c.shift();a.call(h)}});1==c.length&&a.call(this)}}()}}();CKEDITOR.resourceManager=function(a,d){this.basePath=a;this.fileName=d;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};
244
+ CKEDITOR.scriptLoader=function(){var a={},d={};return{load:function(b,c,e,g){var k="string"==typeof b;k&&(b=[b]);e||(e=CKEDITOR);var h=b.length,p=[],r=[],f=function(a){c&&(k?c.call(e,a):c.call(e,p,r))};if(0===h)f(!0);else{var B=function(a,b){(b?p:r).push(a);0>=--h&&(g&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),f(b))},u=function(b,c){a[b]=1;var e=d[b];delete d[b];for(var f=0;f<e.length;f++)e[f](b,c)},z=function(b){if(a[b])B(b,!0);else{var e=d[b]||(d[b]=[]);e.push(B);if(!(1<e.length)){var f=
245
+ new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:b});c&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,u(b,!0)}:(f.$.onload=function(){setTimeout(function(){u(b,!0)},0)},f.$.onerror=function(){u(b,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};g&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var y=0;y<h;y++)z(b[y])}},
246
+ queue:function(){function a(){var b;(b=c[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var c=[];return function(d,g){var k=this;c.push({scriptUrl:d,callback:function(){g&&g.apply(this,arguments);c.shift();a.call(k)}});1==c.length&&a.call(this)}}()}}();CKEDITOR.resourceManager=function(a,d){this.basePath=a;this.fileName=d;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};
247
247
  CKEDITOR.resourceManager.prototype={add:function(a,d){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.');var b=this.registered[a]=d||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var d=this.externals[a];return CKEDITOR.getUrl(d&&d.dir||this.basePath+a+"/")},getFilePath:function(a){var d=this.externals[a];
248
- return CKEDITOR.getUrl(this.getPath(a)+(d?d.file:this.fileName+".js"))},addExternal:function(a,d,b){a=a.split(",");for(var c=0;c<a.length;c++){var e=a[c];b||(d=d.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[e]={dir:d,file:b||this.fileName+".js"}}},load:function(a,d,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var c=this.loaded,e=this.registered,g=[],h={},l={},m=0;m<a.length;m++){var r=a[m];if(r)if(c[r]||e[r])l[r]=this.get(r);else{var f=this.getFilePath(r);g.push(f);f in h||(h[f]=
249
- []);h[f].push(r)}}CKEDITOR.scriptLoader.load(g,function(a,e){if(e.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+h[e[0]].join(",")+'" was not found at "'+e[0]+'".');for(var f=0;f<a.length;f++)for(var g=h[a[f]],q=0;q<g.length;q++){var x=g[q];l[x]=this.get(x);c[x]=1}d.call(b,l)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");
250
- CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var d={};return function(b,c,e){var g={},h=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(g,a);var b=[],f;for(f in a){var l=a[f],u=l&&l.requires;if(!d[f]){if(l.icons)for(var A=l.icons.split(","),y=A.length;y--;)CKEDITOR.skin.addIcon(A[y],l.path+"icons/"+(CKEDITOR.env.hidpi&&l.hidpi?"hidpi/":"")+A[y]+".png");d[f]=1}if(u)for(u.split&&(u=u.split(",")),l=0;l<u.length;l++)g[u[l]]||b.push(u[l])}if(b.length)h.call(this,
251
- b);else{for(f in g)l=g[f],l.onLoad&&!l.onLoad._called&&(!1===l.onLoad()&&delete g[f],l.onLoad._called=1);c&&c.call(e||window,g)}},this)};h.call(this,b)}});CKEDITOR.plugins.setLang=function(a,d,b){var c=this.get(a);a=c.langEntries||(c.langEntries={});c=c.lang||(c.lang=[]);c.split&&(c=c.split(","));-1==CKEDITOR.tools.indexOf(c,d)&&c.push(d);a[d]=b};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this};
248
+ return CKEDITOR.getUrl(this.getPath(a)+(d?d.file:this.fileName+".js"))},addExternal:function(a,d,b){a=a.split(",");for(var c=0;c<a.length;c++){var e=a[c];b||(d=d.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[e]={dir:d,file:b||this.fileName+".js"}}},load:function(a,d,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var c=this.loaded,e=this.registered,g=[],k={},h={},p=0;p<a.length;p++){var r=a[p];if(r)if(c[r]||e[r])h[r]=this.get(r);else{var f=this.getFilePath(r);g.push(f);f in k||(k[f]=
249
+ []);k[f].push(r)}}CKEDITOR.scriptLoader.load(g,function(a,e){if(e.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+k[e[0]].join(",")+'" was not found at "'+e[0]+'".');for(var f=0;f<a.length;f++)for(var g=k[a[f]],m=0;m<g.length;m++){var x=g[m];h[x]=this.get(x);c[x]=1}d.call(b,h)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");
250
+ CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var d={};return function(b,c,e){var g={},k=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(g,a);var b=[],f;for(f in a){var h=a[f],u=h&&h.requires;if(!d[f]){if(h.icons)for(var z=h.icons.split(","),y=z.length;y--;)CKEDITOR.skin.addIcon(z[y],h.path+"icons/"+(CKEDITOR.env.hidpi&&h.hidpi?"hidpi/":"")+z[y]+".png");d[f]=1}if(u)for(u.split&&(u=u.split(",")),h=0;h<u.length;h++)g[u[h]]||b.push(u[h])}if(b.length)k.call(this,
251
+ b);else{for(f in g)h=g[f],h.onLoad&&!h.onLoad._called&&(!1===h.onLoad()&&delete g[f],h.onLoad._called=1);c&&c.call(e||window,g)}},this)};k.call(this,b)}});CKEDITOR.plugins.setLang=function(a,d,b){var c=this.get(a);a=c.langEntries||(c.langEntries={});c=c.lang||(c.lang=[]);c.split&&(c=c.split(","));-1==CKEDITOR.tools.indexOf(c,d)&&c.push(d);a[d]=b};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this};
252
252
  CKEDITOR.ui.prototype={add:function(a,d,b){b.name=a.toLowerCase();var c=this.items[a]={type:d,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(c,b)},get:function(a){return this.instances[a]},create:function(a){var d=this.items[a],b=d&&this._.handlers[d.type],c=d&&d.command&&this.editor.getCommand(d.command),b=b&&b.create.apply(this,d.args);this.instances[a]=b;c&&c.uiItems.push(b);b&&!b.type&&(b.type=d.type);return b},addHandler:function(a,d){this._.handlers[a]=
253
253
  d},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}};CKEDITOR.event.implementOn(CKEDITOR.ui);
254
254
  (function(){function a(a,e,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==e){if(!(e instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!f)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!b(e,f))throw Error('The specified element mode is not supported on element: "'+e.getName()+'".');
255
255
  this.element=e;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(e.getId()||e.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||d();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",
256
- c);this.on("selectionChange",function(a){g(this,a.data.path)});this.on("activeFilterChange",function(){g(this,this.elementPath(),!0)});this.on("mode",c);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){"destroyed"!==this.status?l(this,a):CKEDITOR.warn("editor-incorrect-destroy")},0,this)}function d(){do var a="editor"+ ++A;while(CKEDITOR.instances[a]);return a}function b(a,
257
- b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function c(){var a=this.commands,b;for(b in a)e(this,a[b])}function e(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function g(a,b,c){if(b){var d,e,k=a.commands;for(e in k)d=k[e],(c||d.contextSensitive)&&d.refresh(a,b)}}function h(a){var b=a.config.customConfig;if(!b)return!1;var b=
258
- CKEDITOR.getUrl(b),c=y[b]||(y[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&h(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};h(a)});return!0}function l(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}c=a.config;a.readOnly=c.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?
256
+ c);this.on("selectionChange",function(a){g(this,a.data.path)});this.on("activeFilterChange",function(){g(this,this.elementPath(),!0)});this.on("mode",c);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){"destroyed"!==this.status?h(this,a):CKEDITOR.warn("editor-incorrect-destroy")},0,this)}function d(){do var a="editor"+ ++z;while(CKEDITOR.instances[a]);return a}function b(a,
257
+ b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function c(){var a=this.commands,b;for(b in a)e(this,a[b])}function e(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function g(a,b,c){if(b){var d,e,l=a.commands;for(e in l)d=l[e],(c||d.contextSensitive)&&d.refresh(a,b)}}function k(a){var b=a.config.customConfig;if(!b)return!1;var b=
258
+ CKEDITOR.getUrl(b),c=y[b]||(y[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&k(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};k(a)});return!0}function h(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}c=a.config;a.readOnly=c.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?
259
259
  a.element.is("textarea")?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;
260
- a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;c.skin&&(CKEDITOR.skinName=c.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);m(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);h(a)||a.fireOnce("customConfigLoaded")}function m(a){CKEDITOR.skin.loadPart("editor",function(){r(a)})}function r(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,
261
- c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");f(a)})}function f(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);C(a)})}function C(a){var b=a.config,c=b.plugins,d=b.extraPlugins,e=
262
- b.removePlugins;if(d)var k=new RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),c=c.replace(k,""),c=c+(","+d);if(e)var p=new RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),c=c.replace(p,"");CKEDITOR.env.air&&(c+=",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var d=[],k=[],e=[];a.plugins=c;for(var f in c){var g=c[f],h=g.lang,l=null,m=g.requires,r;CKEDITOR.tools.isArray(m)&&(m=m.join(","));if(m&&(r=m.match(p)))for(;m=r.pop();)CKEDITOR.error("editor-plugin-required",
263
- {plugin:m.replace(",",""),requiredBy:f});h&&!a.lang[f]&&(h.split&&(h=h.split(",")),0<=CKEDITOR.tools.indexOf(h,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(h,l)?l:0<=CKEDITOR.tools.indexOf(h,"en")?"en":h[0]),g.langEntries&&g.langEntries[l]?(a.lang[f]=g.langEntries[l],l=null):e.push(CKEDITOR.getUrl(g.path+"lang/"+l+".js")));k.push(l);d.push(g)}CKEDITOR.scriptLoader.load(e,function(){for(var c=["beforeInit","init","afterInit"],e=0;e<c.length;e++)for(var p=
264
- 0;p<d.length;p++){var n=d[p];0===e&&k[p]&&n.lang&&n.langEntries&&(a.lang[n.name]=n.langEntries[k[p]]);if(n[c[e]])n[c[e]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(p=0;p<a.config.blockedKeystrokes.length;p++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[p]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function u(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();
265
- this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var A=0,y={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var c=new CKEDITOR.command(this,b);this.mode&&e(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!d.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}
260
+ a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;c.skin&&(CKEDITOR.skinName=c.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);p(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);k(a)||a.fireOnce("customConfigLoaded")}function p(a){CKEDITOR.skin.loadPart("editor",function(){r(a)})}function r(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,
261
+ c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");f(a)})}function f(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);B(a)})}function B(a){var b=a.config,c=b.plugins,d=b.extraPlugins,e=
262
+ b.removePlugins;if(d)var l=new RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),c=c.replace(l,""),c=c+(","+d);if(e)var q=new RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),c=c.replace(q,"");CKEDITOR.env.air&&(c+=",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var d=[],l=[],e=[];a.plugins=c;for(var f in c){var g=c[f],k=g.lang,h=null,p=g.requires,r;CKEDITOR.tools.isArray(p)&&(p=p.join(","));if(p&&(r=p.match(q)))for(;p=r.pop();)CKEDITOR.error("editor-plugin-required",
263
+ {plugin:p.replace(",",""),requiredBy:f});k&&!a.lang[f]&&(k.split&&(k=k.split(",")),0<=CKEDITOR.tools.indexOf(k,a.langCode)?h=a.langCode:(h=a.langCode.replace(/-.*/,""),h=h!=a.langCode&&0<=CKEDITOR.tools.indexOf(k,h)?h:0<=CKEDITOR.tools.indexOf(k,"en")?"en":k[0]),g.langEntries&&g.langEntries[h]?(a.lang[f]=g.langEntries[h],h=null):e.push(CKEDITOR.getUrl(g.path+"lang/"+h+".js")));l.push(h);d.push(g)}CKEDITOR.scriptLoader.load(e,function(){for(var c=["beforeInit","init","afterInit"],e=0;e<c.length;e++)for(var q=
264
+ 0;q<d.length;q++){var n=d[q];0===e&&l[q]&&n.lang&&n.langEntries&&(a.lang[n.name]=n.langEntries[l[q]]);if(n[c[e]])n[c[e]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(q=0;q<a.config.blockedKeystrokes.length;q++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[q]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function u(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();
265
+ this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var z=0,y={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var c=new CKEDITOR.command(this,b);this.mode&&e(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!d.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}
266
266
  function b(a){return!!(a&&a.call&&a.apply)}var c=this,d=c.element,e=new CKEDITOR.dom.element(d.$.form);d.is("textarea")&&e&&(e.on("submit",a),b(e.$.submit)&&(e.$.submit=CKEDITOR.tools.override(e.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){e.removeListener("submit",a)}))},destroy:function(a){this.fire("beforeDestroy");!a&&u.call(this);this.editable(null);this.filter&&(this.filter.destroy(),delete this.filter);delete this.activeFilter;this.status=
267
267
  "destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),d={name:a,commandData:b,command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&
268
268
  !1!==this.fire("beforeCommandExec",d)&&(d.returnValue=c.exec(d.commandData),!c.async&&!1!==this.fire("afterCommandExec",d))?d.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");
269
269
  "string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){var d=!0,e=b;b&&"object"==typeof b&&(c=b.internal,e=b.callback,d=!b.noSnapshot);!c&&d&&this.fire("saveSnapshot");if(e||!c)this.once("dataReady",function(a){!c&&d&&this.fire("saveSnapshot");e&&e.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;
270
270
  !c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,b,c){this.fire("insertHtml",{dataValue:a,mode:b,range:c})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;
271
- for(var d=new CKEDITOR.dom.documentFragment,e,k,p,n=0;n<c.length;n++){var f=c[n],g=f.startContainer;g.getName&&"tr"==g.getName()?(e||(e=g.getAscendant("table").clone(),e.append(g.getAscendant("tbody").clone()),d.append(e),e=e.findOne("tbody")),k&&k.equals(g)||(k=g,p=g.clone(),e.append(p)),p.append(f.cloneContents())):d.append(f.cloneContents())}b=e?d:b.getHtmlFromRange(c[0]);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=this.editable(),d=this.getSelection().getRanges();if(!c||0===
271
+ for(var d=new CKEDITOR.dom.documentFragment,e,l,q,n=0;n<c.length;n++){var f=c[n],g=f.startContainer;g.getName&&"tr"==g.getName()?(e||(e=g.getAscendant("table").clone(),e.append(g.getAscendant("tbody").clone()),d.append(e),e=e.findOne("tbody")),l&&l.equals(g)||(l=g,q=g.clone(),e.append(q)),q.append(f.cloneContents())):d.append(f.cloneContents())}b=e?d:b.getHtmlFromRange(c[0]);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=this.editable(),d=this.getSelection().getRanges();if(!c||0===
272
272
  d.length)return null;d=d[0];c=c.extractHtmlFromRange(d,b);b||this.getSelection().selectRanges([d]);return a?c.getHtml():c},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return u.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,
273
273
  0)],c,d,e=b.length;e--;)c=b[e],d=0,CKEDITOR.tools.isArray(c)&&(d=c[1],c=c[0]),d?a[c]=d:delete a[c]},getCommandKeystroke:function(a){var b=a.name,c=this.keystrokeHandler.keystrokes,d;if(a.fakeKeystroke)return a.fakeKeystroke;for(d in c)if(c.hasOwnProperty(d)&&c[d]==b)return d;return null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),a===this.filter?this.setActiveEnterMode(null,
274
274
  null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)}})})();CKEDITOR.ELEMENT_MODE_NONE=0;
275
275
  CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3;CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}};
276
- (function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,e,g=0,h;c=this._.htmlPartsRegex.exec(b);){e=c.index;if(e>g)if(g=b.substring(g,e),h)h.push(g);else this.onText(g);
277
- g=this._.htmlPartsRegex.lastIndex;if(e=c[1])if(e=e.toLowerCase(),h&&CKEDITOR.dtd.$cdata[e]&&(this.onCDATA(h.join("")),h=null),!h){this.onTagClose(e);continue}if(h)h.push(c[0]);else if(e=c[3]){if(e=e.toLowerCase(),!/="/.test(e)){var l={},m,r=c[4];c=!!c[5];if(r)for(;m=a.exec(r);){var f=m[1].toLowerCase();m=m[2]||m[3]||m[4]||"";l[f]=!m&&d[f]?f:CKEDITOR.tools.htmlDecodeAttr(m)}this.onTagOpen(e,l,c);!h&&CKEDITOR.dtd.$cdata[e]&&(h=[])}}else if(e=c[2])this.onComment(e)}if(b.length>g)this.onText(b.substring(g,
276
+ (function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,e,g=0,k;c=this._.htmlPartsRegex.exec(b);){e=c.index;if(e>g)if(g=b.substring(g,e),k)k.push(g);else this.onText(g);
277
+ g=this._.htmlPartsRegex.lastIndex;if(e=c[1])if(e=e.toLowerCase(),k&&CKEDITOR.dtd.$cdata[e]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(e);continue}if(k)k.push(c[0]);else if(e=c[3]){if(e=e.toLowerCase(),!/="/.test(e)){var h={},p,r=c[4];c=!!c[5];if(r)for(;p=a.exec(r);){var f=p[1].toLowerCase();p=p[2]||p[3]||p[4]||"";h[f]=!p&&d[f]?f:CKEDITOR.tools.htmlDecodeAttr(p)}this.onTagOpen(e,h,c);!k&&CKEDITOR.dtd.$cdata[e]&&(k=[])}}else if(e=c[2])this.onComment(e)}if(b.length>g)this.onText(b.substring(g,
278
278
  b.length))}}})();
279
279
  CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,d){d?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,d){"string"==typeof d&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",a,'\x3d"',d,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a,
280
280
  "--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var d=this._.output.join("");a&&this.reset();return d}}});"use strict";
@@ -285,230 +285,230 @@ CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlPar
285
285
  (function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,d){if(!(this.value=a.onText(d,this.value,this)))return this.remove(),!1},writeHtml:function(a,d){d&&this.filter(d);a.text(this.value)}})})();"use strict";
286
286
  (function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}};
287
287
  (function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var d=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),e={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=
288
- function(g,h,l){function m(a){var b;if(0<x.length)for(var c=0;c<x.length;c++){var d=x[c],k=d.name,e=CKEDITOR.dtd[k],f=w.name&&CKEDITOR.dtd[w.name];f&&!f[k]||a&&e&&!e[a]&&CKEDITOR.dtd[a]?k==w.name&&(C(w,w.parent,1),c--):(b||(r(),b=1),d=d.clone(),d.parent=w,w=d,x.splice(c,1),c--)}}function r(){for(;J.length;)C(J.shift(),w)}function f(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],d;c&&c.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(c.value))?
289
- c.value=d:a.children.length=b-1)}}function C(b,c,d){c=c||w||q;var e=w;void 0===b.previous&&(u(c,b)&&(w=c,y.onTagOpen(l,{}),b.returnPoint=c=w),f(b),a(b)&&!b.children.length||c.add(b),"pre"==b.name&&(k=!1),"textarea"==b.name&&(E=!1));b.returnPoint?(w=b.returnPoint,delete b.returnPoint):w=d?c:e}function u(a,b){if((a==q||"body"==a.name)&&l&&(!a.name||CKEDITOR.dtd[a.name][l])){var c,d;return(c=b.attributes&&(d=b.attributes["data-cke-real-element-type"])?d:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&
290
- !b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function A(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var y=new CKEDITOR.htmlParser,q=h instanceof CKEDITOR.htmlParser.element?h:"string"==typeof h?new CKEDITOR.htmlParser.element(h):new CKEDITOR.htmlParser.fragment,x=[],J=[],w=q,E="textarea"==q.name,k="pre"==q.name;y.onTagOpen=function(e,n,f,g){n=new CKEDITOR.htmlParser.element(e,n);n.isUnknown&&f&&(n.isEmpty=!0);n.isOptionalClose=g;
291
- if(a(n))x.push(n);else{if("pre"==e)k=!0;else{if("br"==e&&k){w.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==e&&(E=!0)}if("br"==e)J.push(n);else{for(;!(g=(f=w.name)?CKEDITOR.dtd[f]||(w._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c,n.isUnknown||w.isUnknown||g[e]);)if(w.isOptionalClose)y.onTagClose(f);else if(e in b&&f in b)f=w.children,(f=f[f.length-1])&&"li"==f.name||C(f=new CKEDITOR.htmlParser.element("li"),w),!n.returnPoint&&(n.returnPoint=w),w=f;else if(e in CKEDITOR.dtd.$listItem&&
292
- !A(e,f))y.onTagOpen("li"==e?"ul":"dl",{},0,1);else if(f in d&&!A(e,f))!n.returnPoint&&(n.returnPoint=w),w=w.parent;else if(f in CKEDITOR.dtd.$inline&&x.unshift(w),w.parent)C(w,w.parent,1);else{n.isOrphan=1;break}m(e);r();n.parent=w;n.isEmpty?C(n):w=n}}};y.onTagClose=function(a){for(var b=x.length-1;0<=b;b--)if(a==x[b].name){x.splice(b,1);return}for(var c=[],d=[],k=w;k!=q&&k.name!=a;)k._.isBlockLike||d.unshift(k),c.push(k),k=k.returnPoint||k.parent;if(k!=q){for(b=0;b<c.length;b++){var e=c[b];C(e,e.parent)}w=
293
- k;k._.isBlockLike&&r();C(k,k.parent);k==w&&(w=w.parent);x=x.concat(d)}"body"==a&&(l=!1)};y.onText=function(a){if(!(w._.hasInlineStarted&&!J.length||k||E)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=w.name,f=b?CKEDITOR.dtd[b]||(w._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!E&&!f["#"]&&b in d)y.onTagOpen(e[b]||""),y.onText(a);else{r();m();k||E||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(u(w,a))this.onTagOpen(l,{},0,1);w.add(a)}};y.onCDATA=
294
- function(a){w.add(new CKEDITOR.htmlParser.cdata(a))};y.onComment=function(a){r();m();w.add(new CKEDITOR.htmlParser.comment(a))};y.parse(g);for(r();w!=q;)C(w,w.parent,1);f(q);return q};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=0<b?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT&&(c.value=CKEDITOR.tools.rtrim(c.value),0===c.value.length)){this.children.pop();this.add(a);return}c.next=
288
+ function(g,k,h){function p(a){var b;if(0<x.length)for(var c=0;c<x.length;c++){var d=x[c],l=d.name,e=CKEDITOR.dtd[l],f=w.name&&CKEDITOR.dtd[w.name];f&&!f[l]||a&&e&&!e[a]&&CKEDITOR.dtd[a]?l==w.name&&(B(w,w.parent,1),c--):(b||(r(),b=1),d=d.clone(),d.parent=w,w=d,x.splice(c,1),c--)}}function r(){for(;J.length;)B(J.shift(),w)}function f(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],d;c&&c.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(c.value))?
289
+ c.value=d:a.children.length=b-1)}}function B(b,c,d){c=c||w||m;var e=w;void 0===b.previous&&(u(c,b)&&(w=c,y.onTagOpen(h,{}),b.returnPoint=c=w),f(b),a(b)&&!b.children.length||c.add(b),"pre"==b.name&&(l=!1),"textarea"==b.name&&(F=!1));b.returnPoint?(w=b.returnPoint,delete b.returnPoint):w=d?c:e}function u(a,b){if((a==m||"body"==a.name)&&h&&(!a.name||CKEDITOR.dtd[a.name][h])){var c,d;return(c=b.attributes&&(d=b.attributes["data-cke-real-element-type"])?d:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&
290
+ !b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function z(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var y=new CKEDITOR.htmlParser,m=k instanceof CKEDITOR.htmlParser.element?k:"string"==typeof k?new CKEDITOR.htmlParser.element(k):new CKEDITOR.htmlParser.fragment,x=[],J=[],w=m,F="textarea"==m.name,l="pre"==m.name;y.onTagOpen=function(e,n,f,g){n=new CKEDITOR.htmlParser.element(e,n);n.isUnknown&&f&&(n.isEmpty=!0);n.isOptionalClose=g;
291
+ if(a(n))x.push(n);else{if("pre"==e)l=!0;else{if("br"==e&&l){w.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==e&&(F=!0)}if("br"==e)J.push(n);else{for(;!(g=(f=w.name)?CKEDITOR.dtd[f]||(w._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c,n.isUnknown||w.isUnknown||g[e]);)if(w.isOptionalClose)y.onTagClose(f);else if(e in b&&f in b)f=w.children,(f=f[f.length-1])&&"li"==f.name||B(f=new CKEDITOR.htmlParser.element("li"),w),!n.returnPoint&&(n.returnPoint=w),w=f;else if(e in CKEDITOR.dtd.$listItem&&
292
+ !z(e,f))y.onTagOpen("li"==e?"ul":"dl",{},0,1);else if(f in d&&!z(e,f))!n.returnPoint&&(n.returnPoint=w),w=w.parent;else if(f in CKEDITOR.dtd.$inline&&x.unshift(w),w.parent)B(w,w.parent,1);else{n.isOrphan=1;break}p(e);r();n.parent=w;n.isEmpty?B(n):w=n}}};y.onTagClose=function(a){for(var b=x.length-1;0<=b;b--)if(a==x[b].name){x.splice(b,1);return}for(var c=[],d=[],l=w;l!=m&&l.name!=a;)l._.isBlockLike||d.unshift(l),c.push(l),l=l.returnPoint||l.parent;if(l!=m){for(b=0;b<c.length;b++){var e=c[b];B(e,e.parent)}w=
293
+ l;l._.isBlockLike&&r();B(l,l.parent);l==w&&(w=w.parent);x=x.concat(d)}"body"==a&&(h=!1)};y.onText=function(a){if(!(w._.hasInlineStarted&&!J.length||l||F)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=w.name,f=b?CKEDITOR.dtd[b]||(w._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!F&&!f["#"]&&b in d)y.onTagOpen(e[b]||""),y.onText(a);else{r();p();l||F||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(u(w,a))this.onTagOpen(h,{},0,1);w.add(a)}};y.onCDATA=
294
+ function(a){w.add(new CKEDITOR.htmlParser.cdata(a))};y.onComment=function(a){r();p();w.add(new CKEDITOR.htmlParser.comment(a))};y.parse(g);for(r();w!=m;)B(w,w.parent,1);f(m);return m};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=0<b?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT&&(c.value=CKEDITOR.tools.rtrim(c.value),0===c.value.length)){this.children.pop();this.add(a);return}c.next=
295
295
  a}a.previous=c;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,
296
296
  c)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var d=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(d,this);b&&this.filterChildren(b,!1,d);b=0;c=this.children;for(d=c.length;b<d;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var d=a(this);if(!1!==d){c=this.children;for(var e=0;e<c.length;e++)d=c[e],d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,b):b&&d.type!=b||a(d)}},getFilterContext:function(a){return a||
297
297
  {}}}})();"use strict";
298
- (function(){function a(){this.rules=[]}function d(b,c,d,g){var h,l;for(h in c)(l=b[h])||(l=b[h]=new a),l.add(c[h],d,g)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},proto:{addRules:function(a,c){var e;"number"==typeof c?e=c:c&&"priority"in c&&(e=
298
+ (function(){function a(){this.rules=[]}function d(b,c,d,g){var k,h;for(k in c)(h=b[k])||(h=b[k]=new a),h.add(c[k],d,g)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},proto:{addRules:function(a,c){var e;"number"==typeof c?e=c:c&&"priority"in c&&(e=
299
299
  c.priority);"number"!=typeof e&&(e=10);"object"!=typeof c&&(c={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,e,c);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,e,c);a.elements&&d(this.elementsRules,a.elements,e,c);a.attributes&&d(this.attributesRules,a.attributes,e,c);a.text&&this.textRules.add(a.text,e,c);a.comment&&this.commentRules.add(a.comment,e,c);a.root&&this.rootRules.add(a.root,e,c)},applyTo:function(a){a.filter(this)},onElementName:function(a,c){return this.elementNameRules.execOnName(a,
300
- c)},onAttributeName:function(a,c){return this.attributeNameRules.execOnName(a,c)},onText:function(a,c,d){return this.textRules.exec(a,c,d)},onComment:function(a,c,d){return this.commentRules.exec(a,c,d)},onRoot:function(a,c){return this.rootRules.exec(a,c)},onElement:function(a,c){for(var d=[this.elementsRules["^"],this.elementsRules[c.name],this.elementsRules.$],g,h=0;3>h;h++)if(g=d[h]){g=g.exec(a,c,this);if(!1===g)return null;if(g&&g!=c)return this.onNode(a,g);if(c.parent&&!c.name)break}return c},
300
+ c)},onAttributeName:function(a,c){return this.attributeNameRules.execOnName(a,c)},onText:function(a,c,d){return this.textRules.exec(a,c,d)},onComment:function(a,c,d){return this.commentRules.exec(a,c,d)},onRoot:function(a,c){return this.rootRules.exec(a,c)},onElement:function(a,c){for(var d=[this.elementsRules["^"],this.elementsRules[c.name],this.elementsRules.$],g,k=0;3>k;k++)if(g=d[k]){g=g.exec(a,c,this);if(!1===g)return null;if(g&&g!=c)return this.onNode(a,g);if(c.parent&&!c.name)break}return c},
301
301
  onNode:function(a,c){var d=c.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,d,g){return(d=this.attributesRules[d])?d.exec(a,g,c,this):g}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,d){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:d})},addMany:function(a,
302
- c,d){for(var g=[this.findIndex(c),0],h=0,l=a.length;h<l;h++)g.push({value:a[h],priority:c,options:d});this.rules.splice.apply(this.rules,g)},findIndex:function(a){for(var c=this.rules,d=c.length-1;0<=d&&a<c[d].priority;)d--;return d+1},exec:function(a,c){var d=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,g=Array.prototype.slice.call(arguments,1),h=this.rules,l=h.length,m,r,f,C;for(C=0;C<l;C++)if(d&&(m=c.type,r=c.name),f=h[C],!(a.nonEditable&&!f.options.applyToAll||
303
- a.nestedEditable&&f.options.excludeNestedEditable)){f=f.value.apply(null,g);if(!1===f||d&&f&&(f.name!=r||f.type!=m))return f;null!=f&&(g[0]=c=f)}return c},execOnName:function(a,c){for(var d=0,g=this.rules,h=g.length,l;c&&d<h;d++)l=g[d],a.nonEditable&&!l.options.applyToAll||a.nestedEditable&&l.options.excludeNestedEditable||(c=c.replace(l.value[0],l.value[1]));return c}}})();
304
- (function(){function a(a,d){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function n(a,d){return function(k){if(k.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=[],n=b(k),t,D;if(n)for(p(n,1)&&e.push(n);n;)g(n)&&(t=c(n))&&p(t)&&((D=c(t))&&!g(D)?e.push(t):(f(v).insertAfter(t),t.remove())),n=n.previous;for(n=0;n<e.length;n++)e[n].remove();if(e=!a||!1!==("function"==typeof d?d(k):d))v||CKEDITOR.env.needsBrFiller||
305
- k.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?v||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||k.name in CKEDITOR.dtd.tr||k.name in CKEDITOR.dtd.$listItem)?(e=b(k),e=!e||"form"==k.name&&"input"==e.name):e=!1:e=!1;e&&k.add(f(a))}}}function p(a,b){if((!v||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(x))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),
306
- a.value=c[0]),!CKEDITOR.env.needsBrFiller&&v&&(!b||a.parent.name in z)||!v&&((c=a.previous)&&"br"==c.name||!c||g(c)))?!0:!1}var t={elements:{}},v="html"==d,z=CKEDITOR.tools.extend({},k),B;for(B in z)"#"in w[B]||delete z[B];for(B in z)t.elements[B]=n(v,a.config.fillEmptyBlocks);t.root=n(v,!1);t.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=b.next;d&&e(d);)d=
307
- d.next;var k=c(b);!d&&g(b.parent)?h(b.parent,f(a)):g(d)&&k&&!g(k)&&f(a).insertBefore(d)}}}}(v);return t}function d(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function b(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function g(a){return a&&
308
- (a.type==CKEDITOR.NODE_ELEMENT&&a.name in k||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function l(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function m(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function r(a){return a.replace(B,
309
- function(a,b,c){return"\x3c"+b+c.replace(F,function(a,b){return L.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function f(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+A(c).replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function C(a){return a.replace(Q,function(a,b){return decodeURIComponent(b)})}function u(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,
310
- function(a){return"\x3c!--"+J+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function A(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function y(a,b){var c=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function q(a,b){var c=[],d=b.config.protectedSource,k=b._.dataStore||(b._.dataStore=
302
+ c,d){for(var g=[this.findIndex(c),0],k=0,h=a.length;k<h;k++)g.push({value:a[k],priority:c,options:d});this.rules.splice.apply(this.rules,g)},findIndex:function(a){for(var c=this.rules,d=c.length-1;0<=d&&a<c[d].priority;)d--;return d+1},exec:function(a,c){var d=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,g=Array.prototype.slice.call(arguments,1),k=this.rules,h=k.length,p,r,f,B;for(B=0;B<h;B++)if(d&&(p=c.type,r=c.name),f=k[B],!(a.nonEditable&&!f.options.applyToAll||
303
+ a.nestedEditable&&f.options.excludeNestedEditable)){f=f.value.apply(null,g);if(!1===f||d&&f&&(f.name!=r||f.type!=p))return f;null!=f&&(g[0]=c=f)}return c},execOnName:function(a,c){for(var d=0,g=this.rules,k=g.length,h;c&&d<k;d++)h=g[d],a.nonEditable&&!h.options.applyToAll||a.nestedEditable&&h.options.excludeNestedEditable||(c=c.replace(h.value[0],h.value[1]));return c}}})();
304
+ (function(){function a(a,d){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function n(a,d){return function(l){if(l.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=[],n=b(l),t,E;if(n)for(q(n,1)&&e.push(n);n;)g(n)&&(t=c(n))&&q(t)&&((E=c(t))&&!g(E)?e.push(t):(f(v).insertAfter(t),t.remove())),n=n.previous;for(n=0;n<e.length;n++)e[n].remove();if(e=!a||!1!==("function"==typeof d?d(l):d))v||CKEDITOR.env.needsBrFiller||
305
+ l.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?v||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||l.name in CKEDITOR.dtd.tr||l.name in CKEDITOR.dtd.$listItem)?(e=b(l),e=!e||"form"==l.name&&"input"==e.name):e=!1:e=!1;e&&l.add(f(a))}}}function q(a,b){if((!v||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(x))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),
306
+ a.value=c[0]),!CKEDITOR.env.needsBrFiller&&v&&(!b||a.parent.name in h)||!v&&((c=a.previous)&&"br"==c.name||!c||g(c)))?!0:!1}var t={elements:{}},v="html"==d,h=CKEDITOR.tools.extend({},l),A;for(A in h)"#"in w[A]||delete h[A];for(A in h)t.elements[A]=n(v,a.config.fillEmptyBlocks);t.root=n(v,!1);t.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=b.next;d&&e(d);)d=
307
+ d.next;var l=c(b);!d&&g(b.parent)?k(b.parent,f(a)):g(d)&&l&&!g(l)&&f(a).insertBefore(d)}}}}(v);return t}function d(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function b(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function g(a){return a&&
308
+ (a.type==CKEDITOR.NODE_ELEMENT&&a.name in l||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function k(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function h(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function p(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function r(a){return a.replace(C,
309
+ function(a,b,c){return"\x3c"+b+c.replace(D,function(a,b){return M.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function f(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+z(c).replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function B(a){return a.replace(Q,function(a,b){return decodeURIComponent(b)})}function u(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,
310
+ function(a){return"\x3c!--"+J+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function z(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function y(a,b){var c=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function m(a,b){var c=[],d=b.config.protectedSource,l=b._.dataStore||(b._.dataStore=
311
311
  {id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(c.push(a)-1)+"--\x3e"});for(var f=0;f<d.length;f++)a=a.replace(d[f],function(a){a=a.replace(e,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(c.push(a)-1)+"--\x3e"});a=a.replace(e,function(a,b,d){return"\x3c!--"+J+(b?"{C}":
312
- "")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){k[k.id]=decodeURIComponent(b);return"{cke_protected_"+k.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,k){return"\x3c"+c+d+"\x3e"+y(A(k),b)+"\x3c/"+c+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c,
313
- k,e=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=k=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(p);c.addRules(n,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});k.addRules(t);k.addRules(z,{applyToAll:!0});k.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,k,c=q(c,b),c=f(c,R),c=r(c),c=f(c,H),c=c.replace(P,"$1cke:$2"),c=c.replace(G,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),
314
- c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");k=a.context||b.editable().getName();var e;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==k&&(k="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",e=1);k=b.document.createElement(k);k.setHtml("a"+c);c=k.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");e&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(v,"$1$2");c=C(c);c=A(c);k=!1===a.fixForBody?!1:
315
- d(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,k);k&&(e=c,!e.children.length&&CKEDITOR.dtd[e.name][k]&&(k=new CKEDITOR.htmlParser.element(k),e.add(k)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,
312
+ "")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){l[l.id]=decodeURIComponent(b);return"{cke_protected_"+l.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,l){return"\x3c"+c+d+"\x3e"+y(z(l),b)+"\x3c/"+c+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c,
313
+ l,e=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=l=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(q);c.addRules(n,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});l.addRules(t);l.addRules(A,{applyToAll:!0});l.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,l,c=m(c,b),c=f(c,R),c=r(c),c=f(c,H),c=c.replace(P,"$1cke:$2"),c=c.replace(G,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),
314
+ c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");l=a.context||b.editable().getName();var e;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==l&&(l="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",e=1);l=b.document.createElement(l);l.setHtml("a"+c);c=l.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");e&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(v,"$1$2");c=B(c);c=z(c);l=!1===a.fixForBody?!1:
315
+ d(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,l);l&&(e=c,!e.children.length&&CKEDITOR.dtd[e.name][l]&&(l=new CKEDITOR.htmlParser.element(l),e.add(l)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,
316
316
  c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=u(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,d(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,
317
- !1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=e.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=A(c);c=y(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var k=this.editor,e,f,n,p;b&&"object"==typeof b?(e=b.context,c=b.fixForBody,d=b.dontFilter,f=b.filter,n=b.enterMode,p=b.protectedWhitespaces):e=b;e||null===e||(e=k.editable().getName());return k.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:d,
318
- filter:f||k.filter,enterMode:n||k.enterMode,protectedWhitespaces:p}).dataValue},toDataFormat:function(a,b){var c,d,k;b&&(c=b.context,d=b.filter,k=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:k||this.editor.enterMode}).dataValue}};var x=/(?:&nbsp;|\xa0)$/,J="{cke_protected}",w=CKEDITOR.dtd,E="caption colgroup col thead tfoot tbody".split(" "),k=CKEDITOR.tools.extend({},w.$blockLimit,
319
- w.$block),p={elements:{input:l,textarea:l}},n={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},t={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},z={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,
320
- ""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,k=0;k<c.length;k++)d="data-cke-saved-"+c[k],d in b&&delete b[c[k]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(E,a.name),d=CKEDITOR.tools.indexOf(E,b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?
321
- 1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&h(a,b=new CKEDITOR.htmlParser.text);
322
- b.value=a.attributes["data-cke-title"]||""},input:m,textarea:m},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(z.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var B=/<(a|area|img|input|source)\b([^>]*)>/gi,F=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,L=/^(href|src|name)$/i,H=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
317
+ !1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=e.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=z(c);c=y(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var l=this.editor,e,f,n,q;b&&"object"==typeof b?(e=b.context,c=b.fixForBody,d=b.dontFilter,f=b.filter,n=b.enterMode,q=b.protectedWhitespaces):e=b;e||null===e||(e=l.editable().getName());return l.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:d,
318
+ filter:f||l.filter,enterMode:n||l.enterMode,protectedWhitespaces:q}).dataValue},toDataFormat:function(a,b){var c,d,l;b&&(c=b.context,d=b.filter,l=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:l||this.editor.enterMode}).dataValue}};var x=/(?:&nbsp;|\xa0)$/,J="{cke_protected}",w=CKEDITOR.dtd,F="caption colgroup col thead tfoot tbody".split(" "),l=CKEDITOR.tools.extend({},w.$blockLimit,
319
+ w.$block),q={elements:{input:h,textarea:h}},n={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},t={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},A={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,
320
+ ""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,l=0;l<c.length;l++)d="data-cke-saved-"+c[l],d in b&&delete b[c[l]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(F,a.name),d=CKEDITOR.tools.indexOf(F,b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?
321
+ 1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&k(a,b=new CKEDITOR.htmlParser.text);
322
+ b.value=a.attributes["data-cke-title"]||""},input:p,textarea:p},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(A.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var C=/<(a|area|img|input|source)\b([^>]*)>/gi,D=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,M=/^(href|src|name)$/i,H=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
323
323
  R=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,Q=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,P=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,v=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,G=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict";
324
324
  CKEDITOR.htmlParser.element=function(a,d){this.name=a;this.attributes=d||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!!(CKEDITOR.dtd.$nonBodyContent[b]||CKEDITOR.dtd.$block[b]||CKEDITOR.dtd.$listItem[b]||CKEDITOR.dtd.$tableContent[b]||CKEDITOR.dtd.$nonEditable[b]||"br"==b);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}};
325
325
  CKEDITOR.htmlParser.cssStyle=function(a){var d={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,e){"font-family"==c&&(e=e.replace(/["']/g,""));d[c.toLowerCase()]=e});return{rules:d,populate:function(a){var c=this.toString();c&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c)},toString:function(){var a=[],c;
326
326
  for(c in d)d[c]&&a.push(c,":",d[c],";");return a.join("")}}};
327
- (function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var d=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,h,l;b=d.getFilterContext(b);if(b.off)return!0;
328
- if(!d.parent)a.onRoot(b,d);for(;;){h=d.name;if(!(l=a.onElementName(b,h)))return this.remove(),!1;d.name=l;if(!(d=a.onElement(b,d)))return this.remove(),!1;if(d!==this)return this.replaceWith(d),!1;if(d.name==h)break;if(d.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(d),!1;if(!d.name)return this.replaceWithChildren(),!1}h=d.attributes;var m,r;for(m in h){for(l=h[m];;)if(r=a.onAttributeName(b,m))if(r!=m)delete h[m],m=r;else break;else{delete h[m];break}r&&(!1===(l=a.onAttribute(b,d,r,l))?delete h[r]:
329
- h[r]=l)}d.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var g=this.name,h=[],l=this.attributes,m,r;a.openTag(g,l);for(m in l)h.push([m,l[m]]);a.sortAttributes&&h.sort(d);m=0;for(r=h.length;m<r;m++)l=h[m],a.attribute(l[0],l[1]);a.openTagClose(g,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(g)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);
327
+ (function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var d=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,k,h;b=d.getFilterContext(b);if(b.off)return!0;
328
+ if(!d.parent)a.onRoot(b,d);for(;;){k=d.name;if(!(h=a.onElementName(b,k)))return this.remove(),!1;d.name=h;if(!(d=a.onElement(b,d)))return this.remove(),!1;if(d!==this)return this.replaceWith(d),!1;if(d.name==k)break;if(d.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(d),!1;if(!d.name)return this.replaceWithChildren(),!1}k=d.attributes;var p,r;for(p in k){for(h=k[p];;)if(r=a.onAttributeName(b,p))if(r!=p)delete k[p],p=r;else break;else{delete k[p];break}r&&(!1===(h=a.onAttribute(b,d,r,h))?delete k[r]:
329
+ k[r]=h)}d.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var g=this.name,k=[],h=this.attributes,p,r;a.openTag(g,h);for(p in h)k.push([p,h[p]]);a.sortAttributes&&k.sort(d);p=0;for(r=k.length;p<r;p++)h=k[p],a.attribute(h[0],h[1]);a.openTagClose(g,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(g)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);
330
330
  this.remove()},forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;"function"!=typeof b&&(b=a(b));for(var d=0,g=this.children.length;d<g;++d)if(b(this.children[d]))return this.children[d];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children;for(var b=0,d=a.length;b<d;++b)a[b].parent=this},getOuterHtml:function(){var a=
331
- new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),d=this.clone(),h=0;h<b.length;++h)b[h].parent=d;d.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(d,this.getIndex()+1);return d},find:function(a,b){void 0===b&&(b=!1);var d=[],h;for(h=0;h<this.children.length;h++){var l=this.children[h];"function"==typeof a&&a(l)?d.push(l):"string"==typeof a&&l.name===a&&d.push(l);
332
- b&&l.find&&(d=d.concat(l.find(a,b)))}return d},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+a}},removeClass:function(a){var b=this.attributes["class"];b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"])},hasClass:function(a){var b=this.attributes["class"];return b?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(b):!1},getFilterContext:function(a){var b=
331
+ new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),d=this.clone(),k=0;k<b.length;++k)b[k].parent=d;d.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(d,this.getIndex()+1);return d},find:function(a,b){void 0===b&&(b=!1);var d=[],k;for(k=0;k<this.children.length;k++){var h=this.children[k];"function"==typeof a&&a(h)?d.push(h):"string"==typeof a&&h.name===a&&d.push(h);
332
+ b&&h.find&&(d=d.concat(h.find(a,b)))}return d},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+a}},removeClass:function(a){var b=this.attributes["class"];b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"])},hasClass:function(a){var b=this.attributes["class"];return b?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(b):!1},getFilterContext:function(a){var b=
333
333
  [];a||(a={off:!1,nonEditable:!1,nestedEditable:!1});a.off||"off"!=this.attributes["data-cke-processor"]||b.push("off",!0);a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&b.push("nestedEditable",!0):b.push("nonEditable",!0);if(b.length){a=CKEDITOR.tools.copy(a);for(var d=0;d<b.length;d+=2)a[b[d]]=b[d+1]}return a}},!0)})();
334
- (function(){var a={},d=/{([^}]+)}/g,b=/([\\'])/g,c=/\n/g,e=/\r/g;CKEDITOR.template=function(g){if(a[g])this.output=a[g];else{var h=g.replace(b,"\\$1").replace(c,"\\n").replace(e,"\\r").replace(d,function(a,b){return"',data['"+b+"']\x3d\x3dundefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[g]=Function("data","buffer","return buffer?buffer.push('"+h+"'):['"+h+"'].join('');")}}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);
334
+ (function(){var a={},d=/{([^}]+)}/g,b=/([\\'])/g,c=/\n/g,e=/\r/g;CKEDITOR.template=function(g){if(a[g])this.output=a[g];else{var k=g.replace(b,"\\$1").replace(c,"\\n").replace(e,"\\r").replace(d,function(a,b){return"',data['"+b+"']\x3d\x3dundefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[g]=Function("data","buffer","return buffer?buffer.push('"+k+"'):['"+k+"'].join('');")}}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);
335
335
  CKEDITOR.add=function(a){CKEDITOR.instances[a.name]=a;a.on("focus",function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=a,CKEDITOR.fire("currentInstance"))});a.on("blur",function(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))});CKEDITOR.fire("instance",null,a)};CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]};
336
336
  (function(){var a={};CKEDITOR.addTemplate=function(d,b){var c=a[d];if(c)return c;c={name:d,source:b};CKEDITOR.fire("template",c);return a[d]=new CKEDITOR.template(c.source)};CKEDITOR.getTemplate=function(d){return a[d]}})();(function(){var a=[];CKEDITOR.addCss=function(d){a.push(d)};CKEDITOR.getCss=function(){return a.join("\n")}})();CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")});CKEDITOR.TRISTATE_ON=1;CKEDITOR.TRISTATE_OFF=2;
337
337
  CKEDITOR.TRISTATE_DISABLED=0;
338
338
  (function(){CKEDITOR.inline=function(a,d){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(d,a,CKEDITOR.ELEMENT_MODE_INLINE),c=a.is("textarea")?a:null;c?(b.setData(c.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!b.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+c.getValue()+"\x3c/div\x3e",CKEDITOR.document),
339
339
  a.insertAfter(c),c.hide(),c.$.form&&b._attachToForm()):b.setData(a.getHtml(),null,!0);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.ui.contentsElement=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){c&&(b.container.clearCustomData(),b.container.remove(),c.show());b.element.clearCustomData();delete b.element});
340
340
  return b};CKEDITOR.inlineAll=function(){var a,d,b;for(b in CKEDITOR.dtd.$editable)for(var c=CKEDITOR.document.getElementsByTag(b),e=0,g=c.count();e<g;e++)a=c.getItem(e),"true"==a.getAttribute("contenteditable")&&(d={element:a,config:{}},!1!==CKEDITOR.fire("inline",d)&&CKEDITOR.inline(a,d.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor";
341
- (function(){function a(a,e,g,h){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var l=new CKEDITOR.editor(e,a,h);h==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),l._.required=a.hasAttribute("required"),a.removeAttribute("required"));g&&l.setData(g,null,!0);l.on("loaded",function(){b(l);h==CKEDITOR.ELEMENT_MODE_REPLACE&&l.config.autoUpdateElement&&
342
- a.$.form&&l._attachToForm();l.setMode(l.config.startupMode,function(){l.resetDirty();l.status="ready";l.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,l)})});l.on("destroy",d);return l}function d(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function b(a){var b=a.name,d=a.element,h=a.elementMode,l=
343
- a.fire("uiSpace",{space:"top",html:""}).html,m=a.fire("uiSpace",{space:"bottom",html:""}).html,r=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
344
- b=CKEDITOR.dom.element.createFromHtml(r.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:l?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+l+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:m?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+m+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));h==CKEDITOR.ELEMENT_MODE_REPLACE?
345
- (d.hide(),b.insertAfter(d)):d.append(b);a.container=b;a.ui.contentsElement=a.ui.space("contents");l&&a.ui.space("top").unselectable();m&&a.ui.space("bottom").unselectable();d=a.config.width;h=a.config.height;d&&b.setStyle("width",CKEDITOR.tools.cssLength(d));h&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(h));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,d){return a(b,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
346
- CKEDITOR.appendTo=function(b,d,g){return a(b,d,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var d=null,h=a[b];if(h.name||h.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(h.className))continue}else if("function"==typeof arguments[0]&&(d={},!1===arguments[0](h,d)))continue;this.replace(h,d)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes=
347
- {}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var d=this,h=this._.modes;if(a!=d.mode&&h&&h[a]){d.fire("beforeSetMode",a);if(d.mode){var l=d.checkDirty(),h=d._.previousModeData,m,r=0;d.fire("beforeModeUnload");d.editable(0);d._.previousMode=d.mode;d._.previousModeData=m=d.getData(1);"source"==d.mode&&h==m&&(d.fire("lockSnapshot",{forceUpdate:!0}),r=1);d.ui.space("contents").setHtml("");d.mode=""}else d._.previousModeData=d.getData(1);this._.modes[a](function(){d.mode=a;void 0!==l&&!l&&
348
- d.resetDirty();r?d.fire("unlockSnapshot"):"wysiwyg"==a&&d.fire("saveSnapshot");setTimeout(function(){d.fire("mode");b&&b.call(d)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,d,h){var l=this.container,m=this.ui.space("contents"),r=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;h=h?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):l;h.setSize("width",a,!0);r&&(r.style.width="1%");var f=(h.$.offsetHeight||0)-(m.$.clientHeight||
349
- 0),l=Math.max(b-(d?0:f),0);b=d?b+f:b;m.setStyle("height",l+"px");r&&(r.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:l,outerWidth:a||h.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg";
350
- (function(){function a(a){var b=a.editor,e=a.data.path,f=e.blockLimit,g=a.data.selection,B=g.getRanges()[0],l;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=d(g,e))g.appendBogus(),l=CKEDITOR.env.ie;h(b,e.block,f)&&B.collapsed&&!B.getCommonAncestor().isReadOnly()&&(e=B.clone(),e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),f=new CKEDITOR.dom.walker(e),f.guard=function(a){return!c(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!f.checkForward()||e.checkStartOfBlock()&&e.checkEndOfBlock())&&
351
- (b=B.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(c))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),l=1,a.cancel());l&&B.select()}function d(a,b){if(a.isFake)return 0;var d=b.block||b.blockLimit,e=d&&d.getLast(c);if(!(!d||!d.isBlockBoundary()||e&&e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()||d.is("pre")||d.getBogus()))return d}function b(a){var b=a.data.getTarget();b.is("input")&&
352
- (b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function c(a){return f(a)&&C(a)}function e(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function g(a){function b(a){return function(b,k){k&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(f)&&(d=b);if(!(k||!c(b)||a&&A(b)))return!1}}var d,e=a.getRanges()[0];a=a.root;
353
- var f={table:1,ul:1,ol:1,dl:1};if(e.startPath().contains(f)){var g=e.clone();g.collapse(1);g.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(g);a.guard=b();a.checkBackward();if(d)return g=e.clone(),g.collapse(),g.setEndAt(d,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(g),a.guard=b(!0),d=!1,a.checkForward(),d}return null}function h(a,b,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}
354
- function l(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function m(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function r(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var f,C,u,A,y,q,x,J,w,E;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||
341
+ (function(){function a(a,e,g,k){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var h=new CKEDITOR.editor(e,a,k);k==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),h._.required=a.hasAttribute("required"),a.removeAttribute("required"));g&&h.setData(g,null,!0);h.on("loaded",function(){b(h);k==CKEDITOR.ELEMENT_MODE_REPLACE&&h.config.autoUpdateElement&&
342
+ a.$.form&&h._attachToForm();h.setMode(h.config.startupMode,function(){h.resetDirty();h.status="ready";h.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,h)})});h.on("destroy",d);return h}function d(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function b(a){var b=a.name,d=a.element,k=a.elementMode,h=
343
+ a.fire("uiSpace",{space:"top",html:""}).html,p=a.fire("uiSpace",{space:"bottom",html:""}).html,r=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
344
+ b=CKEDITOR.dom.element.createFromHtml(r.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:h?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+h+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:p?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+p+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));k==CKEDITOR.ELEMENT_MODE_REPLACE?
345
+ (d.hide(),b.insertAfter(d)):d.append(b);a.container=b;a.ui.contentsElement=a.ui.space("contents");h&&a.ui.space("top").unselectable();p&&a.ui.space("bottom").unselectable();d=a.config.width;k=a.config.height;d&&b.setStyle("width",CKEDITOR.tools.cssLength(d));k&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(k));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,d){return a(b,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
346
+ CKEDITOR.appendTo=function(b,d,g){return a(b,d,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var d=null,k=a[b];if(k.name||k.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(k.className))continue}else if("function"==typeof arguments[0]&&(d={},!1===arguments[0](k,d)))continue;this.replace(k,d)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes=
347
+ {}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var d=this,k=this._.modes;if(a!=d.mode&&k&&k[a]){d.fire("beforeSetMode",a);if(d.mode){var h=d.checkDirty(),k=d._.previousModeData,p,r=0;d.fire("beforeModeUnload");d.editable(0);d._.previousMode=d.mode;d._.previousModeData=p=d.getData(1);"source"==d.mode&&k==p&&(d.fire("lockSnapshot",{forceUpdate:!0}),r=1);d.ui.space("contents").setHtml("");d.mode=""}else d._.previousModeData=d.getData(1);this._.modes[a](function(){d.mode=a;void 0!==h&&!h&&
348
+ d.resetDirty();r?d.fire("unlockSnapshot"):"wysiwyg"==a&&d.fire("saveSnapshot");setTimeout(function(){d.fire("mode");b&&b.call(d)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,d,k){var h=this.container,p=this.ui.space("contents"),r=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;k=k?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):h;k.setSize("width",a,!0);r&&(r.style.width="1%");var f=(k.$.offsetHeight||0)-(p.$.clientHeight||
349
+ 0),h=Math.max(b-(d?0:f),0);b=d?b+f:b;p.setStyle("height",h+"px");r&&(r.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:h,outerWidth:a||k.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg";
350
+ (function(){function a(a){var b=a.editor,e=a.data.path,f=e.blockLimit,g=a.data.selection,h=g.getRanges()[0],D;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=d(g,e))g.appendBogus(),D=CKEDITOR.env.ie;k(b,e.block,f)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(e=h.clone(),e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),f=new CKEDITOR.dom.walker(e),f.guard=function(a){return!c(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!f.checkForward()||e.checkStartOfBlock()&&e.checkEndOfBlock())&&
351
+ (b=h.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(c))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),D=1,a.cancel());D&&h.select()}function d(a,b){if(a.isFake)return 0;var d=b.block||b.blockLimit,e=d&&d.getLast(c);if(!(!d||!d.isBlockBoundary()||e&&e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()||d.is("pre")||d.getBogus()))return d}function b(a){var b=a.data.getTarget();b.is("input")&&
352
+ (b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function c(a){return f(a)&&B(a)}function e(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function g(a){function b(a){return function(b,l){l&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(f)&&(d=b);if(!(l||!c(b)||a&&z(b)))return!1}}var d,e=a.getRanges()[0];a=a.root;
353
+ var f={table:1,ul:1,ol:1,dl:1};if(e.startPath().contains(f)){var g=e.clone();g.collapse(1);g.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(g);a.guard=b();a.checkBackward();if(d)return g=e.clone(),g.collapse(),g.setEndAt(d,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(g),a.guard=b(!0),d=!1,a.checkForward(),d}return null}function k(a,b,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}
354
+ function h(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function p(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function r(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var f,B,u,z,y,m,x,J,w,F;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||
355
355
  b);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();return}CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document)?
356
356
  this.$.focus():this.$.setActive()}catch(b){if(!CKEDITOR.env.ie)throw b;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=e(b,this),c[0]=a,c[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=
357
357
  Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],null!==b?this.setAttribute(c,b):this.removeAttribute(c))},attachClass:function(a){var b=this.getCustomData("classes");this.hasClass(a)||(!b&&(b=[]),b.push(a),this.setCustomData("classes",b),this.addClass(a))},changeAttr:function(a,
358
358
  b){var c=this.getAttribute(a);b!==c&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=c),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,b)},insertHtml:function(a,b,c){var d=
359
- this.editor;d.focus();d.fire("saveSnapshot");c||(c=d.getSelection().getRanges()[0]);q(this,b||"html",a,c);c.select();m(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){q(this,c||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,b){var d=this.editor;d.focus();d.fire("saveSnapshot");var e=d.activeEnterMode,d=d.getSelection(),f=a.getName(),f=CKEDITOR.dtd.$block[f];b||(b=d.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,
360
- CKEDITOR.POSITION_AFTER_END),f&&((f=a.getNext(function(a){return c(a)&&!A(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block)?f.getDtd()["#"]?b.moveToElementEditStart(f):b.moveToElementEditEnd(a):f||e==CKEDITOR.ENTER_BR||(f=b.fixBlock(!0,e==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(f))));d.selectRanges([b]);m(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];
361
- if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?x(b):b.startContainer.is(CKEDITOR.dtd.$list)&&J(b));var g,h;if(f)for(;(g=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[g.getName()])&&(!h||!h[e]);)g.getName()in CKEDITOR.dtd.span?b.splitElement(g):b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(g),b.collapse(!0),g.remove()):b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());
359
+ this.editor;d.focus();d.fire("saveSnapshot");c||(c=d.getSelection().getRanges()[0]);m(this,b||"html",a,c);c.select();p(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){m(this,c||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,b){var d=this.editor;d.focus();d.fire("saveSnapshot");var e=d.activeEnterMode,d=d.getSelection(),f=a.getName(),f=CKEDITOR.dtd.$block[f];b||(b=d.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,
360
+ CKEDITOR.POSITION_AFTER_END),f&&((f=a.getNext(function(a){return c(a)&&!z(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block)?f.getDtd()["#"]?b.moveToElementEditStart(f):b.moveToElementEditEnd(a):f||e==CKEDITOR.ENTER_BR||(f=b.fixBlock(!0,e==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(f))));d.selectRanges([b]);p(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];
361
+ if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?x(b):b.startContainer.is(CKEDITOR.dtd.$list)&&J(b));var g,k;if(f)for(;(g=b.getCommonAncestor(0,1))&&(k=CKEDITOR.dtd[g.getName()])&&(!k||!k[e]);)g.getName()in CKEDITOR.dtd.span?b.splitElement(g):b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(g),b.collapse(!0),g.remove()):b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());
362
362
  b.insertNode(a);return!0},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;
363
- delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),k;a:if(d.anchorNode&&d.anchorNode==c.$)k=!0;else{if(CKEDITOR.env.webkit&&(k=c.getDocument().getActive())&&k.equals(c)&&!d.anchorNode){k=!0;break a}k=void 0}k&&(k=new CKEDITOR.dom.range(c),k.moveToElementEditStart(c),b=b.createRange(),b.setStart(k.startContainer.$,k.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}
364
- function b(){var a=c.getDocument().$,d=a.selection,k=c.getDocument().getActive();"None"==d.type&&k.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},
365
- null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};w.eol.detect(a,this);w.bogus.exclude(a);w.cell.shrink(a);a.fragment=a.range.cloneContents();w.tree.rebuild(a,this);w.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=E,d={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,
363
+ delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),l;a:if(d.anchorNode&&d.anchorNode==c.$)l=!0;else{if(CKEDITOR.env.webkit&&(l=c.getDocument().getActive())&&l.equals(c)&&!d.anchorNode){l=!0;break a}l=void 0}l&&(l=new CKEDITOR.dom.range(c),l.moveToElementEditStart(c),b=b.createRange(),b.setStart(l.startContainer.$,l.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}
364
+ function b(){var a=c.getDocument().$,d=a.selection,l=c.getDocument().getActive();"None"==d.type&&l.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},
365
+ null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};w.eol.detect(a,this);w.bogus.exclude(a);w.cell.shrink(a);a.fragment=a.range.cloneContents();w.tree.rebuild(a,this);w.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=F,d={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,
366
366
  1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var f=this.editor.createRange();f.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=f.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();
367
- c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),f=0,g;if(d)for(;g=d.getItem(f++);)if(!C(g)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),u(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();
367
+ c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),f=0,g;if(d)for(;g=d.getItem(f++);)if(!B(g)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),u(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();
368
368
  return e},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(y,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,
369
369
  "beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):
370
370
  a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null,
371
371
  null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var d=function(){var b=a.editable();null!=a._.previousScrollTop&&b.getDocument().equals(CKEDITOR.document)&&(b.$.scrollTop=a._.previousScrollTop,a._.previousScrollTop=null,this.removeListener("scroll",d))};this.on("scroll",d)}a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom",function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=
372
- this.getDocument();a.window=this.getWindow();var e=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var t=a.config.contentsLangDirection;this.getDirection(1)!=t&&this.changeAttr("dir",t);var h=CKEDITOR.getCss();if(h){var t=e.getHead(),l=t.getCustomData("stylesheet");l?h!=l.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?l.$.styleSheet.cssText=h:l.setText(h)):(h=e.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),t.setCustomData("stylesheet",
373
- h),h.data("cke-temp",1))}t=e.getCustomData("stylesheet_ref")||0;e.setCustomData("stylesheet_ref",t+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var F={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;if(c in F){b=a.getSelection();var e,
374
- n=b.getRanges()[0],p=n.startPath(),t,h,l,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=g(b))?(a.fire("saveSnapshot"),n.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),n.select(),a.fire("saveSnapshot"),d=1):n.collapsed&&((t=p.block)&&(l=t[c?"getPrevious":"getNext"](f))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("table")&&n[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),n[c?"checkEndOfBlock":"checkStartOfBlock"]()&&t.remove(),n["moveToElementEdit"+
375
- (c?"End":"Start")](l),n.select(),a.fire("saveSnapshot"),d=1):p.blockLimit&&p.blockLimit.is("td")&&(h=p.blockLimit.getAscendant("table"))&&n.checkBoundaryOfElement(h,c?CKEDITOR.START:CKEDITOR.END)&&(l=h[c?"getPrevious":"getNext"](f))?(a.fire("saveSnapshot"),n["moveToElementEdit"+(c?"End":"Start")](l),n.checkStartOfBlock()&&n.checkEndOfBlock()?l.remove():n.select(),a.fire("saveSnapshot"),d=1):(h=p.contains(["td","th","caption"]))&&n.checkBoundaryOfElement(h,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d});
376
- a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in F&&!this.getFirst(c)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",
372
+ this.getDocument();a.window=this.getWindow();var e=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var t=a.config.contentsLangDirection;this.getDirection(1)!=t&&this.changeAttr("dir",t);var k=CKEDITOR.getCss();if(k){var t=e.getHead(),h=t.getCustomData("stylesheet");h?k!=h.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?h.$.styleSheet.cssText=k:h.setText(k)):(k=e.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement),t.setCustomData("stylesheet",
373
+ k),k.data("cke-temp",1))}t=e.getCustomData("stylesheet_ref")||0;e.setCustomData("stylesheet_ref",t+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var D={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;if(c in D){b=a.getSelection();var e,
374
+ n=b.getRanges()[0],q=n.startPath(),t,k,h,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=g(b))?(a.fire("saveSnapshot"),n.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),n.select(),a.fire("saveSnapshot"),d=1):n.collapsed&&((t=q.block)&&(h=t[c?"getPrevious":"getNext"](f))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("table")&&n[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),n[c?"checkEndOfBlock":"checkStartOfBlock"]()&&t.remove(),n["moveToElementEdit"+
375
+ (c?"End":"Start")](h),n.select(),a.fire("saveSnapshot"),d=1):q.blockLimit&&q.blockLimit.is("td")&&(k=q.blockLimit.getAscendant("table"))&&n.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(h=k[c?"getPrevious":"getNext"](f))?(a.fire("saveSnapshot"),n["moveToElementEdit"+(c?"End":"Start")](h),n.checkStartOfBlock()&&n.checkEndOfBlock()?h.remove():n.select(),a.fire("saveSnapshot"),d=1):(k=q.contains(["td","th","caption"]))&&n.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d});
376
+ a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in D&&!this.getFirst(c)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",
377
377
  function(b){var c=b.data.getTarget();c.is("img","hr","input","textarea","select")&&!c.isReadOnly()&&(a.getSelection().selectElement(c),c.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getOuterHtml().replace(y,""))){var c=a.createRange();
378
- c.moveToElementEditStart(b);c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;b=b.data.domEvent.getKey();if(b in F){var c=8==b,d=a.getSelection().getRanges()[0];b=d.startPath();if(d.collapsed)a:{var e=
378
+ c.moveToElementEditStart(b);c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;b=b.data.domEvent.getKey();if(b in D){var c=8==b,d=a.getSelection().getRanges()[0];b=d.startPath();if(d.collapsed)a:{var e=
379
379
  b.block;if(e&&d[c?"checkStartOfBlock":"checkEndOfBlock"]()&&d.moveToClosestEditablePosition(e,!c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=d.startContainer.getChild(d.startOffset-(c?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){a.fire("saveSnapshot");f.remove();b=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))b=void 0;else{a.fire("saveSnapshot");var n;(n=(c?d:e).getBogus())&&n.remove();n=a.getSelection();f=n.createBookmarks();(c?e:d).moveChildren(c?
380
380
  d:e,!1);b.lastElement.mergeSiblings();r(e,d,!c);n.selectBookmarks(f);b=!0}}else b=!1}else c=d,n=b.block,d=c.endPath().block,n&&d&&!n.equals(d)?(a.fire("saveSnapshot"),(e=n.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(n,!1),b.lastElement.mergeSiblings(),r(n,d,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();
381
381
  a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload");
382
382
  delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?
383
383
  "true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),a(b),c.fire("unlockSnapshot"),!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;
384
- if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");f=CKEDITOR.dom.walker.whitespaces(!0);C=CKEDITOR.dom.walker.bookmark(!1,!0);u=CKEDITOR.dom.walker.empty();
385
- A=CKEDITOR.dom.walker.bogus();y=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;q=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,n,t,g=[],h=d.range.startContainer;e=d.range.startPath();for(var h=q[h.getName()],l=0,B=c.getChildren(),z=B.count(),F=-1,m=-1,r=0,H=e.contains(q.$list);l<z;++l)e=B.getItem(l),a(e)?(n=e.getName(),H&&n in CKEDITOR.dtd.$list?g=g.concat(b(e,d)):(t=!!h[n],
386
- "br"!=n||!e.data("cke-eol")||l&&l!=z-1||(r=(f=l?g[l-1].node:B.getItem(l+1))&&(!a(f)||!f.is("br")),f=f&&a(f)&&q.$block[f.getName()]),-1!=F||t||(F=l),t||(m=l),g.push({isElement:1,isLineBreak:r,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:n,allowed:t}),f=r=0)):g.push({isElement:0,node:e,allowed:1});-1<F&&(g[F].firstNotAllowed=1);-1<m&&(g[m].lastNotAllowed=1);return g}function d(b,c){var e=[],f=b.getChildren(),p=f.count(),g,t=0,h=q[c],l=!b.is(q.$inline)||b.is("br");for(l&&e.push(" ");t<p;t++)g=
387
- f.getItem(t),a(g)&&!g.is(h)?e=e.concat(d(g,c)):e.push(g);l&&e.push(" ");return e}function e(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function f(b){return b&&a(b)&&(b.is(q.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function g(b,c,d,e){var f=b.clone(),n,p;f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(n=(new CKEDITOR.dom.walker(f)).next())&&a(n)&&m[n.getName()]&&(p=n.getPrevious())&&a(p)&&!p.getParent().equals(b.startContainer)&&d.contains(p)&&e.contains(n)&&n.isIdentical(p)&&
388
- (n.moveChildren(p),n.remove(),g(b,c,d,e))}function F(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var e=c.endContainer.getChild(c.endOffset),f=c.endContainer.getChild(c.endOffset-1);e&&d(e,b[b.length-1]);f&&d(f,b[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var q=CKEDITOR.dtd,m={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},r={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},x=CKEDITOR.tools.extend({},
389
- q.$inline);delete x.br;return function(m,v,G,D){var I=m.editor,K=!1;"unfiltered_html"==v&&(v="html",K=!0);if(!D.checkReadOnly()){var M=(new CKEDITOR.dom.elementPath(D.startContainer,D.root)).blockLimit||D.root;m={type:v,dontFilter:K,editable:m,editor:I,range:D,blockLimit:M,mergeCandidates:[],zombies:[]};v=m.range;D=m.mergeCandidates;var H,u;"text"==m.type&&v.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(H=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",v.document),v.insertNode(H),
390
- v.setStartAfter(H));K=new CKEDITOR.dom.elementPath(v.startContainer);m.endPath=M=new CKEDITOR.dom.elementPath(v.endContainer);if(!v.collapsed){var I=M.block||M.blockLimit,C=v.getCommonAncestor();I&&!I.equals(C)&&!I.contains(C)&&v.checkEndOfBlock()&&m.zombies.push(I);v.deleteContents()}for(;(u=e(v))&&a(u)&&u.isBlockBoundary()&&K.contains(u);)v.moveToPosition(u,CKEDITOR.POSITION_BEFORE_END);g(v,m.blockLimit,K,M);H&&(v.setEndBefore(H),v.collapse(),H.remove());H=v.startPath();if(I=H.contains(f,!1,1))v.splitElement(I),
391
- m.inlineStylesRoot=I,m.inlineStylesPeak=H.lastElement;H=v.createBookmark();(I=H.startNode.getPrevious(c))&&a(I)&&f(I)&&D.push(I);(I=H.startNode.getNext(c))&&a(I)&&f(I)&&D.push(I);for(I=H.startNode;(I=I.getParent())&&f(I);)D.push(I);v.moveToBookmark(H);if(H=G){H=m.range;if("text"==m.type&&m.inlineStylesRoot){u=m.inlineStylesPeak;v=u.getDocument().createText("{cke-peak}");for(D=m.inlineStylesRoot.getParent();!u.equals(D);)v=v.appendTo(u.clone()),u=u.getParent();G=v.getOuterHtml().split("{cke-peak}").join(G)}u=
392
- m.blockLimit.getName();if(/^\s+|\s+$/.test(G)&&"span"in CKEDITOR.dtd[u]){var A='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';G=A+G+A}G=m.editor.dataProcessor.toHtml(G,{context:null,fixForBody:!1,protectedWhitespaces:!!A,dontFilter:m.dontFilter,filter:m.editor.activeFilter,enterMode:m.editor.activeEnterMode});u=H.document.createElement("body");u.setHtml(G);A&&(u.getFirst().remove(),u.getLast().remove());if((A=H.startPath().block)&&(1!=A.getChildCount()||!A.getBogus()))a:{var w;if(1==
393
- u.getChildCount()&&a(w=u.getFirst())&&w.is(r)&&!w.hasAttribute("contenteditable")){A=w.getElementsByTag("*");H=0;for(D=A.count();H<D;H++)if(v=A.getItem(H),!v.is(x))break a;w.moveChildren(w.getParent(1));w.remove()}}m.dataWrapper=u;H=G}if(H){w=m.range;H=w.document;var y;u=m.blockLimit;D=0;var O,A=[],N,V;G=I=0;var E,J;v=w.startContainer;var K=m.endPath.elements[0],Y,M=K.getPosition(v),C=!!K.getCommonAncestor(v)&&M!=CKEDITOR.POSITION_IDENTICAL&&!(M&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);
394
- v=b(m.dataWrapper,m);for(F(v,w);D<v.length;D++){M=v[D];if(y=M.isLineBreak){y=w;E=u;var U=void 0,aa=void 0;M.hasBlockSibling?y=1:(U=y.startContainer.getAscendant(q.$block,1))&&U.is({div:1,p:1})?(aa=U.getPosition(E),aa==CKEDITOR.POSITION_IDENTICAL||aa==CKEDITOR.POSITION_CONTAINS?y=0:(E=y.splitElement(U),y.moveToPosition(E,CKEDITOR.POSITION_AFTER_START),y=1)):y=0}if(y)G=0<D;else{y=w.startPath();!M.isBlock&&h(m.editor,y.block,y.blockLimit)&&(V=l(m.editor))&&(V=H.createElement(V),V.appendBogus(),w.insertNode(V),
395
- CKEDITOR.env.needsBrFiller&&(O=V.getBogus())&&O.remove(),w.moveToPosition(V,CKEDITOR.POSITION_BEFORE_END));if((y=w.startPath().block)&&!y.equals(N)){if(O=y.getBogus())O.remove(),A.push(y);N=y}M.firstNotAllowed&&(I=1);if(I&&M.isElement){y=w.startContainer;for(E=null;y&&!q[y.getName()][M.name];){if(y.equals(u)){y=null;break}E=y;y=y.getParent()}if(y)E&&(J=w.splitElement(E),m.zombies.push(J),m.zombies.push(E));else{E=u.getName();Y=!D;y=D==v.length-1;E=d(M.node,E);for(var U=[],aa=E.length,ba=0,da=void 0,
396
- ea=0,W=-1;ba<aa;ba++)da=E[ba]," "==da?(ea||Y&&!ba||(U.push(new CKEDITOR.dom.text(" ")),W=U.length),ea=1):(U.push(da),ea=0);y&&W==U.length&&U.pop();Y=U}}if(Y){for(;y=Y.pop();)w.insertNode(y);Y=0}else w.insertNode(M.node);M.lastNotAllowed&&D<v.length-1&&((J=C?K:J)&&w.setEndAt(J,CKEDITOR.POSITION_AFTER_START),I=0);w.collapse()}}1!=v.length?O=!1:(O=v[0],O=O.isElement&&"false"==O.node.getAttribute("contenteditable"));O&&(G=!0,y=v[0].node,w.setStartAt(y,CKEDITOR.POSITION_BEFORE_START),w.setEndAt(y,CKEDITOR.POSITION_AFTER_END));
397
- m.dontMoveCaret=G;m.bogusNeededBlocks=A}O=m.range;var T;J=m.bogusNeededBlocks;for(Y=O.createBookmark();N=m.zombies.pop();)N.getParent()&&(V=O.clone(),V.moveToElementEditStart(N),V.removeEmptyBlocksAtEnd());if(J)for(;N=J.pop();)CKEDITOR.env.needsBrFiller?N.appendBogus():N.append(O.document.createText(" "));for(;N=m.mergeCandidates.pop();)N.mergeSiblings();O.moveToBookmark(Y);if(!m.dontMoveCaret){for(N=e(O);N&&a(N)&&!N.is(q.$empty);){if(N.isBlockBoundary())O.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END);
384
+ if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");f=CKEDITOR.dom.walker.whitespaces(!0);B=CKEDITOR.dom.walker.bookmark(!1,!0);u=CKEDITOR.dom.walker.empty();
385
+ z=CKEDITOR.dom.walker.bogus();y=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;m=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,n,t,g=[],k=d.range.startContainer;e=d.range.startPath();for(var k=p[k.getName()],h=0,C=c.getChildren(),A=C.count(),D=-1,m=-1,r=0,H=e.contains(p.$list);h<A;++h)e=C.getItem(h),a(e)?(n=e.getName(),H&&n in CKEDITOR.dtd.$list?g=g.concat(b(e,d)):(t=!!k[n],
386
+ "br"!=n||!e.data("cke-eol")||h&&h!=A-1||(r=(f=h?g[h-1].node:C.getItem(h+1))&&(!a(f)||!f.is("br")),f=f&&a(f)&&p.$block[f.getName()]),-1!=D||t||(D=h),t||(m=h),g.push({isElement:1,isLineBreak:r,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:n,allowed:t}),f=r=0)):g.push({isElement:0,node:e,allowed:1});-1<D&&(g[D].firstNotAllowed=1);-1<m&&(g[m].lastNotAllowed=1);return g}function d(b,c){var e=[],f=b.getChildren(),q=f.count(),g,t=0,k=p[c],h=!b.is(p.$inline)||b.is("br");for(h&&e.push(" ");t<q;t++)g=
387
+ f.getItem(t),a(g)&&!g.is(k)?e=e.concat(d(g,c)):e.push(g);h&&e.push(" ");return e}function e(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function f(b){return b&&a(b)&&(b.is(p.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function g(b,c,d,e){var f=b.clone(),n,q;f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(n=(new CKEDITOR.dom.walker(f)).next())&&a(n)&&m[n.getName()]&&(q=n.getPrevious())&&a(q)&&!q.getParent().equals(b.startContainer)&&d.contains(q)&&e.contains(n)&&n.isIdentical(q)&&
388
+ (n.moveChildren(q),n.remove(),g(b,c,d,e))}function D(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var e=c.endContainer.getChild(c.endOffset),f=c.endContainer.getChild(c.endOffset-1);e&&d(e,b[b.length-1]);f&&d(f,b[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var p=CKEDITOR.dtd,m={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},r={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},x=CKEDITOR.tools.extend({},
389
+ p.$inline);delete x.br;return function(m,v,G,E){var I=m.editor,K=!1;"unfiltered_html"==v&&(v="html",K=!0);if(!E.checkReadOnly()){var L=(new CKEDITOR.dom.elementPath(E.startContainer,E.root)).blockLimit||E.root;m={type:v,dontFilter:K,editable:m,editor:I,range:E,blockLimit:L,mergeCandidates:[],zombies:[]};v=m.range;E=m.mergeCandidates;var H,u;"text"==m.type&&v.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(H=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",v.document),v.insertNode(H),
390
+ v.setStartAfter(H));K=new CKEDITOR.dom.elementPath(v.startContainer);m.endPath=L=new CKEDITOR.dom.elementPath(v.endContainer);if(!v.collapsed){var I=L.block||L.blockLimit,B=v.getCommonAncestor();I&&!I.equals(B)&&!I.contains(B)&&v.checkEndOfBlock()&&m.zombies.push(I);v.deleteContents()}for(;(u=e(v))&&a(u)&&u.isBlockBoundary()&&K.contains(u);)v.moveToPosition(u,CKEDITOR.POSITION_BEFORE_END);g(v,m.blockLimit,K,L);H&&(v.setEndBefore(H),v.collapse(),H.remove());H=v.startPath();if(I=H.contains(f,!1,1))v.splitElement(I),
391
+ m.inlineStylesRoot=I,m.inlineStylesPeak=H.lastElement;H=v.createBookmark();(I=H.startNode.getPrevious(c))&&a(I)&&f(I)&&E.push(I);(I=H.startNode.getNext(c))&&a(I)&&f(I)&&E.push(I);for(I=H.startNode;(I=I.getParent())&&f(I);)E.push(I);v.moveToBookmark(H);if(H=G){H=m.range;if("text"==m.type&&m.inlineStylesRoot){u=m.inlineStylesPeak;v=u.getDocument().createText("{cke-peak}");for(E=m.inlineStylesRoot.getParent();!u.equals(E);)v=v.appendTo(u.clone()),u=u.getParent();G=v.getOuterHtml().split("{cke-peak}").join(G)}u=
392
+ m.blockLimit.getName();if(/^\s+|\s+$/.test(G)&&"span"in CKEDITOR.dtd[u]){var z='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';G=z+G+z}G=m.editor.dataProcessor.toHtml(G,{context:null,fixForBody:!1,protectedWhitespaces:!!z,dontFilter:m.dontFilter,filter:m.editor.activeFilter,enterMode:m.editor.activeEnterMode});u=H.document.createElement("body");u.setHtml(G);z&&(u.getFirst().remove(),u.getLast().remove());if((z=H.startPath().block)&&(1!=z.getChildCount()||!z.getBogus()))a:{var w;if(1==
393
+ u.getChildCount()&&a(w=u.getFirst())&&w.is(r)&&!w.hasAttribute("contenteditable")){z=w.getElementsByTag("*");H=0;for(E=z.count();H<E;H++)if(v=z.getItem(H),!v.is(x))break a;w.moveChildren(w.getParent(1));w.remove()}}m.dataWrapper=u;H=G}if(H){w=m.range;H=w.document;var y;u=m.blockLimit;E=0;var O,z=[],N,V;G=I=0;var F,J;v=w.startContainer;var K=m.endPath.elements[0],Y,L=K.getPosition(v),B=!!K.getCommonAncestor(v)&&L!=CKEDITOR.POSITION_IDENTICAL&&!(L&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);
394
+ v=b(m.dataWrapper,m);for(D(v,w);E<v.length;E++){L=v[E];if(y=L.isLineBreak){y=w;F=u;var U=void 0,aa=void 0;L.hasBlockSibling?y=1:(U=y.startContainer.getAscendant(p.$block,1))&&U.is({div:1,p:1})?(aa=U.getPosition(F),aa==CKEDITOR.POSITION_IDENTICAL||aa==CKEDITOR.POSITION_CONTAINS?y=0:(F=y.splitElement(U),y.moveToPosition(F,CKEDITOR.POSITION_AFTER_START),y=1)):y=0}if(y)G=0<E;else{y=w.startPath();!L.isBlock&&k(m.editor,y.block,y.blockLimit)&&(V=h(m.editor))&&(V=H.createElement(V),V.appendBogus(),w.insertNode(V),
395
+ CKEDITOR.env.needsBrFiller&&(O=V.getBogus())&&O.remove(),w.moveToPosition(V,CKEDITOR.POSITION_BEFORE_END));if((y=w.startPath().block)&&!y.equals(N)){if(O=y.getBogus())O.remove(),z.push(y);N=y}L.firstNotAllowed&&(I=1);if(I&&L.isElement){y=w.startContainer;for(F=null;y&&!p[y.getName()][L.name];){if(y.equals(u)){y=null;break}F=y;y=y.getParent()}if(y)F&&(J=w.splitElement(F),m.zombies.push(J),m.zombies.push(F));else{F=u.getName();Y=!E;y=E==v.length-1;F=d(L.node,F);for(var U=[],aa=F.length,ba=0,da=void 0,
396
+ ea=0,W=-1;ba<aa;ba++)da=F[ba]," "==da?(ea||Y&&!ba||(U.push(new CKEDITOR.dom.text(" ")),W=U.length),ea=1):(U.push(da),ea=0);y&&W==U.length&&U.pop();Y=U}}if(Y){for(;y=Y.pop();)w.insertNode(y);Y=0}else w.insertNode(L.node);L.lastNotAllowed&&E<v.length-1&&((J=B?K:J)&&w.setEndAt(J,CKEDITOR.POSITION_AFTER_START),I=0);w.collapse()}}1!=v.length?O=!1:(O=v[0],O=O.isElement&&"false"==O.node.getAttribute("contenteditable"));O&&(G=!0,y=v[0].node,w.setStartAt(y,CKEDITOR.POSITION_BEFORE_START),w.setEndAt(y,CKEDITOR.POSITION_AFTER_END));
397
+ m.dontMoveCaret=G;m.bogusNeededBlocks=z}O=m.range;var T;J=m.bogusNeededBlocks;for(Y=O.createBookmark();N=m.zombies.pop();)N.getParent()&&(V=O.clone(),V.moveToElementEditStart(N),V.removeEmptyBlocksAtEnd());if(J)for(;N=J.pop();)CKEDITOR.env.needsBrFiller?N.appendBogus():N.append(O.document.createText(" "));for(;N=m.mergeCandidates.pop();)N.mergeSiblings();O.moveToBookmark(Y);if(!m.dontMoveCaret){for(N=e(O);N&&a(N)&&!N.is(p.$empty);){if(N.isBlockBoundary())O.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END);
398
398
  else{if(f(N)&&N.getHtml().match(/(\s|&nbsp;)$/g)){T=null;break}T=O.clone();T.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)}N=N.getLast(c)}T&&O.moveToRange(T)}}}}();x=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}function c(a){var b=a.count(),
399
399
  d;for(b;0<b--;)d=a.getItem(b),CKEDITOR.tools.trim(d.getHtml())||(d.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var e=d.startContainer,f=e.getAscendant("table",1),g=!1;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();f||(f=d.clone(),f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),g=!0);f||(f=e);f.is("table")?(d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),
400
400
  d.collapse(!0),f.remove()):(f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",g)),f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",g)),(e=f.getBogus())&&e.remove(),d.moveToPosition(f,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();J=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&
401
401
  a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=b.startContainer,d=!1,e;e=b.clone();e.setStart(c,0);e=a(e).lastBackward();e||(e=b.clone(),e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),d=!0);e||(e=c);e.is(CKEDITOR.dtd.$list)?(b.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),e.remove()):((c=e.getBogus())&&c.remove(),b.moveToPosition(e,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();w={eol:{detect:function(a,b){var c=a.range,
402
402
  d=c.clone(),e=c.clone(),f=new CKEDITOR.dom.elementPath(c.startContainer,b),g=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);e.collapse();f.block&&d.checkBoundaryOfElement(f.block,CKEDITOR.END)&&(c.setStartAfter(f.block),a.prependEolBr=1);g.block&&e.checkBoundaryOfElement(g.block,CKEDITOR.START)&&(c.setEndBefore(g.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(c),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c),
403
- 1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!A(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),g;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(e.blockLimit.is({tr:1,
404
- table:1})){var h=e.contains("table").getParent();g=function(a){return!a.equals(h)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(f=f.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!f.equals(c))){var l=e.contains(CKEDITOR.dtd.$list).getParent();g=function(a){return!a.equals(l)}}g||(g=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,b,d,g)},rebuildFragment:function(a,b,c,d){for(var e;c&&!c.equals(b)&&d(c);)e=c.clone(0,1),a.fragment.appendTo(e),
405
- a.fragment=e,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};E=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,e){a(d);a(e,1);for(var f;f=e.getNext();)f.insertAfter(d),d=f;u(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);
406
- d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),e=d.startPath(),f=d.endPath(),k=e.contains(CKEDITOR.dtd.$list),g=f.contains(CKEDITOR.dtd.$list);a.mergeList=k&&g&&k.getParent().equals(g.getParent())&&!k.equals(g);a.mergeListItems=e.block&&f.block&&e.block.is(CKEDITOR.dtd.$listItem)&&f.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=
407
- d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),k=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var g=f.contains(CKEDITOR.dtd.$list),n=k.contains(CKEDITOR.dtd.$list);g.equals(n)||(n.moveChildren(g),n.remove())}a.mergeListItems&&(f=f.contains(CKEDITOR.dtd.$listItem),k=k.contains(CKEDITOR.dtd.$listItem),f.equals(k)||b(k,d,e));d.remove();e.remove()}}},block:{detectMerge:function(a,
408
- b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),k=new CKEDITOR.dom.elementPath(e,c),f=f.block,k=k.block;f&&k&&!f.equals(k)&&b(k,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e=
409
- [],f,k=new CKEDITOR.dom.walker(c),g=c.startPath().contains(d),n=c.endPath().contains(d),h={};k.guard=function(a,k){if(a.type==CKEDITOR.NODE_ELEMENT){var p="visited_"+(k?"out":"in");if(a.getCustomData(p))return;CKEDITOR.dom.element.setMarker(h,a,p,1)}if(k&&g&&a.equals(g))f=c.clone(),f.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),e.push(f);else if(!k&&n&&a.equals(n))f=c.clone(),f.setStartAt(n,CKEDITOR.POSITION_AFTER_START),e.push(f);else{if(p=!k)p=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!g||b(a,g))&&(!n||
410
- b(a,n));p&&(f=c.clone(),f.selectNodeContents(a),e.push(f))}};k.lastForward();CKEDITOR.dom.element.clearAllMarkers(h);return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(c);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};
411
- c.checkForward();if(1<e){var c=b.startPath().contains("table"),f=b.endPath().contains("table");c&&f&&b.checkBoundaryOfElement(c,CKEDITOR.START)&&b.checkBoundaryOfElement(f,CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),b.setEndAfter(f),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(e,f){var k=c(f,e.bookmark),g=k.clone(),h,p,v=k.getCommonAncestor();v.is(CKEDITOR.dtd.$tableContent)&&!v.is(d)&&(v=v.getAscendant("table",!0));p=v;v=new CKEDITOR.dom.elementPath(k.startContainer,
412
- p);p=new CKEDITOR.dom.elementPath(k.endContainer,p);v=v.contains("table");p=p.contains("table");if(v||p)v&&p&&b(v,p)?(e.tableSurroundingRange=g,g.setStartAt(v,CKEDITOR.POSITION_AFTER_END),g.setEndAt(p,CKEDITOR.POSITION_BEFORE_START),g=k.clone(),g.setEndAt(v,CKEDITOR.POSITION_AFTER_END),h=k.clone(),h.setStartAt(p,CKEDITOR.POSITION_BEFORE_START),h=a(g).concat(a(h))):v?p||(e.tableSurroundingRange=g,g.setStartAt(v,CKEDITOR.POSITION_AFTER_END),k.setEndAt(v,CKEDITOR.POSITION_AFTER_END)):(e.tableSurroundingRange=
413
- g,g.setEndAt(p,CKEDITOR.POSITION_BEFORE_START),k.setStartAt(p,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=h?h:a(k)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),u(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);
414
- c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var c=b.startPath(),d;h(a,c.block,c.blockLimit)&&(d=l(a))&&(d=b.document.createElement(d),d.appendBogus(),b.insertNode(d),b.moveToPosition(d,
403
+ 1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!z(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),g;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(e.blockLimit.is({tr:1,
404
+ table:1})){var k=e.contains("table").getParent();g=function(a){return!a.equals(k)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(f=f.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!f.equals(c))){var h=e.contains(CKEDITOR.dtd.$list).getParent();g=function(a){return!a.equals(h)}}g||(g=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,b,d,g)},rebuildFragment:function(a,b,c,d){for(var e;c&&!c.equals(b)&&d(c);)e=c.clone(0,1),a.fragment.appendTo(e),
405
+ a.fragment=e,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};F=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,e){a(d);a(e,1);for(var f;f=e.getNext();)f.insertAfter(d),d=f;u(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);
406
+ d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),e=d.startPath(),f=d.endPath(),l=e.contains(CKEDITOR.dtd.$list),g=f.contains(CKEDITOR.dtd.$list);a.mergeList=l&&g&&l.getParent().equals(g.getParent())&&!l.equals(g);a.mergeListItems=e.block&&f.block&&e.block.is(CKEDITOR.dtd.$listItem)&&f.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=
407
+ d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),l=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var g=f.contains(CKEDITOR.dtd.$list),n=l.contains(CKEDITOR.dtd.$list);g.equals(n)||(n.moveChildren(g),n.remove())}a.mergeListItems&&(f=f.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$listItem),f.equals(l)||b(l,d,e));d.remove();e.remove()}}},block:{detectMerge:function(a,
408
+ b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),l=new CKEDITOR.dom.elementPath(e,c),f=f.block,l=l.block;f&&l&&!f.equals(l)&&b(l,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e=
409
+ [],f,l=new CKEDITOR.dom.walker(c),g=c.startPath().contains(d),n=c.endPath().contains(d),k={};l.guard=function(a,l){if(a.type==CKEDITOR.NODE_ELEMENT){var h="visited_"+(l?"out":"in");if(a.getCustomData(h))return;CKEDITOR.dom.element.setMarker(k,a,h,1)}if(l&&g&&a.equals(g))f=c.clone(),f.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),e.push(f);else if(!l&&n&&a.equals(n))f=c.clone(),f.setStartAt(n,CKEDITOR.POSITION_AFTER_START),e.push(f);else{if(h=!l)h=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!g||b(a,g))&&(!n||
410
+ b(a,n));h&&(f=c.clone(),f.selectNodeContents(a),e.push(f))}};l.lastForward();CKEDITOR.dom.element.clearAllMarkers(k);return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(c);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};
411
+ c.checkForward();if(1<e){var c=b.startPath().contains("table"),f=b.endPath().contains("table");c&&f&&b.checkBoundaryOfElement(c,CKEDITOR.START)&&b.checkBoundaryOfElement(f,CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),b.setEndAfter(f),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(e,f){var l=c(f,e.bookmark),g=l.clone(),k,h,v=l.getCommonAncestor();v.is(CKEDITOR.dtd.$tableContent)&&!v.is(d)&&(v=v.getAscendant("table",!0));h=v;v=new CKEDITOR.dom.elementPath(l.startContainer,
412
+ h);h=new CKEDITOR.dom.elementPath(l.endContainer,h);v=v.contains("table");h=h.contains("table");if(v||h)v&&h&&b(v,h)?(e.tableSurroundingRange=g,g.setStartAt(v,CKEDITOR.POSITION_AFTER_END),g.setEndAt(h,CKEDITOR.POSITION_BEFORE_START),g=l.clone(),g.setEndAt(v,CKEDITOR.POSITION_AFTER_END),k=l.clone(),k.setStartAt(h,CKEDITOR.POSITION_BEFORE_START),k=a(g).concat(a(k))):v?h||(e.tableSurroundingRange=g,g.setStartAt(v,CKEDITOR.POSITION_AFTER_END),l.setEndAt(v,CKEDITOR.POSITION_AFTER_END)):(e.tableSurroundingRange=
413
+ g,g.setEndAt(h,CKEDITOR.POSITION_BEFORE_START),l.setStartAt(h,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=k?k:a(l)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),u(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);
414
+ c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var c=b.startPath(),d;k(a,c.block,c.blockLimit)&&(d=h(a))&&(d=b.document.createElement(d),d.appendBogus(),b.insertNode(d),b.moveToPosition(d,
415
415
  CKEDITOR.POSITION_AFTER_START))}}}()})();
416
416
  (function(){function a(){var a=this._.fakeSelection,b;a&&(b=this.getSelection(1),b&&b.isHidden()||(a.reset(),a=0));if(!a&&(a=b||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){var c=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(b.blockLimit);CKEDITOR.env.webkit&&!c&&(this._.previousActive=this.document.getActive());this._.selectionPreviousPath=b;this.fire("selectionChange",
417
- {selection:a,path:b})}}function d(){x=!0;q||(b.call(this),q=CKEDITOR.tools.setTimeout(b,200,this))}function b(){q=null;x&&(CKEDITOR.tools.setTimeout(a,0,this),x=!1)}function c(a){return J(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function e(a){function b(c,d){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var d=a.startContainer,e=a.getPreviousNode(c,null,d),f=a.getNextNode(c,null,
418
- d);return b(e)||b(f,1)||!(e||f||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function g(a){h(a,!1);var b=a.getDocument().createText(A);a.setCustomData("cke-fillingChar",b);return b}function h(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==b){var d=a.getDocument().getSelection().getNative(),e=d&&"None"!=d.type&&d.getRangeAt(0),f=A.length;if(c.getLength()>f&&e&&e.intersectsNode(c.$)){var g=[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];
419
- d.anchorNode==c.$&&d.anchorOffset>f&&(g[0].offset-=f);d.focusNode==c.$&&d.focusOffset>f&&(g[1].offset-=f)}}c.setText(l(c.getText(),1));g&&(c=a.getDocument().$,d=c.getSelection(),c=c.createRange(),c.setStart(g[0].node,g[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(g[1].node,g[1].offset))}}function l(a,b){return b?a.replace(y,function(a,b){return b?" ":""}):a.replace(A,"")}function m(a,b){var c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+
417
+ {selection:a,path:b})}}function d(){x=!0;m||(b.call(this),m=CKEDITOR.tools.setTimeout(b,200,this))}function b(){m=null;x&&(CKEDITOR.tools.setTimeout(a,0,this),x=!1)}function c(a){return J(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function e(a){function b(c,d){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var d=a.startContainer,e=a.getPreviousNode(c,null,d),f=a.getNextNode(c,null,
418
+ d);return b(e)||b(f,1)||!(e||f||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function g(a){k(a,!1);var b=a.getDocument().createText(z);a.setCustomData("cke-fillingChar",b);return b}function k(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==b){var d=a.getDocument().getSelection().getNative(),e=d&&"None"!=d.type&&d.getRangeAt(0),f=z.length;if(c.getLength()>f&&e&&e.intersectsNode(c.$)){var g=[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];
419
+ d.anchorNode==c.$&&d.anchorOffset>f&&(g[0].offset-=f);d.focusNode==c.$&&d.focusOffset>f&&(g[1].offset-=f)}}c.setText(h(c.getText(),1));g&&(c=a.getDocument().$,d=c.getSelection(),c=c.createRange(),c.setStart(g[0].node,g[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(g[1].node,g[1].offset))}}function h(a,b){return b?a.replace(y,function(a,b){return b?" ":""}):a.replace(z,"")}function p(a,b){var c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+
420
420
  (CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px")+'"\x3e'+(b||"\x26nbsp;")+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),e=a.createRange(),f=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(c,CKEDITOR.POSITION_AFTER_START);e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([e]);f.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function r(a){var b=
421
421
  {37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),f=e[0];1==e.length&&f.collapsed&&(d=f[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&"false"==d.getAttribute("contenteditable")&&(a.getSelection().fake(d),c.data.preventDefault(),c.cancel())}}}function f(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=
422
422
  c.startContainer,e;d&&!((e=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly());)e&&"false"==d.getAttribute("contentEditable")&&c.setStartAfter(d),d=d.getParent();d=c.startContainer;e=c.endContainer;var f=c.startOffset,g=c.endOffset,h=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(f>=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));e&&e.type==CKEDITOR.NODE_TEXT&&(g?h.setEndAfter(e):h.setEndBefore(e));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&
423
- d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(d),e.collapsed||a.splice(b+1,0,e));return!0}return!1};d.next()}}return a}var C="function"!=typeof window.getSelection,u=1,A=CKEDITOR.tools.repeat("​",7),y=new RegExp(A+"( )?","g"),q,x,J=CKEDITOR.dom.walker.invisible(1),w=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);
423
+ d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(d),e.collapsed||a.splice(b+1,0,e));return!0}return!1};d.next()}}return a}var B="function"!=typeof window.getSelection,u=1,z=CKEDITOR.tools.repeat("​",7),y=new RegExp(z+"( )?","g"),m,x,J=CKEDITOR.dom.walker.invisible(1),w=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);
424
424
  return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;(e=d.moveToClosestEditablePosition(b.selected,a))||(e=d.moveToClosestEditablePosition(b.selected,!a));e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();e||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d]));c.fire("saveSnapshot");return!1}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=
425
- e.getSelection();a&&a.removeAllRanges()}var e=b.editor;e.on("contentDom",function(){function b(){v=new CKEDITOR.dom.selection(e.getSelection());v.lock()}function c(){k.removeListener("mouseup",c);l.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument==f.$&&b.select()}var f=e.document,k=CKEDITOR.document,g=e.editable(),p=f.getBody(),l=f.getDocumentElement(),m=g.isInline(),q,v;CKEDITOR.env.gecko&&g.attachListener(g,"focus",
426
- function(a){a.removeListener();0!==q&&(a=e.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$&&(a=e.createRange(),a.moveToElementEditStart(g),a.select())},null,null,-2);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){q&&CKEDITOR.env.webkit&&(q=e._.previousActive&&e._.previousActive.equals(f.getActive()))&&null!=e._.previousScrollTop&&e._.previousScrollTop!=g.$.scrollTop&&(g.$.scrollTop=e._.previousScrollTop);e.unlockSelection(q);q=0},null,null,-1);g.attachListener(g,
427
- "mousedown",function(){q=0});if(CKEDITOR.env.ie||m)C?g.attachListener(g,"beforedeactivate",b,null,null,-1):g.attachListener(e,"selectionCheck",b,null,null,-1),g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){e.lockSelection(v);q=1},null,null,-1),g.attachListener(g,"mousedown",function(){q=0});if(CKEDITOR.env.ie&&!m){var G;g.attachListener(g,"mousedown",function(a){2==a.data.$.button&&((a=e.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(G=e.window.getScrollPosition()))});
428
- g.attachListener(g,"mouseup",function(a){2==a.data.$.button&&G&&(e.document.$.documentElement.scrollLeft=G.x,e.document.$.documentElement.scrollTop=G.y);G=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var D,I;l.on("mousedown",function(a){function b(a){a=a.data.$;if(D){var c=p.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}D.setEndPoint(0>I.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);D.select()}}function c(){l.removeListener("mousemove",
429
- b);k.removeListener("mouseup",c);l.removeListener("mouseup",c);D.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<l.$.clientHeight&&a.$.x<l.$.clientWidth){D=p.$.createTextRange();try{D.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}I=D.duplicate();l.on("mousemove",b);k.on("mouseup",c);l.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)l.on("mousedown",function(a){a.data.getTarget().is("html")&&(k.on("mouseup",c),l.on("mouseup",c))})}}g.attachListener(g,"selectionchange",a,
430
- e);g.attachListener(g,"keyup",d,e);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(m&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var K;g.attachListener(g,"mousedown",function(){K=1});g.attachListener(f.getDocumentElement(),"mouseup",function(){K&&d.call(e);K=0})}else g.attachListener(CKEDITOR.env.ie?g:f.getDocumentElement(),"mouseup",d,e);CKEDITOR.env.webkit&&g.attachListener(f,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:h(g)}},
425
+ e.getSelection();a&&a.removeAllRanges()}var e=b.editor;e.on("contentDom",function(){function b(){v=new CKEDITOR.dom.selection(e.getSelection());v.lock()}function c(){l.removeListener("mouseup",c);q.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument==f.$&&b.select()}var f=e.document,l=CKEDITOR.document,g=e.editable(),h=f.getBody(),q=f.getDocumentElement(),m=g.isInline(),p,v;CKEDITOR.env.gecko&&g.attachListener(g,"focus",
426
+ function(a){a.removeListener();0!==p&&(a=e.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$&&(a=e.createRange(),a.moveToElementEditStart(g),a.select())},null,null,-2);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){p&&CKEDITOR.env.webkit&&(p=e._.previousActive&&e._.previousActive.equals(f.getActive()))&&null!=e._.previousScrollTop&&e._.previousScrollTop!=g.$.scrollTop&&(g.$.scrollTop=e._.previousScrollTop);e.unlockSelection(p);p=0},null,null,-1);g.attachListener(g,
427
+ "mousedown",function(){p=0});if(CKEDITOR.env.ie||m)B?g.attachListener(g,"beforedeactivate",b,null,null,-1):g.attachListener(e,"selectionCheck",b,null,null,-1),g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){e.lockSelection(v);p=1},null,null,-1),g.attachListener(g,"mousedown",function(){p=0});if(CKEDITOR.env.ie&&!m){var G;g.attachListener(g,"mousedown",function(a){2==a.data.$.button&&((a=e.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(G=e.window.getScrollPosition()))});
428
+ g.attachListener(g,"mouseup",function(a){2==a.data.$.button&&G&&(e.document.$.documentElement.scrollLeft=G.x,e.document.$.documentElement.scrollTop=G.y);G=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var E,I;q.on("mousedown",function(a){function b(a){a=a.data.$;if(E){var c=h.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}E.setEndPoint(0>I.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);E.select()}}function c(){q.removeListener("mousemove",
429
+ b);l.removeListener("mouseup",c);q.removeListener("mouseup",c);E.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<q.$.clientHeight&&a.$.x<q.$.clientWidth){E=h.$.createTextRange();try{E.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}I=E.duplicate();q.on("mousemove",b);l.on("mouseup",c);q.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)q.on("mousedown",function(a){a.data.getTarget().is("html")&&(l.on("mouseup",c),q.on("mouseup",c))})}}g.attachListener(g,"selectionchange",a,
430
+ e);g.attachListener(g,"keyup",d,e);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(m&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var K;g.attachListener(g,"mousedown",function(){K=1});g.attachListener(f.getDocumentElement(),"mouseup",function(){K&&d.call(e);K=0})}else g.attachListener(CKEDITOR.env.ie?g:f.getDocumentElement(),"mouseup",d,e);CKEDITOR.env.webkit&&g.attachListener(f,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:k(g)}},
431
431
  null,null,-1);g.attachListener(g,"keydown",r(e),null,null,-1)});e.on("setData",function(){e.unlockSelection();CKEDITOR.env.webkit&&c()});e.on("contentDomUnload",function(){e.unlockSelection()});if(CKEDITOR.env.ie9Compat)e.on("beforeDestroy",c,null,null,9);e.on("dataReady",function(){delete e._.fakeSelection;delete e._.hiddenSelectionContainer;e.selectionChange(1)});e.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=e.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&
432
432
  (b.remove(),CKEDITOR.env.gecko&&(a=e.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);e.on("key",function(a){if("wysiwyg"==e.mode){var b=e.getSelection();if(b.isFake){var c=w[a.data.keyCode];if(c)return c({editor:e,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar");
433
- c&&(c.getCustomData("ready")?h(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){h(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=l(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=l(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:d).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==
433
+ c&&(c.getCustomData("ready")?k(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){k(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=h(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=h(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:d).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==
434
434
  this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};
435
435
  CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;
436
436
  this.rev=b?b.rev:u++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,e;if(a)if(a.getRangeAt)d=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(f){}d=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!d||
437
- d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var E={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:l,
438
- _createFillingCharSequenceNode:g,FILLING_CHAR_SEQUENCE:A});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=C?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:C?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&
439
- (b=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&E[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=C?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}
440
- var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,k,g=b.duplicate(),h=0,l=e.length-1,v=-1,n,m;h<=l;)if(v=Math.floor((h+l)/2),f=e[v],g.moveToElementText(f),n=g.compareEndPoints("StartToStart",b),0<n)l=v-1;else if(0>n)h=v+1;else return{container:d,offset:a(f)};if(-1==v||v==e.length-1&&0>n){g.moveToElementText(d);g.setEndPoint("StartToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!g)return f=
441
- e[e.length-1],f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length};for(d=e.length;0<g&&0<d;)k=e[--d],k.nodeType==CKEDITOR.NODE_TEXT&&(m=k,g-=k.nodeValue.length);return{container:m,offset:-g}}g.collapse(0<n?!0:!1);g.setEndPoint(0<n?"StartToStart":"EndToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;if(!g)return{container:d,offset:a(f)+(0<n?0:1)};for(;0<g;)try{k=f[0<n?"previousSibling":"nextSibling"],k.nodeType==CKEDITOR.NODE_TEXT&&(g-=k.nodeValue.length,
442
- m=k),f=k}catch(q){return{container:d,offset:a(f)}}return{container:m,offset:0<n?-g:m.nodeValue.length+g}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=b(c,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=b(c),a.setEnd(new CKEDITOR.dom.node(d.container),d.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&
443
- a.collapse(),[a];if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var f=c.item(e),g=f.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<g.childNodes.length&&g.childNodes[k]!=f;k++);a.setStart(new CKEDITOR.dom.node(g),k);a.setEnd(new CKEDITOR.dom.node(g),k+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),
437
+ d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var F={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:h,
438
+ _createFillingCharSequenceNode:g,FILLING_CHAR_SEQUENCE:z});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=B?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:B?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&
439
+ (b=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&F[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=B?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}
440
+ var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,l,g=b.duplicate(),h=0,k=e.length-1,v=-1,n,m;h<=k;)if(v=Math.floor((h+k)/2),f=e[v],g.moveToElementText(f),n=g.compareEndPoints("StartToStart",b),0<n)k=v-1;else if(0>n)h=v+1;else return{container:d,offset:a(f)};if(-1==v||v==e.length-1&&0>n){g.moveToElementText(d);g.setEndPoint("StartToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!g)return f=
441
+ e[e.length-1],f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length};for(d=e.length;0<g&&0<d;)l=e[--d],l.nodeType==CKEDITOR.NODE_TEXT&&(m=l,g-=l.nodeValue.length);return{container:m,offset:-g}}g.collapse(0<n?!0:!1);g.setEndPoint(0<n?"StartToStart":"EndToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;if(!g)return{container:d,offset:a(f)+(0<n?0:1)};for(;0<g;)try{l=f[0<n?"previousSibling":"nextSibling"],l.nodeType==CKEDITOR.NODE_TEXT&&(g-=l.nodeValue.length,
442
+ m=l),f=l}catch(p){return{container:d,offset:a(f)}}return{container:m,offset:0<n?-g:m.nodeValue.length+g}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=b(c,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=b(c),a.setEnd(new CKEDITOR.dom.node(d.container),d.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&
443
+ a.collapse(),[a];if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var f=c.item(e),g=f.parentNode,l=0,a=new CKEDITOR.dom.range(this.root);l<g.childNodes.length&&g.childNodes[l]!=f;l++);a.setStart(new CKEDITOR.dom.node(g),l);a.setEnd(new CKEDITOR.dom.node(g),l+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),
444
444
  e.startOffset);b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;d||(c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this)));return b?f(new CKEDITOR.dom.rangeList(d.slice())):d}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];
445
445
  if(c){if(c.collapsed)b=c.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(c.optimize();b=c.startContainer,c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)c.setStartAfter(b);b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();if((b=b.getChild(c.startOffset))&&b.type==CKEDITOR.NODE_ELEMENT)for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;)b=c,c=c.getFirst();else b=c.startContainer}b=b.$}}return a.startElement=b?
446
- new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&E[c.getName()]&&(d=c));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=
447
- this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=C?"Control"==b.type?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&
446
+ new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&F[c.getName()]&&(d=c));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=
447
+ this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=B?"Control"==b.type?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&
448
448
  a.getAscendant("body",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=u++},selectElement:function(a){var b=
449
- new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,c,d=0;d<a.length;++d)c=a[d],c.endContainer.equals(b)&&(c.endOffset=Math.min(c.endOffset,b.getChildCount()));if(a.length)if(this.isLocked){var f=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();f&&!f.equals(this.root)&&f.focus()}else{var l;a:{var m,q;if(1==a.length&&
450
- !(q=a[0]).collapsed&&(l=q.getEnclosedNode())&&l.type==CKEDITOR.NODE_ELEMENT&&(q=q.clone(),q.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(m=q.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(l=m),"false"==l.getAttribute("contenteditable")))break a;l=void 0}if(l)this.fake(l);else{if(C){q=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;b={table:1,tbody:1,tr:1};1<a.length&&(l=a[a.length-1],a[0].setEnd(l.endContainer,l.endOffset));l=a[0];a=l.collapsed;var r,u,y;if((c=l.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&
451
- c.getName()in E&&(!c.is("a")||!c.getText()))try{y=c.$.createControlRange();y.addElement(c.$);y.select();return}catch(w){}if(l.startContainer.type==CKEDITOR.NODE_ELEMENT&&l.startContainer.getName()in b||l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in b)l.shrink(CKEDITOR.NODE_ELEMENT,!0),a=l.collapsed;y=l.createBookmark();b=y.startNode;a||(f=y.endNode);y=l.document.$.body.createTextRange();y.moveToElementText(b.$);y.moveStart("character",1);f?(m=l.document.$.body.createTextRange(),
452
- m.moveToElementText(f.$),y.setEndPoint("EndToEnd",m),y.moveEnd("character",-1)):(r=b.getNext(q),u=b.hasAscendant("pre"),r=!(r&&r.getText&&r.getText().match(m))&&(u||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br")),u=l.document.createElement("span"),u.setHtml("\x26#65279;"),u.insertBefore(b),r&&l.document.createText("").insertBefore(b));l.setStartBefore(b);b.remove();a?(r?(y.moveStart("character",-1),y.select(),l.document.$.selection.clear()):y.select(),l.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START),
453
- u.remove()):(l.setEndBefore(f),f.remove(),y.select())}else{f=this.getNative();if(!f)return;this.removeAllRanges();for(y=0;y<a.length;y++){if(y<a.length-1&&(r=a[y],u=a[y+1],m=r.clone(),m.setStart(r.endContainer,r.endOffset),m.setEnd(u.startContainer,u.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),l=m.getCommonAncestor(),m=m.getEnclosedNode(),l.isReadOnly()||m&&m.isReadOnly()))){u.setStart(r.startContainer,r.startOffset);a.splice(y--,1);continue}l=a[y];u=this.document.$.createRange();
454
- l.collapsed&&CKEDITOR.env.webkit&&e(l)&&(m=g(this.root),l.insertNode(m),(r=m.getNext())&&!m.getPrevious()&&r.type==CKEDITOR.NODE_ELEMENT&&"br"==r.getName()?(h(this.root),l.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)):l.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));u.setStart(l.startContainer.$,l.startOffset);try{u.setEnd(l.endContainer.$,l.endOffset)}catch(v){if(0<=v.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))l.collapse(1),u.setEnd(l.endContainer.$,l.endOffset);else throw v;}f.addRange(u)}}this.reset();
455
- this.root.fire("selectionchange")}}},fake:function(a,b){var c=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();m(c,b);var d=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);d.ranges=new CKEDITOR.dom.rangeList(e);d.selectedElement=d.startElement=a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=u++;c._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=
449
+ new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,c,d=0;d<a.length;++d)c=a[d],c.endContainer.equals(b)&&(c.endOffset=Math.min(c.endOffset,b.getChildCount()));if(a.length)if(this.isLocked){var f=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();f&&!f.equals(this.root)&&f.focus()}else{var h;a:{var m,p;if(1==a.length&&
450
+ !(p=a[0]).collapsed&&(h=p.getEnclosedNode())&&h.type==CKEDITOR.NODE_ELEMENT&&(p=p.clone(),p.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(m=p.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(h=m),"false"==h.getAttribute("contenteditable")))break a;h=void 0}if(h)this.fake(h);else{if(B){p=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;b={table:1,tbody:1,tr:1};1<a.length&&(h=a[a.length-1],a[0].setEnd(h.endContainer,h.endOffset));h=a[0];a=h.collapsed;var r,u,y;if((c=h.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&
451
+ c.getName()in F&&(!c.is("a")||!c.getText()))try{y=c.$.createControlRange();y.addElement(c.$);y.select();return}catch(w){}if(h.startContainer.type==CKEDITOR.NODE_ELEMENT&&h.startContainer.getName()in b||h.endContainer.type==CKEDITOR.NODE_ELEMENT&&h.endContainer.getName()in b)h.shrink(CKEDITOR.NODE_ELEMENT,!0),a=h.collapsed;y=h.createBookmark();b=y.startNode;a||(f=y.endNode);y=h.document.$.body.createTextRange();y.moveToElementText(b.$);y.moveStart("character",1);f?(m=h.document.$.body.createTextRange(),
452
+ m.moveToElementText(f.$),y.setEndPoint("EndToEnd",m),y.moveEnd("character",-1)):(r=b.getNext(p),u=b.hasAscendant("pre"),r=!(r&&r.getText&&r.getText().match(m))&&(u||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br")),u=h.document.createElement("span"),u.setHtml("\x26#65279;"),u.insertBefore(b),r&&h.document.createText("").insertBefore(b));h.setStartBefore(b);b.remove();a?(r?(y.moveStart("character",-1),y.select(),h.document.$.selection.clear()):y.select(),h.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START),
453
+ u.remove()):(h.setEndBefore(f),f.remove(),y.select())}else{f=this.getNative();if(!f)return;this.removeAllRanges();for(y=0;y<a.length;y++){if(y<a.length-1&&(r=a[y],u=a[y+1],m=r.clone(),m.setStart(r.endContainer,r.endOffset),m.setEnd(u.startContainer,u.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),h=m.getCommonAncestor(),m=m.getEnclosedNode(),h.isReadOnly()||m&&m.isReadOnly()))){u.setStart(r.startContainer,r.startOffset);a.splice(y--,1);continue}h=a[y];u=this.document.$.createRange();
454
+ h.collapsed&&CKEDITOR.env.webkit&&e(h)&&(m=g(this.root),h.insertNode(m),(r=m.getNext())&&!m.getPrevious()&&r.type==CKEDITOR.NODE_ELEMENT&&"br"==r.getName()?(k(this.root),h.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)):h.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));u.setStart(h.startContainer.$,h.startOffset);try{u.setEnd(h.endContainer.$,h.endOffset)}catch(v){if(0<=v.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))h.collapse(1),u.setEnd(h.endContainer.$,h.endOffset);else throw v;}f.addRange(u)}}this.reset();
455
+ this.root.fire("selectionchange")}}},fake:function(a,b){var c=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();p(c,b);var d=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);d.ranges=new CKEDITOR.dom.rangeList(e);d.selectedElement=d.startElement=a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=u++;c._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=
456
456
  this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c,d=0;d<a.length;d++){var e=new CKEDITOR.dom.range(this.root);e.moveToBookmark(a[d]);b.push(e)}a.isFake&&(c=b[0].getEnclosedNode(),c&&c.type==
457
- CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[C?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}})();
457
+ CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[B?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}})();
458
458
  "use strict";CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3;
459
- (function(){function a(a,b){for(var c,d;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");"false"==e?c=a:"true"==e&&(d=1)}return c}function d(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function b(c){var f=c.document;if(c.collapsed)f=J(this,f),c.insertNode(f),c.moveToPosition(f,CKEDITOR.POSITION_BEFORE_END);else{var g=this.element,k=this._.definition,l,h=k.ignoreReadonly,m=h||k.includeReadonly;null==
460
- m&&(m=c.root.getCustomData("cke_includeReadonly"));var n=CKEDITOR.dtd[g];n||(l=!0,n=CKEDITOR.dtd.span);c.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.trim();var q=c.createBookmark(),p=q.startNode,r=q.endNode,u=p,t;if(!h){var w=c.getCommonAncestor(),h=a(p,w),w=a(r,w);h&&(u=h.getNextSourceNode(!0));w&&(r=w)}for(u.getPosition(r)==CKEDITOR.POSITION_FOLLOWING&&(u=0);u;){h=!1;if(u.equals(r))u=null,h=!0;else{var A=u.type==CKEDITOR.NODE_ELEMENT?u.getName():null,w=A&&"false"==u.getAttribute("contentEditable"),x=A&&
461
- u.getAttribute("data-nostyle");if(A&&u.data("cke-bookmark")){u=u.getNextSourceNode(!0);continue}if(w&&m&&CKEDITOR.dtd.$block[A])for(var C=u,z=e(C),B=void 0,E=z.length,F=0,C=E&&new CKEDITOR.dom.range(C.getDocument());F<E;++F){var B=z[F],L=CKEDITOR.filter.instances[B.data("cke-filter")];if(L?L.check(this):1)C.selectNodeContents(B),b.call(this,C)}z=A?!n[A]||x?0:w&&!m?0:d(u,r,k,Q):1;if(z)if(B=u.getParent(),z=k,E=g,F=l,!B||!(B.getDtd()||CKEDITOR.dtd.span)[E]&&!F||z.parentRule&&!z.parentRule(B))h=!0;else{if(t||
462
- A&&CKEDITOR.dtd.$removeEmpty[A]&&(u.getPosition(r)|Q)!=Q||(t=c.clone(),t.setStartBefore(u)),A=u.type,A==CKEDITOR.NODE_TEXT||w||A==CKEDITOR.NODE_ELEMENT&&!u.getChildCount()){for(var A=u,R;(h=!A.getNext(H))&&(R=A.getParent(),n[R.getName()])&&d(R,p,k,P);)A=R;t.setEndAfter(A)}}else h=!0;u=u.getNextSourceNode(x||w)}if(h&&t&&!t.collapsed){for(var h=J(this,f),w=h.hasAttributes(),x=t.getCommonAncestor(),A={},z={},B={},E={},W,T,ca;h&&x;){if(x.getName()==g){for(W in k.attributes)!E[W]&&(ca=x.getAttribute(T))&&
463
- (h.getAttribute(W)==ca?z[W]=1:E[W]=1);for(T in k.styles)!B[T]&&(ca=x.getStyle(T))&&(h.getStyle(T)==ca?A[T]=1:B[T]=1)}x=x.getParent()}for(W in z)h.removeAttribute(W);for(T in A)h.removeStyle(T);w&&!h.hasAttributes()&&(h=null);h?(t.extractContents().appendTo(h),t.insertNode(h),y.call(this,h),h.mergeSiblings(),CKEDITOR.env.ie||h.$.normalize()):(h=new CKEDITOR.dom.element("span"),t.extractContents().appendTo(h),t.insertNode(h),y.call(this,h),h.remove(!0));t=null}}c.moveToBookmark(q);c.shrink(CKEDITOR.SHRINK_TEXT);
464
- c.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function c(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(m.getParent()),e=null,f=null,g=0;g<a.elements.length;g++){var h=a.elements[g];if(h==a.block||h==a.blockLimit)break;n.checkElementRemovable(h,!0)&&(e=h)}for(g=0;g<c.elements.length;g++){h=c.elements[g];if(h==c.block||h==c.blockLimit)break;n.checkElementRemovable(h,!0)&&(f=h)}f&&m.breakParent(f);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=
465
- a.createBookmark(),d=c.startNode;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,g=0,h;g<e.elements.length&&(h=e.elements[g])&&h!=e.block&&h!=e.blockLimit;g++)if(this.checkElementRemovable(h)){var l;a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(l=a.checkBoundaryOfElement(h,CKEDITOR.START)))?(f=h,f.match=l?"start":"end"):(h.mergeSiblings(),h.is(this.element)?A.call(this,h):q(h,k(this)[h.getName()]))}if(f){h=d;for(g=0;;g++){l=e.elements[g];if(l.equals(f))break;
466
- else if(l.match)continue;else l=l.clone();l.append(h);h=l}h["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var m=c.endNode,n=this;b();for(e=d;!e.equals(m);)f=e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?A.call(this,e):q(e,k(this)[e.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)&&(b(),f=d.getNext())),e=f}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function e(a){var b=[];a.forEach(function(a){if("true"==
467
- a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function g(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&w(a,this)}function h(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&&
468
- a.removeStyle(e)}}function l(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var d,e=a.document,f;d=c.getNextParagraph();)!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(f=J(this,e,d),r(d,f));a.moveToBookmark(b)}function m(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)this.checkElementRemovable(d)&&
469
- (d.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e),r(d,e)):A.call(this,d));a.moveToBookmark(b)}function r(a,b){var c=!b;c&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),e=a.is("pre"),g=!d&&e;if(d&&!e){e=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=C(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+|&nbsp;)/g,
470
- " ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(g);b=e}else g?b=u(c?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;(k=c.getPrevious(R))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=C(k.getHtml(),/\n$/,"")+"\n\n"+C(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":
471
- c.setHtml(d),k.remove())}else c&&x(b)}function f(a){var b=[];C(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function C(a,b,c){var d="",e="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function u(a,b){var c;
472
- 1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=C(e,/^[ \t]*\n/,""),e=C(e,/\n$/,""),e=C(e,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),e=e.replace(/\n/g,"\x3cbr\x3e"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);
473
- c.append(f)}else b.setHtml(e)}return c||b}function A(a,b){var c=this._.definition,d=c.attributes,c=c.styles,e=k(this)[a.getName()],f=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),g;for(g in d)if("class"!=g&&!this._.definition.fullMatch||a.getAttribute(g)==p(g,d[g]))b&&"data-"==g.slice(0,5)||(f=a.hasAttribute(g),a.removeAttribute(g));for(var h in c)this._.definition.fullMatch&&a.getStyle(h)!=p(h,c[h],!0)||(f=f||!!a.getStyle(h),a.removeStyle(h));q(a,e,z[a.getName()]);f&&(this._.definition.alwaysRemoveElement?
474
- x(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?x(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function y(a){for(var b=k(this),c=a.getElementsByTag(this.element),d,e=c.count();0<=--e;)d=c.getItem(e),d.isReadOnly()||A.call(this,d,!0);for(var f in b)if(f!=this.element)for(c=a.getElementsByTag(f),e=c.count()-1;0<=e;e--)d=c.getItem(e),d.isReadOnly()||q(d,b[f])}function q(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],
459
+ (function(){function a(a,b){for(var c,d;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");"false"==e?c=a:"true"==e&&(d=1)}return c}function d(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function b(c){var f=c.document;if(c.collapsed)f=J(this,f),c.insertNode(f),c.moveToPosition(f,CKEDITOR.POSITION_BEFORE_END);else{var g=this.element,h=this._.definition,l,k=h.ignoreReadonly,m=k||h.includeReadonly;null==
460
+ m&&(m=c.root.getCustomData("cke_includeReadonly"));var n=CKEDITOR.dtd[g];n||(l=!0,n=CKEDITOR.dtd.span);c.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.trim();var p=c.createBookmark(),q=p.startNode,r=p.endNode,u=q,t;if(!k){var w=c.getCommonAncestor(),k=a(q,w),w=a(r,w);k&&(u=k.getNextSourceNode(!0));w&&(r=w)}for(u.getPosition(r)==CKEDITOR.POSITION_FOLLOWING&&(u=0);u;){k=!1;if(u.equals(r))u=null,k=!0;else{var z=u.type==CKEDITOR.NODE_ELEMENT?u.getName():null,w=z&&"false"==u.getAttribute("contentEditable"),x=z&&
461
+ u.getAttribute("data-nostyle");if(z&&u.data("cke-bookmark")){u=u.getNextSourceNode(!0);continue}if(w&&m&&CKEDITOR.dtd.$block[z])for(var B=u,A=e(B),C=void 0,D=A.length,F=0,B=D&&new CKEDITOR.dom.range(B.getDocument());F<D;++F){var C=A[F],M=CKEDITOR.filter.instances[C.data("cke-filter")];if(M?M.check(this):1)B.selectNodeContents(C),b.call(this,B)}A=z?!n[z]||x?0:w&&!m?0:d(u,r,h,Q):1;if(A)if(C=u.getParent(),A=h,D=g,F=l,!C||!(C.getDtd()||CKEDITOR.dtd.span)[D]&&!F||A.parentRule&&!A.parentRule(C))k=!0;else{if(t||
462
+ z&&CKEDITOR.dtd.$removeEmpty[z]&&(u.getPosition(r)|Q)!=Q||(t=c.clone(),t.setStartBefore(u)),z=u.type,z==CKEDITOR.NODE_TEXT||w||z==CKEDITOR.NODE_ELEMENT&&!u.getChildCount()){for(var z=u,R;(k=!z.getNext(H))&&(R=z.getParent(),n[R.getName()])&&d(R,q,h,P);)z=R;t.setEndAfter(z)}}else k=!0;u=u.getNextSourceNode(x||w)}if(k&&t&&!t.collapsed){for(var k=J(this,f),w=k.hasAttributes(),x=t.getCommonAncestor(),z={},A={},C={},D={},W,T,ca;k&&x;){if(x.getName()==g){for(W in h.attributes)!D[W]&&(ca=x.getAttribute(T))&&
463
+ (k.getAttribute(W)==ca?A[W]=1:D[W]=1);for(T in h.styles)!C[T]&&(ca=x.getStyle(T))&&(k.getStyle(T)==ca?z[T]=1:C[T]=1)}x=x.getParent()}for(W in A)k.removeAttribute(W);for(T in z)k.removeStyle(T);w&&!k.hasAttributes()&&(k=null);k?(t.extractContents().appendTo(k),t.insertNode(k),y.call(this,k),k.mergeSiblings(),CKEDITOR.env.ie||k.$.normalize()):(k=new CKEDITOR.dom.element("span"),t.extractContents().appendTo(k),t.insertNode(k),y.call(this,k),k.remove(!0));t=null}}c.moveToBookmark(p);c.shrink(CKEDITOR.SHRINK_TEXT);
464
+ c.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function c(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(n.getParent()),e=null,f=null,g=0;g<a.elements.length;g++){var h=a.elements[g];if(h==a.block||h==a.blockLimit)break;p.checkElementRemovable(h,!0)&&(e=h)}for(g=0;g<c.elements.length;g++){h=c.elements[g];if(h==c.block||h==c.blockLimit)break;p.checkElementRemovable(h,!0)&&(f=h)}f&&n.breakParent(f);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=
465
+ a.createBookmark(),d=c.startNode;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,g=0,h;g<e.elements.length&&(h=e.elements[g])&&h!=e.block&&h!=e.blockLimit;g++)if(this.checkElementRemovable(h)){var k;a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(k=a.checkBoundaryOfElement(h,CKEDITOR.START)))?(f=h,f.match=k?"start":"end"):(h.mergeSiblings(),h.is(this.element)?z.call(this,h):m(h,l(this)[h.getName()]))}if(f){h=d;for(g=0;;g++){k=e.elements[g];if(k.equals(f))break;
466
+ else if(k.match)continue;else k=k.clone();k.append(h);h=k}h["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var n=c.endNode,p=this;b();for(e=d;!e.equals(n);)f=e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?z.call(this,e):m(e,l(this)[e.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)&&(b(),f=d.getNext())),e=f}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function e(a){var b=[];a.forEach(function(a){if("true"==
467
+ a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function g(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&w(a,this)}function k(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&&
468
+ a.removeStyle(e)}}function h(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var d,e=a.document,f;d=c.getNextParagraph();)!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(f=J(this,e,d),r(d,f));a.moveToBookmark(b)}function p(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)this.checkElementRemovable(d)&&
469
+ (d.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e),r(d,e)):z.call(this,d));a.moveToBookmark(b)}function r(a,b){var c=!b;c&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),e=a.is("pre"),g=!d&&e;if(d&&!e){e=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=B(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+|&nbsp;)/g,
470
+ " ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(g);b=e}else g?b=u(c?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;(k=c.getPrevious(R))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=B(k.getHtml(),/\n$/,"")+"\n\n"+B(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":
471
+ c.setHtml(d),k.remove())}else c&&x(b)}function f(a){var b=[];B(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function B(a,b,c){var d="",e="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function u(a,b){var c;
472
+ 1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=B(e,/^[ \t]*\n/,""),e=B(e,/\n$/,""),e=B(e,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),e=e.replace(/\n/g,"\x3cbr\x3e"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);
473
+ c.append(f)}else b.setHtml(e)}return c||b}function z(a,b){var c=this._.definition,d=c.attributes,c=c.styles,e=l(this)[a.getName()],f=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),g;for(g in d)if("class"!=g&&!this._.definition.fullMatch||a.getAttribute(g)==q(g,d[g]))b&&"data-"==g.slice(0,5)||(f=a.hasAttribute(g),a.removeAttribute(g));for(var h in c)this._.definition.fullMatch&&a.getStyle(h)!=q(h,c[h],!0)||(f=f||!!a.getStyle(h),a.removeStyle(h));m(a,e,A[a.getName()]);f&&(this._.definition.alwaysRemoveElement?
474
+ x(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?x(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function y(a){for(var b=l(this),c=a.getElementsByTag(this.element),d,e=c.count();0<=--e;)d=c.getItem(e),d.isReadOnly()||z.call(this,d,!0);for(var f in b)if(f!=this.element)for(c=a.getElementsByTag(f),e=c.count()-1;0<=e;e--)d=c.getItem(e),d.isReadOnly()||m(d,b[f])}function m(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],
475
475
  f;if(f=a.getAttribute(e)){var g=b[d][1];(null===g||g.test&&g.test(f)||"string"==typeof g&&f==g)&&a.removeAttribute(e)}}c||x(a)}function x(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(R),d=a.getNext(R);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br",1);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else c=a.getFirst(),d=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),
476
- d&&!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function J(a,b,c){var d;d=a.element;"*"==d&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=w(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function w(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function E(a,
477
- b){for(var c in a)a[c]=a[c].replace(L,function(a,c){return b[c]})}function k(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],f,g;"string"==typeof e?f=e.toLowerCase():(f=e.element?e.element.toLowerCase():a.element,g=e.attributes);e=b[f]||(b[f]={});if(g){var e=e.attributes=e.attributes||[],h;for(h in g)e.push([h.toLowerCase(),g[h]])}}}return b}function p(a,b,c){var d=new CKEDITOR.dom.element("span");
476
+ d&&!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function J(a,b,c){var d;d=a.element;"*"==d&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=w(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function w(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function F(a,
477
+ b){for(var c in a)a[c]=a[c].replace(M,function(a,c){return b[c]})}function l(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],f,g;"string"==typeof e?f=e.toLowerCase():(f=e.element?e.element.toLowerCase():a.element,g=e.attributes);e=b[f]||(b[f]={});if(g){var e=e.attributes=e.attributes||[],h;for(h in g)e.push([h.toLowerCase(),g[h]])}}}return b}function q(a,b,c){var d=new CKEDITOR.dom.element("span");
478
478
  d[c?"setStyle":"setAttribute"](a,b);return d[c?"getStyle":"getAttribute"](a)}function n(a,b){function c(a,b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var d in a)if(!(d in b)||c(b[d],d)!=c(a[d],d)&&"inherit"!=a[d]&&"inherit"!=b[d])return!1;return!0}function t(a,b,c){var d=a.document,e=a.getRanges();b=b?this.removeFromRange:this.applyToRange;for(var f,g=e.createIterator();f=
479
- g.getNextRange();)b.call(this,f,c);a.selectRanges(e);d.removeCustomData("doc_processing_style")}var z={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},B={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},F=/\s*(?:;\s*|$)/,L=/#\((.+?)\)/g,H=CKEDITOR.dom.walker.bookmark(0,
480
- 1),R=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),E(a.attributes,b),E(a.styles,b));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(z[c]?CKEDITOR.STYLE_BLOCK:B[c]?CKEDITOR.STYLE_OBJECT:
479
+ g.getNextRange();)b.call(this,f,c);a.selectRanges(e);d.removeCustomData("doc_processing_style")}var A={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},C={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},D=/\s*(?:;\s*|$)/,M=/#\((.+?)\)/g,H=CKEDITOR.dom.walker.bookmark(0,
480
+ 1),R=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),F(a.attributes,b),F(a.styles,b));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(A[c]?CKEDITOR.STYLE_BLOCK:C[c]?CKEDITOR.STYLE_OBJECT:
481
481
  CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return t.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);t.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return t.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),
482
- a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);t.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?l:this.type==CKEDITOR.STYLE_OBJECT?g:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?c:this.type==CKEDITOR.STYLE_BLOCK?m:this.type==CKEDITOR.STYLE_OBJECT?h:null;return this.removeFromRange(a)},applyToObject:function(a){w(a,
482
+ a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);t.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?h:this.type==CKEDITOR.STYLE_OBJECT?g:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?c:this.type==CKEDITOR.STYLE_BLOCK?p:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.removeFromRange(a)},applyToObject:function(a){w(a,
483
483
  this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,e;d<c.length;d++)if(e=c[d],this.type!=CKEDITOR.STYLE_INLINE||e!=a.block&&e!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var f=e.getName();if(!("string"==typeof this.element?f==this.element:f in this.element))continue}if(this.checkElementRemovable(e,!0,b))return!0}}return!1},checkApplicable:function(a,
484
484
  b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var d=a.getName();if("string"==typeof this.element?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return!0;if(d=c._AC)c=d;else{var d={},e=0,f=c.attributes;
485
- if(f)for(var g in f)e++,d[g]=f[g];if(g=CKEDITOR.style.getStyleText(c))d.style||e++,d.style=g;d._length=e;c=c._AC=d}if(c._length){for(var h in c)if("_length"!=h)if(d=a.getAttribute(h)||"","style"==h?n(c[h],d):c[h]==d){if(!b)return!0}else if(b)return!1;if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;if(b=k(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(d=b[c][0],d=a.getAttribute(d)){var e=b[c][1];
485
+ if(f)for(var g in f)e++,d[g]=f[g];if(g=CKEDITOR.style.getStyleText(c))d.style||e++,d.style=g;d._length=e;c=c._AC=d}if(c._length){for(var h in c)if("_length"!=h)if(d=a.getAttribute(h)||"","style"==h?n(c[h],d):c[h]==d){if(!b)return!0}else if(b)return!1;if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;if(b=l(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(d=b[c][0],d=a.getAttribute(d)){var e=b[c][1];
486
486
  if(null===e)return!0;if("string"==typeof e){if(d==e)return!0}else if(e.test(d))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;"bdo"==d&&(d="span");var c=["\x3c",d],e=b.attributes;if(e)for(var f in e)c.push(" ",f,'\x3d"',e[f],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style\x3d"',e,'"');c.push("\x3e",a||b.name,"\x3c/",d,"\x3e");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;
487
- var b=a.styles,c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(F,";"));for(var e in b){var f=b[e],g=(e+":"+f).replace(F,";");"inherit"==f?d+=g:c+=g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},
487
+ var b=a.styles,c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(D,";"));for(var e in b){var f=b[e],g=(e+":"+f).replace(D,";");"inherit"==f?d+=g:c+=g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},
488
488
  a,!0);return this.customHandlers[a.type]=b};var Q=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,P=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})();CKEDITOR.styleCommand=function(a,d){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,d,!0)};
489
489
  CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(a,d,b){CKEDITOR.stylesSet.addExternal(a,d,"");CKEDITOR.stylesSet.load(a,b)};
490
- CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,d){var b=this._.styleStateChangeCallbacks;b||(b=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var d=0;d<b.length;d++){var g=b[d],h=g.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;g.fn.call(this,h)}}));b.push({style:a,fn:d})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);
490
+ CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,d){var b=this._.styleStateChangeCallbacks;b||(b=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var d=0;d<b.length;d++){var g=b[d],k=g.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;g.fn.call(this,k)}}));b.push({style:a,fn:d})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);
491
491
  else{var d=this,b=d.config.stylesCombo_stylesSet||d.config.stylesSet;if(!1===b)a(null);else if(b instanceof Array)d._.stylesDefinitions=b,a(b);else{b||(b="default");var b=b.split(":"),c=b[0];CKEDITOR.stylesSet.addExternal(c,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(c,function(b){d._.stylesDefinitions=b[c];a(d._.stylesDefinitions)})}}}});
492
492
  CKEDITOR.dom.comment=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}});"use strict";
493
- (function(){var a={},d={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(d[b]=1);CKEDITOR.dom.elementPath=function(b,e){var g=null,h=null,l=[],m=b,r;e=e||b.getDocument().getBody();do if(m.type==CKEDITOR.NODE_ELEMENT){l.push(m);if(!this.lastElement&&(this.lastElement=m,m.is(CKEDITOR.dtd.$object)||"false"==m.getAttribute("contenteditable")))continue;if(m.equals(e))break;if(!h&&(r=m.getName(),
494
- "true"==m.getAttribute("contenteditable")?h=m:!g&&d[r]&&(g=m),a[r])){if(r=!g&&"div"==r){a:{r=m.getChildren();for(var f=0,C=r.count();f<C;f++){var u=r.getItem(f);if(u.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[u.getName()]){r=!0;break a}}r=!1}r=!r}r?g=m:h=m}}while(m=m.getParent());h||(h=e);this.block=g;this.blockLimit=h;this.root=e;this.elements=l}})();
493
+ (function(){var a={},d={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(d[b]=1);CKEDITOR.dom.elementPath=function(b,e){var g=null,k=null,h=[],p=b,r;e=e||b.getDocument().getBody();do if(p.type==CKEDITOR.NODE_ELEMENT){h.push(p);if(!this.lastElement&&(this.lastElement=p,p.is(CKEDITOR.dtd.$object)||"false"==p.getAttribute("contenteditable")))continue;if(p.equals(e))break;if(!k&&(r=p.getName(),
494
+ "true"==p.getAttribute("contenteditable")?k=p:!g&&d[r]&&(g=p),a[r])){if(r=!g&&"div"==r){a:{r=p.getChildren();for(var f=0,B=r.count();f<B;f++){var u=r.getItem(f);if(u.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[u.getName()]){r=!0;break a}}r=!1}r=!r}r?g=p:k=p}}while(p=p.getParent());k||(k=e);this.block=g;this.blockLimit=k;this.root=e;this.elements=h}})();
495
495
  CKEDITOR.dom.elementPath.prototype={compare:function(a){var d=this.elements;a=a&&a.elements;if(!a||d.length!=a.length)return!1;for(var b=0;b<d.length;b++)if(!d[b].equals(a[b]))return!1;return!0},contains:function(a,d,b){var c;"string"==typeof a&&(c=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?c=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?c=function(b){return-1<CKEDITOR.tools.indexOf(a,b.getName())}:"function"==typeof a?c=a:"object"==typeof a&&(c=function(b){return b.getName()in
496
496
  a});var e=this.elements,g=e.length;d&&g--;b&&(e=Array.prototype.slice.call(e,0),e.reverse());for(d=0;d<g;d++)if(c(e[d]))return e[d];return null},isContextFor:function(a){var d;return a in CKEDITOR.dtd.$block?(d=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!d.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};
497
497
  CKEDITOR.dom.text=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createTextNode(a));this.$=a};CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node;
498
498
  CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var d=this.$.parentNode,b=d.childNodes.length,c=this.getLength(),e=this.getDocument(),g=new CKEDITOR.dom.text(this.$.splitText(a),e);d.childNodes.length==b&&(a>=c?(g=e.createText(""),g.insertAfter(this)):(a=e.createText(""),a.insertAfter(g),a.remove()));return g},substring:function(a,
499
499
  d){return"number"!=typeof d?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,d)}});
500
- (function(){function a(a,c,d){var g=a.serializable,h=c[d?"endContainer":"startContainer"],l=d?"endOffset":"startOffset",m=g?c.document.getById(a.startNode):a.startNode;a=g?c.document.getById(a.endNode):a.endNode;h.equals(m.getPrevious())?(c.startOffset=c.startOffset-h.getLength()-a.getPrevious().getLength(),h=a.getNext()):h.equals(a.getPrevious())&&(c.startOffset-=h.getLength(),h=a.getNext());h.equals(m.getParent())&&c[l]++;h.equals(a.getParent())&&c[l]++;c[d?"endContainer":"startContainer"]=h;return c}
501
- CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,d)};var d={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],g;return{getNextRange:function(h){g=void 0===g?0:g+1;var l=a[g];if(l&&1<a.length){if(!g)for(var m=a.length-1;0<=m;m--)d.unshift(a[m].createBookmark(!0));if(h)for(var r=0;a[g+r+1];){var f=l.document;h=0;m=f.getById(d[r].endNode);for(f=f.getById(d[r+1].startNode);;){m=
502
- m.getNextSourceNode(!1);if(f.equals(m))h=1;else if(c(m)||m.type==CKEDITOR.NODE_ELEMENT&&m.isBlockBoundary())continue;break}if(!h)break;r++}for(l.moveToBookmark(d.shift());r--;)m=a[++g],m.moveToBookmark(d.shift()),l.setEnd(m.endContainer,m.endOffset)}return l}}},createBookmarks:function(b){for(var c=[],d,g=0;g<this.length;g++){c.push(d=this[g].createBookmark(b,!0));for(var h=g+1;h<this.length;h++)this[h]=a(d,this[h]),this[h]=a(d,this[h],!0)}return c},createBookmarks2:function(a){for(var c=[],d=0;d<
500
+ (function(){function a(a,c,d){var g=a.serializable,k=c[d?"endContainer":"startContainer"],h=d?"endOffset":"startOffset",p=g?c.document.getById(a.startNode):a.startNode;a=g?c.document.getById(a.endNode):a.endNode;k.equals(p.getPrevious())?(c.startOffset=c.startOffset-k.getLength()-a.getPrevious().getLength(),k=a.getNext()):k.equals(a.getPrevious())&&(c.startOffset-=k.getLength(),k=a.getNext());k.equals(p.getParent())&&c[h]++;k.equals(a.getParent())&&c[h]++;c[d?"endContainer":"startContainer"]=k;return c}
501
+ CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,d)};var d={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],g;return{getNextRange:function(k){g=void 0===g?0:g+1;var h=a[g];if(h&&1<a.length){if(!g)for(var p=a.length-1;0<=p;p--)d.unshift(a[p].createBookmark(!0));if(k)for(var r=0;a[g+r+1];){var f=h.document;k=0;p=f.getById(d[r].endNode);for(f=f.getById(d[r+1].startNode);;){p=
502
+ p.getNextSourceNode(!1);if(f.equals(p))k=1;else if(c(p)||p.type==CKEDITOR.NODE_ELEMENT&&p.isBlockBoundary())continue;break}if(!k)break;r++}for(h.moveToBookmark(d.shift());r--;)p=a[++g],p.moveToBookmark(d.shift()),h.setEnd(p.endContainer,p.endOffset)}return h}}},createBookmarks:function(b){for(var c=[],d,g=0;g<this.length;g++){c.push(d=this[g].createBookmark(b,!0));for(var k=g+1;k<this.length;k++)this[k]=a(d,this[k]),this[k]=a(d,this[k],!0)}return c},createBookmarks2:function(a){for(var c=[],d=0;d<
503
503
  this.length;d++)c.push(this[d].createBookmark2(a));return c},moveToBookmarks:function(a){for(var c=0;c<this.length;c++)this[c].moveToBookmark(a[c])}}})();
504
504
  (function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function d(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=0,g;e<c.length;e++)if(g=c[e],d.ie&&(g.replace(/^ie/,"")==d.version||d.quirks&&"iequirks"==g)&&(g="ie"),d[g]){b+="_"+c[e];break}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){g[a]||(CKEDITOR.document.appendStyleSheet(d(a)),g[a]=1);b&&b()}function c(a){var b=
505
- a.getById(h);b||(b=a.getHead().append("style"),b.setAttribute("id",h),b.setAttribute("type","text/css"));return b}function e(a,b,c){var d,e,g;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),e=0;e<b.length;e++)b[e]=b[e].split("{");for(var h=0;h<a.length;h++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){g=b[e][1];for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);a[h].$.sheet.addRule(b[e][0],g)}else{g=b;for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?
505
+ a.getById(k);b||(b=a.getHead().append("style"),b.setAttribute("id",k),b.setAttribute("type","text/css"));return b}function e(a,b,c){var d,e,g;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),e=0;e<b.length;e++)b[e]=b[e].split("{");for(var h=0;h<a.length;h++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){g=b[e][1];for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);a[h].$.sheet.addRule(b[e][0],g)}else{g=b;for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?
506
506
  a[h].$.styleSheet.cssText+=g:a[h].$.innerHTML+=g}}var g={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(d(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,e){var g;a&&(a=a.toLowerCase(),b&&(g=this.icons[a+"-rtl"]),
507
507
  g||(g=this.icons[a]));a=c||g&&g.path||"";d=d||g&&g.offset;e=e||g&&g.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,d="",g="";"function"==typeof c&&(d=c(this,"editor"),g=
508
- c(this,"panel"));a=[[m,a]];e([b],d,a);e(l,g,a)}).call(this,a)}});var h="cke_ui_color",l=[],m=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);l.push(a);var d=b.getUiColor();d&&e([a],CKEDITOR.skin.chameleon(b,"panel"),[[m,d]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})();
508
+ c(this,"panel"));a=[[p,a]];e([b],d,a);e(h,g,a)}).call(this,a)}});var k="cke_ui_color",h=[],p=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);h.push(a);var d=b.getUiColor();d&&e([a],CKEDITOR.skin.chameleon(b,"panel"),[[p,d]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})();
509
509
  (function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var d=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!d||d!=b)}catch(c){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");
510
510
  CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,d=0;d<a.length;d++)CKEDITOR.editor.prototype.constructor.apply(a[d][0],a[d][1]),CKEDITOR.add(a[d][0])})();/*
511
- Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
511
+ Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
512
512
  For licensing, see LICENSE.md or http://ckeditor.com/license
513
513
  */
514
514
  CKEDITOR.skin.name="moono-lisa";CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie8";
@@ -620,7 +620,7 @@ arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],c,d=C
620
620
  notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},
621
621
  notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in z)z[c].remove();z={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,e=CKEDITOR.dialog._.dialogDefinitions[a];null===CKEDITOR.dialog._.currentTop&&N(this);if("function"==typeof e)c=
622
622
  this._.storedDialogs||(this._.storedDialogs={}),c=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),b&&b.call(c,c),c.show();else{if("failed"==e)throw O(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof e&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})})();
623
- CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(x){x.on("doubleclick",function(A){A.data.dialog&&x.openDialog(A.data.dialog)},null,null,999)}});CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var b=a.addCommand("about",new CKEDITOR.dialogCommand("about"));b.modes={wysiwyg:1,source:1};b.canUndo=!1;b.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.title,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}});(function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(b){var c=this;b.addCommand("a11yHelp",{exec:function(){var a=b.langCode,
623
+ CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(x){x.on("doubleclick",function(A){A.data.dialog&&x.openDialog(A.data.dialog)},null,null,999)}});CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var b=a.addCommand("about",new CKEDITOR.dialogCommand("about"));b.modes={wysiwyg:1,source:1};b.canUndo=!1;b.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.title,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}});(function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(b){var c=this;b.addCommand("a11yHelp",{exec:function(){var a=b.langCode,
624
624
  a=c.availableLangs[a]?a:c.availableLangs[a.replace(/-.*/,"")]?a.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c.path+"dialogs/lang/"+a+".js"),function(){b.lang.a11yhelp=c.langEntries[a];b.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});b.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");b.on("ariaEditorHelpLabel",function(a){a.data.label=b.lang.common.editorHelp})}})})();(function(){function f(c){var a=this.att;c=c&&c.hasAttribute(a)&&c.getAttribute(a)||"";void 0!==c&&this.setValue(c)}function g(){for(var c,a=0;a<arguments.length;a++)if(arguments[a]instanceof CKEDITOR.dom.element){c=arguments[a];break}if(c){var a=this.att,b=this.getValue();b?c.setAttribute(a,b):c.removeAttribute(a,b)}}var k={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(c){c||(c=k);var a=[];c.id&&a.push("id");c.dir&&a.push("dir");var b=
625
625
  "";a.length&&(b+="["+a.join(",")+"]");c.classes&&(b+="(*)");c.styles&&(b+="{*}");return b},createAdvancedTab:function(c,a,b){a||(a=k);var d=c.lang.common,h={id:"advanced",label:d.advancedTab,title:d.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},e=[];if(a.id||a.dir)a.id&&e.push({id:"advId",att:"id",type:"text",requiredContent:b?b+"[id]":null,label:d.id,setup:f,commit:g}),a.dir&&e.push({id:"advLangDir",att:"dir",type:"select",requiredContent:b?b+"[dir]":null,label:d.langDir,"default":"",
626
626
  style:"width:100%",items:[[d.notSet,""],[d.langDirLTR,"ltr"],[d.langDirRTL,"rtl"]],setup:f,commit:g}),h.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(e)});if(a.styles||a.classes)e=[],a.styles&&e.push({id:"advStyles",att:"style",type:"text",requiredContent:b?b+"{cke-xyz}":null,label:d.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(d.invalidInlineStyle),onChange:function(){},getStyle:function(a,c){var b=this.getValue().match(new RegExp("(?:^|;)\\s*"+
@@ -642,47 +642,48 @@ tr:1,ol:1,ul:1};a[d.getName()];)d=d.getParent();for(b=null;0<e.length;){for(a=e.
642
642
  for(d={};a=f.getNextParagraph();){for(e=c=null;a.getParent();){if("blockquote"==a.getParent().getName()){c=a.getParent();e=a;break}a=a.getParent()}c&&e&&!e.getCustomData("blockquote_moveout")&&(b.push(e),CKEDITOR.dom.element.setMarker(d,e,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(d);a=[];e=[];for(d={};0<b.length;)f=b.shift(),c=f.getParent(),f.getPrevious()?f.getNext()?(f.breakParent(f.getParent()),e.push(f.getNext())):f.remove().insertAfter(c):f.remove().insertBefore(c),c.getCustomData("blockquote_processed")||
643
643
  (e.push(c),CKEDITOR.dom.element.setMarker(d,c,"blockquote_processed",!0)),a.push(f);CKEDITOR.dom.element.clearAllMarkers(d);for(b=e.length-1;0<=b;b--){c=e[b];a:{d=c;for(var f=0,m=d.getChildCount(),l=void 0;f<m&&(l=d.getChild(f));f++)if(l.type==CKEDITOR.NODE_ELEMENT&&l.isBlockBoundary()){d=!1;break a}d=!0}d&&c.remove()}if(g.config.enterMode==CKEDITOR.ENTER_BR)for(c=!0;a.length;)if(f=a.shift(),"div"==f.getName()){b=new CKEDITOR.dom.documentFragment(g.document);!c||!f.getPrevious()||f.getPrevious().type==
644
644
  CKEDITOR.NODE_ELEMENT&&f.getPrevious().isBlockBoundary()||b.append(g.document.createElement("br"));for(c=f.getNext()&&!(f.getNext().type==CKEDITOR.NODE_ELEMENT&&f.getNext().isBlockBoundary());f.getFirst();)f.getFirst().remove().appendTo(b);c&&b.append(g.document.createElement("br"));b.replace(f);c=!1}}k.selectBookmarks(h);g.focus()}},refresh:function(g,a){this.setState(g.elementPath(a.block||a.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",
645
- requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(g){g.blockless||(g.addCommand("blockquote",m),g.ui.addButton&&g.ui.addButton("Blockquote",{label:g.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})})();(function(){function r(b,a,c){a.type||(a.type="auto");if(c&&!1===b.fire("beforePaste",a)||!a.dataValue&&a.dataTransfer.isEmpty())return!1;a.dataValue||(a.dataValue="");if(CKEDITOR.env.gecko&&"drop"==a.method&&b.toolbox)b.once("afterPaste",function(){b.toolbox.focus()});return b.fire("paste",a)}function y(b){function a(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(a){b.readOnly&&"cut"==a.name||n.initPasteDataTransfer(a,b);a.data.preventDefault()};a.on("copy",
646
- d);a.on("cut",d);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(n.mainPasteEvent,function(b){"beforepaste"==n.mainPasteEvent&&p||k(b)});"beforepaste"==n.mainPasteEvent&&(a.on("paste",function(a){v||(e(),a.data.preventDefault(),k(a),f("paste")||b.openDialog("paste"))}),a.on("contextmenu",g,null,null,0),a.on("beforepaste",function(b){!b.data||b.data.$.ctrlKey||b.data.$.shiftKey||g()},null,null,0));a.on("beforecut",function(){!p&&h(b)});var c;a.attachListener(CKEDITOR.env.ie?
647
- a:b.document.getDocumentElement(),"mouseup",function(){c=setTimeout(function(){t()},0)});b.on("destroy",function(){clearTimeout(c)});a.on("keyup",t)}function c(a){return{type:a,canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&h();var a;var d=this.type;if(CKEDITOR.env.ie)a=f(d);else try{a=b.document.$.execCommand(d,!1,null)}catch(c){a=!1}a||b.showNotification(b.lang.clipboard[this.type+"Error"]);return a}}}function d(){return{canUndo:!1,
648
- async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(b,a){var d=this,c=function(a,c){a&&r(b,a,!!c);b.fire("afterCommandExec",{name:"paste",command:d,returnValue:!!a})};"string"==typeof a?c({dataValue:a,method:"paste",dataTransfer:n.initPasteDataTransfer()},1):b.getClipboardData(c)}}}function e(){v=1;setTimeout(function(){v=0},100)}function g(){p=1;setTimeout(function(){p=0},10)}function f(a){var d=b.document,c=d.getBody(),e=!1,f=function(){e=!0};c.on(a,f);7<CKEDITOR.env.version?d.$.execCommand(a):
649
- d.$.selection.createRange().execCommand(a);c.removeListener(a,f);return e}function h(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),d,c,e;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(d=a.getSelectedElement())&&(c=a.getRanges()[0],e=b.document.createText(""),e.insertBefore(d),c.setStartBefore(e),c.setEndAfter(d),a.selectRanges([c]),setTimeout(function(){d.getParent()&&(e.remove(),a.selectElement(d))},0))}}function l(a,d){var c=b.document,e=b.editable(),f=function(b){b.cancel()},q;
650
- if(!c.getById("cke_pastebin")){var g=b.getSelection(),h=g.createBookmarks();CKEDITOR.env.ie&&g.root.fire("selectionchange");var m=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!e.is("body")||CKEDITOR.env.ie?"div":"body",c);m.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var k=0,c=c.getWindow();CKEDITOR.env.webkit?(e.append(m),m.addClass("cke_editable"),e.is("body")||(k="static"!=e.getComputedStyle("position")?e:CKEDITOR.dom.element.get(e.$.offsetParent),k=k.getDocumentPosition().y)):e.getAscendant(CKEDITOR.env.ie?
651
- "body":"html",1).append(m);m.setStyles({position:"absolute",top:c.getScrollPosition().y-k+10+"px",width:"1px",height:Math.max(1,c.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&m.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(k=m.getParent().isReadOnly())?(m.setOpacity(0),m.setAttribute("contenteditable",!0)):m.setStyle("ltr"==b.config.contentsLangDirection?"left":"right","-10000px");b.on("selectionChange",f,null,null,0);if(CKEDITOR.env.webkit||
652
- CKEDITOR.env.gecko)q=e.once("blur",f,null,null,-100);k&&m.focus();k=new CKEDITOR.dom.range(m);k.selectNodeContents(m);var t=k.select();CKEDITOR.env.ie&&(q=e.once("blur",function(){b.lockSelection(t)}));var l=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=l);q&&q.removeListener();CKEDITOR.env.ie&&e.focus();g.selectBookmarks(h);m.remove();var a;CKEDITOR.env.webkit&&(a=m.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&
653
- (m=a);b.removeListener("selectionChange",f);d(m.getHtml())},0)}}function z(){if("paste"==n.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();e();var a=b.focusManager;a.lock();if(b.editable().fire(n.mainPasteEvent)&&!f("paste"))return a.unlock(),!1;a.unlock();return!0}function q(a){if("wysiwyg"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=b.editable();e();"paste"==n.mainPasteEvent&&a.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
654
- 46:b.fire("saveSnapshot"),setTimeout(function(){b.fire("saveSnapshot")},50)}}function k(a){var d={type:"auto",method:"paste",dataTransfer:n.initPasteDataTransfer(a)};d.dataTransfer.cacheData();var c=!1!==b.fire("beforePaste",d);c&&n.canClipboardApiBeTrusted(d.dataTransfer,b)?(a.data.preventDefault(),setTimeout(function(){r(b,d)},0)):l(a,function(a){d.dataValue=a.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");c&&r(b,d)})}function t(){if("wysiwyg"==b.mode){var a=u("paste");b.getCommand("cut").setState(u("cut"));
655
- b.getCommand("copy").setState(u("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function u(a){if(w&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var d=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var n=CKEDITOR.plugins.clipboard,p=0,v=0,w=0;(function(){b.on("key",q);b.on("contentDom",a);b.on("selectionChange",function(b){w=
656
- b.data.selection.getRanges()[0].checkReadOnly();t()});b.contextMenu&&b.contextMenu.addListener(function(b,a){w=a.getRanges()[0].checkReadOnly();return{cut:u("cut"),copy:u("copy"),paste:u("paste")}})})();(function(){function a(d,c,e,f,q){var g=b.lang.clipboard[c];b.addCommand(c,e);b.ui.addButton&&b.ui.addButton(d,{label:g,command:c,toolbar:"clipboard,"+f});b.addMenuItems&&b.addMenuItem(c,{label:g,command:c,group:"clipboard",order:q})}a("Cut","cut",c("cut"),10,1);a("Copy","copy",c("copy"),20,4);a("Paste",
657
- "paste",d(),30,8)})();b.getClipboardData=function(a,d){function c(a){a.removeListener();a.cancel();d(a.data)}function e(a){a.removeListener();a.cancel();k=!0;d({type:g,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}function f(){this.customTitle=a&&a.title}var q=!1,g="auto",k=!1;d||(d=a,a=null);b.on("paste",c,null,null,0);b.on("beforePaste",function(a){a.removeListener();q=!0;g=a.data.type},null,null,1E3);!1===z()&&(b.removeListener("paste",c),q&&b.fire("pasteDialog",
658
- f)?(b.on("pasteDialogCommit",e),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){k||d(null)},10)})):d(null))}}function A(b){if(CKEDITOR.env.webkit){if(!b.match(/^[^<]*$/g)&&!b.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!b.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!b.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!b.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";
645
+ requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(g){g.blockless||(g.addCommand("blockquote",m),g.ui.addButton&&g.ui.addButton("Blockquote",{label:g.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})})();(function(){function q(b,a,c){a.type||(a.type="auto");if(c&&!1===b.fire("beforePaste",a)||!a.dataValue&&a.dataTransfer.isEmpty())return!1;a.dataValue||(a.dataValue="");if(CKEDITOR.env.gecko&&"drop"==a.method&&b.toolbox)b.once("afterPaste",function(){b.toolbox.focus()});return b.fire("paste",a)}function z(b){function a(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var c=function(a){b.readOnly&&"cut"==a.name||m.initPasteDataTransfer(a,b);a.data.preventDefault()};a.on("copy",
646
+ c);a.on("cut",c);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(m.mainPasteEvent,function(b){"beforepaste"==m.mainPasteEvent&&p||u(b)});"beforepaste"==m.mainPasteEvent&&(a.on("paste",function(a){v||(f(),a.data.preventDefault(),u(a),d("paste")||b.openDialog("paste"))}),a.on("contextmenu",g,null,null,0),a.on("beforepaste",function(b){!b.data||b.data.$.ctrlKey||b.data.$.shiftKey||g()},null,null,0));a.on("beforecut",function(){!p&&h(b)});var e;a.attachListener(CKEDITOR.env.ie?
647
+ a:b.document.getDocumentElement(),"mouseup",function(){e=setTimeout(function(){r()},0)});b.on("destroy",function(){clearTimeout(e)});a.on("keyup",r)}function c(a){return{type:a,canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&h();var a;var c=this.type;if(CKEDITOR.env.ie)a=d(c);else try{a=b.document.$.execCommand(c,!1,null)}catch(g){a=!1}a||b.showNotification(b.lang.clipboard[this.type+"Error"]);return a}}}function e(){return{canUndo:!1,
648
+ async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(b,a){var c=this,d=function(a,d){a&&q(b,a,!!d);b.fire("afterCommandExec",{name:"paste",command:c,returnValue:!!a})};"string"==typeof a?d({dataValue:a,method:"paste",dataTransfer:m.initPasteDataTransfer()},1):b.getClipboardData(d)}}}function f(){v=1;setTimeout(function(){v=0},100)}function g(){p=1;setTimeout(function(){p=0},10)}function d(a){var c=b.document,d=c.getBody(),g=!1,e=function(){g=!0};d.on(a,e);7<CKEDITOR.env.version?c.$.execCommand(a):
649
+ c.$.selection.createRange().execCommand(a);d.removeListener(a,e);return g}function h(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),c,d,g;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=a.getSelectedElement())&&(d=a.getRanges()[0],g=b.document.createText(""),g.insertBefore(c),d.setStartBefore(g),d.setEndAfter(c),a.selectRanges([d]),setTimeout(function(){c.getParent()&&(g.remove(),a.selectElement(c))},0))}}function n(a,c){var d=b.document,g=b.editable(),e=function(b){b.cancel()},h;
650
+ if(!d.getById("cke_pastebin")){var k=b.getSelection(),u=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var l=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!g.is("body")||CKEDITOR.env.ie?"div":"body",d);l.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var f=0,d=d.getWindow();CKEDITOR.env.webkit?(g.append(l),l.addClass("cke_editable"),g.is("body")||(f="static"!=g.getComputedStyle("position")?g:CKEDITOR.dom.element.get(g.$.offsetParent),f=f.getDocumentPosition().y)):g.getAscendant(CKEDITOR.env.ie?
651
+ "body":"html",1).append(l);l.setStyles({position:"absolute",top:d.getScrollPosition().y-f+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&l.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(f=l.getParent().isReadOnly())?(l.setOpacity(0),l.setAttribute("contenteditable",!0)):l.setStyle("ltr"==b.config.contentsLangDirection?"left":"right","-10000px");b.on("selectionChange",e,null,null,0);if(CKEDITOR.env.webkit||
652
+ CKEDITOR.env.gecko)h=g.once("blur",e,null,null,-100);f&&l.focus();f=new CKEDITOR.dom.range(l);f.selectNodeContents(l);var n=f.select();CKEDITOR.env.ie&&(h=g.once("blur",function(){b.lockSelection(n)}));var r=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=r);h&&h.removeListener();CKEDITOR.env.ie&&g.focus();k.selectBookmarks(u);l.remove();var a;CKEDITOR.env.webkit&&(a=l.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&
653
+ (l=a);b.removeListener("selectionChange",e);c(l.getHtml())},0)}}function w(){if("paste"==m.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();f();var a=b.focusManager;a.lock();if(b.editable().fire(m.mainPasteEvent)&&!d("paste"))return a.unlock(),!1;a.unlock();return!0}function k(a){if("wysiwyg"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=b.editable();f();"paste"==m.mainPasteEvent&&a.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
654
+ 46:b.fire("saveSnapshot"),setTimeout(function(){b.fire("saveSnapshot")},50)}}function u(a){var c={type:"auto",method:"paste",dataTransfer:m.initPasteDataTransfer(a)};c.dataTransfer.cacheData();var d=!1!==b.fire("beforePaste",c);d&&m.canClipboardApiBeTrusted(c.dataTransfer,b)?(a.data.preventDefault(),setTimeout(function(){q(b,c)},0)):n(a,function(a){c.dataValue=a.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&q(b,c)})}function r(){if("wysiwyg"==b.mode){var a=t("paste");b.getCommand("cut").setState(t("cut"));
655
+ b.getCommand("copy").setState(t("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function t(a){if(x&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var c=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var m=CKEDITOR.plugins.clipboard,p=0,v=0,x=0;(function(){b.on("key",k);b.on("contentDom",a);b.on("selectionChange",function(b){x=
656
+ b.data.selection.getRanges()[0].checkReadOnly();r()});b.contextMenu&&b.contextMenu.addListener(function(b,a){x=a.getRanges()[0].checkReadOnly();return{cut:t("cut"),copy:t("copy"),paste:t("paste")}})})();(function(){function a(c,d,g,e,h){var k=b.lang.clipboard[d];b.addCommand(d,g);b.ui.addButton&&b.ui.addButton(c,{label:k,command:d,toolbar:"clipboard,"+e});b.addMenuItems&&b.addMenuItem(d,{label:k,command:d,group:"clipboard",order:h})}a("Cut","cut",c("cut"),10,1);a("Copy","copy",c("copy"),20,4);a("Paste",
657
+ "paste",e(),30,8)})();b.getClipboardData=function(a,c){function d(a){a.removeListener();a.cancel();c(a.data)}function g(a){a.removeListener();a.cancel();f=!0;c({type:k,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}function e(){this.customTitle=a&&a.title}var h=!1,k="auto",f=!1;c||(c=a,a=null);b.on("paste",d,null,null,0);b.on("beforePaste",function(a){a.removeListener();h=!0;k=a.data.type},null,null,1E3);!1===w()&&(b.removeListener("paste",d),h&&b.fire("pasteDialog",
658
+ e)?(b.on("pasteDialogCommit",g),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",g);setTimeout(function(){f||c(null)},10)})):c(null))}}function A(b){if(CKEDITOR.env.webkit){if(!b.match(/^[^<]*$/g)&&!b.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!b.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!b.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!b.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";
659
659
  return"htmlifiedtext"}function B(b,a){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}a=a.replace(/\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");a=a.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(a.match(/^[^<]$/))return a;CKEDITOR.env.webkit&&-1<a.indexOf("\x3cdiv\x3e")&&(a=a.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),
660
660
  a.match(/<div>(<br>|)<\/div>/)&&(a="\x3cp\x3e"+a.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),a=a.replace(/<\/div><div>/g,"\x3cbr\x3e"),a=a.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(a=a.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<a.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(a="\x3cp\x3e"+a.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return C(b,a)}function D(){function b(){var a=
661
- {},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var a={};return{get:function(c){return"plain-text"==c?a.plainText||(a.plainText=new CKEDITOR.filter("br")):"semantic-content"==c?((c=a.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),c=a.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function x(b,a,c){a=CKEDITOR.htmlParser.fragment.fromHtml(a);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(a,!0,!1,
662
- b.activeEnterMode);a.writeHtml(d);return d.getHtml()}function C(b,a){b.enterMode==CKEDITOR.ENTER_BR?a=a.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):b.enterMode==CKEDITOR.ENTER_DIV&&(a=a.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return a}function E(b){b.data.preventDefault();b.data.$.dataTransfer.dropEffect="none"}function F(b){var a=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function c(a,d,c){d.select();r(b,{dataTransfer:c,
663
- method:"drop"},1);c.sourceEditor.fire("saveSnapshot");c.sourceEditor.editable().extractHtmlFromRange(a);c.sourceEditor.getSelection().selectRanges([a]);c.sourceEditor.fire("saveSnapshot")}function d(d,c){d.select();r(b,{dataTransfer:c,method:"drop"},1);a.resetDragDataTransfer()}function e(a,d,c){var e={$:a.data.$,target:a.data.getTarget()};d&&(e.dragRange=d);c&&(e.dropRange=c);!1===b.fire(a.name,e)&&a.data.preventDefault()}function g(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}
664
- var f=b.editable(),h=CKEDITOR.plugins.clipboard.getDropTarget(b),l=b.ui.space("top"),p=b.ui.space("bottom");a.preventDefaultDropOnElement(l);a.preventDefaultDropOnElement(p);f.attachListener(h,"dragstart",e);f.attachListener(b,"dragstart",a.resetDragDataTransfer,a,null,1);f.attachListener(b,"dragstart",function(d){a.initDragDataTransfer(d,b)},null,null,2);f.attachListener(b,"dragstart",function(){var d=a.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(a.dragStartContainerChildCount=
665
- d?g(d.startContainer):null,a.dragEndContainerChildCount=d?g(d.endContainer):null)},null,null,100);f.attachListener(h,"dragend",e);f.attachListener(b,"dragend",a.initDragDataTransfer,a,null,1);f.attachListener(b,"dragend",a.resetDragDataTransfer,a,null,100);f.attachListener(h,"dragover",function(a){var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()});
666
- f.attachListener(h,"drop",function(d){if(!d.data.$.defaultPrevented){d.data.preventDefault();var c=d.data.getTarget();if(!c.isReadOnly()||c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){var c=a.getRangeAtDropPosition(d,b),f=a.dragRange;c&&e(d,f,c)}}},null,null,9999);f.attachListener(b,"drop",a.initDragDataTransfer,a,null,1);f.attachListener(b,"drop",function(e){if(e=e.data){var f=e.dropRange,g=e.dragRange,h=e.dataTransfer;h.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){a.internalDrop(g,
667
- f,h,b)},0):h.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(g,f,h):d(f,h)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(b){var a,c=D();b.config.forcePasteAsPlainText?a="plain-text":b.config.pasteFilter?a=b.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in b.config||(a="semantic-content");b.pasteFilter=c.get(a);y(b);F(b);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));b.on("paste",function(a){a.data.dataTransfer||
668
- (a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var c=a.data.dataTransfer,g=c.getData("text/html");if(g)a.data.dataValue=g,a.data.type="html";else if(g=c.getData("text/plain"))a.data.dataValue=b.editable().transformPlainTextToHtml(g),a.data.type="text"}},null,null,1);b.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,
669
- function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var f,h,l=new CKEDITOR.dom.element("div");for(l.setHtml(b);1==l.getChildCount()&&(f=l.getFirst())&&f.type==CKEDITOR.NODE_ELEMENT&&(f.hasClass("cke_editable")||
670
- f.hasClass("cke_contents"));)l=h=f;h&&(b=h.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,f){return f.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+f):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,f){return f in c?(a.data.endsWithEOL=1,"\x3c/"+f+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);b.on("paste",function(a){a=a.data;var e=a.type,g=a.dataValue,f,h=b.config.clipboard_defaultContentType||
671
- "html",l=a.dataTransfer.getTransferType(b);f="html"==e||"html"==a.preSniffing?"html":A(g);"htmlifiedtext"==f&&(g=B(b.config,g));"text"==e&&"html"==f?g=x(b,g,c.get("plain-text")):l==CKEDITOR.DATA_TRANSFER_EXTERNAL&&b.pasteFilter&&!a.dontFilter&&(g=x(b,g,b.pasteFilter));a.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);a.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==f||"html"==h?"html":"text");a.type=e;a.dataValue=g;delete a.preSniffing;delete a.startsWithEOL;delete a.endsWithEOL},
672
- null,null,6);b.on("paste",function(a){a=a.data;a.dataValue&&(b.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){b.fire("afterPaste")},0))},null,null,1E3);b.on("pasteDialog",function(a){setTimeout(function(){b.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?
673
- "beforepaste":"paste",canClipboardApiBeTrusted:function(b,a){return b.getTransferType(a)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!b.isEmpty()||CKEDITOR.env.gecko&&(b.getData("text/html")||b.getFilesCount())?!0:!1},getDropTarget:function(b){var a=b.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||a.isInline()?a:b.document},fixSplitNodesAfterDrop:function(b,a,c,d){function e(b,c,d){var e=b;e.type==CKEDITOR.NODE_TEXT&&(e=b.getParent());if(e.equals(c)&&d!=c.getChildCount())return b=
674
- a.startContainer.getChild(a.startOffset-1),c=a.startContainer.getChild(a.startOffset),b&&b.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=b.getLength(),b.setText(b.getText()+c.getText()),c.remove(),a.setStart(b,d),a.collapse(!0)),!0}var g=a.startContainer;"number"==typeof d&&"number"==typeof c&&g.type==CKEDITOR.NODE_ELEMENT&&(e(b.startContainer,g,c)||e(b.endContainer,g,d))},isDropRangeAffectedByDragRange:function(b,a){var c=a.startContainer,d=a.endOffset;return b.endContainer.equals(c)&&
675
- b.endOffset<=d||b.startContainer.getParent().equals(c)&&b.startContainer.getIndex()<d||b.endContainer.getParent().equals(c)&&b.endContainer.getIndex()<d?!0:!1},internalDrop:function(b,a,c,d){var e=CKEDITOR.plugins.clipboard,g=d.editable(),f,h;d.fire("saveSnapshot");d.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,a,e.dragStartContainerChildCount,e.dragEndContainerChildCount);(h=this.isDropRangeAffectedByDragRange(b,a))||(f=b.createBookmark(!1));
676
- e=a.clone().createBookmark(!1);h&&(f=b.createBookmark(!1));b=f.startNode;a=f.endNode;h=e.startNode;a&&b.getPosition(h)&CKEDITOR.POSITION_PRECEDING&&a.getPosition(h)&CKEDITOR.POSITION_FOLLOWING&&h.insertBefore(b);b=d.createRange();b.moveToBookmark(f);g.extractHtmlFromRange(b,1);a=d.createRange();a.moveToBookmark(e);r(d,{dataTransfer:c,method:"drop",range:a},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(b,a){var c=b.data.$,d=c.clientX,e=c.clientY,g=a.getSelection(!0).getRanges()[0],f=
677
- a.createRange();if(b.data.testRange)return b.data.testRange;if(document.caretRangeFromPoint)c=a.document.$.caretRangeFromPoint(d,e),f.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),f.collapse(!0);else if(c.rangeParent)f.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),f.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&g&&a.editable().hasFocus)return g;if(document.body.createTextRange){a.focus();c=a.document.getBody().$.createTextRange();try{for(var h=!1,l=0;20>l&&
678
- !h;l++){if(!h)try{c.moveToPoint(d,e-l),h=!0}catch(p){}if(!h)try{c.moveToPoint(d,e+l),h=!0}catch(q){}}if(h){var k="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+k+'"\x3e​\x3c/span\x3e');var t=a.document.getById(k);f.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START);t.remove()}else{var u=a.document.$.elementFromPoint(d,e),n=new CKEDITOR.dom.element(u),r;if(n.equals(a.editable())||"html"==n.getName())return g&&g.startContainer&&!g.startContainer.equals(a.editable())?g:null;r=n.getClientRect();
679
- d<r.left?f.setStartAt(n,CKEDITOR.POSITION_AFTER_START):f.setStartAt(n,CKEDITOR.POSITION_BEFORE_END);f.collapse(!0)}}catch(v){return null}}else return null}return f},initDragDataTransfer:function(b,a){var c=b.data.$?b.data.$.dataTransfer:null,d=new this.dataTransfer(c,a);c?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData?d=this.dragData:this.dragData=d;b.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(b,a){if(this.isCustomCopyCutSupported){if(b&&
680
- b.data&&b.data.$){var c=new this.dataTransfer(b.data.$.clipboardData,a);this.copyCutData&&c.id==this.copyCutData.id?(c=this.copyCutData,c.$=b.data.$.clipboardData):this.copyCutData=c;return c}return new this.dataTransfer(null,a)}return new this.dataTransfer(CKEDITOR.env.edge&&b&&b.data.$&&b.data.$.clipboardData||null,a)},preventDefaultDropOnElement:function(b){b&&b.on("dragover",E)}};var p=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=
681
- function(b,a){b&&(this.$=b);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(p);this.id||(this.id="Text"==p?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=p)try{this.$.setData(p,this.id)}catch(c){}a&&(this.sourceEditor=a,this.setData("text/html",a.getSelectedHtml(1)),"Text"==
682
- p||this.getData("text/plain")||this.setData("text/plain",a.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(b){b=this._.normalizeType(b);var a=this._.data[b];if(void 0===a||null===a||""===a)try{a=this.$.getData(b)}catch(c){}if(void 0===a||null===a||""===a)a="";"text/html"==b?(a=a.replace(this._.metaRegExp,""),(b=this._.bodyRegExp.exec(a))&&
683
- b.length&&(a=b[1],a=a.replace(this._.fragmentRegExp,""))):"Text"==b&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==a.substring(0,7)&&(a="");return a},setData:function(b,a){b=this._.normalizeType(b);this._.data[b]=a;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==b||"Text"==b){"Text"==p&&"Text"==b&&(this.id=a);try{this.$.setData(b,a)}catch(c){}}},getTransferType:function(b){return this.sourceEditor?this.sourceEditor==b?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:
684
- CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function b(b){b=a._.normalizeType(b);var c=a.getData(b);c&&(a._.data[b]=c)}if(this.$){var a=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)b(this.$.types[c])}else b("Text"),b("URL");d=this._getImageFromClipboard();if(this.$&&this.$.files||d){this._.files=[];if(this.$.files&&this.$.files.length)for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);0===this._.files.length&&
685
- d&&this._.files.push(d)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(b){return this._.files.length?this._.files[b]:this.$&&this.$.files&&this.$.files.length?this.$.files[b]:0===b?this._getImageFromClipboard():void 0},isEmpty:function(){var b={},a;if(this.getFilesCount())return!1;for(a in this._.data)b[a]=1;if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var c=
661
+ {},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var a={};return{get:function(c){return"plain-text"==c?a.plainText||(a.plainText=new CKEDITOR.filter("br")):"semantic-content"==c?((c=a.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),c=a.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function y(b,a,c){a=CKEDITOR.htmlParser.fragment.fromHtml(a);var e=new CKEDITOR.htmlParser.basicWriter;c.applyTo(a,!0,!1,
662
+ b.activeEnterMode);a.writeHtml(e);return e.getHtml()}function C(b,a){b.enterMode==CKEDITOR.ENTER_BR?a=a.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):b.enterMode==CKEDITOR.ENTER_DIV&&(a=a.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return a}function E(b){b.data.preventDefault();b.data.$.dataTransfer.dropEffect="none"}function F(b){var a=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function c(a,c,d){c.select();q(b,{dataTransfer:d,
663
+ method:"drop"},1);d.sourceEditor.fire("saveSnapshot");d.sourceEditor.editable().extractHtmlFromRange(a);d.sourceEditor.getSelection().selectRanges([a]);d.sourceEditor.fire("saveSnapshot")}function e(d,c){d.select();q(b,{dataTransfer:c,method:"drop"},1);a.resetDragDataTransfer()}function f(a,d,c){var g={$:a.data.$,target:a.data.getTarget()};d&&(g.dragRange=d);c&&(g.dropRange=c);!1===b.fire(a.name,g)&&a.data.preventDefault()}function g(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}
664
+ var d=b.editable(),h=CKEDITOR.plugins.clipboard.getDropTarget(b),n=b.ui.space("top"),w=b.ui.space("bottom");a.preventDefaultDropOnElement(n);a.preventDefaultDropOnElement(w);d.attachListener(h,"dragstart",f);d.attachListener(b,"dragstart",a.resetDragDataTransfer,a,null,1);d.attachListener(b,"dragstart",function(d){a.initDragDataTransfer(d,b)},null,null,2);d.attachListener(b,"dragstart",function(){var d=a.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(a.dragStartContainerChildCount=
665
+ d?g(d.startContainer):null,a.dragEndContainerChildCount=d?g(d.endContainer):null)},null,null,100);d.attachListener(h,"dragend",f);d.attachListener(b,"dragend",a.initDragDataTransfer,a,null,1);d.attachListener(b,"dragend",a.resetDragDataTransfer,a,null,100);d.attachListener(h,"dragover",function(a){var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()});
666
+ d.attachListener(h,"drop",function(d){if(!d.data.$.defaultPrevented){d.data.preventDefault();var c=d.data.getTarget();if(!c.isReadOnly()||c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){var c=a.getRangeAtDropPosition(d,b),g=a.dragRange;c&&f(d,g,c)}}},null,null,9999);d.attachListener(b,"drop",a.initDragDataTransfer,a,null,1);d.attachListener(b,"drop",function(d){if(d=d.data){var g=d.dropRange,h=d.dragRange,f=d.dataTransfer;f.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){a.internalDrop(h,
667
+ g,f,b)},0):f.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(h,g,f):e(g,f)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(b){var a,c=D();b.config.forcePasteAsPlainText?a="plain-text":b.config.pasteFilter?a=b.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in b.config||(a="semantic-content");b.pasteFilter=c.get(a);z(b);F(b);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if(CKEDITOR.env.gecko){var e=["image/png","image/jpeg",
668
+ "image/gif"],f;b.on("paste",function(a){var d=a.data,c=d.dataTransfer;if(!d.dataValue&&"paste"==d.method&&c&&1==c.getFilesCount()&&f!=c.id&&(c=c.getFile(0),-1!=CKEDITOR.tools.indexOf(e,c.type))){var n=new FileReader;n.addEventListener("load",function(){a.data.dataValue='\x3cimg src\x3d"'+n.result+'" /\x3e';b.fire("paste",a.data)},!1);n.addEventListener("abort",function(){b.fire("paste",a.data)},!1);n.addEventListener("error",function(){b.fire("paste",a.data)},!1);n.readAsDataURL(c);f=d.dataTransfer.id;
669
+ a.stop()}},null,null,1)}b.on("paste",function(a){a.data.dataTransfer||(a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var d=a.data.dataTransfer,c=d.getData("text/html");if(c)a.data.dataValue=c,a.data.type="html";else if(c=d.getData("text/plain"))a.data.dataValue=b.editable().transformPlainTextToHtml(c),a.data.type="text"}},null,null,1);b.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi,
670
+ " "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var e,f,k=new CKEDITOR.dom.element("div");for(k.setHtml(b);1==k.getChildCount()&&
671
+ (e=k.getFirst())&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasClass("cke_editable")||e.hasClass("cke_contents"));)k=f=e;f&&(b=f.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,
672
+ null,3);b.on("paste",function(a){a=a.data;var d=a.type,e=a.dataValue,f,p=b.config.clipboard_defaultContentType||"html",k=a.dataTransfer.getTransferType(b);f="html"==d||"html"==a.preSniffing?"html":A(e);"htmlifiedtext"==f&&(e=B(b.config,e));"text"==d&&"html"==f?e=y(b,e,c.get("plain-text")):k==CKEDITOR.DATA_TRANSFER_EXTERNAL&&b.pasteFilter&&!a.dontFilter&&(e=y(b,e,b.pasteFilter));a.startsWithEOL&&(e='\x3cbr data-cke-eol\x3d"1"\x3e'+e);a.endsWithEOL&&(e+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&
673
+ (d="html"==f||"html"==p?"html":"text");a.type=d;a.dataValue=e;delete a.preSniffing;delete a.startsWithEOL;delete a.endsWithEOL},null,null,6);b.on("paste",function(a){a=a.data;a.dataValue&&(b.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){b.fire("afterPaste")},0))},null,null,1E3);b.on("pasteDialog",function(a){setTimeout(function(){b.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,
674
+ isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?"beforepaste":"paste",canClipboardApiBeTrusted:function(b,a){return b.getTransferType(a)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!b.isEmpty()||CKEDITOR.env.gecko&&(b.getData("text/html")||b.getFilesCount())?!0:!1},getDropTarget:function(b){var a=b.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||a.isInline()?a:b.document},fixSplitNodesAfterDrop:function(b,a,c,e){function f(b,
675
+ c,e){var f=b;f.type==CKEDITOR.NODE_TEXT&&(f=b.getParent());if(f.equals(c)&&e!=c.getChildCount())return b=a.startContainer.getChild(a.startOffset-1),c=a.startContainer.getChild(a.startOffset),b&&b.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(e=b.getLength(),b.setText(b.getText()+c.getText()),c.remove(),a.setStart(b,e),a.collapse(!0)),!0}var g=a.startContainer;"number"==typeof e&&"number"==typeof c&&g.type==CKEDITOR.NODE_ELEMENT&&(f(b.startContainer,g,c)||f(b.endContainer,g,e))},isDropRangeAffectedByDragRange:function(b,
676
+ a){var c=a.startContainer,e=a.endOffset;return b.endContainer.equals(c)&&b.endOffset<=e||b.startContainer.getParent().equals(c)&&b.startContainer.getIndex()<e||b.endContainer.getParent().equals(c)&&b.endContainer.getIndex()<e?!0:!1},internalDrop:function(b,a,c,e){var f=CKEDITOR.plugins.clipboard,g=e.editable(),d,h;e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,a,f.dragStartContainerChildCount,f.dragEndContainerChildCount);
677
+ (h=this.isDropRangeAffectedByDragRange(b,a))||(d=b.createBookmark(!1));f=a.clone().createBookmark(!1);h&&(d=b.createBookmark(!1));b=d.startNode;a=d.endNode;h=f.startNode;a&&b.getPosition(h)&CKEDITOR.POSITION_PRECEDING&&a.getPosition(h)&CKEDITOR.POSITION_FOLLOWING&&h.insertBefore(b);b=e.createRange();b.moveToBookmark(d);g.extractHtmlFromRange(b,1);a=e.createRange();a.moveToBookmark(f);q(e,{dataTransfer:c,method:"drop",range:a},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(b,a){var c=
678
+ b.data.$,e=c.clientX,f=c.clientY,g=a.getSelection(!0).getRanges()[0],d=a.createRange();if(b.data.testRange)return b.data.testRange;if(document.caretRangeFromPoint)c=a.document.$.caretRangeFromPoint(e,f),d.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),d.collapse(!0);else if(c.rangeParent)d.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),d.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&g&&a.editable().hasFocus)return g;if(document.body.createTextRange){a.focus();
679
+ c=a.document.getBody().$.createTextRange();try{for(var h=!1,n=0;20>n&&!h;n++){if(!h)try{c.moveToPoint(e,f-n),h=!0}catch(p){}if(!h)try{c.moveToPoint(e,f+n),h=!0}catch(k){}}if(h){var u="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+u+'"\x3e​\x3c/span\x3e');var r=a.document.getById(u);d.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START);r.remove()}else{var t=a.document.$.elementFromPoint(e,f),m=new CKEDITOR.dom.element(t),q;if(m.equals(a.editable())||"html"==m.getName())return g&&g.startContainer&&
680
+ !g.startContainer.equals(a.editable())?g:null;q=m.getClientRect();e<q.left?d.setStartAt(m,CKEDITOR.POSITION_AFTER_START):d.setStartAt(m,CKEDITOR.POSITION_BEFORE_END);d.collapse(!0)}}catch(v){return null}}else return null}return d},initDragDataTransfer:function(b,a){var c=b.data.$?b.data.$.dataTransfer:null,e=new this.dataTransfer(c,a);c?this.dragData&&e.id==this.dragData.id?e=this.dragData:this.dragData=e:this.dragData?e=this.dragData:this.dragData=e;b.data.dataTransfer=e},resetDragDataTransfer:function(){this.dragData=
681
+ null},initPasteDataTransfer:function(b,a){if(this.isCustomCopyCutSupported){if(b&&b.data&&b.data.$){var c=new this.dataTransfer(b.data.$.clipboardData,a);this.copyCutData&&c.id==this.copyCutData.id?(c=this.copyCutData,c.$=b.data.$.clipboardData):this.copyCutData=c;return c}return new this.dataTransfer(null,a)}return new this.dataTransfer(CKEDITOR.env.edge&&b&&b.data.$&&b.data.$.clipboardData||null,a)},preventDefaultDropOnElement:function(b){b&&b.on("dragover",E)}};var p=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?
682
+ "cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(b,a){b&&(this.$=b);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(p);this.id||(this.id="Text"==p?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=p)try{this.$.setData(p,this.id)}catch(c){}a&&(this.sourceEditor=
683
+ a,this.setData("text/html",a.getSelectedHtml(1)),"Text"==p||this.getData("text/plain")||this.setData("text/plain",a.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(b){b=this._.normalizeType(b);var a=this._.data[b];if(void 0===a||null===a||""===a)try{a=this.$.getData(b)}catch(c){}if(void 0===a||null===a||""===a)a="";"text/html"==b?(a=a.replace(this._.metaRegExp,
684
+ ""),(b=this._.bodyRegExp.exec(a))&&b.length&&(a=b[1],a=a.replace(this._.fragmentRegExp,""))):"Text"==b&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==a.substring(0,7)&&(a="");return a},setData:function(b,a){b=this._.normalizeType(b);this._.data[b]=a;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==b||"Text"==b){"Text"==p&&"Text"==b&&(this.id=a);try{this.$.setData(b,a)}catch(c){}}},getTransferType:function(b){return this.sourceEditor?this.sourceEditor==b?CKEDITOR.DATA_TRANSFER_INTERNAL:
685
+ CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function b(b){b=a._.normalizeType(b);var c=a.getData(b);c&&(a._.data[b]=c)}if(this.$){var a=this,c,e;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)b(this.$.types[c])}else b("Text"),b("URL");e=this._getImageFromClipboard();if(this.$&&this.$.files||e){this._.files=[];if(this.$.files&&this.$.files.length)for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);
686
+ 0===this._.files.length&&e&&this._.files.push(e)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(b){return this._.files.length?this._.files[b]:this.$&&this.$.files&&this.$.files.length?this.$.files[b]:0===b?this._getImageFromClipboard():void 0},isEmpty:function(){var b={},a;if(this.getFilesCount())return!1;for(a in this._.data)b[a]=1;if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var c=
686
687
  0;c<this.$.types.length;c++)b[this.$.types[c]]=1}else b.Text=1,b.URL=1;"Text"!=p&&(b[p]=0);for(a in b)if(b[a]&&""!==this.getData(a))return!1;return!0},_getImageFromClipboard:function(){var b;if(this.$&&this.$.items&&this.$.items[0])try{if((b=this.$.items[0].getAsFile())&&b.type)return b}catch(a){}}}})();(function(){var c='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(c+=
687
688
  ' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"'),c=c+'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',
688
689
  t=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),u=CKEDITOR.addTemplate("button",c);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};
@@ -716,57 +717,58 @@ this);k.setStyles({top:n+"px",left:d+"px"});k.setOpacity(1);g&&g()},this);m.isLo
716
717
  this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();
717
718
  this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!==a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,c,f,h,g){if(this._.activeChild!=a||a._.panel._.offsetParentId!=c.getId())this.hideChild(),a.onHide=
718
719
  CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,c,f,h,g),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),
719
- b;for(b in f){var c=f[b];a?c.destroy():c.element.hide()}a&&(f={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(d){function r(a,c,e,g,k){var n=new CKEDITOR.style(l["colorButton_"+c+"Style"]),m=CKEDITOR.tools.getNextId()+"_colorBox";k=k||{};d.ui.add(a,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+g,allowedContent:n,requiredContent:n,contentTransformations:k.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":h.panelTitle}},onBlock:function(a,
720
- b){b.autoSize=!0;b.element.addClass("cke_colorblock");b.element.setHtml(w(a,c,m));b.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var f=b.keys,e="rtl"==d.lang.dir;f[e?37:39]="next";f[40]="next";f[9]="next";f[e?39:37]="prev";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]="click"},refresh:function(){d.activeFilter.check(n)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var a=d.getSelection(),a=a&&a.getStartElement(),a=d.elementPath(a),b;if(a){a=
721
- a.block||a.blockLimit||d.document.getBody();do b=a&&a.getComputedStyle("back"==c?"background-color":"color")||"transparent";while("back"==c&&"transparent"==b&&a&&(a=a.getParent()));b&&"transparent"!=b||(b="#ffffff");!1!==l.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(m).setStyle("background-color",b);return b}}})}function w(a,c,e){var g=[],k=l.colorButton_colors.split(","),n=d.plugins.colordialog&&!1!==l.colorButton_enableMore,m=k.length+(n?2:1),p=CKEDITOR.tools.addFunction(function(b,
722
- c){function e(a){this.removeListener("ok",e);this.removeListener("cancel",e);"ok"==a.name&&f(this.getContentElement("picker","selectedColor").getValue(),c)}var f=arguments.callee;if("?"==b)d.openDialog("colordialog",function(){this.on("ok",e);this.on("cancel",e)});else{d.focus();a.hide();d.fire("saveSnapshot");d.removeStyle(new CKEDITOR.style(l["colorButton_"+c+"Style"],{color:"inherit"}));if(b){var g=l["colorButton_"+c+"Style"];g.childRule="back"==c?function(a){return t(a)}:function(a){return!(a.is("a")||
723
- a.getElementsByTag("a").count())||t(a)};d.applyStyle(new CKEDITOR.style(g,{color:b}))}d.fire("saveSnapshot")}});!1!==l.colorButton_enableAutomatic&&g.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',h.auto,'" onclick\x3d"CKEDITOR.tools.callFunction(',p,",null,'",c,"');return false;\" href\x3d\"javascript:void('",h.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',m,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',
724
- e,'"\x3e\x3c/span\x3e\x3c/td\x3e\x3ctd colspan\x3d7 align\x3dcenter\x3e',h.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");g.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(e=0;e<k.length;e++){0===e%8&&g.push("\x3c/tr\x3e\x3ctr\x3e");var b=k[e].split("/"),f=b[0],q=b[1]||f;b[1]||(f="#"+f.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"));b=d.lang.colorbutton.colors[q]||q;g.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
725
- b,'" onclick\x3d"CKEDITOR.tools.callFunction(',p,",'",f,"','",c,"'); return false;\" href\x3d\"javascript:void('",b,'\')" role\x3d"option" aria-posinset\x3d"',e+2,'" aria-setsize\x3d"',m,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',q,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}n&&g.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d8 align\x3dcenter\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',h.more,'" onclick\x3d"CKEDITOR.tools.callFunction(',
726
- p,",'?','",c,"');return false;\" href\x3d\"javascript:void('",h.more,"')\"",' role\x3d"option" aria-posinset\x3d"',m,'" aria-setsize\x3d"',m,'"\x3e',h.more,"\x3c/a\x3e\x3c/td\x3e");g.push("\x3c/tr\x3e\x3c/table\x3e");return g.join("")}function t(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}var l=d.config,h=d.lang.colorbutton;if(!CKEDITOR.env.hc){r("TextColor","fore",h.textColorTitle,10,{contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},
727
- right:function(a){a.name="span";a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});var u={},v=d.config.colorButton_normalizeBackground;if(void 0===v||v)u.contentTransformations=[[{element:"span",left:function(a){var c=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=c.style.parse.background(a.styles.background);return a.color&&1===c.objectKeys(a).length},right:function(a){var c=(new CKEDITOR.style(d.config.colorButton_backStyle,{color:a.styles.background})).getDefinition();
728
- a.name=c.element;a.styles=c.styles;a.attributes=c.attributes||{};return a}}]];r("BGColor","back",h.bgColorTitle,20,u)}}});CKEDITOR.config.colorButton_colors="000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF";
729
- CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]};CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}};CKEDITOR.plugins.colordialog={requires:"dialog",init:function(b){var c=new CKEDITOR.dialogCommand("colordialog");c.editorFocus=!1;b.addCommand("colordialog",c);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");b.getColorFromDialog=function(c,f){var d=function(a){this.removeListener("ok",d);this.removeListener("cancel",d);a="ok"==a.name?this.getValueOf("picker","selectedColor"):null;c.call(f,a)},e=function(a){a.on("ok",d);a.on("cancel",d)};b.execCommand("colordialog");if(b._.storedDialogs&&
720
+ b;for(b in f){var c=f[b];a?c.destroy():c.element.hide()}a&&(f={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(e){function t(a,c,f,g,l){var m=new CKEDITOR.style(k["colorButton_"+c+"Style"]),n=CKEDITOR.tools.getNextId()+"_colorBox";l=l||{};e.ui.add(a,CKEDITOR.UI_PANELBUTTON,{label:f,title:f,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+g,allowedContent:m,requiredContent:m,contentTransformations:l.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":h.panelTitle}},onBlock:function(a,
721
+ b){b.autoSize=!0;b.element.addClass("cke_colorblock");b.element.setHtml(x(a,c,n));b.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var d=b.keys,f="rtl"==e.lang.dir;d[f?37:39]="next";d[40]="next";d[9]="next";d[f?39:37]="prev";d[38]="prev";d[CKEDITOR.SHIFT+9]="prev";d[32]="click"},refresh:function(){e.activeFilter.check(m)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var a=e.getSelection(),a=a&&a.getStartElement(),a=e.elementPath(a),b;if(a){a=
722
+ a.block||a.blockLimit||e.document.getBody();do b=a&&a.getComputedStyle("back"==c?"background-color":"color")||"transparent";while("back"==c&&"transparent"==b&&a&&(a=a.getParent()));b&&"transparent"!=b||(b="#ffffff");!1!==k.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(n).setStyle("background-color",b);return b}}})}function x(a,c,f){var g=[],l=k.colorButton_colors.split(","),m=k.colorButton_colorsPerRow||6,n=e.plugins.colordialog&&!1!==k.colorButton_enableMore,p=l.length+
723
+ (n?2:1),b=CKEDITOR.tools.addFunction(function(b,c){function d(a){this.removeListener("ok",d);this.removeListener("cancel",d);"ok"==a.name&&f(this.getContentElement("picker","selectedColor").getValue(),c)}var f=arguments.callee;if("?"==b)e.openDialog("colordialog",function(){this.on("ok",d);this.on("cancel",d)});else{e.focus();a.hide();e.fire("saveSnapshot");e.removeStyle(new CKEDITOR.style(k["colorButton_"+c+"Style"],{color:"inherit"}));if(b){var g=k["colorButton_"+c+"Style"];g.childRule="back"==
724
+ c?function(a){return u(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||u(a)};e.applyStyle(new CKEDITOR.style(g,{color:b}))}e.fire("saveSnapshot")}});!1!==k.colorButton_enableAutomatic&&g.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',h.auto,'" onclick\x3d"CKEDITOR.tools.callFunction(',b,",null,'",c,"');return false;\" href\x3d\"javascript:void('",h.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',p,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+
725
+ m+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',f,'"\x3e\x3c/span\x3e',h.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");g.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(f=0;f<l.length;f++){0===f%m&&g.push("\x3c/tr\x3e\x3ctr\x3e");var d=l[f].split("/"),q=d[0],r=d[1]||q;d[1]||(q="#"+q.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"));d=e.lang.colorbutton.colors[r]||r;g.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
726
+ d,'" onclick\x3d"CKEDITOR.tools.callFunction(',b,",'",q,"','",c,"'); return false;\" href\x3d\"javascript:void('",d,'\')" role\x3d"option" aria-posinset\x3d"',f+2,'" aria-setsize\x3d"',p,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',r,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}n&&g.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+m+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',h.more,'" onclick\x3d"CKEDITOR.tools.callFunction(',
727
+ b,",'?','",c,"');return false;\" href\x3d\"javascript:void('",h.more,"')\"",' role\x3d"option" aria-posinset\x3d"',p,'" aria-setsize\x3d"',p,'"\x3e',h.more,"\x3c/a\x3e\x3c/td\x3e");g.push("\x3c/tr\x3e\x3c/table\x3e");return g.join("")}function u(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}var k=e.config,h=e.lang.colorbutton;if(!CKEDITOR.env.hc){t("TextColor","fore",h.textColorTitle,10,{contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},
728
+ right:function(a){a.name="span";a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});var v={},w=e.config.colorButton_normalizeBackground;if(void 0===w||w)v.contentTransformations=[[{element:"span",left:function(a){var c=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=c.style.parse.background(a.styles.background);return a.color&&1===c.objectKeys(a).length},right:function(a){var c=(new CKEDITOR.style(e.config.colorButton_backStyle,{color:a.styles.background})).getDefinition();
729
+ a.name=c.element;a.styles=c.styles;a.attributes=c.attributes||{};return a}}]];t("BGColor","back",h.bgColorTitle,20,v)}}});CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000";CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]};
730
+ CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}};CKEDITOR.plugins.colordialog={requires:"dialog",init:function(b){var c=new CKEDITOR.dialogCommand("colordialog");c.editorFocus=!1;b.addCommand("colordialog",c);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");b.getColorFromDialog=function(c,f){var d=function(a){this.removeListener("ok",d);this.removeListener("cancel",d);a="ok"==a.name?this.getValueOf("picker","selectedColor"):null;c.call(f,a)},e=function(a){a.on("ok",d);a.on("cancel",d)};b.execCommand("colordialog");if(b._.storedDialogs&&
730
731
  b._.storedDialogs.colordialog)e(b._.storedDialogs.colordialog);else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){e(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}};CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog);(function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(a){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var c={},f={};CKEDITOR.addTemplates=function(a,d){c[a]=d};CKEDITOR.getTemplates=function(a){return c[a]};CKEDITOR.loadTemplates=function(a,d){for(var e=
731
732
  [],b=0,c=a.length;b<c;b++)f[a[b]]||(e.push(a[b]),f[a[b]]=1);e.length?CKEDITOR.scriptLoader.load(e,d):setTimeout(d,0)}})();CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")];CKEDITOR.config.templates_replaceContent=!0;CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(l){for(var h=l.config.menu_groups.split(","),r=l._.menuGroups={},t=l._.menuItems={},n=0;n<h.length;n++)r[h[n]]=n+1;l.addMenuGroup=function(a,b){r[a]=b||100};l.addMenuItem=function(a,b){r[b.group]&&(t[a]=new CKEDITOR.menuItem(this,a,b))};l.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,a[b])};l.getMenuItem=function(a){return t[a]};l.removeMenuItem=function(a){delete t[a]}}});
732
- (function(){function l(a){a.sort(function(a,d){return a.group<d.group?-1:a.group>d.group?1:a.order<d.order?-1:a.order>d.order?1:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked}';
733
- CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),r=CKEDITOR.addTemplate("menuItem",h+'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e'),
734
- t=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),n=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var d=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],
735
- level:this._.level-1,block:{}}),m=d.block.attributes=d.attributes||{};!m.role&&(m.role="menu");this._.panelDefinition=d},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),d=this.editor.elementPath(),m=this._.listeners;this.removeAll();for(var g=0;g<m.length;g++){var k=m[g](b,a,d);if(k)for(var e in k){var f=this.editor.getMenuItem(e);!f||f.command&&!this.editor.getCommand(f.command).state||(f.state=k[e],this.add(f))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();
736
- else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,d=this.items[a];if(d=d.getItems&&d.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var m in d){var g=
737
- this.editor.getMenuItem(m);g&&(g.state=d[m],b.add(g))}var k=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(a));setTimeout(function(){b.show(k,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(a,b,d,m){if(!this.parent&&(this._.onShow(),!this.items.length))return;b=b||("rtl"==this.editor.lang.dir?2:1);var g=this.items,k=this.editor,e=this._.panel,f=this._.element;
738
- if(!e){e=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);e.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);e.onShow=function(){e._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};e.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);f=e.addBlock(this.id,this._.panelDefinition.block);f.autoSize=!0;var c=f.keys;c[40]="next";c[9]="next";c[38]=
739
- "prev";c[CKEDITOR.SHIFT+9]="prev";c["rtl"==k.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";c[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(c[13]="mouseup");f=this._.element=f.element;c=f.getDocument();c.getBody().setStyle("overflow","hidden");c.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,k.config.menu_subMenuDelay||
740
- 400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}l(g);for(var c=k.elementPath(),c=['\x3cdiv class\x3d"cke_menu'+(c&&c.direction()!=k.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],h=g.length,n=h&&g[0].group,
741
- q=0;q<h;q++){var p=g[q];n!=p.group&&(c.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),n=p.group);p.render(this,q,c)}c.push("\x3c/div\x3e");f.setHtml(c.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(e,this.id,a,b,d,m):e.showBlock(this.id,a,b,d,m);k.fire("menuShow",[e])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,
742
- b,d){CKEDITOR.tools.extend(this,d,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(a,b,d){var h=a.id+String(b),g="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,k="",e=this.editor,f,c,l=g==CKEDITOR.TRISTATE_ON?"on":g==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(k=' aria-checked\x3d"'+(g==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var u=this.getItems,q=
743
- "\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",p=this.name;this.icon&&!/\./.test(this.icon)&&(p=this.icon);this.command&&(f=e.getCommand(this.command),(f=e.getCommandKeystroke(f))&&(c=CKEDITOR.tools.keystrokeToString(e.lang.common.keyboard,f)));a={id:h,name:this.name,iconName:p,label:this.label,cls:this.className||"",state:l,hasPopup:u?"true":"false",disabled:g==CKEDITOR.TRISTATE_DISABLED,title:this.label+(c?" ("+c.display+")":""),ariaShortcut:c?e.lang.common.keyboardShortcut+" "+c.aria:
744
- "",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,clickFn:a._.itemClickFn,index:b,iconStyle:CKEDITOR.skin.getIconStyle(p,"rtl"==this.editor.lang.dir,p==this.icon?null:this.icon,this.iconOffset),shortcutHtml:c?n.output({shortcut:c.display}):"",arrowHtml:u?t.output({label:q}):"",role:this.role?this.role:"menuitem",ariaChecked:k};r.output(a,d)}}})})();CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div";CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(a){this.base.call(this,a,{panel:{className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,e){a.on("contextmenu",function(a){a=a.data;var c=CKEDITOR.env.webkit?f:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!e||!c){a.preventDefault();if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var c=this.editor,
733
+ (function(){function l(a){a.sort(function(a,d){return a.group<d.group?-1:a.group>d.group?1:a.order<d.order?-1:a.order>d.order?1:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"';
734
+ CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),r=CKEDITOR.addTemplate("menuItem",
735
+ h+'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e'),t=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),
736
+ n=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var d=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),m=d.block.attributes=d.attributes||{};!m.role&&(m.role="menu");this._.panelDefinition=
737
+ d},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),d=this.editor.elementPath(),m=this._.listeners;this.removeAll();for(var g=0;g<m.length;g++){var k=m[g](b,a,d);if(k)for(var e in k){var f=this.editor.getMenuItem(e);!f||f.command&&!this.editor.getCommand(f.command).state||(f.state=k[e],this.add(f))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):
738
+ 27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,d=this.items[a];if(d=d.getItems&&d.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var m in d){var g=this.editor.getMenuItem(m);g&&(g.state=d[m],b.add(g))}var k=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+
739
+ String(a));setTimeout(function(){b.show(k,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(a,b,d,m){if(!this.parent&&(this._.onShow(),!this.items.length))return;b=b||("rtl"==this.editor.lang.dir?2:1);var g=this.items,k=this.editor,e=this._.panel,f=this._.element;if(!e){e=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);
740
+ e.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);e.onShow=function(){e._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};e.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);f=e.addBlock(this.id,this._.panelDefinition.block);f.autoSize=!0;var c=f.keys;c[40]="next";c[9]="next";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c["rtl"==k.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";c[32]=CKEDITOR.env.ie?"mouseup":
741
+ "click";CKEDITOR.env.ie&&(c[13]="mouseup");f=this._.element=f.element;c=f.getDocument();c.getBody().setStyle("overflow","hidden");c.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,k.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);
742
+ this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}l(g);for(var c=k.elementPath(),c=['\x3cdiv class\x3d"cke_menu'+(c&&c.direction()!=k.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],h=g.length,n=h&&g[0].group,q=0;q<h;q++){var p=g[q];n!=p.group&&(c.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),
743
+ n=p.group);p.render(this,q,c)}c.push("\x3c/div\x3e");f.setHtml(c.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(e,this.id,a,b,d,m):e.showBlock(this.id,a,b,d,m);k.fire("menuShow",[e])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,d){CKEDITOR.tools.extend(this,d,{order:0,className:"cke_menubutton__"+b});this.group=
744
+ a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(a,b,d){var h=a.id+String(b),g="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,k="",e=this.editor,f,c,l=g==CKEDITOR.TRISTATE_ON?"on":g==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(k=' aria-checked\x3d"'+(g==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var u=this.getItems,q="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",p=this.name;this.icon&&!/\./.test(this.icon)&&
745
+ (p=this.icon);this.command&&(f=e.getCommand(this.command),(f=e.getCommandKeystroke(f))&&(c=CKEDITOR.tools.keystrokeToString(e.lang.common.keyboard,f)));a={id:h,name:this.name,iconName:p,label:this.label,cls:this.className||"",state:l,hasPopup:u?"true":"false",disabled:g==CKEDITOR.TRISTATE_DISABLED,title:this.label+(c?" ("+c.display+")":""),ariaShortcut:c?e.lang.common.keyboardShortcut+" "+c.aria:"",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,
746
+ clickFn:a._.itemClickFn,index:b,iconStyle:CKEDITOR.skin.getIconStyle(p,"rtl"==this.editor.lang.dir,p==this.icon?null:this.icon,this.iconOffset),shortcutHtml:c?n.output({shortcut:c.display}):"",arrowHtml:u?t.output({label:q}):"",role:this.role?this.role:"menuitem",ariaChecked:k};r.output(a,d)}}})})();CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div";CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(a){this.base.call(this,a,{panel:{className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,e){a.on("contextmenu",function(a){a=a.data;var c=CKEDITOR.env.webkit?f:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!e||!c){a.preventDefault();if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var c=this.editor,
745
747
  b=(new CKEDITOR.dom.elementPath(a.getTarget(),c.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);b&&"false"==b.getAttribute("contenteditable")&&c.getSelection().fake(b)}var b=a.getTarget().getDocument(),d=a.getTarget().getDocument().getDocumentElement(),c=!b.equals(CKEDITOR.document),b=b.getWindow().getScrollPosition(),g=c?a.$.clientX:a.$.pageX||b.x+a.$.clientX,h=c?a.$.clientY:a.$.pageY||b.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(d,null,g,h)},CKEDITOR.env.ie?
746
748
  200:0,this)}},this);if(CKEDITOR.env.webkit){var f,d=function(){f=0};a.on("keydown",function(a){f=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});a.on("keyup",d);a.on("contextmenu",d)}},open:function(a,e,f,d){this.editor.focus();a=a||CKEDITOR.document.getDocumentElement();this.editor.selectionChange(1);this.show(a,e,f,d)}}})},beforeInit:function(a){var e=a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){e.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});
747
- a.addCommand("contextMenu",{exec:function(){a.contextMenu.open(a.document.getBody())}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}});(function(){function q(a){var b=(a=a.data)&&a.$;return a&&b?CKEDITOR.env.ie&&9>CKEDITOR.env.version?1===b.button:0===b.button:!1}function k(a,b,e,d){var c=new CKEDITOR.dom.walker(a);if(a=a.startContainer.getAscendant(b,!0)||a.endContainer.getAscendant(b,!0))if(e(a),d)return;for(;a=c.next();)if(a=a.getAscendant(b,!0))if(e(a),d)break}function t(a,b){var e={ul:"ol",ol:"ul"};return-1!==m(b,function(b){return b.element===a||b.element===e[a]})}function l(a){this.styles=null;this.sticky=!1;this.editor=a;
748
- this.filter=new CKEDITOR.filter(a.config.copyFormatting_allowRules);!0===a.config.copyFormatting_allowRules&&(this.filter.disabled=!0);a.config.copyFormatting_disallowRules&&this.filter.disallow(a.config.copyFormatting_disallowRules)}var m=CKEDITOR.tools.indexOf,r=!1;CKEDITOR.plugins.add("copyformatting",{lang:"en",icons:"copyformatting",hidpi:!0,init:function(a){var b=CKEDITOR.plugins.copyformatting;b._addScreenReaderContainer();r||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),
749
- r=!0);a.addContentsCss&&a.addContentsCss(this.path+"styles/copyformatting.css");a.copyFormatting=new b.state(a);a.addCommand("copyFormatting",b.commands.copyFormatting);a.addCommand("applyFormatting",b.commands.applyFormatting);a.ui.addButton("CopyFormatting",{label:a.lang.copyformatting.label,command:"copyFormatting",toolbar:"cleanup,0"});a.on("contentDom",function(){var e=a.editable(),b=e.isInline()?e:a.document,c=a.ui.get("CopyFormatting");e.attachListener(b,"mouseup",function(b){q(b)&&a.execCommand("applyFormatting")});
750
- e.attachListener(CKEDITOR.document,"mouseup",function(b){var d=a.getCommand("copyFormatting");q(b)&&d.state===CKEDITOR.TRISTATE_ON&&!e.contains(b.data.getTarget())&&a.execCommand("copyFormatting")});c&&(b=CKEDITOR.document.getById(c._.id),e.attachListener(b,"dblclick",function(){a.execCommand("copyFormatting",{sticky:!0})}),e.attachListener(b,"mouseup",function(a){a.data.stopPropagation()}))});a.config.copyFormatting_keystrokeCopy&&a.setKeystroke(a.config.copyFormatting_keystrokeCopy,"copyFormatting");
749
+ a.addCommand("contextMenu",{exec:function(){a.contextMenu.open(a.document.getBody())}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}});(function(){function r(a){var b=(a=a.data)&&a.$;return a&&b?CKEDITOR.env.ie&&9>CKEDITOR.env.version?1===b.button:0===b.button:!1}function k(a,b,e,d){var c=new CKEDITOR.dom.walker(a);if(a=a.startContainer.getAscendant(b,!0)||a.endContainer.getAscendant(b,!0))if(e(a),d)return;for(;a=c.next();)if(a=a.getAscendant(b,!0))if(e(a),d)break}function u(a,b){var e={ul:"ol",ol:"ul"};return-1!==l(b,function(b){return b.element===a||b.element===e[a]})}function q(a){this.styles=null;this.sticky=!1;this.editor=a;
750
+ this.filter=new CKEDITOR.filter(a.config.copyFormatting_allowRules);!0===a.config.copyFormatting_allowRules&&(this.filter.disabled=!0);a.config.copyFormatting_disallowRules&&this.filter.disallow(a.config.copyFormatting_disallowRules)}var l=CKEDITOR.tools.indexOf,t=!1;CKEDITOR.plugins.add("copyformatting",{lang:"en",icons:"copyformatting",hidpi:!0,init:function(a){var b=CKEDITOR.plugins.copyformatting;b._addScreenReaderContainer();t||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),
751
+ t=!0);a.addContentsCss&&a.addContentsCss(this.path+"styles/copyformatting.css");a.copyFormatting=new b.state(a);a.addCommand("copyFormatting",b.commands.copyFormatting);a.addCommand("applyFormatting",b.commands.applyFormatting);a.ui.addButton("CopyFormatting",{label:a.lang.copyformatting.label,command:"copyFormatting",toolbar:"cleanup,0"});a.on("contentDom",function(){var e=a.editable(),b=e.isInline()?e:a.document,c=a.ui.get("CopyFormatting");e.attachListener(b,"mouseup",function(b){r(b)&&a.execCommand("applyFormatting")});
752
+ e.attachListener(CKEDITOR.document,"mouseup",function(b){var d=a.getCommand("copyFormatting");r(b)&&d.state===CKEDITOR.TRISTATE_ON&&!e.contains(b.data.getTarget())&&a.execCommand("copyFormatting")});c&&(b=CKEDITOR.document.getById(c._.id),e.attachListener(b,"dblclick",function(){a.execCommand("copyFormatting",{sticky:!0})}),e.attachListener(b,"mouseup",function(a){a.data.stopPropagation()}))});a.config.copyFormatting_keystrokeCopy&&a.setKeystroke(a.config.copyFormatting_keystrokeCopy,"copyFormatting");
751
753
  a.config.copyFormatting_keystrokePaste&&a.setKeystroke(a.config.copyFormatting_keystrokePaste,"applyFormatting");a.on("key",function(b){var d=a.getCommand("copyFormatting");b=b.data.domEvent;b.getKeystroke&&27===b.getKeystroke()&&d.state===CKEDITOR.TRISTATE_ON&&a.execCommand("copyFormatting")});a.copyFormatting.on("extractFormatting",function(e){var d=e.data.element;if(d.contains(a.editable())||d.equals(a.editable()))return e.cancel();d=b._convertElementToStyleDef(d);if(!a.copyFormatting.filter.check(new CKEDITOR.style(d),
752
- !0,!0))return e.cancel();e.data.styleDef=d});a.copyFormatting.on("applyFormatting",function(e){if(!e.data.preventFormatStripping){var d=e.data.range,c=b._extractStylesFromRange(a,d),g=b._determineContext(d),f,h;if(a.copyFormatting._isContextAllowed(g))for(h=0;h<c.length;h++)g=c[h],f=d.createBookmark(),-1===m(b.preservedElements,g.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?c[h].removeFromRange(e.data.range,e.editor):c[h].remove(e.editor):t(g.element,e.data.styles)&&b._removeStylesFromElementInRange(d,
753
- g.element),d.moveToBookmark(f)}});a.copyFormatting.on("applyFormatting",function(b){var d=CKEDITOR.plugins.copyformatting,c=d._determineContext(b.data.range);"list"===c&&a.copyFormatting._isContextAllowed("list")?d._applyStylesToListContext(b.editor,b.data.range,b.data.styles):"table"===c&&a.copyFormatting._isContextAllowed("table")?d._applyStylesToTableContext(b.editor,b.data.range,b.data.styles):a.copyFormatting._isContextAllowed("text")&&d._applyStylesToTextContext(b.editor,b.data.range,b.data.styles)},
754
- null,null,999)}});l.prototype._isContextAllowed=function(a){var b=this.editor.config.copyFormatting_allowedContexts;return!0===b||-1!==m(b,a)};CKEDITOR.event.implementOn(l.prototype);CKEDITOR.plugins.copyformatting={state:l,inlineBoundary:"h1 h2 h3 h4 h5 h6 p div".split(" "),excludedAttributes:["id","style","href","data-cke-saved-href","dir"],elementsForInlineTransform:["li"],excludedElementsFromInlineTransform:["table","thead","tbody","ul","ol"],excludedAttributesFromInlineTransform:["value","type"],
755
- preservedElements:"ul ol li td th tr thead tbody table".split(" "),breakOnElements:["ul","ol","table"],commands:{copyFormatting:{exec:function(a,b){var e=CKEDITOR.plugins.copyformatting,d=a.copyFormatting,c=b?"keystrokeHandler"==b.from:!1,g=b?b.sticky||c:!1,f=e._getCursorContainer(a),h=CKEDITOR.document.getDocumentElement();if(this.state===CKEDITOR.TRISTATE_ON)return d.styles=null,d.sticky=!1,f.removeClass("cke_copyformatting_active"),h.removeClass("cke_copyformatting_disabled"),h.removeClass("cke_copyformatting_tableresize_cursor"),
756
- e._putScreenReaderMessage(a,"canceled"),this.setState(CKEDITOR.TRISTATE_OFF);d.styles=e._extractStylesFromElement(a,a.elementPath().lastElement);this.setState(CKEDITOR.TRISTATE_ON);c||(f.addClass("cke_copyformatting_active"),h.addClass("cke_copyformatting_tableresize_cursor"),a.config.copyFormatting_outerCursor&&h.addClass("cke_copyformatting_disabled"));d.sticky=g;e._putScreenReaderMessage(a,"copied")}},applyFormatting:{exec:function(a,b){var e=a.getCommand("copyFormatting"),d=b?"keystrokeHandler"==
757
- b.from:!1,c=CKEDITOR.plugins.copyformatting,g=a.copyFormatting,f=c._getCursorContainer(a),h=CKEDITOR.document.getDocumentElement();if(d||e.state===CKEDITOR.TRISTATE_ON){if(d&&!g.styles)return c._putScreenReaderMessage(a,"failed");d=c._applyFormat(a,g.styles);g.sticky||(g.styles=null,f.removeClass("cke_copyformatting_active"),h.removeClass("cke_copyformatting_disabled"),h.removeClass("cke_copyformatting_tableresize_cursor"),e.setState(CKEDITOR.TRISTATE_OFF));c._putScreenReaderMessage(a,d?"applied":
754
+ !0,!0))return e.cancel();e.data.styleDef=d});a.copyFormatting.on("applyFormatting",function(e){if(!e.data.preventFormatStripping){var d=e.data.range,c=b._extractStylesFromRange(a,d),f=b._determineContext(d),g,h;if(a.copyFormatting._isContextAllowed(f))for(h=0;h<c.length;h++)f=c[h],g=d.createBookmark(),-1===l(b.preservedElements,f.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?c[h].removeFromRange(e.data.range,e.editor):c[h].remove(e.editor):u(f.element,e.data.styles)&&b._removeStylesFromElementInRange(d,
755
+ f.element),d.moveToBookmark(g)}});a.copyFormatting.on("applyFormatting",function(b){var d=CKEDITOR.plugins.copyformatting,c=d._determineContext(b.data.range);"list"===c&&a.copyFormatting._isContextAllowed("list")?d._applyStylesToListContext(b.editor,b.data.range,b.data.styles):"table"===c&&a.copyFormatting._isContextAllowed("table")?d._applyStylesToTableContext(b.editor,b.data.range,b.data.styles):a.copyFormatting._isContextAllowed("text")&&d._applyStylesToTextContext(b.editor,b.data.range,b.data.styles)},
756
+ null,null,999)}});q.prototype._isContextAllowed=function(a){var b=this.editor.config.copyFormatting_allowedContexts;return!0===b||-1!==l(b,a)};CKEDITOR.event.implementOn(q.prototype);CKEDITOR.plugins.copyformatting={state:q,inlineBoundary:"h1 h2 h3 h4 h5 h6 p div".split(" "),excludedAttributes:["id","style","href","data-cke-saved-href","dir"],elementsForInlineTransform:["li"],excludedElementsFromInlineTransform:["table","thead","tbody","ul","ol"],excludedAttributesFromInlineTransform:["value","type"],
757
+ preservedElements:"ul ol li td th tr thead tbody table".split(" "),breakOnElements:["ul","ol","table"],commands:{copyFormatting:{exec:function(a,b){var e=CKEDITOR.plugins.copyformatting,d=a.copyFormatting,c=b?"keystrokeHandler"==b.from:!1,f=b?b.sticky||c:!1,g=e._getCursorContainer(a),h=CKEDITOR.document.getDocumentElement();if(this.state===CKEDITOR.TRISTATE_ON)return d.styles=null,d.sticky=!1,g.removeClass("cke_copyformatting_active"),h.removeClass("cke_copyformatting_disabled"),h.removeClass("cke_copyformatting_tableresize_cursor"),
758
+ e._putScreenReaderMessage(a,"canceled"),this.setState(CKEDITOR.TRISTATE_OFF);d.styles=e._extractStylesFromElement(a,a.elementPath().lastElement);this.setState(CKEDITOR.TRISTATE_ON);c||(g.addClass("cke_copyformatting_active"),h.addClass("cke_copyformatting_tableresize_cursor"),a.config.copyFormatting_outerCursor&&h.addClass("cke_copyformatting_disabled"));d.sticky=f;e._putScreenReaderMessage(a,"copied")}},applyFormatting:{exec:function(a,b){var e=a.getCommand("copyFormatting"),d=b?"keystrokeHandler"==
759
+ b.from:!1,c=CKEDITOR.plugins.copyformatting,f=a.copyFormatting,g=c._getCursorContainer(a),h=CKEDITOR.document.getDocumentElement();if(d||e.state===CKEDITOR.TRISTATE_ON){if(d&&!f.styles)return c._putScreenReaderMessage(a,"failed");d=c._applyFormat(a,f.styles);f.sticky||(f.styles=null,g.removeClass("cke_copyformatting_active"),h.removeClass("cke_copyformatting_disabled"),h.removeClass("cke_copyformatting_tableresize_cursor"),e.setState(CKEDITOR.TRISTATE_OFF));c._putScreenReaderMessage(a,d?"applied":
758
760
  "canceled")}}}},_getCursorContainer:function(a){return a.elementMode===CKEDITOR.ELEMENT_MODE_INLINE?a.editable():a.editable().getParent()},_convertElementToStyleDef:function(a){var b=CKEDITOR.tools,e=a.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes),b=b.parseCssText(a.getAttribute("style"),!0,!0);return{element:a.getName(),type:CKEDITOR.STYLE_INLINE,attributes:e,styles:b}},_extractStylesFromElement:function(a,b){var e={},d=[];do if(b.type===CKEDITOR.NODE_ELEMENT&&!b.hasAttribute("data-cke-bookmark")&&
759
- (e.element=b,a.copyFormatting.fire("extractFormatting",e,a)&&e.styleDef&&d.push(new CKEDITOR.style(e.styleDef)),b.getName&&-1!==m(CKEDITOR.plugins.copyformatting.breakOnElements,b.getName())))break;while((b=b.getParent())&&b.type===CKEDITOR.NODE_ELEMENT);return d},_extractStylesFromRange:function(a,b){for(var e=[],d=new CKEDITOR.dom.walker(b),c;c=d.next();)e=e.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a,c));return e},_removeStylesFromElementInRange:function(a,b){for(var e=-1!==
760
- m(["ol","ul","table"],b),d=new CKEDITOR.dom.walker(a),c;c=d.next();)if(c=c.getAscendant(b,!0))if(c.removeAttributes(c.getAttributes()),e)break},_getSelectedWordOffset:function(a){function b(a,b){return a[b?"getPrevious":"getNext"](function(a){return a.type!==CKEDITOR.NODE_COMMENT})}function e(a){return a.type==CKEDITOR.NODE_ELEMENT?(a=a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g,""),a.replace(/<.*?>/g,"")):a.getText()}function d(a,c){var f=a,g=/\s/g,h="p br ol ul li td th div caption body".split(" "),
761
- k=!1,l=!1,p,n;do{for(p=b(f,c);!p&&f.getParent();){f=f.getParent();if(-1!==m(h,f.getName())){l=k=!0;break}p=b(f,c)}if(p&&p.getName&&-1!==m(h,p.getName())){k=!0;break}f=p}while(f&&f.getStyle&&("none"==f.getStyle("display")||!f.getText()));for(f||(f=a);f.type!==CKEDITOR.NODE_TEXT;)f=!k||c||l?f.getChild(0):f.getChild(f.getChildCount()-1);for(h=e(f);null!=(l=g.exec(h))&&(n=l.index,c););if("number"!==typeof n&&!k)return d(f,c);if(k)c?n=0:(g=/([\.\b]*$)/,n=(l=g.exec(h))?l.index:h.length);else if(c&&(n+=
762
- 1,n>h.length))return d(f);return{node:f,offset:n}}var c=/\b\w+\b/ig,g,f,h,k,l;h=k=l=a.startContainer;for(g=e(h);null!=(f=c.exec(g));)if(f.index+f[0].length>=a.startOffset)return a=f.index,c=f.index+f[0].length,0===f.index&&(f=d(h,!0),k=f.node,a=f.offset),c>=g.length&&(g=d(h),l=g.node,c=g.offset),{startNode:k,startOffset:a,endNode:l,endOffset:c};return null},_filterStyles:function(a){var b=CKEDITOR.tools.isEmpty,e=[],d,c;for(c=0;c<a.length;c++)d=a[c]._.definition,-1!==CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary,
761
+ (e.element=b,a.copyFormatting.fire("extractFormatting",e,a)&&e.styleDef&&d.push(new CKEDITOR.style(e.styleDef)),b.getName&&-1!==l(CKEDITOR.plugins.copyformatting.breakOnElements,b.getName())))break;while((b=b.getParent())&&b.type===CKEDITOR.NODE_ELEMENT);return d},_extractStylesFromRange:function(a,b){for(var e=[],d=new CKEDITOR.dom.walker(b),c;c=d.next();)e=e.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a,c));return e},_removeStylesFromElementInRange:function(a,b){for(var e=-1!==
762
+ l(["ol","ul","table"],b),d=new CKEDITOR.dom.walker(a),c;c=d.next();)if(c=c.getAscendant(b,!0))if(c.removeAttributes(c.getAttributes()),e)break},_getSelectedWordOffset:function(a){function b(a,b){return a[b?"getPrevious":"getNext"](function(a){return a.type!==CKEDITOR.NODE_COMMENT})}function e(a){return a.type==CKEDITOR.NODE_ELEMENT?(a=a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g,""),a.replace(/<.*?>/g,"")):a.getText()}function d(a,c){var f=a,g=/\s/g,h="p br ol ul li td th div caption body".split(" "),
763
+ m=!1,k=!1,p,n;do{for(p=b(f,c);!p&&f.getParent();){f=f.getParent();if(-1!==l(h,f.getName())){k=m=!0;break}p=b(f,c)}if(p&&p.getName&&-1!==l(h,p.getName())){m=!0;break}f=p}while(f&&f.getStyle&&("none"==f.getStyle("display")||!f.getText()));for(f||(f=a);f.type!==CKEDITOR.NODE_TEXT;)f=!m||c||k?f.getChild(0):f.getChild(f.getChildCount()-1);for(h=e(f);null!=(k=g.exec(h))&&(n=k.index,c););if("number"!==typeof n&&!m)return d(f,c);if(m)c?n=0:(g=/([\.\b]*$)/,n=(k=g.exec(h))?k.index:h.length);else if(c&&(n+=
764
+ 1,n>h.length))return d(f);return{node:f,offset:n}}var c=/\b\w+\b/ig,f,g,h,m,k;h=m=k=a.startContainer;for(f=e(h);null!=(g=c.exec(f));)if(g.index+g[0].length>=a.startOffset)return a=g.index,c=g.index+g[0].length,0===g.index&&(g=d(h,!0),m=g.node,a=g.offset),c>=f.length&&(f=d(h),k=f.node,c=f.offset),{startNode:m,startOffset:a,endNode:k,endOffset:c};return null},_filterStyles:function(a){var b=CKEDITOR.tools.isEmpty,e=[],d,c;for(c=0;c<a.length;c++)d=a[c]._.definition,-1!==CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary,
763
765
  d.element)&&(d.element=a[c].element="span"),"span"===d.element&&b(d.attributes)&&b(d.styles)||e.push(a[c]);return e},_determineContext:function(a){function b(b){var d=new CKEDITOR.dom.walker(a),c;if(a.startContainer.getAscendant(b,!0)||a.endContainer.getAscendant(b,!0))return!0;for(;c=d.next();)if(c.getAscendant(b,!0))return!0}return b({ul:1,ol:1})?"list":b("table")?"table":"text"},_applyStylesToTextContext:function(a,b,e){var d=CKEDITOR.plugins.copyformatting,c=d.excludedAttributesFromInlineTransform,
764
- g,f;CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&a.getSelection().selectRanges([b]);for(g=0;g<e.length;g++)if(b=e[g],-1===m(d.excludedElementsFromInlineTransform,b.element)){if(-1!==m(d.elementsForInlineTransform,b.element))for(b.element=b._.definition.element="span",f=0;f<c.length;f++)b._.definition.attributes[c[f]]&&delete b._.definition.attributes[c[f]];b.apply(a)}},_applyStylesToListContext:function(a,b,e){var d,c,g;for(g=0;g<e.length;g++)d=e[g],c=b.createBookmark(),"ol"===d.element||"ul"===d.element?
765
- k(b,{ul:1,ol:1},function(a){var b=d;a.getName()!==b.element&&a.renameNode(b.element);b.applyToObject(a)},!0):"li"===d.element?k(b,"li",function(a){d.applyToObject(a)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a,b,[d]),b.moveToBookmark(c)},_applyStylesToTableContext:function(a,b,e){function d(a,b){a.getName()!==b.element&&(b=b.getDefinition(),b.element=a.getName(),b=new CKEDITOR.style(b));b.applyToObject(a)}var c,g;for(g=0;g<e.length;g++)c=e[g],-1!==m(["table","tr"],c.element)?k(b,
766
- c.element,function(a){c.applyToObject(a)}):-1!==m(["td","th"],c.element)?k(b,{td:1,th:1},function(a){d(a,c)}):-1!==m(["thead","tbody"],c.element)?k(b,{thead:1,tbody:1},function(a){d(a,c)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a,b,[c])},_applyFormat:function(a,b){var e=a.getSelection().getRanges()[0],d=CKEDITOR.plugins.copyformatting,c,g;if(!e)return!1;if(e.collapsed){g=a.getSelection().createBookmarks();if(!(c=d._getSelectedWordOffset(e)))return;e=a.createRange();e.setStart(c.startNode,
767
- c.startOffset);e.setEnd(c.endNode,c.endOffset);e.select()}b=d._filterStyles(b);if(!a.copyFormatting.fire("applyFormatting",{styles:b,range:e,preventFormatStripping:!1},a))return!1;g&&a.getSelection().selectBookmarks(g);return!0},_putScreenReaderMessage:function(a,b){this._getScreenReaderContainer().setText(a.lang.copyformatting.notification[b])},_addScreenReaderContainer:function(){return this._getScreenReaderContainer()?this._getScreenReaderContainer():CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_screen_reader_only cke_copyformatting_notification"\x3e\x3cdiv aria-live\x3d"polite"\x3e\x3c/div\x3e\x3c/div\x3e')).getChild(0)},
768
- _getScreenReaderContainer:function(){return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]")}};CKEDITOR.config.copyFormatting_outerCursor=!0;CKEDITOR.config.copyFormatting_allowRules="b s u i em strong span p div td th ol ul li(*)[*]{*}";CKEDITOR.config.copyFormatting_disallowRules="*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)";CKEDITOR.config.copyFormatting_allowedContexts=!0;CKEDITOR.config.copyFormatting_keystrokeCopy=CKEDITOR.CTRL+CKEDITOR.SHIFT+
769
- 67;CKEDITOR.config.copyFormatting_keystrokePaste=CKEDITOR.CTRL+CKEDITOR.SHIFT+86})();(function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(a){if(!a.blockless){var c=a.lang.div,b="div(*)";CKEDITOR.dialog.isTabEnabled(a,"editdiv","advanced")&&(b+=";div[dir,id,lang,title]{*}");a.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:b,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(a,c){this.setState("div"in(a.config.div_wrapTable?c.root:c.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:
766
+ f,g;CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&a.getSelection().selectRanges([b]);for(f=0;f<e.length;f++)if(b=e[f],-1===l(d.excludedElementsFromInlineTransform,b.element)){if(-1!==l(d.elementsForInlineTransform,b.element))for(b.element=b._.definition.element="span",g=0;g<c.length;g++)b._.definition.attributes[c[g]]&&delete b._.definition.attributes[c[g]];b.apply(a)}},_applyStylesToListContext:function(a,b,e){var d,c,f;for(f=0;f<e.length;f++)d=e[f],c=b.createBookmark(),"ol"===d.element||"ul"===d.element?
767
+ k(b,{ul:1,ol:1},function(a){var b=d;a.getName()!==b.element&&a.renameNode(b.element);b.applyToObject(a)},!0):"li"===d.element?k(b,"li",function(a){d.applyToObject(a)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a,b,[d]),b.moveToBookmark(c)},_applyStylesToTableContext:function(a,b,e){function d(a,b){a.getName()!==b.element&&(b=b.getDefinition(),b.element=a.getName(),b=new CKEDITOR.style(b));b.applyToObject(a)}var c,f,g;for(g=0;g<e.length;g++)c=e[g],f=b.createBookmark(),-1!==l(["table",
768
+ "tr"],c.element)?k(b,c.element,function(a){c.applyToObject(a)}):-1!==l(["td","th"],c.element)?k(b,{td:1,th:1},function(a){d(a,c)}):-1!==l(["thead","tbody"],c.element)?k(b,{thead:1,tbody:1},function(a){d(a,c)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a,b,[c]),b.moveToBookmark(f)},_applyFormat:function(a,b){var e=a.getSelection().getRanges()[0],d=CKEDITOR.plugins.copyformatting,c,f;if(!e)return!1;if(e.collapsed){f=a.getSelection().createBookmarks();if(!(c=d._getSelectedWordOffset(e)))return;
769
+ e=a.createRange();e.setStart(c.startNode,c.startOffset);e.setEnd(c.endNode,c.endOffset);e.select()}b=d._filterStyles(b);if(!a.copyFormatting.fire("applyFormatting",{styles:b,range:e,preventFormatStripping:!1},a))return!1;f&&a.getSelection().selectBookmarks(f);return!0},_putScreenReaderMessage:function(a,b){var e=this._getScreenReaderContainer();e&&e.setText(a.lang.copyformatting.notification[b])},_addScreenReaderContainer:function(){if(this._getScreenReaderContainer())return this._getScreenReaderContainer();
770
+ if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_screen_reader_only cke_copyformatting_notification"\x3e\x3cdiv aria-live\x3d"polite"\x3e\x3c/div\x3e\x3c/div\x3e')).getChild(0)},_getScreenReaderContainer:function(){if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]")}};CKEDITOR.config.copyFormatting_outerCursor=
771
+ !0;CKEDITOR.config.copyFormatting_allowRules="b s u i em strong span p div td th ol ul li(*)[*]{*}";CKEDITOR.config.copyFormatting_disallowRules="*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)";CKEDITOR.config.copyFormatting_allowedContexts=!0;CKEDITOR.config.copyFormatting_keystrokeCopy=CKEDITOR.CTRL+CKEDITOR.SHIFT+67;CKEDITOR.config.copyFormatting_keystrokePaste=CKEDITOR.CTRL+CKEDITOR.SHIFT+86})();(function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(a){if(!a.blockless){var c=a.lang.div,b="div(*)";CKEDITOR.dialog.isTabEnabled(a,"editdiv","advanced")&&(b+=";div[dir,id,lang,title]{*}");a.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:b,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(a,c){this.setState("div"in(a.config.div_wrapTable?c.root:c.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:
770
772
  CKEDITOR.TRISTATE_DISABLED)}}));a.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"}));a.addCommand("removediv",{requiredContent:"div",exec:function(a){function c(b){(b=CKEDITOR.plugins.div.getSurroundDiv(a,b))&&!b.data("cke-div-added")&&(f.push(b),b.data("cke-div-added"))}for(var b=a.getSelection(),g=b&&b.getRanges(),e,h=b.createBookmarks(),f=[],d=0;d<g.length;d++)e=g[d],e.collapsed?c(b.getStartElement()):(e=new CKEDITOR.dom.walker(e),e.evaluator=c,e.lastForward());
771
773
  for(d=0;d<f.length;d++)f[d].remove(!0);b.selectBookmarks(h)}});a.ui.addButton&&a.ui.addButton("CreateDiv",{label:c.toolbar,command:"creatediv",toolbar:"blocks,50"});a.addMenuItems&&(a.addMenuItems({editdiv:{label:c.edit,command:"editdiv",group:"div",order:1},removediv:{label:c.remove,command:"removediv",group:"div",order:5}}),a.contextMenu&&a.contextMenu.addListener(function(b){return!b||b.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(a)?{editdiv:CKEDITOR.TRISTATE_OFF,removediv:CKEDITOR.TRISTATE_OFF}:
772
774
  null}));CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js");CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}});CKEDITOR.plugins.div={getSurroundDiv:function(a,c){var b=a.elementPath(c);return a.elementPath(b.blockLimit).contains(function(a){return a.is("div")&&!a.isReadOnly()},1)}}})();CKEDITOR.plugins.add("resize",{init:function(b){function f(d){var e=c.width,m=c.height,f=e+(d.data.$.screenX-n.x)*("rtl"==g?-1:1);d=m+(d.data.$.screenY-n.y);h&&(e=Math.max(a.resize_minWidth,Math.min(f,a.resize_maxWidth)));p&&(m=Math.max(a.resize_minHeight,Math.min(d,a.resize_maxHeight)));b.resize(h?e:null,m)}function k(){CKEDITOR.document.removeListener("mousemove",f);CKEDITOR.document.removeListener("mouseup",k);b.document&&(b.document.removeListener("mousemove",f),b.document.removeListener("mouseup",
@@ -845,11 +847,11 @@ title:this.title,cls:this.className||"",titleJs:d.gecko&&!d.hc?"":(this.title||"
845
847
  c._.on=1;c.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(c.onOpen)c.onOpen();a.once("panelShow",function(){f.focus(!f.multiSelect&&c.getValue())})};e.onHide=function(b){this.element.removeClass(h);c.setState(c.modes&&c.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);c._.on=0;if(!b&&c.onClose)c.onClose()};e.onEscape=function(){e.hide(1)};f.onClick=function(a,b){c.onClick&&c.onClick.call(c,a,b);e.hide()};this._.panel=e;this._.list=f;e.getBlock(this.id).onHide=function(){c._.on=
846
848
  0;c.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,b){this._.value=a;var d=this.document.getById("cke_"+this.id+"_text");d&&(a||b?d.removeClass("cke_combo_inlinelabel"):(b=this.label,d.addClass("cke_combo_inlinelabel")),d.setText("undefined"!=typeof b?b:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},
847
849
  showAll:function(){this._.list.showAll()},add:function(a,b,d){this._.items[a]=d||a;this._.list.add(a,b,d)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var b=this.document.getById("cke_"+this.id);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");this._.state=
848
- a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}})();(function(){function n(a,c,k,d,q,n,u,w){var x=a.config,r=new CKEDITOR.style(u),f=q.split(";");q=[];for(var m={},g=0;g<f.length;g++){var l=f[g];if(l){var l=l.split("/"),v={},p=f[g]=l[0];v[k]=q[g]=l[1]||p;m[p]=new CKEDITOR.style(u,v);m[p]._.definition.name=p}else f.splice(g--,1)}a.ui.addRichCombo(c,{label:d.label,title:d.panelTitle,toolbar:"styles,"+w,allowedContent:r,requiredContent:r,contentTransformations:[[{element:"font",check:"span",left:function(b){return!!b.attributes.size||!!b.attributes.align||
849
- !!b.attributes.face},right:function(b){var a=" x-small small medium large x-large xx-large 48px".split(" ");b.name="span";b.attributes.size&&(b.styles["font-size"]=a[b.attributes.size],delete b.attributes.size);b.attributes.align&&(b.styles["text-align"]=b.attributes.align,delete b.attributes.align);b.attributes.face&&(b.styles["font-family"]=b.attributes.face,delete b.attributes.face)}}]],panel:{css:[CKEDITOR.skin.getPath("editor")].concat(x.contentsCss),multiSelect:!1,attributes:{"aria-label":d.panelTitle}},
850
- init:function(){this.startGroup(d.panelTitle);for(var b=0;b<f.length;b++){var a=f[b];this.add(a,m[a].buildPreview(),a)}},onClick:function(b){a.focus();a.fire("saveSnapshot");var c=this.getValue(),k=m[b];if(c&&b!=c){var d=m[c],e=a.getSelection().getRanges()[0];if(e.collapsed){var f=a.elementPath(),h=f.contains(function(a){return d.checkElementRemovable(a)});if(h){var g=e.checkBoundaryOfElement(h,CKEDITOR.START),l=e.checkBoundaryOfElement(h,CKEDITOR.END);if(g&&l){for(g=e.createBookmark();f=h.getFirst();)f.insertBefore(h);
851
- h.remove();e.moveToBookmark(g)}else g?e.moveToPosition(h,CKEDITOR.POSITION_BEFORE_START):l?e.moveToPosition(h,CKEDITOR.POSITION_AFTER_END):(e.splitElement(h),e.moveToPosition(h,CKEDITOR.POSITION_AFTER_END),t(e,f.elements.slice(),h));a.getSelection().selectRanges([e])}}else a.removeStyle(d)}a[c==b?"removeStyle":"applyStyle"](k);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();b=b.data.path.elements;for(var d=0,f;d<b.length;d++){f=b[d];for(var e in m)if(m[e].checkElementMatch(f,
852
- !0,a)){e!=c&&this.setValue(e);return}}this.setValue("",n)},this)},refresh:function(){a.activeFilter.check(r)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}function t(a,c,k){var d=c.pop();if(d){if(k)return t(a,c,d.equals(k)?null:k);k=d.clone();a.insertNode(k);a.moveToPosition(k,CKEDITOR.POSITION_AFTER_START);t(a,c)}}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(a){var c=a.config;n(a,"Font","family",a.lang.font,c.font_names,c.font_defaultLabel,c.font_style,30);n(a,"FontSize","size",
850
+ a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}})();(function(){function n(a,c,h,e,q,n,u,w){var x=a.config,r=new CKEDITOR.style(u),g=q.split(";");q=[];for(var m={},d=0;d<g.length;d++){var l=g[d];if(l){var l=l.split("/"),v={},p=g[d]=l[0];v[h]=q[d]=l[1]||p;m[p]=new CKEDITOR.style(u,v);m[p]._.definition.name=p}else g.splice(d--,1)}a.ui.addRichCombo(c,{label:e.label,title:e.panelTitle,toolbar:"styles,"+w,allowedContent:r,requiredContent:r,contentTransformations:[[{element:"font",check:"span",left:function(b){return!!b.attributes.size||!!b.attributes.align||
851
+ !!b.attributes.face},right:function(b){var a=" x-small small medium large x-large xx-large 48px".split(" ");b.name="span";b.attributes.size&&(b.styles["font-size"]=a[b.attributes.size],delete b.attributes.size);b.attributes.align&&(b.styles["text-align"]=b.attributes.align,delete b.attributes.align);b.attributes.face&&(b.styles["font-family"]=b.attributes.face,delete b.attributes.face)}}]],panel:{css:[CKEDITOR.skin.getPath("editor")].concat(x.contentsCss),multiSelect:!1,attributes:{"aria-label":e.panelTitle}},
852
+ init:function(){this.startGroup(e.panelTitle);for(var b=0;b<g.length;b++){var a=g[b];this.add(a,m[a].buildPreview(),a)}},onClick:function(b){a.focus();a.fire("saveSnapshot");var c=this.getValue(),h=m[b];if(c&&b!=c){var e=m[c],f=a.getSelection().getRanges()[0];if(f.collapsed){var g=a.elementPath(),k=g.contains(function(a){return e.checkElementRemovable(a)});if(k){var d=f.checkBoundaryOfElement(k,CKEDITOR.START),l=f.checkBoundaryOfElement(k,CKEDITOR.END);if(d&&l){for(d=f.createBookmark();g=k.getFirst();)g.insertBefore(k);
853
+ k.remove();f.moveToBookmark(d)}else d||l?f.moveToPosition(k,d?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(f.splitElement(k),f.moveToPosition(k,CKEDITOR.POSITION_AFTER_END)),t(f,g.elements.slice(),k);a.getSelection().selectRanges([f])}}else a.removeStyle(e)}a[c==b?"removeStyle":"applyStyle"](h);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();b=b.data.path.elements;for(var d=0,e;d<b.length;d++){e=b[d];for(var f in m)if(m[f].checkElementMatch(e,
854
+ !0,a)){f!=c&&this.setValue(f);return}}this.setValue("",n)},this)},refresh:function(){a.activeFilter.check(r)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}function t(a,c,h){var e=c.pop();if(e){if(h)return t(a,c,e.equals(h)?null:h);h=e.clone();a.insertNode(h);a.moveToPosition(h,CKEDITOR.POSITION_AFTER_START);t(a,c)}}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(a){var c=a.config;n(a,"Font","family",a.lang.font,c.font_names,c.font_defaultLabel,c.font_style,30);n(a,"FontSize","size",
853
855
  a.lang.font.fontSize,c.fontSize_sizes,c.fontSize_defaultLabel,c.fontSize_style,40)}})})();CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif";
854
856
  CKEDITOR.config.font_defaultLabel="";CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]};CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px";CKEDITOR.config.fontSize_defaultLabel="";CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]};CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n");CKEDITOR.addCss("img.cke_hidden{background-image: url("+CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}")},init:function(a){var b=a.lang,g=0,h={email:1,password:1,search:1,tel:1,text:1,url:1},l={checkbox:"input[type,name,checked,required]",
855
857
  radio:"input[type,name,checked,required]",textfield:"input[type,name,value,size,maxlength,required]",textarea:"textarea[cols,rows,name,required]",select:"select[name,size,multiple,required]; option[value,selected]",button:"input[type,name,value]",form:"form[action,name,id,enctype,target,method]",hiddenfield:"input[type,name,value]",imagebutton:"input[type,alt,src]{width,height,border,border-width,border-style,margin,float}"},m={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",
@@ -1025,7 +1027,7 @@ arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),a.com
1025
1027
  "99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",a.config.sourceAreaTabSize||4)));b.setAttribute("dir","ltr");b.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");a.ui.space("contents").append(b);b=a.editable(new c(a,b));b.setData(a.getData(1));CKEDITOR.env.ie&&(b.attachListener(a,"resize",d,b),b.attachListener(CKEDITOR.document.getWindow(),"resize",d,b),CKEDITOR.tools.setTimeout(d,0,b));a.fire("ariaWidget",
1026
1028
  this);e()});a.addCommand("source",f.commands.source);a.ui.addButton&&a.ui.addButton("Source",{label:a.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});a.on("mode",function(){a.getCommand("source").setState("source"==a.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var e=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var c=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},
1027
1029
  insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){c.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})})();
1028
- CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(c){"wysiwyg"==c.mode&&c.fire("saveSnapshot");c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);c.setMode("source"==c.mode?"wysiwyg":"source")},canUndo:!1}}};CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(a){var c=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var b=
1030
+ CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(c){"wysiwyg"==c.mode&&c.fire("saveSnapshot");c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);c.setMode("source"==c.mode?"wysiwyg":"source")},canUndo:!1}}};CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(a){var c=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var b=
1029
1031
  a.langCode,b=c.availableLangs[b]?b:c.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c.path+"dialogs/lang/"+b+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,c.langEntries[b]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}});CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" ");CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",onLoad:function(a){CKEDITOR.plugins.scayt.onLoadTimestamp=(new Date).getTime();"moono-lisa"==(CKEDITOR.skinName||a.config.skin)&&CKEDITOR.document.appendStyleSheet(this.path+"skins/"+CKEDITOR.skin.name+"/scayt.css")},init:function(a){var c=this,d=CKEDITOR.plugins.scayt;this.bindEvents(a);this.parseConfig(a);this.addRule(a);CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js"));
1030
1032
  this.addMenuItems(a);var b=a.lang.scayt,e=CKEDITOR.env;a.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:b.text_title,title:a.plugins.wsc?a.lang.wsc.title:b.text_title,modes:{wysiwyg:!(e.ie&&(8>e.version||e.quirks))},toolbar:"spellchecker,20",refresh:function(){var b=a.ui.instances.Scayt.getState();a.scayt&&(b=d.state.scayt[a.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);a.fire("scaytButtonState",b)},onRender:function(){var b=this;a.on("scaytButtonState",function(a){void 0!==typeof a.data&&b.setState(a.data)})},
1031
1033
  onMenu:function(){var b=a.scayt;a.getMenuItem("scaytToggle").label=a.lang.scayt[b&&d.state.scayt[a.name]?"btn_disable":"btn_enable"];b={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:a.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};a.config.scayt_uiTabs[0]||
@@ -1074,9 +1076,9 @@ CKEDITOR.on("scaytReady",function(){if(!0===CKEDITOR.config.scayt_handleCheckDir
1074
1076
  function(a){return function(){var b=this.scayt;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt?this._.previousValue=b.removeMarkupFromString(this.getSnapshot()):a.call(this)}})}if(!0===CKEDITOR.config.scayt_handleUndoRedo){var a=CKEDITOR.plugins.undo.Image.prototype,c="function"==typeof a.equalsContent?"equalsContent":"equals";a[c]=CKEDITOR.tools.override(a[c],function(a){return function(b){var c=b.editor.scayt,f=this.contents,g=b.contents,h=null;CKEDITOR.plugins.scayt&&
1075
1077
  CKEDITOR.plugins.scayt.state.scayt[b.editor.name]&&b.editor.scayt&&(this.contents=c.removeMarkupFromString(f)||"",b.contents=c.removeMarkupFromString(g)||"");h=a.apply(this,arguments);this.contents=f;b.contents=g;return h}})}});(function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(c){var l=c.config,g=c.lang.stylescombo,f={},k=[],m=[];c.on("stylesSet",function(b){if(b=b.data.styles){for(var a,h,d,e=0,n=b.length;e<n;e++)(a=b[e],c.blockless&&a.element in CKEDITOR.dtd.$block||"string"==typeof a.type&&!CKEDITOR.style.customHandlers[a.type]||(h=a.name,a=new CKEDITOR.style(a),c.filter.customConfig&&!c.filter.check(a)))||(a._name=h,a._.enterMode=l.enterMode,a._.type=d=a.assignedTo||a.type,a._.weight=
1076
1078
  e+1E3*(d==CKEDITOR.STYLE_OBJECT?1:d==CKEDITOR.STYLE_BLOCK?2:3),f[h]=a,k.push(a),m.push(a));k.sort(function(a,b){return a._.weight-b._.weight})}});c.ui.addRichCombo("Styles",{label:g.label,title:g.panelTitle,toolbar:"styles,10",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),multiSelect:!0,attributes:{"aria-label":g.panelTitle}},init:function(){var b,a,c,d,e,f;e=0;for(f=k.length;e<f;e++)b=k[e],a=b._name,d=b._.type,d!=c&&(this.startGroup(g["panelTitle"+String(d)]),
1077
- c=d),this.add(a,b.type==CKEDITOR.STYLE_OBJECT?a:b.buildPreview(),a);this.commit()},onClick:function(b){c.focus();c.fire("saveSnapshot");b=f[b];var a=c.elementPath();c[b.checkActive(a,c)?"removeStyle":"applyStyle"](b);c.fire("saveSnapshot")},onRender:function(){c.on("selectionChange",function(b){var a=this.getValue();b=b.data.path.elements;for(var h=0,d=b.length,e;h<d;h++){e=b[h];for(var g in f)if(f[g].checkElementRemovable(e,!0,c)){g!=a&&this.setValue(g);return}}this.setValue("")},this)},onOpen:function(){var b=
1078
- c.getSelection().getSelectedElement(),b=c.elementPath(b),a=[0,0,0,0];this.showAll();this.unmarkAll();for(var h in f){var d=f[h],e=d._.type;d.checkApplicable(b,c,c.activeFilter)?a[e]++:this.hideItem(h);d.checkActive(b,c)&&this.mark(h)}a[CKEDITOR.STYLE_BLOCK]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);a[CKEDITOR.STYLE_INLINE]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);a[CKEDITOR.STYLE_OBJECT]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var b=
1079
- c.elementPath();if(b){for(var a in f)if(f[a].checkApplicable(b,c,c.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){f={};k=[]}})}})})();(function(){function k(c){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(d){if(d.editable().hasFocus){var e=d.getSelection(),b;if(b=(new CKEDITOR.dom.elementPath(e.getCommonAncestor(),e.root)).contains({td:1,th:1},1)){var e=d.createRange(),a=CKEDITOR.tools.tryThese(function(){var a=b.getParent().$.cells[b.$.cellIndex+(c?-1:1)];a.parentNode.parentNode;return a},function(){var a=b.getParent(),a=a.getAscendant("table").$.rows[a.$.rowIndex+(c?-1:1)];return a.cells[c?a.cells.length-1:
1079
+ c=d),this.add(a,b.type==CKEDITOR.STYLE_OBJECT?a:b.buildPreview(),a);this.commit()},onClick:function(b){c.focus();c.fire("saveSnapshot");b=f[b];var a=c.elementPath();if(b.group&&b.removeStylesFromSameGroup(c))c.applyStyle(b);else c[b.checkActive(a,c)?"removeStyle":"applyStyle"](b);c.fire("saveSnapshot")},onRender:function(){c.on("selectionChange",function(b){var a=this.getValue();b=b.data.path.elements;for(var h=0,d=b.length,e;h<d;h++){e=b[h];for(var g in f)if(f[g].checkElementRemovable(e,!0,c)){g!=
1080
+ a&&this.setValue(g);return}}this.setValue("")},this)},onOpen:function(){var b=c.getSelection().getSelectedElement(),b=c.elementPath(b),a=[0,0,0,0];this.showAll();this.unmarkAll();for(var h in f){var d=f[h],e=d._.type;d.checkApplicable(b,c,c.activeFilter)?a[e]++:this.hideItem(h);d.checkActive(b,c)&&this.mark(h)}a[CKEDITOR.STYLE_BLOCK]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);a[CKEDITOR.STYLE_INLINE]||this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);a[CKEDITOR.STYLE_OBJECT]||
1081
+ this.hideGroup(g["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var b=c.elementPath();if(b){for(var a in f)if(f[a].checkApplicable(b,c,c.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){f={};k=[]}})}})})();(function(){function k(c){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(d){if(d.editable().hasFocus){var e=d.getSelection(),b;if(b=(new CKEDITOR.dom.elementPath(e.getCommonAncestor(),e.root)).contains({td:1,th:1},1)){var e=d.createRange(),a=CKEDITOR.tools.tryThese(function(){var a=b.getParent().$.cells[b.$.cellIndex+(c?-1:1)];a.parentNode.parentNode;return a},function(){var a=b.getParent(),a=a.getAscendant("table").$.rows[a.$.rowIndex+(c?-1:1)];return a.cells[c?a.cells.length-1:
1080
1082
  0]});if(a||c)if(a)a=new CKEDITOR.dom.element(a),e.moveToElementEditStart(a),e.checkStartOfBlock()&&e.checkEndOfBlock()||e.selectNodeContents(a);else return!0;else{for(var f=b.getAscendant("table").$,a=b.getParent().$.cells,f=new CKEDITOR.dom.element(f.insertRow(-1),d.document),g=0,h=a.length;g<h;g++)f.append((new CKEDITOR.dom.element(a[g],d.document)).clone(!1,!1)).appendBogus();e.moveToElementEditStart(f)}e.select(!0);return!0}}return!1}}}var h={editorFocus:!1,modes:{wysiwyg:1,source:1}},g={exec:function(c){c.container.focusNext(!0,
1081
1083
  c.tabIndex)}},f={exec:function(c){c.container.focusPrevious(!0,c.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(c){for(var d=!1!==c.config.enableTabKeyTools,e=c.config.tabSpaces||0,b="";e--;)b+=" ";if(b)c.on("key",function(a){9==a.data.keyCode&&(c.insertText(b),a.cancel())});if(d)c.on("key",function(a){(9==a.data.keyCode&&c.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&c.execCommand("selectPreviousCell"))&&a.cancel()});c.addCommand("blur",CKEDITOR.tools.extend(g,h));c.addCommand("blurBack",
1082
1084
  CKEDITOR.tools.extend(f,h));c.addCommand("selectNextCell",k());c.addCommand("selectPreviousCell",k(!0))}})})();
@@ -1130,4 +1132,4 @@ null,null,999);b.attachListener(this.undoManager.editor,"blur",function(){c.keyE
1130
1132
  null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==typeof a)this.getLast(a).inputs=0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}})();CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(a){a.config.wsc_onFinish="function"===typeof a.config.wsc_onFinish?a.config.wsc_onFinish:function(){};a.config.wsc_onClose="function"===typeof a.config.wsc_onClose?a.config.wsc_onClose:function(){}},parseConfig:function(a){a.config.wsc_customerId=a.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk";a.config.wsc_customDictionaryIds=a.config.wsc_customDictionaryIds||
1131
1133
  CKEDITOR.config.wsc_customDictionaryIds||"";a.config.wsc_userDictionaryName=a.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||"";a.config.wsc_customLoaderScript=a.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript;a.config.wsc_interfaceLang=a.config.wsc_interfaceLang;CKEDITOR.config.wsc_cmd=a.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell";CKEDITOR.config.wsc_version="v4.3.0-master-d769233";CKEDITOR.config.wsc_removeGlobalVariable=!0},onLoad:function(a){"moono-lisa"==
1132
1134
  (CKEDITOR.skinName||a.config.skin)&&CKEDITOR.document.appendStyleSheet(this.path+"skins/"+CKEDITOR.skin.name+"/wsc.css")},init:function(a){var b=CKEDITOR.env;this.parseConfig(a);this.parseApi(a);a.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname&&!(b.ie&&(8>b.version||b.quirks))};"undefined"==typeof a.plugins.scayt&&a.ui.addButton&&a.ui.addButton("SpellChecker",{label:a.lang.wsc.toolbar,
1133
- click:function(a){var b=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();(b=b.replace(/\s/g,""))?a.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"});CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&7>=CKEDITOR.env.version?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}});CKEDITOR.config.plugins='dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,copyformatting,div,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc';CKEDITOR.config.skin='moono-lisa';(function() {var setIcons = function(icons, strip) {var path = CKEDITOR.getUrl( 'plugins/' + strip );icons = icons.split( ',' );for ( var i = 0; i < icons.length; i++ )CKEDITOR.skin.icons[ icons[ i ] ] = { path: path, offset: -icons[ ++i ], bgsize : icons[ ++i ] };};if (CKEDITOR.env.hidpi) setIcons('about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,templates-rtl,432,,templates,456,,copyformatting,480,,creatediv,504,,find-rtl,528,,find,552,,replace,576,,flash,600,,button,624,,checkbox,648,,form,672,,hiddenfield,696,,imagebutton,720,,radio,744,,select-rtl,768,,select,792,,textarea-rtl,816,,textarea,840,,textfield-rtl,864,,textfield,888,,horizontalrule,912,,iframe,936,,image,960,,indent-rtl,984,,indent,1008,,outdent-rtl,1032,,outdent,1056,,smiley,1080,,justifyblock,1104,,justifycenter,1128,,justifyleft,1152,,justifyright,1176,,language,1200,,anchor-rtl,1224,,anchor,1248,,link,1272,,unlink,1296,,bulletedlist-rtl,1320,,bulletedlist,1344,,numberedlist-rtl,1368,,numberedlist,1392,,maximize,1416,,newpage-rtl,1440,,newpage,1464,,pagebreak-rtl,1488,,pagebreak,1512,,pastetext-rtl,1536,,pastetext,1560,,pastefromword-rtl,1584,,pastefromword,1608,,preview-rtl,1632,,preview,1656,,print,1680,,removeformat,1704,,save,1728,,selectall,1752,,showblocks-rtl,1776,,showblocks,1800,,source-rtl,1824,,source,1848,,specialchar,1872,,scayt,1896,,table,1920,,redo-rtl,1944,,redo,1968,,undo-rtl,1992,,undo,2016,,spellchecker,2040,','icons_hidpi.png');else setIcons('about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,templates-rtl,432,auto,templates,456,auto,copyformatting,480,auto,creatediv,504,auto,find-rtl,528,auto,find,552,auto,replace,576,auto,flash,600,auto,button,624,auto,checkbox,648,auto,form,672,auto,hiddenfield,696,auto,imagebutton,720,auto,radio,744,auto,select-rtl,768,auto,select,792,auto,textarea-rtl,816,auto,textarea,840,auto,textfield-rtl,864,auto,textfield,888,auto,horizontalrule,912,auto,iframe,936,auto,image,960,auto,indent-rtl,984,auto,indent,1008,auto,outdent-rtl,1032,auto,outdent,1056,auto,smiley,1080,auto,justifyblock,1104,auto,justifycenter,1128,auto,justifyleft,1152,auto,justifyright,1176,auto,language,1200,auto,anchor-rtl,1224,auto,anchor,1248,auto,link,1272,auto,unlink,1296,auto,bulletedlist-rtl,1320,auto,bulletedlist,1344,auto,numberedlist-rtl,1368,auto,numberedlist,1392,auto,maximize,1416,auto,newpage-rtl,1440,auto,newpage,1464,auto,pagebreak-rtl,1488,auto,pagebreak,1512,auto,pastetext-rtl,1536,auto,pastetext,1560,auto,pastefromword-rtl,1584,auto,pastefromword,1608,auto,preview-rtl,1632,auto,preview,1656,auto,print,1680,auto,removeformat,1704,auto,save,1728,auto,selectall,1752,auto,showblocks-rtl,1776,auto,showblocks,1800,auto,source-rtl,1824,auto,source,1848,auto,specialchar,1872,auto,scayt,1896,auto,table,1920,auto,redo-rtl,1944,auto,redo,1968,auto,undo-rtl,1992,auto,undo,2016,auto,spellchecker,2040,auto','icons.png');})();CKEDITOR.lang.languages={"af":1,"sq":1,"ar":1,"eu":1,"bn":1,"bs":1,"bg":1,"ca":1,"zh-cn":1,"zh":1,"hr":1,"cs":1,"da":1,"nl":1,"en":1,"en-au":1,"en-ca":1,"en-gb":1,"eo":1,"et":1,"fo":1,"fi":1,"fr":1,"fr-ca":1,"gl":1,"ka":1,"de":1,"de-ch":1,"el":1,"gu":1,"he":1,"hi":1,"hu":1,"is":1,"id":1,"it":1,"ja":1,"km":1,"ko":1,"ku":1,"lv":1,"lt":1,"mk":1,"ms":1,"mn":1,"no":1,"nb":1,"oc":1,"fa":1,"pl":1,"pt-br":1,"pt":1,"ro":1,"ru":1,"sr":1,"sr-latn":1,"si":1,"sk":1,"sl":1,"es":1,"sv":1,"tt":1,"th":1,"tr":1,"ug":1,"uk":1,"vi":1,"cy":1};}());
1135
+ click:function(a){var b=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();(b=b.replace(/\s/g,""))?a.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"});CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&7>=CKEDITOR.env.version?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}});CKEDITOR.config.plugins='dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,copyformatting,div,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc';CKEDITOR.config.skin='moono-lisa';(function() {var setIcons = function(icons, strip) {var path = CKEDITOR.getUrl( 'plugins/' + strip );icons = icons.split( ',' );for ( var i = 0; i < icons.length; i++ )CKEDITOR.skin.icons[ icons[ i ] ] = { path: path, offset: -icons[ ++i ], bgsize : icons[ ++i ] };};if (CKEDITOR.env.hidpi) setIcons('about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,templates-rtl,432,,templates,456,,copyformatting,480,,creatediv,504,,find-rtl,528,,find,552,,replace,576,,flash,600,,button,624,,checkbox,648,,form,672,,hiddenfield,696,,imagebutton,720,,radio,744,,select-rtl,768,,select,792,,textarea-rtl,816,,textarea,840,,textfield-rtl,864,,textfield,888,,horizontalrule,912,,iframe,936,,image,960,,indent-rtl,984,,indent,1008,,outdent-rtl,1032,,outdent,1056,,smiley,1080,,justifyblock,1104,,justifycenter,1128,,justifyleft,1152,,justifyright,1176,,language,1200,,anchor-rtl,1224,,anchor,1248,,link,1272,,unlink,1296,,bulletedlist-rtl,1320,,bulletedlist,1344,,numberedlist-rtl,1368,,numberedlist,1392,,maximize,1416,,newpage-rtl,1440,,newpage,1464,,pagebreak-rtl,1488,,pagebreak,1512,,pastetext-rtl,1536,,pastetext,1560,,pastefromword-rtl,1584,,pastefromword,1608,,preview-rtl,1632,,preview,1656,,print,1680,,removeformat,1704,,save,1728,,selectall,1752,,showblocks-rtl,1776,,showblocks,1800,,source-rtl,1824,,source,1848,,specialchar,1872,,scayt,1896,,table,1920,,redo-rtl,1944,,redo,1968,,undo-rtl,1992,,undo,2016,,spellchecker,2040,','icons_hidpi.png');else setIcons('about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,templates-rtl,432,auto,templates,456,auto,copyformatting,480,auto,creatediv,504,auto,find-rtl,528,auto,find,552,auto,replace,576,auto,flash,600,auto,button,624,auto,checkbox,648,auto,form,672,auto,hiddenfield,696,auto,imagebutton,720,auto,radio,744,auto,select-rtl,768,auto,select,792,auto,textarea-rtl,816,auto,textarea,840,auto,textfield-rtl,864,auto,textfield,888,auto,horizontalrule,912,auto,iframe,936,auto,image,960,auto,indent-rtl,984,auto,indent,1008,auto,outdent-rtl,1032,auto,outdent,1056,auto,smiley,1080,auto,justifyblock,1104,auto,justifycenter,1128,auto,justifyleft,1152,auto,justifyright,1176,auto,language,1200,auto,anchor-rtl,1224,auto,anchor,1248,auto,link,1272,auto,unlink,1296,auto,bulletedlist-rtl,1320,auto,bulletedlist,1344,auto,numberedlist-rtl,1368,auto,numberedlist,1392,auto,maximize,1416,auto,newpage-rtl,1440,auto,newpage,1464,auto,pagebreak-rtl,1488,auto,pagebreak,1512,auto,pastetext-rtl,1536,auto,pastetext,1560,auto,pastefromword-rtl,1584,auto,pastefromword,1608,auto,preview-rtl,1632,auto,preview,1656,auto,print,1680,auto,removeformat,1704,auto,save,1728,auto,selectall,1752,auto,showblocks-rtl,1776,auto,showblocks,1800,auto,source-rtl,1824,auto,source,1848,auto,specialchar,1872,auto,scayt,1896,auto,table,1920,auto,redo-rtl,1944,auto,redo,1968,auto,undo-rtl,1992,auto,undo,2016,auto,spellchecker,2040,auto','icons.png');})();CKEDITOR.lang.languages={"af":1,"sq":1,"ar":1,"az":1,"eu":1,"bn":1,"bs":1,"bg":1,"ca":1,"zh-cn":1,"zh":1,"hr":1,"cs":1,"da":1,"nl":1,"en":1,"en-au":1,"en-ca":1,"en-gb":1,"eo":1,"et":1,"fo":1,"fi":1,"fr":1,"fr-ca":1,"gl":1,"ka":1,"de":1,"de-ch":1,"el":1,"gu":1,"he":1,"hi":1,"hu":1,"is":1,"id":1,"it":1,"ja":1,"km":1,"ko":1,"ku":1,"lv":1,"lt":1,"mk":1,"ms":1,"mn":1,"no":1,"nb":1,"oc":1,"fa":1,"pl":1,"pt-br":1,"pt":1,"ro":1,"ru":1,"sr":1,"sr-latn":1,"si":1,"sk":1,"sl":1,"es":1,"sv":1,"tt":1,"th":1,"tr":1,"ug":1,"uk":1,"vi":1,"cy":1};}());