jodit-pro 4.18.17 → 4.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/es2015/jodit.css +2 -2
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +19 -13
  4. package/es2015/jodit.js +2510 -261
  5. package/es2015/jodit.min.css +1 -1
  6. package/es2015/jodit.min.js +46 -40
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  8. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  9. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  11. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  12. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  13. package/es2015/plugins/backup/backup.css +1 -1
  14. package/es2015/plugins/backup/backup.js +1 -1
  15. package/es2015/plugins/backup/backup.min.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.css +1 -1
  17. package/es2015/plugins/button-generator/button-generator.js +1 -1
  18. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  19. package/es2015/plugins/change-case/change-case.js +1 -1
  20. package/es2015/plugins/change-case/change-case.min.js +1 -1
  21. package/es2015/plugins/chart/chart.css +1 -1
  22. package/es2015/plugins/chart/chart.js +1 -1
  23. package/es2015/plugins/chart/chart.min.js +1 -1
  24. package/es2015/plugins/color-picker/color-picker.css +1 -1
  25. package/es2015/plugins/color-picker/color-picker.js +1 -1
  26. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  27. package/es2015/plugins/emoji/emoji.css +1 -1
  28. package/es2015/plugins/emoji/emoji.js +1 -1
  29. package/es2015/plugins/emoji/emoji.min.js +1 -1
  30. package/es2015/plugins/export-docs/export-docs.js +1 -1
  31. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  32. package/es2015/plugins/finder/finder.css +1 -1
  33. package/es2015/plugins/finder/finder.js +1 -1
  34. package/es2015/plugins/finder/finder.min.js +1 -1
  35. package/es2015/plugins/google-maps/google-maps.css +1 -1
  36. package/es2015/plugins/google-maps/google-maps.js +1 -1
  37. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  38. package/es2015/plugins/google-search/google-search.js +1 -1
  39. package/es2015/plugins/google-search/google-search.min.js +1 -1
  40. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  41. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  42. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  43. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  44. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  45. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  46. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  47. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  48. package/es2015/plugins/keyboard/keyboard.css +1 -1
  49. package/es2015/plugins/keyboard/keyboard.js +1 -1
  50. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  51. package/es2015/plugins/math/math.css +1 -1
  52. package/es2015/plugins/math/math.js +1 -1
  53. package/es2015/plugins/math/math.min.js +1 -1
  54. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  55. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  56. package/es2015/plugins/page-break/page-break.js +1 -1
  57. package/es2015/plugins/page-break/page-break.min.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.css +1 -1
  59. package/es2015/plugins/paste-code/paste-code.js +1 -1
  60. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  61. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  62. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  63. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  64. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  65. package/es2015/plugins/style/style.css +1 -1
  66. package/es2015/plugins/style/style.js +1 -1
  67. package/es2015/plugins/style/style.min.js +1 -1
  68. package/es2015/plugins/templates/templates.css +1 -1
  69. package/es2015/plugins/templates/templates.js +1 -1
  70. package/es2015/plugins/templates/templates.min.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.css +1 -1
  72. package/es2015/plugins/todo-list/todo-list.js +1 -1
  73. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  74. package/es2015/plugins/translate/translate.css +1 -1
  75. package/es2015/plugins/translate/translate.js +1 -1
  76. package/es2015/plugins/translate/translate.min.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.css +1 -1
  78. package/es2015/plugins/tune-block/tune-block.js +1 -1
  79. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  80. package/es2018/jodit.fat.min.css +1 -1
  81. package/es2018/jodit.fat.min.js +19 -13
  82. package/es2018/jodit.min.css +1 -1
  83. package/es2018/jodit.min.js +18 -12
  84. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  85. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  86. package/es2018/plugins/backup/backup.min.js +1 -1
  87. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  88. package/es2018/plugins/change-case/change-case.min.js +1 -1
  89. package/es2018/plugins/chart/chart.min.js +1 -1
  90. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  91. package/es2018/plugins/emoji/emoji.min.js +1 -1
  92. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  93. package/es2018/plugins/finder/finder.min.js +1 -1
  94. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  95. package/es2018/plugins/google-search/google-search.min.js +1 -1
  96. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  97. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  98. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  99. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  100. package/es2018/plugins/math/math.min.js +1 -1
  101. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  102. package/es2018/plugins/page-break/page-break.min.js +1 -1
  103. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  104. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  105. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  106. package/es2018/plugins/style/style.min.js +1 -1
  107. package/es2018/plugins/templates/templates.min.js +1 -1
  108. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  109. package/es2018/plugins/translate/translate.min.js +1 -1
  110. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  111. package/es2021/jodit.css +2 -2
  112. package/es2021/jodit.fat.min.css +1 -1
  113. package/es2021/jodit.fat.min.js +28 -21
  114. package/es2021/jodit.js +2462 -261
  115. package/es2021/jodit.min.css +1 -1
  116. package/es2021/jodit.min.js +26 -19
  117. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  118. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  119. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  120. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  121. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  122. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  123. package/es2021/plugins/backup/backup.css +1 -1
  124. package/es2021/plugins/backup/backup.js +1 -1
  125. package/es2021/plugins/backup/backup.min.js +1 -1
  126. package/es2021/plugins/button-generator/button-generator.css +1 -1
  127. package/es2021/plugins/button-generator/button-generator.js +1 -1
  128. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  129. package/es2021/plugins/change-case/change-case.js +1 -1
  130. package/es2021/plugins/change-case/change-case.min.js +1 -1
  131. package/es2021/plugins/chart/chart.css +1 -1
  132. package/es2021/plugins/chart/chart.js +1 -1
  133. package/es2021/plugins/chart/chart.min.js +1 -1
  134. package/es2021/plugins/color-picker/color-picker.css +1 -1
  135. package/es2021/plugins/color-picker/color-picker.js +1 -1
  136. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  137. package/es2021/plugins/emoji/emoji.css +1 -1
  138. package/es2021/plugins/emoji/emoji.js +1 -1
  139. package/es2021/plugins/emoji/emoji.min.js +1 -1
  140. package/es2021/plugins/export-docs/export-docs.js +1 -1
  141. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  142. package/es2021/plugins/finder/finder.css +1 -1
  143. package/es2021/plugins/finder/finder.js +1 -1
  144. package/es2021/plugins/finder/finder.min.js +1 -1
  145. package/es2021/plugins/google-maps/google-maps.css +1 -1
  146. package/es2021/plugins/google-maps/google-maps.js +1 -1
  147. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  148. package/es2021/plugins/google-search/google-search.js +1 -1
  149. package/es2021/plugins/google-search/google-search.min.js +1 -1
  150. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  151. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  152. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  153. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  154. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  155. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  156. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  157. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  158. package/es2021/plugins/keyboard/keyboard.css +1 -1
  159. package/es2021/plugins/keyboard/keyboard.js +1 -1
  160. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  161. package/es2021/plugins/math/math.css +1 -1
  162. package/es2021/plugins/math/math.js +1 -1
  163. package/es2021/plugins/math/math.min.js +1 -1
  164. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  165. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  166. package/es2021/plugins/page-break/page-break.js +1 -1
  167. package/es2021/plugins/page-break/page-break.min.js +1 -1
  168. package/es2021/plugins/paste-code/paste-code.css +1 -1
  169. package/es2021/plugins/paste-code/paste-code.js +1 -1
  170. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  171. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  172. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  173. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  174. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  175. package/es2021/plugins/style/style.css +1 -1
  176. package/es2021/plugins/style/style.js +1 -1
  177. package/es2021/plugins/style/style.min.js +1 -1
  178. package/es2021/plugins/templates/templates.css +1 -1
  179. package/es2021/plugins/templates/templates.js +1 -1
  180. package/es2021/plugins/templates/templates.min.js +1 -1
  181. package/es2021/plugins/todo-list/todo-list.css +1 -1
  182. package/es2021/plugins/todo-list/todo-list.js +1 -1
  183. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  184. package/es2021/plugins/translate/translate.css +1 -1
  185. package/es2021/plugins/translate/translate.js +1 -1
  186. package/es2021/plugins/translate/translate.min.js +1 -1
  187. package/es2021/plugins/tune-block/tune-block.css +1 -1
  188. package/es2021/plugins/tune-block/tune-block.js +1 -1
  189. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  190. package/es2021.en/jodit.css +2 -2
  191. package/es2021.en/jodit.fat.min.css +1 -1
  192. package/es2021.en/jodit.fat.min.js +27 -20
  193. package/es2021.en/jodit.js +2462 -261
  194. package/es2021.en/jodit.min.css +1 -1
  195. package/es2021.en/jodit.min.js +24 -17
  196. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  197. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  198. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  199. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  200. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  201. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  202. package/es2021.en/plugins/backup/backup.css +1 -1
  203. package/es2021.en/plugins/backup/backup.js +1 -1
  204. package/es2021.en/plugins/backup/backup.min.js +1 -1
  205. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  206. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  207. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  208. package/es2021.en/plugins/change-case/change-case.js +1 -1
  209. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  210. package/es2021.en/plugins/chart/chart.css +1 -1
  211. package/es2021.en/plugins/chart/chart.js +1 -1
  212. package/es2021.en/plugins/chart/chart.min.js +1 -1
  213. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  214. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  215. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  216. package/es2021.en/plugins/emoji/emoji.css +1 -1
  217. package/es2021.en/plugins/emoji/emoji.js +1 -1
  218. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  219. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  220. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  221. package/es2021.en/plugins/finder/finder.css +1 -1
  222. package/es2021.en/plugins/finder/finder.js +1 -1
  223. package/es2021.en/plugins/finder/finder.min.js +1 -1
  224. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  225. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  226. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  227. package/es2021.en/plugins/google-search/google-search.js +1 -1
  228. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  229. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  230. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  231. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  232. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  233. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  234. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  235. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  236. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  237. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  238. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  239. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  240. package/es2021.en/plugins/math/math.css +1 -1
  241. package/es2021.en/plugins/math/math.js +1 -1
  242. package/es2021.en/plugins/math/math.min.js +1 -1
  243. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  244. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  245. package/es2021.en/plugins/page-break/page-break.js +1 -1
  246. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  247. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  248. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  249. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  250. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  251. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  252. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  253. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  254. package/es2021.en/plugins/style/style.css +1 -1
  255. package/es2021.en/plugins/style/style.js +1 -1
  256. package/es2021.en/plugins/style/style.min.js +1 -1
  257. package/es2021.en/plugins/templates/templates.css +1 -1
  258. package/es2021.en/plugins/templates/templates.js +1 -1
  259. package/es2021.en/plugins/templates/templates.min.js +1 -1
  260. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  261. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  262. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  263. package/es2021.en/plugins/translate/translate.css +1 -1
  264. package/es2021.en/plugins/translate/translate.js +1 -1
  265. package/es2021.en/plugins/translate/translate.min.js +1 -1
  266. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  267. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  268. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  269. package/es5/jodit.css +3 -3
  270. package/es5/jodit.fat.min.css +1 -1
  271. package/es5/jodit.fat.min.js +2 -2
  272. package/es5/jodit.js +3280 -407
  273. package/es5/jodit.min.css +3 -3
  274. package/es5/jodit.min.js +2 -2
  275. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  276. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  277. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  278. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  279. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  280. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  281. package/es5/plugins/backup/backup.css +1 -1
  282. package/es5/plugins/backup/backup.js +1 -1
  283. package/es5/plugins/backup/backup.min.js +1 -1
  284. package/es5/plugins/button-generator/button-generator.css +1 -1
  285. package/es5/plugins/button-generator/button-generator.js +1 -1
  286. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  287. package/es5/plugins/change-case/change-case.js +1 -1
  288. package/es5/plugins/change-case/change-case.min.js +1 -1
  289. package/es5/plugins/chart/chart.css +1 -1
  290. package/es5/plugins/chart/chart.js +1 -1
  291. package/es5/plugins/chart/chart.min.js +1 -1
  292. package/es5/plugins/color-picker/color-picker.css +1 -1
  293. package/es5/plugins/color-picker/color-picker.js +1 -1
  294. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  295. package/es5/plugins/emoji/emoji.css +1 -1
  296. package/es5/plugins/emoji/emoji.js +1 -1
  297. package/es5/plugins/emoji/emoji.min.js +1 -1
  298. package/es5/plugins/export-docs/export-docs.js +1 -1
  299. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  300. package/es5/plugins/finder/finder.css +1 -1
  301. package/es5/plugins/finder/finder.js +1 -1
  302. package/es5/plugins/finder/finder.min.js +1 -1
  303. package/es5/plugins/google-maps/google-maps.css +1 -1
  304. package/es5/plugins/google-maps/google-maps.js +1 -1
  305. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  306. package/es5/plugins/google-search/google-search.js +1 -1
  307. package/es5/plugins/google-search/google-search.min.js +1 -1
  308. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  309. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  310. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  311. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  312. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  313. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  314. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  315. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  316. package/es5/plugins/keyboard/keyboard.css +1 -1
  317. package/es5/plugins/keyboard/keyboard.js +1 -1
  318. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  319. package/es5/plugins/math/math.css +1 -1
  320. package/es5/plugins/math/math.js +1 -1
  321. package/es5/plugins/math/math.min.js +1 -1
  322. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  323. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  324. package/es5/plugins/page-break/page-break.js +1 -1
  325. package/es5/plugins/page-break/page-break.min.js +1 -1
  326. package/es5/plugins/paste-code/paste-code.css +1 -1
  327. package/es5/plugins/paste-code/paste-code.js +1 -1
  328. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  329. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  330. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  331. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  332. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  333. package/es5/plugins/style/style.css +1 -1
  334. package/es5/plugins/style/style.js +1 -1
  335. package/es5/plugins/style/style.min.js +1 -1
  336. package/es5/plugins/templates/templates.css +1 -1
  337. package/es5/plugins/templates/templates.js +1 -1
  338. package/es5/plugins/templates/templates.min.js +1 -1
  339. package/es5/plugins/todo-list/todo-list.css +1 -1
  340. package/es5/plugins/todo-list/todo-list.js +1 -1
  341. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  342. package/es5/plugins/translate/translate.css +1 -1
  343. package/es5/plugins/translate/translate.js +1 -1
  344. package/es5/plugins/translate/translate.min.js +1 -1
  345. package/es5/plugins/tune-block/tune-block.css +1 -1
  346. package/es5/plugins/tune-block/tune-block.js +1 -1
  347. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  348. package/es5/polyfills.fat.min.js +1 -1
  349. package/es5/polyfills.js +1 -1
  350. package/es5/polyfills.min.js +1 -1
  351. package/package.json +1 -1
package/es2015/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.17
4
+ * Version: v4.19.2
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -741,7 +741,8 @@ let ConfigPrototype = {};
741
741
  * spaces. An alignment can also list several such sets, to recognise each
742
742
  * of them; aligning writes the first. A media wrapper (see
743
743
  * `mediaWrappers`), and Jodit's own `jodit` and `jodit-media` wrappers,
744
- * are aligned with the classes for the media in them.
744
+ * are aligned with the classes for the media in them, and a captioned
745
+ * image's wrapper (see `imageCaption`) with those for `img`.
745
746
  *
746
747
  * ```javascript
747
748
  * const media = {
@@ -1815,7 +1816,7 @@ __webpack_require__.r(__webpack_exports__);
1815
1816
  * ```
1816
1817
  * @packageDocumentation
1817
1818
  * @module constants
1818
- */ const APP_VERSION = "4.18.17";
1819
+ */ const APP_VERSION = "4.19.2";
1819
1820
  // prettier-ignore
1820
1821
  const ES = "es2015";
1821
1822
  const IS_ES_MODERN = true;
@@ -3215,7 +3216,10 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
3215
3216
  /**
3216
3217
  * The node is editable
3217
3218
  */ static isContentEditable(node, root) {
3218
- return Dom.isNode(node) && !Dom.closest(node, (elm)=>Dom.isElement(elm) && elm.getAttribute('contenteditable') === 'false', root);
3219
+ // The nearest element that says decides, as an editable caption inside
3220
+ // a non-editable figure is editable
3221
+ const host = Dom.closest(node, (elm)=>Dom.isElement(elm) && elm.hasAttribute('contenteditable'), root);
3222
+ return Dom.isNode(node) && (host === null || host === void 0 ? void 0 : host.getAttribute('contenteditable')) !== 'false';
3219
3223
  }
3220
3224
  static isEmpty(node, condNoEmptyElement = _constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS) {
3221
3225
  if (!node) {
@@ -3953,6 +3957,7 @@ __decorate([
3953
3957
  'screenY',
3954
3958
  'clientX',
3955
3959
  'clientY',
3960
+ 'view',
3956
3961
  'target',
3957
3962
  'srcElement',
3958
3963
  'currentTarget',
@@ -6610,6 +6615,7 @@ __webpack_require__.r(__webpack_exports__);
6610
6615
  /* harmony export */ cleanFromWord: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord; },
6611
6616
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearAlign; },
6612
6617
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearCenterAlign; },
6618
+ /* harmony export */ clearHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.clearHAlign; },
6613
6619
  /* harmony export */ clearTimeout: function() { return /* reexport safe */ _async_index_js__WEBPACK_IMPORTED_MODULE_1__.clearTimeout; },
6614
6620
  /* harmony export */ cns: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cns; },
6615
6621
  /* harmony export */ colorToHex: function() { return /* reexport safe */ _color_index_js__WEBPACK_IMPORTED_MODULE_3__.colorToHex; },
@@ -6628,11 +6634,14 @@ __webpack_require__.r(__webpack_exports__);
6628
6634
  /* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
6629
6635
  /* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
6630
6636
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
6637
+ /* harmony export */ getCaptionWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getCaptionWrapper; },
6638
+ /* harmony export */ getCaptionedImage: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getCaptionedImage; },
6631
6639
  /* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
6632
6640
  /* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
6633
6641
  /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
6634
6642
  /* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
6635
6643
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
6644
+ /* harmony export */ getImageCaption: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getImageCaption; },
6636
6645
  /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
6637
6646
  /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
6638
6647
  /* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
@@ -7739,6 +7748,7 @@ function trimChars(value, chars) {
7739
7748
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7740
7749
  /* harmony export */ alignElement: function() { return /* binding */ alignElement; },
7741
7750
  /* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
7751
+ /* harmony export */ clearHAlign: function() { return /* binding */ clearHAlign; },
7742
7752
  /* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
7743
7753
  /* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
7744
7754
  /* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
@@ -7747,7 +7757,8 @@ function trimChars(value, chars) {
7747
7757
  /* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
7748
7758
  /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
7749
7759
  /* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
7750
- /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
7760
+ /* harmony import */ var _image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
7761
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
7751
7762
  /*!
7752
7763
  * Jodit Editor (https://xdsoft.net/jodit/)
7753
7764
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7757,6 +7768,7 @@ function trimChars(value, chars) {
7757
7768
 
7758
7769
 
7759
7770
 
7771
+
7760
7772
  // The sets of class names an alignment lists, the first being the one to write
7761
7773
  const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
7762
7774
  value !== null && value !== void 0 ? value : ''
@@ -7764,17 +7776,17 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7764
7776
  /**
7765
7777
  * The class names to align `elm` with: `alignClasses` for its tag, or for the
7766
7778
  * media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
7767
- * `jodit-media`)
7779
+ * `jodit-media`) or a captioned image (see `imageCaption`)
7768
7780
  */ function getAlignClasses(jodit, elm) {
7769
- var _a, _b;
7781
+ var _a, _b, _c;
7770
7782
  if (!elm) {
7771
7783
  return null;
7772
7784
  }
7773
7785
  const media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
7774
7786
  'jodit',
7775
7787
  'jodit-media'
7776
- ])) ? elm.firstElementChild : (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
7777
- return (_b = (_a = jodit.o.alignClasses) === null || _a === void 0 ? void 0 : _a[(media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase()]) !== null && _b !== void 0 ? _b : null;
7788
+ ])) ? elm.firstElementChild : (_a = (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getWrappedMedia)(jodit, elm)) !== null && _a !== void 0 ? _a : (0,_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, elm);
7789
+ return (_c = (_b = jodit.o.alignClasses) === null || _b === void 0 ? void 0 : _b[(media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase()]) !== null && _c !== void 0 ? _c : null;
7778
7790
  }
7779
7791
  /**
7780
7792
  * Align image, with `classes` (see `alignClasses`) instead of inline styles
@@ -7782,18 +7794,8 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7782
7794
  */ function hAlignElement(image, align, classes) {
7783
7795
  var _a;
7784
7796
  if (classes) {
7785
- hAlignElement(image, 'normal');
7786
- Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>image.classList.remove(...set)));
7797
+ clearHAlign(image, classes);
7787
7798
  image.classList.add(...(_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []);
7788
- [
7789
- 'class',
7790
- 'style'
7791
- ].forEach((name)=>{
7792
- var _a;
7793
- if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7794
- (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
7795
- }
7796
- });
7797
7799
  return;
7798
7800
  }
7799
7801
  if (align && align !== 'normal') {
@@ -7818,6 +7820,24 @@ const classSets = (value)=>((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__
7818
7820
  ;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
7819
7821
  }
7820
7822
  }
7823
+ /**
7824
+ * Remove the alignment `hAlignElement` set on an element, with the classes of
7825
+ * every alignment in `classes`
7826
+ */ function clearHAlign(elm, classes) {
7827
+ hAlignElement(elm, 'normal');
7828
+ if (classes) {
7829
+ Object.values(classes).forEach((value)=>classSets(value).forEach((set)=>elm.classList.remove(...set)));
7830
+ }
7831
+ [
7832
+ 'class',
7833
+ 'style'
7834
+ ].forEach((name)=>{
7835
+ var _a;
7836
+ if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
7837
+ (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, name, null);
7838
+ }
7839
+ });
7840
+ }
7821
7841
  /**
7822
7842
  * The alignment `hAlignElement` has set on an element
7823
7843
  */ function getHAlign(elm, classes) {
@@ -8949,21 +8969,70 @@ const getClassName = (obj)=>{
8949
8969
  /* harmony export */ ]);
8950
8970
 
8951
8971
 
8972
+ /***/ }),
8973
+
8974
+ /***/ 68645:
8975
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8976
+
8977
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8978
+ /* harmony export */ getCaptionWrapper: function() { return /* binding */ getCaptionWrapper; },
8979
+ /* harmony export */ getCaptionedImage: function() { return /* binding */ getCaptionedImage; },
8980
+ /* harmony export */ getImageCaption: function() { return /* binding */ getImageCaption; }
8981
+ /* harmony export */ });
8982
+ /* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
8983
+ /* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4510);
8984
+ /*!
8985
+ * Jodit Editor (https://xdsoft.net/jodit/)
8986
+ * Released under MIT see LICENSE.txt in the project root for license information.
8987
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
8988
+ */
8989
+
8990
+ const isPart = (node, part)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === part.tag.toLowerCase() && (!part.className || node.classList.contains(part.className));
8991
+ /**
8992
+ * The caption in `wrapper`, an element holding an image and its caption (see
8993
+ * `imageCaption`)
8994
+ */ function getImageCaption(jodit, wrapper) {
8995
+ var _a;
8996
+ const markup = jodit.o.imageCaption;
8997
+ if (!markup || !isPart(wrapper, markup.wrapper)) {
8998
+ return null;
8999
+ }
9000
+ return (_a = (0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(wrapper.getElementsByTagName(markup.caption.tag)).find((elm)=>isPart(elm, markup.caption))) !== null && _a !== void 0 ? _a : null;
9001
+ }
9002
+ /**
9003
+ * The image in `wrapper` when it is an element holding one image and its
9004
+ * caption (see `imageCaption`)
9005
+ */ function getCaptionedImage(jodit, wrapper) {
9006
+ const caption = getImageCaption(jodit, wrapper);
9007
+ if (!caption) {
9008
+ return null;
9009
+ }
9010
+ const images = wrapper.getElementsByTagName('img');
9011
+ return images.length === 1 && !caption.contains(images[0]) ? images[0] : null;
9012
+ }
9013
+ /**
9014
+ * The element holding an image and its caption (see `imageCaption`) that is
9015
+ * or holds `node`
9016
+ */ function getCaptionWrapper(jodit, node) {
9017
+ return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, (elm)=>Boolean(getCaptionedImage(jodit, elm)), jodit.editor);
9018
+ }
9019
+
9020
+
8952
9021
  /***/ }),
8953
9022
 
8954
9023
  /***/ 43555:
8955
9024
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8956
9025
 
8957
9026
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8958
- /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.$$; },
9027
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.$$; },
8959
9028
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
8960
9029
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
8961
9030
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
8962
9031
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
8963
9032
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
8964
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_28__.LimitedStack; },
9033
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_29__.LimitedStack; },
8965
9034
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
8966
- /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
9035
+ /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__.UNSAFE_PROTO_KEYS; },
8967
9036
  /* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
8968
9037
  /* harmony export */ alignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.alignElement; },
8969
9038
  /* harmony export */ alreadyLoadedList: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.alreadyLoadedList; },
@@ -8974,19 +9043,20 @@ const getClassName = (obj)=>{
8974
9043
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
8975
9044
  /* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
8976
9045
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
8977
- /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.call; },
8978
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callPromise; },
8979
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.callThis; },
9046
+ /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.call; },
9047
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.callPromise; },
9048
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.callThis; },
8980
9049
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
8981
9050
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
8982
- /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
9051
+ /* harmony export */ clearHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearHAlign; },
9052
+ /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__.cns; },
8983
9053
  /* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
8984
9054
  /* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
8985
9055
  /* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
8986
- /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
9056
+ /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.createMediaWrapper; },
8987
9057
  /* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
8988
9058
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
8989
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.cssPath; },
9059
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.cssPath; },
8990
9060
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
8991
9061
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
8992
9062
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
@@ -8994,38 +9064,41 @@ const getClassName = (obj)=>{
8994
9064
  /* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
8995
9065
  /* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
8996
9066
  /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
9067
+ /* harmony export */ getCaptionWrapper: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getCaptionWrapper; },
9068
+ /* harmony export */ getCaptionedImage: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getCaptionedImage; },
8997
9069
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
8998
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getDataTransfer; },
9070
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.getDataTransfer; },
8999
9071
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
9000
- /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
9001
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.getPropertyDescriptor; },
9002
- /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
9003
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.getXPathByElement; },
9072
+ /* harmony export */ getImageCaption: function() { return /* reexport safe */ _image_caption_js__WEBPACK_IMPORTED_MODULE_18__.getImageCaption; },
9073
+ /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.getMediaWrapper; },
9074
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.getPropertyDescriptor; },
9075
+ /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.getWrappedMedia; },
9076
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.getXPathByElement; },
9004
9077
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
9005
9078
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
9006
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.inView; },
9079
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__.inView; },
9007
9080
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
9008
- /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
9081
+ /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__.isUnsafeProtoKey; },
9009
9082
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
9010
- /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.keys; },
9011
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.loadImage; },
9083
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.keys; },
9084
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.loadImage; },
9012
9085
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
9013
9086
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
9014
9087
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
9015
- /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
9016
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.markOwner; },
9017
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_29__.memorizeExec; },
9088
+ /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__.markDeprecated; },
9089
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.markOwner; },
9090
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_30__.memorizeExec; },
9018
9091
  /* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
9019
- /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
9020
- /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareEmbedCode; },
9021
- /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__.prepareMedia; },
9022
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_23__.previewBox; },
9023
- /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.refs; },
9024
- /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_24__.reset; },
9025
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_26__.resolveElement; },
9026
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__.scrollIntoViewIfNeeded; },
9027
- /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_27__.set; },
9028
- /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
9092
+ /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_22__.parseQuery; },
9093
+ /* harmony export */ prepareEmbedCode: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__.prepareEmbedCode; },
9094
+ /* harmony export */ prepareMedia: function() { return /* reexport safe */ _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__.prepareMedia; },
9095
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_24__.previewBox; },
9096
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.refs; },
9097
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_25__.reset; },
9098
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_27__.resolveElement; },
9099
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__.scrollIntoViewIfNeeded; },
9100
+ /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_28__.set; },
9101
+ /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__.wrapMedia; }
9029
9102
  /* harmony export */ });
9030
9103
  /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
9031
9104
  /* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
@@ -9045,18 +9118,19 @@ const getClassName = (obj)=>{
9045
9118
  /* harmony import */ var _get_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(94643);
9046
9119
  /* harmony import */ var _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(80568);
9047
9120
  /* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
9048
- /* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69175);
9049
- /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
9050
- /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
9051
- /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
9052
- /* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(96437);
9053
- /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(11628);
9054
- /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(58844);
9055
- /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(26395);
9056
- /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76078);
9057
- /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(3703);
9058
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(50535);
9059
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(37790);
9121
+ /* harmony import */ var _image_caption_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(68645);
9122
+ /* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(69175);
9123
+ /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(95942);
9124
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(61477);
9125
+ /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(82501);
9126
+ /* harmony import */ var _prepare_media_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(96437);
9127
+ /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(11628);
9128
+ /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58844);
9129
+ /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(26395);
9130
+ /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76078);
9131
+ /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(3703);
9132
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(50535);
9133
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(37790);
9060
9134
  /*!
9061
9135
  * Jodit Editor (https://xdsoft.net/jodit/)
9062
9136
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -9093,6 +9167,7 @@ const getClassName = (obj)=>{
9093
9167
 
9094
9168
 
9095
9169
 
9170
+
9096
9171
 
9097
9172
 
9098
9173
  /***/ }),
@@ -11805,7 +11880,10 @@ class Selection {
11805
11880
  /**
11806
11881
  * Checks whether the editor currently in focus
11807
11882
  */ isFocused() {
11808
- return this.doc.hasFocus && this.doc.hasFocus() && this.area === this.doc.activeElement;
11883
+ const active = this.doc.activeElement;
11884
+ // An editable element inside the editor, as an image's caption, has the
11885
+ // focus while the caret is in it
11886
+ return Boolean(this.doc.hasFocus && this.doc.hasFocus() && active && (this.area === active || _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(active) && active.isContentEditable && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.area, active)));
11809
11887
  }
11810
11888
  /**
11811
11889
  * Returns the current element under the cursor inside editor
@@ -12273,12 +12351,21 @@ class Selection {
12273
12351
  * there: the arrow keys then have nothing to move from and the selection
12274
12352
  * cannot be escaped. Selecting the island itself keeps the range in editable
12275
12353
  * content, so the caret can step over it. See #1184
12354
+ *
12355
+ * An editable element inside an island, as an image's caption, is editable
12356
+ * content of its own, so the search stops there.
12276
12357
  */ __closestNotEditable(node) {
12277
12358
  const { area } = this;
12278
12359
  let result = null, elm = node.parentNode;
12279
12360
  while(elm && elm !== area && area.contains(elm)){
12280
- if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && elm.getAttribute('contenteditable') === 'false') {
12281
- result = elm;
12361
+ if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm)) {
12362
+ const editable = elm.getAttribute('contenteditable');
12363
+ if (editable === 'true') {
12364
+ break;
12365
+ }
12366
+ if (editable === 'false') {
12367
+ result = elm;
12368
+ }
12282
12369
  }
12283
12370
  elm = elm.parentNode;
12284
12371
  }
@@ -17306,6 +17393,35 @@ UISpacer = __decorate([
17306
17393
  /* harmony export */ ]);
17307
17394
 
17308
17395
 
17396
+ /***/ }),
17397
+
17398
+ /***/ 20014:
17399
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
17400
+
17401
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17402
+ /* harmony export */ focusFormField: function() { return /* binding */ focusFormField; }
17403
+ /* harmony export */ });
17404
+ /* harmony import */ var _helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4510);
17405
+ /*!
17406
+ * Jodit Editor (https://xdsoft.net/jodit/)
17407
+ * Released under MIT see LICENSE.txt in the project root for license information.
17408
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
17409
+ */ /**
17410
+ * @module ui
17411
+ */
17412
+ /**
17413
+ * Focuses the first text field shown in a form inside `box`, so that typing
17414
+ * fills it in rather than replacing the selected content, as in a dialog. A
17415
+ * form round `box`, as the image properties dialog's round its tabs, doesn't
17416
+ * count, and neither do fields outside a form, as the color picker's
17417
+ */ function focusFormField(box) {
17418
+ var _a;
17419
+ (_a = (0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(box.getElementsByTagName('form')).flatMap((form)=>(0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__.toArray)(form.querySelectorAll('input:not([type]), input[type="text"], input[type="url"], textarea'))).find((field)=>field.offsetParent)) === null || _a === void 0 ? void 0 : _a.focus({
17420
+ preventScroll: true
17421
+ });
17422
+ }
17423
+
17424
+
17309
17425
  /***/ }),
17310
17426
 
17311
17427
  /***/ 72157:
@@ -18728,6 +18844,12 @@ var Jodit_1;
18728
18844
 
18729
18845
 
18730
18846
 
18847
+ const FOCUS_EVENTS = new Set([
18848
+ 'focus',
18849
+ 'blur',
18850
+ 'focusin',
18851
+ 'focusout'
18852
+ ]);
18731
18853
  const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
18732
18854
  const __defaultClassesKey = 'data-jodit-default-classes';
18733
18855
  const NOEDIT = {
@@ -19767,16 +19889,30 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
19767
19889
  if (place) {
19768
19890
  this.setCurrentPlace(place);
19769
19891
  }
19770
- }).on(editor, 'compositionend', this.synchronizeValues).on(editor, 'selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup ' + 'click copy cut dragstart drop dragover paste resize touchstart touchend focus blur', (event)=>{
19892
+ }).on(editor, 'compositionend', this.synchronizeValues).on(editor, 'selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup ' + 'click copy cut dragstart drop dragover paste resize touchstart touchend focus blur focusin focusout', (event)=>{
19771
19893
  if (this.o.readonly || this.__isSilentChange) {
19772
19894
  return;
19773
19895
  }
19896
+ let type = event.type;
19897
+ // `focus` and `blur` don't bubble from an editable element inside
19898
+ // the editor, as an image's caption, so `focusin` and `focusout`
19899
+ // stand in for them there. The focus moving between the editor
19900
+ // and such an element stays in the editor
19901
+ if (FOCUS_EVENTS.has(type)) {
19902
+ const inner = type === 'focusin' || type === 'focusout';
19903
+ if (inner === (event.target === editor) || _modules_index_js__WEBPACK_IMPORTED_MODULE_8__.Dom.isOrContains(editor, event.relatedTarget)) {
19904
+ return;
19905
+ }
19906
+ if (inner) {
19907
+ type = type === 'focusin' ? 'focus' : 'blur';
19908
+ }
19909
+ }
19774
19910
  const w = this.ew;
19775
19911
  if (event instanceof w.KeyboardEvent && event.isComposing) {
19776
19912
  return;
19777
19913
  }
19778
19914
  if (this.e && this.e.fire) {
19779
- if (this.e.fire(event.type, event) === false) {
19915
+ if (this.e.fire(type, event) === false) {
19780
19916
  return false;
19781
19917
  }
19782
19918
  this.synchronizeValues();
@@ -20081,6 +20217,7 @@ function addClassNames(className, elm) {
20081
20217
  Src: 'Src',
20082
20218
  Title: 'العنوان',
20083
20219
  Alternative: 'العنوان البديل',
20220
+ Caption: 'تسمية توضيحية',
20084
20221
  Link: 'الرابط',
20085
20222
  'Open link in new tab': 'افتح الرابط في نافذة جديدة',
20086
20223
  Image: 'الصورة',
@@ -20112,6 +20249,7 @@ function addClassNames(className, elm) {
20112
20249
  'Insert column after': 'إدراج عمود بعد',
20113
20250
  'Insert row above': 'إدراج صف أعلى',
20114
20251
  'Insert row below': 'إدراج صف أسفل',
20252
+ 'Header row': 'صف الرأس',
20115
20253
  'Delete table': 'حذف الجدول',
20116
20254
  'Delete row': 'حذف الصف',
20117
20255
  'Delete column': 'حذف العمود',
@@ -20325,6 +20463,7 @@ function addClassNames(className, elm) {
20325
20463
  Src: 'Mənbə',
20326
20464
  Title: 'Başlıq',
20327
20465
  Alternative: 'Alternativ mətn',
20466
+ Caption: 'Şəkilaltı yazı',
20328
20467
  Link: 'Keçid',
20329
20468
  'Open link in new tab': 'Keçidi yeni vərəqdə aç',
20330
20469
  Image: 'Şəkil',
@@ -20363,6 +20502,7 @@ function addClassNames(className, elm) {
20363
20502
  'Insert column after': 'Sonrasına sütun əlavə et',
20364
20503
  'Insert row above': 'Yuxarıya sətir əlavə et',
20365
20504
  'Insert row below': 'Aşağıya sətir əlavə et',
20505
+ 'Header row': 'Başlıq sətri',
20366
20506
  'Delete table': 'Cədvəli sil',
20367
20507
  'Delete row': 'Sətri sil',
20368
20508
  'Delete column': 'Sütunu sil',
@@ -20566,6 +20706,7 @@ function addClassNames(className, elm) {
20566
20706
  Src: 'src',
20567
20707
  Title: 'Titulek',
20568
20708
  Alternative: 'Alternativní text (alt)',
20709
+ Caption: 'Titulek',
20569
20710
  Link: 'Link',
20570
20711
  'Open link in new tab': 'Otevřít link v nové záložce',
20571
20712
  Image: 'Obrázek',
@@ -20605,6 +20746,7 @@ function addClassNames(className, elm) {
20605
20746
  'Insert column after': 'Vložit sloupec za',
20606
20747
  'Insert row above': 'Vložit řádek nad',
20607
20748
  'Insert row below': 'Vložit řádek pod',
20749
+ 'Header row': 'Řádek záhlaví',
20608
20750
  'Delete table': 'Vymazat tabulku',
20609
20751
  'Delete row': 'Vymazat řádku',
20610
20752
  'Delete column': 'Vymazat sloupec',
@@ -20803,6 +20945,7 @@ function addClassNames(className, elm) {
20803
20945
  Src: 'Pfad',
20804
20946
  Title: 'Titel',
20805
20947
  Alternative: 'Alternativer Text',
20948
+ Caption: 'Beschriftung',
20806
20949
  Link: 'Link',
20807
20950
  'Open link in new tab': 'Link in neuem Tab öffnen',
20808
20951
  Image: 'Bild',
@@ -20841,6 +20984,7 @@ function addClassNames(className, elm) {
20841
20984
  'Insert column after': 'Spalte danach einfügen',
20842
20985
  'Insert row above': 'Zeile oberhalb einfügen',
20843
20986
  'Insert row below': 'Zeile unterhalb einfügen',
20987
+ 'Header row': 'Kopfzeile',
20844
20988
  'Delete table': 'Tabelle löschen',
20845
20989
  'Delete row': 'Zeile löschen',
20846
20990
  'Delete column': 'Spalte löschen',
@@ -21061,6 +21205,7 @@ function addClassNames(className, elm) {
21061
21205
  Src: 'Fuente',
21062
21206
  Title: 'Título',
21063
21207
  Alternative: 'Texto Alternativo',
21208
+ Caption: 'Leyenda',
21064
21209
  Filter: 'Filtrar',
21065
21210
  Link: 'Vínculo',
21066
21211
  'Open link in new tab': 'Abrir vínculo en nueva pestaña',
@@ -21100,6 +21245,7 @@ function addClassNames(className, elm) {
21100
21245
  'Insert column after': 'Interar columna después',
21101
21246
  'Insert row above': 'Insertar fila arriba',
21102
21247
  'Insert row below': 'Insertar fila debajo',
21248
+ 'Header row': 'Fila de encabezado',
21103
21249
  'Delete table': 'Borrar tabla',
21104
21250
  'Delete row': 'Borrar fila',
21105
21251
  'Delete column': 'Borrar columna',
@@ -21302,6 +21448,7 @@ function addClassNames(className, elm) {
21302
21448
  Src: 'سورس',
21303
21449
  Title: 'عنوان',
21304
21450
  Alternative: 'جایگزین',
21451
+ Caption: 'زیرنویس',
21305
21452
  Link: 'لینک',
21306
21453
  'Open link in new tab': 'باز کزدن لینک در تب جدید',
21307
21454
  Image: 'عکس',
@@ -21340,6 +21487,7 @@ function addClassNames(className, elm) {
21340
21487
  'Insert column after': 'افزودن ستون بعد از',
21341
21488
  'Insert row above': 'افزودن خط قبل از',
21342
21489
  'Insert row below': 'افزودن خط بعد از',
21490
+ 'Header row': 'خط سرآیند',
21343
21491
  'Delete table': 'حذف جدول',
21344
21492
  'Delete row': 'حذف خط',
21345
21493
  'Delete column': 'حذف ستون',
@@ -21538,6 +21686,7 @@ function addClassNames(className, elm) {
21538
21686
  Src: 'Fuente',
21539
21687
  Title: 'Otsikko',
21540
21688
  Alternative: 'Vaihtoehtoinen teksti',
21689
+ Caption: 'Kuvateksti',
21541
21690
  Filter: 'Suodatin',
21542
21691
  Link: 'Linkki',
21543
21692
  'Open link in new tab': 'Avaa uudessa välilehdessä',
@@ -21577,6 +21726,7 @@ function addClassNames(className, elm) {
21577
21726
  'Insert column after': 'Lisää sarake jälkeen',
21578
21727
  'Insert row above': 'Lisää rivi ylös',
21579
21728
  'Insert row below': 'Lisää rivi alle',
21729
+ 'Header row': 'Otsikkorivi',
21580
21730
  'Delete table': 'Poista taulukko',
21581
21731
  'Delete row': 'Poista rivi',
21582
21732
  'Delete column': 'Poista sarake',
@@ -21779,6 +21929,7 @@ function addClassNames(className, elm) {
21779
21929
  Src: 'Source',
21780
21930
  Title: 'Titre',
21781
21931
  Alternative: 'Alternative',
21932
+ Caption: 'Légende',
21782
21933
  Filter: 'Filtre',
21783
21934
  Link: 'Lien',
21784
21935
  'Open link in new tab': 'Ouvrir le lien dans un nouvel onglet',
@@ -21820,6 +21971,7 @@ function addClassNames(className, elm) {
21820
21971
  'Insert column after': 'Insérer une colonne après',
21821
21972
  'Insert row above': 'Insérer une ligne au dessus',
21822
21973
  'Insert row below': 'Insérer une ligne en dessous',
21974
+ 'Header row': 'Ligne d’en-tête',
21823
21975
  'Delete table': 'Supprimer le tableau',
21824
21976
  'Delete row': 'Supprimer la ligne',
21825
21977
  'Delete column': 'Supprimer la colonne',
@@ -22016,6 +22168,7 @@ function addClassNames(className, elm) {
22016
22168
  Src: 'מקור',
22017
22169
  Title: 'כותרת',
22018
22170
  Alternative: 'כיתוב חלופי',
22171
+ Caption: 'כיתוב',
22019
22172
  Link: 'קישור',
22020
22173
  'Open link in new tab': 'פתח בכרטיסיה חדשה',
22021
22174
  Image: 'תמונה',
@@ -22054,6 +22207,7 @@ function addClassNames(className, elm) {
22054
22207
  'Insert column after': 'הכנס עמודה אחרי',
22055
22208
  'Insert row above': 'הכנס שורה מעל',
22056
22209
  'Insert row below': 'הכנס שורה מתחת',
22210
+ 'Header row': 'שורת כותרת',
22057
22211
  'Delete table': 'מחק טבלה',
22058
22212
  'Delete row': 'מחק שורה',
22059
22213
  'Delete column': 'מחק עמודה',
@@ -22254,6 +22408,7 @@ function addClassNames(className, elm) {
22254
22408
  Src: 'Forrás',
22255
22409
  Title: 'Cím',
22256
22410
  Alternative: 'Helyettesítő szöveg',
22411
+ Caption: 'Képaláírás',
22257
22412
  Link: 'Link',
22258
22413
  'Open link in new tab': 'Link megnyitása új lapon',
22259
22414
  Image: 'Kép',
@@ -22292,6 +22447,7 @@ function addClassNames(className, elm) {
22292
22447
  'Insert column after': 'Oszlop beszúrás utána',
22293
22448
  'Insert row above': 'Sor beszúrás fölé',
22294
22449
  'Insert row below': 'Sor beszúrás alá',
22450
+ 'Header row': 'Fejlécsor',
22295
22451
  'Delete table': 'Táblázat törlése',
22296
22452
  'Delete row': 'Sor törlése',
22297
22453
  'Delete column': 'Oszlop törlése',
@@ -22490,6 +22646,7 @@ function addClassNames(className, elm) {
22490
22646
  Src: 'Src',
22491
22647
  Title: 'Judul',
22492
22648
  Alternative: 'Teks alternatif',
22649
+ Caption: 'Keterangan',
22493
22650
  Link: 'Tautan',
22494
22651
  'Open link in new tab': 'Buka tautan di tab baru',
22495
22652
  Image: 'Gambar',
@@ -22529,6 +22686,7 @@ function addClassNames(className, elm) {
22529
22686
  'Insert column after': 'Sisipkan kolom setelahnya',
22530
22687
  'Insert row above': 'Sisipkan baris di atasnya',
22531
22688
  'Insert row below': 'Sisipkan baris di bawahnya',
22689
+ 'Header row': 'Baris header',
22532
22690
  'Delete table': 'Hapus tabel',
22533
22691
  'Delete row': 'Hapus baris',
22534
22692
  'Delete column': 'Hapus kolom',
@@ -22727,6 +22885,7 @@ function addClassNames(className, elm) {
22727
22885
  Src: 'Fonte',
22728
22886
  Title: 'Titolo',
22729
22887
  Alternative: 'Testo Alternativo',
22888
+ Caption: 'Didascalia',
22730
22889
  Link: 'Link',
22731
22890
  'Open link in new tab': 'Apri il link in una nuova scheda',
22732
22891
  Image: 'Immagine',
@@ -22765,6 +22924,7 @@ function addClassNames(className, elm) {
22765
22924
  'Insert column after': 'Inserisci la colonna dopo',
22766
22925
  'Insert row above': 'Inserisci la riga sopra',
22767
22926
  'Insert row below': 'Inserisci la riga sotto',
22927
+ 'Header row': 'Riga di intestazione',
22768
22928
  'Delete table': 'Elimina tabella',
22769
22929
  'Delete row': 'Elimina riga',
22770
22930
  'Delete column': 'Elimina colonna',
@@ -22968,6 +23128,7 @@ function addClassNames(className, elm) {
22968
23128
  Src: 'ソース',
22969
23129
  Title: 'タイトル',
22970
23130
  Alternative: '代替テキスト',
23131
+ Caption: 'キャプション',
22971
23132
  Link: 'リンク',
22972
23133
  'Open link in new tab': '新しいタブで開く',
22973
23134
  Image: '画像',
@@ -23006,6 +23167,7 @@ function addClassNames(className, elm) {
23006
23167
  'Insert column after': '右に列を挿入',
23007
23168
  'Insert row above': '上に行を挿入',
23008
23169
  'Insert row below': '下に行を挿入',
23170
+ 'Header row': 'ヘッダー行',
23009
23171
  'Delete table': '表を削除',
23010
23172
  'Delete row': '行を削除',
23011
23173
  'Delete column': '列を削除',
@@ -23220,6 +23382,7 @@ function addClassNames(className, elm) {
23220
23382
  Src: '경로(src)',
23221
23383
  Title: '제목',
23222
23384
  Alternative: '대체 텍스트(alt)',
23385
+ Caption: '캡션',
23223
23386
  Link: '링크',
23224
23387
  'Open link in new tab': '새 탭에서 열기',
23225
23388
  file: '파일',
@@ -23258,6 +23421,7 @@ function addClassNames(className, elm) {
23258
23421
  'Insert column after': '다음 열에 삽입',
23259
23422
  'Insert row above': '위 행에 삽입',
23260
23423
  'Insert row below': '아래 행에 삽입',
23424
+ 'Header row': '머리글 행',
23261
23425
  'Delete table': '테이블 삭제',
23262
23426
  'Delete row': '행 삭제',
23263
23427
  'Delete column': '열 삭제',
@@ -23456,6 +23620,7 @@ function addClassNames(className, elm) {
23456
23620
  Src: 'Эх үүсвэр',
23457
23621
  Title: 'Гарчиг',
23458
23622
  Alternative: 'Алтернатив текст',
23623
+ Caption: 'Тайлбар',
23459
23624
  Link: 'Холбоос',
23460
23625
  'Open link in new tab': 'Холбоосыг шинэ хавтсанд нээх',
23461
23626
  Image: 'Зураг',
@@ -23494,6 +23659,7 @@ function addClassNames(className, elm) {
23494
23659
  'Insert column after': 'Ард нь багана нэмэх',
23495
23660
  'Insert row above': 'Дээр нь мөр нэмэх',
23496
23661
  'Insert row below': 'Доор нь мөр нэмэх',
23662
+ 'Header row': 'Толгой мөр',
23497
23663
  'Delete table': 'Хүснэгт устгах',
23498
23664
  'Delete row': 'Мөр устгах',
23499
23665
  'Delete column': 'Багана устгах',
@@ -23693,6 +23859,7 @@ function addClassNames(className, elm) {
23693
23859
  Src: 'Src',
23694
23860
  Title: 'Titel',
23695
23861
  Alternative: 'Alternatieve tekst',
23862
+ Caption: 'Bijschrift',
23696
23863
  Link: 'Link',
23697
23864
  'Open link in new tab': 'Link in nieuwe tab openen',
23698
23865
  Image: 'Afbeelding',
@@ -23731,6 +23898,7 @@ function addClassNames(className, elm) {
23731
23898
  'Insert column after': 'Kolom invoegen (na)',
23732
23899
  'Insert row above': 'Rij invoegen (boven)',
23733
23900
  'Insert row below': 'Rij invoegen (onder)',
23901
+ 'Header row': 'Koprij',
23734
23902
  'Delete table': 'Tabel verwijderen',
23735
23903
  'Delete row': 'Rij verwijderen',
23736
23904
  'Delete column': 'Kolom verwijderen',
@@ -23928,6 +24096,7 @@ function addClassNames(className, elm) {
23928
24096
  Src: 'Kilde',
23929
24097
  Title: 'Tittel',
23930
24098
  Alternative: 'Alternativ',
24099
+ Caption: 'Bildetekst',
23931
24100
  Filter: 'Filter',
23932
24101
  Link: 'Lenke',
23933
24102
  'Open link in new tab': 'Åpne lenke i ny fane',
@@ -23969,6 +24138,7 @@ function addClassNames(className, elm) {
23969
24138
  'Insert column after': 'Sett inn kolonne etter',
23970
24139
  'Insert row above': 'Sett inn rad over',
23971
24140
  'Insert row below': 'Sett inn rad under',
24141
+ 'Header row': 'Overskriftsrad',
23972
24142
  'Delete table': 'Slett tabell',
23973
24143
  'Delete row': 'Slett rad',
23974
24144
  'Delete column': 'Slett kolonne',
@@ -24174,6 +24344,7 @@ function addClassNames(className, elm) {
24174
24344
  Src: 'Źródło',
24175
24345
  Title: 'Tytuł',
24176
24346
  Alternative: 'Tekst alternatywny',
24347
+ Caption: 'Podpis',
24177
24348
  Link: 'Link',
24178
24349
  'Open link in new tab': 'Otwórz w nowej zakładce',
24179
24350
  Image: 'Grafika',
@@ -24212,6 +24383,7 @@ function addClassNames(className, elm) {
24212
24383
  'Insert column after': 'Wstaw kolumnę po',
24213
24384
  'Insert row above': 'Wstaw wiersz przed',
24214
24385
  'Insert row below': 'Wstaw wiersz po',
24386
+ 'Header row': 'Wiersz nagłówka',
24215
24387
  'Delete table': 'Usuń tabelę',
24216
24388
  'Delete row': 'Usuń wiersz',
24217
24389
  'Delete column': 'Usuń kolumnę',
@@ -24410,6 +24582,7 @@ function addClassNames(className, elm) {
24410
24582
  Src: 'Fonte',
24411
24583
  Title: 'Título',
24412
24584
  Alternative: 'Texto Alternativo',
24585
+ Caption: 'Legenda',
24413
24586
  Link: 'Link',
24414
24587
  'Open link in new tab': 'Abrir link em nova aba',
24415
24588
  Image: 'Imagem',
@@ -24448,6 +24621,7 @@ function addClassNames(className, elm) {
24448
24621
  'Insert column after': 'Inserir coluna depois',
24449
24622
  'Insert row above': 'Inserir linha acima',
24450
24623
  'Insert row below': 'Inserir linha abaixo',
24624
+ 'Header row': 'Linha de cabeçalho',
24451
24625
  'Delete table': 'Excluir tabela',
24452
24626
  'Delete row': 'Excluir linha',
24453
24627
  'Delete column': 'Excluir coluna',
@@ -24650,6 +24824,7 @@ function addClassNames(className, elm) {
24650
24824
  Src: 'src',
24651
24825
  Title: 'Заголовок',
24652
24826
  Alternative: 'Альтернативный текст (alt)',
24827
+ Caption: 'Подпись',
24653
24828
  Link: 'Ссылка',
24654
24829
  'Open link in new tab': 'Открывать ссылку в новом окне',
24655
24830
  file: 'Файл',
@@ -24688,6 +24863,7 @@ function addClassNames(className, elm) {
24688
24863
  'Insert column after': 'Вставить столбец после',
24689
24864
  'Insert row above': 'Вставить ряд выше',
24690
24865
  'Insert row below': 'Вставить ряд ниже',
24866
+ 'Header row': 'Строка заголовка',
24691
24867
  'Delete table': 'Удалить таблицу',
24692
24868
  'Delete row': 'Удалять ряд',
24693
24869
  'Delete column': 'Удалить столбец',
@@ -24886,6 +25062,7 @@ function addClassNames(className, elm) {
24886
25062
  Src: 'Zdroj',
24887
25063
  Title: 'Názov',
24888
25064
  Alternative: 'Alternatívny text (alt)',
25065
+ Caption: 'Popis',
24889
25066
  Link: 'Odkaz',
24890
25067
  'Open link in new tab': 'Otvoriť odkaz na novej karte',
24891
25068
  Image: 'Obrázok',
@@ -24924,6 +25101,7 @@ function addClassNames(className, elm) {
24924
25101
  'Insert column after': 'Vložiť stĺpec za',
24925
25102
  'Insert row above': 'Vložiť riadok nad',
24926
25103
  'Insert row below': 'Vložiť riadok pod',
25104
+ 'Header row': 'Riadok hlavičky',
24927
25105
  'Delete table': 'Odstrániť tabuľku',
24928
25106
  'Delete row': 'Odstrániť riadok',
24929
25107
  'Delete column': 'Odstrániť stĺpec',
@@ -25128,6 +25306,7 @@ function addClassNames(className, elm) {
25128
25306
  Src: 'Källa',
25129
25307
  Title: 'Titel',
25130
25308
  Alternative: 'Alternativ',
25309
+ Caption: 'Bildtext',
25131
25310
  Filter: 'Filter',
25132
25311
  Link: 'Länk',
25133
25312
  'Open link in new tab': 'Öppna länk i ny flik',
@@ -25169,6 +25348,7 @@ function addClassNames(className, elm) {
25169
25348
  'Insert column after': 'Infoga kolumn efter',
25170
25349
  'Insert row above': 'Infoga rad ovanför',
25171
25350
  'Insert row below': 'Infoga rad nedanför',
25351
+ 'Header row': 'Rubrikrad',
25172
25352
  'Delete table': 'Radera tabell',
25173
25353
  'Delete row': 'Radera rad',
25174
25354
  'Delete column': 'Radera kolumn',
@@ -25373,6 +25553,7 @@ function addClassNames(className, elm) {
25373
25553
  Src: 'Kaynak',
25374
25554
  Title: 'Başlık',
25375
25555
  Alternative: 'Alternatif Yazı',
25556
+ Caption: 'Resim yazısı',
25376
25557
  Link: 'Link',
25377
25558
  'Open link in new tab': 'Bağlantıyı yeni sekmede aç',
25378
25559
  Image: 'Resim',
@@ -25411,6 +25592,7 @@ function addClassNames(className, elm) {
25411
25592
  'Insert column after': 'Sonrasına kolon ekle',
25412
25593
  'Insert row above': 'Üstüne satır ekle',
25413
25594
  'Insert row below': 'Altına satır ekle',
25595
+ 'Header row': 'Başlık satırı',
25414
25596
  'Delete table': 'Tabloyu sil',
25415
25597
  'Delete row': 'Satırı sil',
25416
25598
  'Delete column': 'Kolonu sil',
@@ -25608,6 +25790,7 @@ function addClassNames(className, elm) {
25608
25790
  Src: 'src',
25609
25791
  Title: 'Заголовок',
25610
25792
  Alternative: 'Альтернативний текст (alt)',
25793
+ Caption: 'Підпис',
25611
25794
  Link: 'Посилання',
25612
25795
  'Open link in new tab': 'Відкрити посилання в новій вкладці',
25613
25796
  file: 'Файл',
@@ -25646,6 +25829,7 @@ function addClassNames(className, elm) {
25646
25829
  'Insert column after': 'Вставити стовпець після',
25647
25830
  'Insert row above': 'Вставити рядок вище',
25648
25831
  'Insert row below': 'Вставити рядок нижче',
25832
+ 'Header row': 'Рядок заголовка',
25649
25833
  'Delete table': 'Видалити таблицю',
25650
25834
  'Delete row': 'Видалити рядок',
25651
25835
  'Delete column': 'Видалити стовпчик',
@@ -25845,6 +26029,7 @@ function addClassNames(className, elm) {
25845
26029
  Src: 'Src',
25846
26030
  Title: 'Title',
25847
26031
  Alternative: 'Alternative',
26032
+ Caption: '题注',
25848
26033
  Link: 'Link',
25849
26034
  'Open link in new tab': '在新窗口打开链接',
25850
26035
  Image: '图片',
@@ -25883,6 +26068,7 @@ function addClassNames(className, elm) {
25883
26068
  'Insert column after': '在之后插入列',
25884
26069
  'Insert row above': '在之前插入行',
25885
26070
  'Insert row below': '在之后插入行',
26071
+ 'Header row': '标题行',
25886
26072
  'Delete table': '删除表格',
25887
26073
  'Delete row': '删除行',
25888
26074
  'Delete column': '删除列',
@@ -26081,6 +26267,7 @@ function addClassNames(className, elm) {
26081
26267
  Src: 'Src',
26082
26268
  Title: 'Title',
26083
26269
  Alternative: '替代',
26270
+ Caption: '標號',
26084
26271
  Link: 'Link',
26085
26272
  'Open link in new tab': '在新分頁開啟連結',
26086
26273
  Image: '圖片',
@@ -26119,6 +26306,7 @@ function addClassNames(className, elm) {
26119
26306
  'Insert column after': '插入右方欄',
26120
26307
  'Insert row above': '插入上方列',
26121
26308
  'Insert row below': '插入下方列',
26309
+ 'Header row': '標題列',
26122
26310
  'Delete table': '刪除表格',
26123
26311
  'Delete row': '刪除整列',
26124
26312
  'Delete column': '刪除整欄',
@@ -31376,6 +31564,11 @@ StatusBar = __decorate([
31376
31564
 
31377
31565
 
31378
31566
 
31567
+ const SECTIONS = new Set([
31568
+ 'thead',
31569
+ 'tbody',
31570
+ 'tfoot'
31571
+ ]);
31379
31572
  const markedValue = new WeakMap();
31380
31573
  class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
31381
31574
  /** @override */ className() {
@@ -31534,7 +31727,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
31534
31727
  }
31535
31728
  });
31536
31729
  }
31537
- if (after && line && line.nextSibling) {
31730
+ const section = line && line.parentElement;
31731
+ // Below the header rows, a row is a body row
31732
+ if (after && line && !line.nextElementSibling && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(section, 'thead')) {
31733
+ const body = Table.__bodyOf(table, section, create);
31734
+ body.insertBefore(row, body.firstChild);
31735
+ Table.__setCellsTag(row, 'td', create);
31736
+ } else if (after && line && line.nextSibling) {
31538
31737
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(line, row);
31539
31738
  } else if (!after && line) {
31540
31739
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(line, row);
@@ -31542,6 +31741,79 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
31542
31741
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.first(table, (node)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, 'tbody')) || table, row);
31543
31742
  }
31544
31743
  }
31744
+ /**
31745
+ * The table's first `<tbody>`, made after `head` when there's none
31746
+ */ static __bodyOf(table, head, create) {
31747
+ let body = table.tBodies[0];
31748
+ if (!body) {
31749
+ body = create.element('tbody');
31750
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(head, body);
31751
+ }
31752
+ return body;
31753
+ }
31754
+ /**
31755
+ * Makes the row's cells `<td>`, or `<th>` with a column scope unless they
31756
+ * have one, keeping their content and attributes. The cells it replaces
31757
+ * go in `replaced`, with their replacements
31758
+ */ static __setCellsTag(row, tag, create, replaced) {
31759
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(row.cells).forEach((cell)=>{
31760
+ const next = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(cell, tag) ? cell : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.replace(cell, tag, create, true);
31761
+ if (next !== cell) {
31762
+ replaced === null || replaced === void 0 ? void 0 : replaced.set(cell, next);
31763
+ }
31764
+ if (tag === 'td') {
31765
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(next, 'scope', null);
31766
+ } else if (!next.hasAttribute('scope')) {
31767
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(next, 'scope', 'col');
31768
+ }
31769
+ });
31770
+ }
31771
+ /**
31772
+ * The table has a header row: a `<thead>` with a row in it
31773
+ */ hasHeaderRow(table) {
31774
+ var _a;
31775
+ return Boolean((_a = table.tHead) === null || _a === void 0 ? void 0 : _a.rows.length);
31776
+ }
31777
+ /**
31778
+ * Header rows can always go back into the body. The first row can become
31779
+ * one unless a cell in it spans into the next, as a span can't cross from
31780
+ * the `<thead>` into the `<tbody>`
31781
+ */ canToggleHeaderRow(table) {
31782
+ const [row] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
31783
+ return this.hasHeaderRow(table) || Boolean(row && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(row.cells).every((cell)=>cell.rowSpan < 2));
31784
+ }
31785
+ /**
31786
+ * Moves the first row into a `<thead>`, its cells becoming
31787
+ * `<th scope="col">`, or the header rows back to the start of the
31788
+ * `<tbody>` as `<td>`. Their content, attributes and spans stay. Returns
31789
+ * the cells it replaced, with their replacements
31790
+ */ toggleHeaderRow(table) {
31791
+ const replaced = new Map();
31792
+ const create = this.j.createInside;
31793
+ const head = table.tHead;
31794
+ if (!this.canToggleHeaderRow(table)) {
31795
+ return replaced;
31796
+ }
31797
+ if (head && this.hasHeaderRow(table)) {
31798
+ const body = Table.__bodyOf(table, head, create);
31799
+ const first = body.firstChild;
31800
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(head.rows).forEach((row)=>{
31801
+ body.insertBefore(row, first);
31802
+ Table.__setCellsTag(row, 'td', create, replaced);
31803
+ });
31804
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
31805
+ } else {
31806
+ const [row] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
31807
+ const thead = head || create.element('thead');
31808
+ if (!head) {
31809
+ // Setting it puts it after a caption and column groups
31810
+ table.tHead = thead;
31811
+ }
31812
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(thead, row);
31813
+ Table.__setCellsTag(row, 'th', create, replaced);
31814
+ }
31815
+ return replaced;
31816
+ }
31545
31817
  /**
31546
31818
  * Inserts a new line after row what contains the selected cell
31547
31819
  *
@@ -31598,7 +31870,13 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
31598
31870
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(cell, 'rowspan', rowSpan - 1 > 1 ? rowSpan - 1 : null);
31599
31871
  }
31600
31872
  });
31873
+ const section = row.parentElement;
31601
31874
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(row);
31875
+ // A section left without rows goes too, so a table whose header row
31876
+ // was deleted has no `<thead>`
31877
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(section, SECTIONS) && !section.rows.length) {
31878
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(section);
31879
+ }
31602
31880
  }
31603
31881
  /**
31604
31882
  * Remove row
@@ -32022,7 +32300,10 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewCo
32022
32300
  const selector = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cssPath)(td);
32023
32301
  selector && selectors.push(selector);
32024
32302
  });
32025
- style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` : '';
32303
+ // Across cells, the browser's own text selection, which a drag makes
32304
+ // as well, isn't shown
32305
+ const hidden = selectors.length > 1 ? selectors.map((selector)=>`${selector}::selection,${selector} ::selection`).join(',') + '{background:transparent}' : '';
32306
+ style.innerHTML = selectors.length ? selectors.join(',') + `{${this.jodit.options.table.selectionCellStyle}}` + hidden : '';
32026
32307
  });
32027
32308
  }
32028
32309
  }
@@ -32056,10 +32337,11 @@ const instance = (j)=>j.getInstance('Table', j.o);
32056
32337
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(29960);
32057
32338
  /* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(37790);
32058
32339
  /* harmony import */ var _core_ui_button_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(62843);
32059
- /* harmony import */ var _core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(72157);
32060
- /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(12153);
32061
- /* harmony import */ var _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(56917);
32062
- /* harmony import */ var _factory_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(21491);
32340
+ /* harmony import */ var _core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(20014);
32341
+ /* harmony import */ var _core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(72157);
32342
+ /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(12153);
32343
+ /* harmony import */ var _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(56917);
32344
+ /* harmony import */ var _factory_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(21491);
32063
32345
  function _define_property(obj, key, value) {
32064
32346
  if (key in obj) {
32065
32347
  Object.defineProperty(obj, key, {
@@ -32139,6 +32421,7 @@ function _object_spread_props(target, source) {
32139
32421
 
32140
32422
 
32141
32423
 
32424
+
32142
32425
 
32143
32426
 
32144
32427
  const INPUT_TAGS = new Set([
@@ -32244,7 +32527,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
32244
32527
  configurable: true
32245
32528
  });
32246
32529
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(container, button);
32247
- const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__.Icon.get('chevron')}</span>`);
32530
+ const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__.Icon.get('chevron')}</span>`);
32248
32531
  // For caching
32249
32532
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.append(button, trigger);
32250
32533
  return container;
@@ -32301,7 +32584,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
32301
32584
  state.icon.iconURL = ctr.iconURL;
32302
32585
  } else {
32303
32586
  const name = ctr.icon || ctr.name;
32304
- state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_19__.Icon.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name]) ? name : '';
32587
+ state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_20__.Icon.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name]) ? name : '';
32305
32588
  }
32306
32589
  if (!ctr.iconURL && !state.icon.name) {
32307
32590
  state.text = ctr.text || ctr.name;
@@ -32332,6 +32615,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
32332
32615
  const elm = ctr.popup(this.j, target, this.__closePopup, this);
32333
32616
  if (elm) {
32334
32617
  popup.setContent((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_11__.isString)(elm) ? this.j.c.fromHTML(elm) : elm).open(()=>(0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
32618
+ // The focus stays in the content for a list, which
32619
+ // typing searches, but goes to a form, as in a dialog
32620
+ (0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_18__.focusFormField)(popup.container);
32335
32621
  } else {
32336
32622
  this.__closePopup();
32337
32623
  }
@@ -32474,7 +32760,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
32474
32760
  * Create an open popup list
32475
32761
  */ __openControlList(control) {
32476
32762
  var _a, _b, _c, _d, _e;
32477
- const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__.findControlType)(key, controls);
32763
+ const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_19__.findControlType)(key, controls);
32478
32764
  const list = control.list;
32479
32765
  const menu = this.openPopup();
32480
32766
  menu.parentElement = this;
@@ -32482,7 +32768,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
32482
32768
  if (content) {
32483
32769
  return this.__openMenu(menu, content);
32484
32770
  }
32485
- const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
32771
+ const toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_22__.makeCollection)(this.j);
32486
32772
  toolbar.parentElement = menu;
32487
32773
  toolbar.mode = 'vertical';
32488
32774
  const isListItem = (key)=>(0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_10__.isPlainObject)(key) && 'title' in key && 'value' in key;
@@ -32545,7 +32831,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
32545
32831
  }
32546
32832
  openPopup() {
32547
32833
  this.__closePopup();
32548
- this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
32834
+ this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_21__.Popup(this.j, false);
32549
32835
  this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
32550
32836
  return this.openedPopup;
32551
32837
  }
@@ -32563,15 +32849,18 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
32563
32849
  this.openedPopup = null;
32564
32850
  this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
32565
32851
  // The keyboard brought the focus into the dropdown: give it back to
32566
- // the button, otherwise it would fall out to the document
32567
- const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement);
32852
+ // the button, otherwise it would fall out to the document. A form
32853
+ // gives it back to the content, with the selection it was opened for
32854
+ const { activeElement } = this.od, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement), inForm = hadFocus && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.closest(activeElement, 'form', popup.container);
32568
32855
  this.state.activated = false;
32569
32856
  popup.close();
32570
32857
  popup.destruct();
32571
32858
  if (this.trigger) {
32572
32859
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_15__.attr)(this.trigger, 'aria-expanded', false);
32573
32860
  }
32574
- if (hadFocus) {
32861
+ if (inForm && (0,_core_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_9__.isJoditObject)(this.j)) {
32862
+ this.j.s.focus();
32863
+ } else if (hadFocus) {
32575
32864
  this.focus();
32576
32865
  }
32577
32866
  }
@@ -33554,6 +33843,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
33554
33843
  continue;
33555
33844
  }
33556
33845
  const reader = new FileReader();
33846
+ const { name } = file;
33557
33847
  const readerPromise = uploader.j.async.promise((resolve, reject)=>{
33558
33848
  reader.onerror = reject;
33559
33849
  reader.onloadend = ()=>{
@@ -33564,6 +33854,9 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
33564
33854
  ],
33565
33855
  isImages: [
33566
33856
  true
33857
+ ],
33858
+ fileNames: [
33859
+ name
33567
33860
  ]
33568
33861
  };
33569
33862
  const handler = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerSuccess) ? handlerSuccess : defaultHandlerSuccess;
@@ -34197,6 +34490,7 @@ function val(elm, name, value) {
34197
34490
  /* harmony import */ var _core_helpers_checker_is_function_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23282);
34198
34491
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29960);
34199
34492
  /* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67510);
34493
+ /* harmony import */ var _core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20014);
34200
34494
  /*!
34201
34495
  * Jodit Editor (https://xdsoft.net/jodit/)
34202
34496
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34206,6 +34500,7 @@ function val(elm, name, value) {
34206
34500
 
34207
34501
 
34208
34502
 
34503
+
34209
34504
  /**
34210
34505
  * Build tabs system
34211
34506
  *
@@ -34286,6 +34581,7 @@ function val(elm, name, value) {
34286
34581
  if (state) {
34287
34582
  state.activeTab = name;
34288
34583
  }
34584
+ ;(0,_core_ui_helpers_focus_form_field_js__WEBPACK_IMPORTED_MODULE_5__.focusFormField)(tab);
34289
34585
  return false;
34290
34586
  });
34291
34587
  nameToTab[name] = {
@@ -35246,49 +35542,50 @@ UiAiAssistant = __decorate([
35246
35542
  /* harmony import */ var _hr_hr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(16233);
35247
35543
  /* harmony import */ var _iframe_iframe_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(77469);
35248
35544
  /* harmony import */ var _image_image_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(23531);
35249
- /* harmony import */ var _image_processor_image_processor_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(80763);
35250
- /* harmony import */ var _image_properties_image_properties_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(3215);
35251
- /* harmony import */ var _indent_indent_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(70045);
35252
- /* harmony import */ var _inline_popup_inline_popup_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(93401);
35253
- /* harmony import */ var _justify_justify_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76295);
35254
- /* harmony import */ var _key_arrow_outside_key_arrow_outside_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(59483);
35255
- /* harmony import */ var _limit_limit_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(91071);
35256
- /* harmony import */ var _line_height_line_height_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(61019);
35257
- /* harmony import */ var _link_link_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(65517);
35258
- /* harmony import */ var _media_media_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(20071);
35259
- /* harmony import */ var _mobile_mobile_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(32309);
35260
- /* harmony import */ var _ordered_list_ordered_list_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(64837);
35261
- /* harmony import */ var _paste_paste_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(79799);
35262
- /* harmony import */ var _paste_from_word_paste_from_word_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(31571);
35263
- /* harmony import */ var _paste_storage_paste_storage_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(85407);
35264
- /* harmony import */ var _placeholder_placeholder_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(59451);
35265
- /* harmony import */ var _powered_by_jodit_powered_by_jodit_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(18363);
35266
- /* harmony import */ var _preview_preview_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(8355);
35267
- /* harmony import */ var _print_print_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(58519);
35268
- /* harmony import */ var _redo_undo_redo_undo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(6687);
35269
- /* harmony import */ var _resize_cells_resize_cells_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(56113);
35270
- /* harmony import */ var _resize_handler_resize_handler_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(9159);
35271
- /* harmony import */ var _resizer_resizer_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(12019);
35272
- /* harmony import */ var _search_search_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(36125);
35273
- /* harmony import */ var _select_select_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(9881);
35274
- /* harmony import */ var _select_cells_select_cells_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(28545);
35275
- /* harmony import */ var _size_size_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(45927);
35276
- /* harmony import */ var _source_source_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(52951);
35277
- /* harmony import */ var _spellcheck_spellcheck_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(43809);
35278
- /* harmony import */ var _stat_stat_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(7309);
35279
- /* harmony import */ var _sticky_sticky_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(68687);
35280
- /* harmony import */ var _symbols_symbols_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(59495);
35281
- /* harmony import */ var _ai_assistant_ai_assistant_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(39627);
35282
- /* harmony import */ var _tab_tab_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(767);
35283
- /* harmony import */ var _table_table_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(43003);
35284
- /* harmony import */ var _table_keyboard_navigation_table_keyboard_navigation_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(72439);
35285
- /* harmony import */ var _toolbar_navigation_toolbar_navigation_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(94529);
35286
- /* harmony import */ var _video_video_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(26551);
35287
- /* harmony import */ var _video_properties_video_properties_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(96139);
35288
- /* harmony import */ var _wrap_nodes_wrap_nodes_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(72253);
35289
- /* harmony import */ var _dtd_dtd_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(65735);
35290
- /* harmony import */ var _xpath_xpath_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(83671);
35291
- /* harmony import */ var _speech_recognize_speech_recognize_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(3115);
35545
+ /* harmony import */ var _image_caption_image_caption_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(84571);
35546
+ /* harmony import */ var _image_processor_image_processor_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(80763);
35547
+ /* harmony import */ var _image_properties_image_properties_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(3215);
35548
+ /* harmony import */ var _indent_indent_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(70045);
35549
+ /* harmony import */ var _inline_popup_inline_popup_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(93401);
35550
+ /* harmony import */ var _justify_justify_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76295);
35551
+ /* harmony import */ var _key_arrow_outside_key_arrow_outside_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(59483);
35552
+ /* harmony import */ var _limit_limit_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(91071);
35553
+ /* harmony import */ var _line_height_line_height_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(61019);
35554
+ /* harmony import */ var _link_link_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(65517);
35555
+ /* harmony import */ var _media_media_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(20071);
35556
+ /* harmony import */ var _mobile_mobile_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(32309);
35557
+ /* harmony import */ var _ordered_list_ordered_list_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(64837);
35558
+ /* harmony import */ var _paste_paste_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(79799);
35559
+ /* harmony import */ var _paste_from_word_paste_from_word_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(31571);
35560
+ /* harmony import */ var _paste_storage_paste_storage_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(85407);
35561
+ /* harmony import */ var _placeholder_placeholder_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(59451);
35562
+ /* harmony import */ var _powered_by_jodit_powered_by_jodit_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(18363);
35563
+ /* harmony import */ var _preview_preview_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(8355);
35564
+ /* harmony import */ var _print_print_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(58519);
35565
+ /* harmony import */ var _redo_undo_redo_undo_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(6687);
35566
+ /* harmony import */ var _resize_cells_resize_cells_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(56113);
35567
+ /* harmony import */ var _resize_handler_resize_handler_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(9159);
35568
+ /* harmony import */ var _resizer_resizer_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(12019);
35569
+ /* harmony import */ var _search_search_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(36125);
35570
+ /* harmony import */ var _select_select_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(9881);
35571
+ /* harmony import */ var _select_cells_select_cells_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(28545);
35572
+ /* harmony import */ var _size_size_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(45927);
35573
+ /* harmony import */ var _source_source_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(52951);
35574
+ /* harmony import */ var _spellcheck_spellcheck_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(43809);
35575
+ /* harmony import */ var _stat_stat_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(7309);
35576
+ /* harmony import */ var _sticky_sticky_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(68687);
35577
+ /* harmony import */ var _symbols_symbols_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(59495);
35578
+ /* harmony import */ var _ai_assistant_ai_assistant_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(39627);
35579
+ /* harmony import */ var _tab_tab_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(767);
35580
+ /* harmony import */ var _table_table_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(43003);
35581
+ /* harmony import */ var _table_keyboard_navigation_table_keyboard_navigation_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(72439);
35582
+ /* harmony import */ var _toolbar_navigation_toolbar_navigation_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(94529);
35583
+ /* harmony import */ var _video_video_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(26551);
35584
+ /* harmony import */ var _video_properties_video_properties_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(96139);
35585
+ /* harmony import */ var _wrap_nodes_wrap_nodes_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(72253);
35586
+ /* harmony import */ var _dtd_dtd_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(65735);
35587
+ /* harmony import */ var _xpath_xpath_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(83671);
35588
+ /* harmony import */ var _speech_recognize_speech_recognize_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(3115);
35292
35589
  /*!
35293
35590
  * Jodit Editor (https://xdsoft.net/jodit/)
35294
35591
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -35360,6 +35657,7 @@ UiAiAssistant = __decorate([
35360
35657
 
35361
35658
 
35362
35659
 
35660
+
35363
35661
 
35364
35662
 
35365
35663
  // JODIT-START:FAT
@@ -35448,6 +35746,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
35448
35746
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(jodit.editor, fakeNode)) {
35449
35747
  return;
35450
35748
  }
35749
+ // An editable element inside non-editable content, as an image's
35750
+ // caption is, keeps the caret, so nothing past its edge goes
35751
+ const host = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fakeNode, (elm)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(elm) && elm.hasAttribute('contenteditable') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(elm.parentNode, jodit.editor), jodit.editor);
35752
+ if (host && sel.cursorInTheEdge(backspace, host, fakeNode)) {
35753
+ return false;
35754
+ }
35451
35755
  if (jodit.e.fire('backSpaceBeforeCases', backspace, fakeNode)) {
35452
35756
  return false;
35453
35757
  }
@@ -35496,7 +35800,13 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
35496
35800
  if (!range.collapsed || !around.isPointInRange(range.startContainer, range.startOffset)) {
35497
35801
  return;
35498
35802
  }
35499
- const text = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_9__.findMostNestedNeighbor)(fakeNode, false, jodit.editor, true);
35803
+ // The search for text skips text of only non-breaking spaces, but the
35804
+ // browser types after it
35805
+ let before = fakeNode.previousSibling;
35806
+ while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && !/\S|\u00A0/.test(before.data)){
35807
+ before = before.previousSibling;
35808
+ }
35809
+ const text = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) ? before : (0,_helpers_js__WEBPACK_IMPORTED_MODULE_9__.findMostNestedNeighbor)(fakeNode, false, jodit.editor, true);
35500
35810
  const link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, 'a', jodit.editor);
35501
35811
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(text) || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(text, jodit.editor) || link && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(link, fakeNode) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor) !== _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fakeNode, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) {
35502
35812
  return;
@@ -36072,7 +36382,7 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = fal
36072
36382
  }
36073
36383
  if (charRemoved) {
36074
36384
  removeEmptyForParent(fakeNode, 'a');
36075
- addBRInsideEmptyBlock(jodit, fakeNode);
36385
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, fakeNode);
36076
36386
  jodit.s.setCursorBefore(fakeNode);
36077
36387
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(fakeNode.previousSibling, 'br') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, false)) {
36078
36388
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fakeNode, jodit.createInside.element('br'));
@@ -36107,13 +36417,6 @@ function getNextInlineSibling(sibling, backspace, root) {
36107
36417
  parent = p;
36108
36418
  }
36109
36419
  }
36110
- /**
36111
- * Helper add BR element inside empty block element
36112
- */ function addBRInsideEmptyBlock(jodit, node) {
36113
- if (node.parentElement !== jodit.editor && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node.parentElement) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(node.parentElement, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode)) {
36114
- _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(node, jodit.createInside.element('br'));
36115
- }
36116
- }
36117
36420
  function tryRemoveChar(sibling, backspace, step, anotherSibling) {
36118
36421
  // For Unicode escapes
36119
36422
  let value = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(sibling.nodeValue);
@@ -36677,6 +36980,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
36677
36980
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
36678
36981
 
36679
36982
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36983
+ /* harmony export */ addBRInsideEmptyBlock: function() { return /* binding */ addBRInsideEmptyBlock; },
36680
36984
  /* harmony export */ findMostNestedNeighbor: function() { return /* binding */ findMostNestedNeighbor; },
36681
36985
  /* harmony export */ getMoveFilter: function() { return /* binding */ getMoveFilter; }
36682
36986
  /* harmony export */ });
@@ -36712,6 +37016,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.delete = {
36712
37016
  */ function getMoveFilter(jodit) {
36713
37017
  return (node)=>jodit.e.fire('backSpaceIsMovedIgnore', node) !== true;
36714
37018
  }
37019
+ /**
37020
+ * Helper add BR element inside empty block element
37021
+ * @private
37022
+ */ function addBRInsideEmptyBlock(jodit, node) {
37023
+ if (node.parentElement !== jodit.editor && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(node.parentElement) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(node.parentElement, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmptyTextNode)) {
37024
+ _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after(node, jodit.createInside.element('br'));
37025
+ }
37026
+ }
36715
37027
 
36716
37028
 
36717
37029
  /***/ }),
@@ -37153,7 +37465,7 @@ class cleanHtml extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_5__.Plug
37153
37465
  beforeCommand(command) {
37154
37466
  if (command.toLowerCase() === 'removeformat') {
37155
37467
  if (this.j.s.isCollapsed()) {
37156
- (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForCollapsedSelection)(this.j);
37468
+ (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForWord)(this.j);
37157
37469
  } else {
37158
37470
  (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.removeFormatForSelection)(this.j);
37159
37471
  }
@@ -37449,16 +37761,17 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
37449
37761
 
37450
37762
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
37451
37763
  /* harmony export */ getHash: function() { return /* reexport safe */ _get_hash_js__WEBPACK_IMPORTED_MODULE_0__.getHash; },
37452
- /* harmony export */ removeFormatForCollapsedSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__.removeFormatForCollapsedSelection; },
37453
37764
  /* harmony export */ removeFormatForSelection: function() { return /* reexport safe */ _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection; },
37454
- /* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__.removePlaceholderBr; },
37455
- /* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__.visitNodeWalker; }
37765
+ /* harmony export */ removeFormatForWord: function() { return /* reexport safe */ _remove_format_remove_format_for_word_js__WEBPACK_IMPORTED_MODULE_3__.removeFormatForWord; },
37766
+ /* harmony export */ removePlaceholderBr: function() { return /* reexport safe */ _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_4__.removePlaceholderBr; },
37767
+ /* harmony export */ visitNodeWalker: function() { return /* reexport safe */ _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_5__.visitNodeWalker; }
37456
37768
  /* harmony export */ });
37457
37769
  /* harmony import */ var _get_hash_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83447);
37458
37770
  /* harmony import */ var _remove_format_remove_format_for_collapsed_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84272);
37459
37771
  /* harmony import */ var _remove_format_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
37460
- /* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56385);
37461
- /* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39516);
37772
+ /* harmony import */ var _remove_format_remove_format_for_word_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70464);
37773
+ /* harmony import */ var _remove_placeholder_br_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56385);
37774
+ /* harmony import */ var _visitor_visit_node_walker_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39516);
37462
37775
  /*!
37463
37776
  * Jodit Editor (https://xdsoft.net/jodit/)
37464
37777
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37473,6 +37786,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.eraser = {
37473
37786
 
37474
37787
 
37475
37788
 
37789
+
37476
37790
  /***/ }),
37477
37791
 
37478
37792
  /***/ 15908:
@@ -37625,6 +37939,126 @@ const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
37625
37939
  }
37626
37940
 
37627
37941
 
37942
+ /***/ }),
37943
+
37944
+ /***/ 70464:
37945
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
37946
+
37947
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
37948
+ /* harmony export */ removeFormatForWord: function() { return /* binding */ removeFormatForWord; }
37949
+ /* harmony export */ });
37950
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
37951
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
37952
+ /* harmony import */ var _remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42312);
37953
+ /*!
37954
+ * Jodit Editor (https://xdsoft.net/jodit/)
37955
+ * Released under MIT see LICENSE.txt in the project root for license information.
37956
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
37957
+ */
37958
+
37959
+
37960
+ /**
37961
+ * With just a caret, Word clears the formatting of the word the caret is
37962
+ * inside, and does nothing at a word's start or end. This selects the word,
37963
+ * clears it as a selection, and puts the caret back where it was.
37964
+ * @private
37965
+ */ function removeFormatForWord(jodit) {
37966
+ const { range } = jodit.s;
37967
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.startContainer, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor);
37968
+ if (!block) {
37969
+ return;
37970
+ }
37971
+ const texts = textsOf(block);
37972
+ const text = texts.map((node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.nodeValue : ' ').join('');
37973
+ const at = textOffset(texts, range);
37974
+ if (!isWordChar(text[at - 1]) || !isWordChar(text[at])) {
37975
+ return;
37976
+ }
37977
+ let start = at, end = at;
37978
+ while(isWordChar(text[start - 1])){
37979
+ start -= 1;
37980
+ }
37981
+ while(isWordChar(text[end])){
37982
+ end += 1;
37983
+ }
37984
+ const word = jodit.s.createRange();
37985
+ word.setStart(...positionAt(texts, start, true));
37986
+ word.setEnd(...positionAt(texts, end, false));
37987
+ jodit.s.selectRange(word);
37988
+ (0,_remove_format_for_selection_js__WEBPACK_IMPORTED_MODULE_2__.removeFormatForSelection)(jodit);
37989
+ // The text is the same, so the caret goes back to the same character
37990
+ const caret = jodit.s.createRange();
37991
+ caret.setStart(...positionAt(textsOf(block), at, false));
37992
+ jodit.s.selectRange(caret);
37993
+ }
37994
+ function isWordChar(char) {
37995
+ return Boolean(char && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE && /\S/.test(char));
37996
+ }
37997
+ /**
37998
+ * The block's own text nodes, in order, leaving out those of blocks inside
37999
+ * it. A line break, an image or another inseparable element ends a word, so
38000
+ * it is kept as a one-character piece
38001
+ */ function textsOf(block) {
38002
+ const texts = [];
38003
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(block, (node)=>{
38004
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, block)) {
38005
+ return;
38006
+ }
38007
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
38008
+ texts.push(node);
38009
+ }
38010
+ });
38011
+ return texts;
38012
+ }
38013
+ function lengthOf(piece) {
38014
+ var _a, _b;
38015
+ return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) ? (_b = (_a = piece.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0 : 1;
38016
+ }
38017
+ /**
38018
+ * How many characters of `texts` come before the caret, which can be in a
38019
+ * text node or between nodes
38020
+ */ function textOffset(texts, caret) {
38021
+ let at = 0;
38022
+ for (const piece of texts){
38023
+ if (piece === caret.startContainer) {
38024
+ return at + caret.startOffset;
38025
+ }
38026
+ const length = lengthOf(piece);
38027
+ // This piece ends after the caret, so the caret is before it
38028
+ if (caret.comparePoint(piece, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) ? length : 0) > 0) {
38029
+ return at;
38030
+ }
38031
+ at += length;
38032
+ }
38033
+ return at;
38034
+ }
38035
+ /**
38036
+ * The text node and offset of the `at`th character. Where two text nodes
38037
+ * meet, `later` picks the start of the second over the end of the first
38038
+ */ function positionAt(texts, at, later) {
38039
+ var _a, _b;
38040
+ let before = 0;
38041
+ let last = null;
38042
+ for (const piece of texts){
38043
+ const length = lengthOf(piece);
38044
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece) && (at < before + length || !later && at === before + length)) {
38045
+ return [
38046
+ piece,
38047
+ at - before
38048
+ ];
38049
+ }
38050
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(piece)) {
38051
+ last = piece;
38052
+ }
38053
+ before += length;
38054
+ }
38055
+ return [
38056
+ last,
38057
+ (_b = (_a = last === null || last === void 0 ? void 0 : last.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0
38058
+ ];
38059
+ }
38060
+
38061
+
37628
38062
  /***/ }),
37629
38063
 
37630
38064
  /***/ 56385:
@@ -39562,6 +39996,7 @@ var DragState;
39562
39996
  /**
39563
39997
  * Drag start handler
39564
39998
  */ onDragStart(event) {
39999
+ var _a;
39565
40000
  if (event.type === 'dragstart' && this.draggable) {
39566
40001
  return false;
39567
40002
  }
@@ -39580,7 +40015,8 @@ var DragState;
39580
40015
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(lastTarget.parentElement, 'a') && lastTarget.parentElement.firstChild === lastTarget && lastTarget.parentElement.lastChild === lastTarget) {
39581
40016
  lastTarget = lastTarget.parentElement;
39582
40017
  }
39583
- this.startDragging(lastTarget, event);
40018
+ // A captioned image goes with its caption
40019
+ this.startDragging((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(this.j, lastTarget)) !== null && _a !== void 0 ? _a : lastTarget, event);
39584
40020
  }
39585
40021
  /**
39586
40022
  * Prepare the ghost element and switch to the waiting state.
@@ -41662,7 +42098,8 @@ const libraries = new Map();
41662
42098
  /* harmony import */ var _core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72430);
41663
42099
  /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12153);
41664
42100
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6441);
41665
- /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(89816);
42101
+ /* harmony import */ var _content_fonts_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4932);
42102
+ /* harmony import */ var _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89816);
41666
42103
  /*!
41667
42104
  * Jodit Editor (https://xdsoft.net/jodit/)
41668
42105
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -41672,7 +42109,39 @@ const libraries = new Map();
41672
42109
 
41673
42110
 
41674
42111
 
41675
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_4__["default"]);
42112
+
42113
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_2__.Icon.set('paragraph', _paragraph_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]);
42114
+ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.formatBlock = {
42115
+ // Opt in: previews keep the toolbar's styles unless the integrator lists
42116
+ // the properties to copy, e.g. ['font-family', 'font-weight', 'color']
42117
+ previewProperties: []
42118
+ };
42119
+ /**
42120
+ * The list is outside the editing area, and in iframe mode outside its
42121
+ * document, so a preview would take the toolbar's styles. This reads how the
42122
+ * content shows a tag from a probe in the editing area
42123
+ */ function previewStyle(editor, tag) {
42124
+ const { previewProperties } = editor.o.formatBlock;
42125
+ if (!previewProperties.length) {
42126
+ return '';
42127
+ }
42128
+ const probe = editor.createInside.element(tag, {
42129
+ style: 'display: none'
42130
+ });
42131
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(editor.editor, probe);
42132
+ const style = editor.ew.getComputedStyle(probe);
42133
+ const size = parseFloat(style.fontSize) || 16;
42134
+ const css = previewProperties.map((prop)=>{
42135
+ let value = style.getPropertyValue(prop);
42136
+ if (value && prop === 'font-family') {
42137
+ value = (0,_content_fonts_js__WEBPACK_IMPORTED_MODULE_4__.withContentFonts)(editor, value);
42138
+ }
42139
+ // Each browser knows only one of the smoothing properties
42140
+ return value ? `;${prop}:${value.replace(/(-?[\d.]+)px/g, (_, px)=>`${parseFloat(px) / size}em`).replace(/"/g, "'")}` : '';
42141
+ }).join('');
42142
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(probe);
42143
+ return css;
42144
+ }
41676
42145
  _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
41677
42146
  command: 'formatBlock',
41678
42147
  value (editor, button) {
@@ -41713,11 +42182,162 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.paragraph = {
41713
42182
  isActive: (editor, button)=>{
41714
42183
  return button.state.value !== editor.o.enter && (0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(button.control.list) && Boolean(button.control.list[button.state.value]);
41715
42184
  },
41716
- childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0"><span>${e.i18n(value)}</span></${key}>`,
42185
+ childTemplate: (e, key, value)=>`<${key} style="margin:0;padding:0${previewStyle(e, key)}"><span>${e.i18n(value)}</span></${key}>`,
41717
42186
  tooltip: 'Insert format block'
41718
42187
  };
41719
42188
 
41720
42189
 
42190
+ /***/ }),
42191
+
42192
+ /***/ 4932:
42193
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
42194
+
42195
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
42196
+ /* harmony export */ withContentFonts: function() { return /* binding */ withContentFonts; }
42197
+ /* harmony export */ });
42198
+ /*!
42199
+ * Jodit Editor (https://xdsoft.net/jodit/)
42200
+ * Released under MIT see LICENSE.txt in the project root for license information.
42201
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
42202
+ */ const carried = new WeakMap();
42203
+ const fetched = new Map();
42204
+ let editors = 0;
42205
+ /**
42206
+ * In iframe mode the content's web fonts load only in the iframe, but the
42207
+ * Paragraph list is in the page, so its previews would fall back to the
42208
+ * page's fonts. This adds the content's web fonts to the page under names
42209
+ * only this editor uses, so nothing else on the page can pick them up, and
42210
+ * puts those names first in a preview's `font-family`
42211
+ */ function withContentFonts(editor, fontFamily) {
42212
+ const { ed, od } = editor;
42213
+ if (ed === od) {
42214
+ return fontFamily;
42215
+ }
42216
+ const state = carriedFor(editor);
42217
+ carry(editor, state);
42218
+ const webFonts = new Set();
42219
+ ed.fonts.forEach((face)=>webFonts.add(familyName(face.family)));
42220
+ return fontFamily.split(',').map((family)=>{
42221
+ const name = familyName(family);
42222
+ return webFonts.has(name) ? `"${state.prefix}${name}", ${family.trim()}` : family.trim();
42223
+ }).join(', ');
42224
+ }
42225
+ function carriedFor(editor) {
42226
+ let state = carried.get(editor);
42227
+ if (!state) {
42228
+ const { od } = editor;
42229
+ const created = {
42230
+ prefix: `jodit-preview-${++editors}-`,
42231
+ faces: new Map(),
42232
+ pending: false
42233
+ };
42234
+ carried.set(editor, created);
42235
+ editor.e.on('beforeDestruct', ()=>created.faces.forEach((face)=>od.fonts.delete(face)));
42236
+ state = created;
42237
+ }
42238
+ return state;
42239
+ }
42240
+ /**
42241
+ * It looks each time the list opens, since the content's stylesheets may
42242
+ * still have been loading the time before
42243
+ */ function carry(editor, state) {
42244
+ // Every preview in the list asks, but one look is enough
42245
+ if (state.pending) {
42246
+ return;
42247
+ }
42248
+ state.pending = true;
42249
+ const { ed, od } = editor;
42250
+ Promise.all(Array.from(ed.styleSheets, (sheet)=>fontsOf(sheet, ed.baseURI))).then((lists)=>{
42251
+ state.pending = false;
42252
+ if (editor.isInDestruct) {
42253
+ return;
42254
+ }
42255
+ lists.flat().forEach((font)=>{
42256
+ const key = JSON.stringify(font);
42257
+ if (!state.faces.has(key)) {
42258
+ const face = new FontFace(state.prefix + font.family, font.source, font.descriptors);
42259
+ od.fonts.add(face);
42260
+ state.faces.set(key, face);
42261
+ }
42262
+ });
42263
+ });
42264
+ }
42265
+ /**
42266
+ * The web fonts a stylesheet and those it imports declare
42267
+ */ function fontsOf(sheet, base) {
42268
+ var _a;
42269
+ let rules;
42270
+ try {
42271
+ rules = sheet.cssRules;
42272
+ } catch (_b) {
42273
+ // Another site's stylesheet can't be read, but it can be fetched if
42274
+ // the site allows it, as Google Fonts does
42275
+ const { href } = sheet;
42276
+ if (!href) {
42277
+ return Promise.resolve([]);
42278
+ }
42279
+ let fonts = fetched.get(href);
42280
+ if (!fonts) {
42281
+ fonts = fetchFonts(href);
42282
+ fetched.set(href, fonts);
42283
+ }
42284
+ return fonts;
42285
+ }
42286
+ return fontsIn(rules, (_a = sheet.href) !== null && _a !== void 0 ? _a : base);
42287
+ }
42288
+ function fontsIn(rules, base) {
42289
+ return Promise.all(Array.from(rules, (rule)=>{
42290
+ if ('styleSheet' in rule) {
42291
+ const { styleSheet } = rule;
42292
+ return styleSheet ? fontsOf(styleSheet, base) : [];
42293
+ }
42294
+ if ('cssRules' in rule) {
42295
+ return fontsIn(rule.cssRules, base);
42296
+ }
42297
+ return rule.cssText.startsWith('@font-face') ? [
42298
+ fontOf(rule, base)
42299
+ ] : [];
42300
+ })).then((lists)=>lists.flat());
42301
+ }
42302
+ function fontOf(rule, base) {
42303
+ const value = (prop)=>rule.style.getPropertyValue(prop) || undefined;
42304
+ return {
42305
+ family: familyName(rule.style.getPropertyValue('font-family')),
42306
+ source: withAbsoluteUrls(rule.style.getPropertyValue('src'), base),
42307
+ descriptors: {
42308
+ style: value('font-style'),
42309
+ weight: value('font-weight'),
42310
+ stretch: value('font-stretch'),
42311
+ unicodeRange: value('unicode-range')
42312
+ }
42313
+ };
42314
+ }
42315
+ function fetchFonts(href) {
42316
+ return fetch(href).then((response)=>response.text()).then((text)=>{
42317
+ const doc = document.implementation.createHTMLDocument('');
42318
+ const style = doc.createElement('style');
42319
+ style.textContent = text;
42320
+ doc.head.appendChild(style);
42321
+ return style.sheet ? fontsIn(style.sheet.cssRules, href) : [];
42322
+ }).catch(()=>[]);
42323
+ }
42324
+ function familyName(family) {
42325
+ return family.replace(/["']/g, '').trim().toLowerCase();
42326
+ }
42327
+ /**
42328
+ * The fonts are added to the page, so a relative URL would point somewhere
42329
+ * else
42330
+ */ function withAbsoluteUrls(css, base) {
42331
+ return css.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g, (match, quote, url)=>{
42332
+ try {
42333
+ return `url("${new URL(url, base).href}")`;
42334
+ } catch (_a) {
42335
+ return match;
42336
+ }
42337
+ });
42338
+ }
42339
+
42340
+
41721
42341
  /***/ }),
41722
42342
 
41723
42343
  /***/ 96111:
@@ -42398,6 +43018,858 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
42398
43018
  _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('iframe', iframe);
42399
43019
 
42400
43020
 
43021
+ /***/ }),
43022
+
43023
+ /***/ 43687:
43024
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
43025
+
43026
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6441);
43027
+ /*!
43028
+ * Jodit Editor (https://xdsoft.net/jodit/)
43029
+ * Released under MIT see LICENSE.txt in the project root for license information.
43030
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43031
+ */
43032
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.imageCaption = {
43033
+ wrapper: {
43034
+ tag: 'figure',
43035
+ className: ''
43036
+ },
43037
+ inner: null,
43038
+ caption: {
43039
+ tag: 'figcaption',
43040
+ className: ''
43041
+ }
43042
+ };
43043
+
43044
+
43045
+ /***/ }),
43046
+
43047
+ /***/ 84571:
43048
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
43049
+
43050
+ /* unused harmony export imageCaption */
43051
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
43052
+ /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
43053
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
43054
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
43055
+ /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
43056
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
43057
+ /* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20356);
43058
+ /* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45124);
43059
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43687);
43060
+ function _define_property(obj, key, value) {
43061
+ if (key in obj) {
43062
+ Object.defineProperty(obj, key, {
43063
+ value: value,
43064
+ enumerable: true,
43065
+ configurable: true,
43066
+ writable: true
43067
+ });
43068
+ } else obj[key] = value;
43069
+ return obj;
43070
+ }
43071
+ function _object_spread(target) {
43072
+ for(var i = 1; i < arguments.length; i++){
43073
+ var source = arguments[i] != null ? arguments[i] : {};
43074
+ var ownKeys = Object.keys(source);
43075
+ if (typeof Object.getOwnPropertySymbols === "function") {
43076
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
43077
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
43078
+ }));
43079
+ }
43080
+ ownKeys.forEach(function(key) {
43081
+ _define_property(target, key, source[key]);
43082
+ });
43083
+ }
43084
+ return target;
43085
+ }
43086
+ function ownKeys(object, enumerableOnly) {
43087
+ var keys = Object.keys(object);
43088
+ if (Object.getOwnPropertySymbols) {
43089
+ var symbols = Object.getOwnPropertySymbols(object);
43090
+ if (enumerableOnly) {
43091
+ symbols = symbols.filter(function(sym) {
43092
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
43093
+ });
43094
+ }
43095
+ keys.push.apply(keys, symbols);
43096
+ }
43097
+ return keys;
43098
+ }
43099
+ function _object_spread_props(target, source) {
43100
+ source = source != null ? source : {};
43101
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
43102
+ else {
43103
+ ownKeys(Object(source)).forEach(function(key) {
43104
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
43105
+ });
43106
+ }
43107
+ return target;
43108
+ }
43109
+ /*!
43110
+ * Jodit Editor (https://xdsoft.net/jodit/)
43111
+ * Released under MIT see LICENSE.txt in the project root for license information.
43112
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43113
+ */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
43114
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43115
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43116
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43117
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
43118
+ };
43119
+
43120
+
43121
+
43122
+
43123
+
43124
+
43125
+
43126
+
43127
+
43128
+ const MARGINS = [
43129
+ 'margin-top',
43130
+ 'margin-right',
43131
+ 'margin-bottom',
43132
+ 'margin-left'
43133
+ ];
43134
+ const ARROWS = new Set([
43135
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_UP,
43136
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN,
43137
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT,
43138
+ _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT
43139
+ ]);
43140
+ // Blocks that only hold text, which a block wrapper can't go inside
43141
+ const TEXT_BLOCK = /^(P|H[1-6]|PRE)$/i;
43142
+ // They would replace the caption with a heading, quote or list
43143
+ const BLOCK_COMMANDS = new Set([
43144
+ 'formatblock',
43145
+ 'insertorderedlist',
43146
+ 'insertunorderedlist'
43147
+ ]);
43148
+ const PLACEHOLDER = 'data-jodit-placeholder';
43149
+ /**
43150
+ * Jodit's focus colour round a caption being typed in, in place of the
43151
+ * browser's, and a placeholder in a blank caption. `:where` leaves both for
43152
+ * the content's own styles to change
43153
+ */ const CAPTION_STYLE = ':where(.jodit-wysiwyg [contenteditable=false] [contenteditable=true]:focus){outline:1px solid var(--jd-color-border-selected,#1e88e5)}' + `:where(.jodit-wysiwyg [${PLACEHOLDER}]){position:relative}` + `:where(.jodit-wysiwyg [${PLACEHOLDER}])::before{position:absolute;top:0;right:0;left:0;padding:inherit;color:var(--jd-color-placeholder,#a5a5a5);content:attr(${PLACEHOLDER});pointer-events:none}`;
43154
+ /**
43155
+ * Captions images: wraps an image in `imageCaption`'s elements and back, and
43156
+ * keeps the caret in the caption
43157
+ */ class imageCaption extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
43158
+ /** @override */ afterInit(jodit) {
43159
+ // It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
43160
+ (0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(jodit, 'imageCaption', 'style', true).textContent = CAPTION_STYLE;
43161
+ jodit.e.on('beforeCommandSelectall', this.__onSelectAll, {
43162
+ top: true
43163
+ });
43164
+ this.onChangePlace();
43165
+ }
43166
+ /**
43167
+ * Gives `image` a caption, or takes it away, as `on` says, or else the
43168
+ * other way round from how it is. Returns the caption it gave, or null
43169
+ * when it took one away
43170
+ */ onToggleImageCaption(image, on) {
43171
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, image);
43172
+ if (wrapper && on !== true) {
43173
+ const fresh = this.__freshCaption(wrapper);
43174
+ if (fresh) {
43175
+ this.__unrecorded(()=>this.__restore(fresh));
43176
+ } else {
43177
+ this.__uncaption(wrapper, image);
43178
+ }
43179
+ return null;
43180
+ }
43181
+ if (!wrapper && on !== false) {
43182
+ return this.__caption(image);
43183
+ }
43184
+ }
43185
+ __freshCaption(wrapper) {
43186
+ const fresh = this.__fresh;
43187
+ if (!fresh || fresh.wrapper !== wrapper || wrapper.parentNode !== fresh.parent || wrapper.previousSibling !== fresh.previous || wrapper.nextSibling !== fresh.next || shape(wrapper, fresh.image) !== fresh.shape || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper) !== fresh.caption || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(fresh.caption)) {
43188
+ return null;
43189
+ }
43190
+ return fresh;
43191
+ }
43192
+ /**
43193
+ * Giving a caption isn't a step in the history of its own, as the first
43194
+ * thing typed in it is, so Undo never brings back a blank caption
43195
+ */ __caption(image) {
43196
+ const { j } = this;
43197
+ const { snapshot } = j.history;
43198
+ // The steps before it are recorded first
43199
+ j.setEditorValue();
43200
+ j.e.fire('internalUpdate');
43201
+ const before = snapshot.make();
43202
+ let fresh;
43203
+ snapshot.transaction(()=>{
43204
+ fresh = this.__fresh = _object_spread_props(_object_spread({}, this.__wrap(image)), {
43205
+ before
43206
+ });
43207
+ j.setEditorValue();
43208
+ });
43209
+ // The value is as it was, so no `change` updates the toolbars
43210
+ j.e.fire('updateToolbar');
43211
+ return fresh.caption;
43212
+ }
43213
+ /**
43214
+ * Changes the content with no step in the history of its own, so Undo
43215
+ * never brings back a blank caption. A step still open takes it in
43216
+ */ __unrecorded(changes) {
43217
+ const { j } = this;
43218
+ j.setEditorValue();
43219
+ this.__fresh = null;
43220
+ j.history.snapshot.transaction(()=>{
43221
+ changes();
43222
+ j.setEditorValue();
43223
+ });
43224
+ j.e.fire('internalUpdate');
43225
+ j.e.fire('updateToolbar');
43226
+ }
43227
+ __wrap(image) {
43228
+ var _a;
43229
+ const { j } = this;
43230
+ const { wrapper: wrapperPart, inner, caption: captionPart } = j.o.imageCaption;
43231
+ const link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', j.editor);
43232
+ const target = link && !((_a = link.textContent) === null || _a === void 0 ? void 0 : _a.trim()) && link.getElementsByTagName('img').length === 1 ? link : image;
43233
+ const attributes = [
43234
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'style'),
43235
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'class')
43236
+ ];
43237
+ const place = target.parentNode;
43238
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(image, 'width') || pixels((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width')) || (image.offsetWidth ? `${image.offsetWidth}px` : '');
43239
+ const classes = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image);
43240
+ const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(image, classes);
43241
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.clearHAlign)(image, classes);
43242
+ const wrapper = this.__create(wrapperPart);
43243
+ const box = inner ? this.__create(inner) : wrapper;
43244
+ const caption = this.__create(captionPart);
43245
+ caption.appendChild(j.createInside.element('br'));
43246
+ const split = this.__insert(wrapper, target);
43247
+ if (box !== wrapper) {
43248
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(wrapper, box);
43249
+ }
43250
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, [
43251
+ target,
43252
+ caption
43253
+ ]);
43254
+ moveMargins(image, wrapper);
43255
+ // The wrapper takes the image's width, and the image fills it, so the
43256
+ // caption wraps under the image
43257
+ if (width) {
43258
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', width);
43259
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', '100%');
43260
+ }
43261
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(wrapper, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
43262
+ this.__mark(wrapper);
43263
+ return {
43264
+ caption,
43265
+ wrapper,
43266
+ image,
43267
+ target,
43268
+ place,
43269
+ split,
43270
+ attributes,
43271
+ parent: wrapper.parentNode,
43272
+ previous: wrapper.previousSibling,
43273
+ next: wrapper.nextSibling,
43274
+ shape: shape(wrapper, image)
43275
+ };
43276
+ }
43277
+ /**
43278
+ * Puts the image back as it was before its caption: in the line the
43279
+ * caption split, and with its own alignment, margins and width. The image
43280
+ * goes into the part of the line holding the caret, so the caret stays
43281
+ */ __restore(fresh) {
43282
+ var _a, _b;
43283
+ const { wrapper, image, target, place, split, attributes } = fresh;
43284
+ if (!split) {
43285
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
43286
+ } else if (!split.head && !split.tail) {
43287
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(place, target);
43288
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, split.block);
43289
+ } else {
43290
+ const { sel } = this.j.s;
43291
+ const caret = (sel === null || sel === void 0 ? void 0 : sel.rangeCount) ? sel.getRangeAt(0).startContainer : null;
43292
+ const { head, tail } = split;
43293
+ if (head && !(tail && caret && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(tail, caret))) {
43294
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(head, [
43295
+ target,
43296
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)((_a = tail === null || tail === void 0 ? void 0 : tail.childNodes) !== null && _a !== void 0 ? _a : [])
43297
+ ]);
43298
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(tail);
43299
+ } else if (tail) {
43300
+ const first = tail.firstChild;
43301
+ [
43302
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)((_b = head === null || head === void 0 ? void 0 : head.childNodes) !== null && _b !== void 0 ? _b : []),
43303
+ target
43304
+ ].forEach((node)=>tail.insertBefore(node, first));
43305
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(head);
43306
+ }
43307
+ }
43308
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
43309
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, {
43310
+ style: attributes[0],
43311
+ class: attributes[1]
43312
+ });
43313
+ }
43314
+ __uncaption(wrapper, image) {
43315
+ var _a;
43316
+ const { j } = this;
43317
+ // Read while the wrapper is still one, with its caption
43318
+ const align = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getHAlign)(wrapper, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, wrapper));
43319
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(wrapper, 'width');
43320
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper));
43321
+ const target = (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image;
43322
+ moveMargins(wrapper, image);
43323
+ if (width) {
43324
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
43325
+ }
43326
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.hAlignElement)(image, align, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getAlignClasses)(j, image));
43327
+ // A block wrapper leaves the image in a paragraph of its own
43328
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper) && wrapper.parentNode === j.editor && j.o.enter.toLowerCase() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.BR) {
43329
+ const line = j.createInside.element(j.o.enter);
43330
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
43331
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, target);
43332
+ } else {
43333
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, target);
43334
+ }
43335
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
43336
+ }
43337
+ __create({ tag, className }) {
43338
+ return this.j.createInside.element(tag, className ? {
43339
+ class: className
43340
+ } : {});
43341
+ }
43342
+ /**
43343
+ * Puts `wrapper` where `target` is. A block can't go in a paragraph, so the
43344
+ * paragraph is split round it, and a part left empty goes
43345
+ */ __insert(wrapper, target) {
43346
+ const { j } = this;
43347
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper) ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock, j.editor) : null;
43348
+ if (!block || !TEXT_BLOCK.test(block.nodeName)) {
43349
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(target, wrapper);
43350
+ return null;
43351
+ }
43352
+ const range = j.ed.createRange();
43353
+ range.setStartBefore(block);
43354
+ range.setEndBefore(target);
43355
+ const start = range.extractContents();
43356
+ range.setStartAfter(target);
43357
+ range.setEndAfter(block);
43358
+ const end = range.extractContents();
43359
+ const [head, tail] = [
43360
+ start,
43361
+ end
43362
+ ].map((part, index)=>{
43363
+ const line = part.firstChild;
43364
+ if (!line || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(line)) {
43365
+ return null;
43366
+ }
43367
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(index ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before, block, line);
43368
+ return line;
43369
+ });
43370
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(block, wrapper);
43371
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(block);
43372
+ return {
43373
+ block,
43374
+ head,
43375
+ tail
43376
+ };
43377
+ }
43378
+ /**
43379
+ * The wrapper can't be edited, apart from its caption, so typing can't
43380
+ * land between the image and the caption
43381
+ */ __mark(wrapper) {
43382
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(wrapper, 'contenteditable', false);
43383
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, wrapper);
43384
+ if (caption) {
43385
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, 'contenteditable', true);
43386
+ this.__placeholder(caption);
43387
+ }
43388
+ }
43389
+ __placeholder(caption) {
43390
+ const text = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) ? this.j.i18n('Caption') : null;
43391
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER) !== text) {
43392
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(caption, PLACEHOLDER, text);
43393
+ }
43394
+ }
43395
+ onChange() {
43396
+ const { j } = this;
43397
+ if (j.isInDestruct || j.getMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
43398
+ return;
43399
+ }
43400
+ ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(j.editor.getElementsByTagName(j.o.imageCaption.wrapper.tag)).forEach((elm)=>{
43401
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, elm)) {
43402
+ this.__mark(elm);
43403
+ }
43404
+ });
43405
+ }
43406
+ /**
43407
+ * The placeholder goes with the first letter typed or pasted, and comes
43408
+ * back when the last is deleted
43409
+ */ onInput() {
43410
+ const caption = this.__caretCaption();
43411
+ if (caption) {
43412
+ this.__placeholder(caption);
43413
+ }
43414
+ }
43415
+ /**
43416
+ * The editor's own attributes stay out of the value, as the caption would
43417
+ * be editable on the page. So does a caption given and left blank, as
43418
+ * leaving it takes it off, so saving at once keeps the image as it was
43419
+ */ onAfterGetValueFromEditor(data) {
43420
+ if (!data.value.includes('contenteditable')) {
43421
+ return;
43422
+ }
43423
+ const { j } = this;
43424
+ const template = j.c.element('template');
43425
+ template.innerHTML = data.value;
43426
+ const wrappers = (root)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(root.querySelectorAll(j.o.imageCaption.wrapper.tag)).filter((wrapper)=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper));
43427
+ const copies = wrappers(template.content);
43428
+ const fresh = this.__fresh && this.__freshCaption(this.__fresh.wrapper);
43429
+ const copy = fresh && copies[wrappers(j.editor).indexOf(fresh.wrapper)];
43430
+ const placed = fresh && copy && placedIn(j, fresh, copy);
43431
+ let changed = false;
43432
+ if (placed) {
43433
+ this.__restore(placed);
43434
+ changed = true;
43435
+ }
43436
+ copies.forEach((wrapper)=>{
43437
+ [
43438
+ wrapper,
43439
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(j, wrapper)
43440
+ ].forEach((elm)=>[
43441
+ 'contenteditable',
43442
+ PLACEHOLDER
43443
+ ].forEach((name)=>{
43444
+ if (elm === null || elm === void 0 ? void 0 : elm.hasAttribute(name)) {
43445
+ elm.removeAttribute(name);
43446
+ changed = true;
43447
+ }
43448
+ }));
43449
+ });
43450
+ if (changed) {
43451
+ data.value = template.innerHTML;
43452
+ }
43453
+ }
43454
+ onChangePlace() {
43455
+ const { j } = this;
43456
+ // Captured, to come first: the editor's own `focusout` listener can stop
43457
+ // the event as it fires `blur`, and an image's `mousedown` listener
43458
+ // moves the focus before the press reaches the editor
43459
+ j.e.off([
43460
+ j.editor,
43461
+ j.ow,
43462
+ j.ew
43463
+ ], '.imageCaption').on(j.editor, 'focusout.imageCaption', this.__onFocusOut, {
43464
+ capture: true
43465
+ }).on(j.editor, 'mousedown.imageCaption', this.__onMouseDown, {
43466
+ capture: true
43467
+ }).on([
43468
+ j.ow,
43469
+ j.ew
43470
+ ], 'mouseup.imageCaption', this.__onMouseUp);
43471
+ }
43472
+ __onMouseDown(event) {
43473
+ this.__press = event.target;
43474
+ }
43475
+ /**
43476
+ * A caption left blank goes when the focus leaves it. That's checked once
43477
+ * the focus has landed, as switching windows or opening the editor's own
43478
+ * popups keeps it, and once a press that took the focus is over, as the
43479
+ * browsers fire no click when its target moves
43480
+ */ __onFocusOut(event) {
43481
+ const caption = event.target;
43482
+ if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption)) !== caption) {
43483
+ return;
43484
+ }
43485
+ if (this.__press) {
43486
+ this.__afterPress.push(caption);
43487
+ } else {
43488
+ this.__dropBlank(caption, null);
43489
+ }
43490
+ }
43491
+ __onMouseUp() {
43492
+ const press = this.__press;
43493
+ this.__press = null;
43494
+ this.__afterPress.splice(0).forEach((caption)=>this.__dropBlank(caption, press));
43495
+ }
43496
+ __dropBlank(caption, press) {
43497
+ // `async.setTimeout` runs a timeout of 0 at once
43498
+ this.j.async.setTimeout(()=>{
43499
+ const { j } = this;
43500
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(j, caption);
43501
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(j, wrapper);
43502
+ if (!wrapper || !image || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmpty(caption) || this.__keepsFocus(caption)) {
43503
+ return;
43504
+ }
43505
+ const clicked = Boolean(press && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(wrapper, press));
43506
+ const fresh = this.__freshCaption(wrapper);
43507
+ this.__unrecorded(()=>fresh ? this.__restore(fresh) : this.__uncaption(wrapper, image));
43508
+ // The click opened the image's popup below the caption, so it
43509
+ // opens again below the image, as after the popup's Caption button
43510
+ if (clicked) {
43511
+ j.e.fire('recalcPositionPopup');
43512
+ j.e.fire('closeAllPopups');
43513
+ }
43514
+ }, 1);
43515
+ }
43516
+ /**
43517
+ * The caption has the focus, or had it when another window took it, or
43518
+ * the editor's own popups and dialogs have it, as the link form
43519
+ */ __keepsFocus(caption) {
43520
+ const { j } = this;
43521
+ const doc = caption.ownerDocument;
43522
+ if (doc.activeElement === caption && (doc.hasFocus() || !j.od.hasFocus())) {
43523
+ return true;
43524
+ }
43525
+ const active = j.od.activeElement;
43526
+ return Boolean(active && active !== j.iframe && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(j.editor, active) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(j.container, active) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(active, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'data-editor_id') === j.id, j.od.body)));
43527
+ }
43528
+ /**
43529
+ * The caption the caret is in
43530
+ */ __caretCaption() {
43531
+ const { s } = this.j;
43532
+ if (!s.isInsideArea) {
43533
+ return null;
43534
+ }
43535
+ const node = s.range.startContainer;
43536
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getImageCaption)(this.j, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, node));
43537
+ return caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(caption, node) ? caption : null;
43538
+ }
43539
+ /**
43540
+ * Enter in a caption starts a line after the image, and Shift+Enter
43541
+ * breaks the caption's line, as everywhere
43542
+ */ onBeforeEnter(event) {
43543
+ const caption = (event === null || event === void 0 ? void 0 : event.shiftKey) ? null : this.__caretCaption();
43544
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, caption);
43545
+ if (!wrapper) {
43546
+ return;
43547
+ }
43548
+ const { j } = this;
43549
+ this.__focusEditor();
43550
+ // The Enter plugin breaks the line after an inline wrapper
43551
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
43552
+ j.s.setCursorAfter(wrapper);
43553
+ return;
43554
+ }
43555
+ const line = this.__line();
43556
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
43557
+ j.s.setCursorIn(line);
43558
+ j.synchronizeValues();
43559
+ return false;
43560
+ }
43561
+ /**
43562
+ * The caption keeps the focus, as an editable element of its own, and
43563
+ * would take the caret back, so the editor takes it before the caret
43564
+ * leaves the caption
43565
+ */ __focusEditor() {
43566
+ this.j.editor.focus({
43567
+ preventScroll: true
43568
+ });
43569
+ }
43570
+ __line() {
43571
+ const { j } = this;
43572
+ const line = j.createInside.element(j.o.enter);
43573
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(line, 'br')) {
43574
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(line, j.createInside.element('br'));
43575
+ }
43576
+ return line;
43577
+ }
43578
+ /**
43579
+ * A caption holds text. An image, a table or a block put in it would end
43580
+ * the captioned image, so it goes after the image, as Enter would
43581
+ */ onBeforeInsertNode(node) {
43582
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.__caretCaption());
43583
+ if (!wrapper || !holdsMoreThanText(node)) {
43584
+ return;
43585
+ }
43586
+ const { j } = this;
43587
+ this.__focusEditor();
43588
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
43589
+ j.s.setCursorAfter(wrapper);
43590
+ return;
43591
+ }
43592
+ const line = this.__line();
43593
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after(wrapper, line);
43594
+ j.s.setCursorIn(line);
43595
+ }
43596
+ /**
43597
+ * A selected captioned image goes as an image on a line of its own does,
43598
+ * leaving the line empty, rather than joining the lines either side
43599
+ */ onBeforeCommandDelete() {
43600
+ const wrapper = this.__selectedWrapper();
43601
+ if (!wrapper || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
43602
+ return;
43603
+ }
43604
+ const line = this.__line();
43605
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(wrapper, line);
43606
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(wrapper);
43607
+ this.j.s.setCursorIn(line);
43608
+ return false;
43609
+ }
43610
+ /**
43611
+ * The captioned image the selection holds, as a click on the image selects
43612
+ */ __selectedWrapper() {
43613
+ const { s } = this.j;
43614
+ if (!s.isInsideArea || s.isCollapsed()) {
43615
+ return null;
43616
+ }
43617
+ const { startContainer, startOffset, endContainer, endOffset } = s.range;
43618
+ const node = startContainer.childNodes[startOffset];
43619
+ return startContainer === endContainer && endOffset === startOffset + 1 && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(this.j, node) ? node : null;
43620
+ }
43621
+ onKeyDown(event) {
43622
+ var _a;
43623
+ this.__arrow = null;
43624
+ // Typing replaces a selected captioned image, on the line it leaves
43625
+ if (((_a = event.key) === null || _a === void 0 ? void 0 : _a.length) === 1 && !event.ctrlKey && !event.metaKey && this.__selectedWrapper()) {
43626
+ this.j.execCommand('Delete');
43627
+ return;
43628
+ }
43629
+ if (!ARROWS.has(event.key) || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey || !this.j.s.isCollapsed()) {
43630
+ return;
43631
+ }
43632
+ const caption = this.__caretCaption();
43633
+ if (caption) {
43634
+ this.__arrow = {
43635
+ key: event.key,
43636
+ range: this.j.s.range.cloneRange(),
43637
+ caption
43638
+ };
43639
+ }
43640
+ }
43641
+ /**
43642
+ * An arrow key that couldn't move the caret in the caption takes it out,
43643
+ * past the image, as the caption is an editable element of its own
43644
+ */ onKeyUp(event) {
43645
+ const arrow = this.__arrow;
43646
+ this.__arrow = null;
43647
+ if (!arrow || event.key !== arrow.key || (0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__.isMoved)(this.j, arrow.range)) {
43648
+ return;
43649
+ }
43650
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, arrow.caption);
43651
+ if (!wrapper) {
43652
+ return;
43653
+ }
43654
+ const forward = arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN || arrow.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT;
43655
+ const { s } = this.j;
43656
+ this.__focusEditor();
43657
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(wrapper)) {
43658
+ if (forward) {
43659
+ s.setCursorAfter(wrapper);
43660
+ } else {
43661
+ s.setCursorBefore(wrapper);
43662
+ }
43663
+ return;
43664
+ }
43665
+ const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(wrapper, !forward);
43666
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(sibling)) {
43667
+ s.setCursorIn(sibling, forward);
43668
+ return;
43669
+ }
43670
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(sibling)) {
43671
+ if (forward) {
43672
+ s.setCursorBefore(sibling);
43673
+ } else {
43674
+ s.setCursorAfter(sibling);
43675
+ }
43676
+ return;
43677
+ }
43678
+ const line = this.__line();
43679
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(forward ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.after : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before, wrapper, line);
43680
+ s.setCursorIn(line);
43681
+ this.j.synchronizeValues();
43682
+ }
43683
+ onBeforeCommand(command) {
43684
+ const name = command.toLowerCase();
43685
+ if (BLOCK_COMMANDS.has(name) && this.__caretCaption()) {
43686
+ return false;
43687
+ }
43688
+ // A caption given and left blank was never a step, so Undo takes it off
43689
+ const fresh = name === 'undo' && this.__fresh ? this.__freshCaption(this.__fresh.wrapper) : null;
43690
+ if (fresh) {
43691
+ this.__unrecorded(()=>{
43692
+ this.__restore(fresh);
43693
+ this.j.history.snapshot.restore(fresh.before);
43694
+ });
43695
+ return false;
43696
+ }
43697
+ }
43698
+ /**
43699
+ * Select all in a caption selects the caption, as the caption is an
43700
+ * editable element of its own
43701
+ */ __onSelectAll() {
43702
+ const caption = this.__caretCaption();
43703
+ if (caption) {
43704
+ this.j.e.stopPropagation('beforeCommandSelectall');
43705
+ this.j.s.select(caption, true);
43706
+ return false;
43707
+ }
43708
+ }
43709
+ /** @override */ beforeDestruct(jodit) {
43710
+ jodit.e.off('beforeCommandSelectall', this.__onSelectAll).off([
43711
+ jodit.editor,
43712
+ jodit.ow,
43713
+ jodit.ew
43714
+ ], '.imageCaption');
43715
+ }
43716
+ constructor(){
43717
+ super(...arguments);
43718
+ /**
43719
+ * The caption given last, while nothing has changed round it and it's
43720
+ * still blank, so taking it off can put everything back as it was
43721
+ */ this.__fresh = null;
43722
+ this.__press = null;
43723
+ this.__afterPress = [];
43724
+ this.__arrow = null;
43725
+ }
43726
+ }
43727
+ __decorate([
43728
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':toggleImageCaption')
43729
+ ], imageCaption.prototype, "onToggleImageCaption", null);
43730
+ __decorate([
43731
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
43732
+ ':change',
43733
+ ':afterInit',
43734
+ ':afterSetMode',
43735
+ ':changePlace'
43736
+ ]),
43737
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
43738
+ ], imageCaption.prototype, "onChange", null);
43739
+ __decorate([
43740
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
43741
+ ':input',
43742
+ ':keyup',
43743
+ ':afterPaste'
43744
+ ])
43745
+ ], imageCaption.prototype, "onInput", null);
43746
+ __decorate([
43747
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterGetValueFromEditor')
43748
+ ], imageCaption.prototype, "onAfterGetValueFromEditor", null);
43749
+ __decorate([
43750
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':changePlace')
43751
+ ], imageCaption.prototype, "onChangePlace", null);
43752
+ __decorate([
43753
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
43754
+ ], imageCaption.prototype, "__onMouseDown", null);
43755
+ __decorate([
43756
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
43757
+ ], imageCaption.prototype, "__onFocusOut", null);
43758
+ __decorate([
43759
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
43760
+ ], imageCaption.prototype, "__onMouseUp", null);
43761
+ __decorate([
43762
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeEnter')
43763
+ ], imageCaption.prototype, "onBeforeEnter", null);
43764
+ __decorate([
43765
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeInsertNode')
43766
+ ], imageCaption.prototype, "onBeforeInsertNode", null);
43767
+ __decorate([
43768
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommandDelete')
43769
+ ], imageCaption.prototype, "onBeforeCommandDelete", null);
43770
+ __decorate([
43771
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown')
43772
+ ], imageCaption.prototype, "onKeyDown", null);
43773
+ __decorate([
43774
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keyup')
43775
+ ], imageCaption.prototype, "onKeyUp", null);
43776
+ __decorate([
43777
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand')
43778
+ ], imageCaption.prototype, "onBeforeCommand", null);
43779
+ __decorate([
43780
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
43781
+ ], imageCaption.prototype, "__onSelectAll", null);
43782
+ /**
43783
+ * `fresh` in `wrapper`, a copy of its wrapper, with the lines round it, made
43784
+ * from the editor's value
43785
+ */ function placedIn(jodit, fresh, wrapper) {
43786
+ var _a;
43787
+ const image = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, wrapper);
43788
+ const { split } = fresh;
43789
+ if (!image) {
43790
+ return null;
43791
+ }
43792
+ const placed = {
43793
+ wrapper,
43794
+ image,
43795
+ target: (_a = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(image, 'a', wrapper)) !== null && _a !== void 0 ? _a : image,
43796
+ place: fresh.place,
43797
+ split: null,
43798
+ attributes: fresh.attributes
43799
+ };
43800
+ if (split) {
43801
+ const head = split.head ? wrapper.previousSibling : null;
43802
+ const tail = split.tail ? wrapper.nextSibling : null;
43803
+ if (split.head && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(head) || split.tail && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(tail)) {
43804
+ return null;
43805
+ }
43806
+ const block = split.block.cloneNode(true);
43807
+ placed.split = {
43808
+ block,
43809
+ head: head,
43810
+ tail: tail
43811
+ };
43812
+ placed.place = counterpart(split.block, fresh.place, block);
43813
+ }
43814
+ return placed;
43815
+ }
43816
+ /**
43817
+ * The node in `copy`, a clone of `root`, where `node` is in `root`
43818
+ */ function counterpart(root, node, copy) {
43819
+ const path = [];
43820
+ for(let elm = node; elm !== root && elm.parentNode; elm = elm.parentNode){
43821
+ path.unshift((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(elm.parentNode.childNodes).indexOf(elm));
43822
+ }
43823
+ return path.reduce((elm, index)=>elm.childNodes[index], copy);
43824
+ }
43825
+ /**
43826
+ * The attributes of a caption's wrapper and image that the image's
43827
+ * alignment, margins and size are in
43828
+ */ function shape(wrapper, image) {
43829
+ return [
43830
+ wrapper,
43831
+ image
43832
+ ].flatMap((elm)=>[
43833
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style'),
43834
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class')
43835
+ ]).join('|');
43836
+ }
43837
+ /**
43838
+ * The node is, or holds, more than text and inline formatting: an image, a
43839
+ * table, a rule or another block
43840
+ */ function holdsMoreThanText(node) {
43841
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isFragment(node)) {
43842
+ return false;
43843
+ }
43844
+ return [
43845
+ node,
43846
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(node.querySelectorAll('*'))
43847
+ ].some((elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(elm) && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(elm) || _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS.has(elm.nodeName.toLowerCase())));
43848
+ }
43849
+ /**
43850
+ * A `width` attribute's value as a CSS width
43851
+ */ function pixels(value) {
43852
+ if (!value) {
43853
+ return '';
43854
+ }
43855
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isNumeric)(value) ? `${value}px` : value;
43856
+ }
43857
+ function moveMargins(from, to) {
43858
+ var _a;
43859
+ MARGINS.forEach((side)=>{
43860
+ const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(from, side);
43861
+ if (value) {
43862
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(to, side, value);
43863
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(from, side, '');
43864
+ }
43865
+ });
43866
+ if (!((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style')) === null || _a === void 0 ? void 0 : _a.trim())) {
43867
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(from, 'style', null);
43868
+ }
43869
+ }
43870
+ _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('imageCaption', imageCaption);
43871
+
43872
+
42401
43873
  /***/ }),
42402
43874
 
42403
43875
  /***/ 85745:
@@ -42529,7 +44001,8 @@ const SELECTED_TAGS = new Set([
42529
44001
  * paints the rest of a block image's line with its parent's highlight. See #1528.
42530
44002
  * Media in a wrapper (`jodit-media`, the resizer's `jodit` for an embed, or
42531
44003
  * one from `mediaWrappers`) isn't highlighted either, as Safari paints its
42532
- * wrapper's whole line, and its resize frame shows it's selected
44004
+ * wrapper's whole line, and its resize frame shows it's selected. Nor is
44005
+ * a captioned image's caption
42533
44006
  */ onSelectionChange() {
42534
44007
  const { jodit } = this;
42535
44008
  jodit.editor.classList.toggle(IMAGE_SELECTED, isImageSelected(jodit));
@@ -42553,9 +44026,12 @@ const SELECTED_TAGS = new Set([
42553
44026
  if (elm.src && /^data:/.test(elm.src)) {
42554
44027
  replaceDataURIToBlobUUID(editor, elm);
42555
44028
  }
44029
+ // A captioned image is selected with its caption, so Delete
44030
+ // removes both
42556
44031
  editor.e.on(elm, 'mousedown touchstart', ()=>{
44032
+ var _a;
42557
44033
  removeCaretText(elm);
42558
- editor.s.select(elm);
44034
+ editor.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm);
42559
44035
  });
42560
44036
  }
42561
44037
  });
@@ -42580,13 +44056,14 @@ __decorate([
42580
44056
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.debounce)()
42581
44057
  ], imageProcessor.prototype, "afterChange", null);
42582
44058
  function isImageSelected(jodit) {
44059
+ var _a;
42583
44060
  const { sel } = jodit.s;
42584
44061
  if (!sel || !sel.rangeCount) {
42585
44062
  return false;
42586
44063
  }
42587
44064
  const { startContainer, startOffset, endContainer, endOffset } = sel.getRangeAt(0);
42588
44065
  const node = startContainer.childNodes[startOffset];
42589
- return startContainer === endContainer && endOffset === startOffset + 1 && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, SELECTED_TAGS) || Boolean((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, node))) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, startContainer);
44066
+ return startContainer === endContainer && endOffset === startOffset + 1 && (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, SELECTED_TAGS) || Boolean((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, node)) !== null && _a !== void 0 ? _a : (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionedImage)(jodit, node))) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(jodit.editor, startContainer);
42590
44067
  }
42591
44068
  /**
42592
44069
  * Remove the invisible-space text beside an image, which only held a caret.
@@ -42650,6 +44127,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.image = {
42650
44127
  useImageEditor: true,
42651
44128
  editTitle: true,
42652
44129
  editAlt: true,
44130
+ showCaptionCheckbox: true,
42653
44131
  editLink: true,
42654
44132
  editSize: true,
42655
44133
  editBorderRadius: true,
@@ -42770,10 +44248,13 @@ function _async_to_generator(fn) {
42770
44248
  dialog.close();
42771
44249
  });
42772
44250
  buttons.remove.onAction(()=>{
44251
+ var _a;
44252
+ const { sourceImage } = this.state;
44253
+ const target = (_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage)) !== null && _a !== void 0 ? _a : sourceImage;
42773
44254
  const caret = j.s.createRange();
42774
- caret.setStartBefore(this.state.sourceImage);
44255
+ caret.setStartBefore(target);
42775
44256
  caret.collapse(true);
42776
- j.s.removeNode(this.state.sourceImage);
44257
+ j.s.removeNode(target);
42777
44258
  dialog.close();
42778
44259
  j.s.selectRange(caret);
42779
44260
  });
@@ -42795,12 +44276,22 @@ function _async_to_generator(fn) {
42795
44276
  if (j.isInDestruct || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(j.editor, sourceImage)) {
42796
44277
  return;
42797
44278
  }
44279
+ const wrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, sourceImage);
44280
+ const caption = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getImageCaption)(j, wrapper);
44281
+ // A blank caption, as one the dialog has added, takes the caret, as
44282
+ // the image popup's Caption button does
44283
+ if (caption && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(caption)) {
44284
+ j.s.setCursorIn(caption);
44285
+ return;
44286
+ }
44287
+ // A captioned image is selected with its caption, as a click selects it
44288
+ const target = wrapper !== null && wrapper !== void 0 ? wrapper : sourceImage;
42798
44289
  if (j.o.image.selectImageAfterClose) {
42799
- j.s.select(sourceImage);
44290
+ j.s.select(target);
42800
44291
  return;
42801
44292
  }
42802
44293
  const caret = j.s.createRange();
42803
- caret.setStartAfter(sourceImage);
44294
+ caret.setStartAfter(target);
42804
44295
  caret.collapse(true);
42805
44296
  j.s.selectRange(caret);
42806
44297
  });
@@ -42938,6 +44429,7 @@ function _async_to_generator(fn) {
42938
44429
  borderRadius: 0,
42939
44430
  imageTitle: '',
42940
44431
  imageAlt: '',
44432
+ imageCaption: false,
42941
44433
  imageLink: '',
42942
44434
  imageLinkOpenInNewTab: false,
42943
44435
  imageWidth: 0,
@@ -43004,10 +44496,11 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
43004
44496
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
43005
44497
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
43006
44498
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
43007
- /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
43008
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
43009
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
43010
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
44499
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68645);
44500
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(51642);
44501
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75595);
44502
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47749);
44503
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32566);
43011
44504
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
43012
44505
  try {
43013
44506
  var info = gen[key](arg);
@@ -43045,13 +44538,19 @@ function _async_to_generator(fn) {
43045
44538
 
43046
44539
 
43047
44540
 
44541
+
43048
44542
  /**
43049
44543
  * Read values from image and set it to state
43050
44544
  * @private
43051
44545
  */ function readValuesFromImage(j, state) {
43052
44546
  return _async_to_generator(function*() {
43053
44547
  const { sourceImage: image, values } = state;
43054
- (0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
44548
+ // A captioned image's caption element holds its place on the page and
44549
+ // its width
44550
+ const wrapper = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(j, image);
44551
+ const box = wrapper !== null && wrapper !== void 0 ? wrapper : image;
44552
+ values.imageCaption = Boolean(wrapper);
44553
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_4__.readAlign)(box, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, box));
43055
44554
  // Border radius
43056
44555
  values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
43057
44556
  // Id
@@ -43065,13 +44564,13 @@ function _async_to_generator(fn) {
43065
44564
  // Classes
43066
44565
  values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
43067
44566
  // Margins
43068
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
44567
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_6__.readMargins)(box, values, state);
43069
44568
  // Link
43070
- (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
44569
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_5__.readLink)(state, j, values);
43071
44570
  // Src
43072
44571
  values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
43073
44572
  // Image size
43074
- return (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state);
44573
+ return (0,_size_js__WEBPACK_IMPORTED_MODULE_7__.readSizes)(image, values, state, wrapper);
43075
44574
  })();
43076
44575
  }
43077
44576
 
@@ -43189,20 +44688,18 @@ function _async_to_generator(fn) {
43189
44688
  * Jodit Editor (https://xdsoft.net/jodit/)
43190
44689
  * Released under MIT see LICENSE.txt in the project root for license information.
43191
44690
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
43192
- */ /**
43193
- * @module plugins/image-properties
43194
44691
  */ ;
43195
44692
 
43196
44693
 
43197
44694
 
43198
- /** @private */ function readSizes(image, values, state) {
44695
+ /** @private */ function readSizes(image, values, state, captionWrapper) {
43199
44696
  return _async_to_generator(function*() {
43200
44697
  try {
43201
44698
  yield image.decode();
43202
44699
  } catch (e) {
43203
44700
  console.error(e);
43204
44701
  }
43205
- const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'width', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'width') || false;
44702
+ const width = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(captionWrapper !== null && captionWrapper !== void 0 ? captionWrapper : image, 'width', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'width') || false;
43206
44703
  const height = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'height', true) || (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'height') || false;
43207
44704
  values.imageWidth = width !== false ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeFromString)(width) : image.offsetWidth || image.naturalWidth;
43208
44705
  if ((0,_core_helpers_checker_is_numeric_js__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(values.imageWidth)) {
@@ -43504,6 +45001,12 @@ function _async_to_generator(fn) {
43504
45001
  <label>~Alternative~</label>
43505
45002
  <input type="text" class="jodit-input &__imageAlt"/>
43506
45003
  </div>
45004
+ <div class="jodit-form__group &__captionCheckbox">
45005
+ <label class="jodit_vertical_middle">
45006
+ <input type="checkbox" class="jodit-checkbox &__imageCaption"/>
45007
+ <span>~Caption~</span>
45008
+ </label>
45009
+ </div>
43507
45010
  <div class="jodit-form__group &__editLink">
43508
45011
  <label>~Link~</label>
43509
45012
  <input type="text" class="jodit-input &__imageLink"/>
@@ -43550,6 +45053,13 @@ function _async_to_generator(fn) {
43550
45053
  onAltChange() {
43551
45054
  this.state.values.imageAlt = this.getElm('imageAlt').value;
43552
45055
  }
45056
+ onStateCaptionChange() {
45057
+ const caption = this.getElm('imageCaption');
45058
+ caption.checked = this.state.values.imageCaption;
45059
+ }
45060
+ onCaptionChange() {
45061
+ this.state.values.imageCaption = this.getElm('imageCaption').checked;
45062
+ }
43553
45063
  onStateImageLinkChange() {
43554
45064
  const imageLink = this.getElm('imageLink');
43555
45065
  imageLink.value = this.state.values.imageLink;
@@ -43580,6 +45090,10 @@ function _async_to_generator(fn) {
43580
45090
  'editAlt',
43581
45091
  'editAlt'
43582
45092
  ],
45093
+ [
45094
+ 'showCaptionCheckbox',
45095
+ 'captionCheckbox'
45096
+ ],
43583
45097
  [
43584
45098
  'editLink',
43585
45099
  'editLink'
@@ -43635,6 +45149,12 @@ __decorate([
43635
45149
  __decorate([
43636
45150
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageAlt:change')
43637
45151
  ], UIImageMainTab.prototype, "onAltChange", null);
45152
+ __decorate([
45153
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageCaption')
45154
+ ], UIImageMainTab.prototype, "onStateCaptionChange", null);
45155
+ __decorate([
45156
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('imageCaption:change')
45157
+ ], UIImageMainTab.prototype, "onCaptionChange", null);
43638
45158
  __decorate([
43639
45159
  (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_2__.watch)('state.values.imageLink')
43640
45160
  ], UIImageMainTab.prototype, "onStateImageLinkChange", null);
@@ -44105,6 +45625,33 @@ function _async_to_generator(fn) {
44105
45625
  /* harmony export */ ]);
44106
45626
 
44107
45627
 
45628
+ /***/ }),
45629
+
45630
+ /***/ 29509:
45631
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
45632
+
45633
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
45634
+ /* harmony export */ applyCaption: function() { return /* binding */ applyCaption; }
45635
+ /* harmony export */ });
45636
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68645);
45637
+ /*!
45638
+ * Jodit Editor (https://xdsoft.net/jodit/)
45639
+ * Released under MIT see LICENSE.txt in the project root for license information.
45640
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
45641
+ */
45642
+ /**
45643
+ * Gives the image a caption or takes it away, and returns the element that
45644
+ * holds the image's place on the page: the caption's, or the image
45645
+ * @private
45646
+ */ function applyCaption(j, image, imageCaption) {
45647
+ var _a;
45648
+ if (j.o.image.showCaptionCheckbox) {
45649
+ j.e.fire('toggleImageCaption', image, imageCaption);
45650
+ }
45651
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_0__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image;
45652
+ }
45653
+
45654
+
44108
45655
  /***/ }),
44109
45656
 
44110
45657
  /***/ 34755:
@@ -44116,9 +45663,10 @@ function _async_to_generator(fn) {
44116
45663
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44117
45664
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
44118
45665
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
44119
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29615);
44120
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14721);
44121
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87602);
45666
+ /* harmony import */ var _caption_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29509);
45667
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29615);
45668
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14721);
45669
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(87602);
44122
45670
  /*!
44123
45671
  * Jodit Editor (https://xdsoft.net/jodit/)
44124
45672
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -44129,11 +45677,13 @@ function _async_to_generator(fn) {
44129
45677
 
44130
45678
 
44131
45679
 
45680
+
44132
45681
  /**
44133
45682
  * Apply form's values to image
44134
45683
  * @private
44135
45684
  */ function applyValuesToImage(j, state, image) {
44136
- const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
45685
+ var _a;
45686
+ const { style, imageSrc, borderRadius, imageTitle, imageAlt, imageCaption, imageLink, imageWidth, imageHeight, marginTop, marginRight, marginBottom, marginLeft, imageLinkOpenInNewTab, align, classes, id } = state.values;
44137
45687
  const opt = j.o;
44138
45688
  // styles
44139
45689
  if (opt.image.editStyle) {
@@ -44143,7 +45693,7 @@ function _async_to_generator(fn) {
44143
45693
  if (imageSrc) {
44144
45694
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src', imageSrc);
44145
45695
  } else {
44146
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(image);
45696
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove((_a = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getCaptionWrapper)(j, image)) !== null && _a !== void 0 ? _a : image);
44147
45697
  return;
44148
45698
  }
44149
45699
  // Border radius
@@ -44153,21 +45703,24 @@ function _async_to_generator(fn) {
44153
45703
  // Alt
44154
45704
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt', imageAlt || null);
44155
45705
  // Link
44156
- (0,_link_js__WEBPACK_IMPORTED_MODULE_3__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
44157
- // Size
44158
- (0,_size_js__WEBPACK_IMPORTED_MODULE_5__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked);
44159
- // Margin
44160
- if (j.o.image.editMargins) {
44161
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_4__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, image, state.marginIsLocked);
44162
- }
45706
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.applyLink)(j, image, imageLink, imageLinkOpenInNewTab);
44163
45707
  if (opt.image.editClass) {
44164
45708
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class', classes || null);
44165
45709
  }
44166
45710
  if (opt.image.editId) {
44167
45711
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
44168
45712
  }
45713
+ // The caption's element takes the image's place on the page and its width,
45714
+ // so it's added or taken away after the image's own style and classes
45715
+ const box = (0,_caption_js__WEBPACK_IMPORTED_MODULE_3__.applyCaption)(j, image, imageCaption);
45716
+ // Size
45717
+ (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.applySize)(image, imageWidth, imageHeight, state.sizeIsLocked, box);
45718
+ // Margin
45719
+ if (j.o.image.editMargins) {
45720
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.applyMargin)(j, marginTop, marginRight, marginBottom, marginLeft, box, state.marginIsLocked);
45721
+ }
44169
45722
  if (opt.image.editAlign) {
44170
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, image));
45723
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(box, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, box));
44171
45724
  }
44172
45725
  }
44173
45726
 
@@ -44182,12 +45735,14 @@ function _async_to_generator(fn) {
44182
45735
  /* harmony export */ });
44183
45736
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
44184
45737
  /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
45738
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68645);
44185
45739
  /*!
44186
45740
  * Jodit Editor (https://xdsoft.net/jodit/)
44187
45741
  * Released under MIT see LICENSE.txt in the project root for license information.
44188
45742
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
44189
45743
  */
44190
45744
 
45745
+
44191
45746
  /** @private */ function applyLink(j, image, imageLink, imageLinkOpenInNewTab) {
44192
45747
  // Link
44193
45748
  let link = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(image, 'a', j.editor);
@@ -44201,8 +45756,11 @@ function _async_to_generator(fn) {
44201
45756
  const relParts = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel') || '').split(/\s+/).filter((p)=>p && p !== 'noopener' && p !== 'noreferrer');
44202
45757
  (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
44203
45758
  }
44204
- } else {
44205
- if (link && link.parentNode) {
45759
+ } else if (link && link.parentNode) {
45760
+ // Froala keeps a linked image's caption inside the link
45761
+ if ((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_2__.getCaptionWrapper)(j, image)) {
45762
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(link);
45763
+ } else {
44206
45764
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(link, image, undefined, false, true);
44207
45765
  }
44208
45766
  }
@@ -44280,7 +45838,19 @@ function _async_to_generator(fn) {
44280
45838
 
44281
45839
 
44282
45840
 
44283
- /** @private */ function applySize(image, imageWidth, imageHeight, sizeIsLocked) {
45841
+ /**
45842
+ * A captioned image fills its caption's element, `box`, which takes the width
45843
+ * @private
45844
+ */ function applySize(image, imageWidth, imageHeight, sizeIsLocked, box = image) {
45845
+ if (box !== image) {
45846
+ const width = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
45847
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'width', width);
45848
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
45849
+ width: width && '100%',
45850
+ height: sizeIsLocked || !imageHeight ? null : (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageHeight)
45851
+ });
45852
+ return;
45853
+ }
44284
45854
  // Size
44285
45855
  if (imageWidth !== image.offsetWidth || imageHeight !== image.offsetHeight) {
44286
45856
  const updatedWidth = imageWidth ? (0,_utils_utils_js__WEBPACK_IMPORTED_MODULE_3__.normalSizeToString)(imageWidth) : null;
@@ -44470,19 +46040,42 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
44470
46040
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
44471
46041
 
44472
46042
  /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
46043
+ /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43555);
46044
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
44473
46045
  /*!
44474
46046
  * Jodit Editor (https://xdsoft.net/jodit/)
44475
46047
  * Released under MIT see LICENSE.txt in the project root for license information.
44476
46048
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
44477
- */ /**
44478
- * @module plugins/indent
44479
46049
  */
46050
+
46051
+
44480
46052
  /**
44481
46053
  * Get style rule key for current direction
44482
46054
  * @internal
44483
46055
  */ const getKey = (direction, box)=>`${_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(box) ? 'padding' : 'margin'}${direction === 'rtl' ? 'Right' : 'Left'}`;
46056
+ /**
46057
+ * Indents or outdents a box by `indentMargin`
46058
+ * @internal
46059
+ */ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
46060
+ if (!currentBox) {
46061
+ return;
46062
+ }
46063
+ if (processedElements.has(currentBox)) {
46064
+ return;
46065
+ }
46066
+ const key = getKey(editor.o.direction, currentBox);
46067
+ processedElements.add(currentBox);
46068
+ const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(currentBox, key);
46069
+ let value = current ? parseInt(current, 10) : 0;
46070
+ value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
46071
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(currentBox, key, value > 0 ? value : '');
46072
+ if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style')) {
46073
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(currentBox, 'style', null);
46074
+ }
46075
+ };
44484
46076
 
44485
46077
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
46078
+ /* harmony export */ "applyIndentToBox", 0, /* binding */ applyIndentToBox,
44486
46079
  /* harmony export */ "getKey", 0, /* binding */ getKey
44487
46080
  /* harmony export */ ]);
44488
46081
 
@@ -44513,9 +46106,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
44513
46106
  /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
44514
46107
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
44515
46108
  /* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43555);
44516
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41180);
44517
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54389);
44518
- /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(302);
46109
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54389);
46110
+ /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(302);
44519
46111
  /*!
44520
46112
  * Jodit Editor (https://xdsoft.net/jodit/)
44521
46113
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -44526,24 +46118,6 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.indentMargin = 10;
44526
46118
 
44527
46119
 
44528
46120
 
44529
-
44530
- const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
44531
- if (!currentBox) {
44532
- return;
44533
- }
44534
- if (processedElements.has(currentBox)) {
44535
- return;
44536
- }
44537
- const key = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_6__.getKey)(editor.o.direction, currentBox);
44538
- processedElements.add(currentBox);
44539
- const current = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.cssInline)(currentBox, key);
44540
- let value = current ? parseInt(current, 10) : 0;
44541
- value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
44542
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(currentBox, key, value > 0 ? value : '');
44543
- if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style')) {
44544
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(currentBox, 'style', null);
44545
- }
44546
- };
44547
46121
  /**
44548
46122
  * Indents the line containing the selection or insertion point.
44549
46123
  */ function indent(editor) {
@@ -44562,7 +46136,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
44562
46136
  if (isBrMode && editor.s.isCollapsed()) {
44563
46137
  if (current) {
44564
46138
  const box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.wrapNextInline(current, enterBlock, editor);
44565
- applyIndentToBox(processedElements, box, editor, command);
46139
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, box, editor, command);
44566
46140
  return false;
44567
46141
  }
44568
46142
  }
@@ -44576,7 +46150,7 @@ const applyIndentToBox = (processedElements, currentBox, editor, command)=>{
44576
46150
  editor.s.restore();
44577
46151
  return false;
44578
46152
  }
44579
- applyIndentToBox(processedElements, currentBox, editor, command);
46153
+ ;(0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.applyIndentToBox)(processedElements, currentBox, editor, command);
44580
46154
  editor.s.restore();
44581
46155
  });
44582
46156
  editor.synchronizeValues();
@@ -44677,11 +46251,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
44677
46251
  /* harmony import */ var _items_toolbar_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14306);
44678
46252
  /* harmony import */ var _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24231);
44679
46253
  /* harmony import */ var _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(75393);
44680
- /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14862);
44681
- /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(96257);
44682
- /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(9914);
44683
- /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(53696);
44684
- /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(33489);
46254
+ /* harmony import */ var _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(72972);
46255
+ /* harmony import */ var _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(44597);
46256
+ /* harmony import */ var _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14862);
46257
+ /* harmony import */ var _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(96257);
46258
+ /* harmony import */ var _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(9914);
46259
+ /* harmony import */ var _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(53696);
46260
+ /* harmony import */ var _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(33489);
44685
46261
  /*!
44686
46262
  * Jodit Editor (https://xdsoft.net/jodit/)
44687
46263
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -44701,13 +46277,15 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('indent', indent);
44701
46277
 
44702
46278
 
44703
46279
 
46280
+
46281
+
44704
46282
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInline = true;
44705
46283
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineForSelection = false;
44706
46284
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisableFor = [];
44707
46285
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.toolbarInlineDisabledButtons = [
44708
46286
  'source'
44709
46287
  ];
44710
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('addcolumn', _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__["default"]).set('addrow', _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__["default"]).set('merge', _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_10__["default"]).set('th', _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_13__["default"]).set('splitg', _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_11__["default"]).set('splitv', _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_12__["default"]).set('th-list', _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_14__["default"]);
46288
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__.Icon.set('addcolumn', _icons_addcolumn_svg_js__WEBPACK_IMPORTED_MODULE_8__["default"]).set('addrow', _icons_addrow_svg_js__WEBPACK_IMPORTED_MODULE_9__["default"]).set('caption', _icons_caption_svg_js__WEBPACK_IMPORTED_MODULE_10__["default"]).set('headerrow', _icons_headerrow_svg_js__WEBPACK_IMPORTED_MODULE_11__["default"]).set('merge', _icons_merge_svg_js__WEBPACK_IMPORTED_MODULE_12__["default"]).set('th', _icons_th_svg_js__WEBPACK_IMPORTED_MODULE_15__["default"]).set('splitg', _icons_splitg_svg_js__WEBPACK_IMPORTED_MODULE_13__["default"]).set('splitv', _icons_splitv_svg_js__WEBPACK_IMPORTED_MODULE_14__["default"]).set('th-list', _icons_th_list_svg_js__WEBPACK_IMPORTED_MODULE_16__["default"]);
44711
46289
  // Register cell popup buttons as global controls so they can be
44712
46290
  // referenced by name in custom popup configurations.
44713
46291
  // Skip buttons that already exist in controls (e.g. 'align' from justify plugin).
@@ -44784,15 +46362,19 @@ const isSafeHref = (href)=>/^(https?:|mailto:|tel:)/i.test(href.trim()) && !/^(j
44784
46362
  /***/ 62000:
44785
46363
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
44786
46364
 
44787
- /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27613);
44788
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41180);
46365
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
46366
+ /* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27613);
46367
+ /* harmony import */ var _core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5700);
46368
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
44789
46369
  /*!
44790
46370
  * Jodit Editor (https://xdsoft.net/jodit/)
44791
46371
  * Released under MIT see LICENSE.txt in the project root for license information.
44792
46372
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
44793
46373
  */
44794
46374
 
44795
- const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
46375
+
46376
+
46377
+ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
44796
46378
  /* harmony default export */ __webpack_exports__["default"] = ([
44797
46379
  'brushCell',
44798
46380
  {
@@ -44807,7 +46389,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
44807
46389
  exec: (editor, table, { control })=>{
44808
46390
  const command = cmd(control);
44809
46391
  editor.getInstance('Table', editor.o).getAllSelectedCells().forEach((cell)=>{
44810
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
46392
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(cell, 'vertical-align', command === 'normal' ? '' : command);
44811
46393
  });
44812
46394
  },
44813
46395
  tooltip: 'Vertical align'
@@ -44837,7 +46419,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
44837
46419
  tableaddcolumnafter: 'Insert column after'
44838
46420
  },
44839
46421
  exec: (editor, table, { control })=>{
44840
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
46422
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
44841
46423
  return;
44842
46424
  }
44843
46425
  if (!control.args) {
@@ -44855,7 +46437,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
44855
46437
  tableaddrowafter: 'Insert row below'
44856
46438
  },
44857
46439
  exec: (editor, table, { control })=>{
44858
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
46440
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
44859
46441
  return;
44860
46442
  }
44861
46443
  if (!control.args) {
@@ -44866,6 +46448,25 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
44866
46448
  },
44867
46449
  tooltip: 'Add row'
44868
46450
  },
46451
+ {
46452
+ name: 'headerrow',
46453
+ exec: (editor, table)=>{
46454
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(table, 'table')) {
46455
+ return;
46456
+ }
46457
+ editor.execCommand('tableheaderrow', false, table);
46458
+ const [cell] = editor.getInstance('Table', editor.o).getAllSelectedCells();
46459
+ // Beside the cell that replaced the one it opened for
46460
+ if (cell) {
46461
+ editor.e.fire('showPopup', table, ()=>(0,_core_helpers_size_position_js__WEBPACK_IMPORTED_MODULE_2__.position)(cell, editor), 'cells');
46462
+ }
46463
+ // The popup stays open, so the button shows the new state
46464
+ return true;
46465
+ },
46466
+ isActive: (editor, button)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') && editor.getInstance('Table', editor.o).hasHeaderRow(button.target),
46467
+ isDisabled: (editor, button)=>!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(button.target, 'table') || !editor.getInstance('Table', editor.o).canToggleHeaderRow(button.target),
46468
+ tooltip: 'Header row'
46469
+ },
44869
46470
  {
44870
46471
  name: 'deleteTable',
44871
46472
  icon: 'bin',
@@ -44876,7 +46477,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
44876
46477
  tableempty: 'Empty cell'
44877
46478
  },
44878
46479
  exec: (editor, table, { control })=>{
44879
- if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_0__.isJoditObject)(editor)) {
46480
+ if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
44880
46481
  return;
44881
46482
  }
44882
46483
  if (!control.args) {
@@ -44936,7 +46537,8 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
44936
46537
  /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
44937
46538
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
44938
46539
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
44939
- /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
46540
+ /* harmony import */ var _core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68645);
46541
+ /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61477);
44940
46542
  /*!
44941
46543
  * Jodit Editor (https://xdsoft.net/jodit/)
44942
46544
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -44946,6 +46548,7 @@ const cmd = (control)=>control.args && (0,_core_helpers_checker_index_js__WEBPAC
44946
46548
 
44947
46549
 
44948
46550
 
46551
+
44949
46552
  // A Normal image sits where the text of its line is aligned (#1531)
44950
46553
  const lineAlign = (editor, elm)=>{
44951
46554
  const block = elm && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor) || editor.editor;
@@ -44966,7 +46569,15 @@ const lineAlign = (editor, elm)=>{
44966
46569
  return 'left';
44967
46570
  }
44968
46571
  };
44969
- const currentAlign = (editor, elm)=>elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm)) : 'normal';
46572
+ // A captioned image is aligned by the element holding it and its caption
46573
+ const alignedBox = (editor, elm)=>{
46574
+ var _a;
46575
+ return (_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, elm)) !== null && _a !== void 0 ? _a : elm;
46576
+ };
46577
+ const currentAlign = (editor, elm)=>{
46578
+ const box = alignedBox(editor, elm);
46579
+ return box ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(box, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, box)) : 'normal';
46580
+ };
44970
46581
  const align = {
44971
46582
  name: 'left',
44972
46583
  childTemplate: (_, __, value)=>value,
@@ -44992,14 +46603,15 @@ const align = {
44992
46603
  'img',
44993
46604
  'jodit',
44994
46605
  'jodit-media'
44995
- ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
46606
+ ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_5__.getMediaWrapper)(editor, elm) !== elm) {
44996
46607
  return;
44997
46608
  }
44998
46609
  const command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
44999
46610
  if (!command) {
45000
46611
  return false;
45001
46612
  }
45002
- ;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm));
46613
+ const box = alignedBox(editor, elm);
46614
+ (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(box, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, box));
45003
46615
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
45004
46616
  'jodit',
45005
46617
  'jodit-media'
@@ -45018,7 +46630,8 @@ const align = {
45018
46630
  icon: 'bin',
45019
46631
  tooltip: 'Delete',
45020
46632
  exec: (editor, image)=>{
45021
- image && editor.s.removeNode(image);
46633
+ var _a;
46634
+ image && editor.s.removeNode((_a = (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, image)) !== null && _a !== void 0 ? _a : image);
45022
46635
  }
45023
46636
  },
45024
46637
  {
@@ -45031,6 +46644,24 @@ const align = {
45031
46644
  },
45032
46645
  tooltip: 'Edit'
45033
46646
  },
46647
+ {
46648
+ name: 'caption',
46649
+ exec: (editor, image)=>{
46650
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
46651
+ return;
46652
+ }
46653
+ const caption = editor.e.fire('toggleImageCaption', image);
46654
+ editor.synchronizeValues();
46655
+ if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(caption)) {
46656
+ editor.e.fire('hideResizer');
46657
+ editor.s.setCursorIn(caption);
46658
+ } else {
46659
+ editor.e.fire('recalcPositionPopup');
46660
+ }
46661
+ },
46662
+ isActive: (editor, button)=>Boolean((0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, button.target)),
46663
+ tooltip: 'Caption'
46664
+ },
45034
46665
  {
45035
46666
  name: 'valign',
45036
46667
  list: [
@@ -45040,13 +46671,14 @@ const align = {
45040
46671
  'Normal'
45041
46672
  ],
45042
46673
  tooltip: 'Vertical align',
45043
- // `vertical-align` only moves an image in the line, not a floated or block one
46674
+ // `vertical-align` only moves an image in the line, not a floated or block
46675
+ // one, nor a captioned one, which is placed by its caption's element
45044
46676
  isDisabled: (editor, button)=>{
45045
46677
  const image = button.target;
45046
46678
  return Boolean(image && ([
45047
46679
  'left',
45048
46680
  'right'
45049
- ].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block'));
46681
+ ].includes((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float')) || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'display') === 'block' || (0,_core_helpers_utils_image_caption_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(editor, image)));
45050
46682
  },
45051
46683
  exec: (editor, image, { control })=>{
45052
46684
  if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(image, 'img')) {
@@ -45124,6 +46756,22 @@ const align = {
45124
46756
  /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"7\" rx=\"1\"/><path d=\"M12 3v7M12 14v7m-3.5-3.5h7\"/> </g> </svg> ");
45125
46757
 
45126
46758
 
46759
+ /***/ }),
46760
+
46761
+ /***/ 72972:
46762
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
46763
+
46764
+ /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"m3 13 5-4 4 3 3-3 6 5\"/><path d=\"M7 21h10\"/> </g> </svg> ");
46765
+
46766
+
46767
+ /***/ }),
46768
+
46769
+ /***/ 44597:
46770
+ /***/ (function(__unused_webpack_module, __webpack_exports__) {
46771
+
46772
+ /* harmony default export */ __webpack_exports__["default"] = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2.5\"/><path d=\"M3 9V5.5A2.5 2.5 0 0 1 5.5 3h13A2.5 2.5 0 0 1 21 5.5V9z\" fill=\"currentColor\"/><path d=\"M3 15h18M9 9v12M15 9v12\"/> </g> </svg> ");
46773
+
46774
+
45127
46775
  /***/ }),
45128
46776
 
45129
46777
  /***/ 14862:
@@ -45265,8 +46913,8 @@ function _object_spread_props(target, source) {
45265
46913
  if (target && type && this.canShowPopupForType(type)) {
45266
46914
  const isMedia = type === 'jodit-media';
45267
46915
  // Beside the media in a wrapper kept in the content, which can fill
45268
- // the line
45269
- const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || target;
46916
+ // the line, and below a captioned image's caption, so it stays in view
46917
+ const bound = mediaWrapper && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getWrappedMedia)(this.j, mediaWrapper) || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getCaptionWrapper)(this.j, target) || target;
45270
46918
  this.showPopup(()=>this.__bound(bound, isMedia), type, target);
45271
46919
  return false;
45272
46920
  }
@@ -48571,6 +50219,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder =
48571
50219
  * Check if root node is empty
48572
50220
  * @private
48573
50221
  */ function isEditorEmpty(root) {
50222
+ var _a;
50223
+ // A non-breaking space is typed, where other white space can just lay out
50224
+ // the HTML
50225
+ return isBlank(root) && !((_a = root.textContent) === null || _a === void 0 ? void 0 : _a.includes(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
50226
+ }
50227
+ function isBlank(root) {
48574
50228
  var _a;
48575
50229
  if (!root.firstChild) {
48576
50230
  return true;
@@ -49091,6 +50745,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tableAllowCellResize =
49091
50745
 
49092
50746
 
49093
50747
  const key = 'table_processor_observer-resize';
50748
+ /**
50749
+ * How near the top or bottom of what a row scrolls in the pointer starts
50750
+ * scrolling it, as the editor's iframe passes on no moves outside it
50751
+ */ const SCROLL_EDGE = 20;
49094
50752
  /**
49095
50753
  * Process tables in editor
49096
50754
  */ class resizeCells extends _modules_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
@@ -49110,7 +50768,11 @@ const key = 'table_processor_observer-resize';
49110
50768
  }
49111
50769
  hideResizeHandle() {
49112
50770
  this.hideTimeout = this.j.async.setTimeout(()=>{
49113
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
50771
+ // A late move from inside the cell can come once the pointer
50772
+ // is on the handle, which covers the border
50773
+ if (!this.resizeHandler.matches(':hover')) {
50774
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.resizeHandler);
50775
+ }
49114
50776
  }, {
49115
50777
  timeout: this.j.defaultTimeout,
49116
50778
  label: 'hideResizer'
@@ -49127,6 +50789,30 @@ const key = 'table_processor_observer-resize';
49127
50789
  this.startX = event.clientX;
49128
50790
  this.j.lock(key);
49129
50791
  this.resizeHandler.classList.add('jodit-table-resizer_moved');
50792
+ if (this.workRow) {
50793
+ this.startY = event.clientY;
50794
+ this.startHeight = this.workRow.offsetHeight;
50795
+ this.rowStyle = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style');
50796
+ this.scrolled = 0;
50797
+ this.anchored = scrollersOf(this.workRow).map((elm)=>{
50798
+ const style = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style');
50799
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowAnchor', 'none');
50800
+ return [
50801
+ elm,
50802
+ style
50803
+ ];
50804
+ });
50805
+ return false;
50806
+ }
50807
+ this.startStyles = [
50808
+ this.workTable,
50809
+ ...(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('td,th', this.workTable)
50810
+ ].map((elm)=>[
50811
+ elm,
50812
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')
50813
+ ]);
50814
+ this.startLeft = parseFloat(this.resizeHandler.style.left);
50815
+ this.startEdge = this.columnEdge();
49130
50816
  let box;
49131
50817
  this.minX = 0;
49132
50818
  this.maxX = 1000000;
@@ -49153,12 +50839,21 @@ const key = 'table_processor_observer-resize';
49153
50839
  /**
49154
50840
  * Mouse move after click on resize handle
49155
50841
  */ onMouseMove(event) {
50842
+ var _a;
49156
50843
  if (!this.drag) {
49157
50844
  return;
49158
50845
  }
49159
50846
  this.j.e.fire('closeAllPopups');
49160
50847
  let x = event.clientX;
49161
50848
  const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.resizeHandler.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
50849
+ if (this.workRow) {
50850
+ const view = scrollViewOf(this.workRow);
50851
+ this.pointerY = Math.min(Math.max(event.clientY, view.top), view.bottom) + (!this.j.o.iframe ? 0 : workplacePosition.top);
50852
+ this.resizeRow(this.workRow);
50853
+ this.scrollAlong(view, event.clientY);
50854
+ (_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
50855
+ return;
50856
+ }
49162
50857
  if (x < this.minX) {
49163
50858
  x = this.minX;
49164
50859
  }
@@ -49166,7 +50861,14 @@ const key = 'table_processor_observer-resize';
49166
50861
  x = this.maxX;
49167
50862
  }
49168
50863
  this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
49169
- (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.resizeHandler, 'left', x - (this.j.o.iframe ? 0 : workplacePosition.left) + 'px');
50864
+ this.restoreStyles();
50865
+ this.resizeColumnsOrTable();
50866
+ const tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
50867
+ Object.assign(this.resizeHandler.style, {
50868
+ left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
50869
+ top: tableBox.top - workplacePosition.top + 'px',
50870
+ height: tableBox.height + 'px'
50871
+ });
49170
50872
  const sel = this.j.s.sel;
49171
50873
  sel && sel.removeAllRanges();
49172
50874
  }
@@ -49183,17 +50885,96 @@ const key = 'table_processor_observer-resize';
49183
50885
  this.drag = false;
49184
50886
  this.j.e.off(this.j.ew, 'mousemove.table touchmove.table', this.onMouseMove);
49185
50887
  this.resizeHandler.classList.remove('jodit-table-resizer_moved');
49186
- if (this.startX !== e.clientX) {
49187
- // resize column
49188
- if (this.wholeTable == null) {
49189
- this.resizeColumns();
50888
+ if (this.workRow) {
50889
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
50890
+ this.anchored.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
50891
+ this.anchored = [];
50892
+ const height = this.workRow.offsetHeight;
50893
+ if (height !== this.startHeight) {
50894
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workRow, 'height', height + 'px');
49190
50895
  } else {
49191
- this.resizeTable();
50896
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.workRow, 'style', this.rowStyle);
50897
+ }
50898
+ } else {
50899
+ this.restoreStyles();
50900
+ if (this.startX !== e.clientX) {
50901
+ this.resizeColumnsOrTable();
49192
50902
  }
49193
50903
  }
49194
50904
  this.j.synchronizeValues();
49195
50905
  this.j.s.focus();
49196
50906
  }
50907
+ resizeColumnsOrTable() {
50908
+ if (this.wholeTable == null) {
50909
+ this.resizeColumns();
50910
+ } else {
50911
+ this.resizeTable();
50912
+ }
50913
+ }
50914
+ restoreStyles() {
50915
+ this.startStyles.forEach(([elm, style])=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', style));
50916
+ }
50917
+ /**
50918
+ * Where the border the handle is on lies: the work cell's left side
50919
+ * for the table's left edge, otherwise its right side
50920
+ */ columnEdge() {
50921
+ const { left, right } = this.workCell.getBoundingClientRect();
50922
+ return this.wholeTable === true ? left : right;
50923
+ }
50924
+ /**
50925
+ * Sets the row's height from where the pointer is, and how far the drag
50926
+ * has scrolled. The browser keeps the row as tall as its content
50927
+ */ resizeRow(row) {
50928
+ const height = Math.max(0, Math.round(this.startHeight + this.pointerY - this.startY + this.scrolled));
50929
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(row, 'height', height + 'px');
50930
+ this.placeRowHandle(row);
50931
+ return row.offsetHeight === height;
50932
+ }
50933
+ /**
50934
+ * While the pointer is near or past the top or bottom of the part of the
50935
+ * row's scroller in view, scrolls it on, and the row's border with it
50936
+ */ scrollAlong(view, clientY) {
50937
+ this.j.async.cancelAnimationFrame(this.scrollFrame);
50938
+ const past = clientY < view.top + SCROLL_EDGE ? clientY - view.top - SCROLL_EDGE : clientY > view.bottom - SCROLL_EDGE ? clientY - view.bottom + SCROLL_EDGE : 0;
50939
+ if (!past) {
50940
+ return;
50941
+ }
50942
+ const { scroller } = view;
50943
+ const step = Math.sign(past) * Math.min(Math.ceil(Math.abs(past) / 2), 20);
50944
+ const scroll = ()=>{
50945
+ const { workRow } = this;
50946
+ if (!workRow) {
50947
+ return;
50948
+ }
50949
+ const scrollTop = scroller.scrollTop;
50950
+ if (step > 0) {
50951
+ // Growing the row first makes the room to scroll down into
50952
+ this.scrolled += step;
50953
+ this.resizeRow(workRow);
50954
+ scroller.scrollTop = scrollTop + step;
50955
+ const missed = step - (scroller.scrollTop - scrollTop);
50956
+ if (missed > 0.5) {
50957
+ this.scrolled -= missed;
50958
+ this.resizeRow(workRow);
50959
+ return;
50960
+ }
50961
+ this.placeRowHandle(workRow);
50962
+ } else {
50963
+ scroller.scrollTop = scrollTop + step;
50964
+ const moved = scroller.scrollTop - scrollTop;
50965
+ this.scrolled += moved;
50966
+ // A row at its content's height can't follow the pointer up
50967
+ if (!moved || !this.resizeRow(workRow)) {
50968
+ scroller.scrollTop = scrollTop;
50969
+ this.scrolled -= moved;
50970
+ this.resizeRow(workRow);
50971
+ return;
50972
+ }
50973
+ }
50974
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
50975
+ };
50976
+ this.scrollFrame = this.j.async.requestAnimationFrame(scroll);
50977
+ }
49197
50978
  /**
49198
50979
  * Resize only one column
49199
50980
  */ resizeColumns() {
@@ -49236,15 +51017,20 @@ const key = 'table_processor_observer-resize';
49236
51017
  }
49237
51018
  /**
49238
51019
  * Calc helper resize handle position
49239
- */ calcHandlePosition(table, cell, offsetX = 0, delta = 0) {
51020
+ */ calcHandlePosition(table, cell, offsetX = 0, delta = 0, clientY = NaN) {
49240
51021
  const box = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(cell, this.j, this.j.ed);
49241
51022
  if (offsetX > _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY && offsetX < box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY) {
49242
- this.hideResizeHandle();
51023
+ if (!this.calcRowHandlePosition(cell, clientY)) {
51024
+ this.hideResizeHandle();
51025
+ }
49243
51026
  return;
49244
51027
  }
51028
+ this.workRow = null;
51029
+ this.resizeHandler.classList.remove('jodit-table-resizer_row');
49245
51030
  const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.j.workplace, this.j, this.j.od, true), parentBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(table, this.j, this.j.ed);
49246
51031
  (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.resizeHandler, 'left', (offsetX <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? box.left : box.left + box.width) - workplacePosition.left + delta + 'px');
49247
51032
  Object.assign(this.resizeHandler.style, {
51033
+ width: '',
49248
51034
  height: parentBox.height + 'px',
49249
51035
  top: parentBox.top - workplacePosition.top + 'px'
49250
51036
  });
@@ -49257,6 +51043,36 @@ const key = 'table_processor_observer-resize';
49257
51043
  this.setWorkCell(cell, !nextTD ? false : null);
49258
51044
  }
49259
51045
  }
51046
+ /**
51047
+ * Shows the handle across the table on the border below a row, near the
51048
+ * cell's bottom or near its top, which is the bottom of the row above.
51049
+ * The table's top edge has no row above it
51050
+ */ calcRowHandlePosition(cell, clientY) {
51051
+ const { top, bottom } = cell.getBoundingClientRect();
51052
+ const table = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(cell, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table'), this.j.editor);
51053
+ const index = cell.parentNode.rowIndex;
51054
+ const row = Math.abs(bottom - clientY) <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? table.rows[index + cell.rowSpan - 1] : Math.abs(clientY - top) <= _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY ? table.rows[index - 1] : null;
51055
+ if (!row) {
51056
+ return false;
51057
+ }
51058
+ this.workRow = row;
51059
+ this.workTable = table;
51060
+ this.resizeHandler.classList.add('jodit-table-resizer_row');
51061
+ this.placeRowHandle(row);
51062
+ this.showResizeHandle();
51063
+ return true;
51064
+ }
51065
+ /**
51066
+ * Lays the handle across the table on the border below the row
51067
+ */ placeRowHandle(row) {
51068
+ const workplacePosition = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.j.workplace, this.j, this.j.od, true), tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed), rowBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(row, this.j, this.j.ed);
51069
+ Object.assign(this.resizeHandler.style, {
51070
+ left: tableBox.left - workplacePosition.left + 'px',
51071
+ width: tableBox.width + 'px',
51072
+ height: '',
51073
+ top: rowBox.top + rowBox.height - workplacePosition.top + 'px'
51074
+ });
51075
+ }
49260
51076
  /** @override */ afterInit(editor) {
49261
51077
  if (!editor.o.tableAllowCellResize) {
49262
51078
  return;
@@ -49264,7 +51080,7 @@ const key = 'table_processor_observer-resize';
49264
51080
  editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', ()=>{
49265
51081
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(this.observe);
49266
51082
  }).on(this.j.ow, 'scroll.resize-cells', ()=>{
49267
- if (!this.drag) {
51083
+ if (!this.drag || this.workRow) {
49268
51084
  return;
49269
51085
  }
49270
51086
  const parent = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(this.workCell, (elm)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table'), editor.editor);
@@ -49288,7 +51104,7 @@ const key = 'table_processor_observer-resize';
49288
51104
  }
49289
51105
  ;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(table, key, true);
49290
51106
  this.j.e.on(table, 'mouseleave.resize-cells', (e)=>{
49291
- if (this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
51107
+ if (!this.drag && this.resizeHandler && this.resizeHandler !== e.relatedTarget) {
49292
51108
  this.hideResizeHandle();
49293
51109
  }
49294
51110
  }).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle((event)=>{
@@ -49299,7 +51115,7 @@ const key = 'table_processor_observer-resize';
49299
51115
  if (!cell) {
49300
51116
  return;
49301
51117
  }
49302
- this.calcHandlePosition(table, cell, event.offsetX);
51118
+ this.calcHandlePosition(table, cell, event.offsetX, 0, event.clientY);
49303
51119
  }, {
49304
51120
  timeout: this.j.defaultTimeout
49305
51121
  }));
@@ -49320,6 +51136,10 @@ const key = 'table_processor_observer-resize';
49320
51136
  this.resizeHandler = this.j.c.div('jodit-table-resizer');
49321
51137
  this.j.e.on(this.resizeHandler, 'mousedown.table touchstart.table', this.onHandleMouseDown).on(this.resizeHandler, 'mouseenter.table', ()=>{
49322
51138
  this.j.async.clearTimeout(this.hideTimeout);
51139
+ }).on(this.resizeHandler, 'mouseleave.table', ()=>{
51140
+ if (!this.drag) {
51141
+ this.hideResizeHandle();
51142
+ }
49323
51143
  });
49324
51144
  }
49325
51145
  };
@@ -49328,6 +51148,25 @@ const key = 'table_processor_observer-resize';
49328
51148
  this.minX = 0;
49329
51149
  this.maxX = 0;
49330
51150
  this.startX = 0;
51151
+ /**
51152
+ * The table's and its cells' styles as a column drag started, put back
51153
+ * before each new width
51154
+ */ this.startStyles = [];
51155
+ this.startLeft = 0;
51156
+ this.startEdge = 0;
51157
+ /**
51158
+ * The row whose height the handle sets, or null while it sets a width
51159
+ */ this.workRow = null;
51160
+ this.startY = 0;
51161
+ this.startHeight = 0;
51162
+ this.rowStyle = null;
51163
+ /**
51164
+ * The boxes that scroll the row, with their styles, as a row drag turns
51165
+ * off their scroll anchoring, which would move the border off the pointer
51166
+ */ this.anchored = [];
51167
+ this.scrolled = 0;
51168
+ this.scrollFrame = 0;
51169
+ this.pointerY = 0;
49331
51170
  }
49332
51171
  }
49333
51172
  __decorate([
@@ -49342,6 +51181,45 @@ __decorate([
49342
51181
  __decorate([
49343
51182
  _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
49344
51183
  ], resizeCells.prototype, "observe", null);
51184
+ /**
51185
+ * The boxes around the row that can scroll it, nearest first, and its
51186
+ * document's
51187
+ */ function scrollersOf(row) {
51188
+ const doc = row.ownerDocument;
51189
+ const root = doc.scrollingElement || doc.documentElement;
51190
+ const scrollers = [];
51191
+ for(let elm = row.parentElement; elm && elm !== root; elm = elm.parentElement){
51192
+ if (/auto|scroll|overlay/.test(String((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(elm, 'overflowY')))) {
51193
+ scrollers.push(elm);
51194
+ }
51195
+ }
51196
+ return [
51197
+ ...scrollers,
51198
+ root
51199
+ ];
51200
+ }
51201
+ /**
51202
+ * What scrolls the row up and down, the nearest box around it with more
51203
+ * than it shows or else its document, and the part of it in the window's view
51204
+ */ function scrollViewOf(row) {
51205
+ var _a, _b, _c;
51206
+ const height = (_b = (_a = row.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.innerHeight) !== null && _b !== void 0 ? _b : 0;
51207
+ const scrollers = scrollersOf(row);
51208
+ const scroller = (_c = scrollers.find((elm)=>elm.scrollHeight > elm.clientHeight)) !== null && _c !== void 0 ? _c : scrollers[scrollers.length - 1];
51209
+ if (scroller === scrollers[scrollers.length - 1]) {
51210
+ return {
51211
+ scroller,
51212
+ top: 0,
51213
+ bottom: height
51214
+ };
51215
+ }
51216
+ const top = scroller.getBoundingClientRect().top + scroller.clientTop;
51217
+ return {
51218
+ scroller,
51219
+ top: Math.max(top, 0),
51220
+ bottom: Math.min(top + scroller.clientHeight, height)
51221
+ };
51222
+ }
49345
51223
  _core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('resizeCells', resizeCells);
49346
51224
 
49347
51225
 
@@ -49817,6 +51695,14 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
49817
51695
  return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.rect.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
49818
51696
  }
49819
51697
  applySize(element, key, value) {
51698
+ // A captioned image fills the element holding it and its caption,
51699
+ // which takes the width
51700
+ const wrapper = key === 'width' && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(element, 'img') ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, element) : null;
51701
+ if (wrapper) {
51702
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', value);
51703
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(element, 'width', '100%');
51704
+ return;
51705
+ }
49820
51706
  const changeAttrs = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isImage(element) && this.j.o.resizer.forImageChangeAttributes;
49821
51707
  if (changeAttrs) {
49822
51708
  (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, key, value);
@@ -49831,6 +51717,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
49831
51717
  return Boolean(this.element && this.j.editor.contains(this.element));
49832
51718
  }
49833
51719
  onDelete(e) {
51720
+ var _a;
49834
51721
  if (!this.element) {
49835
51722
  return;
49836
51723
  }
@@ -49839,7 +51726,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
49839
51726
  return;
49840
51727
  }
49841
51728
  if (this.element.tagName !== 'JODIT') {
49842
- this.j.s.select(this.element);
51729
+ this.j.s.select((_a = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getCaptionWrapper)(this.j, this.element)) !== null && _a !== void 0 ? _a : this.element);
49843
51730
  } else {
49844
51731
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.element);
49845
51732
  this.hide();
@@ -51135,8 +53022,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51135
53022
  'touchstartTd',
51136
53023
  'touchstartTh'
51137
53024
  ].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
51138
- // and mouseup on another cell call `click` only for `TR` element.
51139
- .on('clickTr clickTbody', ()=>{
53025
+ // and mouseup on another cell call `click` only for their common
53026
+ // ancestor: the row, the section, or the table across sections
53027
+ .on('clickTr clickTbody clickThead clickTfoot clickTable', ()=>{
51140
53028
  var _a;
51141
53029
  const cellsCount = this.__tableModule.getAllSelectedCells().length;
51142
53030
  if (cellsCount) {
@@ -51300,14 +53188,6 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51300
53188
  }
51301
53189
  this.j.e.fire('hidePopup');
51302
53190
  e.stopPropagation();
51303
- // Hack for FireFox for force redraw selection
51304
- (()=>{
51305
- const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0">&nbsp;</div>');
51306
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(cell, n);
51307
- this.j.async.setTimeout(()=>{
51308
- _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(n);
51309
- }, this.j.defaultTimeout / 5);
51310
- })();
51311
53191
  }
51312
53192
  /**
51313
53193
  * On click in outside - remove selection
@@ -51406,7 +53286,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51406
53286
  this.j.synchronizeValues();
51407
53287
  return false;
51408
53288
  }
51409
- if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(command)) {
53289
+ if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow|headerrow)/.test(command)) {
51410
53290
  command = command.replace('table', '');
51411
53291
  const cells = this.__tableModule.getAllSelectedCells();
51412
53292
  if (cells.length) {
@@ -51473,6 +53353,9 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51473
53353
  case 'addrowbefore':
51474
53354
  this.__tableModule.appendRow(table, cell.parentNode, command === 'addrowafter');
51475
53355
  break;
53356
+ case 'headerrow':
53357
+ this.__toggleHeaderRow(table, cells);
53358
+ break;
51476
53359
  }
51477
53360
  if (/^bin(row|column)$/.test(command) && !this.__tableModule.getColumnsCount(table)) {
51478
53361
  this.__removeTable(table);
@@ -51481,6 +53364,27 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plu
51481
53364
  return false;
51482
53365
  }
51483
53366
  }
53367
+ /**
53368
+ * Turns the table's header row on or off. The caret and the marked cells
53369
+ * move to the cells that replace them
53370
+ */ __toggleHeaderRow(table, cells) {
53371
+ var _a, _b;
53372
+ const module = this.__tableModule;
53373
+ this.j.s.save();
53374
+ const replaced = module.toggleHeaderRow(table);
53375
+ this.j.s.restore();
53376
+ cells.forEach((cell)=>{
53377
+ const next = replaced.get(cell);
53378
+ if (next) {
53379
+ module.removeSelection(cell);
53380
+ module.addSelection(next);
53381
+ }
53382
+ });
53383
+ // As after the click that marked it, the command's own change keeps
53384
+ // the marks, so the popup can stay open for another toggle
53385
+ const anchor = (_a = this.__selectedCell) !== null && _a !== void 0 ? _a : cells[0];
53386
+ this.__selectedCell = (_b = replaced.get(anchor)) !== null && _b !== void 0 ? _b : anchor;
53387
+ }
51484
53388
  /**
51485
53389
  * The cell that takes the caret when rows or columns are deleted: the next
51486
53390
  * one in the same column (or row) that is not deleted, else the previous one
@@ -55736,9 +57640,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
55736
57640
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
55737
57641
 
55738
57642
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
55739
- /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; }
57643
+ /* harmony export */ onTabInsideLi: function() { return /* reexport safe */ _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__.onTabInsideLi; },
57644
+ /* harmony export */ onTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.onTabSpaces; },
57645
+ /* harmony export */ removeTabSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.removeTabSpaces; },
57646
+ /* harmony export */ tabsToSpaces: function() { return /* reexport safe */ _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__.tabsToSpaces; }
55740
57647
  /* harmony export */ });
55741
57648
  /* harmony import */ var _on_tab_inside_li_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26658);
57649
+ /* harmony import */ var _tab_spaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39481);
55742
57650
  /*!
55743
57651
  * Jodit Editor (https://xdsoft.net/jodit/)
55744
57652
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -55748,6 +57656,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
55748
57656
  */
55749
57657
 
55750
57658
 
57659
+
55751
57660
  /***/ }),
55752
57661
 
55753
57662
  /***/ 26658:
@@ -55769,7 +57678,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('symbols', symbols
55769
57678
  * If so then add an internal list
55770
57679
  * @private
55771
57680
  */ function onTabInsideLi(jodit, shift = false) {
55772
- if (!jodit.o.tab.tabInsideLiInsertNewList) {
57681
+ // Focused with no range, as WebKit can leave it, there's no caret to
57682
+ // mark
57683
+ if (!jodit.o.tab.tabInsideLiInsertNewList || !jodit.s.isInsideArea) {
55773
57684
  return false;
55774
57685
  }
55775
57686
  const [fake, fake2] = fakeCursors(jodit);
@@ -55866,6 +57777,279 @@ function removeNestedList(jodit, list, li) {
55866
57777
  }
55867
57778
 
55868
57779
 
57780
+ /***/ }),
57781
+
57782
+ /***/ 39481:
57783
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
57784
+
57785
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
57786
+ /* harmony export */ onTabSpaces: function() { return /* binding */ onTabSpaces; },
57787
+ /* harmony export */ removeTabSpaces: function() { return /* binding */ removeTabSpaces; },
57788
+ /* harmony export */ tabsToSpaces: function() { return /* binding */ tabsToSpaces; }
57789
+ /* harmony export */ });
57790
+ /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
57791
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
57792
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
57793
+ /* harmony import */ var _backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63785);
57794
+ /* harmony import */ var _indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(302);
57795
+ /*!
57796
+ * Jodit Editor (https://xdsoft.net/jodit/)
57797
+ * Released under MIT see LICENSE.txt in the project root for license information.
57798
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
57799
+ */
57800
+
57801
+
57802
+
57803
+
57804
+ const KEEPS_TABS = new Set([
57805
+ 'pre',
57806
+ 'pre-wrap',
57807
+ 'break-spaces'
57808
+ ]);
57809
+ const KEEPS_TABS_TAGS = new Set([
57810
+ 'pre',
57811
+ 'textarea',
57812
+ 'style',
57813
+ 'script'
57814
+ ]);
57815
+ /**
57816
+ * With `tab.spaces`, outside table cells: Tab at a caret inserts the spaces,
57817
+ * or a tab where white space is kept, as in `pre`, and in a list's first item
57818
+ * it indents the list, as Word does. Shift+Tab takes them out again. Tab or
57819
+ * Shift+Tab with a selection indents or outdents it. Neither moves the focus
57820
+ * on: Escape and then Tab does that
57821
+ * @private
57822
+ */ function onTabSpaces(jodit, shift) {
57823
+ const { spaces } = jodit.o.tab;
57824
+ const current = jodit.s.current();
57825
+ if (!spaces || jodit.o.readonly || jodit.isLocked) {
57826
+ return false;
57827
+ }
57828
+ // The editor has the focus but no caret, so there's nowhere to put
57829
+ // anything, but the focus stays
57830
+ if (!current) {
57831
+ return true;
57832
+ }
57833
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, jodit.editor)) {
57834
+ return false;
57835
+ }
57836
+ if (!jodit.s.isCollapsed()) {
57837
+ jodit.execCommand(shift ? 'outdent' : 'indent');
57838
+ return true;
57839
+ }
57840
+ const li = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'li', jodit.editor);
57841
+ const list = li && !li.previousElementSibling && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(li.parentElement) ? li.parentElement : null;
57842
+ if (list && (!shift || isIndented(jodit, list))) {
57843
+ (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.applyIndentToBox)(new Set(), list, jodit, shift ? 'outdent' : 'indent');
57844
+ jodit.synchronizeValues();
57845
+ return true;
57846
+ }
57847
+ if (shift) {
57848
+ unindent(jodit, current, spaces);
57849
+ return true;
57850
+ }
57851
+ const element = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current.parentElement;
57852
+ const keepsTabs = element && KEEPS_TABS.has(jodit.ew.getComputedStyle(element).whiteSpace);
57853
+ jodit.s.insertNode(jodit.createInside.text(keepsTabs ? '\t' : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces)));
57854
+ return true;
57855
+ }
57856
+ /**
57857
+ * Shift+Tab at a caret takes out a tab or up to `spaces` spaces just before
57858
+ * it, then a tab or up to `spaces` spaces at the start of its line, then the
57859
+ * indent of its block
57860
+ */ function unindent(jodit, current, spaces) {
57861
+ const block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor);
57862
+ const caret = jodit.createInside.fake();
57863
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeInsertNode(jodit.s.range, caret);
57864
+ let removed;
57865
+ try {
57866
+ removed = removeTabBefore(caret) || removeTabSpaces(jodit, caret, true) || removeLineIndent(jodit, block !== null && block !== void 0 ? block : jodit.editor, caret, spaces);
57867
+ if (removed) {
57868
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
57869
+ }
57870
+ } finally{
57871
+ jodit.s.setCursorBefore(caret);
57872
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(caret);
57873
+ }
57874
+ if (removed) {
57875
+ jodit.synchronizeValues();
57876
+ } else if (block && isIndented(jodit, block)) {
57877
+ jodit.execCommand('outdent');
57878
+ }
57879
+ }
57880
+ function removeTabBefore(caret) {
57881
+ const before = caret.previousSibling;
57882
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && before.data.endsWith('\t')) {
57883
+ before.deleteData(before.length - 1, 1);
57884
+ return true;
57885
+ }
57886
+ return false;
57887
+ }
57888
+ function removeLineIndent(jodit, block, caret, spaces) {
57889
+ const { whiteSpace } = jodit.ew.getComputedStyle(block);
57890
+ const walker = jodit.ed.createTreeWalker(block, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {
57891
+ acceptNode: (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
57892
+ });
57893
+ const [start, offset] = lineStart(walker, caret, KEEPS_TABS.has(whiteSpace) || whiteSpace === 'pre-line');
57894
+ return removeIndentAt(walker, start, offset, caret, spaces);
57895
+ }
57896
+ /**
57897
+ * Where the caret's line starts: after a `<br>`, after a newline where white
57898
+ * space keeps it, or at the caret
57899
+ */ function lineStart(walker, caret, keepsBreaks) {
57900
+ let start = null;
57901
+ let offset = 0;
57902
+ for(let node = walker.nextNode(); node && node !== caret; node = walker.nextNode()){
57903
+ const lineBreak = keepsBreaks && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? node.data.lastIndexOf('\n') : -1;
57904
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br')) {
57905
+ start = null;
57906
+ } else if (lineBreak >= 0) {
57907
+ start = node;
57908
+ offset = lineBreak + 1;
57909
+ } else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && !start) {
57910
+ start = node;
57911
+ offset = 0;
57912
+ }
57913
+ }
57914
+ return start ? [
57915
+ start,
57916
+ offset
57917
+ ] : [
57918
+ caret,
57919
+ 0
57920
+ ];
57921
+ }
57922
+ function removeIndentAt(walker, start, startOffset, caret, spaces) {
57923
+ let removed = 0;
57924
+ let offset = startOffset;
57925
+ walker.currentNode = start;
57926
+ for(let node = start; node && removed < spaces && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'br'); node = walker.nextNode()){
57927
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && node !== caret) {
57928
+ const [end, count] = scanIndent(node.data, offset, spaces - removed, !removed);
57929
+ node.deleteData(offset, end - offset);
57930
+ removed += count;
57931
+ if (offset < node.length) {
57932
+ break;
57933
+ }
57934
+ }
57935
+ offset = 0;
57936
+ }
57937
+ return removed > 0;
57938
+ }
57939
+ /**
57940
+ * Where up to `count` spaces from `offset` end, and how many there were. A
57941
+ * tab at the start of a line is a whole indent
57942
+ */ function scanIndent(text, offset, count, atLineStart) {
57943
+ if (atLineStart && text[offset] === '\t') {
57944
+ return [
57945
+ offset + 1,
57946
+ count
57947
+ ];
57948
+ }
57949
+ let end = offset;
57950
+ let found = 0;
57951
+ for(; end < text.length && found < count; end += 1){
57952
+ const char = text[end];
57953
+ if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
57954
+ break;
57955
+ }
57956
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
57957
+ found += 1;
57958
+ }
57959
+ }
57960
+ return [
57961
+ end,
57962
+ found
57963
+ ];
57964
+ }
57965
+ function isIndented(jodit, box) {
57966
+ return parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(box, (0,_indent_helpers_js__WEBPACK_IMPORTED_MODULE_4__.getKey)(jodit.o.direction, box)) || '0', 10) > 0;
57967
+ }
57968
+ /**
57969
+ * With `tab.spaces`, Backspace just after that many spaces removes them
57970
+ * together, as it would a tab. With `upTo`, as for Shift+Tab, fewer will do,
57971
+ * if one of them is non-breaking, so a space between words stays
57972
+ * @private
57973
+ */ function removeTabSpaces(jodit, caret, upTo = false) {
57974
+ const { spaces } = jodit.o.tab;
57975
+ if (!spaces) {
57976
+ return false;
57977
+ }
57978
+ const range = jodit.s.createRange();
57979
+ range.setEndBefore(caret);
57980
+ let count = 0;
57981
+ let nonBreaking = false;
57982
+ for(let node = caret.previousSibling; _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) && count < spaces; node = node.previousSibling){
57983
+ let offset = node.length;
57984
+ for(; offset > 0 && count < spaces; offset -= 1){
57985
+ const char = node.data[offset - 1];
57986
+ if (char === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE) {
57987
+ nonBreaking = true;
57988
+ } else if (char !== ' ' && char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
57989
+ break;
57990
+ }
57991
+ if (char !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
57992
+ count += 1;
57993
+ }
57994
+ }
57995
+ range.setStart(node, offset);
57996
+ if (offset && count < spaces) {
57997
+ break;
57998
+ }
57999
+ }
58000
+ if (upTo ? !nonBreaking : count < spaces) {
58001
+ return false;
58002
+ }
58003
+ range.deleteContents();
58004
+ // An emptied line keeps a <br>, as after any Backspace, or it has no
58005
+ // height to hold the caret
58006
+ (0,_backspace_helpers_js__WEBPACK_IMPORTED_MODULE_3__.addBRInsideEmptyBlock)(jodit, caret);
58007
+ return true;
58008
+ }
58009
+ /**
58010
+ * With `tab.spaces`, a tab in pasted text becomes the spaces, as HTML would
58011
+ * show it as one space. Tabs in white space that's kept, and those that only
58012
+ * lay out the HTML, stay as they are
58013
+ * @private
58014
+ */ function tabsToSpaces(jodit, html) {
58015
+ var _a;
58016
+ const { spaces } = jodit.o.tab;
58017
+ const current = jodit.s.current();
58018
+ const target = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(current) ? current : current === null || current === void 0 ? void 0 : current.parentElement;
58019
+ if (!spaces || !html.includes('\t') || target && KEEPS_TABS.has(jodit.ew.getComputedStyle(target).whiteSpace)) {
58020
+ return;
58021
+ }
58022
+ // A template parses without loading images or running scripts
58023
+ const template = jodit.ed.createElement('template');
58024
+ template.innerHTML = html;
58025
+ const walker = jodit.ed.createTreeWalker(template.content, NodeFilter.SHOW_TEXT);
58026
+ let changed = false;
58027
+ for(let node = walker.nextNode(); node; node = walker.nextNode()){
58028
+ const text = (_a = node.nodeValue) !== null && _a !== void 0 ? _a : '';
58029
+ if (text.includes('\t') && text.trim() && !keepsTabs(node)) {
58030
+ node.nodeValue = text.replace(/\t/g, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces));
58031
+ changed = true;
58032
+ }
58033
+ }
58034
+ return changed ? template.innerHTML : undefined;
58035
+ }
58036
+ /**
58037
+ * The fragment isn't rendered, so this reads the white space its own styles
58038
+ * and tags set. The text of `<style>` and `<script>` isn't shown at all
58039
+ */ function keepsTabs(node) {
58040
+ for(let el = node.parentElement; el; el = el.parentElement){
58041
+ const { whiteSpace } = el.style;
58042
+ if (whiteSpace) {
58043
+ return KEEPS_TABS.has(whiteSpace);
58044
+ }
58045
+ if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(el, KEEPS_TABS_TAGS)) {
58046
+ return true;
58047
+ }
58048
+ }
58049
+ return false;
58050
+ }
58051
+
58052
+
55869
58053
  /***/ }),
55870
58054
 
55871
58055
  /***/ 66288:
@@ -55880,7 +58064,8 @@ function removeNestedList(jodit, list, li) {
55880
58064
  * @module plugins/tab
55881
58065
  */
55882
58066
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
55883
- tabInsideLiInsertNewList: true
58067
+ tabInsideLiInsertNewList: true,
58068
+ spaces: 0
55884
58069
  };
55885
58070
 
55886
58071
 
@@ -55892,9 +58077,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
55892
58077
  /* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
55893
58078
  /* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
55894
58079
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
55895
- /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50911);
55896
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66288);
55897
- /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47686);
58080
+ /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70799);
58081
+ /* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50911);
58082
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66288);
58083
+ /* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(47686);
55898
58084
  /*!
55899
58085
  * Jodit Editor (https://xdsoft.net/jodit/)
55900
58086
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -55911,30 +58097,93 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.tab = {
55911
58097
 
55912
58098
 
55913
58099
 
55914
- class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__.Plugin {
55915
- afterInit(jodit) {}
58100
+
58101
+ const MODIFIER_KEYS = new Set([
58102
+ 'Shift',
58103
+ 'Control',
58104
+ 'Alt',
58105
+ 'Meta',
58106
+ 'CapsLock'
58107
+ ]);
58108
+ class tab extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
58109
+ afterInit(jodit) {
58110
+ // Without a namespace it runs ahead of table navigation, which would
58111
+ // take a released Tab
58112
+ jodit.e.on('keydown', this.__onKeyDownFirst, {
58113
+ top: true
58114
+ });
58115
+ }
58116
+ // An Escape that closes a popup has done its job
58117
+ __endRelease() {
58118
+ this.__released = false;
58119
+ }
58120
+ __onKeyDownFirst(event) {
58121
+ const released = this.__released;
58122
+ if (!MODIFIER_KEYS.has(event.key)) {
58123
+ this.__released = event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && this.j.o.tab.spaces > 0;
58124
+ }
58125
+ // The browser moves the focus
58126
+ if (released && event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
58127
+ this.j.e.stopPropagation('keydown');
58128
+ }
58129
+ }
55916
58130
  __onTab(event) {
55917
- if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && this.__onShift(event.shiftKey)) {
58131
+ if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB && (this.__onShift(event.shiftKey) || (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabSpaces)(this.j, event.shiftKey))) {
55918
58132
  return false;
55919
58133
  }
55920
58134
  }
58135
+ __onBackspace(backspace, fakeNode) {
58136
+ if (backspace && (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.removeTabSpaces)(this.j, fakeNode)) {
58137
+ return true;
58138
+ }
58139
+ }
58140
+ __onPasteInsert(html) {
58141
+ if ((0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__.isString)(html)) {
58142
+ return (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.tabsToSpaces)(this.j, html);
58143
+ }
58144
+ }
55921
58145
  __onCommand(command) {
55922
58146
  if ((command === 'indent' || command === 'outdent') && this.__onShift(command === 'outdent')) {
55923
58147
  return false;
55924
58148
  }
55925
58149
  }
55926
58150
  __onShift(shift) {
55927
- const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_5__.onTabInsideLi)(this.j, shift);
58151
+ const res = (0,_cases_index_js__WEBPACK_IMPORTED_MODULE_6__.onTabInsideLi)(this.j, shift);
55928
58152
  if (res) {
55929
58153
  this.j.e.fire('afterTab', shift);
55930
58154
  }
55931
58155
  return res;
55932
58156
  }
55933
- beforeDestruct(jodit) {}
58157
+ beforeDestruct(jodit) {
58158
+ jodit.e.off('keydown', this.__onKeyDownFirst);
58159
+ }
58160
+ constructor(){
58161
+ super(...arguments);
58162
+ /**
58163
+ * With `tab.spaces`, Tab stays in the editor, so an Escape lets the next
58164
+ * Tab move the focus on, as in code editors. A modifier key keeps it, and
58165
+ * any other key or a click ends it
58166
+ */ this.__released = false;
58167
+ }
55934
58168
  }
58169
+ __decorate([
58170
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
58171
+ ':mousedown.tab',
58172
+ ':beforePopupClose.tab'
58173
+ ])
58174
+ ], tab.prototype, "__endRelease", null);
58175
+ __decorate([
58176
+ _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
58177
+ ], tab.prototype, "__onKeyDownFirst", null);
55935
58178
  __decorate([
55936
58179
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown.tab')
55937
58180
  ], tab.prototype, "__onTab", null);
58181
+ __decorate([
58182
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':backSpaceBeforeCases.tab')
58183
+ ], tab.prototype, "__onBackspace", null);
58184
+ __decorate([
58185
+ (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforePasteInsert.tab')
58186
+ ], tab.prototype, "__onPasteInsert", null);
55938
58187
  __decorate([
55939
58188
  (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':beforeCommand.tab')
55940
58189
  ], tab.prototype, "__onCommand", null);