jodit-pro 4.20.2 → 4.20.4

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 +7 -7
  4. package/es2015/jodit.js +308 -71
  5. package/es2015/jodit.min.css +1 -1
  6. package/es2015/jodit.min.js +7 -7
  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 +7 -7
  82. package/es2018/jodit.min.css +1 -1
  83. package/es2018/jodit.min.js +7 -7
  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 +7 -7
  114. package/es2021/jodit.js +308 -71
  115. package/es2021/jodit.min.css +1 -1
  116. package/es2021/jodit.min.js +7 -7
  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 +7 -7
  193. package/es2021.en/jodit.js +308 -71
  194. package/es2021.en/jodit.min.css +1 -1
  195. package/es2021.en/jodit.min.js +7 -7
  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 +382 -73
  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
@@ -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.20.2
4
+ * Version: v4.20.4
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -14,7 +14,7 @@
14
14
  */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}`,""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=function(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var n="/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */";return[i].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([n]).join(`
15
15
  `)}return[i].join(`
16
16
  `)}(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},n=0;n<this.length;n++){var r=this[n][0];"number"==typeof r&&(o[r]=!0)}for(n=0;n<e.length;n++){var s=e[n];"number"==typeof s[0]&&o[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),t.push(s))}},t}}],t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,(function(t){return e[t]}).bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}()},6441:function(e,t,i){"use strict";i.d(t,{Config:function(){return r}});var o=i(82758);let n={};class r{static get defaultOptions(){return r.__defaultOptions||(r.__defaultOptions=new r),r.__defaultOptions}constructor(){this.cache=!0,this.defaultTimeout=100,this.namespace="",this.safeMode=!1,this.width="auto",this.height="auto",this.safePluginsList=["about","enter","backspace","size","bold","hotkeys"],this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument=o.globalDocument,this.ownerWindow=o.globalWindow,this.shadowRoot=null,this.nonce="",this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.allowCommandsInReadOnly=["selectall","preview","print"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.asyncStorage={},this.editorClassName=!1,this.className=!1,this.style=!1,this.containerStyle=!1,this.styleValues={},this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=200,this.useNativeTooltip=!1,this.defaultActionOnPaste=o.INSERT_AS_HTML,this.enter=o.PARAGRAPH,this.iframe=!1,this.editHTMLDocumentMode=!1,this.enterBlock="br"!==this.enter?this.enter:o.PARAGRAPH,this.defaultMode=o.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.imageDefaultAlign="normal",this.imageAlignClasses=null,this.alignClasses={},this.mediaDefaultAlign="normal",this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={table:{style:"border-collapse:collapse;width: 100%;"}},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},`
17
- `,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,n)}}n=r.prototype,r.prototype.controls={}},26992:function(e,t,i){"use strict";i.d(t,{Async:function(){return m}});var o=i(82758),n=i(91898),r=i(12045),s=i(23282),a=i(84767),l=i(72430),c=i(14773),d=i(70799),u=i(86068),h=i(38837),p=i(93661);class m{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let o={};(0,u.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(o=t).timeout||0),o.label&&this.clearLabel(o.label);let r=(0,n.setTimeout)(e,t,...i),s=o.label||r;return this.timers.set(s,r),this.__callbacks.set(s,e),r}updateTimeout(e,t){if((0,h.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,n.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,n.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let o=0,a=!1,d=[],u=(...t)=>{if(!a){o=0;let i=e(...t);if(a=!0,d.length){let e=()=>{d.forEach(e=>e()),d.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...r)=>{a=!1,t?(!o&&i&&u(...r),(0,n.clearTimeout)(o),o=this.setTimeout(()=>u(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,o)):u(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{d.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,o=!1,n=!0;return(...r)=>{if(i=r,o){n=!0;return}n=!0,t&&(n=!1,e(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&e(...i)})}}throttle(e,t,i=!1){let o=null,n,r,a;return(...i)=>{(n=!0,a=i,t)?o||(r=()=>{n?(e(...a),n=!1,o=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,o)):o=null})():e(...a)}}promise(e){let t=()=>{},i=new Promise((i,o)=>{t=()=>o((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,o)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let o=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let r=this.setTimeout(()=>{try{o(e())}catch(e){n(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),n((0,p.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,n.clearTimeout)(e)),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,n;this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=null!=(e=null==queueMicrotask?void 0:queueMicrotask.bind(window))?e:Promise.resolve().then.bind(Promise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=null!=(i=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?i:(e,t)=>{var i;let o=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},null!=(i=null==t?void 0:t.timeout)?i:1)},this.__cancelIdleCallbackNative=null!=(n=null==(o=window.cancelIdleCallback)?void 0:o.bind(window))?n:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,i){"use strict";i.d(t,{Async:function(){return o.Async}});var o=i(26992)},4012:function(e,t,i){"use strict";i.d(t,{Component:function(){return l}});var o=i(8884),n=i(78213),r=i(580),s=i(21537);let a=new Map;class l{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,s.kebabCase)(((0,s.isFunction)(this.className)?this.className():"")||(0,s.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let o=[this.componentName];return e&&o.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(o.push("_",t),o.push("_",(0,s.isVoid)(i)?"true":i.toString())),o.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,s.get)(e,t||this)}get isReady(){return this.componentStatus===n.STATUSES.ready}get isDestructed(){return this.componentStatus===n.STATUSES.destructed}get isInDestruct(){return n.STATUSES.beforeDestruct===this.componentStatus||n.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(n.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(n.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),a.get(this)&&a.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,s.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let o=a.get(this),n=null==o?void 0:o[e];n&&n.length&&n.forEach(e=>e(t))}hookStatus(e,t){let i=a.get(this);i||(i={},a.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new o.Async,this.ownerWindow=window,this.__componentStatus=n.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=n.STATUSES},91907:function(e,t,i){"use strict";i.d(t,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return r.ViewComponent}});var o=i(4012),n=i(78213),r=i(80480)},78213:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return n}});var o=i(4012);class n extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),this.setParentView(e)}}},82758:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return o}});let o=!1,n="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),c=new Set(a),d="Meta",u="Backspace",h="Enter",p="Escape",m="ArrowLeft",f="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[d,u,v,f,b,g,m,h,p,"F3","Tab"],w="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),_=void 0!==n&&/Mac|iPod|iPhone|iPad/.test(n.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:C,isMin:S}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(n.location.href)})(),x=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.20.2","BASE_PATH",0,C,"BASE_PATH_IS_MIN",0,S,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ERROR_CODE_CONFLICT",0,409,"ES",0,"es2021","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/pro/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!0,"IS_IE",0,w,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,_,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:_?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,u,"KEY_DELETE",0,v,"KEY_DOWN",0,b,"KEY_END",0,"End","KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,m,"KEY_META",0,d,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,f,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0," ","NEARBY",0,5,"NO_EMPTY_TAGS",0,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,x,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>o=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,w?"html":"text/html","TEXT_PLAIN",0,w?"text":"text/plain","TEXT_RTF",0,w?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,n,"lang",0,{}])},20218:function(e,t,i){"use strict";i.d(t,{Create:function(){return a}});var o=i(82758),n=i(2748),r=i(21537),s=i(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,r.isPlainObject)(t)?(0,r.attr)(o,t):i=t),i&&(0,r.asArray)(i).forEach(e=>n.Dom.append(o,(0,r.isString)(e)?this.fromHTML(e):e)),o}div(e,t,i){let o=this.element("div",t,i);return e&&(o.className=e),o}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});n.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let o=this.element("span",t,i);return e&&(o.className=e),o}a(e,t,i){let o=this.element("a",t,i);return e&&(o.className=e),o}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(n.Dom.safeRemove(o),t){let e=(0,r.refs)(o);Object.keys(t).forEach(i=>{let o=e[i];o&&!1===t[i]&&n.Dom.hide(o)})}return o}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,i){"use strict";i.d(t,{Create:function(){return o.Create}});var o=i(20218)},45219:function(e,t,i){"use strict";i.d(t,{autobind:function(){return n}});var o=i(23282);function n(e,t,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let n=i.value;return{configurable:!0,get(){let e=n.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var o=i(78213),n=i(2748),r=i(27613),s=i(82760);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let o=i.get;if(!o)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){var t;let i,o=null!=(i=this.od)?i:document,r=c.get(o);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&n.Dom.isElement(s)&&(r?r.set(this.constructor,s):c.set(o,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(o.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,i){"use strict";i.d(t,{component:function(){return l},getComponentClass:function(){return c}});var o=i(82758),n=i(80568);let r=new Map,s=new WeakSet,a=new WeakSet;function l(e){class t extends e{constructor(...e){super(...e),this.constructor===t?(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready")):o.IS_PROD||s.has(this.constructor)||a.has(this.constructor)||a.add(this.constructor)}}s.add(e),s.add(t);let i=(0,n.getClassName)(e.prototype);if(r.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function c(e){return r.get(e)}},81577:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var o=i(91907),n=i(27613),r=i(38837),s=i(89890);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:s}=o;(0,r.assert)(null!=s,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(e)?e(o):e,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:s[i](o[l].bind(o),c,t)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,i){"use strict";i.d(t,{derive:function(){return n}});var o=i(23282);function n(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let n=e[t],r=Object.getOwnPropertyNames(n.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(n.prototype,t);null!=s&&(0,o.isFunction)(s.value)&&!(0,o.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var o=i(23282),n=i(89890);function r(e){return(t,i)=>{if(!(0,o.isFunction)(t[i]))throw(0,n.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},78927:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var o=i(91907),n=i(23282),r=i(89890);function s(){return(e,t)=>{if(!(0,n.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:i}=e,o=e[t];e[t]=(...t)=>i.requestIdleCallback(o.bind(e,...t))})}}},65478:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return d.nonenumerable},persistent:function(){return u.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var o=i(45219),n=i(33433),r=i(87325),s=i(81577),a=i(55153),l=i(97357),c=i(78927),d=i(31589),u=i(53213),h=i(13525),p=i(37133)},31589:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},53213:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var o=i(78213),n=i(39955);function r(e,t){e.hookStatus(o.STATUSES.ready,e=>{let i=(0,n.isViewObject)(e)?e:e.jodit,o=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(o))?e:r},set(e){i.storage.set(o,e)}})})}},13525:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var o=i(78213),n=i(23282),r=i(89890);function s(e){return(t,i)=>{let s=t[i];if(!(0,n.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:o}=t,n=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){o.clearTimeout(r),e(t)?n.apply(t,s):r=o.setTimeout(()=>i(...s),10)}})})}}},37133:function(e,t,i){"use strict";i.d(t,{watch:function(){return u}});var o=i(78213),n=i(73026),r=i(46559),s=i(23282),a=i(72430),l=i(39955),c=i(89890),d=i(37790);function u(e,t){return(i,u)=>{var h;if(!(0,s.isFunction)(i[u]))throw(0,c.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,m=null==t?void 0:t.context,f=t=>{let o=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[u](e,...i)};p||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,n]=e.split(":"),r=m;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),o.events.on(r||t,n,c),r||o.events.on(n,c),t.hookStatus("beforeDestruct",()=>{o.events.off(r||t,n,c).off(n,c)});return}let r=e.split("."),[l]=r,u=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,n.observable)(h).on("change."+u.join("."),c);let p=(0,d.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,n.observable)(h)).on("change."+u.join("."),c),c(l,i,h))},get:()=>p&&p.get?p.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,f):f(i)}}},2748:function(e,t,i){"use strict";i.d(t,{Dom:function(){return y}});var o=i(82758),n=i(4510),r=i(68345),s=i(23282),a=i(58487),l=i(42320),c=i(70799),d=i(86068),u=i(76241),h=i(49055),p=i(38837),m=i(29960),f=i(41180),g=i(86583),b=i(89890),v=i(37790);class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let o,n,r=e;i.s.save();do n=!1,(o=r.nextSibling)&&!y.isBlock(o)&&!y.isTag(o,"br")&&(n=!0,r=o);while(n)return y.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,o){let n=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(n,i);let r=i;for(;r&&(r=i.nextSibling,n.appendChild(i),i!==o&&r);)i=r;return t.s.restore(),n}static wrapInline(e,t,i){let o,n,r=e,s=e;i.s.save();do n=!1,(o=r.previousSibling)&&!y.isBlock(o)&&(n=!0,r=o);while(n)do n=!1,(o=s.nextSibling)&&!y.isBlock(o)&&(n=!0,s=o);while(n)return y.__wrapElements(t,i,r,s)}static wrap(e,t,i){let o=(0,c.isString)(t)?i.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,b.error)("Element should be in DOM");e.parentNode.insertBefore(o,e),o.appendChild(e)}else{let t=e.extractContents();e.insertNode(o),o.appendChild(t)}return o}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,i){let o=e;for(;o&&o!==t&&!(e!==o&&i(o));){let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling;)if((o=o.parentNode)===t)return;e=null==o?void 0:o.nextSibling}o=e}}static replace(e,t,i,o=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,p.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,p.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return o&&y.isElement(e)&&y.isElement(s)&&(0,n.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return y.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){let i=y.closest(e,e=>y.isElement(e)&&e.hasAttribute("contenteditable"),t);return y.isNode(e)&&(null==i?void 0:i.getAttribute("contenteditable"))!=="false"}static isEmpty(e,t=o.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let n=e=>null==e.nodeValue||0===(0,h.trim)(e.nodeValue).length;return y.isText(e)?n(e):!(y.isElement(e)&&i(e))&&y.each(e,e=>{if(y.isText(e)&&!n(e)||y.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return y.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return y.isTag(e,o.LIST_TAGS)}static isLeaf(e){return y.isTag(e,"li")}static isImage(e){return y.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,d.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&o.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!y.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!y.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!y.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,d.isVoid)(e)&&y.isHTMLElement(e)&&y.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return y.__deepMost(e,t,!1)}static last(e,t){return y.__deepMost(e,t,!0)}static __deepMost(e,t,i){let o=i?"lastChild":"firstChild",n=i?"previousSibling":"nextSibling",r=null==e?void 0:e[o];if(!r)return null;do{if(t(r))return r;let i=r[o]||r[n];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[n]&&r.parentNode!==e)i=null==r?void 0:r[n]}r=i}while(r)return null}static prev(e,t,i,o=!0){return y.find(e,t,i,!1,o)}static next(e,t,i,o=!0){return y.find(e,t,i,!0,o)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let o=e=>y.isElement(e)&&e.classList.contains(t),n=e.parentNode;return i?y.prev(e,o,n):y.next(e,o,n)}static find(e,t,i,o=!0,n=!0){let r=this.nextGen(e,i,o,n),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,o=!0){let n=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)n.push(t),t=i?t.nextSibling:t.previousSibling;n.reverse(),yield*this.runInStack(e,n,i,o),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let o=this.eachGen(e,i),n=o.next();for(;!n.done;){if(!1===t(n.value))return!1;n=o.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,o=!0){for(;t.length;){let n=t.pop();if(o){let e=i?n.lastChild:n.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==n&&(yield n)}}static findWithCurrent(e,t,i,o="nextSibling",n="firstChild"){let r=e;do{if(t(r))return r||null;if(n&&r&&r[n]){let e=y.findWithCurrent(r[n],t,r,o,n);if(e)return e}for(;r&&!r[o]&&r!==i;)r=r.parentNode;r&&r[o]&&r!==i&&(r=r[o])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!y.isEmptyTextNode(e)){let o=y.sibling(e,t);for(;o&&!i(o);)o=y.sibling(o,t);return o&&i(o)?o:null}static findNotEmptySibling(e,t){return y.findSibling(e,t,e=>{var t;return!y.isEmptyTextNode(e)&&!!(!y.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,h.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,v.call)(t?y.prev:y.next,e,e=>!!(e&&(!(y.isText(e)||y.isComment(e))||(0,h.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,o=!1){let n=e;if(!n)return null;do{if(t(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&t(n)?n:null}static closest(e,t,i){let o,n=e=>e.toLowerCase();if((0,s.isFunction)(t))o=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(n));o=t=>!!(t&&e.has(n(t.nodeName)))}else o=e=>!!(e&&n(t)===n(e.nodeName));return y.up(e,o,i)}static furthest(e,t,i){let o=null,n=null==e?void 0:e.parentElement;for(;n&&n!==i;)t(n)&&(o=n),n=null==n?void 0:n.parentElement;return o}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>y.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,o.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>y.isText(e)&&!e.nodeValue&&y.safeRemove(e))}static hide(e){e&&((0,g.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,g.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,m.attr)(e,t),(0,m.attr)(e,o.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,m.attr)(e,o.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(e){return(0,u.unwrapMarkedTags)(e,null,o.TEMP_ATTR)}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(o.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,i){"use strict";i.d(t,{Dom:function(){return o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(2748),n=i(70071)},70071:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return s}});var o=i(45219),n=i(2748),r=i(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=n.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){var e;if(this.workNodes){this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var o=i(82758),n=i(46559),r=i(68345),s=i(23282),a=i(70799),l=i(89890),c=i(15738);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,n.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),o=i[1]||c.defaultNameSpace;t.call(this,i[0],o)})}__getStore(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","view","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let c,d,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(c=this,d=e,h=t,p=i):(c=e,d=t,h=i,p=n),!((0,a.isString)(d)||(0,a.isStringArray)(d))||0===d.length)throw(0,l.error)("Need events names");if(!(0,s.isFunction)(h))throw(0,l.error)("Need event handler");if((0,r.isArray)(c))return c.forEach(e=>{this.on(e,d,h,p)}),this;let m=c,f=this.__getStore(m),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return u(m)&&(b=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),h&&!1===h.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(d,(e,t)=>{var i,n;if(0===e.length)throw(0,l.error)("Need event name");if(!1===f.indexOf(e,t,h)){let r={event:e,originalCallback:h,syntheticCallback:b};if(f.set(e,t,r,null==p?void 0:p.top),u(m)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;b.options=t,m.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(m,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,o=i.get(e)||new Set;o.delete(t),o.size?i.set(e,o):i.delete(e)}one(e,t,i,o){let n,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(n=this,r=e,s=t,l=i):(n=e,r=t,s=i,l=o);let c=(...e)=>(this.off(n,r,c),s(...e));return this.on(n,r,c,l),this}off(e,t,i){let o,n,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,n=e,l=t):(o=e,n=t,l=i),(0,r.isArray)(o))return o.forEach(e=>{this.off(e,n,l)}),this;let d=o,h=this.__getStore(d);if(!((0,a.isString)(n)||(0,a.isStringArray)(n))||0===n.length)return h.namespaces().forEach(e=>{this.off(d,"."+e)}),this.__removeStoreFromSubject(d),this;let p=e=>{var t;u(d)&&(d.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(d,e.syntheticCallback))},m=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&m(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,s.isFunction)(l)){let o=h.indexOf(e,t,l);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(n,(e,t)=>{t===c.defaultNameSpace?h.namespaces().forEach(t=>{m(e,t)}):m(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(d),this}stopPropagation(e,t){let i=(0,a.isString)(e)?this:e,o=(0,a.isString)(e)?e:t;if("string"!=typeof o)throw(0,l.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(e,t)=>{let o=n.get(e,t);o&&this.__stopped.push(o),t===c.defaultNameSpace&&n.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let o,n,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,d=(0,a.isString)(e)?[t,...i]:i;if(!u(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&u(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(u(r))this.__triggerNativeEvent(r,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),n=t.syntheticCallback.call(r,e,...d),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||u(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...d]);void 0!==i&&(o=i)})}}),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.__doc=o.globalDocument,this.__prepareEvent=e=>{!e.cancelBubble&&(e.composed&&(0,s.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}}function u(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){var i;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var i;let o;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.forEach(e=>{o=e(...t)})),o}constructor(){this.__map=new Map}}},57012:function(e,t,i){"use strict";let o=new(i(98220)).EventEmitter;i.d(t,["eventEmitter",0,o])},3827:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var o=i(98220),n=i(72757),r=i(73026),s=i(15738)},73026:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var o=i(68345),n=i(59292),r=i(72430),s=i(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,n)=>((0,o.isArray)(t)?t.map(e=>c(e,n)):(i[t]||(i[t]=[]),i[t].push(n)),e),d=(n,...r)=>{if((0,o.isArray)(n))return void n.map(e=>d(e,...r));try{!t[n]&&i[n]&&(t[n]=!0,i[n].forEach(t=>t.call(e,...r)))}finally{t[n]=!1}},u=(t,i=[])=>{let o={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);o[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=o[a];if(!(0,n.isFastEqual)(o[a],t)){d(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&u(t,l),c&&c.set?c.set.call(e,t):o[a]=t;let n=[];d(["change",...l.reduce((e,t)=>(n.push(t),e.push("change."+n.join(".")),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):o[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(o[a])&&u(o[a],l)}),Object.defineProperty(e,"on",{value:c}))};return u(e),e}},15738:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return s}});var o=i(4510),n=i(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,n.assert)(i,"-"),i[e]}}indexOf(e,t,i){let o=this.get(e,t);if(o){for(let e=0;e<o.length;e+=1)if(o[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,o=!1){let n=this.__store.get(t);n||(n={},this.__store.set(t,n)),void 0===n[e]&&(n[e]=[]),o?n[e].unshift(i):n[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}i.d(t,["defaultNameSpace",0,r])},580:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return _},getPopupViewRoot:function(){return k},uniqueUid:function(){return v}});var o=i(19306),n=i(72430),r=i(70799),s=i(39955),a=i(12475),l=i(29960),c=i(41180),d=i(80568),u=i(69175),h=i(41876),p=i(57012),m=i(82758),f=i(22732);let g=1,b=new Set;function v(){function e(){return Math.round(g+=10*(Math.random()+1)).toString(16)}let t=e();for(;b.has(t);)t=e();return b.add(t),t}let y=new h.PluginSystem({getContainer:_}),w=new WeakMap;function _(e,t,i="div",n=!1){let c,u=(0,r.isString)(t)?t:t?(0,d.getClassName)(t.prototype):"jodit-utils",h=w.get(e)||{},p=u+i,m=(0,s.isViewObject)(e)?e:e.j;if(!h[p]){let t=m.c;if(c=k(m.o,m.container,e.od.body),n&&(0,o.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let n="style"===i?e.ed.head:e.ed.body;c=(0,o.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:n}let r=t.element(i,{className:`jodit jodit-${(0,a.kebabCase)(u)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,l.attr)(r,"nonce",m.o.nonce),r.classList.add("jodit_theme_"+(m.o.theme||"default")),f.Dom.append(c,r),h[p]=r,e.hookStatus("beforeDestruct",()=>{m.events.off(r),f.Dom.safeRemove(r),delete h[p],Object.keys(h).length&&w.delete(e)}),w.set(e,h),m.events.fire("getContainer",r)}return h[p].classList.remove("jodit_theme_default","jodit_theme_dark"),h[p].classList.add("jodit_theme_"+(m.o.theme||"default")),h[p]}function k(e,t,i){var o,n,r;return null!=(r=null!=(n=null!=(o=e.popupRoot)?o:e.shadowRoot)?n:f.Dom.closest(t,e=>f.Dom.isHTMLElement(e)&&(f.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,c.css)(e,"position"))),i))?r:i}let C=p.eventEmitter;i.d(t,["eventEmitter",0,C,"extendLang",0,e=>{Object.keys(e).forEach(t=>{let i,o=(i=e[t],(0,n.isPlainObject)(i)&&(0,n.isPlainObject)(i.default)?i.default:i);!(0,u.isUnsafeProtoKey)(t)&&(0,n.isPlainObject)(o)&&(Object.prototype.hasOwnProperty.call(m.lang,t)&&(0,n.isPlainObject)(m.lang[t])||(m.lang[t]={}),Object.keys(o).forEach(e=>{(0,u.isUnsafeProtoKey)(e)||(m.lang[t][e]=o[e])}))})},"instances",0,{},"modules",0,{},"pluginSystem",0,y])},29999:function(e,t,i){"use strict";var o=i(68345);i.d(t,["asArray",0,e=>(0,o.isArray)(e)?e:[e]])},76855:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return r.toArray}});var o=i(29999),n=i(46559),r=i(4510)},46559:function(e,t,i){"use strict";function o(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return o}})},4510:function(e,t,i){"use strict";var o=i(70722),n=i(58844);i.d(t,["toArray",0,function(...e){var t;return((0,o.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,n.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(13252)},13252:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return n}});var o=i(82758);function n(e,t,...i){return t?o.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){o.globalWindow.clearTimeout(e)}},54765:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n}});var o=i(82758);function n(){let e;try{let t=o.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o.hasBrowserColorPicker},hasContainer:function(){return u.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return u.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return d.isHtmlFromWord},isInitable:function(){return u.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return m.isLicense},isMarker:function(){return f.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return b.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return y.isPlainObject},isPromise:function(){return w.isPromise},isSet:function(){return _.isSet},isString:function(){return k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return S.isValidName},isViewObject:function(){return x.isViewObject},isVoid:function(){return E.isVoid},isWindow:function(){return I.isWindow}});var o=i(54765),n=i(12045),r=i(68345),s=i(87612),a=i(59292),l=i(23282),c=i(58487),d=i(29673),u=i(60132),h=i(72913),p=i(19306),m=i(45603),f=i(78116),g=i(70722),b=i(84767),v=i(29807),y=i(72430),w=i(14773),_=i(42320),k=i(70799),C=i(26049),S=i(37508),x=i(39955),E=i(86068),I=i(52742)},12045:function(e,t,i){"use strict";function o(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return o}})},68345:function(e,t,i){"use strict";function o(e){return Array.isArray(e)}i.d(t,{isArray:function(){return o}})},87612:function(e,t,i){"use strict";function o(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return o}})},59292:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return n},isFastEqual:function(){return r}});var o=i(67462);function n(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,i){"use strict";function o(e){return"function"==typeof e}i.d(t,{isFunction:function(){return o}})},29673:function(e,t,i){"use strict";i.d(t,{isHtmlFromWord:function(){return l}});let o=/\s/,n=/\d/,r=/\w/;function s(e,t){let i=e.indexOf(t);for(;-1!==i;){let r=i+t.length;if(o.test(e.charAt(r))&&n.test(e.charAt(r+1)))return!0;i=e.indexOf(t,r)}return!1}function a(e,t){let i="style="+t,o=e.indexOf(i);for(;-1!==o;){let n=o+i.length,r=e.indexOf(t,n);if(-1===r&&(r=e.length),e.slice(n,r).includes("mso-"))return!0;o=e.indexOf(i,r)}return!1}function l(e){if(e.includes("urn:schemas-microsoft-com:office:word")||e.includes("urn:schemas-microsoft-com:office:excel"))return!0;let t=e.indexOf("<");for(;-1!==t;){if(!r.test(e.charAt(t+1))){t=e.indexOf("<",t+1);continue}let i=e.indexOf(">",t);-1===i&&(i=e.length);let n=e.slice(t,i);if("<meta"===n.slice(0,5).toLowerCase()&&function(e){if(s(e,"Microsoft Word")||s(e,"Microsoft Excel"))return!0;let t=e.toLowerCase(),i=t.indexOf("progid");return -1!==i&&(-1!==t.indexOf("word.",i)||-1!==t.indexOf("excel.",i))||t.includes("libreoffice")||t.includes("openoffice")}(n)||function(e){let t=e.indexOf("class=");for(;-1!==t;){if(t>0&&o.test(e.charAt(t-1))){let i=t+6,o=e.charAt(i);if(('"'===o||"'"===o)&&(i+=1),e.startsWith("Mso",i))return!0}t=e.indexOf("class=",t+6)}return!1}(n))return!0;t=e.indexOf("<",i)}return a(e,"'")||a(e,'"')&&e.includes("<font")}},58487:function(e,t,i){"use strict";var o=i(70799);let n=/[A-Za-z]/,r=/[A-Za-z0-9]/,s=/\w/;function a(e,t){if(!n.test(e.charAt(t)))return"";let i=t+1;for(;r.test(e.charAt(i));)i+=1;return e.slice(t,i)}i.d(t,["isHTML",0,e=>(0,o.isString)(e)&&function(e){let t=new Map,i=e.indexOf("</");for(;-1!==i;){let o=a(e,i+2);""!==o&&">"===e.charAt(i+2+o.length)&&t.set(o,i),i=e.indexOf("</",i+2)}if(0===t.size)return!1;let o=-1;for(i=e.indexOf("<");-1!==i;){let n=a(e,i+1),r=i+1+n.length;if(""!==n&&!s.test(e.charAt(r))){if(o<r&&(o=e.indexOf(">",r)),-1===o)return!1;let i=t.get(n);if(void 0!==i&&i>o)return!0}i=e.indexOf("<",i+1)}return!1}(e)])},60132:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var o=i(2748),n=i(23282),r=i(86068);function s(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&o.Dom.isElement(e.container)}},72913:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var o=i(29807),n=i(70799);function r(e){return(0,n.isString)(e)&&(0,o.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isLicense",0,e=>(0,o.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},78116:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return n}});var o=i(2748);function n(e){return o.Dom.isMarker(e)}},70722:function(e,t,i){"use strict";function o(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return o}})},84767:function(e,t,i){"use strict";function o(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return o}})},29807:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return n}});var o=i(70799);function n(e){if((0,o.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},72430:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return n}});var o=i(52742);function n(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,i){"use strict";function o(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return o}})},42320:function(e,t,i){"use strict";i.d(t,{isSet:function(){return n}});var o=i(23282);function n(e){return!!e&&(0,o.isFunction)(e.has)&&(0,o.isFunction)(e.add)&&(0,o.isFunction)(e.delete)}},70799:function(e,t,i){"use strict";i.d(t,{isString:function(){return n},isStringArray:function(){return r}});var o=i(68345);function n(e){return"string"==typeof e}function r(e){return(0,o.isArray)(e)&&n(e[0])}},26049:function(e,t,i){"use strict";i.d(t,{isURL:function(){return n}});var o=i(82758);function n(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=o.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,i){"use strict";function o(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return o}})},39955:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,i){"use strict";function o(e){return null==e}i.d(t,{isVoid:function(){return o}})},52742:function(e,t,i){"use strict";function o(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return o}})},35278:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),o=parseInt(t[3],10),n=(parseInt(t[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return t[1]+"#"+n}])},32574:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return h}});var o=i(82758),n=i(2748),r=i(76241),s=i(90723),a=i(49055),l=i(29960),c=i(41180),d=i(76078);function u(e){let t=e.split(";"),i=t.length-1;return t.filter((e,t)=>{let o=/^\s*([a-z-]{1,64})\s*:/i.exec(e);if(!o)return!0;let n=o[1].toLowerCase();return!(n.startsWith("mso-")||n.startsWith("border")&&t!==i)}).join(";").replace(/([0-9.]{1,32})(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function h(e){let t=(0,r.indexOfOpenTag)(e,"html");if(-1===t)return e;let i=(e=e.substring(t)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let h=o.globalDocument.createElement("iframe");(0,c.css)(h,"display","none"),n.Dom.append(o.globalDocument.body,h);let p="";try{let t=h.contentDocument||(h.contentWindow?h.contentWindow.document:null);if(t){t.open(),t.write(e),t.close();let i=(0,s.readWordListItems)(t.body);n.Dom.each(t.body,e=>{n.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,l.attr)(e,"style")||"")&&n.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,d.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=u(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!o.IS_PROD)throw e}(0,s.wrapWordListItems)(i),n.Dom.each(t.body,e=>{if(n.Dom.isElement(e)){let t=(0,l.attr)(e,"style");t&&(e.style.cssText=u(t)),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)}}),p=t.firstChild?(0,a.trim)(t.body.innerHTML):""}}catch(e){}finally{n.Dom.safeRemove(h)}return p&&(e=p),(0,a.trim)((0,r.removeWordWrappers)(e))}},53212:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return d}});var o=i(82758),n=i(2748),r=i(4510),s=i(76241),a=i(90723),l=i(49055),c=i(29960);function d(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=o.globalDocument.createElement("div");i.innerHTML=e;let s=[],l=(0,a.readWordListItems)(i);i.firstChild&&n.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,c.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,c.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),n.Dom.safeRemove.apply(null,s),(0,a.wrapWordListItems)(l),t=i.innerHTML}catch(e){}return t&&(e=t),e=e.split(/(\n)/).filter(l.trim).join(`
17
+ `,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,n)}}n=r.prototype,r.prototype.controls={}},26992:function(e,t,i){"use strict";i.d(t,{Async:function(){return m}});var o=i(82758),n=i(91898),r=i(12045),s=i(23282),a=i(84767),l=i(72430),c=i(14773),d=i(70799),u=i(86068),h=i(38837),p=i(93661);class m{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let o={};(0,u.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(o=t).timeout||0),o.label&&this.clearLabel(o.label);let r=(0,n.setTimeout)(e,t,...i),s=o.label||r;return this.timers.set(s,r),this.__callbacks.set(s,e),r}updateTimeout(e,t){if((0,h.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,n.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,n.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let o=0,a=!1,d=[],u=(...t)=>{if(!a){o=0;let i=e(...t);if(a=!0,d.length){let e=()=>{d.forEach(e=>e()),d.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...r)=>{a=!1,t?(!o&&i&&u(...r),(0,n.clearTimeout)(o),o=this.setTimeout(()=>u(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,o)):u(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{d.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,o=!1,n=!0;return(...r)=>{if(i=r,o){n=!0;return}n=!0,t&&(n=!1,e(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&e(...i)})}}throttle(e,t,i=!1){let o=null,n,r,a;return(...i)=>{(n=!0,a=i,t)?o||(r=()=>{n?(e(...a),n=!1,o=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,o)):o=null})():e(...a)}}promise(e){let t=()=>{},i=new Promise((i,o)=>{t=()=>o((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,o)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let o=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let r=this.setTimeout(()=>{try{o(e())}catch(e){n(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),n((0,p.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,n.clearTimeout)(e)),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,n;this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=null!=(e=null==queueMicrotask?void 0:queueMicrotask.bind(window))?e:Promise.resolve().then.bind(Promise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=null!=(i=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?i:(e,t)=>{var i;let o=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},null!=(i=null==t?void 0:t.timeout)?i:1)},this.__cancelIdleCallbackNative=null!=(n=null==(o=window.cancelIdleCallback)?void 0:o.bind(window))?n:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,i){"use strict";i.d(t,{Async:function(){return o.Async}});var o=i(26992)},4012:function(e,t,i){"use strict";i.d(t,{Component:function(){return l}});var o=i(8884),n=i(78213),r=i(580),s=i(21537);let a=new Map;class l{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,s.kebabCase)(((0,s.isFunction)(this.className)?this.className():"")||(0,s.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let o=[this.componentName];return e&&o.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(o.push("_",t),o.push("_",(0,s.isVoid)(i)?"true":i.toString())),o.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,s.get)(e,t||this)}get isReady(){return this.componentStatus===n.STATUSES.ready}get isDestructed(){return this.componentStatus===n.STATUSES.destructed}get isInDestruct(){return n.STATUSES.beforeDestruct===this.componentStatus||n.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(n.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(n.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),a.get(this)&&a.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,s.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let o=a.get(this),n=null==o?void 0:o[e];n&&n.length&&n.forEach(e=>e(t))}hookStatus(e,t){let i=a.get(this);i||(i={},a.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new o.Async,this.ownerWindow=window,this.__componentStatus=n.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=n.STATUSES},91907:function(e,t,i){"use strict";i.d(t,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return r.ViewComponent}});var o=i(4012),n=i(78213),r=i(80480)},78213:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return n}});var o=i(4012);class n extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),this.setParentView(e)}}},82758:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return o}});let o=!1,n="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),c=new Set(a),d="Meta",u="Backspace",h="Enter",p="Escape",m="ArrowLeft",f="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[d,u,v,f,b,g,m,h,p,"F3","Tab"],w="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),_=void 0!==n&&/Mac|iPod|iPhone|iPad/.test(n.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:C,isMin:S}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(n.location.href)})(),x=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.20.4","BASE_PATH",0,C,"BASE_PATH_IS_MIN",0,S,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ERROR_CODE_CONFLICT",0,409,"ES",0,"es2021","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/pro/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!0,"IS_IE",0,w,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,_,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:_?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,u,"KEY_DELETE",0,v,"KEY_DOWN",0,b,"KEY_END",0,"End","KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,m,"KEY_META",0,d,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,f,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0," ","NEARBY",0,5,"NO_EMPTY_TAGS",0,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,x,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>o=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,w?"html":"text/html","TEXT_PLAIN",0,w?"text":"text/plain","TEXT_RTF",0,w?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,n,"lang",0,{}])},20218:function(e,t,i){"use strict";i.d(t,{Create:function(){return a}});var o=i(82758),n=i(2748),r=i(21537),s=i(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,r.isPlainObject)(t)?(0,r.attr)(o,t):i=t),i&&(0,r.asArray)(i).forEach(e=>n.Dom.append(o,(0,r.isString)(e)?this.fromHTML(e):e)),o}div(e,t,i){let o=this.element("div",t,i);return e&&(o.className=e),o}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});n.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let o=this.element("span",t,i);return e&&(o.className=e),o}a(e,t,i){let o=this.element("a",t,i);return e&&(o.className=e),o}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(n.Dom.safeRemove(o),t){let e=(0,r.refs)(o);Object.keys(t).forEach(i=>{let o=e[i];o&&!1===t[i]&&n.Dom.hide(o)})}return o}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,i){"use strict";i.d(t,{Create:function(){return o.Create}});var o=i(20218)},45219:function(e,t,i){"use strict";i.d(t,{autobind:function(){return n}});var o=i(23282);function n(e,t,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let n=i.value;return{configurable:!0,get(){let e=n.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var o=i(78213),n=i(2748),r=i(27613),s=i(82760);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let o=i.get;if(!o)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){var t;let i,o=null!=(i=this.od)?i:document,r=c.get(o);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&n.Dom.isElement(s)&&(r?r.set(this.constructor,s):c.set(o,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(o.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,i){"use strict";i.d(t,{component:function(){return l},getComponentClass:function(){return c}});var o=i(82758),n=i(80568);let r=new Map,s=new WeakSet,a=new WeakSet;function l(e){class t extends e{constructor(...e){super(...e),this.constructor===t?(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready")):o.IS_PROD||s.has(this.constructor)||a.has(this.constructor)||a.add(this.constructor)}}s.add(e),s.add(t);let i=(0,n.getClassName)(e.prototype);if(r.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function c(e){return r.get(e)}},81577:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var o=i(91907),n=i(27613),r=i(38837),s=i(89890);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:s}=o;(0,r.assert)(null!=s,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(e)?e(o):e,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:s[i](o[l].bind(o),c,t)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,i){"use strict";i.d(t,{derive:function(){return n}});var o=i(23282);function n(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let n=e[t],r=Object.getOwnPropertyNames(n.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(n.prototype,t);null!=s&&(0,o.isFunction)(s.value)&&!(0,o.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var o=i(23282),n=i(89890);function r(e){return(t,i)=>{if(!(0,o.isFunction)(t[i]))throw(0,n.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},78927:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var o=i(91907),n=i(23282),r=i(89890);function s(){return(e,t)=>{if(!(0,n.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:i}=e,o=e[t];e[t]=(...t)=>i.requestIdleCallback(o.bind(e,...t))})}}},65478:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return d.nonenumerable},persistent:function(){return u.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var o=i(45219),n=i(33433),r=i(87325),s=i(81577),a=i(55153),l=i(97357),c=i(78927),d=i(31589),u=i(53213),h=i(13525),p=i(37133)},31589:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},53213:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var o=i(78213),n=i(39955);function r(e,t){e.hookStatus(o.STATUSES.ready,e=>{let i=(0,n.isViewObject)(e)?e:e.jodit,o=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(o))?e:r},set(e){i.storage.set(o,e)}})})}},13525:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var o=i(78213),n=i(23282),r=i(89890);function s(e){return(t,i)=>{let s=t[i];if(!(0,n.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:o}=t,n=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){o.clearTimeout(r),e(t)?n.apply(t,s):r=o.setTimeout(()=>i(...s),10)}})})}}},37133:function(e,t,i){"use strict";i.d(t,{watch:function(){return u}});var o=i(78213),n=i(73026),r=i(46559),s=i(23282),a=i(72430),l=i(39955),c=i(89890),d=i(37790);function u(e,t){return(i,u)=>{var h;if(!(0,s.isFunction)(i[u]))throw(0,c.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,m=null==t?void 0:t.context,f=t=>{let o=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[u](e,...i)};p||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,n]=e.split(":"),r=m;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),o.events.on(r||t,n,c),r||o.events.on(n,c),t.hookStatus("beforeDestruct",()=>{o.events.off(r||t,n,c).off(n,c)});return}let r=e.split("."),[l]=r,u=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,n.observable)(h).on("change."+u.join("."),c);let p=(0,d.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,n.observable)(h)).on("change."+u.join("."),c),c(l,i,h))},get:()=>p&&p.get?p.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,f):f(i)}}},2748:function(e,t,i){"use strict";i.d(t,{Dom:function(){return y}});var o=i(82758),n=i(4510),r=i(68345),s=i(23282),a=i(58487),l=i(42320),c=i(70799),d=i(86068),u=i(76241),h=i(49055),p=i(38837),m=i(29960),f=i(41180),g=i(86583),b=i(89890),v=i(37790);class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let o,n,r=e;i.s.save();do n=!1,(o=r.nextSibling)&&!y.isBlock(o)&&!y.isTag(o,"br")&&(n=!0,r=o);while(n)return y.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,o){let n=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(n,i);let r=i;for(;r&&(r=i.nextSibling,n.appendChild(i),i!==o&&r);)i=r;return t.s.restore(),n}static wrapInline(e,t,i){let o,n,r=e,s=e;i.s.save();do n=!1,(o=r.previousSibling)&&!y.isBlock(o)&&(n=!0,r=o);while(n)do n=!1,(o=s.nextSibling)&&!y.isBlock(o)&&(n=!0,s=o);while(n)return y.__wrapElements(t,i,r,s)}static wrap(e,t,i){let o=(0,c.isString)(t)?i.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,b.error)("Element should be in DOM");e.parentNode.insertBefore(o,e),o.appendChild(e)}else{let t=e.extractContents();e.insertNode(o),o.appendChild(t)}return o}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,i){let o=e;for(;o&&o!==t&&!(e!==o&&i(o));){let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling;)if((o=o.parentNode)===t)return;e=null==o?void 0:o.nextSibling}o=e}}static replace(e,t,i,o=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,p.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,p.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return o&&y.isElement(e)&&y.isElement(s)&&(0,n.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return y.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){let i=y.closest(e,e=>y.isElement(e)&&e.hasAttribute("contenteditable"),t);return y.isNode(e)&&(null==i?void 0:i.getAttribute("contenteditable"))!=="false"}static isEmpty(e,t=o.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let n=e=>null==e.nodeValue||0===(0,h.trim)(e.nodeValue).length;return y.isText(e)?n(e):!(y.isElement(e)&&i(e))&&y.each(e,e=>{if(y.isText(e)&&!n(e)||y.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return y.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return y.isTag(e,o.LIST_TAGS)}static isLeaf(e){return y.isTag(e,"li")}static isImage(e){return y.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,d.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&o.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!y.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!y.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!y.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,d.isVoid)(e)&&y.isHTMLElement(e)&&y.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return y.__deepMost(e,t,!1)}static last(e,t){return y.__deepMost(e,t,!0)}static __deepMost(e,t,i){let o=i?"lastChild":"firstChild",n=i?"previousSibling":"nextSibling",r=null==e?void 0:e[o];if(!r)return null;do{if(t(r))return r;let i=r[o]||r[n];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[n]&&r.parentNode!==e)i=null==r?void 0:r[n]}r=i}while(r)return null}static prev(e,t,i,o=!0){return y.find(e,t,i,!1,o)}static next(e,t,i,o=!0){return y.find(e,t,i,!0,o)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let o=e=>y.isElement(e)&&e.classList.contains(t),n=e.parentNode;return i?y.prev(e,o,n):y.next(e,o,n)}static find(e,t,i,o=!0,n=!0){let r=this.nextGen(e,i,o,n),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,o=!0){let n=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)n.push(t),t=i?t.nextSibling:t.previousSibling;n.reverse(),yield*this.runInStack(e,n,i,o),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let o=this.eachGen(e,i),n=o.next();for(;!n.done;){if(!1===t(n.value))return!1;n=o.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,o=!0){for(;t.length;){let n=t.pop();if(o){let e=i?n.lastChild:n.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==n&&(yield n)}}static findWithCurrent(e,t,i,o="nextSibling",n="firstChild"){let r=e;do{if(t(r))return r||null;if(n&&r&&r[n]){let e=y.findWithCurrent(r[n],t,r,o,n);if(e)return e}for(;r&&!r[o]&&r!==i;)r=r.parentNode;r&&r[o]&&r!==i&&(r=r[o])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!y.isEmptyTextNode(e)){let o=y.sibling(e,t);for(;o&&!i(o);)o=y.sibling(o,t);return o&&i(o)?o:null}static findNotEmptySibling(e,t){return y.findSibling(e,t,e=>{var t;return!y.isEmptyTextNode(e)&&!!(!y.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,h.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,v.call)(t?y.prev:y.next,e,e=>!!(e&&(!(y.isText(e)||y.isComment(e))||(0,h.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,o=!1){let n=e;if(!n)return null;do{if(t(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&t(n)?n:null}static closest(e,t,i){let o,n=e=>e.toLowerCase();if((0,s.isFunction)(t))o=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(n));o=t=>!!(t&&e.has(n(t.nodeName)))}else o=e=>!!(e&&n(t)===n(e.nodeName));return y.up(e,o,i)}static furthest(e,t,i){let o=null,n=null==e?void 0:e.parentElement;for(;n&&n!==i;)t(n)&&(o=n),n=null==n?void 0:n.parentElement;return o}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>y.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,o.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>y.isText(e)&&!e.nodeValue&&y.safeRemove(e))}static hide(e){e&&((0,g.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,g.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,m.attr)(e,t),(0,m.attr)(e,o.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,m.attr)(e,o.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(e){return(0,u.unwrapMarkedTags)(e,null,o.TEMP_ATTR)}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(o.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,i){"use strict";i.d(t,{Dom:function(){return o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(2748),n=i(70071)},70071:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return s}});var o=i(45219),n=i(2748),r=i(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=n.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){var e;if(this.workNodes){this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var o=i(82758),n=i(46559),r=i(68345),s=i(23282),a=i(70799),l=i(89890),c=i(15738);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,n.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),o=i[1]||c.defaultNameSpace;t.call(this,i[0],o)})}__getStore(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","view","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let c,d,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(c=this,d=e,h=t,p=i):(c=e,d=t,h=i,p=n),!((0,a.isString)(d)||(0,a.isStringArray)(d))||0===d.length)throw(0,l.error)("Need events names");if(!(0,s.isFunction)(h))throw(0,l.error)("Need event handler");if((0,r.isArray)(c))return c.forEach(e=>{this.on(e,d,h,p)}),this;let m=c,f=this.__getStore(m),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return u(m)&&(b=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),h&&!1===h.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(d,(e,t)=>{var i,n;if(0===e.length)throw(0,l.error)("Need event name");if(!1===f.indexOf(e,t,h)){let r={event:e,originalCallback:h,syntheticCallback:b};if(f.set(e,t,r,null==p?void 0:p.top),u(m)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;b.options=t,m.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(m,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,o=i.get(e)||new Set;o.delete(t),o.size?i.set(e,o):i.delete(e)}one(e,t,i,o){let n,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(n=this,r=e,s=t,l=i):(n=e,r=t,s=i,l=o);let c=(...e)=>(this.off(n,r,c),s(...e));return this.on(n,r,c,l),this}off(e,t,i){let o,n,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,n=e,l=t):(o=e,n=t,l=i),(0,r.isArray)(o))return o.forEach(e=>{this.off(e,n,l)}),this;let d=o,h=this.__getStore(d);if(!((0,a.isString)(n)||(0,a.isStringArray)(n))||0===n.length)return h.namespaces().forEach(e=>{this.off(d,"."+e)}),this.__removeStoreFromSubject(d),this;let p=e=>{var t;u(d)&&(d.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(d,e.syntheticCallback))},m=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&m(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,s.isFunction)(l)){let o=h.indexOf(e,t,l);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(n,(e,t)=>{t===c.defaultNameSpace?h.namespaces().forEach(t=>{m(e,t)}):m(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(d),this}stopPropagation(e,t){let i=(0,a.isString)(e)?this:e,o=(0,a.isString)(e)?e:t;if("string"!=typeof o)throw(0,l.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(e,t)=>{let o=n.get(e,t);o&&this.__stopped.push(o),t===c.defaultNameSpace&&n.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let o,n,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,d=(0,a.isString)(e)?[t,...i]:i;if(!u(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&u(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(u(r))this.__triggerNativeEvent(r,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),n=t.syntheticCallback.call(r,e,...d),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||u(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...d]);void 0!==i&&(o=i)})}}),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.__doc=o.globalDocument,this.__prepareEvent=e=>{!e.cancelBubble&&(e.composed&&(0,s.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}}function u(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){var i;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var i;let o;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.forEach(e=>{o=e(...t)})),o}constructor(){this.__map=new Map}}},57012:function(e,t,i){"use strict";let o=new(i(98220)).EventEmitter;i.d(t,["eventEmitter",0,o])},3827:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var o=i(98220),n=i(72757),r=i(73026),s=i(15738)},73026:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var o=i(68345),n=i(59292),r=i(72430),s=i(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,n)=>((0,o.isArray)(t)?t.map(e=>c(e,n)):(i[t]||(i[t]=[]),i[t].push(n)),e),d=(n,...r)=>{if((0,o.isArray)(n))return void n.map(e=>d(e,...r));try{!t[n]&&i[n]&&(t[n]=!0,i[n].forEach(t=>t.call(e,...r)))}finally{t[n]=!1}},u=(t,i=[])=>{let o={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);o[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=o[a];if(!(0,n.isFastEqual)(o[a],t)){d(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&u(t,l),c&&c.set?c.set.call(e,t):o[a]=t;let n=[];d(["change",...l.reduce((e,t)=>(n.push(t),e.push("change."+n.join(".")),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):o[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(o[a])&&u(o[a],l)}),Object.defineProperty(e,"on",{value:c}))};return u(e),e}},15738:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return s}});var o=i(4510),n=i(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,n.assert)(i,"-"),i[e]}}indexOf(e,t,i){let o=this.get(e,t);if(o){for(let e=0;e<o.length;e+=1)if(o[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,o=!1){let n=this.__store.get(t);n||(n={},this.__store.set(t,n)),void 0===n[e]&&(n[e]=[]),o?n[e].unshift(i):n[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}i.d(t,["defaultNameSpace",0,r])},580:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return _},getPopupViewRoot:function(){return k},uniqueUid:function(){return v}});var o=i(19306),n=i(72430),r=i(70799),s=i(39955),a=i(12475),l=i(29960),c=i(41180),d=i(80568),u=i(69175),h=i(41876),p=i(57012),m=i(82758),f=i(22732);let g=1,b=new Set;function v(){function e(){return Math.round(g+=10*(Math.random()+1)).toString(16)}let t=e();for(;b.has(t);)t=e();return b.add(t),t}let y=new h.PluginSystem({getContainer:_}),w=new WeakMap;function _(e,t,i="div",n=!1){let c,u=(0,r.isString)(t)?t:t?(0,d.getClassName)(t.prototype):"jodit-utils",h=w.get(e)||{},p=u+i,m=(0,s.isViewObject)(e)?e:e.j;if(!h[p]){let t=m.c;if(c=k(m.o,m.container,e.od.body),n&&(0,o.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let n="style"===i?e.ed.head:e.ed.body;c=(0,o.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:n}let r=t.element(i,{className:`jodit jodit-${(0,a.kebabCase)(u)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,l.attr)(r,"nonce",m.o.nonce),r.classList.add("jodit_theme_"+(m.o.theme||"default")),f.Dom.append(c,r),h[p]=r,e.hookStatus("beforeDestruct",()=>{m.events.off(r),f.Dom.safeRemove(r),delete h[p],Object.keys(h).length&&w.delete(e)}),w.set(e,h),m.events.fire("getContainer",r)}return h[p].classList.remove("jodit_theme_default","jodit_theme_dark"),h[p].classList.add("jodit_theme_"+(m.o.theme||"default")),h[p]}function k(e,t,i){var o,n,r;return null!=(r=null!=(n=null!=(o=e.popupRoot)?o:e.shadowRoot)?n:f.Dom.closest(t,e=>f.Dom.isHTMLElement(e)&&(f.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,c.css)(e,"position"))),i))?r:i}let C=p.eventEmitter;i.d(t,["eventEmitter",0,C,"extendLang",0,e=>{Object.keys(e).forEach(t=>{let i,o=(i=e[t],(0,n.isPlainObject)(i)&&(0,n.isPlainObject)(i.default)?i.default:i);!(0,u.isUnsafeProtoKey)(t)&&(0,n.isPlainObject)(o)&&(Object.prototype.hasOwnProperty.call(m.lang,t)&&(0,n.isPlainObject)(m.lang[t])||(m.lang[t]={}),Object.keys(o).forEach(e=>{(0,u.isUnsafeProtoKey)(e)||(m.lang[t][e]=o[e])}))})},"instances",0,{},"modules",0,{},"pluginSystem",0,y])},29999:function(e,t,i){"use strict";var o=i(68345);i.d(t,["asArray",0,e=>(0,o.isArray)(e)?e:[e]])},76855:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return r.toArray}});var o=i(29999),n=i(46559),r=i(4510)},46559:function(e,t,i){"use strict";function o(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return o}})},4510:function(e,t,i){"use strict";var o=i(70722),n=i(58844);i.d(t,["toArray",0,function(...e){var t;return((0,o.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,n.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(13252)},13252:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return n}});var o=i(82758);function n(e,t,...i){return t?o.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){o.globalWindow.clearTimeout(e)}},54765:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n}});var o=i(82758);function n(){let e;try{let t=o.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o.hasBrowserColorPicker},hasContainer:function(){return u.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return u.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return d.isHtmlFromWord},isInitable:function(){return u.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return m.isLicense},isMarker:function(){return f.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return b.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return y.isPlainObject},isPromise:function(){return w.isPromise},isSet:function(){return _.isSet},isString:function(){return k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return S.isValidName},isViewObject:function(){return x.isViewObject},isVoid:function(){return E.isVoid},isWindow:function(){return I.isWindow}});var o=i(54765),n=i(12045),r=i(68345),s=i(87612),a=i(59292),l=i(23282),c=i(58487),d=i(29673),u=i(60132),h=i(72913),p=i(19306),m=i(45603),f=i(78116),g=i(70722),b=i(84767),v=i(29807),y=i(72430),w=i(14773),_=i(42320),k=i(70799),C=i(26049),S=i(37508),x=i(39955),E=i(86068),I=i(52742)},12045:function(e,t,i){"use strict";function o(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return o}})},68345:function(e,t,i){"use strict";function o(e){return Array.isArray(e)}i.d(t,{isArray:function(){return o}})},87612:function(e,t,i){"use strict";function o(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return o}})},59292:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return n},isFastEqual:function(){return r}});var o=i(67462);function n(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,i){"use strict";function o(e){return"function"==typeof e}i.d(t,{isFunction:function(){return o}})},29673:function(e,t,i){"use strict";i.d(t,{isHtmlFromWord:function(){return l}});let o=/\s/,n=/\d/,r=/\w/;function s(e,t){let i=e.indexOf(t);for(;-1!==i;){let r=i+t.length;if(o.test(e.charAt(r))&&n.test(e.charAt(r+1)))return!0;i=e.indexOf(t,r)}return!1}function a(e,t){let i="style="+t,o=e.indexOf(i);for(;-1!==o;){let n=o+i.length,r=e.indexOf(t,n);if(-1===r&&(r=e.length),e.slice(n,r).includes("mso-"))return!0;o=e.indexOf(i,r)}return!1}function l(e){if(e.includes("urn:schemas-microsoft-com:office:word")||e.includes("urn:schemas-microsoft-com:office:excel"))return!0;let t=e.indexOf("<");for(;-1!==t;){if(!r.test(e.charAt(t+1))){t=e.indexOf("<",t+1);continue}let i=e.indexOf(">",t);-1===i&&(i=e.length);let n=e.slice(t,i);if("<meta"===n.slice(0,5).toLowerCase()&&function(e){if(s(e,"Microsoft Word")||s(e,"Microsoft Excel"))return!0;let t=e.toLowerCase(),i=t.indexOf("progid");return -1!==i&&(-1!==t.indexOf("word.",i)||-1!==t.indexOf("excel.",i))||t.includes("libreoffice")||t.includes("openoffice")}(n)||function(e){let t=e.indexOf("class=");for(;-1!==t;){if(t>0&&o.test(e.charAt(t-1))){let i=t+6,o=e.charAt(i);if(('"'===o||"'"===o)&&(i+=1),e.startsWith("Mso",i))return!0}t=e.indexOf("class=",t+6)}return!1}(n))return!0;t=e.indexOf("<",i)}return a(e,"'")||a(e,'"')&&e.includes("<font")}},58487:function(e,t,i){"use strict";var o=i(70799);let n=/[A-Za-z]/,r=/[A-Za-z0-9]/,s=/\w/;function a(e,t){if(!n.test(e.charAt(t)))return"";let i=t+1;for(;r.test(e.charAt(i));)i+=1;return e.slice(t,i)}i.d(t,["isHTML",0,e=>(0,o.isString)(e)&&function(e){let t=new Map,i=e.indexOf("</");for(;-1!==i;){let o=a(e,i+2);""!==o&&">"===e.charAt(i+2+o.length)&&t.set(o,i),i=e.indexOf("</",i+2)}if(0===t.size)return!1;let o=-1;for(i=e.indexOf("<");-1!==i;){let n=a(e,i+1),r=i+1+n.length;if(""!==n&&!s.test(e.charAt(r))){if(o<r&&(o=e.indexOf(">",r)),-1===o)return!1;let i=t.get(n);if(void 0!==i&&i>o)return!0}i=e.indexOf("<",i+1)}return!1}(e)])},60132:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var o=i(2748),n=i(23282),r=i(86068);function s(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&o.Dom.isElement(e.container)}},72913:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var o=i(29807),n=i(70799);function r(e){return(0,n.isString)(e)&&(0,o.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isLicense",0,e=>(0,o.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},78116:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return n}});var o=i(2748);function n(e){return o.Dom.isMarker(e)}},70722:function(e,t,i){"use strict";function o(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return o}})},84767:function(e,t,i){"use strict";function o(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return o}})},29807:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return n}});var o=i(70799);function n(e){if((0,o.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},72430:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return n}});var o=i(52742);function n(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,i){"use strict";function o(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return o}})},42320:function(e,t,i){"use strict";i.d(t,{isSet:function(){return n}});var o=i(23282);function n(e){return!!e&&(0,o.isFunction)(e.has)&&(0,o.isFunction)(e.add)&&(0,o.isFunction)(e.delete)}},70799:function(e,t,i){"use strict";i.d(t,{isString:function(){return n},isStringArray:function(){return r}});var o=i(68345);function n(e){return"string"==typeof e}function r(e){return(0,o.isArray)(e)&&n(e[0])}},26049:function(e,t,i){"use strict";i.d(t,{isURL:function(){return n}});var o=i(82758);function n(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=o.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,i){"use strict";function o(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return o}})},39955:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,i){"use strict";function o(e){return null==e}i.d(t,{isVoid:function(){return o}})},52742:function(e,t,i){"use strict";function o(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return o}})},35278:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),o=parseInt(t[3],10),n=(parseInt(t[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return t[1]+"#"+n}])},32574:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return h}});var o=i(82758),n=i(2748),r=i(76241),s=i(90723),a=i(49055),l=i(29960),c=i(41180),d=i(76078);function u(e){let t=e.split(";"),i=t.length-1;return t.filter((e,t)=>{let o=/^\s*([a-z-]{1,64})\s*:/i.exec(e);if(!o)return!0;let n=o[1].toLowerCase();return!(n.startsWith("mso-")||n.startsWith("border")&&t!==i)}).join(";").replace(/([0-9.]{1,32})(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function h(e){let t=(0,r.indexOfOpenTag)(e,"html");if(-1===t)return e;let i=(e=e.substring(t)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let h=o.globalDocument.createElement("iframe");(0,c.css)(h,"display","none"),n.Dom.append(o.globalDocument.body,h);let p="";try{let t=h.contentDocument||(h.contentWindow?h.contentWindow.document:null);if(t){t.open(),t.write(e),t.close();let i=(0,s.readWordListItems)(t.body);n.Dom.each(t.body,e=>{n.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,l.attr)(e,"style")||"")&&n.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,d.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=u(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!o.IS_PROD)throw e}(0,s.wrapWordListItems)(i),n.Dom.each(t.body,e=>{if(n.Dom.isElement(e)){let t=(0,l.attr)(e,"style");t&&(e.style.cssText=u(t)),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)}}),p=t.firstChild?(0,a.trim)(t.body.innerHTML):""}}catch(e){}finally{n.Dom.safeRemove(h)}return p&&(e=p),(0,a.trim)((0,r.removeWordWrappers)(e))}},53212:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return d}});var o=i(82758),n=i(2748),r=i(4510),s=i(76241),a=i(90723),l=i(49055),c=i(29960);function d(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=o.globalDocument.createElement("div");i.innerHTML=e;let s=[],l=(0,a.readWordListItems)(i);i.firstChild&&n.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,c.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,c.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),n.Dom.safeRemove.apply(null,s),(0,a.wrapWordListItems)(l),t=i.innerHTML}catch(e){}return t&&(e=t),e=e.split(/(\n)/).filter(l.trim).join(`
18
18
  `),(0,s.removeWordWrappers)(e)}},53326:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return n}});var o=i(82758);function n(e){let t=o.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},75275:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return o.applyStyles},cleanFromWord:function(){return n.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},indexOfClosingTag:function(){return c.indexOfClosingTag},indexOfOpenTag:function(){return c.indexOfOpenTag},nl2br:function(){return s.nl2br},removeBetween:function(){return c.removeBetween},removeEmptyMarkedTags:function(){return c.removeEmptyMarkedTags},removeTagsByPrefix:function(){return c.removeTagsByPrefix},removeWordWrappers:function(){return c.removeWordWrappers},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags},unwrapMarkedTags:function(){return c.unwrapMarkedTags}});var o=i(32574),n=i(53212),r=i(53326),s=i(45971),a=i(86518),l=i(91003),c=i(76241)},45971:function(e,t,i){"use strict";function o(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return o}})},86518:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return f}});var o=i(2748),n=i(43555),r=i(29960);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var i;if(!o.Dom.isElement(e)&&!o.Dom.isFragment(e))return;let r=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&o.Dom.up(e.parentNode,a)&&r.push(e)}),r))o.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==o.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&o.Dom.safeRemove(t);let l=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&"NOSCRIPT"===e.nodeName&&l.push(e)}),l))o.Dom.safeRemove(t);let d=null!=(i=t.removeEventAttributes)?i:t.removeOnError,u=e=>{if(o.Dom.isElement(e)&&(d&&c(e),f(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,n.attr)(e,"target"))){let t=((0,n.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,n.attr)(e,"rel",t.join(" "))}};u(e),o.Dom.each(e,u)}function c(e){if(!o.Dom.isElement(e))return!1;let t=!1,i=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&i.push(e.attributes[t].name);for(let o of i)(0,r.attrRaw)(e,o,null),t=!0;return t}let d=["src","data","action","formaction","poster","background","xlink:href"],u=new Set(["animate","set","animatemotion","animatetransform"]),h=["values","from","to","by"],p=new Set(["iframe","frame","object","embed"]);function m(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&p.has(t)}function f(e,{safeJavaScriptLink:t,removeOnError:i,removeEventAttributes:s}={safeJavaScriptLink:!0,removeOnError:!0}){if(!o.Dom.isElement(e))return!1;let a=!1;s&&c(e)&&(a=!0),i&&e.hasAttribute("onerror")&&((0,n.attr)(e,"onerror",null),a=!0);let l=e.nodeName.toLowerCase(),p=(0,n.attr)(e,"href");if(t&&p&&m(p,l)){let t="u">typeof location?location.protocol:"http:";(0,n.attr)(e,"href",t+"//"+p),a=!0}if(t){for(let t of(e.hasAttribute("srcdoc")&&((0,n.attr)(e,"srcdoc",null),a=!0),d)){let i=(0,r.attrRaw)(e,t);i&&m(i,l)&&((0,n.attr)(e,t,null),a=!0)}if(u.has(l))for(let t of h){let i=(0,r.attrRaw)(e,t);i&&i.split(";").some(e=>m(e,"a"))&&((0,n.attr)(e,t,null),a=!0)}}return a}},91003:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,d=null,u=!1){let h=i.createElement("div");(0,n.isString)(t)?h.innerHTML=t:o.Dom.append(h,t);let p=[];o.Dom.each(h,e=>{o.Dom.isElement(e)&&p.push(e)});let m=new Set,f=()=>{let e=i.createTextNode(u?"%%%jodit-single-br%%%":" ");return m.add(e),e};return p.forEach(t=>{if(!t.parentNode)return;if(d&&o.Dom.isTag(t,d)){let n=t.nodeName.toLowerCase(),r=o.Dom.isTag(t,c)?`%%%jodit-single-${n}%%%`:`%%%jodit-${n}%%%${e(t.innerHTML,i,d,u)}%%%/jodit-${n}%%%`;o.Dom.before(t,i.createTextNode(r)),o.Dom.safeRemove(t);return}if(o.Dom.isTag(t,l))return void o.Dom.safeRemove(t);if(!o.Dom.isTag(t,s))return;let n=t.previousSibling;o.Dom.isTag(t,a)&&n&&!m.has(n)&&!(o.Dom.isText(n)&&/\s$/.test(n.nodeValue||""))&&o.Dom.before(t,f());let r=t.nextSibling;!(o.Dom.isText(r)&&/^\s/.test(r.nodeValue||""))&&r&&o.Dom.before(r,f())}),(0,r.trim)(h.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,o)=>`<${t?"/":""}${o}>`)}}});var o=i(2748),n=i(70799),r=i(49055);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr","ul","ol","li"]),a=new Set(["ul","ol"]),l=new Set(["script","style"]),c=new Set(["br","hr","input"])},76241:function(e,t,i){"use strict";i.d(t,{indexOfClosingTag:function(){return a},indexOfOpenTag:function(){return d},removeBetween:function(){return m},removeEmptyMarkedTags:function(){return f},removeTagsByPrefix:function(){return l},removeWordWrappers:function(){return c},unwrapMarkedTags:function(){return h}});let o=/[a-z0-9:-]/i,n=["<html","</html","<col","</col","<o:p","</o:p"];function r(e,t,i){return e.substr(t,i.length).toLowerCase()===i}function s(e,t,i){let o=e.indexOf("<",i);for(;-1!==o;){for(let i of t)if(r(e,o,i))return[o,i];o=e.indexOf("<",o+1)}return[-1,""]}function a(e,t,i){let o="</"+t+">",n=e.indexOf("</",i);for(;-1!==n;){if(r(e,n,o))return n;n=e.indexOf("</",n+2)}return -1}function l(e,t){let i=t.map(e=>e.toLowerCase()),o="",n=0;for(;;){let[t]=s(e,i,n);if(-1===t)break;let r=e.indexOf(">",t);if(-1===r)break;o+=e.slice(n,t),n=r+1}return 0===n?e:o+e.slice(n)}function c(e){return l(l(e,n),["\x3c!--"])}function d(e,t){let i="<"+t.toLowerCase(),o=0;for(;;){let[t]=s(e,[i],o);if(-1===t)return -1;let n=e.charAt(t+i.length);if(">"===n)return t;if(/\s/.test(n)){if(-1===e.indexOf(">",t))return -1;return t}o=t+1}}function u(e,t){let i=t;for(;o.test(e.charAt(i));)i+=1;return e.slice(t,i)}function h(e,t,i,o){let n=i.toLowerCase(),r=[null==t?"<":"<"+t.toLowerCase()],a=function(e){let t=new Map,i=e.indexOf("</");for(;-1!==i;){let o=u(e,i+2).toLowerCase();if(""!==o&&">"===e.charAt(i+2+o.length)){let e=t.get(o);e?e.push(i):t.set(o,[i])}i=e.indexOf("</",i+2)}return t}(e),l="",c=0;for(;;){let[i]=s(e,r,c);if(-1===i)break;let d=(null!=t?t:u(e,i+1)).toLowerCase(),h=e.indexOf(">",i);if(-1===h)break;let p=""!==d&&e.slice(i,h).toLowerCase().includes(n)?function(e,t){if(!e)return -1;let i=0,o=e.length;for(;i<o;){let n=i+o>>1;e[n]<t?i=n+1:o=n}return i<e.length?e[i]:-1}(a.get(d),h+1):-1;if(-1===p){l+=e.slice(c,i+1),c=i+1;continue}let m=e.slice(h+1,p),f=p+d.length+3;l+=e.slice(c,i),l+=""!==m&&(!o||o(m))?m:e.slice(i,f),c=f}return 0===c?e:l+e.slice(c)}function p(e,t,i){let o=t.charAt(0),n=e.indexOf(o,i);for(;-1!==n;){if(r(e,n,t))return n;n=e.indexOf(o,n+1)}return -1}function m(e,t,i,o,n=""){let r=t.toLowerCase(),s=n.toLowerCase(),a="",l=0;for(;;){let n=p(e,r,l);if(-1===n)break;let c=p(e,i,n+t.length);if(-1===c)break;if(""!==s&&!e.slice(n,c).toLowerCase().includes(s)){a+=e.slice(l,c+i.length),l=c+i.length;continue}let d=p(e,o,c+i.length);if(-1===d)break;a+=e.slice(l,n),l=d+o.length}return 0===l?e:a+e.slice(l)}function f(e,t,i){let o=t.toLowerCase(),n=i.toLowerCase(),a="</"+o+">",l="",c=0;for(;;){let[t]=s(e,["<"+o],c);if(-1===t)break;let i=e.indexOf(">",t);if(-1===i)break;if(e.slice(t,i).toLowerCase().includes(n)&&r(e,i+1,a)){l+=e.slice(c,t),c=i+1+a.length;continue}l+=e.slice(c,i+1),c=i+1}return 0===c?e:l+e.slice(c)}},90723:function(e,t,i){"use strict";i.d(t,{readWordListItems:function(){return a},wrapWordListItems:function(){return l}});var o=i(2748),n=i(4510),r=i(29960);let s={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3};function a(e){let t=[];return(0,n.toArray)(e.querySelectorAll("p")).forEach(e=>{let i=/mso-list:\s*l(\d+)\s+level(\d+)(?:\s+lfo(\d+))?/i.exec((0,r.attr)(e,"style")||"");if(!i)return;let a=(0,n.toArray)(e.querySelectorAll("[style]")).find(e=>/mso-list:\s*ignore/i.test((0,r.attr)(e,"style")||""));t.push({paragraph:e,list:`${i[1]}:${i[3]||""}`,level:Number(i[2]),...function(e){let t=e.replace(/\s+/g,""),i=/^\(?(?:\d+\.)*(\d+)[.)]?$/.exec(t);if(i)return{tag:"ol",listStyleType:null,start:Number(i[1])};let o=/^\(?([a-z]+|[A-Z]+)[.)]$/.exec(t);if(o){let e=o[1],t=e.toLowerCase(),i=e!==t;if(/^[ivxlcdm]+$/.test(t)&&(t.length>1||"i"===t))return{tag:"ol",listStyleType:i?"upper-roman":"lower-roman",start:function(e){let t=0;for(let i=0;i<e.length;i+=1){let o=s[e[i]];t+=(s[e[i+1]]||0)>o?-o:o}return t}(t)};if(/^([a-z])\1*$/.test(t))return{tag:"ol",listStyleType:i?"upper-alpha":"lower-alpha",start:(t.length-1)*26+t.charCodeAt(0)-96}}return{tag:"ul",listStyleType:null,start:1}}((null==a?void 0:a.textContent)||"")}),a&&function(e,t){let i=e.parentNode;for(o.Dom.safeRemove(e);i&&i!==t&&o.Dom.isElement(i)&&o.Dom.isEmpty(i);){let e=i.parentNode;o.Dom.safeRemove(i),i=e}}(a,e)}),t}function l(e){let t=[],i=e.map((t,i)=>{var n;return i>0&&(n=e[i-1],o.Dom.findSibling(t.paragraph,!0,e=>!o.Dom.isEmptyTextNode(e)&&!o.Dom.isComment(e))===n.paragraph)});e.forEach((e,s)=>{let{paragraph:a}=e;for(i[s]||(t=[]);t.length&&t[t.length-1].level>e.level;)t.pop();let l=t[t.length-1];l&&l.level===e.level&&l.list!==e.list&&(t.pop(),l=t[t.length-1]);let c=a.ownerDocument;if(!l||l.level<e.level){let i=c.createElement(e.tag);e.listStyleType&&(i.style.listStyleType=e.listStyleType),"ol"===e.tag&&1!==e.start&&(0,r.attr)(i,"start",e.start),l&&l.li?l.li.appendChild(i):o.Dom.before(a,i),l={level:e.level,list:e.list,element:i},t.push(l)}let d=c.createElement("li");(0,n.toArray)(a.attributes).forEach(e=>{"class"!==e.name&&d.setAttribute(e.name,e.value)}),d.style.removeProperty("margin-left"),d.style.removeProperty("text-indent"),(0,r.attr)(d,"style")||(0,r.attr)(d,"style",null),o.Dom.moveContent(a,d),o.Dom.safeRemove(a),l.element.appendChild(d),l.li=d})}},21537:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return u.$$},AnswerError:function(){return u.AnswerError},CamelCaseToKebabCase:function(){return d.CamelCaseToKebabCase},ConfigDeepFlatten:function(){return u.ConfigDeepFlatten},ConfigFlatten:function(){return u.ConfigFlatten},ConfigMerge:function(){return u.ConfigMerge},ConfigProto:function(){return u.ConfigProto},ConnectionError:function(){return u.ConnectionError},LimitedStack:function(){return u.LimitedStack},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},OptionsError:function(){return u.OptionsError},UNSAFE_PROTO_KEYS:function(){return u.UNSAFE_PROTO_KEYS},abort:function(){return u.abort},alignElement:function(){return u.alignElement},alreadyLoadedList:function(){return u.alreadyLoadedList},answer:function(){return u.answer},appendScriptAsync:function(){return u.appendScriptAsync},appendStyleAsync:function(){return u.appendStyleAsync},applyStyles:function(){return a.applyStyles},asArray:function(){return o.asArray},assert:function(){return u.assert},attr:function(){return u.attr},attrRaw:function(){return u.attrRaw},browser:function(){return u.browser},buildQuery:function(){return u.buildQuery},call:function(){return u.call},callPromise:function(){return u.callPromise},callThis:function(){return u.callThis},camelCase:function(){return d.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearAlign:function(){return u.clearAlign},clearCenterAlign:function(){return u.clearCenterAlign},clearHAlign:function(){return u.clearHAlign},clearTimeout:function(){return n.clearTimeout},cns:function(){return u.cns},colorToHex:function(){return s.colorToHex},completeUrl:function(){return u.completeUrl},connection:function(){return u.connection},convertMediaUrlToVideoEmbed:function(){return u.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return u.createMediaWrapper},css:function(){return u.css},cssInline:function(){return u.cssInline},cssPath:function(){return u.cssPath},ctrlKey:function(){return u.ctrlKey},dataBind:function(){return u.dataBind},defaultLanguage:function(){return u.defaultLanguage},error:function(){return u.error},fastClone:function(){return u.fastClone},fuzzySearchIndex:function(){return d.fuzzySearchIndex},get:function(){return u.get},getAlignClasses:function(){return u.getAlignClasses},getAnchorName:function(){return u.getAnchorName},getAnchors:function(){return u.getAnchors},getCaptionWrapper:function(){return u.getCaptionWrapper},getCaptionedImage:function(){return u.getCaptionedImage},getClassName:function(){return u.getClassName},getContentWidth:function(){return c.getContentWidth},getDataTransfer:function(){return u.getDataTransfer},getFixedPositionOffset:function(){return c.getFixedPositionOffset},getHAlign:function(){return u.getHAlign},getImageCaption:function(){return u.getImageCaption},getMediaWrapper:function(){return u.getMediaWrapper},getPropertyDescriptor:function(){return u.getPropertyDescriptor},getScrollParent:function(){return c.getScrollParent},getWrappedMedia:function(){return u.getWrappedMedia},getXPathByElement:function(){return u.getXPathByElement},hAlignElement:function(){return u.hAlignElement},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},humanSizeToBytes:function(){return u.humanSizeToBytes},i18n:function(){return d.i18n},inView:function(){return u.inView},indexOfClosingTag:function(){return a.indexOfClosingTag},indexOfOpenTag:function(){return a.indexOfOpenTag},innerWidth:function(){return c.innerWidth},isAbortError:function(){return r.isAbortError},isAnchor:function(){return u.isAnchor},isArray:function(){return r.isArray},isAtom:function(){return u.isAtom},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isUnsafeProtoKey:function(){return u.isUnsafeProtoKey},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return d.kebabCase},keepNames:function(){return u.keepNames},keys:function(){return u.keys},loadImage:function(){return u.loadImage},loadNext:function(){return u.loadNext},loadNextStyle:function(){return u.loadNextStyle},markAsAtomic:function(){return u.markAsAtomic},markDeprecated:function(){return u.markDeprecated},markOwner:function(){return u.markOwner},memorizeExec:function(){return u.memorizeExec},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return c.offset},options:function(){return u.options},parseQuery:function(){return u.parseQuery},position:function(){return c.position},prepareEmbedCode:function(){return u.prepareEmbedCode},prepareMedia:function(){return u.prepareMedia},previewBox:function(){return u.previewBox},refs:function(){return u.refs},removeBetween:function(){return a.removeBetween},removeEmptyMarkedTags:function(){return a.removeEmptyMarkedTags},removeTagsByPrefix:function(){return a.removeTagsByPrefix},removeWordWrappers:function(){return a.removeWordWrappers},reset:function(){return u.reset},resolveElement:function(){return u.resolveElement},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},scrollIntoViewIfNeeded:function(){return u.scrollIntoViewIfNeeded},set:function(){return u.set},setTimeout:function(){return n.setTimeout},size:function(){return c.size},splitArray:function(){return o.splitArray},sprintf:function(){return d.sprintf},stringify:function(){return d.stringify},stripTags:function(){return a.stripTags},toArray:function(){return o.toArray},trim:function(){return d.trim},trimChars:function(){return d.trimChars},trimInv:function(){return d.trimInv},trimInvEnd:function(){return d.trimInvEnd},ucfirst:function(){return d.ucfirst},unwrapMarkedTags:function(){return a.unwrapMarkedTags},wrapMedia:function(){return u.wrapMedia}});var o=i(76855),n=i(91898),r=i(27613),s=i(35278),a=i(75275),l=i(71521),c=i(56175),d=i(59007),u=i(43555)},71521:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return n.NUMBER_FIELDS_REG},normalizeColor:function(){return o.normalizeColor},normalizeCssNumericValue:function(){return n.normalizeCssNumericValue},normalizeCssValue:function(){return n.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return d.normalizeUrl}});var o=i(21224),n=i(3760),r=i(49033),s=i(12972),a=i(9992),l=i(70091),c=i(46334),d=i(37406)},21224:function(e,t,i){"use strict";var o=i(35278),n=i(49055);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,o.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,n.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},3760:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var o=i(29807),n=i(86068),r=i(35278),s=i(12475);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,n.isVoid)(t)&&a.test(e)&&(0,o.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function c(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,o.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},49033:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var o=i(82758),n=i(49055);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,n.trim)(e.toLowerCase())).map(e=>o.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},12972:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},9992:function(e,t,i){"use strict";var o=i(49055);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,o.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},70091:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},46334:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},37406:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},44506:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},35224:function(e,t,i){"use strict";function o(e){var t,i;let o=null==(t=e.ownerDocument)?void 0:t.defaultView,n=e.parentElement;for(;o&&n;){if(""!==(i=o.getComputedStyle(n)).transform&&"none"!==i.transform||""!==i.perspective&&"none"!==i.perspective||""!==i.filter&&"none"!==i.filter||"transform"===i.willChange||"perspective"===i.willChange||"filter"===i.willChange||"paint"===i.contain||"layout"===i.contain||"strict"===i.contain||"content"===i.contain){let e=n.getBoundingClientRect();return{x:e.left,y:e.top}}n=n.parentElement}let r=null==o?void 0:o.visualViewport;return o&&r&&(r.offsetLeft||r.offsetTop)&&1>Math.abs(r.pageLeft-o.scrollX)&&1>Math.abs(r.pageTop-o.scrollY)?{x:-Math.round(r.offsetLeft),y:-Math.round(r.offsetTop)}:{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return o}})},16442:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=n.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||o.globalDocument.scrollingElement||o.globalDocument.body}}});var o=i(82758),n=i(2748),r=i(43555)},56175:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return o.getContentWidth},getFixedPositionOffset:function(){return n.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return c.position},size:function(){return a.size}});var o=i(44506),n=i(35224),r=i(16442),s=i(81630),a=i(21496),l=i(81284),c=i(5700)},81630:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},21496:function(e,t,i){"use strict";i.d(t,{size:function(){return n}});var o=i(27613);function n(e){return(0,o.isString)(e)||(0,o.isArray)(e)?e.length:(0,o.isPlainObject)(e)?Object.keys(e).length:0}},81284:function(e,t,i){"use strict";let o=(e,t,i,n=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},d=i.defaultView||i.parentWindow,u=d.pageYOffset||c.scrollTop||l.scrollTop,h=d.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,m=c.clientLeft||l.clientLeft||0,f=t.iframe;if(!n&&t&&t.options&&t.o.iframe&&f){let{top:e,left:i}=o(f,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+u-p,a=r.left+h-m;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,o])},5700:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,n=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,c=a.top;if((0,o.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!n){let{left:t,top:o}=e(i.iframe,i,!0);l+=t,c+=o}return{left:Math.round(l),top:Math.round(c),width:Math.round(null!=(r=t.offsetWidth)?r:a.width),height:Math.round(null!=(s=t.offsetHeight)?s:a.height)}}}});var o=i(19306)},87058:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},67477:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return n}});var o=i(82758);function n(e,t,i=0,r=1){let s=0,a,l=-1,c=0,d=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,c++,d=0,-1===l&&(l=a)):s>0&&(d>=r&&t[a]!==o.INVISIBLE_SPACE?(s=0,l=-1,c=0,d=0,a--):(d++,c++)),a++;return s===e.length?[l,c]:[-1,0]}},56967:function(e,t,i){"use strict";i.d(t,{i18n:function(){return c}});var o=i(82758),n=i(70799),r=i(36409),s=i(43555),a=i(6441);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,o=i.exec(e),n=e,r=0;for(;o&&void 0!==t[r];)n=n.replace(o[0],t[r].toString()),r+=1,o=i.exec(e);return n};function c(e,t,i){if(!(0,n.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!(null==i?void 0:i.debugLanguage),d={},u=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(null==i?void 0:i.language,h),m=t=>{if(!t)return;if((0,n.isString)(t[e]))return u(t[e]);let i=e.toLowerCase();if((0,n.isString)(t[i]))return u(t[i]);let o=(0,r.ucfirst)(e);if((0,n.isString)(t[o]))return u(t[o])};void 0!==o.lang[p]?d=o.lang[p]:c||(d=void 0!==o.lang[h]?o.lang[h]:o.lang.en);let f=null==i?void 0:i.i18n;if(f&&f[p]){let e=m(f[p]);if(e)return e}return m(d)||(!c&&o.lang.en&&(0,n.isString)(o.lang.en[e])&&o.lang.en[e]?u(o.lang.en[e]):c?"{"+e+"}":(o.IS_PROD,u(e)))}i.d(t,["sprintf",0,l])},59007:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return o.camelCase},fuzzySearchIndex:function(){return n.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},trimInvEnd:function(){return l.trimInvEnd},ucfirst:function(){return c.ucfirst}});var o=i(87058),n=i(67477),r=i(56967),s=i(12475),a=i(67462),l=i(49055),c=i(36409)},12475:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},67462:function(e,t,i){"use strict";function o(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),n=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(n.get(t))return"[refObject]";n.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return o}})},49055:function(e,t,i){"use strict";i.d(t,{trim:function(){return s},trimChars:function(){return a},trimInv:function(){return l},trimInvEnd:function(){return c}});let o=/[\s\u200b]/,n=/\uFEFF/;function r(e,t){let i=0,o=e.length;for(;i<o&&t.test(e.charAt(i));)i+=1;for(;o>i&&t.test(e.charAt(o-1));)o-=1;return 0===i&&o===e.length?e:e.slice(i,o)}function s(e){return r(e,o)}function a(e,t){return r(e,RegExp(`[${t}]`))}function l(e){return r(e,n)}function c(e){let t=e.length;for(;t>0&&n.test(e.charAt(t-1));)t-=1;return t===e.length?e:e.slice(0,t)}},36409:function(e,t,i){"use strict";function o(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return o}})},25726:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return g},clearAlign:function(){return m},clearHAlign:function(){return h},getAlignClasses:function(){return d},getHAlign:function(){return p},hAlignElement:function(){return u}});var o=i(22732),n=i(68345),r=i(29960),s=i(41180),a=i(68645),l=i(61477);let c=e=>((0,n.isArray)(e)?e:[null!=e?e:""]).map(e=>e.split(/\s+/).filter(Boolean)).filter(e=>e.length);function d(e,t){var i,n,r;if(!t)return null;let s=o.Dom.isTag(t,new Set(["jodit","jodit-media"]))?t.firstElementChild:null!=(i=(0,l.getWrappedMedia)(e,t))?i:(0,a.getCaptionedImage)(e,t);return null!=(r=null==(n=e.o.alignClasses)?void 0:n[(null!=s?s:t).nodeName.toLowerCase()])?r:null}function u(e,t,i){var o;if(i){h(e,i),e.classList.add(...null!=(o=c(i[t||"normal"])[0])?o:[]);return}t&&"normal"!==t?"center"!==t?((0,s.css)(e,"float",t),(0,s.clearCenterAlign)(e)):(0,s.css)(e,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,s.css)(e,"float")&&-1!==["right","left"].indexOf((0,s.css)(e,"float").toString().toLowerCase())&&(0,s.css)(e,"float",""),(0,s.clearCenterAlign)(e))}function h(e,t){u(e,"normal"),t&&Object.values(t).forEach(t=>c(t).forEach(t=>e.classList.remove(...t))),["class","style"].forEach(t=>{var i;(null==(i=(0,r.attr)(e,t))?void 0:i.trim())||(0,r.attr)(e,t,null)})}function p(e,t){if(t){for(let i of["left","right","center","normal"])if(c(t[i]).some(t=>t.every(t=>e.classList.contains(t))))return i}let i=(0,s.cssInline)(e,"float").toLowerCase();return"left"===i||"right"===i?i:"block"===(0,s.css)(e,"display")&&"auto"===(0,s.cssInline)(e,"margin-left")&&"auto"===(0,s.cssInline)(e,"margin-right")?"center":"normal"}function m(e){o.Dom.each(e,e=>{o.Dom.isHTMLElement(e)&&(0,s.cssInline)(e,"textAlign")&&((0,s.css)(e,"textAlign",""),((0,r.attr)(e,"style")||"").trim().length||(0,r.attr)(e,"style",null))})}let f=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function g(e,t){if(o.Dom.isNode(t)&&o.Dom.isElement(t)){m(t);let i=f.get(e.toLowerCase());i&&(0,s.css)(t,"textAlign",i)}}},70442:function(e,t,i){"use strict";i.d(t,{getAnchorName:function(){return r},getAnchors:function(){return a},isAnchor:function(){return s}});var o=i(2748),n=i(4510);function r(e){return e.id||e.getAttribute("name")||""}function s(e){return o.Dom.isTag(e,"a")&&!e.hasAttribute("href")&&!e.hasChildNodes()&&""!==r(e)}function a(e){return(0,n.toArray)(e.querySelectorAll("a")).filter(s)}},63799:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?c(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?d(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}}});var o=i(2748),n=i(70799),r=i(29960),s=i(66292);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let o=e(t,i);return a.set(i,o),o},c=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",n).one(a,"load",i),o.Dom.append(e.od.body,a)})),d=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",n),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?o.Dom.append(e.o.shadowRoot,a):o.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,c,"appendStyleAsync",0,d])},38837:function(e,t,i){"use strict";i.d(t,{assert:function(){return n}});class o extends Error{constructor(e){super(e),this.name="AssertionError"}}function n(e,t){if(!e)throw new o("Assertion failed: "+t)}},29960:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,o.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(o=>{let r=i[o];(0,n.isPlainObject)(r)&&"style"===o?(0,a.css)(t,r):("className"===o&&(o="class"),e(t,o,r))}),null;let c=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(c)){let i=e(t,"data"+c);if(i)return i;c=c.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(c)&&t.removeAttribute(c);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===c||"height"===c)&&(e=e.replace("px","")),t.setAttribute(c,e),e}return t.getAttribute(c)}},attrRaw:function(){return l}});var o=i(23282),n=i(72430),r=i(70799),s=i(12475),a=i(41180);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},97639:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},44710:function(e,t,i){"use strict";var o=i(72430);let n=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,o.isPlainObject)(l)?n(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,n])},66292:function(e,t,i){"use strict";var o=i(82758);i.d(t,["completeUrl",0,e=>("file:"===o.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},68934:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,d.keys)(t,!1).reduce((i,o)=>(i[o]=(0,n.isPlainObject)(t[o])?e(t[o]):t[o],i),{})}},ConfigFlatten:function(){return u},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(o=>{if((0,c.isUnsafeProtoKey)(o))return;let r=i[o],s=t[o];(0,n.isPlainObject)(r)&&(0,n.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[o]=r})}},ConfigProto:function(){return function e(t,i,d=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let u=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==u.presets[t.preset]){let e=u.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,c.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,n.isPlainObject)(s)&&(0,n.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,d+1);return}if(0!==d&&(0,o.isArray)(s)&&!(0,l.isAtom)(s)&&(0,o.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var o=i(68345),n=i(72430),r=i(70799),s=i(86068),a=i(6441),l=i(97735),c=i(69175),d=i(37790);function u(e){return(0,d.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},55877:function(e,t,i){"use strict";var o=i(82758),n=i(26049),r=i(82501);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,n.isURL)(e))return e;let s=o.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let o=s.pathname.split("/").filter(Boolean),n=o.findIndex(e=>/^\d+$/.test(e));if(-1===n)return e;let r=o[n],l=o[n+1];return l&&0===n&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let o=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(o=o.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+o+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},41180:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return c}});var o=i(87612),n=i(72430),r=i(3760),s=i(87058),a=i(12475);function l(e,t,i,c=!1){if((0,o.isBoolean)(i)&&(c=i,i=void 0),(0,n.isPlainObject)(t)||void 0!==i){let o=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,n.isPlainObject)(t)){let i=Object.keys(t);for(let n=0;n<i.length;n+=1)o(e,(0,s.camelCase)(i[n]),t[i[n]])}else o(e,(0,s.camelCase)(t),i);return""}let d=(0,a.kebabCase)(t),u=e.ownerDocument||document,h=!!u&&(u.defaultView||u.parentWindow),p=e.style[t],m="";return void 0!==p&&""!==p?m=p:h&&!c&&(m=h.getComputedStyle(e).getPropertyValue(d)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(m.toString())&&(m=parseInt(m.toString(),10)),(0,r.normalizeCssValue)(t,m)}function c(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},15456:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}])},86583:function(e,t,i){"use strict";var o=i(39955);let n=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=n.get(e);if(!r){r={},n.set(e,r);let t=null;(0,o.isViewObject)(e.j)&&(t=e.j.e),(0,o.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{n.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},96325:function(e,t,i){"use strict";var o=i(82758),n=i(70799);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,n.isString)(e)?e:o.globalDocument.documentElement&&o.globalDocument.documentElement.lang?o.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},82760:function(e,t,i){"use strict";i.d(t,{answer:function(){return a},connection:function(){return r},error:function(){return n},options:function(){return s}});var o=i(32880);function n(e){return TypeError(e)}function r(e){return new o.ConnectionError(e)}function s(e){return new o.OptionsError(e)}function a(e,t,i){return new o.AnswerError(e,t,i)}},93661:function(e,t,i){"use strict";function o(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return o}})},5311:function(e,t,i){"use strict";i.d(t,{AnswerError:function(){return o}});class o extends Error{constructor(e,t,i){super(e),this.answer=t,this.code=i,Object.setPrototypeOf(this,o.prototype)}}},86397:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o}});class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},32880:function(e,t,i){"use strict";i.d(t,{AnswerError:function(){return n.AnswerError},ConnectionError:function(){return r.ConnectionError},OptionsError:function(){return s.OptionsError},abort:function(){return o.abort}});var o=i(93661),n=i(5311),r=i(86397),s=i(57865)},57865:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return o}});class o extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},89890:function(e,t,i){"use strict";i.d(t,{AnswerError:function(){return n.AnswerError},ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return n.OptionsError},abort:function(){return n.abort},answer:function(){return o.answer},connection:function(){return o.connection},error:function(){return o.error},options:function(){return o.options}});var o=i(82760),n=i(32880)},97735:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return n},markAsAtomic:function(){return r}});var o=i(67462);function n(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,o.stringify)(e))}},80568:function(e,t,i){"use strict";var o=i(23282);let n=new Map;i.d(t,["getClassName",0,e=>{var t;if((0,o.isFunction)(e.className))return e.className();let i=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(n.has(i))return n.get(i);if(i.name)return i.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=i.toString().match(r);return s?s[1]:""},"keepNames",0,n])},94643:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var o=i(70799),n=i(86068);function r(e,t){if(!(0,o.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,n.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,n.isVoid)(r)?null:r}},38420:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],o=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?o*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},68645:function(e,t,i){"use strict";i.d(t,{getCaptionWrapper:function(){return l},getCaptionedImage:function(){return a},getImageCaption:function(){return s}});var o=i(2748),n=i(4510);let r=(e,t)=>o.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&(!t.className||e.classList.contains(t.className));function s(e,t){var i;let o=e.o.imageCaption;return o&&r(t,o.wrapper)&&null!=(i=(0,n.toArray)(t.getElementsByTagName(o.caption.tag)).find(e=>r(e,o.caption)))?i:null}function a(e,t){let i=s(e,t);if(!i)return null;let o=t.getElementsByTagName("img");return 1!==o.length||i.contains(o[0])?null:o[0]}function l(e,t){return o.Dom.closest(t,t=>!!a(e,t),e.editor)}},43555:function(e,t,i){"use strict";i.d(t,{$$:function(){return A.$$},AnswerError:function(){return b.AnswerError},ConfigDeepFlatten:function(){return u.ConfigDeepFlatten},ConfigFlatten:function(){return u.ConfigFlatten},ConfigMerge:function(){return u.ConfigMerge},ConfigProto:function(){return u.ConfigProto},ConnectionError:function(){return b.ConnectionError},LimitedStack:function(){return M.LimitedStack},OptionsError:function(){return b.OptionsError},UNSAFE_PROTO_KEYS:function(){return C.UNSAFE_PROTO_KEYS},abort:function(){return b.abort},alignElement:function(){return o.alignElement},alreadyLoadedList:function(){return r.alreadyLoadedList},answer:function(){return b.answer},appendScriptAsync:function(){return r.appendScriptAsync},appendStyleAsync:function(){return r.appendStyleAsync},assert:function(){return s.assert},attr:function(){return a.attr},attrRaw:function(){return a.attrRaw},browser:function(){return l.browser},buildQuery:function(){return c.buildQuery},call:function(){return L.call},callPromise:function(){return L.callPromise},callThis:function(){return L.callThis},clearAlign:function(){return o.clearAlign},clearCenterAlign:function(){return p.clearCenterAlign},clearHAlign:function(){return o.clearHAlign},cns:function(){return S.cns},completeUrl:function(){return d.completeUrl},connection:function(){return b.connection},convertMediaUrlToVideoEmbed:function(){return h.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return x.createMediaWrapper},css:function(){return p.css},cssInline:function(){return p.cssInline},cssPath:function(){return A.cssPath},ctrlKey:function(){return m.ctrlKey},dataBind:function(){return f.dataBind},defaultLanguage:function(){return g.defaultLanguage},error:function(){return b.error},fastClone:function(){return v.fastClone},get:function(){return y.get},getAlignClasses:function(){return o.getAlignClasses},getAnchorName:function(){return n.getAnchorName},getAnchors:function(){return n.getAnchors},getCaptionWrapper:function(){return k.getCaptionWrapper},getCaptionedImage:function(){return k.getCaptionedImage},getClassName:function(){return w.getClassName},getDataTransfer:function(){return L.getDataTransfer},getHAlign:function(){return o.getHAlign},getImageCaption:function(){return k.getImageCaption},getMediaWrapper:function(){return x.getMediaWrapper},getPropertyDescriptor:function(){return L.getPropertyDescriptor},getWrappedMedia:function(){return x.getWrappedMedia},getXPathByElement:function(){return A.getXPathByElement},hAlignElement:function(){return o.hAlignElement},humanSizeToBytes:function(){return _.humanSizeToBytes},inView:function(){return D.inView},isAnchor:function(){return n.isAnchor},isAtom:function(){return v.isAtom},isUnsafeProtoKey:function(){return C.isUnsafeProtoKey},keepNames:function(){return w.keepNames},keys:function(){return L.keys},loadImage:function(){return L.loadImage},loadNext:function(){return r.loadNext},loadNextStyle:function(){return r.loadNextStyle},markAsAtomic:function(){return v.markAsAtomic},markDeprecated:function(){return S.markDeprecated},markOwner:function(){return L.markOwner},memorizeExec:function(){return L.memorizeExec},options:function(){return b.options},parseQuery:function(){return E.parseQuery},prepareEmbedCode:function(){return I.prepareEmbedCode},prepareMedia:function(){return I.prepareMedia},previewBox:function(){return T.previewBox},refs:function(){return A.refs},reset:function(){return j.reset},resolveElement:function(){return A.resolveElement},scrollIntoViewIfNeeded:function(){return D.scrollIntoViewIfNeeded},set:function(){return P.set},wrapMedia:function(){return x.wrapMedia}});var o=i(25726),n=i(70442),r=i(63799),s=i(38837),a=i(29960),l=i(97639),c=i(44710),d=i(66292),u=i(68934),h=i(55877),p=i(41180),m=i(15456),f=i(86583),g=i(96325),b=i(89890),v=i(97735),y=i(94643),w=i(80568),_=i(38420),k=i(68645),C=i(69175),S=i(95942),x=i(61477),E=i(82501),I=i(96437),T=i(11628),j=i(58844),D=i(26395),A=i(76078),P=i(3703),M=i(50535),L=i(37790)},69175:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return n}});let o=["__proto__","constructor","prototype"];function n(e){return -1!==o.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,o])},95942:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return n}});let o=console;function n(e,t=[""],i=null){return(...n)=>(o.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...n))}i.d(t,["cns",0,o])},61477:function(e,t,i){"use strict";i.d(t,{createMediaWrapper:function(){return a},getMediaWrapper:function(){return s},getWrappedMedia:function(){return r},wrapMedia:function(){return l}});var o=i(2748);let n=(e,t)=>o.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&e.classList.contains(t.className);function r(e,t){var i;for(let[o,r]of Object.entries(null!=(i=e.o.mediaWrappers)?i:{}))if(n(t,r)){let e=t.querySelector(o);if(e)return e}return null}function s(e,t){return o.Dom.closest(t,t=>!!r(e,t),e.editor)}function a(e,t){var i;let o=null==(i=e.o.mediaWrappers)?void 0:i[t.toLowerCase()];return o?e.createInside.element(o.tag,{class:o.className,contenteditable:!1,draggable:!0}):null}function l(e,t){let i=a(e,t.nodeName);return i?(t.parentNode&&o.Dom.before(t,i),o.Dom.append(i,t),i):t}},82501:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let o=i[e].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return t}])},96437:function(e,t,i){"use strict";i.d(t,{prepareEmbedCode:function(){return s},prepareMedia:function(){return r}});var o=i(25726),n=i(61477);function r(e,t){let i=(0,n.wrapMedia)(e,t),{mediaDefaultAlign:r}=e.o;return r&&"normal"!==r&&(0,o.hAlignElement)(i,r,(0,o.getAlignClasses)(e,i)),i}function s(e,t){let i=e.createInside.div();i.innerHTML=t.trim();let o=i.firstElementChild;return o&&1===i.childNodes.length?r(e,o):t}},11628:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var o=i(2748),n=i(70799),r=i(29960),s=i(41180);function a(e,t,i="px",l=null){let c=[],d=function(e,t){let i=[],n=[];o.Dom.each(e.editor,e=>{o.Dom.isTag(e,"img")&&n.push(e)});try{n.forEach(n=>{let s=[(0,r.attr)(n,"width"),(0,r.attr)(n,"height"),(0,r.attr)(n,"src")];(0,r.attr)(n,{width:n.offsetWidth+t,height:n.offsetHeight+t});let a=e.createInside.a();o.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(n,"src")||""),(0,r.attr)(n,"src",a.href),o.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(n,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let d=e.c.div("jodit__preview-box jodit-context");l&&o.Dom.append(l,d),(0,s.css)(d,{position:"relative",padding:16});let u=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),o.Dom.append(d,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),d=i.document.body,"function"==typeof ResizeObserver)){let o=!1,n=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(n),(0,s.css)(t,"height",n.offsetHeight+20),e.async.requestAnimationFrame(()=>{o||r.observe(n)})},100)),a=()=>{o=!0,r.unobserve(n),r.disconnect(),e.e.off("beforeDestruct",a)};c.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(d,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,n.isString)(i)?e.c.div():i;(0,n.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(o.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||o.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{o.Dom.append(t,e)}catch(e){}}else try{o.Dom.append(t,i.cloneNode(!0))}catch(e){}}};return h(d,u),e.e.fire("afterPreviewBox",d),[d,()=>{c.forEach(e=>e())}]}finally{d.forEach(e=>e())}}},58844:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var o=i(82758),n=i(23282),r=i(94643);let s={};function a(e){var t,i;if(!(e in s)){let i=o.globalDocument.createElement("iframe");try{if(i.src="about:blank",o.globalDocument.body.appendChild(i),!i.contentWindow)return null;let t=(0,r.get)(e,i.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),i.contentWindow);(0,n.isFunction)(t)&&(s[e]=t.bind(a))}catch(e){if(!o.IS_PROD)throw e}finally{null==(t=i.parentNode)||t.removeChild(i)}}return null!=(i=s[e])?i:null}},26395:function(e,t,i){"use strict";i.d(t,{inView:function(){return n},scrollIntoViewIfNeeded:function(){return r}});var o=i(2748);function n(e,t,i){var o;let n=e.getBoundingClientRect(),r=e,s=n.top,a=n.height;for(;r&&r!==t&&r.parentNode;)if(s+a>(n=(r=r.parentNode).getBoundingClientRect()).bottom+1&&s>n.top||s+a<=n.top)return!1;let l=i.documentElement&&i.documentElement.clientHeight||0,c=null==(o=i.defaultView)?void 0:o.getComputedStyle(i.documentElement),d=(e="")=>e.endsWith("%")?parseFloat(e)*l/100:parseFloat(e)||0,u=d(null==c?void 0:c.scrollPaddingTop);return(s+a<=l-d(null==c?void 0:c.scrollPaddingBottom)+1||u>=s)&&s+a>=u}function r(e,t,i){if(o.Dom.isHTMLElement(e)&&!n(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}n(e,t,i)||e.scrollIntoView({block:"nearest"})}}},76078:function(e,t,i){"use strict";i.d(t,{$$:function(){return u},resolveElement:function(){return p}});var o=i(82758),n=i(2748),r=i(4510),s=i(70799),a=i(87058),l=i(29960),c=i(89890);let d=1;function u(e,t){let i;if(!o.IS_ES_NEXT&&/:scope/.test(e)&&o.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let o=t.id,n=o||"_selector_id_"+(Math.random()+"").slice(2)+ ++d;e=e.replace(/:scope/g,"#"+n),o||t.setAttribute("id",n),i=t.parentNode.querySelectorAll(e),o||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch(t){throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!n.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!n.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,o=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&o++;while(t)e+=":nth-of-type("+o+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return n.Dom.each(e,e=>{if(n.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},3703:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var o=i(68345),n=i(29807),r=i(72430),s=i(70799),a=i(69175);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let c=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,o.isArray)(c[t])||(0,r.isPlainObject)(c[t])||(c[t]=(0,n.isNumeric)(l[e+1])?[]:{}),c=c[t]}c&&(c[l[l.length-1]]=t)}},50535:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){this.limit=e,this.stack=[]}}},37790:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return d},callThis:function(){return l},getPropertyDescriptor:function(){return u},markOwner:function(){return c}});var o=i(14773),n=i(86068),r=i(29960),s=i(86583);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function c(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function d(e,t){return(0,o.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function u(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e)return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch(e){return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,o)=>{let n=new Image,r=()=>{t.e.off(n),null==o||o()},s=()=>{t.e.off(n),i(n)};t.e.one(n,"load",s).one(n,"error",r).one(n,"abort",r),n.src=e,n.complete&&s()}),"memorizeExec",0,(e,t,{control:i},o)=>{var r;let a="button"+i.command,l=null!=(r=i.args&&i.args[0])?r:(0,s.dataBind)(e,a);if((0,n.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),o&&(l=o(l)),e.execCommand(i.command,!1,null!=l?l:void 0)}])},31359:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var o=i(82758),n=i(60132),r=i(14041);function s(e,t,i,s,a,l,c){if((0,n.isInitable)(s))try{s.init(e)}catch(e){if(!o.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{o.IS_PROD}),s.styles&&(c(e,t,"style").innerHTML=s.styles)}},14041:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return d},loadStyle:function(){return l}});var o=i(82758),n=i(12475),r=i(63799),s=i(89672);let a=new Set;async function l(e,t){let i=c(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function c(e,t,i){t=(0,n.kebabCase)(t);let o=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+o+"."+(i?"js":"css")}function d(e,t,i,n){try{let o=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));o.length&&o.map(e=>{let i=e.url||c(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(n).catch(()=>null)})}catch(e){if(!o.IS_PROD)throw e}}},48591:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var o=i(82758),n=i(23282);function r(e,t){try{try{return(0,n.isFunction)(t)?new t(e):t}catch(i){if((0,n.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!o.IS_PROD)throw e}return null}},89672:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return n}});var o=i(12475);function n(e){return(0,o.kebabCase)(e).toLowerCase()}},50911:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return o.Plugin}});var o=i(20356);i(41876)},41876:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return p}});var o=i(82758),n=i(57012),r=i(46559),s=i(68345),a=i(60132),l=i(70799),c=i(31359),d=i(14041),u=i(48591),h=i(89672);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,h.normalizeName)(e),t),n.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,h.normalizeName)(e))}remove(e){this.__items.delete((0,h.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,o)=>{(!e||e.has(o))&&t.push([o,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,l.isString)(e)?{name:e}:e),disableList:new Set((0,r.splitArray)(e.o.disablePlugins).map(h.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},p=new Map,m={},f=new Set;e.__plugins=m;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([o,n])=>{if(i.has(o)||p.has(o))return;let r=null==n?void 0:n.requires;if(r&&(0,s.isArray)(r)&&r.length){if(r.some(e=>i.has(e)))return;if(!r.every(e=>p.has(e)))return void f.add(o)}t=!0;let a=(0,u.makeInstance)(e,n);if(!a){p.set(o,null),f.delete(o);return}(0,c.init)(e,o,n,a,p,f,this.opts.getContainer),m[o]=a}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(m).forEach(t=>{let i=m[t];(0,a.isDestructable)(i)&&i.destruct(e),delete m[t]}),delete e.__plugins}),o.IS_PROD||f.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),n.eventEmitter.off(`plugin:${e}:ready`,i)};n.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){this.opts=e,this.__items=new Map}}},20356:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return a}});var o=i(91907),n=i(65478),r=i(19306),s=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class a extends o.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,r.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(o.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){var e;if(this.isInDestruct)return;let{j:t}=this;if(t.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(o.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,r.isJoditObject)(t)&&(null==(e=this.buttons)||e.forEach(e=>{null==t||t.unregisterButton(e)})),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),this.buttons=[],this.hasStyle=!1,this.__inited=!1,e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}a.requires=[],s([n.autobind],a.prototype,"__afterPluginSystemInit",null),s([n.autobind],a.prototype,"__afterInit",null),s([n.autobind],a.prototype,"__beforeDestruct",null)},54079:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return d}});var o=i(8884),n=i(82758),r=i(45219),s=i(21537),a=i(89890),l=i(6441);i(57459);var c=i(98582);class d{className(){return"Ajax"}__buildParams(e,t){return(0,s.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,s.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,s.isString)(e)||e instanceof n.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,s.isFunction)(e.append)?e:(0,s.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch(e){}return this}__hasAnswerEnvelope(){let{xhr:e}=this;if(e.responseType&&"text"!==e.responseType)return!1;let t=e.responseText;if(!t||"{"!==t[0])return!1;try{let e=JSON.parse(t);return(0,s.isPlainObject)(e)&&"success"in e}catch(e){return!1}}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(o,n)=>{var r;let l=()=>{this.__isFulfilled=!0,n(a.connection("Connection error"))},d=()=>{this.__isFulfilled=!0,o(new c.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=d,e.onabort=()=>{this.__isFulfilled=!0,n(a.abort("Abort connection"))},e.onerror=l,e.ontimeout=l,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,i;let o=0;e.lengthComputable&&(o=e.loaded/e.total*100),null==(i=(t=this.options).onProgress)||i.call(t,o)},e.onreadystatechange=()=>{var i,o;null==(o=(i=this.options).onProgress)||o.call(i,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)||this.__hasAnswerEnvelope()?d():e.statusText&&(this.__isFulfilled=!0,n(a.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:u,data:h,method:p}=i;e.open(p,u,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:m}=t;(0,s.isFunction)(m)&&(m=await m.call(this)),m&&e.setRequestHeader&&Object.keys(m).forEach(t=>{e.setRequestHeader(t,m[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)})}async *stream(){var e;this.__activated=!0;let{xhr:t,o:i}=this,o=this.prepareRequest(),n=0,r="",l=[],c=null,d=!1,u=null,h=()=>{if(c){let e=c;c=null,e()}},p=e=>{var i;let o=t.responseText;r+=o.substring(n),n=o.length;let s=r.split(`
19
19
 
20
20
  `);for(let t of(r=e?"":null!=(i=s.pop())?i:"",s)){let e=t.trim();if(!e)continue;let i=[];for(let t of e.split(`
@@ -43,7 +43,7 @@
43
43
  <div class="${t("footer")}"></div>
44
44
  <div class="${t("resizer")}">${m.Icon.get("resize_handler")}</div>
45
45
  </div>
46
- </div>`),"rtl"===this.options.direction&&((0,h.css)(this.container,"direction","rtl"),(0,h.attr)(this.container,"dir","rtl")),this.o.zIndex&&(0,h.css)(this.container,"zIndex",this.o.zIndex.toString()),(0,h.attr)(this.container,"role","dialog"),Object.defineProperty(this.container,"component",{value:this}),this.setMod("theme",this.o.theme||"default").setMod("resizable",!!this.o.resizable);let i=this.getElm("panel");(0,p.assert)(null!=i,"Panel element does not exist");let n=this.getElm("resizer");(0,p.assert)(null!=n,"Resizer element does not exist");let r=this.getElm("header-title");(0,p.assert)(null!=r,"header-title element does not exist");let s=this.getElm("content");(0,p.assert)(null!=s,"Content element does not exist");let c=this.getElm("footer");(0,p.assert)(null!=c,"Footer element does not exist");let u=this.getElm("header-toolbar");(0,p.assert)(null!=u,"header-toolbar element does not exist"),this.dialog=i,this.resizer=n,this.dialogbox_header=r,this.dialogbox_content=s,this.dialogbox_footer=c,this.dialogbox_toolbar=u,(0,h.css)(this.dialog,{maxWidth:this.options.maxWidth,minHeight:this.options.minHeight,minWidth:this.options.minWidth});let f=this.getElm("header");f&&this.e.on(f,"pointerdown touchstart",this.__onHeaderMouseDown),this.e.on(this.resizer,"mousedown touchstart",this.__onResizerMouseDown);let g=l.pluginSystem.get("fullsize");if((0,d.isFunction)(g)&&g(this),this.e.on(this.container,"close_dialog",this.close).on(this.ow,"keydown",this.__onEsc).on(this.ow,"resize",this.__onResize),this.o.closeOnClickOverlay){let e=this.getElm("overlay");(0,p.assert)(null!=e,"Overlay element does not exist"),this.e.on(e,"click",this.close)}}};w.__opened=new Set,w.defaultOptions={...f.View.defaultOptions,closeOnClickOverlay:!1,closeOnEsc:!0},v([s.autobind],w.prototype,"__onMouseUp",null),v([s.autobind],w.prototype,"__onHeaderMouseDown",null),v([s.autobind],w.prototype,"__onMouseMove",null),v([s.autobind],w.prototype,"__onEsc",null),v([s.autobind],w.prototype,"__onResizerMouseDown",null),v([s.autobind],w.prototype,"close",null),v([(0,s.hook)("ready")],w.prototype,"buildToolbar",null),w=o=v([s.component],w)},638:function(e,t,i){"use strict";i.d(t,{Alert:function(){return o.Alert},Confirm:function(){return n.Confirm},Dialog:function(){return r.Dialog},Prompt:function(){return s.Prompt}});var o=i(71568),n=i(26866),r=i(78584),s=i(36806)},36806:function(e,t,i){"use strict";i.d(t,{Prompt:function(){return l}});var o=i(2748),n=i(23282),r=i(29960),s=i(10830),a=i(78584);function l(e,t,i,l,c){let d=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),u=(0,s.Button)(d,"cancel","Cancel"),h=(0,s.Button)(d,"ok","Ok"),p=d.c.element("form",{class:"jodit-dialog_prompt"}),m=d.c.element("input",{autofocus:!0,class:"jodit-input"}),f=d.c.element("label");(0,n.isFunction)(t)&&(i=t,t=void 0),l&&(0,r.attr)(m,"placeholder",l),o.Dom.append(f,d.c.text(e)),o.Dom.append(p,f),o.Dom.append(p,m),u.onAction(d.close);let g=()=>{i&&(0,n.isFunction)(i)&&!1===i(m.value)||d.close()};return h.onAction(g),d.e.on(p,"submit",()=>(g(),!1)),d.setFooter([h,u]),d.open(p,t||"&nbsp;",!0,!0),m.focus(),void 0!==c&&c.length&&(m.value=c,m.select()),d}},41457:function(e,t,i){"use strict";var o=i(22732),n=i(29960),r=i(89890),s=i(12153),a=i(32118),l=i(21735),c=i(63399),d=i(44450),u=i(20201),h=i(50050);let p="jodit-file-browser-preview",m=(e="next",t="right")=>`<div class="${p}__navigation ${p}__navigation_arrow_${e}">`+s.Icon.get("angle-"+t)+"</a>";t.default=e=>{if(!e.o.contextMenu)return()=>{};let t=(0,c.makeContextMenu)(e);return i=>{let s=(0,l.getItem)(i.target,e.container);if(!s)return;let c=s,f=e.options,g=e=>(0,n.attr)(c,e)||"";return e.async.setTimeout(()=>{let b=(0,l.elementToItem)(s,(0,a.elementsMap)(e));b&&(e.state.activeElements=[b],t.show(i.clientX,i.clientY,[!!("1"!==g("data-is-file")&&f.editImage&&(e.dataProvider.canI("ImageResize")||e.dataProvider.canI("ImageCrop")))&&{icon:"pencil",title:"Edit",exec:()=>h.openImageEditor.call(e,g("href"),g("data-name"),g("data-path"),g("data-source"))},!!e.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",exec(){e.e.fire("fileRename.filebrowser",g("data-name"),g("data-path"),g("data-source"))}},!!e.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",async exec(){try{await (0,d.deleteFile)(e,g("data-name"),g("data-source"))}catch(t){return e.status(t)}return e.state.activeElements=[],(0,u.loadTree)(e).catch(e.status)}},!!f.preview&&{icon:"eye",title:"Preview",exec(){let t=e.dlg({buttons:["fullsize","dialog.close"]}),i=e.c.div(p,'<div class="jodit-icon_loader"></div>'),s=e.c.div(p+"__box"),a=e.c.fromHTML(m()),l=e.c.fromHTML(m("prev","left")),d=r=>{let d=e.c.element("img");(0,n.attr)(d,"src",r);let u=()=>{var n;e.isInDestruct||(e.e.off(d,"load"),o.Dom.detach(i),f.showPreviewNavigation&&(o.Dom.prevWithClass(c,e.files.getFullElName("item"))&&o.Dom.append(i,l),o.Dom.nextWithClass(c,e.files.getFullElName("item"))&&o.Dom.append(i,a)),o.Dom.append(i,s),o.Dom.append(s,d),t.setPosition(),null==(n=null==e?void 0:e.events)||n.fire("previewOpenedAndLoaded"))};e.e.on(d,"load",u),d.complete&&u()};e.e.on([a,l],"click",function(){if(!(c=this===a?o.Dom.nextWithClass(c,e.files.getFullElName("item")):o.Dom.prevWithClass(c,e.files.getFullElName("item"))))throw(0,r.error)("Need element");o.Dom.detach(i),o.Dom.detach(s),i.innerHTML='<div class="jodit-icon_loader"></div>',d(g("href"))}),e.e.on("beforeDestruct",()=>{t.destruct()}),t.container.classList.add(p+"__dialog"),t.setContent(i),t.setPosition(),t.open(),d(g("href")),e.events.on("beforeDestruct",()=>{t.destruct()}).fire("previewOpened")}},{icon:"download",title:"Download",exec(){let t=g("href");t&&e.ow.open(t)}}]))},e.defaultTimeout),e.e.on("beforeClose",()=>{t.close()}).on("beforeDestruct",()=>t.destruct()),i.stopPropagation(),i.preventDefault(),!1}}},32118:function(e,t,i){"use strict";let o=new WeakMap;i.d(t,["elementsMap",0,e=>{let t=o.get(e);return t||(t={},o.set(e,t)),t}])},159:function(e,t,i){"use strict";i.d(t,{FileBrowserItem:function(){return n}});var o=i(21537);class n{static create(e){return e instanceof n?e:new n(e)}get path(){return(0,o.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:i,thumb:n,file:r}=this.data,s=n||r;return t&&s?s:(0,o.normalizeUrl)(i.baseurl,i.path,s||"")+"?_tmst="+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:i,source:n}=this.data;return void 0!==t&&(e=t),i&&e?e:(0,o.normalizeUrl)(n.baseurl,n.path,e||"")}get time(){let{changed:e}=this.data;return e&&("number"==typeof e?new Date(e).toLocaleString():e)||""}get uniqueHashKey(){let e=this.data;return[e.sourceName,e.name,e.file,this.time,e.thumb].join("_").toLowerCase().replace(/[^0-9a-z\-.]/g,"-")}toJSON(){return this.data}constructor(e){this.data=e,Object.keys(e).forEach(t=>{this[t]=e[t]})}}},21735:function(e,t,i){"use strict";var o=i(2748);i.d(t,["elementToItem",0,(e,t)=>{let{key:i}=e.dataset,{item:o}=t[i||""];return o},"getItem",0,(e,t,i="a")=>o.Dom.closest(e,e=>o.Dom.isTag(e,i),t)])},61251:function(e,t,i){"use strict";i(57459);var o=i(2748),n=i(27613),r=i(38420),s=i(4242),a=i(6441);a.Config.prototype.filebrowser={namespace:"",cache:!0,extraButtons:[],filter:(e,t)=>(t=t.toLowerCase(),(0,n.isString)(e))?-1!==e.toLowerCase().indexOf(t):(0,n.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,n.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t),sortBy:"changed-desc",sort(e,t,i){let[o,s]=i.toLowerCase().split("-"),a="asc"===s,l=(e,t)=>t>e?a?-1:1:e>t?a?1:-1:0;if((0,n.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[o]||"name"===o)return(0,n.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,n.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(o){case"changed":{let i=new Date(e.changed).getTime(),o=new Date(t.changed).getTime();return a?i-o:o-i}case"size":{let i=(0,r.humanSizeToBytes)(e.size),o=(0,r.humanSizeToBytes)(t.size);return a?i-o:o-i}}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,renameFolder:!0,moveFolder:!0,moveFile:!0,permissionsPresets:{allowFileDownload:void 0,allowFileMove:void 0,allowFileRemove:void 0,allowFileRename:void 0,allowFileUpload:void 0,allowFileUploadRemote:void 0,allowFiles:void 0,allowFolderCreate:void 0,allowFolderMove:void 0,allowFolderRemove:void 0,allowFolderRename:void 0,allowFolderTree:void 0,allowFolders:void 0,allowGeneratePdf:void 0,allowImageCrop:void 0,allowImageResize:void 0},showFoldersPanel:!0,storeLastOpenedFolder:!0,width:859,height:400,buttons:["filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.tiles","filebrowser.list","|","filebrowser.filter","|","filebrowser.sort"],removeButtons:[],fullsize:!1,showTooltip:!0,view:null,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,n.isArray)(e.data.messages)?e.data.messages.join(" "):"",showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:{storeLastOpenedFolder:!0,storeView:!0,storeSortBy:!0},pixelOffsetLoadNewChunk:200,getThumbTemplate(e,t,i){let o=this.options,n=this.files.getFullElName("item"),r=o.showFileName,s=o.showFileSize&&e.size,a=o.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);let c=`<div class="${n}-info">${r?`<span class="${n}-info-filename">${l}</span>`:""}${s?`<span class="${n}-info-filesize">${e.size}</span>`:""}${a?`<span class="${n}-info-filechanged">${a}</span>`:""}</div>`;return`<a
46
+ </div>`),"rtl"===this.options.direction&&((0,h.css)(this.container,"direction","rtl"),(0,h.attr)(this.container,"dir","rtl")),this.o.zIndex&&(0,h.css)(this.container,"zIndex",this.o.zIndex.toString()),(0,h.attr)(this.container,"role","dialog"),Object.defineProperty(this.container,"component",{value:this}),this.setMod("theme",this.o.theme||"default").setMod("resizable",!!this.o.resizable);let i=this.getElm("panel");(0,p.assert)(null!=i,"Panel element does not exist");let n=this.getElm("resizer");(0,p.assert)(null!=n,"Resizer element does not exist");let r=this.getElm("header-title");(0,p.assert)(null!=r,"header-title element does not exist");let s=this.getElm("content");(0,p.assert)(null!=s,"Content element does not exist");let c=this.getElm("footer");(0,p.assert)(null!=c,"Footer element does not exist");let u=this.getElm("header-toolbar");(0,p.assert)(null!=u,"header-toolbar element does not exist"),this.dialog=i,this.resizer=n,this.dialogbox_header=r,this.dialogbox_content=s,this.dialogbox_footer=c,this.dialogbox_toolbar=u,(0,h.css)(this.dialog,{maxWidth:this.options.maxWidth,minHeight:this.options.minHeight,minWidth:this.options.minWidth});let f=this.getElm("header");f&&this.e.on(f,"pointerdown touchstart",this.__onHeaderMouseDown),this.e.on(this.resizer,"mousedown touchstart",this.__onResizerMouseDown);let g=l.pluginSystem.get("fullsize");if((0,d.isFunction)(g)&&g(this),this.e.on(this.container,"close_dialog",this.close).on(this.ow,"keydown",this.__onEsc).on(this.ow,"resize",this.__onResize),this.o.closeOnClickOverlay){let e=this.getElm("overlay");(0,p.assert)(null!=e,"Overlay element does not exist"),this.e.on(e,"click",this.close)}}};w.__opened=new Set,w.defaultOptions={...f.View.defaultOptions,closeOnClickOverlay:!1,closeOnEsc:!0},v([s.autobind],w.prototype,"__onMouseUp",null),v([s.autobind],w.prototype,"__onHeaderMouseDown",null),v([s.autobind],w.prototype,"__onMouseMove",null),v([s.autobind],w.prototype,"__onEsc",null),v([s.autobind],w.prototype,"__onResizerMouseDown",null),v([s.autobind],w.prototype,"close",null),v([(0,s.hook)("ready")],w.prototype,"buildToolbar",null),w=o=v([s.component],w)},638:function(e,t,i){"use strict";i.d(t,{Alert:function(){return o.Alert},Confirm:function(){return n.Confirm},Dialog:function(){return r.Dialog},Prompt:function(){return s.Prompt}});var o=i(71568),n=i(26866),r=i(78584),s=i(36806)},36806:function(e,t,i){"use strict";i.d(t,{Prompt:function(){return l}});var o=i(2748),n=i(23282),r=i(29960),s=i(10830),a=i(78584);function l(e,t,i,l,c){let d=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),u=(0,s.Button)(d,"cancel","Cancel"),h=(0,s.Button)(d,"ok","Ok"),p=d.c.element("form",{class:"jodit-dialog_prompt"}),m=d.c.element("input",{autofocus:!0,class:"jodit-input"}),f=d.c.element("label");(0,n.isFunction)(t)&&(i=t,t=void 0),l&&(0,r.attr)(m,"placeholder",l),o.Dom.append(f,d.c.text(e)),o.Dom.append(p,f),o.Dom.append(p,m),u.onAction(d.close);let g=()=>{i&&(0,n.isFunction)(i)&&!1===i(m.value)||d.close()};return h.onAction(g),d.e.on(p,"submit",()=>(g(),!1)),d.setFooter([h,u]),d.open(p,t||"&nbsp;",!0,!0),m.focus(),void 0!==c&&c.length&&(m.value=c,m.select()),d}},41457:function(e,t,i){"use strict";var o=i(22732),n=i(29960),r=i(89890),s=i(12153),a=i(32118),l=i(21735),c=i(63399),d=i(44450),u=i(20201),h=i(50050);let p="jodit-file-browser-preview",m=(e="next",t="right")=>`<div class="${p}__navigation ${p}__navigation_arrow_${e}">`+s.Icon.get("angle-"+t)+"</a>";t.default=e=>{if(!e.o.contextMenu)return()=>{};let t=(0,c.makeContextMenu)(e);return i=>{let s=(0,l.getItem)(i.target,e.container);if(!s)return;let c=s,f=e.options,g=e=>(0,n.attr)(c,e)||"";return e.async.setTimeout(()=>{let b=(0,l.elementToItem)(s,(0,a.elementsMap)(e));b&&(e.state.activeElements=[b],t.show(i.clientX,i.clientY,[!!("1"!==g("data-is-file")&&f.editImage&&(e.dataProvider.canI("ImageResize")||e.dataProvider.canI("ImageCrop")))&&{icon:"pencil",title:"Edit",exec:()=>h.openImageEditor.call(e,g("href"),g("data-name"),g("data-path"),g("data-source"))},!!e.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",exec(){e.e.fire("fileRename.filebrowser",g("data-name"),g("data-path"),g("data-source"))}},!!e.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",async exec(){try{await (0,d.deleteFile)(e,g("data-name"),g("data-source"))}catch(t){return e.status(t)}return e.state.activeElements=[],(0,u.loadTree)(e).catch(e.status)}},!!f.preview&&{icon:"eye",title:"Preview",exec(){let t=e.dlg({buttons:["fullsize","dialog.close"]}),i=e.c.div(p,'<div class="jodit-icon_loader"></div>'),s=e.c.div(p+"__box"),a=e.c.fromHTML(m()),l=e.c.fromHTML(m("prev","left")),d=r=>{let d=e.c.element("img");(0,n.attr)(d,"src",r),(0,n.attr)(d,"alt",g("data-name"));let u=()=>{var n;e.isInDestruct||(e.e.off(d,"load error"),o.Dom.detach(i),f.showPreviewNavigation&&(o.Dom.prevWithClass(c,e.files.getFullElName("item"))&&o.Dom.append(i,l),o.Dom.nextWithClass(c,e.files.getFullElName("item"))&&o.Dom.append(i,a)),o.Dom.append(i,s),o.Dom.append(s,d),t.setPosition(),null==(n=null==e?void 0:e.events)||n.fire("previewOpenedAndLoaded"))};e.e.on(d,"load error",u),d.complete&&u()};e.e.on([a,l],"click",function(){if(!(c=this===a?o.Dom.nextWithClass(c,e.files.getFullElName("item")):o.Dom.prevWithClass(c,e.files.getFullElName("item"))))throw(0,r.error)("Need element");o.Dom.detach(i),o.Dom.detach(s),i.innerHTML='<div class="jodit-icon_loader"></div>',d(g("href"))}),e.e.on("beforeDestruct",()=>{t.destruct()}),t.container.classList.add(p+"__dialog"),t.setContent(i),t.setPosition(),t.open(),d(g("href")),e.events.on("beforeDestruct",()=>{t.destruct()}).fire("previewOpened")}},{icon:"download",title:"Download",exec(){let t=g("href");t&&e.ow.open(t)}}]))},e.defaultTimeout),e.e.on("beforeClose",()=>{t.close()}).on("beforeDestruct",()=>t.destruct()),i.stopPropagation(),i.preventDefault(),!1}}},32118:function(e,t,i){"use strict";let o=new WeakMap;i.d(t,["elementsMap",0,e=>{let t=o.get(e);return t||(t={},o.set(e,t)),t}])},159:function(e,t,i){"use strict";i.d(t,{FileBrowserItem:function(){return n}});var o=i(21537);class n{static create(e){return e instanceof n?e:new n(e)}get path(){return(0,o.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:i,thumb:n,file:r}=this.data,s=n||r;return t&&s?s:(0,o.normalizeUrl)(i.baseurl,i.path,s||"")+"?_tmst="+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:i,source:n}=this.data;return void 0!==t&&(e=t),i&&e?e:(0,o.normalizeUrl)(n.baseurl,n.path,e||"")}get time(){let{changed:e}=this.data;return e&&("number"==typeof e?new Date(e).toLocaleString():e)||""}get uniqueHashKey(){let e=this.data;return[e.sourceName,e.name,e.file,this.time,e.thumb].join("_").toLowerCase().replace(/[^0-9a-z\-.]/g,"-")}toJSON(){return this.data}constructor(e){this.data=e,Object.keys(e).forEach(t=>{this[t]=e[t]})}}},21735:function(e,t,i){"use strict";var o=i(2748);i.d(t,["elementToItem",0,(e,t)=>{let{key:i}=e.dataset,{item:o}=t[i||""];return o},"getItem",0,(e,t,i="a")=>o.Dom.closest(e,e=>o.Dom.isTag(e,i),t)])},61251:function(e,t,i){"use strict";i(57459);var o=i(2748),n=i(27613),r=i(38420),s=i(4242),a=i(6441);a.Config.prototype.filebrowser={namespace:"",cache:!0,extraButtons:[],filter:(e,t)=>(t=t.toLowerCase(),(0,n.isString)(e))?-1!==e.toLowerCase().indexOf(t):(0,n.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,n.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t),sortBy:"changed-desc",sort(e,t,i){let[o,s]=i.toLowerCase().split("-"),a="asc"===s,l=(e,t)=>t>e?a?-1:1:e>t?a?1:-1:0;if((0,n.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[o]||"name"===o)return(0,n.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,n.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(o){case"changed":{let i=new Date(e.changed).getTime(),o=new Date(t.changed).getTime();return a?i-o:o-i}case"size":{let i=(0,r.humanSizeToBytes)(e.size),o=(0,r.humanSizeToBytes)(t.size);return a?i-o:o-i}}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,renameFolder:!0,moveFolder:!0,moveFile:!0,permissionsPresets:{allowFileDownload:void 0,allowFileMove:void 0,allowFileRemove:void 0,allowFileRename:void 0,allowFileUpload:void 0,allowFileUploadRemote:void 0,allowFiles:void 0,allowFolderCreate:void 0,allowFolderMove:void 0,allowFolderRemove:void 0,allowFolderRename:void 0,allowFolderTree:void 0,allowFolders:void 0,allowGeneratePdf:void 0,allowImageCrop:void 0,allowImageResize:void 0},showFoldersPanel:!0,storeLastOpenedFolder:!0,width:859,height:400,buttons:["filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.tiles","filebrowser.list","|","filebrowser.filter","|","filebrowser.sort"],removeButtons:[],fullsize:!1,showTooltip:!0,view:null,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,n.isArray)(e.data.messages)?e.data.messages.join(" "):"",showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:{storeLastOpenedFolder:!0,storeView:!0,storeSortBy:!0},pixelOffsetLoadNewChunk:200,getThumbTemplate(e,t,i){let o=this.options,n=this.files.getFullElName("item"),r=o.showFileName,s=o.showFileSize&&e.size,a=o.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);let c=`<div class="${n}-info">${r?`<span class="${n}-info-filename">${l}</span>`:""}${s?`<span class="${n}-info-filesize">${e.size}</span>`:""}${a?`<span class="${n}-info-filechanged">${a}</span>`:""}</div>`;return`<a
47
47
  data-jodit-file-browser-item="true"
48
48
  data-is-file="${+!e.isImage}"
49
49
  draggable="true"
@@ -121,7 +121,7 @@
121
121
  </div>`:""}
122
122
  </div>
123
123
  </div>
124
- </form>`)}])},41409:function(e,t,i){"use strict";i.r(t),i.d(t,{Ajax:function(){return p.Ajax},Alert:function(){return s.Alert},Async:function(){return l.Async},AsyncStorage:function(){return j.AsyncStorage},Button:function(){return m.Button},CommitStyle:function(){return T.CommitStyle},Component:function(){return o.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return c.Create},Dialog:function(){return s.Dialog},Dom:function(){return d.Dom},EventEmitter:function(){return u.EventEmitter},EventHandlersStore:function(){return u.EventHandlersStore},Eventify:function(){return u.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return n},History:function(){return b.History},Icon:function(){return m.Icon},ImageEditor:function(){return y.ImageEditor},IndexedDBProvider:function(){return j.IndexedDBProvider},LazyWalker:function(){return d.LazyWalker},LocalStorageProvider:function(){return j.LocalStorageProvider},MemoryStorageProvider:function(){return j.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return I.PluginSystem},Popup:function(){return m.Popup},ProgressBar:function(){return m.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return o.STATUSES},Selection:function(){return T.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return _.StatusBar},Storage:function(){return j.Storage},StorageKey:function(){return j.StorageKey},Table:function(){return k.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return S.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return x.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return m.UIBlock},UIButton:function(){return m.UIButton},UIButtonGroup:function(){return m.UIButtonGroup},UIButtonState:function(){return m.UIButtonState},UICheckbox:function(){return m.UICheckbox},UIElement:function(){return m.UIElement},UIFileInput:function(){return m.UIFileInput},UIForm:function(){return m.UIForm},UIGroup:function(){return m.UIGroup},UIInput:function(){return m.UIInput},UIList:function(){return m.UIList},UIMessages:function(){return w.UIMessages},UISelect:function(){return m.UISelect},UISeparator:function(){return m.UISeparator},UISpacer:function(){return m.UISpacer},UITextArea:function(){return m.UITextArea},UITooltip:function(){return m.UITooltip},Uploader:function(){return E.Uploader},View:function(){return f.View},ViewComponent:function(){return o.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return j.canUseIndexedDB},canUsePersistentStorage:function(){return j.canUsePersistentStorage},clearUseIndexedDBCache:function(){return j.clearUseIndexedDBCache},defaultNameSpace:function(){return u.defaultNameSpace},observable:function(){return u.observable}});var o=i(91907),n=i(21537),r=i(80870),s=i(638),a=i(78513),l=i(8884),c=i(12060),d=i(22732),u=i(3827),h=i(50911),p=i(41601),m=i(67510),f=i(35608),g=i(84075),b=i(78818),v=i(52604),y=i(50050),w=i(1808),_=i(23512),k=i(76014),C=i(36646),S=i(11676),x=i(37426),E=i(57380),I=i(41876),T=i(59242),j=i(12081)},68389:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return r}});var o=i(87325),n=i(67510);let r=class e extends n.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}};r=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],r)},1808:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return l}});var o=i(87325),n=i(2748),r=i(41180),s=i(62405),a=i(68389);let l=class e extends s.UIGroup{className(){return"UIMessages"}info(e,t){this.__message(e,"info",t)}success(e,t){this.__message(e,"success",t)}error(e,t){this.__message(e,"error",t)}message(e,t,i){this.__message(e,t,i)}__message(e,t="info",i){let o=e+":"+t;if(this.__messages.has(o))return void this.async.updateTimeout(o,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);n.Dom.append(this.__box,this.container);let r=new a.UIMessage(this.j,{text:e,variant:t});this.append(r),this.__calcOffsets(),this.__messages.add(o);let s=this.__getRemoveCallback(r,o);this.j.e.on(r.container,"pointerdown",s),this.async.setTimeout(s,{label:o,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=o=>{o&&o.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",i),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let e=5;this.elements.forEach(t=>{(0,r.css)(t.container,"bottom",e+"px"),e+=t.container.offsetHeight+this.options.defaultOffset})}constructor(e,t,i={defaultTimeout:3e3,defaultOffset:5}){super(e),this.__box=t,this.options=i,this.__messages=new Set}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},23512:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return l}});var o=i(91907),n=i(65478),r=i(2748),s=i(14316),a=i(34176);let l=class e extends o.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){var e,t;return null!=(t=null==(e=this.container)?void 0:e.offsetHeight)?t:0}findEmpty(e=!1){let t=this.getElms(e?"item-right":"item");for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){let i=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&i.classList.add(this.getFullElName("item-right")),r.Dom.append(i,e),this.container&&r.Dom.append(this.container,i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(o.STATUSES.beforeDestruct),r.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),this.target=t,this.mods={},this.container=e.c.div("jodit-status-bar"),r.Dom.append(t,this.container),this.hide()}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component,(0,n.derive)(a.Mods,s.Elms)],l)},76014:function(e,t,i){"use strict";i.d(t,{Table:function(){return u}});var o=i(91907),n=i(82758),r=i(22732),s=i(580),a=i(21537),l=i(41180);let c=new Set(["thead","tbody","tfoot"]),d=new WeakMap;class u extends o.ViewComponent{className(){return"Table"}addSelection(e){this.selected.add(e),this.__recalculateStyles();let t=r.Dom.closest(e,"table",this.j.editor);if(t){let i=u.__selectedByTable.get(t)||new Set;i.add(e),u.__selectedByTable.set(t,i)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=r.Dom.closest(e,"table",this.j.editor);if(t){let i=u.__selectedByTable.get(t);i&&(i.delete(e),i.size||u.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,a.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=u.__selectedByTable.get(e);return t?(0,a.toArray)(t):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(e){return u.__getRowsCount(e)}static __getColumnsCount(e){return u.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return u.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],o=(0,a.toArray)(e.rows),n=(e,o)=>{void 0===i[o]&&(i[o]=[]);let n=e.colSpan,r=e.rowSpan,s,a,l=0;for(;i[o][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<n;s+=1){if(void 0===i[o+a]&&(i[o+a]=[]),t&&!1===t(e,o+a,l+s,n,r))return!1;i[o+a][l+s]=e}};for(let e=0;e<o.length;e+=1){let t=(0,a.toArray)(o[e].cells);for(let o=0;o<t.length;o+=1)if(!1===n(t[o],e))return i}return i}formalMatrix(e,t){return u.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let o=0,n=0,r=1,s=1;return u.__formalMatrix(e,(e,a,l,c,d)=>{if(t===e)return o=a,n=l,r=c||1,s=d||1,i&&(n+=(c||1)-1,o+=(d||1)-1),!1}),[o,n,r,s]}formalCoordinate(e,t,i=!1){return u.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,o){let n;if(t)n=t.cloneNode(!0),r.Dom.each(t,e=>{if(!r.Dom.isCell(e))return;let t=(0,a.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){let i=parseInt(t,10)-1;(0,a.attr)(e,"rowspan",i>1?i:null)}}),r.Dom.each(n,e=>{r.Dom.isCell(e)&&(r.Dom.detach(e),r.Dom.append(e,o.element("br")))});else{let t=u.__getColumnsCount(e);n=o.element("tr");for(let e=0;e<t;e+=1){let e=o.element("td");r.Dom.append(e,o.element("br")),r.Dom.append(n,e)}}let s=t&&t.parentElement;if(i&&t&&!t.nextElementSibling&&r.Dom.isTag(s,"thead")){let t=u.__bodyOf(e,s,o);t.insertBefore(n,t.firstChild),u.__setCellsTag(n,"td",o)}else i&&t&&t.nextSibling?r.Dom.after(t,n):!i&&t?r.Dom.before(t,n):r.Dom.append(r.Dom.first(e,e=>r.Dom.isTag(e,"tbody"))||e,n)}static __bodyOf(e,t,i){let o=e.tBodies[0];return o||(o=i.element("tbody"),r.Dom.after(t,o)),o}static __setCellsTag(e,t,i,o){(0,a.toArray)(e.cells).forEach(e=>{let n=r.Dom.isTag(e,t)?e:r.Dom.replace(e,t,i,!0);n!==e&&(null==o||o.set(e,n)),"td"===t?(0,a.attr)(n,"scope",null):n.hasAttribute("scope")||(0,a.attr)(n,"scope","col")})}hasHeaderRow(e){var t;return!!(null==(t=e.tHead)?void 0:t.rows.length)}canToggleHeaderRow(e){let[t]=(0,a.toArray)(e.rows);return this.hasHeaderRow(e)||!!(t&&(0,a.toArray)(t.cells).every(e=>e.rowSpan<2))}toggleHeaderRow(e){let t=new Map,i=this.j.createInside,o=e.tHead;if(!this.canToggleHeaderRow(e))return t;if(o&&this.hasHeaderRow(e)){let n=u.__bodyOf(e,o,i),s=n.firstChild;(0,a.toArray)(o.rows).forEach(e=>{n.insertBefore(e,s),u.__setCellsTag(e,"td",i,t)}),r.Dom.safeRemove(o)}else{let[n]=(0,a.toArray)(e.rows),s=o||i.element("thead");o||(e.tHead=s),r.Dom.append(s,n),u.__setCellsTag(n,"th",i,t)}return t}appendRow(e,t,i){return u.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,o=u.__formalMatrix(e),n=e.rows[t];o[t].forEach((s,l)=>{if(i=!1,t-1>=0&&o[t-1][l]===s)i=!0;else if(o[t+1]&&o[t+1][l]===s){if(s.parentNode===n&&s.parentNode.nextSibling){i=!0;let n=l+1;for(;o[t+1][n]===s;)n+=1;let a=r.Dom.next(s.parentNode,e=>r.Dom.isTag(e,"tr"),e);if(a){let e=null;for(let i=n;i<o[t+1].length;i+=1){let n=o[t+1][i];if(n&&n.parentNode===a){e=n;break}}e?r.Dom.before(e,s):r.Dom.append(a,s)}}}else r.Dom.safeRemove(s);if(i&&(s.parentNode===n||s!==o[t][l-1])){let e=s.rowSpan;(0,a.attr)(s,"rowspan",e-1>1?e-1:null)}});let s=n.parentElement;r.Dom.safeRemove(n),r.Dom.isTag(s,c)&&!s.rows.length&&r.Dom.safeRemove(s)}removeRow(e,t){return u.__removeRow(e,t)}appendColumn(e,t,i=!0){let o=u.__formalMatrix(e);if(!i&&r.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,n]=u.__formalCoordinate(e,t,i),s=i?n+1:n;for(let e=0;e<o.length;){let t=o[e];if(t[n]!==t[s]||n===s){let e=this.j.createInside.element("td");r.Dom.append(e,this.j.createInside.element("br")),i?r.Dom.after(t[n],e):r.Dom.before(t[n],e),t[n].rowSpan>1&&(e.rowSpan=t[n].rowSpan)}else t[n].colSpan+=1;e+=t[n].rowSpan||1}}static __removeColumn(e,t){let i,o=u.__formalMatrix(e);o.forEach((e,n)=>{let s=e[t];if(i=!1,t-1>=0&&o[n][t-1]===s||t+1<e.length&&o[n][t+1]===s?i=!0:r.Dom.safeRemove(s),i&&(n-1<0||s!==o[n-1][t])){let e=s.colSpan;(0,a.attr)(s,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return u.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,o,n,r=[[1/0,1/0],[0,0]],s=u.__formalMatrix(e);for(i=0;i<s.length;i+=1)for(o=0;s[i]&&o<s[i].length;o+=1)t.includes(s[i][o])&&(r[0][0]=Math.min(i,r[0][0]),r[0][1]=Math.min(o,r[0][1]),r[1][0]=Math.max(i,r[1][0]),r[1][1]=Math.max(o,r[1][1]));for(i=r[0][0];i<=r[1][0];i+=1)for(n=1,o=r[0][1];o<=r[1][1];o+=1){for(;s[i]&&s[i][o-n]&&s[i][o]===s[i][o-n];)r[0][1]=Math.min(o-n,r[0][1]),r[1][1]=Math.max(o-n,r[1][1]),n+=1;for(n=1;s[i]&&s[i][o+n]&&s[i][o]===s[i][o+n];)r[0][1]=Math.min(o+n,r[0][1]),r[1][1]=Math.max(o+n,r[1][1]),n+=1;for(n=1;s[i-n]&&s[i][o]===s[i-n][o];)r[0][0]=Math.min(i-n,r[0][0]),r[1][0]=Math.max(i-n,r[1][0]),n+=1;for(n=1;s[i+n]&&s[i][o]===s[i+n][o];)r[0][0]=Math.min(i+n,r[0][0]),r[1][0]=Math.max(i+n,r[1][0]),n+=1}return r}getSelectedBound(e,t){return u.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=u.__formalMatrix(e);u.__removeExtraColspans(i,t),u.__removeExtraRowspans(i,t);for(let e=0;e<i.length;e+=1)for(let t=0;t<i[e].length;t+=1)void 0!==i[e][t]&&(i[e][t].hasAttribute("rowspan")&&1===i[e][t].rowSpan&&(0,a.attr)(i[e][t],"rowspan",null),i[e][t].hasAttribute("colspan")&&1===i[e][t].colSpan&&(0,a.attr)(i[e][t],"colspan",null),i[e][t].hasAttribute("class")&&!(0,a.attr)(i[e][t],"class")&&(0,a.attr)(i[e][t],"class",null));u.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let o=1e6,n=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){n=!0;break}o=Math.min(o,e[t][i].colSpan)}if(!n)for(let n=0;n<e.length;n+=1)void 0!==e[n][i]&&u.__mark(e[n][i],"colspan",e[n][i].colSpan-o+1,t)}}static __removeExtraRowspans(e,t){let i,o;for(i=0;i<e.length;i+=1){let n=1e6,r=!1;for(o=0;o<e[i].length;o+=1)if(void 0!==e[i][o]){if(e[i][o].rowSpan<2){r=!0;break}n=Math.min(n,e[i][o].rowSpan)}if(!r)for(o=0;o<e[i].length;o+=1)void 0!==e[i][o]&&u.__mark(e[i][o],"rowspan",e[i][o].rowSpan-n+1,t)}}normalizeTable(e){return u.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],o=u.__getSelectedBound(e,u.__getSelectedCellsByTable(e)),s=0,c=null,d=0,p=0,m=0,f=new Set,g=[];o&&(o[0][0]-o[1][0]||o[0][1]-o[1][1])&&(u.__formalMatrix(e,(e,n,r,b,v)=>{n>=o[0][0]&&n<=o[1][0]&&r>=o[0][1]&&r<=o[1][1]&&(f.has(e)||(f.add(e),n===o[0][0]&&(0,l.cssInline)(e,"width")&&(s+=e.offsetWidth),""!==(0,a.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),b>1&&(p+=b-1),v>1&&(m+=v-1),c?(u.__mark(e,"remove",1,g),h(t).removeSelection(e)):(c=e,d=r)))}),p=o[1][1]-o[0][1]+1,m=o[1][0]-o[0][0]+1,c&&(p>1&&u.__mark(c,"colspan",p,g),m>1&&u.__mark(c,"rowspan",m,g),s&&(u.__mark(c,"width",(s/e.offsetWidth*100).toFixed(n.ACCURACY)+"%",g),d&&u.__setColumnWidthByDelta(e,d,0,!0,g)),c.innerHTML=i.join("<br/>")||"<br/>",h(t).addSelection(c),f.delete(c),u.__unmark(g),u.__normalizeTable(e),(0,a.toArray)(e.rows).forEach(e=>{e.cells.length||r.Dom.safeRemove(e)})))}mergeSelected(e){return u.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,o,n,s,a,l=[];u.__getSelectedCellsByTable(e).forEach(c=>{o=t.createInside.element("td"),r.Dom.append(o,t.createInside.element("br")),n=t.createInside.element("tr"),i=u.__formalCoordinate(e,c),c.rowSpan<2?(u.__formalMatrix(e,(e,t,o)=>{i[0]===t&&i[1]!==o&&e!==c&&u.__mark(e,"rowspan",e.rowSpan+1,l)}),r.Dom.after(r.Dom.closest(c,"tr",e),n),r.Dom.append(n,o)):(u.__mark(c,"rowspan",c.rowSpan-1,l),u.__formalMatrix(e,(t,o,n)=>{o>i[0]&&o<i[0]+c.rowSpan&&i[1]>n&&t.parentNode.rowIndex===o&&(a=t),i[0]<o&&t===c&&(s=e.rows[o])}),a?r.Dom.after(a,o):r.Dom.prepend(s,o)),c.colSpan>1&&u.__mark(o,"colspan",c.colSpan,l),u.__unmark(l),h(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return u.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,o,s,a=[];u.__getSelectedCellsByTable(e).forEach(l=>{i=u.__formalCoordinate(e,l),l.colSpan<2?u.__formalMatrix(e,(e,t,o)=>{i[1]===o&&i[0]!==t&&e!==l&&u.__mark(e,"colspan",e.colSpan+1,a)}):u.__mark(l,"colspan",l.colSpan-1,a),o=t.createInside.element("td"),r.Dom.append(o,t.createInside.element("br")),l.rowSpan>1&&u.__mark(o,"rowspan",l.rowSpan,a);let c=l.offsetWidth;r.Dom.after(l,o),s=c/e.offsetWidth/2,u.__mark(l,"width",(100*s).toFixed(n.ACCURACY)+"%",a),u.__mark(o,"width",(100*s).toFixed(n.ACCURACY)+"%",a),u.__unmark(a),h(t).removeSelection(l)}),u.__normalizeTable(e)}splitVertical(e){return u.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,o,r){let s=u.__formalMatrix(e),a=0;for(let o=0;o<s.length;o+=1){let l=s[o][t];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+i)/e.offsetWidth*100;u.__mark(l,"width",c.toFixed(n.ACCURACY)+"%",r),a=o;break}for(let e=a+1;e<s.length;e+=1){let i=s[e][t];u.__mark(i,"width",null,r)}o||u.__unmark(r)}setColumnWidthByDelta(e,t,i,o,n){return u.__setColumnWidthByDelta(e,t,i,o,n)}static __mark(e,t,i,o){var n;o.push(e);let r=null!=(n=d.get(e))?n:{};r[t]=void 0===i?1:i,d.set(e,r)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let o=t[i];switch(i){case"remove":r.Dom.safeRemove(e);break;case"rowspan":(0,a.attr)(e,"rowspan",(0,a.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,a.attr)(e,"colspan",(0,a.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(e.style.removeProperty("width"),(0,a.attr)(e,"style")||(0,a.attr)(e,"style",null)):(0,a.css)(e,"width",o.toString())}delete t[i]}),d.delete(e))})}constructor(){super(...arguments),this.selected=new Set,this.__recalculateStyles=this.async.microDebounce(()=>{let e=(0,s.getContainer)(this.j,u,"style",!0),t=[];this.selected.forEach(e=>{let i=(0,a.cssPath)(e);i&&t.push(i)});let i=t.length>1?t.map(e=>`${e}::selection,${e} ::selection`).join(",")+"{background:transparent}":"";e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`+i:""})}}u.__selectedByTable=new WeakMap;let h=e=>e.getInstance("Table",e.o)},78644:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return D}});var o,n=i(4012),r=i(78213),s=i(82758),a=i(45219),l=i(33433),c=i(87325),d=i(37133),u=i(2748),h=i(68345),p=i(23282),m=i(19306),f=i(72430),g=i(70799),b=i(56175),v=i(87058),y=i(38837),w=i(29960),_=i(37790),k=i(62843),C=i(20014),S=i(72157),x=i(12153),E=i(56917),I=i(21491),T=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let j=new Set(["input","textarea","select"]),D=o=class e extends k.UIButton{className(){return"ToolbarButton"}getRole(){return"listitem"}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,w.attr)(this.trigger,"aria-label",e)}}get toolbar(){let e=(0,c.getComponentClass)("ToolbarCollection");return this.closest(e)}update(){var e,t;let{control:i,state:o}=this,n=this.toolbar;if(!n)return;let r=null==(e=i.value)?void 0:e.call(i,n.jodit,this);void 0!==r&&(o.value=r),o.disabled=this.__calculateDisabledStatus(n),o.activated=this.__calculateActivatedStatus(n),null==(t=i.update)||t.call(i,n.jodit,this)}__calculateActivatedStatus(e){var t,i;return(!(0,m.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(null!=(i=(t=this.control).isActive)&&!!i.call(t,this.j,this)||!!(e&&e.shouldBeActive(this)))}__calculateDisabledStatus(e){var t,i;return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||(null==(i=(t=this.control).isDisabled)?void 0:i.call(t,this.j,this)))||!!(e&&e.shouldBeDisabled(this))}onChangeActivated(){(0,w.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,p.isFunction)(this.control.template)?(this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)),this.updateAriaLabel()):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,w.attr)(this.button,"tabindex",this.state.tabIndex),(0,w.attr)(this.trigger,"tabindex",this.state.tabIndex)}createContainer(){let e=this.componentName,t=this.j.c.span(e),i=super.createContainer();i.classList.remove(e),i.classList.add(e+"__button"),Object.defineProperty(i,"component",{value:this,configurable:!0}),u.Dom.append(t,i);let o=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${x.Icon.get("chevron")}</span>`);return u.Dom.append(i,o),t}focus(){var e;null==(e=u.Dom.first(this.container,e=>u.Dom.isTag(e,"button")))||e.focus()}onChangeHasTrigger(){this.state.hasTrigger?u.Dom.append(this.container,this.trigger):u.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?"disabled":null;(0,w.attr)(this.trigger,"disabled",e),(0,w.attr)(this.button,"disabled",e),(0,w.attr)(this.container,"disabled",e)}__initFromControl(){let{control:e,state:t}=this;this.updateSize(),t.name=e.name,this.__initIconFromControl(),e.tooltip&&(t.tooltip=(0,p.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec)}__initIconFromControl(){var e;let{control:t,state:i}=this,{textIcons:o}=this.j.o;if(!0===o||(0,p.isFunction)(o)&&o(t.name)||t.template){i.icon=(0,k.UIButtonState)().icon,i.text=t.text||t.name;return}if(!(0,g.isString)(t.icon)&&null!=t.icon){i.icon={name:t.icon.name||t.name,iconURL:t.icon.iconURL||"",fill:t.icon.fill||"",scale:t.icon.scale};return}if(t.iconURL)i.icon.iconURL=t.iconURL;else{let o=t.icon||t.name;i.icon.name=x.Icon.exists(o)||(null==(e=this.j.o.extraIcons)?void 0:e[o])?o:""}t.iconURL||i.icon.name||(i.text=t.text||t.name)}onTriggerClick(e){var t,i,o;if(this.openedPopup)return void this.__closePopup();let{control:n}=this;if((0,w.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},n.list)return this.__openControlList(n);if((0,p.isFunction)(n.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,v.camelCase)(`before-${n.name}-open-popup`),this.target,n,e)){let r=null!=(o=null!=(i=null==(t=this.toolbar)?void 0:t.getTarget(this))?i:this.target)?o:null,s=n.popup(this.j,r,this.__closePopup,this);s?(e.setContent((0,g.isString)(s)?this.j.c.fromHTML(s):s).open(()=>(0,b.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),(0,C.focusFormField)(e.container)):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,v.camelCase)(`after-${n.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||(e.key===s.KEY_DOWN?this.onButtonKeyDown(e):[s.KEY_ENTER,s.KEY_SPACE," "].includes(e.key)&&(e.preventDefault(),this.trigger.click()))}onButtonKeyDown(e){var t;e.key!==s.KEY_DOWN||this.state.disabled||!this.state.hasTrigger||e.altKey||e.ctrlKey||e.metaKey||(e.preventDefault(),e.stopPropagation(),this.openedPopup||this.trigger.click(),null==(t=this.__popupFocusables()[0])||t.focus())}__onPopupKeyDown(e){if(!this.openedPopup||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(u.Dom.isTag(t,j)&&e.key!==s.KEY_ESC)return;let i=this.__popupFocusables(),o=i.indexOf(t);switch(e.key){case s.KEY_ESC:this.__closePopup();break;case s.KEY_UP:o<=0?this.__closePopup():i[o-1].focus();break;case s.KEY_DOWN:if(!i.length)return;i[(o+1)%i.length].focus();break;default:if(!this.control.list||!this.__typeAhead(e.key,i,o))return}e.preventDefault(),e.stopPropagation()}__onEditorKeyDown(e){if(this.openedPopup&&this.control.list&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&this.__typeAhead(e.key,this.__popupFocusables(),-1))return e.preventDefault(),!1}__typeAhead(e,t,i){var o,n;let r=Date.now();if((r-this.__typedAt>1e3||t[i]!==this.__typedTo)&&(this.__typed=""),1!==e.length||" "===e&&!this.__typed)return!1;this.__typedAt=r,this.__typed+=e,this.__typedTo=t[i];let{compare:s}=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"}),a=this.__typed,l=Array.from(a).every(e=>0===s(e,a[0])),c=l?a[0]:a,d=l?i+1:Math.max(i,0);for(let e=0;e<t.length;e+=1){let i=t[(d+e)%t.length];if(0===s((null!=(n=null==(o=i.textContent)?void 0:o.trim())?n:"").slice(0,c.length),c)){i.focus(),this.__typedTo=i;break}}return!0}__popupFocusables(){let e=this.openedPopup;return e?Array.from(e.container.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter(e=>!!e.offsetParent):[]}__openControlList(e){var t,i,o,n,r;let s=null!=(t=this.jodit.options.controls)?t:{},a=e=>(0,S.findControlType)(e,s),l=e.list,c=this.openPopup();c.parentElement=this;let d=null==(i=e.popup)?void 0:i.call(e,this.j,null!=(r=null!=(n=null==(o=this.toolbar)?void 0:o.getTarget(this))?n:this.target)?r:null,this.__closePopup,this);if(d)return this.__openMenu(c,d);let u=(0,I.makeCollection)(this.j);u.parentElement=c,u.mode="vertical";let p=(t,i)=>{let o;if((0,g.isString)(i)&&a(i))return{name:i.toString(),...a(i)};if((0,g.isString)(t)&&a(t))return{name:t.toString(),...a(t),..."object"==typeof i?i:{}};o=t,(0,f.isPlainObject)(o)&&"title"in o&&"value"in o&&(i=t.value,t=t.title);let{childTemplate:n}=e,r={name:t.toString(),template:n&&((e,t,i)=>n(e,t,i,this)),exec:e.childExec?(t,i,o)=>{var n;return null==(n=e.childExec)?void 0:n.call(e,t,i,{...o,parentControl:e})}:e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,i]};return(0,g.isString)(i)&&(r.text=i),r};u.build((0,h.isArray)(l)?l.map(p):(0,_.keys)(l,!1).map(e=>p(e,l[e])),this.target),this.__openMenu(c,u)}__openMenu(e,t){e.setContent(t).open(()=>(0,b.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(e&&u.Dom.isNode(e.target)&&(u.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new E.Popup(this.j,!1),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),this.openedPopup}__closePopup(){let e=this.openedPopup;if(!e)return;this.openedPopup=null,this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick).off("keydown",this.__onEditorKeyDown);let{activeElement:t}=this.od,i=t&&u.Dom.isOrContains(e.container,t),o=i&&u.Dom.closest(t,"form",e.container);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,w.attr)(this.trigger,"aria-expanded",!1),o&&(0,m.isJoditObject)(this.j)?this.j.s.focus():i&&this.focus()}onClick(e){var t,i,o,n,r,s,a;let{control:l}=this;if((0,p.isFunction)(l.exec)){let c=null!=(o=null!=(i=null==(t=this.toolbar)?void 0:t.getTarget(this))?i:this.target)?o:null,d=l.exec(this.j,c,{control:l,originalEvent:e,button:this});if(!1!==d&&!0!==d&&(null==(r=null==(n=this.j)?void 0:n.e)||r.fire("synchro"),this.parentElement&&this.parentElement.update(),this.__closePopups(),null==(a=null==(s=this.j)?void 0:s.e)||a.fire("afterExec")),!1!==d)return}return l.list?this.__openControlList(l):(0,p.isFunction)(l.popup)?this.onTriggerClick(e):void((l.command||l.name)&&((0,_.call)((0,m.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),l.command||l.name,!1,l.args&&l.args[0]),this.__closePopups()))}__closePopups(){var e,t;let i=[this];for(let e=this.parentElement;e;e=e.parentElement){if(n.Component.isInstanceOf(e,E.Popup)&&e.keepOpen&&(!this.target||this.target.isConnected)){i.forEach(e=>e.__closePopup()),e.updatePosition();return}n.Component.isInstanceOf(e,o)&&i.push(e)}null==(t=null==(e=this.j)?void 0:e.e)||t.fire("closeAllPopups")}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,i=null){super(e),this.control=t,this.target=i,this.state={...(0,k.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.__typed="",this.__typedAt=0,this.__typedTo=null,this.openedPopup=null;let o=this.getElm("button");(0,y.assert)(o,"Element button should exists"),this.button=o,Object.defineProperty(o,"component",{value:this,configurable:!0});let n=this.getElm("trigger");(0,y.assert)(n,"Element trigger should exists"),this.trigger=n,n.remove(),e.e.on([this.button,this.trigger],"mousedown",e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(r.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}};T([l.cacheHTML],D.prototype,"createContainer",null),T([(0,d.watch)("state.hasTrigger",{immediately:!1})],D.prototype,"onChangeHasTrigger",null),T([(0,d.watch)("trigger:click")],D.prototype,"onTriggerClick",null),T([(0,d.watch)("trigger:keydown")],D.prototype,"onTriggerKeyDown",null),T([(0,d.watch)("button:keydown")],D.prototype,"onButtonKeyDown",null),T([a.autobind],D.prototype,"__onPopupKeyDown",null),T([a.autobind],D.prototype,"__onEditorKeyDown",null),T([a.autobind],D.prototype,"onOutsideClick",null),T([a.autobind],D.prototype,"__closePopup",null),D=o=T([c.component],D)},80319:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return l}});var o=i(65478),n=i(22732),r=i(21537),s=i(62843);let a=new Set(["input","button","select","textarea"]),l=class e extends s.UIButton{className(){return"ToolbarContent"}getRole(){return"listitem"}onChangeActivated(){}update(){var e,t,i;let{control:o}=this,s=o.getContent(this.j,this);((0,r.isString)(s)||s.parentNode!==this.container)&&(n.Dom.detach(this.container),n.Dom.append(this.container,(0,r.isString)(s)?this.j.create.fromHTML(s):s)),this.state.disabled=!!(null==(e=o.isDisabled)?void 0:e.call(o,this.j,this)),this.state.activated=!!(null==(t=o.isActive)?void 0:t.call(o,this.j,this)),null==(i=o.update)||i.call(o,this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),n.Dom.each(this.container,e=>{n.Dom.isTag(e,a)&&(0,r.attr)(e,"disabled",this.state.disabled||null)})}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,i=null){super(e),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},36646:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return o.ToolbarButton},ToolbarContent:function(){return n.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var o=i(78644),n=i(80319),r=i(83111)},83111:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return a}});var o=i(65478),n=i(72430),r=i(70799),s=i(78644);let a=class e extends s.ToolbarButton{className(){return"ToolbarSelect"}update(){var e,t,i;super.update(),this.state.icon.name="";let{list:o,data:s}=this.control;if(o){let a=this.state.value||(s&&(0,r.isString)(s.currentValue)?s.currentValue:void 0);a||(a=Object.keys(o)[0]);let l=((0,n.isPlainObject)(o)&&o[a.toString()]||a).toString();this.state.text=null!=(i=null==(t=(e=this.control).textTemplate)?void 0:t.call(e,this.jodit,l))?i:l}}};a=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],a)},11676:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return m}});var o=i(65478),n=i(45219),r=i(87325),s=i(97357),a=i(37133),l=i(29960),c=i(41180),d=i(82760),u=i(24536),h=i(21491),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=class e extends u.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,h.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,h.makeSelect)(this.j,e,t)}shouldBeActive(e){}shouldBeDisabled(e){}getTarget(e){return e.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar",this))}update(){this.__immediateUpdate()}setDirection(e){(0,c.css)(this.container,"direction",e),(0,l.attr)(this.container,"dir",e)}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on("afterSetMode focus",this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(e){throw(0,d.error)("The method is not implemented for this class.")}build(e,t=null){let i=this.j.e.fire("beforeToolbarBuild",e);return i&&(e=i),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(e){super(e),this.__listenEvents="updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur"}};p([(0,a.watch)(":afterInit"),n.autobind],m.prototype,"__immediateUpdate",null),p([(0,o.debounce)(e=>e.j.defaultTimeout,!0)],m.prototype,"update",null),p([(0,s.hook)("ready")],m.prototype,"__initEvents",null),m=p([r.component],m)},37426:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return l}});var o=i(82758),n=i(65478),r=i(22732),s=i(21537),a=i(11676);let l=class e extends a.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(void 0!==t)return t;let i=void 0===e.control.mode?o.MODE_WYSIWYG:e.control.mode;return i!==o.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let o=this.j.selection?this.j.s.current():null;if(!o)return!1;if(e.control.tags){let i=e.control.tags;if(t=o,r.Dom.up(t,e=>{if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let i=e.control.css;if(t=o,r.Dom.up(t,e=>{if(e&&!r.Dom.isText(e)&&!r.Dom.isComment(e))return this.checkActiveStatus(i,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}prependInvisibleInput(e){let t=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});r.Dom.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire("showInlineToolbar",e)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(e){super(e),this.checkActiveStatus=(e,t)=>{let i=0,o=0;return Object.keys(e).forEach(n=>{let r=e[n];(0,s.isFunction)(r)?r(this.j,(0,s.css)(t,n).toString())&&(i+=1):-1!==r.indexOf((0,s.css)(t,n).toString())&&(i+=1),o+=1}),o===i},this.prependInvisibleInput(this.container)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component],l)},21491:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var o=i(87325),n=i(23282),r=i(19306);function s(e,t){let i=(0,o.getComponentClass)("ToolbarCollection"),n=(0,o.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new n(e):new i(e);return e.o.textIcons&&s.container.classList.add("jodit_text_icons"),t&&(s.parentElement=t),e.o.toolbarButtonSize&&(s.buttonSize=e.o.toolbarButtonSize),s}function a(e,t,i=null){if((0,n.isFunction)(t.getContent))return new((0,o.getComponentClass)("ToolbarContent"))(e,t,i);let r=new((0,o.getComponentClass)("ToolbarButton"))(e,t,i);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,i=null){return new((0,o.getComponentClass)("ToolbarSelect"))(e,t,i)}},80536:function(e,t,i){"use strict";var o=i(68345),n=i(19306),r=i(29960),s=i(6441),a=i(2073);s.Config.prototype.enableDragAndDropFileToEditor=!0,s.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,showTabInFileSelector:!0,imagesExtensions:["jpg","jpeg","png","gif","webp","bmp","svg","tiff","avif"],headers:null,data:null,filesVariableName:e=>`files[${e}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:e=>e,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,o.isArray)(e.data.messages)?e.data.messages.join(" "):"",processFileName:(e,t,i)=>[e,t,i],process:e=>e.data,error(e){this.j.message.error(e.message,4e3)},getDisplayName:(e,t)=>e+t,defaultHandlerSuccess(e){let t=this.j||this;if(!(0,n.isJoditObject)(t))return;let{baseurl:i}=e;(0,a.getItems)(e).forEach(({file:e,isImage:o})=>{let[n,s]=o?["img","src"]:["a","href"],a=t.createInside.element(n);(0,r.attr)(a,s,i+e),"a"===n&&(a.textContent=t.o.uploader.getDisplayName.call(this,i,e)),"img"===n?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},promptOnExists:!0,promptOnExistsSuggestName:e=>e,contentType(e){return(void 0===this.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},83987:function(e,t,i){"use strict";i.d(t,{buildData:function(){return n}});var o=i(21537);function n(e,t){if((0,o.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let i=e.ow.FormData;if(void 0!==i){if(t instanceof i||(0,o.isString)(t))return t;let e=new i;return Object.keys(t).forEach(i=>{e.append(i,t[i])}),e}return t}},74569:function(e,t,i){"use strict";function o(e){var t,i;let[o,...n]=e.split(","),r=n.join(","),s=null!=(i=null==(t=o.split(":")[1])?void 0:t.split(";")[0])?i:"",a=/;base64/i.test(o)?atob(r):decodeURIComponent(r),l=new Uint8Array(new ArrayBuffer(a.length));for(let e=0;e<a.length;e+=1)l[e]=a.charCodeAt(e);return new Blob([l.buffer],{type:s})}i.d(t,{dataURItoBlob:function(){return o}})},94122:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return r.ajaxInstances},hasFiles:function(){return a},hasItems:function(){return l},normalizeUploaderData:function(){return o.normalizeUploaderData},processOldBrowserDrag:function(){return n.processOldBrowserDrag},send:function(){return r.send},sendFiles:function(){return s.sendFiles}}),i(83987);var o=i(2073),n=i(50373),r=i(71686),s=i(80020);function a(e){return!!(e&&e.files&&e.files.length>0)}function l(e){return!!(e&&e.items&&e.items.length>0)}},2073:function(e,t,i){"use strict";i.d(t,{getItems:function(){return r},normalizeUploaderData:function(){return s}});var o=i(68345),n=i(70799);function r(e){let{files:t,isImages:i,fileNames:n,items:r}=e;return(0,o.isArray)(t)?t.map((e,t)=>{let o=null==n?void 0:n[t];return{file:e,isImage:!!(null==i?void 0:i[t]),...void 0!==o?{name:o}:{}}}):null!=r?r:[]}function s(e){if(!e||"object"!=typeof e)return e;let{files:t,items:i}=e;if(!i||(0,o.isArray)(t)&&(t.length||!i.length))return{...e,items:r(e)};let s=i.map(({name:e})=>e);return{...e,files:i.map(({file:e})=>e),isImages:i.map(({isImage:e})=>e),...s.every(n.isString)?{fileNames:s}:{},items:i}}},50373:function(e,t,i){"use strict";i.d(t,{processOldBrowserDrag:function(){return c}});var o=i(82758),n=i(22732),r=i(580),s=i(21537),a=i(74569),l=i(80020);function c(e,t,i,c,d){if(t&&(!t.types.length||t.types[0]!==o.TEXT_PLAIN)){let t=e.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});n.Dom.append((0,r.getContainer)(e.j,e.constructor),t);let o=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(n.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";o&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,c).finally(d)}},e.j.defaultTimeout)}}},80020:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return d}});var o=i(82758),n=i(21537),r=i(70231),s=i(36806),a=i(2073),l=i(71686),c=i(76198);async function d(e,t,i,u,h,p){if(!t)throw(0,n.error)("Need files");let{o:m}=e,f=(0,n.toArray)(t);if(!f.length)throw(0,n.error)("Need files");let g=null==p?void 0:p.data;if(!p&&(0,n.isFunction)(m.beforeUpload)){let t;try{t=await m.beforeUpload.call(e,f)}catch(t){throw(u||m.defaultHandlerError).call(e,t),t}if(!1===t){let t=(0,n.error)("Upload canceled");throw(u||m.defaultHandlerError).call(e,t),t}if((0,n.isArray)(t)?f=t:(0,n.isPlainObject)(t)&&(0,n.isArray)(t.files)&&(f=t.files,g=t.data),!f.length)return[]}let b=[];if(m.insertImageAsBase64URI&&function(e,t,i,o,r,s){let l,c,d=[];for(c=0;c<e.length;c+=1)if((l=e[c])&&l.type){let u=l.type.match(/\/([a-z0-9]+)/i),h=u[1]?u[1].toLowerCase():"";if(!t.includes(h))continue;let p=new FileReader,{name:m}=l,f=o.j.async.promise((e,t)=>{p.onerror=t,p.onloadend=()=>{let t=(0,a.normalizeUploaderData)({baseurl:"",items:[{file:p.result,isImage:!0,name:m}]});((0,n.isFunction)(r)?r:s).call(o,t),e(t)},p.readAsDataURL(l)});d.push(f),i.push(f),e[c]=null}d.length&&Promise.all(d).then(()=>{o.j.events&&o.j.e.fire("filesWereUploaded")}).catch(()=>{})}(f,m.imagesExtensions,b,e,i,m.defaultHandlerSuccess),(f=f.filter(e=>e)).length){let t,p=new FormData;p.append(m.pathVariableName,e.path),p.append("source",e.source);for(let i=0;i<f.length;i+=1)if(t=f[i]){let o=/\.\w+$/.test(t.name),n=t.type.match(/\/([a-z0-9]+)/i),r=n&&n[1]?n[1].toLowerCase():"",s=f[i].name||Math.random().toString().replace(".","");if(!o&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[a,l,c]=m.processFileName.call(e,m.filesVariableName(i),f[i],s);p.append(a,l,c)}h&&h(p),m.data&&(0,n.isPlainObject)(m.data)&&Object.keys(m.data).forEach(e=>{p.append(e,m.data[e])}),g&&Object.keys(g).forEach(e=>{p.append(e,g[e])}),m.prepareData.call(e,p),b.push((0,l.send)(e,p).then(t=>{if(m.isSuccess.call(e,t))return((0,n.isFunction)(i)?i:m.defaultHandlerSuccess).call(e,(0,a.normalizeUploaderData)(m.process.call(e,t))),t;let l=new c.UploadError(m.getMessage.call(e,t),t,f,t=>{var o;return d(e,null!=(o=null==t?void 0:t.files)?o:f,i,u,h,{data:{...g,...null==t?void 0:t.data}})});return l.code===o.ERROR_CODE_CONFLICT&&m.promptOnExists?function(e,t){let{files:i}=t;if(i.length>1)return i.reduce((e,i)=>e.then(()=>t.retry({files:[i]})),Promise.resolve());let[o]=i,{j:n,o:a}=e;return new Promise(i=>{let l=!1,c=s.Prompt.call(r.Dlgs.prototype.dlg.call(n,{closeOnClickOverlay:!0}),n.i18n(t.message),n.i18n("Rename"),e=>{if(!(e=e.trim()))return!1;l=!0,i(t.retry({files:[new File([o],e,{type:o.type})]}))},n.i18n("Enter new name"),a.promptOnExistsSuggestName.call(e,o.name));c.e.on(c,"afterClose",()=>{l||i(void 0)})})}(e,l):(((0,n.isFunction)(u)?u:m.defaultHandlerError).call(e,l),t)}).then(()=>{e.j.events&&e.j.e.fire("filesWereUploaded")}))}return Promise.all(b)}},71686:function(e,t,i){"use strict";i.d(t,{send:function(){return a}});var o=i(21537),n=i(41601),r=i(83987);let s=new WeakMap;function a(e,t){let i=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let r=new n.Ajax({xhr(){let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(i(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;i(t*=100)}},!1)):i(100),t},method:e.o.method||"POST",data:t,url:(0,o.isFunction)(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),a=s.get(e);return a||(a=new Set,s.set(e,a)),a.add(r),e.j.e.one("beforeDestruct",r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),null==a||a.delete(r)})};return((0,o.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,o.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}i.d(t,["ajaxInstances",0,s])},76198:function(e,t,i){"use strict";i.d(t,{UploadError:function(){return n}});var o=i(89890);class n extends o.AnswerError{constructor(e,t,i,o){var r;super(e,t,null==(r=t.data)?void 0:r.code),this.files=i,this.retry=o,Object.setPrototypeOf(this,n.prototype)}}},57380:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return d}});var o=i(91907),n=i(82758),r=i(2748),s=i(21537),a=i(89890),l=i(6441),c=i(94122);i(80536);class d extends o.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,i){let o=()=>{e.classList.remove("jodit_drag_hover")},r=this,s=e=>{let s,a,l,d=e.clipboardData,u=e=>{a&&(e.append("extension",l),e.append("mimetype",a.type))};if(!n.IS_IE&&(0,c.hasFiles)(d))return(0,c.sendFiles)(r,d.files,t,i).finally(o),!1;if(n.IS_IE&&!n.IS_ES_NEXT)return(0,c.processOldBrowserDrag)(r,d,t,i,o);if((0,c.hasItems)(d)){let{items:n}=d;for(s=0;s<n.length;s+=1)if("file"===n[s].kind&&"image/png"===n[s].type){if(a=n[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);l=e[1]?e[1].toLowerCase():"",(0,c.sendFiles)(r,[a],t,i,u).finally(o)}e.preventDefault();break}}};r.j&&r.j.editor!==e?r.j.e.on(e,"paste",s):r.j.e.on("beforePaste",s),this.attachEvents(e,t,i,o)}attachEvents(e,t,i,o){let n=this;n.j.e.on(e,"dragend dragover dragenter dragleave drop",e=>{e.preventDefault()}).on(e,"dragover",t=>{((0,c.hasFiles)(t.dataTransfer)||(0,c.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())}).on(e,"dragend dragleave",t=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(t.dataTransfer)&&t.preventDefault()}).on(e,"drop",r=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(r.dataTransfer)&&(r.preventDefault(),r.stopImmediatePropagation(),(0,c.sendFiles)(n,r.dataTransfer.files,t,i).finally(o))});let a=r.Dom.first(e,e=>{var t;return r.Dom.isTag(e,"input")&&(null==(t=(0,s.attr)(e,"type"))?void 0:t.toLowerCase())==="file"});a&&n.j.e.on(a,"change",()=>{(0,c.sendFiles)(n,a.files,t,i).then(()=>{a.value="",/safari/i.test(navigator.userAgent)||(a.type="",a.type="file")}).finally(o)})}uploadRemoteImage(e,t,i){let o=this,{o:n}=o,r=(0,s.isFunction)(i)?i:n.defaultHandlerError;(0,c.send)(o,{action:"fileUploadRemote",url:e}).then(e=>{var i;n.isSuccess.call(o,e)?((0,s.isFunction)(t)?t:n.defaultHandlerSuccess).call(o,(0,c.normalizeUploaderData)(n.process.call(o,e))):r.call(o,(0,a.answer)(n.getMessage.call(o,e),e,null==(i=e.data)?void 0:i.code))}).catch(e=>r.call(o,e))}upload(e){return this.async.promise((t,i)=>{let o=!1,n=e=>t=>{o=!0,e(t)};(0,c.sendFiles)(this,e,n(t),n(i)).then(()=>{o||t({baseurl:"",items:[],files:[],isImages:[]})},n(i))})}destruct(){this.setStatus(o.STATUSES.beforeDestruct);let e=c.ajaxInstances.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch(e){}}),e.clear()),super.destruct()}constructor(e,t){super(e),this.path="",this.source="default",this.options=(0,s.ConfigProto)(t||{},(0,s.ConfigProto)(l.Config.defaultOptions.uploader,(0,s.isJoditObject)(e)?e.o.uploader:{}))}}},22859:function(e,t,i){"use strict";var o=i(22732),n=i(21537),r=i(67510),s=i(37068);r.Icon.set("palette",s.default),i.d(t,["ColorPickerWidget",0,(e,t,i)=>{let s="jodit-color-picker",a=(0,n.normalizeColor)(i),l=e.c.div(s),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:r.Icon.get("palette"),d=e=>{let t=[];return(0,n.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${s}__group ${s}__group-${i}">`),t.push(d(e[i])),t.push("</div>")}):(0,n.isArray)(e)&&e.forEach(e=>{t.push(`<span class='${s}__color-item ${a===e?s+"__color-item_active_true":""}' title="${e}" style="background-color:${e}" data-color="${e}"></span>`)}),t.join("")},u=(0,n.isArray)(e.o.colors)?`<div class="${s}__group">${d(e.o.colors)}</div>`:d(e.o.colors);o.Dom.append(l,e.c.fromHTML(`<div class="${s}__groups">${u}</div>`)),o.Dom.append(l,e.c.fromHTML(`<div data-ref="extra" class="${s}__extra"></div>`));let{extra:h}=(0,n.refs)(l);o.Dom.append(h,e.c.fromHTML(`<div class="${s}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${a||""}"/></div>`));let{hexInput:p}=(0,n.refs)(l),m=null,f=()=>{let e=p.value.trim();if(e===m)return;let i=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),o=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!i&&!o)return;let r=(0,n.normalizeColor)(i&&!e.startsWith("#")?"#"+e:e);r&&(0,n.isFunction)(t)&&(m=e,t(r))};return e.e.on(p,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),f())}).on(p,"change",e=>{e.stopPropagation(),f()}),o.Dom.append(h,e.c.fromHTML(`<span class="${s}__remove" data-color="" title="${e.i18n("Remove")}">${e.o.textIcons?e.i18n("Remove"):r.Icon.get("eraser")}</span>`)),e.o.showBrowserColorPicker&&(0,n.hasBrowserColorPicker)()&&(o.Dom.append(h,e.c.fromHTML(`<div class="${s}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(l,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input")||"color"!==i.type)return;let r=i.value||"";(0,n.isFunction)(t)&&t(r),e.preventDefault()})),e.e.on(l,"mousedown touchend",i=>{if(o.Dom.isTag(i.target,"input"))return void i.stopPropagation();i.stopPropagation(),i.preventDefault();let r=i.target;if((!r||!r.tagName||o.Dom.isTag(r,"svg")||o.Dom.isTag(r,"path"))&&r.parentNode&&(r=o.Dom.closest(r.parentNode,"span",e.editor)),!o.Dom.isTag(r,"span")||!r.classList.contains(s+"__color-item")&&!r.classList.contains(s+"__remove"))return;let a=(0,n.attr)(r,"-color")||"";t&&(0,n.isFunction)(t)&&t(a)}),e.e.fire("afterGenerateColorPicker",l,h,t,a),l}])},37068:function(e,t){"use strict";t.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"> <path d="M12 3a9 9 0 1 0 0 18h1a2 2 0 0 0 1.5-3.3 1.7 1.7 0 0 1 1.3-2.8H18a3 3 0 0 0 3-3A9 9 0 0 0 12 3Z"/><circle cx="7" cy="10" r="0.7"/><circle cx="10" cy="6.5" r="0.7"/><circle cx="15" cy="7" r="0.7"/><circle cx="17.5" cy="11" r="0.7"/> </g> </svg> '},34793:function(e,t,i){"use strict";var o=i(2748),n=i(21537),r=i(67510),s=i(38927);let a=(e,t,{label:i,accept:o})=>{let n=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(i)}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${o}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(n,i=>{t.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:n}};function l(e,t,i){let r=o.Dom.first(e,e=>o.Dom.isTag(e,"input")&&(0,n.attr)(e,"name")===t);return r?(i&&(r.value=i),r.value):""}i.d(t,["FileSelectorWidget",0,(e,t,i,c,d=!0)=>{let u,h=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:i}=t;h.push(a(e,t=>{let o=(0,n.isFunction)(i)?i:p.defaultHandlerSuccess;(0,n.isFunction)(o)&&o.call(e,t)},d?{label:"Drop image",accept:"image/*"}:{label:"Drop file",accept:"*"}))}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){c&&c(),t.filebrowser&&e.filebrowser.open(t.filebrowser,d)}}),t.url){let s=new r.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new r.UIForm(e,[new r.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new r.UIInput(e,{name:"text",label:"Alternative text"}),new r.UIBlock(e,[s])]);i&&!o.Dom.isText(i)&&!o.Dom.isComment(i)&&(o.Dom.isTag(i,"img")||(0,n.$$)("img",i).length)&&(u="IMG"===i.tagName?i:(0,n.$$)("img",i)[0],l(a.container,"url",(0,n.attr)(u,"src")),l(a.container,"text",(0,n.attr)(u,"alt")),s.state.text="Update"),i&&o.Dom.isTag(i,"a")&&(l(a.container,"url",(0,n.attr)(i,"href")),l(a.container,"text",(0,n.attr)(i,"title")),s.state.text="Update"),a.onSubmit(i=>{(0,n.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),h.push({icon:"link",name:"URL",content:a.container})}let m=(0,s.TabsWidget)(e,h);return m.classList.add("jodit-file-selector"),m},"UploadTab",0,a])},92762:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return o.ColorPickerWidget},FileSelectorWidget:function(){return n.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget},UploadTab:function(){return n.UploadTab}});var o=i(22859),n=i(34793),r=i(38927)},38927:function(e,t,i){"use strict";var o=i(91907),n=i(2748),r=i(23282),s=i(29960),a=i(67510),l=i(20014);i.d(t,["TabsWidget",0,(e,t,i)=>{let c=e.c.div("jodit-tabs"),d=e.c.div("jodit-tabs__wrapper"),u=e.c.div("jodit-tabs__buttons");(0,s.attr)(u,{role:"tablist","aria-orientation":"horizontal"});let h={},p=[],m="";n.Dom.append(c,u),n.Dom.append(c,d);let f=e=>{h[e]&&(p.forEach(e=>{e.state.activated=!1}),Object.values(h).forEach(({tab:e})=>e.classList.remove("jodit-tab_active")),h[e].button.state.activated=!0,h[e].tab.classList.add("jodit-tab_active"))};if(t.forEach(({icon:c,name:g,content:b})=>{let v=e.c.div("jodit-tab");(0,s.attr)(v,{role:"tabpanel"});let y=(0,a.Button)(e,c||g,g);y.state.role="tab",e.e.on(y.container,"pointerdown",e=>e.preventDefault()),m||(m=g),n.Dom.append(u,y.container),p.push(y),y.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,r.isFunction)(b)?v.classList.add("jodit-tab_empty"):n.Dom.append(v,o.Component.isInstanceOf(b,a.UIElement)?b.container:b),n.Dom.append(d,v),y.onAction(()=>(f(g),(0,r.isFunction)(b)&&!n.Dom.isElement(b)&&b.call(e),i&&(i.activeTab=g),(0,l.focusFormField)(v),!1)),h[g]={button:y,tab:v}}),f(i&&i.activeTab&&h[i.activeTab]?i.activeTab:m),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,f(t)}})}return c}])},73391:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(21537),s=i(12153),a=i(6441),l=i(49399);a.Config.prototype.controls.about={exec(e){let t=e.dlg({closeOnClickOverlay:!0}),i=e.i18n.bind(e);t.setMod("theme",e.o.theme).setHeader(i("About Jodit")).setContent(`<div class="jodit-about">
124
+ </form>`)}])},41409:function(e,t,i){"use strict";i.r(t),i.d(t,{Ajax:function(){return p.Ajax},Alert:function(){return s.Alert},Async:function(){return l.Async},AsyncStorage:function(){return j.AsyncStorage},Button:function(){return m.Button},CommitStyle:function(){return T.CommitStyle},Component:function(){return o.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return c.Create},Dialog:function(){return s.Dialog},Dom:function(){return d.Dom},EventEmitter:function(){return u.EventEmitter},EventHandlersStore:function(){return u.EventHandlersStore},Eventify:function(){return u.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return n},History:function(){return b.History},Icon:function(){return m.Icon},ImageEditor:function(){return y.ImageEditor},IndexedDBProvider:function(){return j.IndexedDBProvider},LazyWalker:function(){return d.LazyWalker},LocalStorageProvider:function(){return j.LocalStorageProvider},MemoryStorageProvider:function(){return j.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return I.PluginSystem},Popup:function(){return m.Popup},ProgressBar:function(){return m.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return o.STATUSES},Selection:function(){return T.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return _.StatusBar},Storage:function(){return j.Storage},StorageKey:function(){return j.StorageKey},Table:function(){return k.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return S.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return x.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return m.UIBlock},UIButton:function(){return m.UIButton},UIButtonGroup:function(){return m.UIButtonGroup},UIButtonState:function(){return m.UIButtonState},UICheckbox:function(){return m.UICheckbox},UIElement:function(){return m.UIElement},UIFileInput:function(){return m.UIFileInput},UIForm:function(){return m.UIForm},UIGroup:function(){return m.UIGroup},UIInput:function(){return m.UIInput},UIList:function(){return m.UIList},UIMessages:function(){return w.UIMessages},UISelect:function(){return m.UISelect},UISeparator:function(){return m.UISeparator},UISpacer:function(){return m.UISpacer},UITextArea:function(){return m.UITextArea},UITooltip:function(){return m.UITooltip},Uploader:function(){return E.Uploader},View:function(){return f.View},ViewComponent:function(){return o.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return j.canUseIndexedDB},canUsePersistentStorage:function(){return j.canUsePersistentStorage},clearUseIndexedDBCache:function(){return j.clearUseIndexedDBCache},defaultNameSpace:function(){return u.defaultNameSpace},observable:function(){return u.observable}});var o=i(91907),n=i(21537),r=i(80870),s=i(638),a=i(78513),l=i(8884),c=i(12060),d=i(22732),u=i(3827),h=i(50911),p=i(41601),m=i(67510),f=i(35608),g=i(84075),b=i(78818),v=i(52604),y=i(50050),w=i(1808),_=i(23512),k=i(76014),C=i(36646),S=i(11676),x=i(37426),E=i(57380),I=i(41876),T=i(59242),j=i(12081)},68389:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return r}});var o=i(87325),n=i(67510);let r=class e extends n.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}};r=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],r)},1808:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return l}});var o=i(87325),n=i(2748),r=i(41180),s=i(62405),a=i(68389);let l=class e extends s.UIGroup{className(){return"UIMessages"}info(e,t){this.__message(e,"info",t)}success(e,t){this.__message(e,"success",t)}error(e,t){this.__message(e,"error",t)}message(e,t,i){this.__message(e,t,i)}__message(e,t="info",i){let o=e+":"+t;if(this.__messages.has(o))return void this.async.updateTimeout(o,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);n.Dom.append(this.__box,this.container);let r=new a.UIMessage(this.j,{text:e,variant:t});this.append(r),this.__calcOffsets(),this.__messages.add(o);let s=this.__getRemoveCallback(r,o);this.j.e.on(r.container,"pointerdown",s),this.async.setTimeout(s,{label:o,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=o=>{o&&o.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",i),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let e=5;this.elements.forEach(t=>{(0,r.css)(t.container,"bottom",e+"px"),e+=t.container.offsetHeight+this.options.defaultOffset})}constructor(e,t,i={defaultTimeout:3e3,defaultOffset:5}){super(e),this.__box=t,this.options=i,this.__messages=new Set}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},23512:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return l}});var o=i(91907),n=i(65478),r=i(2748),s=i(14316),a=i(34176);let l=class e extends o.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){var e,t;return null!=(t=null==(e=this.container)?void 0:e.offsetHeight)?t:0}findEmpty(e=!1){let t=this.getElms(e?"item-right":"item");for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){let i=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&i.classList.add(this.getFullElName("item-right")),r.Dom.append(i,e),this.container&&r.Dom.append(this.container,i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(o.STATUSES.beforeDestruct),r.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),this.target=t,this.mods={},this.container=e.c.div("jodit-status-bar"),r.Dom.append(t,this.container),this.hide()}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component,(0,n.derive)(a.Mods,s.Elms)],l)},76014:function(e,t,i){"use strict";i.d(t,{Table:function(){return u}});var o=i(91907),n=i(82758),r=i(22732),s=i(580),a=i(21537),l=i(41180);let c=new Set(["thead","tbody","tfoot"]),d=new WeakMap;class u extends o.ViewComponent{className(){return"Table"}addSelection(e){this.selected.add(e),this.__recalculateStyles();let t=r.Dom.closest(e,"table",this.j.editor);if(t){let i=u.__selectedByTable.get(t)||new Set;i.add(e),u.__selectedByTable.set(t,i)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=r.Dom.closest(e,"table",this.j.editor);if(t){let i=u.__selectedByTable.get(t);i&&(i.delete(e),i.size||u.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,a.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=u.__selectedByTable.get(e);return t?(0,a.toArray)(t):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(e){return u.__getRowsCount(e)}static __getColumnsCount(e){return u.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return u.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],o=(0,a.toArray)(e.rows),n=(e,o)=>{void 0===i[o]&&(i[o]=[]);let n=e.colSpan,r=e.rowSpan,s,a,l=0;for(;i[o][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<n;s+=1){if(void 0===i[o+a]&&(i[o+a]=[]),t&&!1===t(e,o+a,l+s,n,r))return!1;i[o+a][l+s]=e}};for(let e=0;e<o.length;e+=1){let t=(0,a.toArray)(o[e].cells);for(let o=0;o<t.length;o+=1)if(!1===n(t[o],e))return i}return i}formalMatrix(e,t){return u.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let o=0,n=0,r=1,s=1;return u.__formalMatrix(e,(e,a,l,c,d)=>{if(t===e)return o=a,n=l,r=c||1,s=d||1,i&&(n+=(c||1)-1,o+=(d||1)-1),!1}),[o,n,r,s]}formalCoordinate(e,t,i=!1){return u.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,o){let n;if(t)n=t.cloneNode(!0),r.Dom.each(t,e=>{if(!r.Dom.isCell(e))return;let t=(0,a.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){let i=parseInt(t,10)-1;(0,a.attr)(e,"rowspan",i>1?i:null)}}),r.Dom.each(n,e=>{r.Dom.isCell(e)&&(r.Dom.detach(e),r.Dom.append(e,o.element("br")))});else{let t=u.__getColumnsCount(e);n=o.element("tr");for(let e=0;e<t;e+=1){let e=o.element("td");r.Dom.append(e,o.element("br")),r.Dom.append(n,e)}}let s=t&&t.parentElement;if(i&&t&&!t.nextElementSibling&&r.Dom.isTag(s,"thead")){let t=u.__bodyOf(e,s,o);t.insertBefore(n,t.firstChild),u.__setCellsTag(n,"td",o)}else i&&t&&t.nextSibling?r.Dom.after(t,n):!i&&t?r.Dom.before(t,n):r.Dom.append(r.Dom.first(e,e=>r.Dom.isTag(e,"tbody"))||e,n)}static __bodyOf(e,t,i){let o=e.tBodies[0];return o||(o=i.element("tbody"),r.Dom.after(t,o)),o}static __setCellsTag(e,t,i,o){(0,a.toArray)(e.cells).forEach(e=>{let n=r.Dom.isTag(e,t)?e:r.Dom.replace(e,t,i,!0);n!==e&&(null==o||o.set(e,n)),"td"===t?(0,a.attr)(n,"scope",null):n.hasAttribute("scope")||(0,a.attr)(n,"scope","col")})}hasHeaderRow(e){var t;return!!(null==(t=e.tHead)?void 0:t.rows.length)}canToggleHeaderRow(e){let[t]=(0,a.toArray)(e.rows);return this.hasHeaderRow(e)||!!(t&&(0,a.toArray)(t.cells).every(e=>e.rowSpan<2))}toggleHeaderRow(e){let t=new Map,i=this.j.createInside,o=e.tHead;if(!this.canToggleHeaderRow(e))return t;if(o&&this.hasHeaderRow(e)){let n=u.__bodyOf(e,o,i),s=n.firstChild;(0,a.toArray)(o.rows).forEach(e=>{n.insertBefore(e,s),u.__setCellsTag(e,"td",i,t)}),r.Dom.safeRemove(o)}else{let[n]=(0,a.toArray)(e.rows),s=o||i.element("thead");o||(e.tHead=s),r.Dom.append(s,n),u.__setCellsTag(n,"th",i,t)}return t}appendRow(e,t,i){return u.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,o=u.__formalMatrix(e),n=e.rows[t];o[t].forEach((s,l)=>{if(i=!1,t-1>=0&&o[t-1][l]===s)i=!0;else if(o[t+1]&&o[t+1][l]===s){if(s.parentNode===n&&s.parentNode.nextSibling){i=!0;let n=l+1;for(;o[t+1][n]===s;)n+=1;let a=r.Dom.next(s.parentNode,e=>r.Dom.isTag(e,"tr"),e);if(a){let e=null;for(let i=n;i<o[t+1].length;i+=1){let n=o[t+1][i];if(n&&n.parentNode===a){e=n;break}}e?r.Dom.before(e,s):r.Dom.append(a,s)}}}else r.Dom.safeRemove(s);if(i&&(s.parentNode===n||s!==o[t][l-1])){let e=s.rowSpan;(0,a.attr)(s,"rowspan",e-1>1?e-1:null)}});let s=n.parentElement;r.Dom.safeRemove(n),r.Dom.isTag(s,c)&&!s.rows.length&&r.Dom.safeRemove(s)}removeRow(e,t){return u.__removeRow(e,t)}appendColumn(e,t,i=!0){let o=u.__formalMatrix(e);if(!i&&r.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,n]=u.__formalCoordinate(e,t,i),s=i?n+1:n;for(let e=0;e<o.length;){let t=o[e];if(t[n]!==t[s]||n===s){let e=this.j.createInside.element("td");r.Dom.append(e,this.j.createInside.element("br")),i?r.Dom.after(t[n],e):r.Dom.before(t[n],e),t[n].rowSpan>1&&(e.rowSpan=t[n].rowSpan)}else t[n].colSpan+=1;e+=t[n].rowSpan||1}}static __removeColumn(e,t){let i,o=u.__formalMatrix(e);o.forEach((e,n)=>{let s=e[t];if(i=!1,t-1>=0&&o[n][t-1]===s||t+1<e.length&&o[n][t+1]===s?i=!0:r.Dom.safeRemove(s),i&&(n-1<0||s!==o[n-1][t])){let e=s.colSpan;(0,a.attr)(s,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return u.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,o,n,r=[[1/0,1/0],[0,0]],s=u.__formalMatrix(e);for(i=0;i<s.length;i+=1)for(o=0;s[i]&&o<s[i].length;o+=1)t.includes(s[i][o])&&(r[0][0]=Math.min(i,r[0][0]),r[0][1]=Math.min(o,r[0][1]),r[1][0]=Math.max(i,r[1][0]),r[1][1]=Math.max(o,r[1][1]));for(i=r[0][0];i<=r[1][0];i+=1)for(n=1,o=r[0][1];o<=r[1][1];o+=1){for(;s[i]&&s[i][o-n]&&s[i][o]===s[i][o-n];)r[0][1]=Math.min(o-n,r[0][1]),r[1][1]=Math.max(o-n,r[1][1]),n+=1;for(n=1;s[i]&&s[i][o+n]&&s[i][o]===s[i][o+n];)r[0][1]=Math.min(o+n,r[0][1]),r[1][1]=Math.max(o+n,r[1][1]),n+=1;for(n=1;s[i-n]&&s[i][o]===s[i-n][o];)r[0][0]=Math.min(i-n,r[0][0]),r[1][0]=Math.max(i-n,r[1][0]),n+=1;for(n=1;s[i+n]&&s[i][o]===s[i+n][o];)r[0][0]=Math.min(i+n,r[0][0]),r[1][0]=Math.max(i+n,r[1][0]),n+=1}return r}getSelectedBound(e,t){return u.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=u.__formalMatrix(e);u.__removeExtraColspans(i,t),u.__removeExtraRowspans(i,t);for(let e=0;e<i.length;e+=1)for(let t=0;t<i[e].length;t+=1)void 0!==i[e][t]&&(i[e][t].hasAttribute("rowspan")&&1===i[e][t].rowSpan&&(0,a.attr)(i[e][t],"rowspan",null),i[e][t].hasAttribute("colspan")&&1===i[e][t].colSpan&&(0,a.attr)(i[e][t],"colspan",null),i[e][t].hasAttribute("class")&&!(0,a.attr)(i[e][t],"class")&&(0,a.attr)(i[e][t],"class",null));u.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let o=1e6,n=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){n=!0;break}o=Math.min(o,e[t][i].colSpan)}if(!n)for(let n=0;n<e.length;n+=1)void 0!==e[n][i]&&u.__mark(e[n][i],"colspan",e[n][i].colSpan-o+1,t)}}static __removeExtraRowspans(e,t){let i,o;for(i=0;i<e.length;i+=1){let n=1e6,r=!1;for(o=0;o<e[i].length;o+=1)if(void 0!==e[i][o]){if(e[i][o].rowSpan<2){r=!0;break}n=Math.min(n,e[i][o].rowSpan)}if(!r)for(o=0;o<e[i].length;o+=1)void 0!==e[i][o]&&u.__mark(e[i][o],"rowspan",e[i][o].rowSpan-n+1,t)}}normalizeTable(e){return u.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],o=u.__getSelectedBound(e,u.__getSelectedCellsByTable(e)),s=0,c=null,d=0,p=0,m=0,f=new Set,g=[];o&&(o[0][0]-o[1][0]||o[0][1]-o[1][1])&&(u.__formalMatrix(e,(e,n,r,b,v)=>{n>=o[0][0]&&n<=o[1][0]&&r>=o[0][1]&&r<=o[1][1]&&(f.has(e)||(f.add(e),n===o[0][0]&&(0,l.cssInline)(e,"width")&&(s+=e.offsetWidth),""!==(0,a.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),b>1&&(p+=b-1),v>1&&(m+=v-1),c?(u.__mark(e,"remove",1,g),h(t).removeSelection(e)):(c=e,d=r)))}),p=o[1][1]-o[0][1]+1,m=o[1][0]-o[0][0]+1,c&&(p>1&&u.__mark(c,"colspan",p,g),m>1&&u.__mark(c,"rowspan",m,g),s&&(u.__mark(c,"width",(s/e.offsetWidth*100).toFixed(n.ACCURACY)+"%",g),d&&u.__setColumnWidthByDelta(e,d,0,!0,g)),c.innerHTML=i.join("<br/>")||"<br/>",h(t).addSelection(c),f.delete(c),u.__unmark(g),u.__normalizeTable(e),(0,a.toArray)(e.rows).forEach(e=>{e.cells.length||r.Dom.safeRemove(e)})))}mergeSelected(e){return u.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,o,n,s,a,l=[];u.__getSelectedCellsByTable(e).forEach(c=>{o=t.createInside.element("td"),r.Dom.append(o,t.createInside.element("br")),n=t.createInside.element("tr"),i=u.__formalCoordinate(e,c),c.rowSpan<2?(u.__formalMatrix(e,(e,t,o)=>{i[0]===t&&i[1]!==o&&e!==c&&u.__mark(e,"rowspan",e.rowSpan+1,l)}),r.Dom.after(r.Dom.closest(c,"tr",e),n),r.Dom.append(n,o)):(u.__mark(c,"rowspan",c.rowSpan-1,l),u.__formalMatrix(e,(t,o,n)=>{o>i[0]&&o<i[0]+c.rowSpan&&i[1]>n&&t.parentNode.rowIndex===o&&(a=t),i[0]<o&&t===c&&(s=e.rows[o])}),a?r.Dom.after(a,o):r.Dom.prepend(s,o)),c.colSpan>1&&u.__mark(o,"colspan",c.colSpan,l),u.__unmark(l),h(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return u.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,o,s,a=[];u.__getSelectedCellsByTable(e).forEach(l=>{i=u.__formalCoordinate(e,l),l.colSpan<2?u.__formalMatrix(e,(e,t,o)=>{i[1]===o&&i[0]!==t&&e!==l&&u.__mark(e,"colspan",e.colSpan+1,a)}):u.__mark(l,"colspan",l.colSpan-1,a),o=t.createInside.element("td"),r.Dom.append(o,t.createInside.element("br")),l.rowSpan>1&&u.__mark(o,"rowspan",l.rowSpan,a);let c=l.offsetWidth;r.Dom.after(l,o),s=c/e.offsetWidth/2,u.__mark(l,"width",(100*s).toFixed(n.ACCURACY)+"%",a),u.__mark(o,"width",(100*s).toFixed(n.ACCURACY)+"%",a),u.__unmark(a),h(t).removeSelection(l)}),u.__normalizeTable(e)}splitVertical(e){return u.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,o,r){let s=u.__formalMatrix(e),a=0;for(let o=0;o<s.length;o+=1){let l=s[o][t];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+i)/e.offsetWidth*100;u.__mark(l,"width",c.toFixed(n.ACCURACY)+"%",r),a=o;break}for(let e=a+1;e<s.length;e+=1){let i=s[e][t];u.__mark(i,"width",null,r)}o||u.__unmark(r)}setColumnWidthByDelta(e,t,i,o,n){return u.__setColumnWidthByDelta(e,t,i,o,n)}static __mark(e,t,i,o){var n;o.push(e);let r=null!=(n=d.get(e))?n:{};r[t]=void 0===i?1:i,d.set(e,r)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let o=t[i];switch(i){case"remove":r.Dom.safeRemove(e);break;case"rowspan":(0,a.attr)(e,"rowspan",(0,a.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,a.attr)(e,"colspan",(0,a.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(e.style.removeProperty("width"),(0,a.attr)(e,"style")||(0,a.attr)(e,"style",null)):(0,a.css)(e,"width",o.toString())}delete t[i]}),d.delete(e))})}constructor(){super(...arguments),this.selected=new Set,this.__recalculateStyles=this.async.microDebounce(()=>{let e=(0,s.getContainer)(this.j,u,"style",!0),t=[];this.selected.forEach(e=>{let i=(0,a.cssPath)(e);i&&t.push(i)});let i=t.length>1?t.map(e=>`${e}::selection,${e} ::selection`).join(",")+"{background:transparent}":"";e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`+i:""})}}u.__selectedByTable=new WeakMap;let h=e=>e.getInstance("Table",e.o)},78644:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return D}});var o,n=i(4012),r=i(78213),s=i(82758),a=i(45219),l=i(33433),c=i(87325),d=i(37133),u=i(2748),h=i(68345),p=i(23282),m=i(19306),f=i(72430),g=i(70799),b=i(56175),v=i(87058),y=i(38837),w=i(29960),_=i(37790),k=i(62843),C=i(20014),S=i(72157),x=i(12153),E=i(56917),I=i(21491),T=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let j=new Set(["input","textarea","select"]),D=o=class e extends k.UIButton{className(){return"ToolbarButton"}getRole(){return"listitem"}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,w.attr)(this.trigger,"aria-label",e)}}get toolbar(){let e=(0,c.getComponentClass)("ToolbarCollection");return this.closest(e)}update(){var e,t;let{control:i,state:o}=this,n=this.toolbar;if(!n)return;let r=null==(e=i.value)?void 0:e.call(i,n.jodit,this);void 0!==r&&(o.value=r),o.disabled=this.__calculateDisabledStatus(n),o.activated=this.__calculateActivatedStatus(n),null==(t=i.update)||t.call(i,n.jodit,this)}__calculateActivatedStatus(e){var t,i;return(!(0,m.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(null!=(i=(t=this.control).isActive)&&!!i.call(t,this.j,this)||!!(e&&e.shouldBeActive(this)))}__calculateDisabledStatus(e){var t,i;return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||(null==(i=(t=this.control).isDisabled)?void 0:i.call(t,this.j,this)))||!!(e&&e.shouldBeDisabled(this))}get isToggle(){let{isActive:e,tags:t,css:i}=this.control;return!!(e||t||i)}onChangeActivated(){(0,w.attr)(this.button,"aria-pressed",this.isToggle?this.state.activated:null),this.setMod("activated",this.state.activated||null)}onChangeText(){(0,p.isFunction)(this.control.template)?(this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)),this.updateAriaLabel()):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,w.attr)(this.button,"tabindex",this.state.tabIndex),(0,w.attr)(this.trigger,"tabindex",this.state.tabIndex)}createContainer(){let e=this.componentName,t=this.j.c.span(e),i=super.createContainer();i.classList.remove(e),i.classList.add(e+"__button"),Object.defineProperty(i,"component",{value:this,configurable:!0}),u.Dom.append(t,i);let o=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${x.Icon.get("chevron")}</span>`);return u.Dom.append(i,o),t}focus(){var e;null==(e=u.Dom.first(this.container,e=>u.Dom.isTag(e,"button")))||e.focus()}onChangeHasTrigger(){this.state.hasTrigger?u.Dom.append(this.container,this.trigger):u.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?"disabled":null;(0,w.attr)(this.trigger,"disabled",e),(0,w.attr)(this.button,"disabled",e),(0,w.attr)(this.container,"disabled",e)}__initFromControl(){let{control:e,state:t}=this;this.updateSize(),t.name=e.name,this.__initIconFromControl(),e.tooltip&&(t.tooltip=(0,p.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec),this.onChangeActivated()}__initIconFromControl(){var e;let{control:t,state:i}=this,{textIcons:o}=this.j.o;if(!0===o||(0,p.isFunction)(o)&&o(t.name)||t.template){i.icon=(0,k.UIButtonState)().icon,i.text=t.text||t.name;return}if(!(0,g.isString)(t.icon)&&null!=t.icon){i.icon={name:t.icon.name||t.name,iconURL:t.icon.iconURL||"",fill:t.icon.fill||"",scale:t.icon.scale};return}if(t.iconURL)i.icon.iconURL=t.iconURL;else{let o=t.icon||t.name;i.icon.name=x.Icon.exists(o)||(null==(e=this.j.o.extraIcons)?void 0:e[o])?o:""}t.iconURL||i.icon.name||(i.text=t.text||t.name)}onTriggerClick(e){var t,i,o;if(this.openedPopup)return void this.__closePopup();let{control:n}=this;if((0,w.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},n.list)return this.__openControlList(n);if((0,p.isFunction)(n.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,v.camelCase)(`before-${n.name}-open-popup`),this.target,n,e)){let r=null!=(o=null!=(i=null==(t=this.toolbar)?void 0:t.getTarget(this))?i:this.target)?o:null,s=n.popup(this.j,r,this.__closePopup,this);s?(e.setContent((0,g.isString)(s)?this.j.c.fromHTML(s):s).open(()=>(0,b.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),(0,C.focusFormField)(e.container)):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,v.camelCase)(`after-${n.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||(e.key===s.KEY_DOWN?this.onButtonKeyDown(e):[s.KEY_ENTER,s.KEY_SPACE," "].includes(e.key)&&(e.preventDefault(),this.trigger.click()))}onButtonKeyDown(e){var t;e.key!==s.KEY_DOWN||this.state.disabled||!this.state.hasTrigger||e.altKey||e.ctrlKey||e.metaKey||(e.preventDefault(),e.stopPropagation(),this.openedPopup||this.trigger.click(),null==(t=this.__popupFocusables()[0])||t.focus())}__onPopupKeyDown(e){if(!this.openedPopup||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(u.Dom.isTag(t,j)&&e.key!==s.KEY_ESC)return;let i=this.__popupFocusables(),o=i.indexOf(t);switch(e.key){case s.KEY_ESC:this.__closePopup();break;case s.KEY_UP:o<=0?this.__closePopup():i[o-1].focus();break;case s.KEY_DOWN:if(!i.length)return;i[(o+1)%i.length].focus();break;default:if(!this.control.list||!this.__typeAhead(e.key,i,o))return}e.preventDefault(),e.stopPropagation()}__onEditorKeyDown(e){if(this.openedPopup&&this.control.list&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&this.__typeAhead(e.key,this.__popupFocusables(),-1))return e.preventDefault(),!1}__typeAhead(e,t,i){var o,n;let r=Date.now();if((r-this.__typedAt>1e3||t[i]!==this.__typedTo)&&(this.__typed=""),1!==e.length||" "===e&&!this.__typed)return!1;this.__typedAt=r,this.__typed+=e,this.__typedTo=t[i];let{compare:s}=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"}),a=this.__typed,l=Array.from(a).every(e=>0===s(e,a[0])),c=l?a[0]:a,d=l?i+1:Math.max(i,0);for(let e=0;e<t.length;e+=1){let i=t[(d+e)%t.length];if(0===s((null!=(n=null==(o=i.textContent)?void 0:o.trim())?n:"").slice(0,c.length),c)){i.focus(),this.__typedTo=i;break}}return!0}__popupFocusables(){let e=this.openedPopup;return e?Array.from(e.container.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter(e=>!!e.offsetParent):[]}__openControlList(e){var t,i,o,n,r;let s=null!=(t=this.jodit.options.controls)?t:{},a=e=>(0,S.findControlType)(e,s),l=e.list,c=this.openPopup();c.parentElement=this;let d=null==(i=e.popup)?void 0:i.call(e,this.j,null!=(r=null!=(n=null==(o=this.toolbar)?void 0:o.getTarget(this))?n:this.target)?r:null,this.__closePopup,this);if(d)return this.__openMenu(c,d);let u=(0,I.makeCollection)(this.j);u.parentElement=c,u.mode="vertical";let p=(t,i)=>{let o;if((0,g.isString)(i)&&a(i))return{name:i.toString(),...a(i)};if((0,g.isString)(t)&&a(t))return{name:t.toString(),...a(t),..."object"==typeof i?i:{}};o=t,(0,f.isPlainObject)(o)&&"title"in o&&"value"in o&&(i=t.value,t=t.title);let{childTemplate:n}=e,r={name:t.toString(),template:n&&((e,t,i)=>n(e,t,i,this)),exec:e.childExec?(t,i,o)=>{var n;return null==(n=e.childExec)?void 0:n.call(e,t,i,{...o,parentControl:e})}:e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,i]};return(0,g.isString)(i)&&(r.text=i),r};u.build((0,h.isArray)(l)?l.map(p):(0,_.keys)(l,!1).map(e=>p(e,l[e])),this.target),this.__openMenu(c,u)}__openMenu(e,t){e.setContent(t).open(()=>(0,b.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(e&&u.Dom.isNode(e.target)&&(u.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new E.Popup(this.j,!1),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),this.openedPopup}__closePopup(){let e=this.openedPopup;if(!e)return;this.openedPopup=null,this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick).off("keydown",this.__onEditorKeyDown);let{activeElement:t}=this.od,i=t&&u.Dom.isOrContains(e.container,t),o=i&&u.Dom.closest(t,"form",e.container);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,w.attr)(this.trigger,"aria-expanded",!1),o&&(0,m.isJoditObject)(this.j)?this.j.s.focus():i&&this.focus()}onClick(e){var t,i,o,n,r,s,a;let{control:l}=this;if((0,p.isFunction)(l.exec)){let c=null!=(o=null!=(i=null==(t=this.toolbar)?void 0:t.getTarget(this))?i:this.target)?o:null,d=l.exec(this.j,c,{control:l,originalEvent:e,button:this});if(!1!==d&&!0!==d&&(null==(r=null==(n=this.j)?void 0:n.e)||r.fire("synchro"),this.parentElement&&this.parentElement.update(),this.__closePopups(),null==(a=null==(s=this.j)?void 0:s.e)||a.fire("afterExec")),!1!==d)return}return l.list?this.__openControlList(l):(0,p.isFunction)(l.popup)?this.onTriggerClick(e):void((l.command||l.name)&&((0,_.call)((0,m.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),l.command||l.name,!1,l.args&&l.args[0]),this.__closePopups()))}__closePopups(){var e,t;let i=[this];for(let e=this.parentElement;e;e=e.parentElement){if(n.Component.isInstanceOf(e,E.Popup)&&e.keepOpen&&(!this.target||this.target.isConnected)){i.forEach(e=>e.__closePopup()),e.updatePosition();return}n.Component.isInstanceOf(e,o)&&i.push(e)}null==(t=null==(e=this.j)?void 0:e.e)||t.fire("closeAllPopups")}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,i=null){super(e),this.control=t,this.target=i,this.state={...(0,k.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.__typed="",this.__typedAt=0,this.__typedTo=null,this.openedPopup=null;let o=this.getElm("button");(0,y.assert)(o,"Element button should exists"),this.button=o,Object.defineProperty(o,"component",{value:this,configurable:!0});let n=this.getElm("trigger");(0,y.assert)(n,"Element trigger should exists"),this.trigger=n,n.remove(),e.e.on([this.button,this.trigger],"mousedown",e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(r.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}};T([l.cacheHTML],D.prototype,"createContainer",null),T([(0,d.watch)("state.hasTrigger",{immediately:!1})],D.prototype,"onChangeHasTrigger",null),T([(0,d.watch)("trigger:click")],D.prototype,"onTriggerClick",null),T([(0,d.watch)("trigger:keydown")],D.prototype,"onTriggerKeyDown",null),T([(0,d.watch)("button:keydown")],D.prototype,"onButtonKeyDown",null),T([a.autobind],D.prototype,"__onPopupKeyDown",null),T([a.autobind],D.prototype,"__onEditorKeyDown",null),T([a.autobind],D.prototype,"onOutsideClick",null),T([a.autobind],D.prototype,"__closePopup",null),D=o=T([c.component],D)},80319:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return l}});var o=i(65478),n=i(22732),r=i(21537),s=i(62843);let a=new Set(["input","button","select","textarea"]),l=class e extends s.UIButton{className(){return"ToolbarContent"}getRole(){return"listitem"}onChangeActivated(){}update(){var e,t,i;let{control:o}=this,s=o.getContent(this.j,this);((0,r.isString)(s)||s.parentNode!==this.container)&&(n.Dom.detach(this.container),n.Dom.append(this.container,(0,r.isString)(s)?this.j.create.fromHTML(s):s)),this.state.disabled=!!(null==(e=o.isDisabled)?void 0:e.call(o,this.j,this)),this.state.activated=!!(null==(t=o.isActive)?void 0:t.call(o,this.j,this)),null==(i=o.update)||i.call(o,this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),n.Dom.each(this.container,e=>{n.Dom.isTag(e,a)&&(0,r.attr)(e,"disabled",this.state.disabled||null)})}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,i=null){super(e),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},36646:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return o.ToolbarButton},ToolbarContent:function(){return n.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var o=i(78644),n=i(80319),r=i(83111)},83111:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return l}});var o=i(65478),n=i(72430),r=i(70799),s=i(29960),a=i(78644);let l=class e extends a.ToolbarButton{className(){return"ToolbarSelect"}get isToggle(){return!1}update(){var e,t,i;super.update(),this.state.icon.name="";let{list:o,data:s}=this.control;if(o){let a=this.state.value||(s&&(0,r.isString)(s.currentValue)?s.currentValue:void 0);a||(a=Object.keys(o)[0]);let l=((0,n.isPlainObject)(o)&&o[a.toString()]||a).toString();this.state.text=null!=(i=null==(t=(e=this.control).textTemplate)?void 0:t.call(e,this.jodit,l))?i:l}}updateAriaLabel(){var e;super.updateAriaLabel();let{tooltip:t}=this.state,i=null==(e=this.text.textContent)?void 0:e.trim();t&&i&&(0,s.attr)(this.button,"aria-label",`${this.jodit.i18n(t)}, ${i}`)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},11676:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return m}});var o=i(65478),n=i(45219),r=i(87325),s=i(97357),a=i(37133),l=i(29960),c=i(41180),d=i(82760),u=i(24536),h=i(21491),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=class e extends u.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,h.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,h.makeSelect)(this.j,e,t)}shouldBeActive(e){}shouldBeDisabled(e){}getTarget(e){return e.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar",this))}update(){this.__immediateUpdate()}setDirection(e){(0,c.css)(this.container,"direction",e),(0,l.attr)(this.container,"dir",e)}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on("afterSetMode focus",this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(e){throw(0,d.error)("The method is not implemented for this class.")}build(e,t=null){let i=this.j.e.fire("beforeToolbarBuild",e);return i&&(e=i),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(e){super(e),this.__listenEvents="updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur"}};p([(0,a.watch)(":afterInit"),n.autobind],m.prototype,"__immediateUpdate",null),p([(0,o.debounce)(e=>e.j.defaultTimeout,!0)],m.prototype,"update",null),p([(0,s.hook)("ready")],m.prototype,"__initEvents",null),m=p([r.component],m)},37426:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return l}});var o=i(82758),n=i(65478),r=i(22732),s=i(21537),a=i(11676);let l=class e extends a.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(void 0!==t)return t;let i=void 0===e.control.mode?o.MODE_WYSIWYG:e.control.mode;return i!==o.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let o=this.j.selection?this.j.s.current():null;if(!o)return!1;if(e.control.tags){let i=e.control.tags;if(t=o,r.Dom.up(t,e=>{if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let i=e.control.css;if(t=o,r.Dom.up(t,e=>{if(e&&!r.Dom.isText(e)&&!r.Dom.isComment(e))return this.checkActiveStatus(i,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}prependInvisibleInput(e){let t=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});r.Dom.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire("showInlineToolbar",e)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(e){super(e),this.checkActiveStatus=(e,t)=>{let i=0,o=0;return Object.keys(e).forEach(n=>{let r=e[n];(0,s.isFunction)(r)?r(this.j,(0,s.css)(t,n).toString())&&(i+=1):-1!==r.indexOf((0,s.css)(t,n).toString())&&(i+=1),o+=1}),o===i},this.prependInvisibleInput(this.container)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component],l)},21491:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var o=i(87325),n=i(23282),r=i(19306);function s(e,t){let i=(0,o.getComponentClass)("ToolbarCollection"),n=(0,o.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new n(e):new i(e);return e.o.textIcons&&s.container.classList.add("jodit_text_icons"),t&&(s.parentElement=t),e.o.toolbarButtonSize&&(s.buttonSize=e.o.toolbarButtonSize),s}function a(e,t,i=null){if((0,n.isFunction)(t.getContent))return new((0,o.getComponentClass)("ToolbarContent"))(e,t,i);let r=new((0,o.getComponentClass)("ToolbarButton"))(e,t,i);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,i=null){let n=new((0,o.getComponentClass)("ToolbarSelect"))(e,t,i);return n.state.tabIndex=e.o.allowTabNavigation?0:-1,n}},80536:function(e,t,i){"use strict";var o=i(68345),n=i(19306),r=i(29960),s=i(6441),a=i(2073);s.Config.prototype.enableDragAndDropFileToEditor=!0,s.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,showTabInFileSelector:!0,imagesExtensions:["jpg","jpeg","png","gif","webp","bmp","svg","tiff","avif"],headers:null,data:null,filesVariableName:e=>`files[${e}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:e=>e,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,o.isArray)(e.data.messages)?e.data.messages.join(" "):"",processFileName:(e,t,i)=>[e,t,i],process:e=>e.data,error(e){this.j.message.error(e.message,4e3)},getDisplayName:(e,t)=>e+t,defaultHandlerSuccess(e){let t=this.j||this;if(!(0,n.isJoditObject)(t))return;let{baseurl:i}=e;(0,a.getItems)(e).forEach(({file:e,isImage:o})=>{let[n,s]=o?["img","src"]:["a","href"],a=t.createInside.element(n);(0,r.attr)(a,s,i+e),"a"===n&&(a.textContent=t.o.uploader.getDisplayName.call(this,i,e)),"img"===n?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},promptOnExists:!0,promptOnExistsSuggestName:e=>e,contentType(e){return(void 0===this.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},83987:function(e,t,i){"use strict";i.d(t,{buildData:function(){return n}});var o=i(21537);function n(e,t){if((0,o.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let i=e.ow.FormData;if(void 0!==i){if(t instanceof i||(0,o.isString)(t))return t;let e=new i;return Object.keys(t).forEach(i=>{e.append(i,t[i])}),e}return t}},74569:function(e,t,i){"use strict";function o(e){var t,i;let[o,...n]=e.split(","),r=n.join(","),s=null!=(i=null==(t=o.split(":")[1])?void 0:t.split(";")[0])?i:"",a=/;base64/i.test(o)?atob(r):decodeURIComponent(r),l=new Uint8Array(new ArrayBuffer(a.length));for(let e=0;e<a.length;e+=1)l[e]=a.charCodeAt(e);return new Blob([l.buffer],{type:s})}i.d(t,{dataURItoBlob:function(){return o}})},94122:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return r.ajaxInstances},hasFiles:function(){return a},hasItems:function(){return l},normalizeUploaderData:function(){return o.normalizeUploaderData},processOldBrowserDrag:function(){return n.processOldBrowserDrag},send:function(){return r.send},sendFiles:function(){return s.sendFiles}}),i(83987);var o=i(2073),n=i(50373),r=i(71686),s=i(80020);function a(e){return!!(e&&e.files&&e.files.length>0)}function l(e){return!!(e&&e.items&&e.items.length>0)}},2073:function(e,t,i){"use strict";i.d(t,{getItems:function(){return r},normalizeUploaderData:function(){return s}});var o=i(68345),n=i(70799);function r(e){let{files:t,isImages:i,fileNames:n,items:r}=e;return(0,o.isArray)(t)?t.map((e,t)=>{let o=null==n?void 0:n[t];return{file:e,isImage:!!(null==i?void 0:i[t]),...void 0!==o?{name:o}:{}}}):null!=r?r:[]}function s(e){if(!e||"object"!=typeof e)return e;let{files:t,items:i}=e;if(!i||(0,o.isArray)(t)&&(t.length||!i.length))return{...e,items:r(e)};let s=i.map(({name:e})=>e);return{...e,files:i.map(({file:e})=>e),isImages:i.map(({isImage:e})=>e),...s.every(n.isString)?{fileNames:s}:{},items:i}}},50373:function(e,t,i){"use strict";i.d(t,{processOldBrowserDrag:function(){return c}});var o=i(82758),n=i(22732),r=i(580),s=i(21537),a=i(74569),l=i(80020);function c(e,t,i,c,d){if(t&&(!t.types.length||t.types[0]!==o.TEXT_PLAIN)){let t=e.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});n.Dom.append((0,r.getContainer)(e.j,e.constructor),t);let o=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(n.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";o&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,c).finally(d)}},e.j.defaultTimeout)}}},80020:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return d}});var o=i(82758),n=i(21537),r=i(70231),s=i(36806),a=i(2073),l=i(71686),c=i(76198);async function d(e,t,i,u,h,p){if(!t)throw(0,n.error)("Need files");let{o:m}=e,f=(0,n.toArray)(t);if(!f.length)throw(0,n.error)("Need files");let g=null==p?void 0:p.data;if(!p&&(0,n.isFunction)(m.beforeUpload)){let t;try{t=await m.beforeUpload.call(e,f)}catch(t){throw(u||m.defaultHandlerError).call(e,t),t}if(!1===t){let t=(0,n.error)("Upload canceled");throw(u||m.defaultHandlerError).call(e,t),t}if((0,n.isArray)(t)?f=t:(0,n.isPlainObject)(t)&&(0,n.isArray)(t.files)&&(f=t.files,g=t.data),!f.length)return[]}let b=[];if(m.insertImageAsBase64URI&&function(e,t,i,o,r,s){let l,c,d=[];for(c=0;c<e.length;c+=1)if((l=e[c])&&l.type){let u=l.type.match(/\/([a-z0-9]+)/i),h=u[1]?u[1].toLowerCase():"";if(!t.includes(h))continue;let p=new FileReader,{name:m}=l,f=o.j.async.promise((e,t)=>{p.onerror=t,p.onloadend=()=>{let t=(0,a.normalizeUploaderData)({baseurl:"",items:[{file:p.result,isImage:!0,name:m}]});((0,n.isFunction)(r)?r:s).call(o,t),e(t)},p.readAsDataURL(l)});d.push(f),i.push(f),e[c]=null}d.length&&Promise.all(d).then(()=>{o.j.events&&o.j.e.fire("filesWereUploaded")}).catch(()=>{})}(f,m.imagesExtensions,b,e,i,m.defaultHandlerSuccess),(f=f.filter(e=>e)).length){let t,p=new FormData;p.append(m.pathVariableName,e.path),p.append("source",e.source);for(let i=0;i<f.length;i+=1)if(t=f[i]){let o=/\.\w+$/.test(t.name),n=t.type.match(/\/([a-z0-9]+)/i),r=n&&n[1]?n[1].toLowerCase():"",s=f[i].name||Math.random().toString().replace(".","");if(!o&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[a,l,c]=m.processFileName.call(e,m.filesVariableName(i),f[i],s);p.append(a,l,c)}h&&h(p),m.data&&(0,n.isPlainObject)(m.data)&&Object.keys(m.data).forEach(e=>{p.append(e,m.data[e])}),g&&Object.keys(g).forEach(e=>{p.append(e,g[e])}),m.prepareData.call(e,p),b.push((0,l.send)(e,p).then(t=>{if(m.isSuccess.call(e,t))return((0,n.isFunction)(i)?i:m.defaultHandlerSuccess).call(e,(0,a.normalizeUploaderData)(m.process.call(e,t))),t;let l=new c.UploadError(m.getMessage.call(e,t),t,f,t=>{var o;return d(e,null!=(o=null==t?void 0:t.files)?o:f,i,u,h,{data:{...g,...null==t?void 0:t.data}})});return l.code===o.ERROR_CODE_CONFLICT&&m.promptOnExists?function(e,t){let{files:i}=t;if(i.length>1)return i.reduce((e,i)=>e.then(()=>t.retry({files:[i]})),Promise.resolve());let[o]=i,{j:n,o:a}=e;return new Promise(i=>{let l=!1,c=s.Prompt.call(r.Dlgs.prototype.dlg.call(n,{closeOnClickOverlay:!0}),n.i18n(t.message),n.i18n("Rename"),e=>{if(!(e=e.trim()))return!1;l=!0,i(t.retry({files:[new File([o],e,{type:o.type})]}))},n.i18n("Enter new name"),a.promptOnExistsSuggestName.call(e,o.name));c.e.on(c,"afterClose",()=>{l||i(void 0)})})}(e,l):(((0,n.isFunction)(u)?u:m.defaultHandlerError).call(e,l),t)}).then(()=>{e.j.events&&e.j.e.fire("filesWereUploaded")}))}return Promise.all(b)}},71686:function(e,t,i){"use strict";i.d(t,{send:function(){return a}});var o=i(21537),n=i(41601),r=i(83987);let s=new WeakMap;function a(e,t){let i=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let r=new n.Ajax({xhr(){let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(i(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;i(t*=100)}},!1)):i(100),t},method:e.o.method||"POST",data:t,url:(0,o.isFunction)(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),a=s.get(e);return a||(a=new Set,s.set(e,a)),a.add(r),e.j.e.one("beforeDestruct",r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),null==a||a.delete(r)})};return((0,o.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,o.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}i.d(t,["ajaxInstances",0,s])},76198:function(e,t,i){"use strict";i.d(t,{UploadError:function(){return n}});var o=i(89890);class n extends o.AnswerError{constructor(e,t,i,o){var r;super(e,t,null==(r=t.data)?void 0:r.code),this.files=i,this.retry=o,Object.setPrototypeOf(this,n.prototype)}}},57380:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return d}});var o=i(91907),n=i(82758),r=i(2748),s=i(21537),a=i(89890),l=i(6441),c=i(94122);i(80536);class d extends o.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,i){let o=()=>{e.classList.remove("jodit_drag_hover")},r=this,s=e=>{let s,a,l,d=e.clipboardData,u=e=>{a&&(e.append("extension",l),e.append("mimetype",a.type))};if(!n.IS_IE&&(0,c.hasFiles)(d))return(0,c.sendFiles)(r,d.files,t,i).finally(o),!1;if(n.IS_IE&&!n.IS_ES_NEXT)return(0,c.processOldBrowserDrag)(r,d,t,i,o);if((0,c.hasItems)(d)){let{items:n}=d;for(s=0;s<n.length;s+=1)if("file"===n[s].kind&&"image/png"===n[s].type){if(a=n[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);l=e[1]?e[1].toLowerCase():"",(0,c.sendFiles)(r,[a],t,i,u).finally(o)}e.preventDefault();break}}};r.j&&r.j.editor!==e?r.j.e.on(e,"paste",s):r.j.e.on("beforePaste",s),this.attachEvents(e,t,i,o)}attachEvents(e,t,i,o){let n=this;n.j.e.on(e,"dragend dragover dragenter dragleave drop",e=>{e.preventDefault()}).on(e,"dragover",t=>{((0,c.hasFiles)(t.dataTransfer)||(0,c.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())}).on(e,"dragend dragleave",t=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(t.dataTransfer)&&t.preventDefault()}).on(e,"drop",r=>{e.classList.remove("jodit_drag_hover"),(0,c.hasFiles)(r.dataTransfer)&&(r.preventDefault(),r.stopImmediatePropagation(),(0,c.sendFiles)(n,r.dataTransfer.files,t,i).finally(o))});let a=r.Dom.first(e,e=>{var t;return r.Dom.isTag(e,"input")&&(null==(t=(0,s.attr)(e,"type"))?void 0:t.toLowerCase())==="file"});a&&n.j.e.on(a,"change",()=>{(0,c.sendFiles)(n,a.files,t,i).then(()=>{a.value="",/safari/i.test(navigator.userAgent)||(a.type="",a.type="file")}).finally(o)})}uploadRemoteImage(e,t,i){let o=this,{o:n}=o,r=(0,s.isFunction)(i)?i:n.defaultHandlerError;(0,c.send)(o,{action:"fileUploadRemote",url:e}).then(e=>{var i;n.isSuccess.call(o,e)?((0,s.isFunction)(t)?t:n.defaultHandlerSuccess).call(o,(0,c.normalizeUploaderData)(n.process.call(o,e))):r.call(o,(0,a.answer)(n.getMessage.call(o,e),e,null==(i=e.data)?void 0:i.code))}).catch(e=>r.call(o,e))}upload(e){return this.async.promise((t,i)=>{let o=!1,n=e=>t=>{o=!0,e(t)};(0,c.sendFiles)(this,e,n(t),n(i)).then(()=>{o||t({baseurl:"",items:[],files:[],isImages:[]})},n(i))})}destruct(){this.setStatus(o.STATUSES.beforeDestruct);let e=c.ajaxInstances.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch(e){}}),e.clear()),super.destruct()}constructor(e,t){super(e),this.path="",this.source="default",this.options=(0,s.ConfigProto)(t||{},(0,s.ConfigProto)(l.Config.defaultOptions.uploader,(0,s.isJoditObject)(e)?e.o.uploader:{}))}}},22859:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(21537),s=i(67510),a=i(37068);s.Icon.set("palette",a.default),i.d(t,["ColorPickerWidget",0,(e,t,i)=>{var a;let l="jodit-color-picker",c=(0,r.normalizeColor)(i),d=e.c.div(l),u=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:s.Icon.get("palette"),h=e=>{let t=[];return(0,r.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${l}__group ${l}__group-${i}">`),t.push(h(e[i])),t.push("</div>")}):(0,r.isArray)(e)&&e.forEach(e=>{let i=c===e;t.push(`<button type="button" class='${l}__color-item ${i?l+"__color-item_active_true":""}' title="${e}" aria-pressed="${i}" tabindex="-1" style="background-color:${e}" data-color="${e}"></button>`)}),t.join("")},p=(0,r.isArray)(e.o.colors)?`<div class="${l}__group">${h(e.o.colors)}</div>`:h(e.o.colors);n.Dom.append(d,e.c.fromHTML(`<div class="${l}__groups">${p}</div>`));let m=(0,r.toArray)(d.querySelectorAll(`.${l}__color-item`)),f=null!=(a=m.find(e=>"true"===(0,r.attr)(e,"aria-pressed")))?a:m[0];f&&(0,r.attr)(f,"tabindex",0),n.Dom.append(d,e.c.fromHTML(`<div data-ref="extra" class="${l}__extra"></div>`));let{extra:g}=(0,r.refs)(d);n.Dom.append(g,e.c.fromHTML(`<div class="${l}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${c||""}"/></div>`));let{hexInput:b}=(0,r.refs)(d),v=null,y=()=>{let e=b.value.trim();if(e===v)return;let i=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),o=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!i&&!o)return;let n=(0,r.normalizeColor)(i&&!e.startsWith("#")?"#"+e:e);n&&(0,r.isFunction)(t)&&(v=e,t(n))};e.e.on(b,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),y())}).on(b,"change",e=>{e.stopPropagation(),y()}),n.Dom.append(g,e.c.fromHTML(`<button type="button" class="${l}__remove" data-color="" title="${e.i18n("Remove")}">${e.o.textIcons?e.i18n("Remove"):s.Icon.get("eraser")}</button>`)),e.o.showBrowserColorPicker&&(0,r.hasBrowserColorPicker)()&&(n.Dom.append(g,e.c.fromHTML(`<div class="${l}__native">${u}<input type="color" value="#ffffff"/></div>`)),e.e.on(d,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!n.Dom.isTag(i,"input")||"color"!==i.type)return;let o=i.value||"";(0,r.isFunction)(t)&&t(o),e.preventDefault()}));let w=e=>{let t=n.Dom.closest(e,e=>n.Dom.isHTMLElement(e)&&(e.classList.contains(l+"__color-item")||e.classList.contains(l+"__remove")),d);return t?(0,r.attr)(t,"-color")||"":void 0},_=e=>{t&&(0,r.isFunction)(t)&&t(e)},k=!1;return e.e.on(d,"mousedown touchend",e=>{if(n.Dom.isTag(e.target,"input"))return void e.stopPropagation();e.stopPropagation(),e.preventDefault();let t=w(e.target);void 0!==t&&(k="mousedown"===e.type,_(t))}),e.e.on(d,"click",e=>{let t=w(e.target);void 0===t||k||_(t),k=!1}).on(d,"keydown",e=>{var t;k=!1;let i=e.target;m.includes(i)&&[o.KEY_LEFT,o.KEY_RIGHT,o.KEY_UP,o.KEY_DOWN].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),null==(t=((e,t)=>{let i=m.indexOf(e);if(t===o.KEY_LEFT||t===o.KEY_RIGHT){let n=t===o.KEY_LEFT?-1:1;return m[i+("rtl"===(0,r.css)(e,"direction")?-n:n)]}let n=t===o.KEY_DOWN,s=m.filter(t=>n?t.offsetTop>e.offsetTop:t.offsetTop<e.offsetTop);if(!s.length)return;let a=(n?Math.min:Math.max)(...s.map(e=>e.offsetTop)),l=t=>Math.abs(t.offsetLeft-e.offsetLeft);return s.filter(e=>e.offsetTop===a).reduce((e,t)=>l(t)<l(e)?t:e)})(i,e.key))||t.focus())}).on(d,"focusin",e=>{m.includes(e.target)&&m.forEach(t=>(0,r.attr)(t,"tabindex",t===e.target?0:-1))}),e.e.fire("afterGenerateColorPicker",d,g,t,c),d}])},37068:function(e,t){"use strict";t.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"> <path d="M12 3a9 9 0 1 0 0 18h1a2 2 0 0 0 1.5-3.3 1.7 1.7 0 0 1 1.3-2.8H18a3 3 0 0 0 3-3A9 9 0 0 0 12 3Z"/><circle cx="7" cy="10" r="0.7"/><circle cx="10" cy="6.5" r="0.7"/><circle cx="15" cy="7" r="0.7"/><circle cx="17.5" cy="11" r="0.7"/> </g> </svg> '},34793:function(e,t,i){"use strict";var o=i(2748),n=i(21537),r=i(67510),s=i(38927);let a=(e,t,{label:i,accept:o})=>{let n=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(i)}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${o}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(n,i=>{t.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:n}};function l(e,t,i){let r=o.Dom.first(e,e=>o.Dom.isTag(e,"input")&&(0,n.attr)(e,"name")===t);return r?(i&&(r.value=i),r.value):""}i.d(t,["FileSelectorWidget",0,(e,t,i,c,d=!0)=>{let u,h=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:i}=t;h.push(a(e,t=>{let o=(0,n.isFunction)(i)?i:p.defaultHandlerSuccess;(0,n.isFunction)(o)&&o.call(e,t)},d?{label:"Drop image",accept:"image/*"}:{label:"Drop file",accept:"*"}))}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){c&&c(),t.filebrowser&&e.filebrowser.open(t.filebrowser,d)}}),t.url){let s=new r.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new r.UIForm(e,[new r.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new r.UIInput(e,{name:"text",label:"Alternative text"}),new r.UIBlock(e,[s])]);i&&!o.Dom.isText(i)&&!o.Dom.isComment(i)&&(o.Dom.isTag(i,"img")||(0,n.$$)("img",i).length)&&(u="IMG"===i.tagName?i:(0,n.$$)("img",i)[0],l(a.container,"url",(0,n.attr)(u,"src")),l(a.container,"text",(0,n.attr)(u,"alt")),s.state.text="Update"),i&&o.Dom.isTag(i,"a")&&(l(a.container,"url",(0,n.attr)(i,"href")),l(a.container,"text",(0,n.attr)(i,"title")),s.state.text="Update"),a.onSubmit(i=>{(0,n.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),h.push({icon:"link",name:"URL",content:a.container})}let m=(0,s.TabsWidget)(e,h);return m.classList.add("jodit-file-selector"),m},"UploadTab",0,a])},92762:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return o.ColorPickerWidget},FileSelectorWidget:function(){return n.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget},UploadTab:function(){return n.UploadTab}});var o=i(22859),n=i(34793),r=i(38927)},38927:function(e,t,i){"use strict";var o=i(91907),n=i(2748),r=i(23282),s=i(29960),a=i(67510),l=i(20014);i.d(t,["TabsWidget",0,(e,t,i)=>{let c=e.c.div("jodit-tabs"),d=e.c.div("jodit-tabs__wrapper"),u=e.c.div("jodit-tabs__buttons");(0,s.attr)(u,{role:"tablist","aria-orientation":"horizontal"});let h={},p=[],m="";n.Dom.append(c,u),n.Dom.append(c,d);let f=e=>{h[e]&&(p.forEach(e=>{e.state.activated=!1}),Object.values(h).forEach(({tab:e})=>e.classList.remove("jodit-tab_active")),h[e].button.state.activated=!0,h[e].tab.classList.add("jodit-tab_active"))};if(t.forEach(({icon:c,name:g,content:b})=>{let v=e.c.div("jodit-tab");(0,s.attr)(v,{role:"tabpanel"});let y=(0,a.Button)(e,c||g,g);y.state.role="tab",e.e.on(y.container,"pointerdown",e=>e.preventDefault()),m||(m=g),n.Dom.append(u,y.container),p.push(y),y.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,r.isFunction)(b)?v.classList.add("jodit-tab_empty"):n.Dom.append(v,o.Component.isInstanceOf(b,a.UIElement)?b.container:b),n.Dom.append(d,v),y.onAction(()=>(f(g),(0,r.isFunction)(b)&&!n.Dom.isElement(b)&&b.call(e),i&&(i.activeTab=g),(0,l.focusFormField)(v),!1)),h[g]={button:y,tab:v}}),f(i&&i.activeTab&&h[i.activeTab]?i.activeTab:m),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,f(t)}})}return c}])},73391:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(21537),s=i(12153),a=i(6441),l=i(49399);a.Config.prototype.controls.about={exec(e){let t=e.dlg({closeOnClickOverlay:!0}),i=e.i18n.bind(e);t.setMod("theme",e.o.theme).setHeader(i("About Jodit")).setContent(`<div class="jodit-about">
125
125
  <div>${i("Jodit Editor")} v.${e.getVersion()}</div>
126
126
  <div>${i("License: %s",!(0,r.isLicense)(e.o.license)?e.o.license||"MIT":(0,r.normalizeLicense)(e.o.license))}</div>
127
127
  <div>
@@ -141,7 +141,7 @@
141
141
  <div class="&__spinner"></div>
142
142
  </div>
143
143
  </div>
144
- </div>`}setPrompt(e){if(e){let{jodit:t}=this,i=t.o.aiAssistant[e],{aiCommonPrefixPrompt:o,aiCommonSuffixPrompt:n}=t.o.aiAssistant;this.promptInput.value=[o,(0,s.isString)(i)?i:"",n].filter(Boolean).join(" "),this.__toggleInsertButton(!0),this.promptInput.value&&(this.__formAiAssistant.submit(),this.__toggleSubmitButton(!0))}this.promptInput.focus()}onAiAssistentResponse(e){this.setMod("loading",!1),r.Dom.detach(this.__results),this.__aiResult=e,r.Dom.append(this.__results,this.jodit.c.fromHTML(e)),this.__toggleSubmitButton(!1),this.__toggleInsertButton(!1)}onAiAssistentError(e){this.__aiResult="",this.setMod("loading",!1),this.__error.textContent=e,r.Dom.detach(this.__results),this.__toggleSubmitButton(!1);let t=this.getFullElName("","hide","true");this.__results.classList.add(t),this.__toggleInsertButton(!0)}onChangePromptValue(){this.__toggleSubmitButton(!this.promptInput.value)}__toggleSubmitButton(e){this.__submitButton.state.disabled=e,this.__tryAgainButton.state.disabled=e}__toggleInsertButton(e){this.__insertButton.state.disabled=e,this.__insertAfterButton.state.disabled=e}constructor(e,{onInsert:t,onInsertAfter:i}){super(e),this.__aiResult="",this.__error=this.getElm("error"),this.__body=this.getElm("body"),this.__buttons=this.getElm("buttons"),this.__results=this.getElm("results"),this.__spinner=this.getElm("spinner"),this.__insertButton=(0,a.Button)(e,"","Insert","primary").onAction(()=>t(this.__aiResult)),this.__insertAfterButton=(0,a.Button)(e,"","Insert After","initial").onAction(()=>i(this.__aiResult));let o=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=(0,a.Button)(e,{icon:{name:"ai-assistant"},name:"ai-assistant",tooltip:"Submit"}).onAction(o),this.__tryAgainButton=(0,a.Button)(e,{icon:{name:"update"},name:"update",tooltip:"Try Again",variant:"initial"}).onAction(o),this.promptInput=new a.UITextArea(e,{name:"prompt",required:!0,label:"Prompt",placeholder:"Ask AI to improve generated text",className:this.getFullElName("prompt-row-input")});let n=new a.UIBlock(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName("prompt-row")});this.__formAiAssistant=new a.UIForm(e,[new a.UIBlock(e,[this.promptInput,this.__submitButton],{className:this.getFullElName("prompt-row")})]).onSubmit(t=>{this.__error.textContent="",this.setMod("loading",!0),e.e.fire("invokeAiAssistant",t.prompt);let i=this.getFullElName("","hide","true");this.__results.classList.remove(i),this.__buttons.classList.remove(i),r.Dom.detach(this.__results),r.Dom.append(this.__results,this.__spinner),this.__insertButton.focus()}),r.Dom.append(this.__buttons,n.container),r.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}};c([(0,n.watch)(":ai-assistant-response")],d.prototype,"onAiAssistentResponse",null),c([(0,n.watch)(":ai-assistant-error")],d.prototype,"onAiAssistentError",null),c([(0,n.watch)("promptInput:change")],d.prototype,"onChangePromptValue",null),d=c([o.component],d)},25187:function(e,t,i){"use strict";i(73391),i(12391),i(93183),i(66707),i(41107),i(71255),i(82439),i(61323),i(93079),i(19063),i(19271),i(1255),i(575),i(11317),i(36243),i(23399),i(96111),i(2169),i(42263),i(16233),i(77469),i(23531),i(84571),i(80763),i(3215),i(70045),i(93401),i(76295),i(59483),i(91071),i(61019),i(65517),i(36911),i(20071),i(32309),i(64837),i(79799),i(31571),i(85407),i(59451),i(18363),i(8355),i(58519),i(6687),i(56113),i(9159),i(12019),i(36125),i(9881),i(28545),i(45927),i(52951),i(43809),i(7309),i(68687),i(59495),i(39627),i(767),i(43003),i(72439),i(94529),i(26551),i(96139),i(72253),i(65735),i(83671),i(3115)},36911:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(62843),d=i(2525);i(50712);var u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let h=["id","name"].map(e=>`.jodit-wysiwyg a[${e}]:not([href]):empty::before`).join(","),p=`${h}{display:inline-block;width:.75em;height:1em;margin:0 .1em;vertical-align:-.15em;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e88e5' stroke-width='2.5' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4z'/%3E%3C/svg%3E") center/contain no-repeat;cursor:pointer;content:''}`,m=' contenteditable="false"';class f extends l.Plugin{afterInit(e){(0,s.getContainer)(e,"anchor","style",!0).textContent=p,e.e.on("generateAnchorForm.anchor",this.__generateForm).on("clickA touchstartA",this.__onClickA,{top:!0})}__onClickA(e,t){var i;let{j:o}=this;if(!o.o.readonly&&(0,a.isAnchor)(e))return o.e.stopPropagation((0,a.camelCase)((null!=(i=null==t?void 0:t.type)?i:"click")+"_a")),o.e.fire("showPopup",e,()=>(0,a.position)(e,o),"anchor",!0),!1}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===o.MODE_SOURCE||(0,a.getAnchors)(e.editor).forEach(g)}onAfterGetValueFromEditor(e){e.value=function(e){if(!e.includes(m))return e;let t="",i=0,o=0;for(;;){let n=e.indexOf("<",o);if(-1===n)break;let r=e.indexOf(">",n);if(-1===r)break;if(e.startsWith("<a",n)&&/\s/.test(e.charAt(n+2))&&e.startsWith("</a>",r+1)){let o=e.slice(n,r),s=o.indexOf(m);-1===s||/\shref=/.test(o)||(t+=e.slice(i,n+s),i=n+s+m.length)}o=r+1}return 0===i?e:t+e.slice(i)}(e.value)}__generateForm(e,t){let{j:i}=this,n=(0,a.isAnchor)(e)?e:null,s=new d.UIInput(i,{name:"name",ref:"name_input",label:"Anchor",required:!0}),l=[new c.UIButton(i,{name:"insert",type:"submit",variant:"primary",text:n?"Update":"Insert"})];n&&(s.value=(0,a.getAnchorName)(n),l.unshift(new c.UIButton(i,{name:"remove",variant:"default",text:"Remove"}).onAction(()=>{i.o.readonly||(i.s.restore(),r.Dom.safeRemove(n),i.synchronizeValues()),t()})));let u=new d.UIForm(i,[new d.UIBlock(i,[s]),new d.UIBlock(i,l,{align:"full"})]);return n&&(this.__dropForm(),this.__form=u,i.e.on(u.container,"keydown",e=>{e.key===o.KEY_ESC&&(t(),i.s.restore())})),u.onSubmit(()=>{if(i.o.readonly)return t(),!1;let e=s.value.trim().replace(/^#/,""),o=e?/\s/.test(e)?"The name cannot contain spaces":this.__isTaken(e,n)?"This name is already in use":"":"Please fill out this field";return o?(s.error=o,s.focus()):(i.s.restore(),n?this.__rename(n,e):this.__insert(e),i.synchronizeValues(),t()),!1}),i.async.requestIdleCallback(()=>s.focus()),u}__dropForm(){let e=this.__form;this.__form=null,e&&!e.isInDestruct&&(this.j.e.off(e.container,"keydown"),e.destruct())}__isTaken(e,t){return(0,a.toArray)(this.j.editor.querySelectorAll("[id], a[name]")).some(i=>i!==t&&(i.id===e||(0,a.isAnchor)(i)&&(0,a.attr)(i,"name")===e))}__insert(e){let{j:t}=this,i=t.createInside.element("a",{id:e}),o=t.s.range;g(i),o.collapsed||(o.collapse(!0),t.s.selectRange(o));let n=r.Dom.closest(o.startContainer,"a",t.editor);n?(r.Dom.before(n,i),t.s.setCursorAfter(i)):t.s.insertNode(i,!0,!1)}__rename(e,t){let i=(0,a.getAnchorName)(e),o=this.__isTaken(i,e);["id","name"].forEach(i=>{e.hasAttribute(i)&&(0,a.attr)(e,i,t)}),o||(0,a.toArray)(this.j.editor.querySelectorAll("a[href]")).forEach(e=>{(0,a.attr)(e,"href")==="#"+i&&(0,a.attr)(e,"href","#"+t)})}beforeDestruct(e){this.__dropForm(),e.e.off("generateAnchorForm.anchor",this.__generateForm).off("clickA touchstartA",this.__onClickA)}constructor(){super(...arguments),this.buttons=[{name:"anchor",group:"insert"}],this.__form=null}}function g(e){"false"!==(0,a.attr)(e,"contenteditable")&&(0,a.attr)(e,"contenteditable",!1)}u([n.autobind],f.prototype,"__onClickA",null),u([(0,n.watch)([":change",":afterInit",":afterSetMode"]),(0,n.debounce)()],f.prototype,"onChange",null),u([(0,n.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),u([n.autobind],f.prototype,"__generateForm",null),s.pluginSystem.add("anchor",f)},50712:function(e,t,i){"use strict";var o=i(6441);i(24526),o.Config.prototype.controls.anchor={popup:(e,t,i)=>e.e.fire("generateAnchorForm.anchor",null,i),tooltip:"Insert anchor"},o.Config.prototype.popup.anchor=(e,t,i)=>e.e.fire("generateAnchorForm.anchor",t,i)},93183:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(23282),a=i(50911),l=i(45124);i(32496);var c=i(11338),d=i(14630),u=i(63785);class h extends a.Plugin{afterInit(e){e.registerCommand("deleteButton",{exec:()=>this.onDelete(!1),hotkeys:e.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand("backspaceButton",{exec:()=>this.onDelete(!0),hotkeys:e.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand("deleteWordButton",{exec:()=>this.onDelete(!1,"word"),hotkeys:e.o.delete.hotkeys.deleteWord}).registerCommand("backspaceWordButton",{exec:()=>this.onDelete(!0,"word"),hotkeys:e.o.delete.hotkeys.backspaceWord}).registerCommand("deleteSentenceButton",{exec:()=>this.onDelete(!1,"sentence"),hotkeys:e.o.delete.hotkeys.deleteSentence}).registerCommand("backspaceSentenceButton",{exec:()=>this.onDelete(!0,"sentence"),hotkeys:e.o.delete.hotkeys.backspaceSentence})}beforeDestruct(e){e.e.off("afterCommand.delete")}onDelete(e,t="char"){let i=this.j,r=i.selection;if(r.isFocused()||r.focus(),!r.isInsideArea)return;if((0,c.checkNotCollapsed)(i))return i.e.fire("backSpaceAfterDelete",e),!1;let a=r.range,u=i.createInside.text(o.INVISIBLE_SPACE);try{if(n.Dom.safeInsertNode(a,u),!n.Dom.isOrContains(i.editor,u))return;let c=n.Dom.closest(u,e=>n.Dom.isElement(e)&&e.hasAttribute("contenteditable")&&!n.Dom.isContentEditable(e.parentNode,i.editor),i.editor);if(c&&r.cursorInTheEdge(e,c,u)||i.e.fire("backSpaceBeforeCases",e,u))return!1;(0,l.moveNodeInsideStart)(i,u,e);let h=i.o.delete.disableCases;if(d.casesMap.some(([n,r])=>{if(!(h&&h.has(n))&&(0,s.isFunction)(r)&&r(i,u,e,t))return o.IS_PROD,!0}))return!1}catch(e){throw o.IS_PROD,e}finally{i.e.fire("backSpaceAfterDelete",e,u),this.moveCaretToTextBefore(u),this.safeRemoveEmptyNode(u)}return!1}moveCaretToTextBefore(e){var t,i;let{jodit:o}=this,{range:r}=o.s;if(!e.parentNode)return;let s=o.ed.createRange();if(s.selectNode(e),!r.collapsed||!s.isPointInRange(r.startContainer,r.startOffset))return;let a=e.previousSibling;for(;n.Dom.isText(a)&&!/\S|\u00A0/.test(a.data);)a=a.previousSibling;let l=n.Dom.isText(a)?a:(0,u.findMostNestedNeighbor)(e,!1,o.editor,!0),c=n.Dom.closest(l,"a",o.editor);n.Dom.isText(l)&&n.Dom.isContentEditable(l,o.editor)&&(!c||n.Dom.isOrContains(c,e))&&n.Dom.closest(l,n.Dom.isBlock,o.editor)===n.Dom.closest(e,n.Dom.isBlock,o.editor)&&(r.setStart(l,null!=(i=null==(t=l.nodeValue)?void 0:t.length)?i:0),r.collapse(!0),o.s.selectRange(r))}safeRemoveEmptyNode(e){var t,i,r;let{range:s}=this.j.s;n.Dom.isText(e)&&e.nodeValue!==o.INVISIBLE_SPACE&&(null==(t=e.nodeValue)?void 0:t.startsWith(o.INVISIBLE_SPACE))?e.deleteData(0,o.INVISIBLE_SPACE.length):(s.startContainer===e&&(e.previousSibling?n.Dom.isText(e.previousSibling)?s.setStart(e.previousSibling,null!=(r=null==(i=e.previousSibling.nodeValue)?void 0:i.length)?r:0):s.setStartAfter(e.previousSibling):e.nextSibling&&(n.Dom.isText(e.nextSibling)?s.setStart(e.nextSibling,0):s.setStartBefore(e.nextSibling)),s.collapse(!0),this.j.s.selectRange(s)),n.Dom.safeRemove(e))}}h.requires=["hotkeys"],r.pluginSystem.add("backspace",h)},62845:function(e,t,i){"use strict";i.d(t,{checkJoinNeighbors:function(){return s}});var o=i(82758),n=i(2748),r=i(63785);function s(e,t,i){return function e(t,i,s,h){if(function(e,t,i){let o=n.Dom.findNotEmptySibling(t,i);if(!d(e,o))return!1;let s=(0,r.getMoveFilter)(e);if(i)for(let e=t;e&&!n.Dom.isBlock(e);){let t=e.nextSibling;if(n.Dom.isTag(e,"br")){n.Dom.safeRemove(e);break}s(e)?n.Dom.append(o,e):n.Dom.safeRemove(e),e=t}else{let t=n.Dom.findNotEmptySibling(o,!1);!t||n.Dom.isBlock(t)||n.Dom.isTag(t,"br")||n.Dom.after(o,e.createInside.element("br")),n.Dom.unwrap(o)}return e.s.setCursorBefore(t),!0}(t,i,s))return!0;let p=n.Dom.findNotEmptySibling(i,s);if(d(t,function(e,t){var i;let o=e;for(;n.Dom.isElement(o)&&!n.Dom.isBlock(o);){let e=Array.from(o.childNodes).filter(e=>!n.Dom.isEmptyTextNode(e));o=null!=(i=t?e[e.length-1]:e[0])?i:null}return o===e?null:o}(p,s))&&a(p,t.editor))return e(t,i,s,h);let m=i,f=m;for(;m&&!n.Dom.findNotEmptySibling(m,s)&&m.parentElement!==t.editor;)f=m=m.parentElement;if(n.Dom.isElement(f)&&n.Dom.isContentEditable(f,t.editor)){var g,b;let d,p,m,v;if(n.Dom.up(i,n.Dom.isCell,f,!0))return!1;let y=n.Dom.findNotEmptySibling(f,s);if(y&&(a(n.Dom.furthest(i,e=>n.Dom.isElement(e)&&!n.Dom.isBlock(e)&&!n.Dom.isOrContains(e,y),t.editor),t.editor)||a(y,t.editor)))return e(t,i,s,h);if(n.Dom.isTag(y,"br"))return n.Dom.safeRemove(y),t.s.setCursorBefore(i),!0;if(s&&n.Dom.isTag(y,"table"))return t.s.setCursorBefore(i),!0;if(n.Dom.isElement(y)&&!n.Dom.isContentEditable(y,t.editor))return!1;let w=(g=f,(d=n.Dom.up(i,n.Dom.isBlock,g))?n.Dom.isLeaf(d)&&d.parentElement?d.parentElement:d:g);if(!h&&y&&function(e,t,i,r,s){if(s||n.Dom.isTag(r,"table")||n.Dom.isTag(r,o.INSEPARABLE_TAGS)||!n.Dom.isContentEditable(r,e.editor))return!1;let a=n.Dom.up(t,n.Dom.isBlock,i,!0),d=l(r,!1,e.editor);if(!a||!d||!n.Dom.isContentEditable(d,e.editor)||!(n.Dom.isLeaf(a)||n.Dom.isLeaf(d))||n.Dom.isLeaf(a.parentElement)||n.Dom.isLeaf(d.parentElement)||c(a)===c(d))return!1;let u=a.parentElement;n.Dom.isLeaf(a)&&n.Dom.isLeaf(d)?n.Dom.before(d,a):n.Dom.isLeaf(a)?n.Dom.before(d,function(e){let t=e.parentElement,i=t.cloneNode(!1),o=Array.from(t.children).indexOf(e);if(o&&(i.removeAttribute("id"),n.Dom.isTag(t,"ol"))){let e=parseInt(t.getAttribute("start")||"1",10)||1;i.setAttribute("start",e+o+"")}return n.Dom.append(i,e),i}(a)):n.Dom.before(d.parentElement,a);let h=u;for(;h&&h!==e.editor&&n.Dom.isEmpty(h);){let e=h.parentElement;n.Dom.safeRemove(h),h=e}return!0}(t,i,w,y,s))return e(t,i,s,!0)||t.s.setCursorBefore(i),!0;if(y&&(function(e,t,i,s,a){if(a||!(n.Dom.isList(i)||n.Dom.isList(s)))return!1;let l=n.Dom.up(t,n.Dom.isBlock,i,!0),c=n.Dom.isList(s)?s.firstElementChild:s;if(!l||!c||n.Dom.isTag(c,o.INSEPARABLE_TAGS)||n.Dom.isTag(c,"table"))return!1;if(!n.Dom.isEmpty(c)){let t=[];for(let e=c.firstChild;e&&!n.Dom.isBlock(e);e=e.nextSibling)t.push(e);if(!t.length)return!1;let i=(0,r.getMoveFilter)(e);t.forEach(e=>i(e)?n.Dom.append(l,e):n.Dom.safeRemove(e))}let d=c;for(;d&&d!==e.editor&&n.Dom.isEmpty(d);){let e=d.parentElement;n.Dom.safeRemove(d),d=e}return!0}(t,i,w,y,s)||(b=y,p=n.Dom.isTag(b,o.LIST_TAGS),m=n.Dom.isTag(w,o.LIST_TAGS),v=(e,t)=>t?e.firstElementChild:e.lastElementChild,m?(b=t.createInside.element(t.o.enterBlock),n.Dom.before(w,b),u(t,v(w,s),b,s)):!!b&&!!p&&!m&&u(t,w,v(b,!s),s))||function(e,t,i,o){if(n.Dom.isBlock(i)||!n.Dom.isBlock(t)||n.Dom.isList(t)||t.parentNode!==i.parentNode||Array.from(t.childNodes).some(e=>n.Dom.isBlock(e)))return!1;if(o){let i=n.Dom.findNotEmptySibling(t,!1);return!i||n.Dom.isBlock(i)||n.Dom.isTag(i,"br")||n.Dom.after(t,e.createInside.element("br")),n.Dom.unwrap(t),!0}let s=(0,r.getMoveFilter)(e);for(let e=i;e&&!n.Dom.isBlock(e);){let i=e.nextSibling;if(n.Dom.isTag(e,"br")){n.Dom.safeRemove(e);break}s(e)?n.Dom.append(t,e):n.Dom.safeRemove(e),e=i}return!0}(t,w,y,s)||u(t,w,l(function(e,t){if(!n.Dom.isTag(e,"table"))return e;let i=[];return n.Dom.each(e,e=>{n.Dom.isCell(e)&&i.push(e)}),i.length?i[t?i.length-1:0]:null}(y,s),s,t.editor),s)))return t.s.setCursorBefore(i),!0}return!1}(e,t,i,!1)}function a(e,t){if(!n.Dom.isElement(e)||n.Dom.isBlock(e))return!1;let i=e=>n.Dom.isBlock(e)&&!n.Dom.isTag(e,o.NO_EMPTY_TAGS);Array.from(e.childNodes).forEach(e=>a(e,t));let r=Array.from(e.childNodes);if(!r.some(i))return!1;let s=null;for(let l of r){if(!i(l)){s||n.Dom.isEmptyTextNode(l)||(s=e.cloneNode(!1),n.Dom.before(l,s)),s&&n.Dom.append(s,l);continue}if(s=null,n.Dom.isTag(l,o.INSEPARABLE_TAGS)||!n.Dom.isContentEditable(l,t))continue;let r=e.cloneNode(!1);n.Dom.moveContent(l,r),n.Dom.append(l,r),a(r,t)}return n.Dom.unwrap(e),!0}function l(e,t,i){let r=e;for(;r;){let e=t?r.lastChild:r.firstChild,s=e&&n.Dom.isEmptyTextNode(e)?n.Dom.findNotEmptySibling(e,t):e;if(!n.Dom.isBlock(s)||n.Dom.isTag(s,o.INSEPARABLE_TAGS)||n.Dom.isTag(s,"table")||!n.Dom.isContentEditable(s,i))break;r=s}return r}function c(e){let t=e.parentElement;for(;n.Dom.isList(t)||n.Dom.isLeaf(t);)t=t.parentElement;return t}function d(e,t){return n.Dom.isElement(t)&&n.Dom.isBlock(t)&&!n.Dom.isList(t)&&!n.Dom.isTag(t,"table")&&!n.Dom.isCell(t)&&n.Dom.isContentEditable(t,e.editor)&&!Array.from(t.childNodes).some(e=>n.Dom.isBlock(e))}function u(e,t,i,o){if(t&&n.Dom.isElement(i)){n.Dom.moveContent(t,i,!o,(0,r.getMoveFilter)(e));let s=t;for(;s&&s!==e.editor&&n.Dom.isEmpty(s);){let e=s.parentElement;n.Dom.safeRemove(s),s=e}return!0}return!1}},91748:function(e,t,i){"use strict";i.d(t,{checkJoinTwoLists:function(){return s}});var o=i(2748),n=i(37790),r=i(63785);function s(e,t,i){let s=o.Dom.findSibling(t,i),a=o.Dom.findSibling(t,!i);if(!o.Dom.closest(t,o.Dom.isElement,e.editor)&&o.Dom.isList(s)&&o.Dom.isList(a)&&o.Dom.isTag(s.lastElementChild,"li")&&o.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:c}=e.s,d=s.lastElementChild,u=a.firstElementChild;return(0,n.call)(i?o.Dom.prepend:o.Dom.append,u,t),o.Dom.moveContent(a,s,!i,(0,r.getMoveFilter)(e)),o.Dom.safeRemove(a),(0,n.call)(i?o.Dom.append:o.Dom.prepend,d,t),(0,n.call)(i?l:c,t),!0}return!1}},11338:function(e,t,i){"use strict";function o(e){return!e.s.isCollapsed()&&(e.execCommand("Delete"),!0)}i.d(t,{checkNotCollapsed:function(){return o}})},73792:function(e,t,i){"use strict";i.d(t,{checkRemoveChar:function(){return function e(t,i,c,d,u=!1){var h,p;let m,f=c?-1:1,g=n.Dom.sibling(i,!c),b=n.Dom.sibling(i,c),v=null,y=!1;for(b||(b=a(i,c,t.editor));b&&(n.Dom.isText(b)||n.Dom.isInlineBlock(b));){for(;n.Dom.isInlineBlock(b);)b=c?null==b?void 0:b.lastChild:null==b?void 0:b.firstChild;if(!b||n.Dom.isBlock(b))break;if(null==(h=b.nodeValue)?void 0:h.length){if(u&&l(function(e,t){let i=(0,r.toArray)(e),n=t?-1:1,s=t?i.length-1:0;for(;i[s]===o.INVISIBLE_SPACE;)s+=n;return i[s]}(b.nodeValue,c)))break;m=function(e,t,i,s){let a=(0,r.toArray)(e.nodeValue),l=a.length,c=t?l-1:0;if(a[c]===o.INVISIBLE_SPACE)for(;a[c]===o.INVISIBLE_SPACE;)c+=i;let d=a[c];if(a[c+i]===o.INVISIBLE_SPACE){for(c+=i;a[c]===o.INVISIBLE_SPACE;)c+=i;c+=t?1:-1}return a=t&&c<0?[]:a.slice(t?0:c+1,t?c:l),function(e,t,i){var s;if(!e||!n.Dom.isText(e)||(!t?/ $/:/^ /).test(null!=(s=e.nodeValue)?s:"")||!(0,r.trimInv)(e.nodeValue||"").length)for(let e=t?i.length-1:0;t?e>=0:e<i.length;e+=t?-1:1)if(" "===i[e])i[e]=o.NBSP_SPACE;else break}(s,t,a),e.nodeValue=a.join(""),d}(b,c,f,g),!b.nodeValue.length&&n.Dom.isInlineBlock(b.parentNode)&&(b.nodeValue=o.INVISIBLE_SPACE)}if((null==(p=b.nodeValue)?void 0:p.length)||(v=b),!(0,r.isVoid)(m)&&m!==o.INVISIBLE_SPACE){(function(t,i,o,s,a,c){(0,r.call)(t?n.Dom.after:n.Dom.before,i,o);let d="word"===s&&!l(a);("sentence"===s||d||"word"===s&&t)&&e(c,o,t,s,d&&t)})(c,b,i,d,m,t),y=!0;break}let s=a(b,c,t.editor);v&&(n.Dom.safeRemove(v),v=null),b=s}return v&&n.Dom.safeRemove(v),y&&(function(e){let t=e.parentElement;for(;t&&n.Dom.isInlineBlock(t)&&n.Dom.isTag(t,"a");){let i=t.parentElement;n.Dom.isEmpty(t)&&(n.Dom.after(t,e),n.Dom.safeRemove(t)),t=i}}(i),(0,s.addBRInsideEmptyBlock)(t,i),t.s.setCursorBefore(i),n.Dom.isTag(i.previousSibling,"br")&&!n.Dom.findNotEmptySibling(i,!1)&&n.Dom.after(i,t.createInside.element("br"))),y}}});var o=i(82758),n=i(22732),r=i(21537),s=i(63785);function a(e,t,i){let o=n.Dom.sibling(e,t);return!o&&e.parentNode&&e.parentNode!==i&&(o=(0,s.findMostNestedNeighbor)(e,!t,i,!0))&&n.Dom.closest(e,n.Dom.isBlock,i)!==n.Dom.closest(o,n.Dom.isBlock,i)?null:o}function l(e){return" "===e||e===o.NBSP_SPACE}},87536:function(e,t,i){"use strict";i.d(t,{checkRemoveContentNotEditable:function(){return a}});var o=i(22732),n=i(21537),r=i(45124),s=i(62845);function a(e,t,i){let a=t,c=o.Dom.findSibling(a,i);for(;!c&&a.parentElement&&a.parentElement!==e.editor&&!o.Dom.isCell(a.parentElement);)if(a=a.parentElement,c=o.Dom.findSibling(a,i),i&&o.Dom.isLeaf(a)&&!(o.Dom.isLeaf(c)&&l(e,c)))return!1;if(l(e,c)){if(o.Dom.isBlock(c)){let n=!(i&&o.Dom.isLeaf(c));o.Dom.safeRemove(c),n&&(0,s.checkJoinNeighbors)(e,t,i)}else(0,n.call)(i?o.Dom.before:o.Dom.after,c,t),o.Dom.safeRemove(c),(0,r.moveNodeInsideStart)(e,t,i);return(0,n.call)(i?e.s.setCursorBefore:e.s.setCursorAfter,t),!0}return!1}function l(e,t){return o.Dom.isElement(t)&&!o.Dom.isContentEditable(t,e.editor)}},12474:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyNeighbor:function(){return n}});var o=i(2748);function n(e,t,i){let n=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!n)return!1;let r=o.Dom.findNotEmptySibling(n,i);return!!(r&&o.Dom.isEmpty(r))&&(o.Dom.safeRemove(r),e.s.setCursorBefore(t),!0)}},58940:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyParent:function(){return s}});var o=i(82758),n=i(22732),r=i(91748);function s(e,t,i){let s=!1,{setCursorBefore:a,setCursorIn:l}=e.s,c=n.Dom.closest(t,n.Dom.isElement,e.editor);if(!c||!n.Dom.isEmpty(c))return!1;do if(c&&n.Dom.isEmpty(c)&&!n.Dom.isCell(c)){n.Dom.after(c,t);let i=n.Dom.closest(c,e=>n.Dom.isElement(e)&&e!==c,e.editor);n.Dom.safeRemove(c),s=!0,c=i}else break;while(c)if(s&&(0,r.checkJoinTwoLists)(e,t,i))return!0;let d=n.Dom.findNotEmptyNeighbor(t,i,e.editor);return!d||n.Dom.isText(d)||n.Dom.isTag(d,o.INSEPARABLE_TAGS)?a(t):l(d,!i),s}},56825:function(e,t,i){"use strict";i.d(t,{checkRemoveUnbreakableElement:function(){return s}});var o=i(82758),n=i(2748),r=i(58940);function s(e,t,i){let s=n.Dom.findSibling(t,i);return!!(n.Dom.isElement(s)&&(n.Dom.isTag(s,o.INSEPARABLE_TAGS)||n.Dom.isEmpty(s)))&&(n.Dom.safeRemove(s),n.Dom.isTag(s,"br")&&!n.Dom.findNotEmptySibling(t,!1)&&n.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),n.Dom.isTag(s,"br")&&(0,r.checkRemoveEmptyParent)(e,t,i),!0)}},90240:function(e,t,i){"use strict";i.d(t,{checkTableCell:function(){return n}});var o=i(2748);function n(e,t){let i=t.parentElement;return!!o.Dom.isCell(i)}},68034:function(e,t,i){"use strict";i.d(t,{checkUnwrapFirstListItem:function(){return r}});var o=i(2748),n=i(43555);function r(e,t,i){var r;let s=o.Dom.closest(t,o.Dom.isElement,e.editor),{s:a}=e;if(o.Dom.isLeaf(s)&&(null==(r=null==s?void 0:s.parentElement)?void 0:r[i?"firstElementChild":"lastElementChild"])===s&&a.cursorInTheEdge(i,s)){let r=s.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,n.call)(i?o.Dom.before:o.Dom.after,r,l),o.Dom.moveContent(s,l),o.Dom.safeRemove(s),o.Dom.isEmpty(r)&&o.Dom.safeRemove(r),(0,n.call)(i?a.setCursorBefore:a.setCursorAfter,t),!0}return!1}},70921:function(e,t,i){"use strict";i.d(t,{checkUnwrapListItem:function(){return n}});var o=i(2748);function n(e,t,i){if(!i)return!1;let n=o.Dom.closest(t,"li",e.editor),r=n?n.parentElement:null;if(!n||!o.Dom.isList(r)||!n.previousElementSibling||o.Dom.isEmpty(n)||Array.from(n.childNodes).some(e=>o.Dom.isBlock(e))||!e.s.cursorInTheEdge(!0,n))return!1;let s=e.createInside.element(e.o.enterBlock);if(o.Dom.after(r,s),n.nextElementSibling){let e=r.cloneNode(!1);for(e.removeAttribute("id");n.nextSibling;)o.Dom.append(e,n.nextSibling);if(o.Dom.isTag(r,"ol")){let t=parseInt(r.getAttribute("start")||"1",10)||1;e.setAttribute("start",t+r.children.length-1+"")}o.Dom.after(s,e)}return o.Dom.moveContent(n,s),o.Dom.safeRemove(n),e.s.setCursorBefore(t),!0}},14630:function(e,t,i){"use strict";var o=i(62845),n=i(91748),r=i(73792),s=i(87536),a=i(12474),l=i(58940),c=i(56825),d=i(90240),u=i(68034),h=i(70921);let p=[["remove-unbreakable",c.checkRemoveUnbreakableElement],["remove-not-editable",s.checkRemoveContentNotEditable],["remove-char",r.checkRemoveChar],["table-cell",d.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",n.checkJoinTwoLists],["unwrap-list-item",h.checkUnwrapListItem],["join-neighbors",o.checkJoinNeighbors],["unwrap-first-list-item",u.checkUnwrapFirstListItem]];p.map(([,e])=>e),i.d(t,["casesMap",0,p])},32496:function(e,t,i){"use strict";var o=i(82758);i(6441).Config.prototype.delete={hotkeys:{delete:o.IS_MAC?["delete"]:["delete","cmd+backspace"],deleteWord:o.IS_MAC?["ctrl+delete"]:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:o.IS_MAC?[]:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},63785:function(e,t,i){"use strict";i.d(t,{addBRInsideEmptyBlock:function(){return s},findMostNestedNeighbor:function(){return n},getMoveFilter:function(){return r}});var o=i(22732);function n(e,t,i,r=!1){let s=e=>t?e.firstChild:e.lastChild,a=o.Dom.findNotEmptyNeighbor(e,!t,i);if(r&&o.Dom.isElement(a)&&!o.Dom.isInlineBlock(a))return null;if(a)do{if(!s(a))return a;a=s(a)}while(a)return null}function r(e){return t=>!0!==e.e.fire("backSpaceIsMovedIgnore",t)}function s(e,t){t.parentElement!==e.editor&&o.Dom.isBlock(t.parentElement)&&o.Dom.each(t.parentElement,o.Dom.isEmptyTextNode)&&o.Dom.after(t,e.createInside.element("br"))}},41107:function(e,t,i){"use strict";var o=i(580),n=i(21537),r=i(12153),s=i(6441);i(73674);var a=i(820),l=i(53651),c=i(16020),d=i(89758),u=i(98527),h=i(51855);o.pluginSystem.add("bold",function(e){let t=t=>{let i,o=s.Config.defaultOptions.controls[t],r={...o.css};Object.keys(r).forEach(e=>{i||(i={}),i[e]=(0,n.isArray)(r[e])?r[e][0]:r[e]});let a=o.tags?o.tags[0]:void 0;return e.s.commitStyle({element:a,exclude:"sub"===a?["sup"]:"sup"===a?["sub"]:[]}),e.synchronizeValues(),!1};["bold","italic","underline","strikethrough"].forEach(t=>{e.registerButton({name:t,group:"font-style"})}),["superscript","subscript"].forEach(t=>{e.registerButton({name:t,group:"script"})}),e.registerCommand("bold",{exec:t,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:t,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:t,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:t}).registerCommand("subscript",{exec:t}).registerCommand("superscript",{exec:t})}),r.Icon.set("bold",a.default).set("italic",l.default).set("strikethrough",c.default).set("subscript",d.default).set("superscript",u.default).set("underline",h.default)},73674:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.controls.subscript={tags:["sub"],tooltip:"Subscript"},o.Config.prototype.controls.superscript={tags:["sup"],tooltip:"Superscript"},o.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},o.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},o.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},o.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration-line":"line-through"},tooltip:"Strike through"}},820:function(e,t){"use strict";t.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.75" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 4h7a4 4 0 0 1 0 8H6V4Zm0 8h8a4 4 0 0 1 0 8H6v-8Z"/> </g> </svg> '},53651:function(e,t){"use strict";t.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"> <path d="M10 4h9M5 20h9M15 4 9 20"/> </g> </svg> '},16020:function(e,t){"use strict";t.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"> <path d="M17 6c-1-1.5-2.5-2-5-2-3 0-5 1.5-5 4 0 1.8 1.5 3 5 4s5 2.2 5 4c0 2.5-2 4-5 4-2.5 0-4-.5-5-2M3 12h18"/> </g> </svg> '},89758:function(e,t){"use strict";t.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"> <path d="m3 4 9 12M12 4 3 16M16 16a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg> '},98527:function(e,t){"use strict";t.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"> <path d="m3 8 9 12M12 8 3 20M16 4a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg> '},51855:function(e,t){"use strict";t.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"> <path d="M6 3v8a6 6 0 0 0 12 0V3M4 21h16"/> </g> </svg> '},71255:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(37790),s=i(50911),a=i(12153),l=i(6441),c=i(31151);l.Config.prototype.controls.classSpan={command:"applyClassName",exec:r.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&n.classList.contains(t.control.args[0].toString()))}return!1},isActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor,r=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{n.classList.contains(e)&&(r=!0)}),!!(n&&n!==e.editor&&void 0!==t.control.list&&r)}return!1},childTemplate:(e,t,i)=>`<span class="${t}">${e.i18n(i)}</span>`,tooltip:"Insert className"};class d extends s.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,i,o)=>(e.s.commitStyle({attributes:{class:o}}),!1))}beforeDestruct(){}constructor(){super(...arguments),this.buttons=[{name:"classSpan",group:"script"}]}}n.pluginSystem.add("classSpan",d),a.Icon.set("class-span",c.default)},31151:function(e,t){"use strict";t.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"> <path d="M8 4H5v16h3m8-16h3v16h-3M9 15l3-7 3 7m-5-2h4"/> </g> </svg> '},82439:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(70071),s=i(580),a=i(86518),l=i(20356);i(46776);var c=i(80973),d=i(59498),u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class h extends l.Plugin{afterInit(){this.onChangeCleanHTML()}get isEditMode(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}onChangeCleanHTML(){if(!this.isEditMode)return;let e=this.j;this.walker.setWork(e.editor),this.currentSelectionNode=e.s.current()}onInputRemovePlaceholderBr(e){var t;this.isEditMode&&("input"!==e.type||!e.isComposing&&(null==(t=e.inputType)?void 0:t.startsWith("insert")))&&(0,d.removePlaceholderBr)(this.j)}startWalker(){let{jodit:e}=this,t=(0,d.getHash)(this.j.o.cleanHTML.allowTags),i=(0,d.getHash)(this.j.o.cleanHTML.denyTags);this.walker.on("visit",o=>(0,d.visitNodeWalker)(e,o,t,i,this.currentSelectionNode)).on("end",e=>{this.j.e.fire(e?"internalChange finishedCleanHTMLWorker":"finishedCleanHTMLWorker")})}beforeCommand(e){if("removeformat"===e.toLowerCase())return this.j.s.isCollapsed()?(0,d.removeFormatForWord)(this.j):(0,d.removeFormatForSelection)(this.j),!1}onAfterSetNativeEditorValue(){(0,a.safeHTML)(this.j.editor,this.j.o.cleanHTML)}onBeforeSetNativeEditorValue(e){let[t,i]=this.j.o.cleanHTML.useIframeSandbox?this.j.createInside.sandbox():[this.j.od.implementation.createHTMLDocument("").body];return t.innerHTML=e.value,this.j.e.fire("safeHTML",t),this.__replaceOldTags(t),e.value=t.innerHTML,(0,a.safeHTML)(t,{safeJavaScriptLink:!0,removeOnError:!0}),n.Dom.safeRemove(i),!1}__replaceOldTags(e){let{replaceOldTags:t,disableCleanFilter:i}=this.j.o.cleanHTML;!t||(null==i?void 0:i.has("replaceOldTags"))||n.Dom.each(e,e=>{(0,c.replaceOldTags)(this.j,e,!1)})}onAfterGetValueFromEditor(e){if(this.__singleQuotesInFontFamily(e),this.__removeTrailingBr(e),!this.j.o.cleanHTML.collapseEmptyValueToEmptyString)return;let t=/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(e.value.trim());t&&/^(p|div|h[1-6]|blockquote|pre)$/i.test(t[1])&&(e.value="")}__removeTrailingBr(e){if(!this.j.o.cleanHTML.removeTrailingBr||!/<br/i.test(e.value))return;let t=this.j.c.div();t.innerHTML=e.value,[t,...t.querySelectorAll("p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote")].forEach(e=>{var t;let i=e.lastChild;if(!n.Dom.isTag(i,"br"))return;let o=i.previousSibling;!o||n.Dom.isTag(o,"br")||(!n.Dom.isText(o)||(null==(t=o.nodeValue)?void 0:t.trim())||o.previousSibling)&&n.Dom.safeRemove(i)}),e.value=t.innerHTML}__singleQuotesInFontFamily(e){this.j.o.cleanHTML.singleQuotesInFontFamily&&e.value.includes("&quot;")&&(e.value=e.value.replace(/\sstyle="([^"]*)"/gi,(e,t)=>{if(!t.includes("&quot;")||!/font-family/i.test(t))return e;let i=t.replace(/font-family\s*:(?:&quot;|[^;])*/gi,e=>e.includes("'")?e:e.replace(/&quot;/g,"'"));return e.replace(t,i)}))}onSafeHTML(e){let t=this.j.o.cleanHTML.sanitizer;t&&(e.innerHTML=t(e.innerHTML)),(0,a.safeHTML)(e,this.j.o.cleanHTML)}beforeDestruct(){this.j.e.off("safeHTML",this.onSafeHTML).off("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).off("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue),this.walker.destruct()}constructor(e){super(e),this.buttons=[{name:"eraser",group:"font-style"}],this.currentSelectionNode=null,this.walker=new r.LazyWalker(this.j.async,{timeout:this.j.o.cleanHTML.timeout}),e.e.on("safeHTML",this.onSafeHTML).on("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).on("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue)}}u([(0,o.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],h.prototype,"onChangeCleanHTML",null),u([(0,o.watch)([":input","jodit.editor:compositionend"])],h.prototype,"onInputRemovePlaceholderBr",null),u([(0,o.hook)("ready")],h.prototype,"startWalker",null),u([(0,o.watch)(":beforeCommand")],h.prototype,"beforeCommand",null),u([o.autobind],h.prototype,"onAfterSetNativeEditorValue",null),u([o.autobind],h.prototype,"onBeforeSetNativeEditorValue",null),u([(0,o.watch)(":afterGetValueFromEditor")],h.prototype,"onAfterGetValueFromEditor",null),u([o.autobind],h.prototype,"onSafeHTML",null),s.pluginSystem.add("cleanHtml",h)},46776:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,collapseEmptyValueToEmptyString:!1,singleQuotesInFontFamily:!0,removeTrailingBr:!1,replaceNBSP:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:"script,iframe,object,embed",useIframeSandbox:!1,removeOnError:!0,removeEventAttributes:!0,safeJavaScriptLink:!0,safeLinksTarget:!0,allowedStyles:!1,sanitizer:!1,sandboxIframesInContent:!0,convertUnsafeEmbeds:["object","embed"],disableCleanFilter:null},o.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},83447:function(e,t,i){"use strict";i.d(t,{getHash:function(){return r}});var o=i(70799),n=i(49055);function r(e){let t=/([^[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,s={};return(0,o.isString)(e)?(e.split(i).map(e=>{e=(0,n.trim)(e);let o=t.exec(e),a={};if(o){let e=o[2].split(i);o[1]&&(e.forEach(e=>{e=(0,n.trim)(e);let t=r.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),s[o[1].toUpperCase()]=a)}else s[e.toUpperCase()]=!0}),s):!!e&&(Object.keys(e).forEach(t=>{s[t.toUpperCase()]=e[t]}),s)}},59498:function(e,t,i){"use strict";i.d(t,{getHash:function(){return o.getHash},removeFormatForSelection:function(){return n.removeFormatForSelection},removeFormatForWord:function(){return r.removeFormatForWord},removePlaceholderBr:function(){return s.removePlaceholderBr},visitNodeWalker:function(){return a.visitNodeWalker}});var o=i(83447);i(84272);var n=i(42312),r=i(70464),s=i(56385),a=i(39516)},15908:function(e,t,i){"use strict";i.d(t,{isAllowedMediaEmbed:function(){return r}});let o=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,n=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function r(e){return o.test(e)||n.test(e)}},84272:function(e,t,i){"use strict";i.d(t,{isInlineBlock:function(){return s},removeFormatForCollapsedSelection:function(){return r}});var o=i(82758),n=i(2748);function r(e,t){let{s:i}=e,o=t;if(!o){o=e.createInside.fake();let{range:t}=i;n.Dom.safeInsertNode(t,o),t.collapse()}let r=n.Dom.furthest(o,s,e.editor);if(r)if(i.cursorOnTheLeft(r))n.Dom.before(r,o);else if(i.cursorOnTheRight(r))n.Dom.after(r,o);else{let e=i.splitSelection(r);e&&n.Dom.after(e,o)}t||(i.setCursorBefore(o),n.Dom.safeRemove(o))}function s(e){return n.Dom.isInlineBlock(e)&&!n.Dom.isTag(e,o.INSEPARABLE_TAGS)}},42312:function(e,t,i){"use strict";i.d(t,{removeFormatForSelection:function(){return s}});var o=i(2748),n=i(43555),r=i(84272);function s(e){let{s:t,editor:i,createInside:s}=e,{range:a}=t,l=a.cloneRange(),c=a.cloneRange(),d=s.fake(),u=s.fake();l.collapse(!0),c.collapse(!1),o.Dom.safeInsertNode(l,d),o.Dom.safeInsertNode(c,u),a.setStartBefore(d),a.collapse(!0),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,d),a.setEndAfter(u),a.collapse(!1),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,u);let h=[];o.Dom.between(d,u,e=>{(0,r.isInlineBlock)(e)&&!o.Dom.isTag(e,"a")&&h.push(e),o.Dom.isElement(e)&&(0,n.attr)(e,"style")&&(0,n.attr)(e,"style",null)}),h.forEach(e=>o.Dom.unwrap(e));let p=(e,t)=>{if(!o.Dom.findNotEmptySibling(e,t)){let o=e.parentNode;if(o&&o!==i&&(0,n.attr)(o,"style"))return(0,n.attr)(o,"style",null),p(o,t),!0}};p(d,!0)&&p(u,!1),a.setStartAfter(d),a.setEndBefore(u),t.selectRange(a),o.Dom.safeRemove(d),o.Dom.safeRemove(u)}},70464:function(e,t,i){"use strict";i.d(t,{removeFormatForWord:function(){return s}});var o=i(82758),n=i(2748),r=i(42312);function s(e){let{range:t}=e.s,i=n.Dom.closest(t.startContainer,n.Dom.isBlock,e.editor);if(!i)return;let o=l(i),s=o.map(e=>n.Dom.isText(e)?e.nodeValue:" ").join(""),u=function(e,t){let i=0;for(let o of e){if(o===t.startContainer)return i+t.startOffset;let e=c(o);if(t.comparePoint(o,n.Dom.isText(o)?e:0)>0)break;i+=e}return i}(o,t);if(!a(s[u-1])||!a(s[u]))return;let h=u,p=u;for(;a(s[h-1]);)h-=1;for(;a(s[p]);)p+=1;let m=e.s.createRange();m.setStart(...d(o,h,!0)),m.setEnd(...d(o,p,!1)),e.s.selectRange(m),(0,r.removeFormatForSelection)(e);let f=e.s.createRange();f.setStart(...d(l(i),u,!1)),e.s.selectRange(f)}function a(e){return!!(e&&e!==o.INVISIBLE_SPACE&&/\S/.test(e))}function l(e){let t=[];return n.Dom.each(e,i=>{!n.Dom.closest(i,n.Dom.isBlock,e)&&(n.Dom.isText(i)||n.Dom.isTag(i,o.INSEPARABLE_TAGS))&&t.push(i)}),t}function c(e){var t,i;return n.Dom.isText(e)?null!=(i=null==(t=e.nodeValue)?void 0:t.length)?i:0:1}function d(e,t,i){var o,r;let s=0,a=null;for(let o of e){let e=c(o);if(n.Dom.isText(o)&&(t<s+e||!i&&t===s+e))return[o,t-s];n.Dom.isText(o)&&(a=o),s+=e}return[a,null!=(r=null==(o=null==a?void 0:a.nodeValue)?void 0:o.length)?r:0]}},56385:function(e,t,i){"use strict";i.d(t,{removePlaceholderBr:function(){return a}});var o=i(82758),n=i(2748),r=i(49055);function s(e){let t=e.lastChild;for(;n.Dom.isText(t)&&!t.nodeValue;)t=t.previousSibling;return t}function a(e){var t;let i=n.Dom.closest(e.s.current(),n.Dom.isBlock,e.editor);if(!i||!(0,r.trim)(null!=(t=i.textContent)?t:""))return;let a=s(i);for(;n.Dom.isElement(a)&&!n.Dom.isTag(a,o.INSEPARABLE_TAGS)&&!n.Dom.isBlock(a);)a=s(a);!n.Dom.isTag(a,"br")||n.Dom.each(i,e=>{if(e!==a&&n.Dom.isElement(e)&&(n.Dom.isTag(e,o.INSEPARABLE_TAGS)||n.Dom.isBlock(e)||n.Dom.isHTMLElement(e)&&!e.isContentEditable))return!1})&&n.Dom.safeRemove(a)}},82558:function(e,t,i){"use strict";i.d(t,{allowAttributes:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i,r){let s=r&&o.Dom.isElement(t)&&r[t.nodeName];if(r&&o.Dom.isElement(t)&&!0!==s){if(!s)return i;let e=t.attributes;if(e&&e.length){let o=[];for(let t=0;t<e.length;t+=1){let i=s[e[t].name];i&&(!0===i||i===e[t].value)||o.push(e[t].name)}o.length&&(i=!0),o.forEach(e=>{(0,n.attrRaw)(t,e,null)})}}return i}},1962:function(e,t,i){"use strict";i.d(t,{convertUnsafeEmbeds:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!o.Dom.isElement(t))return i;let s=t.nodeName.toLowerCase();if(!r.includes(s))return i;let a=(0,n.attr)(t,"data")||(0,n.attr)(t,"src")||(0,n.attr)(t,"movie")||"";if(!a)return o.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,n.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,n.attr)(t,"width"),height:(0,n.attr)(t,"height")}),o.Dom.replace(t,l,void 0,!1,!0),!0}},39433:function(e,t,i){"use strict";i.d(t,{fillEmptyParagraph:function(){return s}});var o=i(82758),n=i(2748);let r=new Set(["table","tbody","thead","tfoot","tr"]);function s(e,t,i){if(e.o.cleanHTML.fillEmptyParagraph&&n.Dom.isBlock(t)&&n.Dom.isEmpty(t,o.INSEPARABLE_TAGS)&&!n.Dom.isTag(t,r)){let i=e.createInside.element("br");return n.Dom.append(t,i),!0}return i}},45235:function(e,t,i){"use strict";i.r(t),i.d(t,{allowAttributes:function(){return o.allowAttributes},convertUnsafeEmbeds:function(){return n.convertUnsafeEmbeds},fillEmptyParagraph:function(){return r.fillEmptyParagraph},removeEmptyTextNode:function(){return s.removeEmptyTextNode},removeInvTextNodes:function(){return a.removeInvTextNodes},replaceOldTags:function(){return l.replaceOldTags},safeLinksTarget:function(){return c.safeLinksTarget},sandboxIframesInContent:function(){return d.sandboxIframesInContent},sanitizeAttributes:function(){return u.sanitizeAttributes},sanitizeStyles:function(){return h.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var o=i(82558),n=i(1962),r=i(39433),s=i(53392),a=i(25813),l=i(80973),c=i(95614),d=i(85978),u=i(384),h=i(15583),p=i(28800)},53392:function(e,t,i){"use strict";i.d(t,{removeEmptyTextNode:function(){return n}});var o=i(2748);function n(e,t,i,n,r,s){return o.Dom.isText(t)&&!t.nodeValue?(t===s&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),o.Dom.safeRemove(t),!0):i}},25813:function(e,t,i){"use strict";i.d(t,{removeInvTextNodes:function(){return r}});var o=i(82758),n=i(2748);function r(e,t,i,r,s,a){if(a===t||!n.Dom.isText(t)||null==t.nodeValue||!(0,o.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return i;let l=n.Dom.furthest(a,n.Dom.isBlock,e.editor);return!l||n.Dom.isOrContains(l,t)?i:(t.nodeValue=t.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||n.Dom.safeRemove(t),!0)}},80973:function(e,t,i){"use strict";i.d(t,{replaceOldTags:function(){return n}});var o=i(2748);function n(e,t,i){let n=function(e,t,i){if(!i||!o.Dom.isHTMLElement(t))return t;let n=i[t.nodeName.toLowerCase()]||i[t.nodeName];if(n){let i=function(e,t){let{sel:i}=e.s;if(!(null==i?void 0:i.anchorNode)||!i.focusNode||!e.s.isFocused())return null;let{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:a}=i;return o.Dom.isOrContains(t,n)||o.Dom.isOrContains(t,s)?e=>{i.setBaseAndExtent(n===t?e:n,r,s===t?e:s,a)}:null}(e,t),r=o.Dom.replace(t,n,e.createInside,!0,!1);return null==i||i(r),r}return t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==n||i}},95614:function(e,t,i){"use strict";i.d(t,{safeLinksTarget:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){if(!e.o.cleanHTML.safeLinksTarget||!o.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,n.attr)(t,"target"))return i;let r=((0,n.attr)(t,"rel")||"").split(/\s+/).filter(Boolean),s=!1;return(r.includes("noopener")||(r.push("noopener"),s=!0),r.includes("noreferrer")||(r.push("noreferrer"),s=!0),s)?((0,n.attr)(t,"rel",r.join(" ")),!0):i}},85978:function(e,t,i){"use strict";i.d(t,{sandboxIframesInContent:function(){return s}});var o=i(2748),n=i(29960),r=i(15908);function s(e,t,i){return e.o.cleanHTML.sandboxIframesInContent&&o.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,r.isAllowedMediaEmbed)((0,n.attr)(t,"src")||"")||t.hasAttribute("sandbox")?i:((0,n.attr)(t,"sandbox",""),!0):i}},384:function(e,t,i){"use strict";i.d(t,{sanitizeAttributes:function(){return r}});var o=i(2748),n=i(21537);function r(e,t,i){if(!o.Dom.isElement(t))return i;let r=e.options.cleanHTML;return!!(0,n.sanitizeHTMLElement)(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})||i}},15583:function(e,t,i){"use strict";i.d(t,{sanitizeStyles:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=e.o.cleanHTML.allowedStyles;if(!r||!o.Dom.isElement(t))return i;let s=(0,n.attr)(t,"style");if(!s)return i;let a=function(e,t){let i=t[e],o=t["*"];if(!i&&!o)return null;let n=new Set;if(o)for(let e of o)n.add(e.toLowerCase());if(i)for(let e of i)n.add(e.toLowerCase());return n}(t.nodeName.toLowerCase(),r);if(!a)return i;let l=s.split(";").map(e=>e.trim()).filter(e=>{if(!e)return!1;let t=e.indexOf(":");if(-1===t)return!1;let i=e.substring(0,t).trim().toLowerCase();return a.has(i)}).join("; ").replace(/;\s*$/,"");return l!==s?((0,n.attr)(t,"style",l||null),!0):i}},28800:function(e,t,i){"use strict";i.d(t,{tryRemoveNode:function(){return l}});var o=i(82758),n=i(2748),r=i(49055),s=i(29960),a=i(15908);function l(e,t,i,l,c,d){return!function(e,t,i,l,c){if(!n.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let i="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,s.attr)(t,"src")||"");if(!l&&c&&c[e]&&!i)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let d=e.s.isCollapsed()?e.s.range.startContainer:null;return n.Dom.isElement(t)&&null!=t.nodeName.match(o.IS_INLINE)&&!n.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,r.trimInv)(t.innerHTML).length&&(null==i||!n.Dom.isOrContains(t,i))&&(null==d||!n.Dom.isOrContains(t,d))}(e,t,d,l,c)?i:(n.Dom.safeRemove(t),!0)}},39516:function(e,t,i){"use strict";i.d(t,{visitNodeWalker:function(){return s}});var o=i(82758),n=i(45235);let r=Object.keys(n);function s(e,t,i,s,a){let l=!1,c=e.o.cleanHTML.disableCleanFilter;for(let d of r)if(!(c&&c.has(d))&&(l=(0,n[d])(e,t,l,i,s,a),o.IS_PROD,!t.isConnected))return!0;return l}},61323:function(e,t,i){"use strict";var o=i(82758),n=i(33433),r=i(2748),s=i(580),a=i(21537);i(79419);class l{init(e){var t;null==(t=this.buttons)||t.forEach(t=>e.registerButton(t)),e.e.off(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`).on(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`,t=>{var i;let n=function(e,t){if(!t||e.s.isCollapsed())return t;let i=e.s.range.commonAncestorContainer;r.Dom.isElement(i)||(i=i.parentElement);let o=t;for(;i&&i!==e.editor&&r.Dom.isElement(i)&&!r.Dom.isBlock(i);){let e=i.cloneNode(!1);e.innerHTML=o,o=e.outerHTML,i=i.parentElement}return o}(e,e.s.html),s=(0,a.getDataTransfer)(t)||(0,a.getDataTransfer)(e.ew)||(0,a.getDataTransfer)(t.originalEvent);s&&(s.setData(o.TEXT_PLAIN,(0,a.stripTags)(n)),s.setData(o.TEXT_HTML,n)),e.buffer.set(o.CLIPBOARD_ID,n),e.e.fire("pasteStack",{html:n,action:e.o.defaultActionOnPaste||o.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),null==(i=null==e?void 0:e.events)||i.fire("afterCopy",n)})}destruct(e){var t,i;null==(t=(0,n.cached)(e,"buffer"))||t.set(o.CLIPBOARD_ID,""),null==(i=null==e?void 0:e.events)||i.off("."+o.CLIPBOARD_ID)}constructor(){this.buttons=[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}]}}s.pluginSystem.add("clipboard",l)},79419:function(e,t,i){"use strict";var o=i(12153),n=i(6441),r=i(94775),s=i(23140),a=i(92699),l=i(10052);n.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},n.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},n.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},o.Icon.set("copy",r.default).set("cut",s.default).set("paste",a.default).set("select-all",l.default)},94775:function(e,t){"use strict";t.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="8" y="8" width="13" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/> </g> </svg> '},23140:function(e,t){"use strict";t.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"> <circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="m8.2 8.2 12.3 12.3M8.2 15.8 20.5 3.5"/> </g> </svg> '},92699:function(e,t){"use strict";t.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="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/> </g> </svg> '},10052:function(e,t){"use strict";t.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"> <path d="M3 6V3h3m4 0h4m4 0h3v3m0 4v4m0 4v3h-3m-4 0h-4m-4 0H3v-3m0-4v-4"/><rect x="7" y="7" width="10" height="10" rx="1"/> </g> </svg> '},46104:function(e,t){"use strict";t.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"> <path d="M12 3c-2 3.2-5.5 7-5.5 10a5.5 5.5 0 0 0 11 0c0-3-3.5-6.8-5.5-10Z"/> </g> <rect x="5" y="21" width="14" height="2" rx="1" fill="inherit" stroke="none"/> </svg> '},93079:function(e,t,i){"use strict";var o=i(580),n=i(21537);i(21988),o.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,i,o)=>{var r;let s=(0,n.normalizeColor)(o)||"",a="background"===t?{backgroundColor:s}:{color:s},l=e.getInstance("Table",e.o).getAllSelectedCells();return l.length&&e.s.isCollapsed()?(l.forEach(t=>{e.s.select(t,!0),e.s.commitStyle({attributes:{style:a}})}),null==(r=e.s.sel)||r.removeAllRanges()):e.s.commitStyle({attributes:{style:a}}),e.synchronizeValues(),!1};e.registerCommand("forecolor",t).registerCommand("background",t)})},21988:function(e,t,i){"use strict";var o=i(2748),n=i(21537),r=i(12153),s=i(6441),a=i(92762),l=i(46104);function c(e,t,i){(0,n.css)(e,t,i),(0,n.attr)(e,"style")||(0,n.attr)(e,"style",null)}r.Icon.set("brush",l.default),s.Config.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes("color"),icon:"brush",popup(e,t,i){if(!(0,n.isJoditObject)(e))return;let o=e.getInstance("Table",e.o).getAllSelectedCells();if(!o.length)return!1;let r=t=>(0,a.ColorPickerWidget)(e,n=>{o.forEach(e=>{c(e,t,n)}),e.lock(),e.synchronizeValues(),i(),e.unlock()},(0,n.css)(o[0],t));return(0,a.TabsWidget)(e,[{name:"Background",content:r("background-color")},{name:"Text",content:r("color")},{name:"Border",content:r("border-color")}])},tooltip:"Background"},s.Config.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes("color"),update(e,t){let i=(0,n.dataBind)(t,"color"),r=(i,o)=>!!o&&o!==(0,n.css)(e.editor,i).toString()&&(t.state.icon.fill=o,!0);if(i){let e=(0,n.dataBind)(t,"color");r("color"===e?e:"background-color",i);return}let s=e.s.current();if(s&&!t.state.disabled){let t=o.Dom.closest(s,o.Dom.isElement,e.editor)||e.editor,i=r("color",(0,n.css)(t,"color").toString()),a=r("background-color",(0,n.css)(t,"background-color").toString());if(i||a)return}t.state.icon.fill="",t.state.activated=!1},popup(e,t,i,r){let s="",l="",d,u=null;return t&&t!==e.editor&&o.Dom.isNode(t)&&(o.Dom.isElement(t)&&e.s.isCollapsed()&&!o.Dom.isTag(t,new Set(["br","hr"]))&&(u=t),o.Dom.up(t,e=>{if(o.Dom.isHTMLElement(e)){let t=(0,n.css)(e,"color",!0),i=(0,n.css)(e,"background-color",!0);if(t)return s=t.toString(),!0;if(i)return l=i.toString(),!0}},e.editor)),d=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{u?c(u,"backgroundColor",t):e.execCommand("background",!1,t),(0,n.dataBind)(r,"color",t),(0,n.dataBind)(r,"color-mode","background"),i()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{u?c(u,"color",t):e.execCommand("forecolor",!1,t),(0,n.dataBind)(r,"color",t),(0,n.dataBind)(r,"color-mode","color"),i()},s)}],"background"!==e.o.colorPickerDefaultTab&&(d=d.reverse()),(0,a.TabsWidget)(e,d,u)},exec(e,t,{button:i}){let r=(0,n.dataBind)(i,"color-mode"),s=(0,n.dataBind)(i,"color");if(!r)return!1;if(t&&t!==e.editor&&o.Dom.isNode(t)&&o.Dom.isElement(t))switch(r){case"color":c(t,"color",s);break;case"background":c(t,"backgroundColor",s)}else e.execCommand("background"===r?r:"forecolor",!1,s)},tooltip:"Fill color or set the text color"}},19063:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(41180),s=i(12153),a=i(6441),l=i(57487),c=i(23914);let d="copy-format",u=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],h=(e,t,i,o)=>{let n=(0,r.css)(i,t);return n===o[t]&&(n=i.parentNode&&i!==e.editor&&i.parentNode!==e.editor?h(e,t,i.parentNode,o):void 0),n};a.Config.prototype.controls.copyformat={exec(e,t,{button:i}){if(t){if(e.buffer.exists(d))e.buffer.delete(d),e.e.off(e.editor,"mouseup."+d);else{let i,n={},s=o.Dom.up(t,e=>e&&!o.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();o.Dom.append(e.editor,a),u.forEach(e=>{n[e]=(0,r.css)(a,e)}),a!==e.editor&&o.Dom.safeRemove(a);let l=(i={},s&&u.forEach(t=>{i[t]=h(e,t,s,n),t.match(/border(Style|Color)/)&&!i.borderWidth&&(i[t]=void 0)}),i);e.e.on(e.editor,"mouseup."+d,()=>{e.buffer.delete(d);let t=e.s.current();t&&(o.Dom.isTag(t,"img")?(0,r.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+d)}),e.buffer.set(d,!0)}i.update()}},isActive:e=>e.buffer.exists(d),tooltip:"Paint format"},n.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,n.extendLang)(c)}),s.Icon.set("copyformat",l.default)},57487:function(e,t){"use strict";t.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="14" height="6" rx="1"/><path d="M17 6h4v7H11v3"/><rect x="9" y="16" width="4" height="6" rx="1"/> </g> </svg> '},23914:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return n.a},cs_cz:function(){return n.a},de:function(){return n.a},es:function(){return n.a},fa:function(){return n.a},fi:function(){return n.a},fr:function(){return n.a},he:function(){return n.a},hu:function(){return n.a},id:function(){return n.a},it:function(){return n.a},ja:function(){return n.a},ko:function(){return n.a},mn:function(){return n.a},nl:function(){return n.a},pl:function(){return n.a},pt_br:function(){return n.a},ru:function(){return n.a},tr:function(){return n.a},zh_cn:function(){return n.a},zh_tw:function(){return n.a}});var o=i(41324),n=i.n(o)},66707:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(21537),a=i(49055),l=i(50911);let c=new Set(["img","table","jodit","iframe","hr"]),d=new Set(["pre","pre-wrap","break-spaces"]);function u(e,t){let i=0;for(;i<e.length&&" "===e.charAt(t?e.length-1-i:i);)i+=1;return 0===i?e:t?e.slice(0,e.length-i)+o.NBSP_SPACE.repeat(i):o.NBSP_SPACE.repeat(i)+e.slice(i)}function h(e,t){var i;return!e||n.Dom.isTag(e,"br")||n.Dom.isBlock(e)||n.Dom.isText(e)&&t.test(null!=(i=e.nodeValue)?i:"")}class p extends l.Plugin{afterInit(e){e.e.on("afterCommand.delete",e=>{"delete"===e&&this.__afterDeleteCommand()}),e.registerCommand("delete",{exec:this.__onDeleteCommand.bind(this)},{stopPropagation:!1})}beforeDestruct(e){e.e.off("afterCommand.delete")}__afterDeleteCommand(){let e=this.j,t=e.s.current();if(t&&n.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,a.trim)(e.editor.textContent||"")&&!n.Dom.first(e.editor,e=>n.Dom.isTag(e,c))&&(!t||!n.Dom.closest(t,"table",e.editor))){n.Dom.detach(e.editor);let t=e.s.setCursorIn(e.editor);e.s.removeNode(t)}}__onDeleteCommand(){let{jodit:e}=this;if(e.s.isCollapsed())return;e.s.expandSelection();let t=e.s.range;this.__moveEdgesIntoCells(t);let i=this.__clearSelectedCells(t);if(i&&t.collapsed)return e.s.selectRange(i),!1;t.deleteContents();let o=e.createInside.fake();t.insertNode(o);let r=n.Dom.findSibling(o,!0),s=n.Dom.findSibling(o,!1);return this.__moveContentInLeftSibling(o,r,s),this.__keepSpacesVisible(o),this.__keepSpacesVisibleBesideTable(o),t.setStartBefore(o),t.collapse(!0),this.__moveCursorInEditableSibling(e,r,o,t),this.__addBrInEmptyBlock(o,t),n.Dom.safeRemove(o),e.s.selectRange(null!=i?i:t),!1}__moveEdgesIntoCells(e){let{startContainer:t,startOffset:i,endContainer:o,endOffset:r}=e,s=n.Dom.isTag(t,"tr")?t.childNodes[i]:null,a=n.Dom.isTag(o,"tr")?o.childNodes[r-1]:null;n.Dom.isCell(s)&&e.setStart(s,0),n.Dom.isCell(a)&&e.setEnd(a,a.childNodes.length)}__clearSelectedCells(e){let{editor:t,createInside:i}=this.j,o=n.Dom.closest(e.startContainer,n.Dom.isCell,t),r=n.Dom.closest(e.endContainer,n.Dom.isCell,t);if(o===r)return null;let a=n.Dom.closest(o,"table",t),l=n.Dom.closest(r,"table",t),c=e.cloneRange();c.collapse(!0);let d=e.cloneRange();d.collapse(!1);let u=[],h=t=>{(0,s.toArray)(t.rows).flatMap(e=>(0,s.toArray)(e.cells)).filter(t=>e.intersectsNode(t)).forEach(t=>{let i=e.cloneRange();n.Dom.isOrContains(t,e.startContainer)||i.setStart(t,0),n.Dom.isOrContains(t,e.endContainer)||i.setEnd(t,t.childNodes.length),u.push([t,i])})};return a&&(h(a),a===l?e.collapse(!0):e.setStartAfter(a)),l&&l!==a&&(h(l),e.setEndBefore(l)),u.forEach(([e,t])=>{if(t.deleteContents(),n.Dom.isEmpty(e)){n.Dom.detach(e),n.Dom.append(e,i.element("br"));return}[c,d].filter(t=>n.Dom.isOrContains(e,t.startContainer)).forEach(e=>{let t=i.fake();e.insertNode(t),this.__keepSpacesVisible(t),e.setStartBefore(t),e.collapse(!0),n.Dom.safeRemove(t)})}),a?c:null}__moveContentInLeftSibling(e,t,i){if(t=this.__defineRightLeftBox(t),n.Dom.isTag(t,"table")){n.Dom.isBlock(i)&&n.Dom.isEmpty(i)&&n.Dom.safeRemove(i);return}if(!n.Dom.isList(i)&&!n.Dom.isTag(i,"table")&&n.Dom.isBlock(i)&&n.Dom.isBlock(t)&&(n.Dom.append(t,e),n.Dom.moveContent(i,t),n.Dom.safeRemove(i)),n.Dom.isList(i)&&n.Dom.isLeaf(i.firstElementChild)){let o=i.firstElementChild;if(!n.Dom.isEmpty(o)&&n.Dom.isBlock(t))for(n.Dom.append(t,e);o.firstChild&&!n.Dom.isBlock(o.firstChild);)n.Dom.append(t,o.firstChild);n.Dom.isEmpty(o)&&n.Dom.safeRemove(o),n.Dom.isEmpty(i)&&n.Dom.safeRemove(i)}}__keepSpacesVisible(e){var t;let{jodit:i}=this,o=null!=(t=n.Dom.closest(e,n.Dom.isBlock,i.editor))?t:i.editor;if(d.has(i.ew.getComputedStyle(o).whiteSpace))return;let r=this.__findNeighbor(e,!0,o),s=this.__findNeighbor(e,!1,o);n.Dom.isText(r)&&h(s,/^ /)&&(r.nodeValue=u(r.nodeValue,!0)),n.Dom.isText(s)&&h(r,/ $/)&&(s.nodeValue=u(s.nodeValue,!1))}__keepSpacesVisibleBesideTable(e){let t=n.Dom.findNotEmptySibling(e,!0),i=n.Dom.findNotEmptySibling(e,!1),o=n.Dom.isTag(i,"table")?t:n.Dom.isTag(t,"table")?i:null;if(!n.Dom.isBlock(o)||n.Dom.isTag(o,"table"))return;let r=this.jodit.createInside.fake();o===t?n.Dom.append(o,r):o.insertBefore(r,o.firstChild),this.__keepSpacesVisible(r),n.Dom.safeRemove(r)}__findNeighbor(e,t,i){return(0,s.call)(t?n.Dom.prev:n.Dom.next,e,e=>{var t;return n.Dom.isText(e)?(0,s.trimInv)(null!=(t=e.nodeValue)?t:"").length>0:!n.Dom.isComment(e)&&!(n.Dom.isInlineBlock(e)&&e.firstChild)},i)}__defineRightLeftBox(e){if(!n.Dom.isList(e))return e;let t=e.lastElementChild;return n.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),n.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t){let i=this.j;if(e.isConnected&&n.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let o=i.createInside.element("br");n.Dom.after(e,o),t.setStartBefore(o),t.collapse(!0)}}__moveCursorInEditableSibling(e,t,i,o){var r;if(!t||!n.Dom.isText(t)){let t=null!=(r=n.Dom.closest(i,n.Dom.isBlock,e.editor))?r:e.editor,s=n.Dom.prev(i,n.Dom.isText,t);s&&(o.setStartAfter(s),o.collapse(!0),n.Dom.safeRemove(i))}}}p.requires=["backspace"],r.pluginSystem.add("deleteCommand",p)},44586:function(e,t,i){"use strict";i(6441).Config.prototype.draggableTags=["img","jodit-media","jodit"]},1255:function(e,t,i){"use strict";var o,n,r=i(65478),s=i(22732),a=i(580),l=i(21537),c=i(50911);i(44586);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(o=n||(n={}))[o.IDLE=0]="IDLE",o[o.WAIT_DRAGGING=1]="WAIT_DRAGGING",o[o.DRAGGING=2]="DRAGGING";class u extends c.Plugin{afterInit(){this.dragList=this.j.o.draggableTags?(0,l.splitArray)(this.j.o.draggableTags).filter(Boolean).map(e=>e.toLowerCase()):[],this.j.e.on("startDragElement",this.onStartDragElement),this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}onStartDragElement(e,t){this.isInDestruct||this.state>n.IDLE||!e||this.startDragging(e,t)}onDragStart(e){var t;if("dragstart"===e.type&&this.draggable)return!1;if(this.state>n.IDLE)return;let i=e.target;if(!this.dragList.length||!i)return;let o=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),r=s.Dom.furthest(i,o,this.j.editor)||(o(i)?i:null);r&&(s.Dom.isTag(r.parentElement,"a")&&r.parentElement.firstChild===r&&r.parentElement.lastChild===r&&(r=r.parentElement),this.startDragging(null!=(t=(0,l.getCaptionWrapper)(this.j,r))?t:r,e))}startDragging(e,t){this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,l.ctrlKey)(t),this.draggable=e.cloneNode(!0),(0,l.dataBind)(this.draggable,"target",e),this.state=n.WAIT_DRAGGING,this.addDragListeners()}onDrag(e){var t,i;if(!this.draggable||this.state===n.IDLE)return;let o=e.clientX,r=e.clientY;if(this.state===n.WAIT_DRAGGING&&Math.sqrt(Math.pow(o-this.startX,2)+Math.pow(r-this.startY,2))<this.diffStep)return;this.state===n.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=n.DRAGGING),this.j.e.fire("hidePopup hideResizer");let c=this.__ghostOffset();if(!this.draggable.parentNode){let o=(0,l.dataBind)(this.draggable,"target");(0,l.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:e.clientX+c.left,top:e.clientY+c.top,width:null!=(t=null==o?void 0:o.offsetWidth)?t:100,height:null!=(i=null==o?void 0:o.offsetHeight)?i:100}),s.Dom.append((0,a.getContainer)(this.j,u),this.draggable)}(0,l.css)(this.draggable,{left:e.clientX+c.left,top:e.clientY+c.top}),this.j.s.insertCursorAtPoint(e.clientX,e.clientY)}__ghostOffset(){let e=this.j.iframe;if(!e)return{left:0,top:0};let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}onDragEnd(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=n.IDLE,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<n.DRAGGING)return void this.onDragEnd();let e=(0,l.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(e=e.cloneNode(!0));let{parentElement:t}=e;this.j.s.insertNode(e,!0,!1),[e.previousSibling,e.nextSibling].forEach(e=>{s.Dom.isEmptyTextNode(e)&&s.Dom.safeRemove(e)}),t&&s.Dom.isEmpty(t)&&!s.Dom.isCell(t)&&s.Dom.safeRemove(t),s.Dom.isTag(e,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",e),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove",this.onDrag).on("mouseup",this.onDrop).on([this.j.ew,this.ow],"mouseup",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove",this.onDrag).off("mouseup",this.onDrop).off([this.j.ew,this.ow],"mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown dragstart",this.onDragStart).off("startDragElement",this.onStartDragElement),this.removeDragListeners()}constructor(){super(...arguments),this.dragList=[],this.draggable=null,this.isCopyMode=!1,this.diffStep=10,this.startX=0,this.startY=0,this.state=n.IDLE}}d([r.autobind],u.prototype,"onStartDragElement",null),d([r.autobind],u.prototype,"onDragStart",null),d([(0,r.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),d([r.autobind],u.prototype,"onDragEnd",null),d([r.autobind],u.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",u)},19271:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(8172),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart).on("drop.DragAndDrop",this.onDrop)}onDragStart(e){var t;let i=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=r.Dom.isOrContains(this.j.editor,i,!0),this.isCopyMode=!this.isFragmentFromEditor||(0,a.ctrlKey)(e),this.isFragmentFromEditor){let e=this.j.s.sel,t=e&&e.rangeCount?e.getRangeAt(0):null;t&&(this.bufferRange=t.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=e.clientX,this.startDragPoint.y=e.clientY,t=i,r.Dom.isElement(t)&&t.classList.contains(c.FileBrowserFiles.prototype.getFullElName("item"))&&(i=r.Dom.first(i,e=>r.Dom.isTag(e,"img"))),r.Dom.isTag(i,"img")&&(this.draggable=i.cloneNode(!0),(0,a.dataBind)(this.draggable,"target",i)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}onDrag(e){this.draggable&&(this.j.e.fire("hidePopup"),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),e.preventDefault(),e.stopPropagation())}onDragEnd(){this.draggable&&(r.Dom.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(e){if(!e.dataTransfer||!e.dataTransfer.files||!e.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire("paste",e),e.preventDefault(),e.stopPropagation(),!1;let t=this.j.s.sel,i=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),o=this.__getWorkFragment(i,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),o&&this.__insertFragment.call(this,o,i),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let i=null;if(!this.draggable&&e)i=this.isCopyMode?e.cloneContents():e.extractContents();else if(this.draggable)if(this.isCopyMode){let[e,t]="1"===(0,a.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(e),(0,a.attr)(i,t,(0,a.attr)(this.draggable,"data-src")||(0,a.attr)(this.draggable,"src")||""),"a"===e&&(i.textContent=(0,a.attr)(i,t)||"")}else i=(0,a.dataBind)(this.draggable,"target");else if(this.getText(t)){let e=this.j.createInside.div();e.innerHTML=this.getText(t),this.j.e.fire("safeHTML",e),i=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e}return i}__insertFragment(e,t){this.j.s.insertNode(e,!1,!1),t&&e.firstChild&&e.lastChild&&(t.setStartBefore(e.firstChild),t.setEndAfter(e.lastChild),this.j.s.selectRange(t),this.j.e.fire("synchro")),r.Dom.isTag(e,"img")&&this.j.events&&this.j.e.fire("afterInsertImage",e)}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,".DragAndDrop").off(".DragAndDrop").off([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.getText=e=>{let t=(0,a.getDataTransfer)(e);return t?t.getData(o.TEXT_HTML)||t.getData(o.TEXT_PLAIN):null}}}d([n.autobind],u.prototype,"onDragStart",null),d([(0,n.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),d([n.autobind],u.prototype,"onDragEnd",null),d([n.autobind],u.prototype,"onDrop",null),s.pluginSystem.add("dragAndDrop",u)},46124:function(e,t,i){"use strict";i.r(t),i.d(t,{removeExtraBr:function(){return o.removeExtraBr}});var o=i(94870)},94870:function(e,t,i){"use strict";i.d(t,{removeExtraBr:function(){return r}});var o=i(2748);let n=new Set(["table","pre","blockquote","code"]);function r(e,t){if(!e.o.dtd.removeExtraBr||o.Dom.isTag(t,"br"))return;let i=o.Dom.furthest(t,o.Dom.isBlock,e.editor);if(i&&!o.Dom.isTag(i,n)){let i=o.Dom.isTag(t,"br")?t:o.Dom.findNotEmptySibling(t,!1);if(!o.Dom.isTag(i,"br")||o.Dom.findNotEmptySibling(i,!1))return;o.Dom.isOrContains(t,e.s.range.startContainer)||e.s.setCursorBefore(i),o.Dom.safeRemove(i)}}},78720:function(e,t,i){"use strict";i.d(t,{checkBlockNesting:function(){return n}});var o=i(2748);function n(e,t){var i,n;if(o.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&o.Dom.isBlock(t)){let r=null,s=null!=(n=null==(i=e.s.current())?void 0:i.parentElement)?n:null;for(;s&&s!==e.editor;){if(o.Dom.isBlock(s)){let t=!r&&o.Dom.isTag(s,e.o.enter)&&o.Dom.isEmpty(s);if(e.o.dtd.blockLimits[s.nodeName.toLowerCase()]&&!t)break;r=s}s=s.parentElement}o.Dom.isLeaf(s)&&o.Dom.isList(t)&&o.Dom.isFragment(t.parentNode)&&!o.Dom.findNotEmptySibling(t,!1)&&(o.Dom.unwrap(t),r=s),r&&function(e,t){var i;let{s:n}=e;if(o.Dom.isEmpty(t)){n.setCursorAfter(t),o.Dom.safeRemove(t);return}n.cursorOnTheRight(t)?n.setCursorAfter(t):n.cursorOnTheLeft(t)?n.setCursorBefore(t):n.setCursorAfter(null!=(i=n.splitSelection(t))?i:t)}(e,r)}}},43267:function(e,t,i){"use strict";i.r(t),i.d(t,{checkBlockNesting:function(){return o.checkBlockNesting}});var o=i(78720)},9045:function(e,t,i){"use strict";i(6441).Config.prototype.dtd={removeExtraBr:!0,checkBlockNesting:!0,blockLimits:{article:1,aside:1,audio:1,body:1,caption:1,dd:1,details:1,dir:1,div:1,dl:1,dt:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,li:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1}}},65735:function(e,t,i){"use strict";var o=i(37133),n=i(580),r=i(50911);i(9045);var s=i(46124),a=i(43267),l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends r.Plugin{afterInit(e){}beforeDestruct(e){}__onBeforeInsertNode(e){Object.keys(a).forEach(t=>{a[t](this.j,e)})}__onAfterInsertNode(e){Object.keys(s).forEach(t=>{s[t](this.j,e)})}}l([(0,o.watch)(":beforeInsertNode")],c.prototype,"__onBeforeInsertNode",null),l([(0,o.watch)(":afterInsertNode")],c.prototype,"__onAfterInsertNode",null),n.pluginSystem.add("dtd",c)},575:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(87612),l=i(20356),c=i(35399);class d extends l.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),i=t===o.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=i?o.PARAGRAPH:t),e.registerCommand("enter",(e,t,i={})=>this.onEnter(i))}onEnterKeyDown(e){if(e.key===o.KEY_ENTER){let t=this.j,i=t.e.fire("beforeEnter",e);return void 0!==i?i:(t.history.snapshot.transaction(()=>{t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),t.e.fire("afterEnter",e)}),t.synchronizeValues(),!1)}}onEnter(e){let{jodit:t}=this,i=t.createInside.fake();try{r.Dom.safeInsertNode(t.s.range,i),(0,c.moveCursorOutFromSpecialTags)(t,i,["a"]);let o=(0,c.getBlockWrapper)(i,t),n=r.Dom.isLeaf(o);if((!n||(null==e?void 0:e.shiftKey))&&(0,c.checkBR)(i,t,null==e?void 0:e.shiftKey,o))return!1;if(o||(0,c.hasPreviousBlock)(i,t)||(o=(0,c.wrapText)(i,t)),!o)return(0,c.insertParagraph)(i,t,n?"li":t.o.enter),!1;if(!(0,c.checkUnsplittableBox)(i,t,o))return!1;if(n&&this.__isEmptyListLeaf(o))return(0,c.processEmptyLILeaf)(i,t,o),!1;(0,c.splitFragment)(i,t,o)}finally{i.isConnected&&t.s.setCursorBefore(i),r.Dom.safeRemove(i)}}__isEmptyListLeaf(e){let t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,a.isBoolean)(t)?t:r.Dom.isEmpty(e)}beforeDestruct(e){e.e.off("keydown.enter")}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":keydown.enter")],d.prototype,"onEnterKeyDown",null),s.pluginSystem.add("enter",d)},41872:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return s}});var o=i(82758),n=i(2748),r=i(26395);function s(e,t,i,s){let l=!!n.Dom.closest(e,"pre",t.editor)||(s?n.Dom.isTag(s,"blockquote"):!!n.Dom.closest(e,"blockquote",t.editor)),c=!l&&(s?n.Dom.isCell(s):!!n.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===o.BR.toLowerCase()||c||i&&!l||!i&&l){var d;let i;if(l&&(i=a(a(d=e)))&&(n.Dom.safeRemove(a(d)),n.Dom.safeRemove(i),1))return!1;let o=t.createInside.element("br");if(n.Dom.before(e,o),!n.Dom.findNotEmptySibling(o,!1)){let t=o.cloneNode();n.Dom.after(o,t),n.Dom.before(t,e)}let s=o.cloneNode();return n.Dom.before(e,s),(0,r.scrollIntoViewIfNeeded)(s,t.editor,t.ed),n.Dom.safeRemove(s),!0}return!1}function a(e){if(!e)return!1;let t=n.Dom.findSibling(e,!0);return!!t&&!!n.Dom.isTag(t,"br")&&t}},61991:function(e,t,i){"use strict";i.d(t,{checkUnsplittableBox:function(){return n}});var o=i(2748);function n(e,t,i){return!!o.Dom.canSplitBlock(i)||(o.Dom.before(e,t.createInside.element("br")),!1)}},54041:function(e,t,i){"use strict";i.d(t,{getBlockWrapper:function(){return function e(t,i,r=o.IS_BLOCK){let s=t,a=i.editor;do{if(!s||s===a)break;if(r.test(s.nodeName)){if(n.Dom.isLeaf(s))return s;return e(s.parentNode,i,/^li$/i)||s}s=s.parentNode}while(s&&s!==a)return null}}});var o=i(82758),n=i(2748)},19057:function(e,t,i){"use strict";i.d(t,{hasPreviousBlock:function(){return n}});var o=i(2748);function n(e,t){return!!o.Dom.prev(e,e=>o.Dom.isBlock(e)||o.Dom.isImage(e),t.editor)}},35399:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return o.checkBR},checkUnsplittableBox:function(){return n.checkUnsplittableBox},getBlockWrapper:function(){return r.getBlockWrapper},hasPreviousBlock:function(){return s.hasPreviousBlock},insertParagraph:function(){return a.insertParagraph},moveCursorOutFromSpecialTags:function(){return l.moveCursorOutFromSpecialTags},processEmptyLILeaf:function(){return c.processEmptyLILeaf},splitFragment:function(){return d.splitFragment},wrapText:function(){return u.wrapText}});var o=i(41872),n=i(61991),r=i(54041),s=i(19057),a=i(44245),l=i(91388),c=i(65181),d=i(54600),u=i(5287)},44245:function(e,t,i){"use strict";i.d(t,{insertParagraph:function(){return s}});var o=i(2748),n=i(29960),r=i(26395);function s(e,t,i,s){let a="br"===i.toLowerCase(),{createInside:l}=t,c=l.element(i),d=l.element("br");return a||o.Dom.append(c,d),s&&s.cssText&&(0,n.attr)(c,"style",s.cssText),o.Dom.after(e,c),o.Dom.before(a?c:d,e),(0,r.scrollIntoViewIfNeeded)(c,t.editor,t.ed),c}},91388:function(e,t,i){"use strict";i.d(t,{moveCursorOutFromSpecialTags:function(){return n}});var o=i(2748);function n(e,t,i){let{s:n}=e,r=o.Dom.closest(t,i,e.editor);if(r){if(n.cursorOnTheRight(r,t))o.Dom.after(r,t);else{if(!n.cursorOnTheLeft(r,t))return;o.Dom.before(r,t)}let e=n.createRange();e.setStartBefore(t),n.selectRange(e)}}},65181:function(e,t,i){"use strict";i.d(t,{processEmptyLILeaf:function(){return s}});var o=i(2748),n=i(76078),r=i(44245);function s(e,t,i){let s=o.Dom.closest(i,["ol","ul"],t.editor);if(!s)return;let a=s.parentElement,l=o.Dom.isLeaf(a),c=l?a:s,d=t.s.createRange();d.setStartAfter(i),d.setEndAfter(s);let u=d.extractContents();o.Dom.after(c,e),o.Dom.safeRemove(i),(0,n.$$)("li",s).length||o.Dom.safeRemove(s);let h=(0,r.insertParagraph)(e,t,l?"li":t.o.enter);o.Dom.first(u,e=>o.Dom.isTag(e,"li"))&&(l?o.Dom.append(h,u):o.Dom.after(h,u))}},54600:function(e,t,i){"use strict";i.d(t,{splitFragment:function(){return s}});var o=i(2748),n=i(26395),r=i(44245);function s(e,t,i){let s=t.s,{enter:a}=t.o,l=a.toLowerCase(),c=o.Dom.isLeaf(i),d=i.tagName.toLowerCase()===l||c,u=s.cursorOnTheRight(i,e),h=s.cursorOnTheLeft(i,e);if(!d&&(u||h)){u?o.Dom.after(i,e):o.Dom.before(i,e),(0,r.insertParagraph)(e,t,l),h&&!u&&o.Dom.prepend(i,e);return}let{scrollTop:p}=t.editor;s.splitSelection(i,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,n.scrollIntoViewIfNeeded)(i,t.editor,t.ed)}},5287:function(e,t,i){"use strict";i.d(t,{wrapText:function(){return n}});var o=i(2748);function n(e,t){let i=e;o.Dom.up(i,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(i=e)},t.editor);let n=o.Dom.wrapInline(i,t.o.enter,t);if(o.Dom.isEmpty(n)){let i=t.createInside.element("br");o.Dom.append(n,i),o.Dom.before(i,e)}return n}},11317:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(29960),s=i(6441),a=i(2073),l=i(92762);function c(e,t,i=""){if(e.s.isCollapsed())return!1;let o=e.s.wrapInTag("a");return!!o.length&&(o.forEach(e=>{(0,r.attr)(e,"href",t),i&&(0,r.attr)(e,"title",i)}),e.s.setCursorAfter(o[o.length-1]),!0)}function d(e){let{baseurl:t}=e;(0,a.getItems)(e).forEach(({file:e})=>{let i=t+e;if(c(this,i))return;let o=this.createInside.element("a",{href:i});o.textContent=this.o.uploader.getDisplayName.call(this.uploader,t,e),this.s.insertNode(o)})}s.Config.prototype.file={defaultHandlerSuccess:d},s.Config.prototype.controls.file={popup(e,t,i){let n=e.s.isCollapsed()?null:e.s.range,s=()=>{n&&e.s.selectRange(n)},u=(t,i="")=>{s(),c(e,t,i)||e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))},h=null;return t&&(o.Dom.isTag(t,"a")||o.Dom.closest(t,"a",e.editor))&&(h=o.Dom.isTag(t,"a")?t:o.Dom.closest(t,"a",e.editor)),(0,l.FileSelectorWidget)(e,{filebrowser(e){(0,a.getItems)(e).forEach(({file:t})=>u(e.baseurl+t)),i()},upload(t){var i,o;s(),(null!=(o=null==(i=e.o.file)?void 0:i.defaultHandlerSuccess)?o:d).call(e,t)},url(e,t){h?((0,r.attr)(h,"href",e),(0,r.attr)(h,"title",t)):u(e,t),i()}},h,i,!1)},tags:["a"],tooltip:"Insert file"},n.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},36243:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(6441);s.Config.prototype.autofocus=!1,s.Config.prototype.cursorAfterAutofocus="end",s.Config.prototype.saveSelectionOnBlur=!0,r.pluginSystem.add("focus",function(e){if(e.o.saveSelectionOnBlur){let t=!1;e.e.on("blur",()=>{t=!1,e.isEditorMode()&&e.s.save(!0)}).on("mousedown touchstart",()=>{t=!e.editorIsActive}).on("focus",()=>{e.isEditorMode()&&(t?e.s.removeMarkers():e.s.restore()),t=!1})}let t=()=>{e.s.focus();let t=null;switch(e.o.cursorAfterAutofocus){case"start":t=n.Dom.first(e.editor,e=>n.Dom.isText(e));break;case"end":t=n.Dom.last(e.editor,e=>n.Dom.isText(e))}t&&e.s.setCursorIn(t,"start"===e.o.cursorAfterAutofocus)};e.e.on("afterInit",()=>{if(e.o.autofocus)if(e.defaultTimeout){let i="mousedown touchstart keydown",o=()=>{e.async.clearTimeout(n),e.e.off(i,o)},n=e.async.setTimeout(()=>{e.e.off(i,o),t()},300);e.e.on(i,o)}else t()}),e.e.on("afterInit afterAddPlace",()=>{e.e.off(e.editor,"mousedown.autofocus").on(e.editor,"mousedown.autofocus",t=>{e.isEditorMode()&&t.target&&n.Dom.isBlock(t.target)&&!n.Dom.isTag(t.target,o.INSEPARABLE_TAGS)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},28252:function(e,t,i){"use strict";var o=i(22732),n=i(68345),r=i(49055),s=i(41180),a=i(12153),l=i(6441),c=i(4104),d=i(83709),u=i(40222);l.Config.prototype.defaultFontSizePoints="px",l.Config.prototype.font={googleFonts:{url:""}},a.Icon.set("font",c.default).set("fontsize",d.default);let h=new WeakSet;l.Config.prototype.controls.fontsize={command:"fontsize",data:{cssRule:"font-size",normalize:e=>e.toString().replace(/(px|pt)$/i,"")},list:[8,9,10,11,12,14,16,18,24,30,32,34,36,48,60,72,96],textTemplate:(e,t)=>t+e.o.defaultFontSizePoints,childTemplate:(e,t,i)=>`${i}${e.o.defaultFontSizePoints}`,tooltip:"Font size",value(e,t){var i;let n=e.s.current(),r=n&&o.Dom.closest(n,o.Dom.isElement,e.editor),a=t.control;if(r)h.add(t);else if("select"!==a.component||h.has(t))return;let l=(null==(i=a.data)?void 0:i.cssRule)||"font-size",c=(0,s.css)(r||e.editor,l);if("font-size"===l){let t=parseFloat(c.toString());return"pt"===e.o.defaultFontSizePoints?Math.round(.75*t).toString():Math.round(t).toString()}return c.toString()},isChildActive(e,t){var i,o;let n=t.state.value,r=null!=(o=null==(i=t.control.data)?void 0:i.normalize)?o:e=>e;return!!(n&&t.control.args&&r(t.control.args[0].toString())===r(n.toString()))},isActive(e,t){var i,o;let n=t.state.value;if(!n)return!1;let r=null!=(o=null==(i=t.control.data)?void 0:i.normalize)?o:e=>e,s=t.control.data.cacheListSet;return s||(s=new Set(Object.keys(t.control.list).map(r)),t.control.data.cacheListSet=s),s.has(r(n.toString()))}},l.Config.prototype.controls.font={...l.Config.prototype.controls.fontsize,command:"fontname",textTemplate(e,t){let[i]=t.split(",");return(0,r.trimChars)(i,"\"'")},list:{"":"Default","Arial, Helvetica, sans-serif":"Arial","'Courier New', Courier, monospace":"Courier New","Georgia, Palatino, serif":"Georgia","'Lucida Sans Unicode', 'Lucida Grande', sans-serif":"Lucida Sans Unicode","Tahoma, Geneva, sans-serif":"Tahoma","'Times New Roman', Times, serif":"Times New Roman","'Trebuchet MS', Helvetica, sans-serif":"Trebuchet MS","Helvetica, sans-serif":"Helvetica","Impact, Charcoal, sans-serif":"Impact","Verdana, Geneva, sans-serif":"Verdana"},childTemplate(e,t,i){let o=!1;try{o=-1===t.indexOf("dings")&&document.fonts.check("16px "+t,i)}catch(e){}return`<span data-style="${t}" style="${o?`font-family: ${t}!important;`:""}">${i}</span>`},popup:(e,t,i,o)=>!!e.o.font.googleFonts.url&&new u.UIFontPicker(e,o,i),data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value(e,t){let i=e.s.current(),r=i&&o.Dom.closest(i,o.Dom.isElement,e.editor);if(r)h.add(t);else if(h.has(t))return;let a=(0,s.css)(r||e.editor,"font-family").toString(),{list:l}=t.control;return a===(0,s.css)(e.editor,"font-family").toString()&&((0,n.isArray)(l)?l.includes(""):""in(null!=l?l:{}))?"":a},tooltip:"Font family"}},40222:function(e,t,i){"use strict";i.d(t,{UIFontPicker:function(){return g}});var o=i(87325),n=i(37133),r=i(2748),s=i(580),a=i(68345),l=i(29960),c=i(41180),d=i(37790),u=i(48538),h=i(41870),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=["h1","h2","h3","h4","h5","h6"],f=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),g=class e extends u.UIElement{className(){return"UIFontPicker"}__render(){var e,t;let{control:i}=this.__button,{list:o={}}=i,n=(0,a.isArray)(o)?o.map(e=>({value:e.toString(),title:e.toString()})):(0,d.keys)(o,!1).map(e=>({value:e,title:o[e].toString()})),s=Array.from(this.__googleFonts.fonts.values(),e=>({value:this.__googleFonts.value(e),title:e.family,font:e})),l=new Map;[...s,...n].forEach(e=>l.set((0,h.firstFamily)(e.value),e));let c=new Map,u=new Map;this.__themeFonts().forEach(e=>{var t;let i=(0,h.firstFamily)(e),o=e.split(",")[0].replace(/["']/g,"").trim(),n=null!=(t=l.get(i))?t:!i||i.startsWith("-")||f.has(i)?void 0:{value:e,title:o};n&&!c.has(i)&&c.set(i,n)}),this.__usedFonts().forEach(e=>{let t=(0,h.firstFamily)(e),i=l.get(t);i&&!c.has(t)&&u.set(t,i)});let p=n.find(e=>""===e.value),m=(0,h.firstFamily)(null!=(t=null==(e=i.value)?void 0:e.call(i,this.j,this.__button))?t:"");r.Dom.detach(this.container),this.__fonts.clear(),p&&this.__append(m,[p]),this.__append(m,[...c.values()],"Theme fonts"),this.__append(m,[...u.values()],"Used fonts"),this.__append(m,n.filter(e=>e!==p),"System fonts"),this.__append(m,s,"Google Fonts"),this.__observeGoogleFonts()}__themeFonts(){let{editor:e}=this.j,t=[(0,c.css)(e,"font-family").toString()];return m.forEach(i=>{let o=this.j.createInside.element(i,{style:"display: none"});r.Dom.append(e,o),t.push((0,c.css)(o,"font-family").toString()),r.Dom.safeRemove(o)}),t}__usedFonts(){return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'),e=>e.style.fontFamily)}__append(e,t,i){if(!t.length)return;let{control:o}=this.__button,n=this.j.c.div(this.getFullElName("group"));if(i){let e=this.j.c.div(this.getFullElName("heading"),{id:`${this.getFullElName("heading")}-${(0,s.uniqueUid)()}`});e.textContent=this.i18n(i),(0,l.attr)(n,{role:"group","aria-labelledby":e.id}),r.Dom.append(n,e)}t.forEach(t=>{var i,s;let a=this.j.c.element("button",{type:"button",class:this.getFullElName("item"),"data-value":t.value,"aria-pressed":(0,h.firstFamily)(t.value)===e});t.font?(a.textContent=t.title,this.__fonts.set(a,t.font)):a.innerHTML=null!=(s=null==(i=o.childTemplate)?void 0:i.call(o,this.j,t.value,t.title,this.__button))?s:t.title,r.Dom.append(n,a)}),r.Dom.append(this.container,n)}__observeGoogleFonts(){this.j.async.requestAnimationFrame(()=>{var e;if(null==(e=this.__observer)||e.disconnect(),this.isDestructed||!this.__fonts.size)return;let t=new IntersectionObserver(e=>{let i=[];e.forEach(({isIntersecting:e,target:o})=>{let n=this.__fonts.get(o);e&&n&&(i.push(n),(0,c.css)(o,{fontFamily:this.__googleFonts.value(n)}),t.unobserve(o))}),this.__googleFonts.preview(i)},{root:this.container.parentElement,rootMargin:"0px 0px 400px 0px"});this.__fonts.forEach((e,i)=>t.observe(i)),this.__observer=t})}onMouseDown(e){e.preventDefault()}onClick(e){var t;let i=r.Dom.up(e.target,e=>r.Dom.isHTMLElement(e)&&e.hasAttribute("data-value"),this.container);if(!i)return;let o=null!=(t=(0,l.attr)(i,"data-value"))?t:"",n=this.__googleFonts.find(o),s=(0,h.firstFamily)(o)===(0,h.firstFamily)(this.__blockFont());n&&!s&&this.__googleFonts.load(n),this.j.execCommand("fontname",!1,s?"":o),this.__close()}__blockFont(){let e=r.Dom.up(this.j.s.current(),r.Dom.isBlock,this.j.editor);return(0,c.css)(null!=e?e:this.j.editor,"font-family").toString()}destruct(){var e;null==(e=this.__observer)||e.disconnect(),super.destruct()}constructor(e,t,i){super(e),this.__button=t,this.__close=i,this.__fonts=new Map,this.__observer=null,this.__googleFonts=e.getInstance(h.GoogleFonts),this.__render(),this.__googleFonts.fonts.size||this.__googleFonts.ready.then(()=>!this.isDestructed&&this.__render())}};p([(0,n.watch)("container:mousedown")],g.prototype,"onMouseDown",null),p([(0,n.watch)("container:click")],g.prototype,"onClick",null),g=p([o.component],g)},23399:function(e,t,i){"use strict";var o=i(580),n=i(21537);i(28252);var r=i(41870);o.pluginSystem.add("font",function(e){if(e.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"}),e.o.font.googleFonts.url){let t=e.getInstance(r.GoogleFonts),i=e.async.debounce(()=>t.loadUsed(),e.defaultTimeout);t.ready.then(i),e.e.on("afterInit afterSetMode change",i)}e.e.on("afterInit",()=>{e.iframe&&e.e.on(e.ed,"load",()=>e.e.fire("updateToolbar"),{capture:!0})});let t=(t,i,o)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,n.normalizeSize)(o,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:o}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},41870:function(e,t,i){"use strict";i.d(t,{GoogleFonts:function(){return c},firstFamily:function(){return l}});var o=i(80480),n=i(2748),r=i(54079);let s={serif:"serif",monospace:"monospace"},a=new Map;function l(e){return e.split(",")[0].replace(/["']/g,"").trim().toLowerCase()}class c extends o.ViewComponent{className(){return"GoogleFonts"}find(e){return this.fonts.get(l(e))}value(e){var t;return`'${e.family}', ${null!=(t=s[e.category])?t:"sans-serif"}`}load(e){let t=this.__loadedInto(this.j.ed);if(t.has(e.family))return;t.add(e.family);let i=[["regular","0,400"],["700","0,700"],["italic","1,400"],["700italic","1,700"]].filter(([t])=>e.variants.includes(t)).map(([,e])=>e);this.__append(this.j.ed,`family=${this.__family(e)}:ital,wght@${i.join(";")}`)}loadUsed(){this.j.editor.querySelectorAll('[style*="font-family"]').forEach(e=>{let t=this.find(e.style.fontFamily);t&&this.load(t)})}preview(e){let t=this.__loadedInto(this.j.od);if(!(e=e.filter(e=>!this.__previewed.has(e.family)&&!t.has(e.family))).length)return;e.forEach(e=>this.__previewed.add(e.family));let i=e.map(e=>"family="+this.__family(e)),o=new Set(e.map(e=>e.family).join(""));this.__append(this.j.od,`${i.join("&")}&text=${encodeURIComponent([...o].join(""))}`)}__loadedInto(e){var t;let i=null!=(t=this.__loaded.get(e))?t:new Set;return this.__loaded.set(e,i),i}__family(e){return encodeURIComponent(e.family).replace(/%20/g,"+")}__append(e,t){let i=e.createElement("link");i.rel="stylesheet",i.href=`https://fonts.googleapis.com/css2?${t}&display=swap`,e.head.appendChild(i),this.__links.push(i)}destruct(){this.__links.forEach(e=>n.Dom.safeRemove(e)),super.destruct()}constructor(e){super(e),this.fonts=new Map,this.__links=[],this.__loaded=new WeakMap,this.__previewed=new Set,this.ready=(function(e,t){let i=a.get(t);if(!i){let o=new r.Ajax({url:t,method:"GET"},e.o.defaultAjaxOptions);i=o.send().then(e=>e.json()).then(({items:e})=>e.filter(e=>e.variants.includes("regular"))).catch(()=>(a.delete(t),[])).finally(()=>o.destruct()),a.set(t,i)}return i})(e,e.o.font.googleFonts.url).then(e=>{e.forEach(e=>this.fonts.set(e.family.toLowerCase(),e))})}}},4104:function(e,t){"use strict";t.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"> <path d="m5 17 7-14 7 14M8 12h8M3 21h18"/> </g> </svg> '},83709:function(e,t){"use strict";t.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"> <path d="M2 5h9M6.5 5v15M4 20h5M19 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg> '},24630:function(e,t,i){"use strict";var o=i(2748),n=i(72430),r=i(12153),s=i(6441),a=i(4932),l=i(89816);r.Icon.set("paragraph",l.default),s.Config.prototype.formatBlock={previewProperties:[]},s.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){var i,n;let r=t.control,s=e.s.current(),a=o.Dom.closest(s,o.Dom.isBlock,e.editor);return null!=(i=null==a?void 0:a.nodeName.toLowerCase())?i:null==(n=r.data)?void 0:n.currentValue},update(e,t){let i=t.control;if(!e.s.current())return!1;let o=t.state.value,r=i.list;return(0,n.isPlainObject)(r)&&r[o.toString()]&&e.o.textIcons&&(t.state.text=r[o.toString()].toString()),!1},data:{currentValue:"p"},list:{p:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},isChildActive(e,t){var i,o;return t.state.value===(null==(o=null==(i=t.control)?void 0:i.args)?void 0:o[0])},isActive:(e,t)=>t.state.value!==e.o.enter&&(0,n.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,i)=>`<${t} style="margin:0;padding:0${function(e,t){let{previewProperties:i}=e.o.formatBlock;if(!i.length)return"";let n=e.createInside.element(t,{style:"display: none"});o.Dom.append(e.editor,n);let r=e.ew.getComputedStyle(n),s=parseFloat(r.fontSize)||16,l=i.map(t=>{let i=r.getPropertyValue(t);return i&&"font-family"===t&&(i=(0,a.withContentFonts)(e,i)),i?`;${t}:${i.replace(/(-?[\d.]+)px/g,(e,t)=>`${parseFloat(t)/s}em`).replace(/"/g,"'")}`:""}).join("");return o.Dom.safeRemove(n),l}(e,t)}"><span>${e.i18n(i)}</span></${t}>`,tooltip:"Insert format block"}},4932:function(e,t,i){"use strict";i.d(t,{withContentFonts:function(){return s}});let o=new WeakMap,n=new Map,r=0;function s(e,t){let{ed:i,od:n}=e;if(i===n)return t;let s=function(e){let t=o.get(e);if(!t){let{od:i}=e,n={prefix:`jodit-preview-${++r}-`,faces:new Map,pending:!1};o.set(e,n),e.e.on("beforeDestruct",()=>n.faces.forEach(e=>i.fonts.delete(e))),t=n}return t}(e);!function(e,t){if(t.pending)return;t.pending=!0;let{ed:i,od:o}=e;Promise.all(Array.from(i.styleSheets,e=>a(e,i.baseURI))).then(i=>{t.pending=!1,e.isInDestruct||i.flat().forEach(e=>{let i=JSON.stringify(e);if(!t.faces.has(i)){let n=new FontFace(t.prefix+e.family,e.source,e.descriptors);o.fonts.add(n),t.faces.set(i,n)}})})}(e,s);let l=new Set;return i.fonts.forEach(e=>l.add(c(e.family))),t.split(",").map(e=>{let t=c(e);return l.has(t)?`"${s.prefix}${t}", ${e.trim()}`:e.trim()}).join(", ")}function a(e,t){var i;let o;try{o=e.cssRules}catch(o){let{href:t}=e;if(!t)return Promise.resolve([]);let i=n.get(t);return i||(i=fetch(t).then(e=>e.text()).then(e=>{let i=document.implementation.createHTMLDocument(""),o=i.createElement("style");return o.textContent=e,i.head.appendChild(o),o.sheet?l(o.sheet.cssRules,t):[]}).catch(()=>[]),n.set(t,i)),i}return l(o,null!=(i=e.href)?i:t)}function l(e,t){return Promise.all(Array.from(e,e=>{var i;let o;if("styleSheet"in e){let{styleSheet:i}=e;return i?a(i,t):[]}return"cssRules"in e?l(e.cssRules,t):e.cssText.startsWith("@font-face")?[(o=t=>e.style.getPropertyValue(t)||void 0,{family:c(e.style.getPropertyValue("font-family")),source:(i=e.style.getPropertyValue("src"),i.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g,(e,i,o)=>{try{return`url("${new URL(o,t).href}")`}catch(t){return e}})),descriptors:{style:o("font-style"),weight:o("font-weight"),stretch:o("font-stretch"),unicodeRange:o("unicode-range")}})]:[]})).then(e=>e.flat())}function c(e){return e.replace(/["']/g,"").trim().toLowerCase()}},96111:function(e,t,i){"use strict";var o=i(580);i(24630),o.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,i,o)=>(e.s.commitStyle({element:o}),e.synchronizeValues(),!1))})},89816:function(e,t){"use strict";t.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"> <path d="M20 4H9a5 5 0 0 0 0 10h3M12 4v17M18 4v17"/> </g> </svg> '},99823:function(e,t,i){"use strict";var o=i(82758),n=i(12153),r=i(6441),s=i(6950),a=i(28911);r.Config.prototype.fullsize=!1,r.Config.prototype.globalFullSize=!0,n.Icon.set("fullsize",s.default).set("shrink",a.default),r.Config.prototype.controls.fullsize={exec(e){e.toggleFullSize()},update(e,t){let i=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=i:t.state.icon.name=i},tooltip:"Open in fullsize",mode:o.MODE_SOURCE+o.MODE_WYSIWYG}},2169:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(19306),s=i(41180);i(99823);let a=new Set;n.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,i=0,n=0,l=0,c=0,d=!1,u=()=>{let{container:o,events:r}=e;r&&(t?(d||(i=(0,s.css)(o,"height",!0),n=(0,s.css)(o,"width",!0),d=!0),(0,s.css)(o,{height:e.ow.innerHeight,width:e.ow.innerWidth})):d&&((0,s.css)(o,{height:i||"auto",width:n||"auto"}),d=!1))},h=i=>{let{container:n,events:d}=e;if(n){if(void 0===i&&(i=!n.classList.contains("jodit_fullsize")),e.setMod("fullsize",i),e.o.fullsize=i,t=i,n.classList.toggle("jodit_fullsize",i),e.toolbar&&((0,r.isJoditObject)(e)&&e.toolbarContainer&&o.Dom.append(e.toolbarContainer,e.toolbar.container),(0,s.css)(e.toolbar.container,"width","auto")),i?a.add(n):a.delete(n),e.o.globalFullSize&&(1===a.size&&i||0===a.size&&!i)){i&&(l=e.ow.scrollX,c=e.ow.scrollY);let t=n.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",i),t=t.parentNode;u(),i||e.ow.scrollTo(l,c)}d.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",u),e.e.on("afterInit afterOpen",()=>{var t;e.toggleFullSize(null==(t=null==e?void 0:e.options)?void 0:t.fullsize)}).on("toggleFullSize",h).on("beforeDestruct",()=>{t&&h(!1)}).on("beforeDestruct",()=>{e.events&&e.e.off(e.ow,"resize",u)})})},6950:function(e,t){"use strict";t.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"> <path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"/> </g> </svg> '},28911:function(e,t){"use strict";t.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"> <path d="M3 8h5V3M8 8 3 3m13 0v5h5m-5 0 5-5M3 16h5v5m0-5-5 5m13 0v-5h5m-5 0 5 5"/> </g> </svg> '},78524:function(e,t,i){"use strict";i(6441).Config.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8","cmd+shift+8"],selectall:["ctrl+a","cmd+a"]}},42263:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(21537),s=i(50911);i(78524);class a extends s.Plugin{afterInit(e){(0,r.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let i=e.o.commandToHotkeys[t];i&&((0,r.isArray)(i)||(0,r.isString)(i))&&e.registerHotkeyToCommand(i,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===o.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",i=>{let o=this.onKeyPress(i),n={shouldStop:!0};if(!1===this.j.e.fire(o+".hotkey",i.type,n))if(n.shouldStop)return t=!0,e.e.stopPropagation("keydown"),!1;else i.preventDefault()},{top:!0}).on("keyup.hotkeys",()=>{if(t)return t=!1,e.e.stopPropagation("keyup"),!1},{top:!0})}beforeDestruct(e){e.events&&e.e.off(".hotkeys")}constructor(){super(...arguments),this.onKeyPress=e=>{let t=this.specialKeys[e.which],i=(e.key||String.fromCharCode(e.which)).toLowerCase(),o=[t||i];return["alt","ctrl","shift","meta"].forEach(i=>{e[i+"Key"]&&t!==i&&o.push(i)}),(0,r.normalizeKeyAliases)(o.join("+"))},this.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}}}n.pluginSystem.add("hotkeys",a)},16233:function(e,t,i){"use strict";var o=i(22732),n=i(580),r=i(12153),s=i(6441),a=i(72337);r.Icon.set("hr",a.default),s.Config.prototype.controls.hr={command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},n.pluginSystem.add("hr",function(e){e.registerButton({name:"hr",group:"insert"}),e.registerCommand("insertHorizontalRule",()=>{var t;let i=e.createInside.element("hr");e.s.insertNode(i,!1,!1);let n=o.Dom.closest(i.parentElement,o.Dom.isBlock,e.editor);n&&o.Dom.isEmpty(n)&&n!==e.editor&&!(null==(t=e.o.dtd)?void 0:t.blockLimits[n.nodeName.toLowerCase()])&&(o.Dom.after(n,i),o.Dom.safeRemove(n));let r=o.Dom.findNotEmptySibling(i,!1);if(o.Dom.isBlock(r))return e.s.setCursorIn(r,!0),!1;if(r||i.parentNode!==e.editor&&!o.Dom.isBlock(o.Dom.findNotEmptySibling(i,!0)))return e.s.setCursorAfter(i),!1;let s=e.createInside.element(e.o.enter);return o.Dom.isTag(s,"br")||o.Dom.append(s,e.createInside.element("br")),o.Dom.after(i,s),e.s.setCursorIn(s),!1})})},72337:function(e,t){"use strict";t.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"> <path d="M4 12h16"/> </g> </svg> '},50963:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.iframeBaseUrl="",o.Config.prototype.iframeTitle="Jodit Editor",o.Config.prototype.iframeDoctype="<!DOCTYPE html>",o.Config.prototype.iframeDefaultSrc="about:blank",o.Config.prototype.iframeStyle="html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}table{width:100%;border:none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}p{margin-top:0;}.jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}",o.Config.prototype.iframeCSSLinks=[],o.Config.prototype.iframeSandbox=null},77469:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537),a=i(76241);i(50963),r.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,i)=>{let o=e||i.iframe.contentWindow.document;if(o.open(),o.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${(0,s.defaultLanguage)(t.language)}">`+"<head>"+`<title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),o.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=o.createElement("link");(0,s.attr)(t,"rel","stylesheet"),(0,s.attr)(t,"href",e),o.head&&n.Dom.append(o.head,t),i.e.on(t,"load",()=>i.e.fire("resize"))}),t.iframeStyle){let e=o.createElement("style");e.innerHTML=t.iframeStyle,o.head&&n.Dom.append(o.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let i=e.c.element("iframe");(0,s.css)(i,"display","block"),i.src="about:blank",i.className="jodit-wysiwyg_iframe",(0,s.attr)(i,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,s.attr)(i,"sandbox",t.iframeSandbox),n.Dom.append(e.workplace,i),e.iframe=i;let r=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,s.callPromise)(r,()=>{if(!e.iframe)return!1;let i=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let r=t.editHTMLDocumentMode,l=()=>{(0,s.attr)(i.body,"contenteditable",e.getMode()!==o.MODE_SOURCE&&!e.getReadOnly()||null)},c=(e,t)=>{for(;t>0&&/\s/.test(e.charAt(t-1));)t-=1;return t},d=e=>{e=(0,a.removeBetween)(e,"<style",">","</style>","jodit-box");let t=(0,a.indexOfOpenTag)(e,"body"),i=-1;for(let o=(0,a.indexOfClosingTag)(e,"body",t+1);-1!==o;o=(0,a.indexOfClosingTag)(e,"body",o+1))i=o;if(-1!==t&&-1!==i){let o=i+7,n=e.indexOf(">",t),r=e.slice(t,o);for(let s of(-1!==n&&n<i&&(r=(e=>{e=e.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i,"");let t=(t,i)=>{for(;i.test(e.charAt(t));)t+=1;return t},i=e.indexOf("contenteditable");for(;-1!==i;){let o=t(i+15,/["'\s]/);if("="===e.charAt(o)&&(o=t(o+1,/[\s"']/),e.startsWith("true",o))){o=t(o+4,/["']/);let n=i;return/["']/.test(e.charAt(n-1))&&(n-=1),n=c(e,n),e.slice(0,n)+e.slice(o)}i=e.indexOf("contenteditable",i+1)}return e})(e.slice(t,n))+e.slice(n,o)),["style","script","span"]))r=(0,a.removeBetween)(r,"<"+s,">","</"+s+">","jodit");let s=e=>(0,a.removeBetween)((0,a.removeBetween)(e,"<span",">","</span>"),"&lt;span","&gt;","&lt;/span&gt;");e=(s(e.slice(0,t))+r+s(e.slice(o))).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,"$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim,"$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,"$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim,"$1")}return e};if(r){let t=e.element.tagName;if("TEXTAREA"!==t&&"INPUT"!==t)throw(0,s.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on("beforeGetNativeEditorValue",()=>d(e.o.iframeDoctype+i.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(d(i.documentElement.outerHTML)!==d(t)){var o;let r,a;o=d(t),r=new DOMParser().parseFromString(o,"text/html"),e.e.fire("safeHTML",r.documentElement),a=(0,s.$$)("style.jodit-box",i.head),i.replaceChild(i.adoptNode(r.documentElement),i.documentElement),a.forEach(e=>n.Dom.append(i.head,e)),e.editor=i.body,l(),e.e.fire("prepareWYSIWYGEditor"),e.e.stopPropagation("beforeSetNativeEditorValue")}return!0}return!1},{top:!0})}if(e.editor=i.body,e.e.on("afterSetMode afterInit afterAddPlace",l),"auto"===t.height){i.documentElement&&(0,s.css)(i.documentElement,"overflowY","hidden");let o=e.async.throttle((...i)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&"auto"===t.height){let t=e.ew.getComputedStyle(e.editor),i=parseInt(t.marginTop||"0",10)+parseInt(t.marginBottom||"0",10);(0,s.css)(e.iframe,"height",e.editor.offsetHeight+i)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",o).on([e.iframe,e.ew,i.documentElement],"load",o).on(i,"readystatechange DOMContentLoaded",o),"function"==typeof ResizeObserver){let t=new ResizeObserver(o);t.observe(i.body),e.e.on("beforeDestruct",()=>{t.disconnect()})}}return i.documentElement&&e.e.on(i.documentElement,"mousedown touchend",()=>{e.s.isFocused()||(e.s.focus(),e.editor===i.body&&e.s.setCursorIn(i.body))}).on(e.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",t=>{var i;null==(i=e.events)||i.fire(e.ow,t)}),!1})})})},43687:function(e,t,i){"use strict";i(6441).Config.prototype.imageCaption={wrapper:{tag:"figure",className:""},inner:null,caption:{tag:"figcaption",className:""}}},84571:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(41180),c=i(20356),d=i(45124);i(43687);var u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let h=["margin-top","margin-right","margin-bottom","margin-left"],p=new Set([o.KEY_UP,o.KEY_DOWN,o.KEY_LEFT,o.KEY_RIGHT]),m=/^(P|H[1-6]|PRE)$/i,f=new Set(["formatblock","insertorderedlist","insertunorderedlist"]),g="data-jodit-placeholder",b=`:where(.jodit-wysiwyg [contenteditable=false] [contenteditable=true]:focus){outline:1px solid var(--jd-color-border-selected,#1e88e5)}:where(.jodit-wysiwyg [${g}]){position:relative}:where(.jodit-wysiwyg [${g}])::before{position:absolute;top:0;right:0;left:0;padding:inherit;color:var(--jd-color-placeholder,#a5a5a5);content:attr(${g});pointer-events:none}`;class v extends c.Plugin{afterInit(e){(0,s.getContainer)(e,"imageCaption","style",!0).textContent=b,e.e.on("beforeCommandSelectall",this.__onSelectAll,{top:!0}),this.onChangePlace()}onToggleImageCaption(e,t){let i=(0,a.getCaptionWrapper)(this.j,e);if(i&&!0!==t){let t=this.__freshCaption(i);return t?this.__unrecorded(()=>this.__restore(t)):this.__uncaption(i,e),null}if(!i&&!1!==t)return this.__caption(e)}__freshCaption(e){let t=this.__fresh;return t&&t.wrapper===e&&e.parentNode===t.parent&&e.previousSibling===t.previous&&e.nextSibling===t.next&&y(e,t.image)===t.shape&&(0,a.getImageCaption)(this.j,e)===t.caption&&r.Dom.isEmpty(t.caption)?t:null}__caption(e){let t,{j:i}=this,{snapshot:o}=i.history;i.setEditorValue(),i.e.fire("internalUpdate");let n=o.make();return o.transaction(()=>{t=this.__fresh={...this.__wrap(e),before:n},i.setEditorValue()}),i.e.fire("updateToolbar"),t.caption}__unrecorded(e){let{j:t}=this;t.setEditorValue(),this.__fresh=null,t.history.snapshot.transaction(()=>{e(),t.setEditorValue()}),t.e.fire("internalUpdate"),t.e.fire("updateToolbar")}__wrap(e){var t,i;let{j:o}=this,{wrapper:n,inner:s,caption:c}=o.o.imageCaption,d=r.Dom.closest(e,"a",o.editor),u=!d||(null==(t=d.textContent)?void 0:t.trim())||1!==d.getElementsByTagName("img").length?e:d,h=[(0,a.attr)(e,"style"),(0,a.attr)(e,"class")],p=u.parentNode,m=(0,l.cssInline)(e,"width")||((i=(0,a.attr)(e,"width"))?(0,a.isNumeric)(i)?`${i}px`:i:"")||(e.offsetWidth?`${e.offsetWidth}px`:""),f=(0,a.getAlignClasses)(o,e),g=(0,a.getHAlign)(e,f);(0,a.clearHAlign)(e,f);let b=this.__create(n),v=s?this.__create(s):b,_=this.__create(c);_.appendChild(o.createInside.element("br"));let k=this.__insert(b,u);return v!==b&&r.Dom.append(b,v),r.Dom.append(v,[u,_]),w(e,b),m&&((0,a.css)(b,"width",m),(0,a.css)(e,"width","100%")),(0,a.hAlignElement)(b,g,(0,a.getAlignClasses)(o,b)),this.__mark(b),{caption:_,wrapper:b,image:e,target:u,place:p,split:k,attributes:h,parent:b.parentNode,previous:b.previousSibling,next:b.nextSibling,shape:y(b,e)}}__restore(e){var t,i;let{wrapper:o,image:n,target:s,place:l,split:c,attributes:d}=e;if(c)if(c.head||c.tail){let{sel:e}=this.j.s,o=(null==e?void 0:e.rangeCount)?e.getRangeAt(0).startContainer:null,{head:n,tail:l}=c;if(n&&!(l&&o&&r.Dom.isOrContains(l,o)))r.Dom.append(n,[s,...(0,a.toArray)(null!=(t=null==l?void 0:l.childNodes)?t:[])]),r.Dom.safeRemove(l);else if(l){let e=l.firstChild;[...(0,a.toArray)(null!=(i=null==n?void 0:n.childNodes)?i:[]),s].forEach(t=>l.insertBefore(t,e)),r.Dom.safeRemove(n)}}else r.Dom.append(l,s),r.Dom.before(o,c.block);else r.Dom.before(o,s);r.Dom.safeRemove(o),(0,a.attr)(n,{style:d[0],class:d[1]})}__uncaption(e,t){var i;let{j:n}=this,s=(0,a.getHAlign)(e,(0,a.getAlignClasses)(n,e)),c=(0,l.cssInline)(e,"width");r.Dom.safeRemove((0,a.getImageCaption)(n,e));let d=null!=(i=r.Dom.closest(t,"a",e))?i:t;if(w(e,t),c&&(0,a.css)(t,"width",c),(0,a.hAlignElement)(t,s,(0,a.getAlignClasses)(n,t)),r.Dom.isBlock(e)&&e.parentNode===n.editor&&n.o.enter.toLowerCase()!==o.BR){let t=n.createInside.element(n.o.enter);r.Dom.before(e,t),r.Dom.append(t,d)}else r.Dom.before(e,d);r.Dom.safeRemove(e)}__create({tag:e,className:t}){return this.j.createInside.element(e,t?{class:t}:{})}__insert(e,t){let{j:i}=this,o=r.Dom.isBlock(e)?r.Dom.closest(t,r.Dom.isBlock,i.editor):null;if(!o||!m.test(o.nodeName))return r.Dom.before(t,e),null;let n=i.ed.createRange();n.setStartBefore(o),n.setEndBefore(t);let s=n.extractContents();n.setStartAfter(t),n.setEndAfter(o);let[l,c]=[s,n.extractContents()].map((e,t)=>{let i=e.firstChild;return!i||r.Dom.isEmpty(i)?null:((0,a.call)(t?r.Dom.after:r.Dom.before,o,i),i)});return r.Dom.before(o,e),r.Dom.safeRemove(o),{block:o,head:l,tail:c}}__mark(e){(0,a.attr)(e,"contenteditable",!1);let t=(0,a.getImageCaption)(this.j,e);t&&((0,a.attr)(t,"contenteditable",!0),this.__placeholder(t))}__placeholder(e){let t=r.Dom.isEmpty(e)?this.j.i18n("Caption"):null;(0,a.attr)(e,g)!==t&&(0,a.attr)(e,g,t)}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===o.MODE_SOURCE||(0,a.toArray)(e.editor.getElementsByTagName(e.o.imageCaption.wrapper.tag)).forEach(t=>{r.Dom.isHTMLElement(t)&&(0,a.getCaptionedImage)(e,t)&&this.__mark(t)})}onInput(){let e=this.__caretCaption();e&&this.__placeholder(e)}onAfterGetValueFromEditor(e){if(!e.value.includes("contenteditable"))return;let{j:t}=this,i=t.c.element("template");i.innerHTML=e.value;let o=e=>(0,a.toArray)(e.querySelectorAll(t.o.imageCaption.wrapper.tag)).filter(e=>(0,a.getCaptionedImage)(t,e)),n=o(i.content),s=this.__fresh&&this.__freshCaption(this.__fresh.wrapper),l=s&&n[o(t.editor).indexOf(s.wrapper)],c=s&&l&&function(e,t,i){var o;let n=(0,a.getCaptionedImage)(e,i),{split:s}=t;if(!n)return null;let l={wrapper:i,image:n,target:null!=(o=r.Dom.closest(n,"a",i))?o:n,place:t.place,split:null,attributes:t.attributes};if(s){let e=s.head?i.previousSibling:null,o=s.tail?i.nextSibling:null;if(s.head&&!r.Dom.isHTMLElement(e)||s.tail&&!r.Dom.isHTMLElement(o))return null;let n=s.block.cloneNode(!0);l.split={block:n,head:e,tail:o},l.place=function(e,t,i){let o=[];for(let i=t;i!==e&&i.parentNode;i=i.parentNode)o.unshift((0,a.toArray)(i.parentNode.childNodes).indexOf(i));return o.reduce((e,t)=>e.childNodes[t],i)}(s.block,t.place,n)}return l}(t,s,l),d=!1;c&&(this.__restore(c),d=!0),n.forEach(e=>{[e,(0,a.getImageCaption)(t,e)].forEach(e=>["contenteditable",g].forEach(t=>{(null==e?void 0:e.hasAttribute(t))&&(e.removeAttribute(t),d=!0)}))}),d&&(e.value=i.innerHTML)}onChangePlace(){let{j:e}=this;e.e.off([e.editor,e.ow,e.ew],".imageCaption").on(e.editor,"focusout.imageCaption",this.__onFocusOut,{capture:!0}).on(e.editor,"mousedown.imageCaption",this.__onMouseDown,{capture:!0}).on([e.ow,e.ew],"mouseup.imageCaption",this.__onMouseUp)}__onMouseDown(e){this.__press=e.target}__onFocusOut(e){let t=e.target;(0,a.getImageCaption)(this.j,(0,a.getCaptionWrapper)(this.j,t))===t&&(this.__press?this.__afterPress.push(t):this.__dropBlank(t,null))}__onMouseUp(){let e=this.__press;this.__press=null,this.__afterPress.splice(0).forEach(t=>this.__dropBlank(t,e))}__dropBlank(e,t){this.j.async.setTimeout(()=>{let{j:i}=this,o=(0,a.getCaptionWrapper)(i,e),n=(0,a.getCaptionedImage)(i,o);if(!o||!n||!r.Dom.isEmpty(e)||this.__keepsFocus(e))return;let s=!!(t&&r.Dom.isOrContains(o,t)),l=this.__freshCaption(o);this.__unrecorded(()=>l?this.__restore(l):this.__uncaption(o,n)),s&&i.e.fire("recalcPositionPopup")},1)}__keepsFocus(e){let{j:t}=this,i=e.ownerDocument;if(i.activeElement===e&&(i.hasFocus()||!t.od.hasFocus()))return!0;let o=t.od.activeElement;return!!(o&&o!==t.iframe&&!r.Dom.isOrContains(t.editor,o)&&(r.Dom.isOrContains(t.container,o)||r.Dom.closest(o,e=>r.Dom.isElement(e)&&(0,a.attr)(e,"data-editor_id")===t.id,t.od.body)))}__caretCaption(){let{s:e}=this.j;if(!e.isInsideArea)return null;let t=e.range.startContainer,i=(0,a.getImageCaption)(this.j,(0,a.getCaptionWrapper)(this.j,t));return i&&r.Dom.isOrContains(i,t)?i:null}onBeforeEnter(e){let t=(null==e?void 0:e.shiftKey)?null:this.__caretCaption(),i=(0,a.getCaptionWrapper)(this.j,t);if(!i)return;let{j:o}=this;if(this.__focusEditor(),!r.Dom.isBlock(i))return void o.s.setCursorAfter(i);let n=this.__line();return r.Dom.after(i,n),o.s.setCursorIn(n),o.synchronizeValues(),!1}__focusEditor(){this.j.editor.focus({preventScroll:!0})}__line(){let{j:e}=this,t=e.createInside.element(e.o.enter);return r.Dom.isTag(t,"br")||r.Dom.append(t,e.createInside.element("br")),t}onBeforeInsertNode(e){let t=(0,a.getCaptionWrapper)(this.j,this.__caretCaption());if(!t||!((r.Dom.isElement(e)||r.Dom.isFragment(e))&&[e,...(0,a.toArray)(e.querySelectorAll("*"))].some(e=>r.Dom.isElement(e)&&(r.Dom.isBlock(e)||o.NO_EMPTY_TAGS.has(e.nodeName.toLowerCase())))))return;let{j:i}=this;if(this.__focusEditor(),!r.Dom.isBlock(t))return void i.s.setCursorAfter(t);let n=this.__line();r.Dom.after(t,n),i.s.setCursorIn(n)}onBeforeCommandDelete(){let e=this.__selectedWrapper();if(!e||!r.Dom.isBlock(e))return;let t=this.__line();return r.Dom.before(e,t),r.Dom.safeRemove(e),this.j.s.setCursorIn(t),!1}__selectedWrapper(){let{s:e}=this.j;if(!e.isInsideArea||e.isCollapsed())return null;let{startContainer:t,startOffset:i,endContainer:o,endOffset:n}=e.range,r=t.childNodes[i];return t===o&&n===i+1&&(0,a.getCaptionedImage)(this.j,r)?r:null}onKeyDown(e){var t;if(this.__arrow=null,(null==(t=e.key)?void 0:t.length)===1&&!e.ctrlKey&&!e.metaKey&&this.__selectedWrapper())return void this.j.execCommand("Delete");if(!p.has(e.key)||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||!this.j.s.isCollapsed())return;let i=this.__caretCaption();i&&(this.__arrow={key:e.key,range:this.j.s.range.cloneRange(),caption:i})}onKeyUp(e){let t=this.__arrow;if(this.__arrow=null,!t||e.key!==t.key||(0,d.isMoved)(this.j,t.range))return;let i=(0,a.getCaptionWrapper)(this.j,t.caption);if(!i)return;let n=t.key===o.KEY_DOWN||t.key===o.KEY_RIGHT,{s}=this.j;if(this.__focusEditor(),!r.Dom.isBlock(i))return void(n?s.setCursorAfter(i):s.setCursorBefore(i));let l=r.Dom.findNotEmptySibling(i,!n);if(r.Dom.isHTMLElement(l))return void s.setCursorIn(l,n);if(r.Dom.isText(l))return void(n?s.setCursorBefore(l):s.setCursorAfter(l));let c=this.__line();(0,a.call)(n?r.Dom.after:r.Dom.before,i,c),s.setCursorIn(c),this.j.synchronizeValues()}onBeforeCommand(e){let t=e.toLowerCase();if(f.has(t)&&this.__caretCaption())return!1;let i="undo"===t&&this.__fresh?this.__freshCaption(this.__fresh.wrapper):null;if(i)return this.__unrecorded(()=>{this.__restore(i),this.j.history.snapshot.restore(i.before)}),!1}__onSelectAll(){let e=this.__caretCaption();if(e)return this.j.e.stopPropagation("beforeCommandSelectall"),this.j.s.select(e,!0),!1}beforeDestruct(e){e.e.off("beforeCommandSelectall",this.__onSelectAll).off([e.editor,e.ow,e.ew],".imageCaption")}constructor(){super(...arguments),this.__fresh=null,this.__press=null,this.__afterPress=[],this.__arrow=null}}function y(e,t){return[e,t].flatMap(e=>[(0,a.attr)(e,"style"),(0,a.attr)(e,"class")]).join("|")}function w(e,t){var i;h.forEach(i=>{let o=(0,l.cssInline)(e,i);o&&((0,a.css)(t,i,o),(0,a.css)(e,i,""))}),(null==(i=(0,a.attr)(e,"style"))?void 0:i.trim())||(0,a.attr)(e,"style",null)}u([(0,n.watch)(":toggleImageCaption")],v.prototype,"onToggleImageCaption",null),u([(0,n.watch)([":change",":afterInit",":afterSetMode",":changePlace"]),(0,n.debounce)()],v.prototype,"onChange",null),u([(0,n.watch)([":input",":keyup",":afterPaste"])],v.prototype,"onInput",null),u([(0,n.watch)(":afterGetValueFromEditor")],v.prototype,"onAfterGetValueFromEditor",null),u([(0,n.watch)(":changePlace")],v.prototype,"onChangePlace",null),u([n.autobind],v.prototype,"__onMouseDown",null),u([n.autobind],v.prototype,"__onFocusOut",null),u([n.autobind],v.prototype,"__onMouseUp",null),u([(0,n.watch)(":beforeEnter")],v.prototype,"onBeforeEnter",null),u([(0,n.watch)(":beforeInsertNode")],v.prototype,"onBeforeInsertNode",null),u([(0,n.watch)(":beforeCommandDelete")],v.prototype,"onBeforeCommandDelete",null),u([(0,n.watch)(":keydown")],v.prototype,"onKeyDown",null),u([(0,n.watch)(":keyup")],v.prototype,"onKeyUp",null),u([(0,n.watch)(":beforeCommand")],v.prototype,"onBeforeCommand",null),u([n.autobind],v.prototype,"__onSelectAll",null),s.pluginSystem.add("imageCaption",v)},85745:function(e,t,i){"use strict";i(6441).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},80763:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(74569);i(85745);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="__jodit_imageprocessor_binded",h=u+"blob-id",p="jodit-wysiwyg_image-selected",m=new Set(["img","jodit","jodit-media"]);class f extends l.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange),(0,s.getContainer)(e,"image-processor","style",!0).textContent=`.jodit-wysiwyg.${p}::selection,.jodit-wysiwyg.${p} *:not(img)::selection{background:transparent}`}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(p);let t=(0,n.cached)(e,"buffer"),i=null==t?void 0:t.get(h);if(t&&i){for(let e of Object.keys(i))URL.revokeObjectURL(e);t.delete(h)}}onAfterGetValueFromEditor(e,t){if(t!==o.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let i=t.buffer.get(h);if(i)for(let t of Object.keys(i))for(;e.value.includes(t);)e.value=e.value.replace(t,i[t])}onSelectionChange(){let{jodit:e}=this;e.editor.classList.toggle(p,function(e){var t;let{sel:i}=e.s;if(!i||!i.rangeCount)return!1;let{startContainer:o,startOffset:n,endContainer:s,endOffset:l}=i.getRangeAt(0),c=o.childNodes[n];return o===s&&l===n+1&&(r.Dom.isTag(c,m)||!!(null!=(t=(0,a.getWrappedMedia)(e,c))?t:(0,a.getCaptionedImage)(e,c)))&&r.Dom.isOrContains(e.editor,o)}(e))}async afterChange(e){let{jodit:t}=this;t.editor&&(0,a.$$)("img",t.editor).forEach(e=>{(0,a.dataBind)(e,u)||((0,a.dataBind)(e,u,!0),e.complete||t.e.on(e,"load",function i(){var o;t.isInDestruct||null==(o=t.e)||o.fire("resize"),t.e.off(e,"load",i)}),e.src&&/^data:/.test(e.src)&&function(e,t){let i;if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||"u"<typeof ArrayBuffer||"u"<typeof URL)return;let o=t.src;try{i=(0,c.dataURItoBlob)(o)}catch(e){return}t.src=URL.createObjectURL(i),e.e.fire("internalUpdate");let{buffer:n}=e,r=n.get(h)||{};r[t.src]=o,e.buffer.set(h,r)}(t,e),t.e.on(e,"mousedown touchstart",()=>{var i;(function(e){var t;for(let i of["previousSibling","nextSibling"]){let n=e[i];for(;r.Dom.isText(n)&&!(null==(t=n.nodeValue)?void 0:t.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""));){let e=n[i];r.Dom.safeRemove(n),n=e}}})(e),t.s.select(null!=(i=(0,a.getCaptionWrapper)(t,e))?i:e)}))})}}d([(0,n.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),d([(0,n.watch)(":beforeSetElementValue")],f.prototype,"onBeforeSetElementValue",null),d([n.autobind],f.prototype,"onSelectionChange",null),d([(0,n.watch)([":change",":afterInit",":changePlace"]),(0,n.debounce)()],f.prototype,"afterChange",null),s.pluginSystem.add("imageProcessor",f)},97536:function(e,t,i){"use strict";i(6441).Config.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,showCaptionCheckbox:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,availableClasses:[],editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0}},3215:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(580),s=i(21537),a=i(20356),l=i(62843);i(97536);var c=i(59436),d=i(53636),u=i(10263),h=i(94575),p=i(34755),m=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class f extends a.Plugin{get form(){return new c.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,d.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,u.openImagePopup)(this.j,this.dialog,this.state,e)})}get dialog(){let{j:e}=this,t=e.dlg({minWidth:Math.min(400,screen.width),minHeight:590,buttons:["fullsize","dialog.close"]}),i=this.__buttons;return i.check.onAction(()=>{(0,p.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),i.remove.onAction(()=>{var i;let{sourceImage:o}=this.state,n=null!=(i=(0,s.getCaptionWrapper)(e,o))?i:o,r=e.s.createRange();r.setStartBefore(n),r.collapse(!0),e.s.removeNode(n),t.close(),e.s.selectRange(r)}),i.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[i.cancel,i.remove],i.check]),t.e.on(t,"afterClose",()=>{let{sourceImage:t}=this.state;if(e.isInDestruct||!n.Dom.isOrContains(e.editor,t))return;let i=(0,s.getCaptionWrapper)(e,t),o=(0,s.getImageCaption)(e,i);if(o&&n.Dom.isEmpty(o))return void e.s.setCursorIn(o);let r=null!=i?i:t;if(e.o.image.selectImageAfterClose)return void e.s.select(r);let a=e.s.createRange();a.setStartAfter(r),a.collapse(!0),e.s.selectRange(a)}),t.setSize(e.o.image.dialogWidth),(0,s.markOwner)(e,t.container),t}get __buttons(){let{j:e}=this;return{check:(0,l.Button)(e,"ok","Apply","primary"),remove:(0,l.Button)(e,"bin","Delete"),cancel:(0,l.Button)(e,"cancel","Cancel")}}open(){return this.activeTabState.activeTab="Image",this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.__focusFirstField(),this.async.promise((e,t)=>(0,h.readValuesFromImage)(this.j,this.state).then(e,t)).catch(e=>{(0,s.isAbortError)(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__focusFirstField(){var e;let t=e=>(0,s.toArray)(e.querySelectorAll("input, select, textarea"));null==(e=t(this.form.getElm("tabsBox")).concat(t(this.form.container)).find(e=>null!=e.offsetParent))||e.focus()}__lock(){this.dialog.lock(),this.form.setMod("lock",!0),Object.values(this.__buttons).forEach(e=>e.state.disabled=!0)}__unlock(){this.dialog.unlock(),this.form.setMod("lock",!1),Object.values(this.__buttons).forEach(e=>e.state.disabled=!1)}afterInit(e){let t=this;e.e.on("afterConstructor changePlace",()=>{e.e.off(e.editor,".imageproperties").on(e.editor,"dblclick.imageproperties",i=>{let o=i.target;if(n.Dom.isTag(o,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",o))return;t.state.sourceImage=o,t.state.image=o.cloneNode(!0),e.o.readonly||(i.stopImmediatePropagation(),i.preventDefault(),t.open())}else i.stopImmediatePropagation(),e.s.select(o)})}).on("openImageProperties.imageproperties",e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}async onStateValuesImageSrcChange(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{await e.decode()}catch(e){}if(this.state.sizeIsLocked&&(0,s.isNumeric)(t.imageWidth)){let e=parseFloat(t.imageWidth.toString());t.imageHeight=Math.round(e/this.state.ratio)}this.j.e.fire("updateImageProperties.imageproperties",e)}catch(e){this.j.alert(e.message)}finally{this.__unlock()}}beforeDestruct(e){var t,i,n;Object.values(null!=(t=(0,o.cached)(this,"__buttons"))?t:{}).forEach(e=>e.destruct()),null==(i=(0,o.cached)(this,"dialog"))||i.destruct(),null==(n=(0,o.cached)(this,"form"))||n.destruct(),e.e.off(e.editor,".imageproperties").off(".imageproperties")}constructor(){super(...arguments),this.state={image:new Image,sourceImage:new Image,get ratio(){let{naturalWidth:e,naturalHeight:t}=this.image;return e/t||1},sizeIsLocked:!0,marginIsLocked:!0,values:{style:"",imageSrc:"",borderRadius:0,imageTitle:"",imageAlt:"",imageCaption:!1,imageLink:"",imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:"",id:"",align:""}},this.activeTabState={activeTab:"Image"}}}m([o.cache],f.prototype,"form",null),m([o.cache],f.prototype,"dialog",null),m([o.cache],f.prototype,"__buttons",null),m([(0,o.watch)("state.image")],f.prototype,"onStateValuesImageSrcChange",null),r.pluginSystem.add("imageProperties",f)},51642:function(e,t,i){"use strict";i.d(t,{readAlign:function(){return n}});var o=i(25726);function n(e,t,i){let n=(0,o.getHAlign)(e,i);t.align="normal"===n?"":n}},94575:function(e,t,i){"use strict";i.d(t,{readValuesFromImage:function(){return u}});var o=i(25726),n=i(29960),r=i(41180),s=i(68645),a=i(51642),l=i(75595),c=i(47749),d=i(32566);async function u(e,t){let{sourceImage:i,values:u}=t,h=(0,s.getCaptionWrapper)(e,i),p=null!=h?h:i;return u.imageCaption=!!h,(0,a.readAlign)(p,u,(0,o.getAlignClasses)(e,p)),u.borderRadius=parseInt((0,r.cssInline)(i,"border-radius")||"0",10)||0,u.id=(0,n.attr)(i,"id")||"",u.imageTitle=(0,n.attr)(i,"title")||"",u.imageAlt=(0,n.attr)(i,"alt")||"",u.style=(0,n.attr)(i,"style")||"",u.classes=((0,n.attr)(i,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,c.readMargins)(p,u,t),(0,l.readLink)(t,e,u),u.imageSrc=(0,n.attr)(i,"src")||"",(0,d.readSizes)(i,u,t,h)}},75595:function(e,t,i){"use strict";i.d(t,{readLink:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=o.Dom.closest(e.sourceImage,"a",t.editor);r?(i.imageLink=(0,n.attr)(r,"href")||"",i.imageLinkOpenInNewTab="_blank"===(0,n.attr)(r,"target")):(i.imageLink="",i.imageLinkOpenInNewTab=!1)}},47749:function(e,t,i){"use strict";i.d(t,{readMargins:function(){return n}});var o=i(12475);function n(e,t,i){let n=!0,r=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(i=>{let s=e.style.getPropertyValue((0,o.kebabCase)(i));if(!s){r=!0,t[i]=0;return}/^[0-9]+(px)?$/.test(s)&&(s=parseInt(s,10)),t[i]=s,(r&&t[i]||n&&"marginTop"!==i&&t[i]!==t.marginTop)&&(n=!1)}),i.marginIsLocked=n}},32566:function(e,t,i){"use strict";i.d(t,{readSizes:function(){return a}});var o=i(29807),n=i(29960),r=i(41180),s=i(14415);async function a(e,t,i,a){try{await e.decode()}catch(e){}let l=(0,r.css)(null!=a?a:e,"width",!0)||(0,n.attr)(e,"width")||!1,c=(0,r.css)(e,"height",!0)||(0,n.attr)(e,"height")||!1;t.imageWidth=!1!==l?(0,s.normalSizeFromString)(l):e.offsetWidth||e.naturalWidth,(0,o.isNumeric)(t.imageWidth)?t.imageHeight=!1!==c?(0,s.normalSizeFromString)(c):e.offsetHeight||e.naturalHeight:t.imageHeight=c||"";let{imageWidth:d,imageHeight:u}=t,h=parseFloat(d.toString());if(!(0,o.isNumeric)(d)||!(0,o.isNumeric)(u)){i.sizeIsLocked=!1;return}if(!1===c){t.imageHeight=Math.round(h/i.ratio),i.sizeIsLocked=!0;return}i.sizeIsLocked=1>Math.abs(h-parseFloat(u.toString())*i.ratio)}},59436:function(e,t,i){"use strict";i.d(t,{UIImagePropertiesForm:function(){return p}});var o=i(65478),n=i(87325),r=i(2748),s=i(21537),a=i(62405),l=i(12153),c=i(92762),d=i(35105),u=i(29827),h=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let p=class e extends a.UIGroup{className(){return"UIImagePropertiesForm"}appendChildToContainer(){}getElm(e){let t=super.getElm(e);if(t)return t;for(let t of this.elements){let i=t.getElm(e);if(i)return i}return null}render(){return`<form>
144
+ </div>`}setPrompt(e){if(e){let{jodit:t}=this,i=t.o.aiAssistant[e],{aiCommonPrefixPrompt:o,aiCommonSuffixPrompt:n}=t.o.aiAssistant;this.promptInput.value=[o,(0,s.isString)(i)?i:"",n].filter(Boolean).join(" "),this.__toggleInsertButton(!0),this.promptInput.value&&(this.__formAiAssistant.submit(),this.__toggleSubmitButton(!0))}this.promptInput.focus()}onAiAssistentResponse(e){this.setMod("loading",!1),r.Dom.detach(this.__results),this.__aiResult=e,r.Dom.append(this.__results,this.jodit.c.fromHTML(e)),this.__toggleSubmitButton(!1),this.__toggleInsertButton(!1)}onAiAssistentError(e){this.__aiResult="",this.setMod("loading",!1),this.__error.textContent=e,r.Dom.detach(this.__results),this.__toggleSubmitButton(!1);let t=this.getFullElName("","hide","true");this.__results.classList.add(t),this.__toggleInsertButton(!0)}onChangePromptValue(){this.__toggleSubmitButton(!this.promptInput.value)}__toggleSubmitButton(e){this.__submitButton.state.disabled=e,this.__tryAgainButton.state.disabled=e}__toggleInsertButton(e){this.__insertButton.state.disabled=e,this.__insertAfterButton.state.disabled=e}constructor(e,{onInsert:t,onInsertAfter:i}){super(e),this.__aiResult="",this.__error=this.getElm("error"),this.__body=this.getElm("body"),this.__buttons=this.getElm("buttons"),this.__results=this.getElm("results"),this.__spinner=this.getElm("spinner"),this.__insertButton=(0,a.Button)(e,"","Insert","primary").onAction(()=>t(this.__aiResult)),this.__insertAfterButton=(0,a.Button)(e,"","Insert After","initial").onAction(()=>i(this.__aiResult));let o=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=(0,a.Button)(e,{icon:{name:"ai-assistant"},name:"ai-assistant",tooltip:"Submit"}).onAction(o),this.__tryAgainButton=(0,a.Button)(e,{icon:{name:"update"},name:"update",tooltip:"Try Again",variant:"initial"}).onAction(o),this.promptInput=new a.UITextArea(e,{name:"prompt",required:!0,label:"Prompt",placeholder:"Ask AI to improve generated text",className:this.getFullElName("prompt-row-input")});let n=new a.UIBlock(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName("prompt-row")});this.__formAiAssistant=new a.UIForm(e,[new a.UIBlock(e,[this.promptInput,this.__submitButton],{className:this.getFullElName("prompt-row")})]).onSubmit(t=>{this.__error.textContent="",this.setMod("loading",!0),e.e.fire("invokeAiAssistant",t.prompt);let i=this.getFullElName("","hide","true");this.__results.classList.remove(i),this.__buttons.classList.remove(i),r.Dom.detach(this.__results),r.Dom.append(this.__results,this.__spinner),this.__insertButton.focus()}),r.Dom.append(this.__buttons,n.container),r.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}};c([(0,n.watch)(":ai-assistant-response")],d.prototype,"onAiAssistentResponse",null),c([(0,n.watch)(":ai-assistant-error")],d.prototype,"onAiAssistentError",null),c([(0,n.watch)("promptInput:change")],d.prototype,"onChangePromptValue",null),d=c([o.component],d)},25187:function(e,t,i){"use strict";i(73391),i(12391),i(93183),i(66707),i(41107),i(71255),i(82439),i(61323),i(93079),i(19063),i(19271),i(1255),i(575),i(11317),i(36243),i(23399),i(96111),i(2169),i(42263),i(16233),i(77469),i(23531),i(84571),i(80763),i(3215),i(70045),i(93401),i(76295),i(59483),i(91071),i(61019),i(65517),i(36911),i(20071),i(32309),i(64837),i(79799),i(31571),i(85407),i(59451),i(18363),i(8355),i(58519),i(6687),i(56113),i(9159),i(12019),i(36125),i(9881),i(28545),i(45927),i(52951),i(43809),i(7309),i(68687),i(59495),i(39627),i(767),i(43003),i(72439),i(94529),i(26551),i(96139),i(72253),i(65735),i(83671),i(3115)},36911:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(62843),d=i(2525),u=i(12153);i(50712);var h=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let p="jodit-wysiwyg_anchors",m=' contenteditable="false"';class f extends l.Plugin{afterInit(e){var t;let i,o,n=e.ed===e.od;n&&e.editor.classList.add(p),(0,s.getContainer)(e,"anchor","style",!0).textContent=(t=n?"."+p:"",i=["id","name"].map(e=>`.jodit-wysiwyg${t} a[${e}]:not([href]):empty::before`).join(","),o=`url("data:image/svg+xml,${encodeURIComponent(u.Icon.get("anchor"))}") center/contain no-repeat`,`${i}{display:inline-block;width:.75em;height:1em;margin:0 .1em;vertical-align:-.15em;background-color:var(--jd-color-icon,#4c4c4c);-webkit-mask:${o};mask:${o};cursor:pointer;content:''}`),e.e.on("generateAnchorForm.anchor",this.__generateForm).on("clickA touchstartA",this.__onClickA,{top:!0})}__onClickA(e,t){var i;let{j:o}=this;if(!o.o.readonly&&(0,a.isAnchor)(e))return o.e.stopPropagation((0,a.camelCase)((null!=(i=null==t?void 0:t.type)?i:"click")+"_a")),o.e.fire("showPopup",e,()=>(0,a.position)(e,o),"anchor",!0),!1}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===o.MODE_SOURCE||(0,a.getAnchors)(e.editor).forEach(g)}onAfterGetValueFromEditor(e){e.value=function(e){if(!e.includes(m))return e;let t="",i=0,o=0;for(;;){let n=e.indexOf("<",o);if(-1===n)break;let r=e.indexOf(">",n);if(-1===r)break;if(e.startsWith("<a",n)&&/\s/.test(e.charAt(n+2))&&e.startsWith("</a>",r+1)){let o=e.slice(n,r),s=o.indexOf(m);-1===s||/\shref=/.test(o)||(t+=e.slice(i,n+s),i=n+s+m.length)}o=r+1}return 0===i?e:t+e.slice(i)}(e.value)}onBeforePasteInsert(e){if(r.Dom.isElement(e)||r.Dom.isFragment(e))return void this.__renameCopies(e);if(!(0,a.isString)(e)||!/<a\s/i.test(e))return;let t=this.j.createInside.element("template");if(t.innerHTML=e,this.__renameCopies(t.content))return t.innerHTML}__generateForm(e,t){let{j:i}=this,n=(0,a.isAnchor)(e)?e:null,s=new d.UIInput(i,{name:"name",ref:"name_input",label:"Anchor",required:!0}),l=[new c.UIButton(i,{name:"insert",type:"submit",variant:"primary",text:n?"Update":"Insert"})];n&&(s.value=(0,a.getAnchorName)(n),l.unshift(new c.UIButton(i,{name:"remove",variant:"default",text:"Remove"}).onAction(()=>{i.o.readonly||(i.s.restore(),r.Dom.safeRemove(n),i.synchronizeValues()),t()})));let u=new d.UIForm(i,[new d.UIBlock(i,[s]),new d.UIBlock(i,l,{align:"full"})]);return n&&(this.__dropForm(),this.__form=u,i.e.on(u.container,"keydown",e=>{e.key===o.KEY_ESC&&(t(),i.s.restore())})),u.onSubmit(()=>{if(i.o.readonly)return t(),!1;let e=s.value.trim().replace(/^#/,""),o=e?/\s/.test(e)?"The name cannot contain spaces":this.__isTaken(e,n)?"This name is already in use":"":"Please fill out this field";return o?(s.error=o,s.focus()):(i.s.restore(),n?this.__rename(n,e):this.__insert(e),i.synchronizeValues(),t()),!1}),i.async.requestIdleCallback(()=>s.focus()),u}__dropForm(){let e=this.__form;this.__form=null,e&&!e.isInDestruct&&(this.j.e.off(e.container,"keydown"),e.destruct())}__isTaken(e,t){return(0,a.toArray)(this.j.editor.querySelectorAll("[id], a[name]")).some(i=>i!==t&&(i.id===e||(0,a.isAnchor)(i)&&(0,a.attr)(i,"name")===e))}__insert(e){let{j:t}=this,i=t.createInside.element("a",{id:e}),o=t.s.range;g(i),o.collapsed||(o.collapse(!0),t.s.selectRange(o));let n=r.Dom.closest(o.startContainer,"a",t.editor);n?(r.Dom.before(n,i),t.s.setCursorAfter(i)):t.s.insertNode(i,!0,!1)}__rename(e,t){let i=(0,a.getAnchorName)(e),o=this.__isTaken(i,e);["id","name"].forEach(i=>{e.hasAttribute(i)&&(0,a.attr)(e,i,t)}),o||(0,a.toArray)(this.j.editor.querySelectorAll("a[href]")).forEach(e=>{(0,a.attr)(e,"href")==="#"+i&&(0,a.attr)(e,"href","#"+t)})}__renameCopies(e){let t=new Set((0,a.toArray)(e.querySelectorAll("[id], a[name]")).map(e=>e.id||(0,a.attr)(e,"name"))),i=new Map;return((0,a.isAnchor)(e)?[e]:(0,a.getAnchors)(e)).forEach(e=>{let o=(0,a.getAnchorName)(e);if(!this.__isTaken(o,null))return;let n=o;for(let e=2;t.has(n)||this.__isTaken(n,null);e+=1)n=`${o}-${e}`;["id","name"].forEach(t=>{e.hasAttribute(t)&&(0,a.attr)(e,t,n)}),t.add(n),i.set(o,n)}),!!i.size&&((0,a.toArray)(e.querySelectorAll("a[href]")).forEach(e=>{var t;let o=null!=(t=(0,a.attr)(e,"href"))?t:"",n="#"===o[0]&&i.get(o.slice(1));n&&(0,a.attr)(e,"href","#"+n)}),!0)}beforeDestruct(e){this.__dropForm(),e.editor.classList.remove(p),e.e.off("generateAnchorForm.anchor",this.__generateForm).off("clickA touchstartA",this.__onClickA)}constructor(){super(...arguments),this.buttons=[{name:"anchor",group:"insert"}],this.__form=null}}function g(e){"false"!==(0,a.attr)(e,"contenteditable")&&(0,a.attr)(e,"contenteditable",!1)}h([n.autobind],f.prototype,"__onClickA",null),h([(0,n.watch)([":change",":afterInit",":afterSetMode"]),(0,n.debounce)()],f.prototype,"onChange",null),h([(0,n.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),h([(0,n.watch)(":beforePasteInsert")],f.prototype,"onBeforePasteInsert",null),h([n.autobind],f.prototype,"__generateForm",null),s.pluginSystem.add("anchor",f)},50712:function(e,t,i){"use strict";var o=i(6441);i(24526),o.Config.prototype.controls.anchor={popup:(e,t,i)=>e.e.fire("generateAnchorForm.anchor",null,i),tooltip:"Insert anchor"},o.Config.prototype.popup.anchor=(e,t,i)=>e.e.fire("generateAnchorForm.anchor",t,i)},93183:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(23282),a=i(50911),l=i(45124);i(32496);var c=i(11338),d=i(14630),u=i(63785);class h extends a.Plugin{afterInit(e){e.registerCommand("deleteButton",{exec:()=>this.onDelete(!1),hotkeys:e.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand("backspaceButton",{exec:()=>this.onDelete(!0),hotkeys:e.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand("deleteWordButton",{exec:()=>this.onDelete(!1,"word"),hotkeys:e.o.delete.hotkeys.deleteWord}).registerCommand("backspaceWordButton",{exec:()=>this.onDelete(!0,"word"),hotkeys:e.o.delete.hotkeys.backspaceWord}).registerCommand("deleteSentenceButton",{exec:()=>this.onDelete(!1,"sentence"),hotkeys:e.o.delete.hotkeys.deleteSentence}).registerCommand("backspaceSentenceButton",{exec:()=>this.onDelete(!0,"sentence"),hotkeys:e.o.delete.hotkeys.backspaceSentence})}beforeDestruct(e){e.e.off("afterCommand.delete")}onDelete(e,t="char"){let i=this.j,r=i.selection;if(r.isFocused()||r.focus(),!r.isInsideArea)return;if((0,c.checkNotCollapsed)(i))return i.e.fire("backSpaceAfterDelete",e),!1;let a=r.range,u=i.createInside.text(o.INVISIBLE_SPACE);try{if(n.Dom.safeInsertNode(a,u),!n.Dom.isOrContains(i.editor,u))return;let c=n.Dom.closest(u,e=>n.Dom.isElement(e)&&e.hasAttribute("contenteditable")&&!n.Dom.isContentEditable(e.parentNode,i.editor),i.editor);if(c&&r.cursorInTheEdge(e,c,u)||i.e.fire("backSpaceBeforeCases",e,u))return!1;(0,l.moveNodeInsideStart)(i,u,e);let h=i.o.delete.disableCases;if(d.casesMap.some(([n,r])=>{if(!(h&&h.has(n))&&(0,s.isFunction)(r)&&r(i,u,e,t))return o.IS_PROD,!0}))return!1}catch(e){throw o.IS_PROD,e}finally{i.e.fire("backSpaceAfterDelete",e,u),this.moveCaretToTextBefore(u),this.safeRemoveEmptyNode(u)}return!1}moveCaretToTextBefore(e){var t,i;let{jodit:o}=this,{range:r}=o.s;if(!e.parentNode)return;let s=o.ed.createRange();if(s.selectNode(e),!r.collapsed||!s.isPointInRange(r.startContainer,r.startOffset))return;let a=e.previousSibling;for(;n.Dom.isText(a)&&!/\S|\u00A0/.test(a.data);)a=a.previousSibling;let l=n.Dom.isText(a)?a:(0,u.findMostNestedNeighbor)(e,!1,o.editor,!0),c=n.Dom.closest(l,"a",o.editor);n.Dom.isText(l)&&n.Dom.isContentEditable(l,o.editor)&&(!c||n.Dom.isOrContains(c,e))&&n.Dom.closest(l,n.Dom.isBlock,o.editor)===n.Dom.closest(e,n.Dom.isBlock,o.editor)&&(r.setStart(l,null!=(i=null==(t=l.nodeValue)?void 0:t.length)?i:0),r.collapse(!0),o.s.selectRange(r))}safeRemoveEmptyNode(e){var t,i,r;let{range:s}=this.j.s;n.Dom.isText(e)&&e.nodeValue!==o.INVISIBLE_SPACE&&(null==(t=e.nodeValue)?void 0:t.startsWith(o.INVISIBLE_SPACE))?e.deleteData(0,o.INVISIBLE_SPACE.length):(s.startContainer===e&&(e.previousSibling?n.Dom.isText(e.previousSibling)?s.setStart(e.previousSibling,null!=(r=null==(i=e.previousSibling.nodeValue)?void 0:i.length)?r:0):s.setStartAfter(e.previousSibling):e.nextSibling&&(n.Dom.isText(e.nextSibling)?s.setStart(e.nextSibling,0):s.setStartBefore(e.nextSibling)),s.collapse(!0),this.j.s.selectRange(s)),n.Dom.safeRemove(e))}}h.requires=["hotkeys"],r.pluginSystem.add("backspace",h)},62845:function(e,t,i){"use strict";i.d(t,{checkJoinNeighbors:function(){return s}});var o=i(82758),n=i(2748),r=i(63785);function s(e,t,i){return function e(t,i,s,h){if(function(e,t,i){let o=n.Dom.findNotEmptySibling(t,i);if(!d(e,o))return!1;let s=(0,r.getMoveFilter)(e);if(i)for(let e=t;e&&!n.Dom.isBlock(e);){let t=e.nextSibling;if(n.Dom.isTag(e,"br")){n.Dom.safeRemove(e);break}s(e)?n.Dom.append(o,e):n.Dom.safeRemove(e),e=t}else{let t=n.Dom.findNotEmptySibling(o,!1);!t||n.Dom.isBlock(t)||n.Dom.isTag(t,"br")||n.Dom.after(o,e.createInside.element("br")),n.Dom.unwrap(o)}return e.s.setCursorBefore(t),!0}(t,i,s))return!0;let p=n.Dom.findNotEmptySibling(i,s);if(d(t,function(e,t){var i;let o=e;for(;n.Dom.isElement(o)&&!n.Dom.isBlock(o);){let e=Array.from(o.childNodes).filter(e=>!n.Dom.isEmptyTextNode(e));o=null!=(i=t?e[e.length-1]:e[0])?i:null}return o===e?null:o}(p,s))&&a(p,t.editor))return e(t,i,s,h);let m=i,f=m;for(;m&&!n.Dom.findNotEmptySibling(m,s)&&m.parentElement!==t.editor;)f=m=m.parentElement;if(n.Dom.isElement(f)&&n.Dom.isContentEditable(f,t.editor)){var g,b;let d,p,m,v;if(n.Dom.up(i,n.Dom.isCell,f,!0))return!1;let y=n.Dom.findNotEmptySibling(f,s);if(y&&(a(n.Dom.furthest(i,e=>n.Dom.isElement(e)&&!n.Dom.isBlock(e)&&!n.Dom.isOrContains(e,y),t.editor),t.editor)||a(y,t.editor)))return e(t,i,s,h);if(n.Dom.isTag(y,"br"))return n.Dom.safeRemove(y),t.s.setCursorBefore(i),!0;if(s&&n.Dom.isTag(y,"table"))return t.s.setCursorBefore(i),!0;if(n.Dom.isElement(y)&&!n.Dom.isContentEditable(y,t.editor))return!1;let w=(g=f,(d=n.Dom.up(i,n.Dom.isBlock,g))?n.Dom.isLeaf(d)&&d.parentElement?d.parentElement:d:g);if(!h&&y&&function(e,t,i,r,s){if(s||n.Dom.isTag(r,"table")||n.Dom.isTag(r,o.INSEPARABLE_TAGS)||!n.Dom.isContentEditable(r,e.editor))return!1;let a=n.Dom.up(t,n.Dom.isBlock,i,!0),d=l(r,!1,e.editor);if(!a||!d||!n.Dom.isContentEditable(d,e.editor)||!(n.Dom.isLeaf(a)||n.Dom.isLeaf(d))||n.Dom.isLeaf(a.parentElement)||n.Dom.isLeaf(d.parentElement)||c(a)===c(d))return!1;let u=a.parentElement;n.Dom.isLeaf(a)&&n.Dom.isLeaf(d)?n.Dom.before(d,a):n.Dom.isLeaf(a)?n.Dom.before(d,function(e){let t=e.parentElement,i=t.cloneNode(!1),o=Array.from(t.children).indexOf(e);if(o&&(i.removeAttribute("id"),n.Dom.isTag(t,"ol"))){let e=parseInt(t.getAttribute("start")||"1",10)||1;i.setAttribute("start",e+o+"")}return n.Dom.append(i,e),i}(a)):n.Dom.before(d.parentElement,a);let h=u;for(;h&&h!==e.editor&&n.Dom.isEmpty(h);){let e=h.parentElement;n.Dom.safeRemove(h),h=e}return!0}(t,i,w,y,s))return e(t,i,s,!0)||t.s.setCursorBefore(i),!0;if(y&&(function(e,t,i,s,a){if(a||!(n.Dom.isList(i)||n.Dom.isList(s)))return!1;let l=n.Dom.up(t,n.Dom.isBlock,i,!0),c=n.Dom.isList(s)?s.firstElementChild:s;if(!l||!c||n.Dom.isTag(c,o.INSEPARABLE_TAGS)||n.Dom.isTag(c,"table"))return!1;if(!n.Dom.isEmpty(c)){let t=[];for(let e=c.firstChild;e&&!n.Dom.isBlock(e);e=e.nextSibling)t.push(e);if(!t.length)return!1;let i=(0,r.getMoveFilter)(e);t.forEach(e=>i(e)?n.Dom.append(l,e):n.Dom.safeRemove(e))}let d=c;for(;d&&d!==e.editor&&n.Dom.isEmpty(d);){let e=d.parentElement;n.Dom.safeRemove(d),d=e}return!0}(t,i,w,y,s)||(b=y,p=n.Dom.isTag(b,o.LIST_TAGS),m=n.Dom.isTag(w,o.LIST_TAGS),v=(e,t)=>t?e.firstElementChild:e.lastElementChild,m?(b=t.createInside.element(t.o.enterBlock),n.Dom.before(w,b),u(t,v(w,s),b,s)):!!b&&!!p&&!m&&u(t,w,v(b,!s),s))||function(e,t,i,o){if(n.Dom.isBlock(i)||!n.Dom.isBlock(t)||n.Dom.isList(t)||t.parentNode!==i.parentNode||Array.from(t.childNodes).some(e=>n.Dom.isBlock(e)))return!1;if(o){let i=n.Dom.findNotEmptySibling(t,!1);return!i||n.Dom.isBlock(i)||n.Dom.isTag(i,"br")||n.Dom.after(t,e.createInside.element("br")),n.Dom.unwrap(t),!0}let s=(0,r.getMoveFilter)(e);for(let e=i;e&&!n.Dom.isBlock(e);){let i=e.nextSibling;if(n.Dom.isTag(e,"br")){n.Dom.safeRemove(e);break}s(e)?n.Dom.append(t,e):n.Dom.safeRemove(e),e=i}return!0}(t,w,y,s)||u(t,w,l(function(e,t){if(!n.Dom.isTag(e,"table"))return e;let i=[];return n.Dom.each(e,e=>{n.Dom.isCell(e)&&i.push(e)}),i.length?i[t?i.length-1:0]:null}(y,s),s,t.editor),s)))return t.s.setCursorBefore(i),!0}return!1}(e,t,i,!1)}function a(e,t){if(!n.Dom.isElement(e)||n.Dom.isBlock(e))return!1;let i=e=>n.Dom.isBlock(e)&&!n.Dom.isTag(e,o.NO_EMPTY_TAGS);Array.from(e.childNodes).forEach(e=>a(e,t));let r=Array.from(e.childNodes);if(!r.some(i))return!1;let s=null;for(let l of r){if(!i(l)){s||n.Dom.isEmptyTextNode(l)||(s=e.cloneNode(!1),n.Dom.before(l,s)),s&&n.Dom.append(s,l);continue}if(s=null,n.Dom.isTag(l,o.INSEPARABLE_TAGS)||!n.Dom.isContentEditable(l,t))continue;let r=e.cloneNode(!1);n.Dom.moveContent(l,r),n.Dom.append(l,r),a(r,t)}return n.Dom.unwrap(e),!0}function l(e,t,i){let r=e;for(;r;){let e=t?r.lastChild:r.firstChild,s=e&&n.Dom.isEmptyTextNode(e)?n.Dom.findNotEmptySibling(e,t):e;if(!n.Dom.isBlock(s)||n.Dom.isTag(s,o.INSEPARABLE_TAGS)||n.Dom.isTag(s,"table")||!n.Dom.isContentEditable(s,i))break;r=s}return r}function c(e){let t=e.parentElement;for(;n.Dom.isList(t)||n.Dom.isLeaf(t);)t=t.parentElement;return t}function d(e,t){return n.Dom.isElement(t)&&n.Dom.isBlock(t)&&!n.Dom.isList(t)&&!n.Dom.isTag(t,"table")&&!n.Dom.isCell(t)&&n.Dom.isContentEditable(t,e.editor)&&!Array.from(t.childNodes).some(e=>n.Dom.isBlock(e))}function u(e,t,i,o){if(t&&n.Dom.isElement(i)){n.Dom.moveContent(t,i,!o,(0,r.getMoveFilter)(e));let s=t;for(;s&&s!==e.editor&&n.Dom.isEmpty(s);){let e=s.parentElement;n.Dom.safeRemove(s),s=e}return!0}return!1}},91748:function(e,t,i){"use strict";i.d(t,{checkJoinTwoLists:function(){return s}});var o=i(2748),n=i(37790),r=i(63785);function s(e,t,i){let s=o.Dom.findSibling(t,i),a=o.Dom.findSibling(t,!i);if(!o.Dom.closest(t,o.Dom.isElement,e.editor)&&o.Dom.isList(s)&&o.Dom.isList(a)&&o.Dom.isTag(s.lastElementChild,"li")&&o.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:c}=e.s,d=s.lastElementChild,u=a.firstElementChild;return(0,n.call)(i?o.Dom.prepend:o.Dom.append,u,t),o.Dom.moveContent(a,s,!i,(0,r.getMoveFilter)(e)),o.Dom.safeRemove(a),(0,n.call)(i?o.Dom.append:o.Dom.prepend,d,t),(0,n.call)(i?l:c,t),!0}return!1}},11338:function(e,t,i){"use strict";function o(e){return!e.s.isCollapsed()&&(e.execCommand("delete",!1,!0),!0)}i.d(t,{checkNotCollapsed:function(){return o}})},73792:function(e,t,i){"use strict";i.d(t,{checkRemoveChar:function(){return function e(t,i,c,d,u=!1){var h,p;let m,f=c?-1:1,g=n.Dom.sibling(i,!c),b=n.Dom.sibling(i,c),v=null,y=!1;for(b||(b=a(i,c,t.editor));b&&(n.Dom.isText(b)||n.Dom.isInlineBlock(b));){for(;n.Dom.isInlineBlock(b);)b=c?null==b?void 0:b.lastChild:null==b?void 0:b.firstChild;if(!b||n.Dom.isBlock(b))break;if(null==(h=b.nodeValue)?void 0:h.length){if(u&&l(function(e,t){let i=(0,r.toArray)(e),n=t?-1:1,s=t?i.length-1:0;for(;i[s]===o.INVISIBLE_SPACE;)s+=n;return i[s]}(b.nodeValue,c)))break;m=function(e,t,i,s){let a=(0,r.toArray)(e.nodeValue),l=a.length,c=t?l-1:0;if(a[c]===o.INVISIBLE_SPACE)for(;a[c]===o.INVISIBLE_SPACE;)c+=i;let d=a[c];if(a[c+i]===o.INVISIBLE_SPACE){for(c+=i;a[c]===o.INVISIBLE_SPACE;)c+=i;c+=t?1:-1}return a=t&&c<0?[]:a.slice(t?0:c+1,t?c:l),function(e,t,i){var s;if(!e||!n.Dom.isText(e)||(!t?/ $/:/^ /).test(null!=(s=e.nodeValue)?s:"")||!(0,r.trimInv)(e.nodeValue||"").length)for(let e=t?i.length-1:0;t?e>=0:e<i.length;e+=t?-1:1)if(" "===i[e])i[e]=o.NBSP_SPACE;else break}(s,t,a),e.nodeValue=a.join(""),d}(b,c,f,g),!b.nodeValue.length&&n.Dom.isInlineBlock(b.parentNode)&&(b.nodeValue=o.INVISIBLE_SPACE)}if((null==(p=b.nodeValue)?void 0:p.length)||(v=b),!(0,r.isVoid)(m)&&m!==o.INVISIBLE_SPACE){(function(t,i,o,s,a,c){(0,r.call)(t?n.Dom.after:n.Dom.before,i,o);let d="word"===s&&!l(a);("sentence"===s||d||"word"===s&&t)&&e(c,o,t,s,d&&t)})(c,b,i,d,m,t),y=!0;break}let s=a(b,c,t.editor);v&&(n.Dom.safeRemove(v),v=null),b=s}return v&&n.Dom.safeRemove(v),y&&(function(e){let t=e.parentElement;for(;t&&n.Dom.isInlineBlock(t)&&n.Dom.isTag(t,"a");){let i=t.parentElement;n.Dom.isEmpty(t)&&(n.Dom.after(t,e),n.Dom.safeRemove(t)),t=i}}(i),(0,s.addBRInsideEmptyBlock)(t,i),t.s.setCursorBefore(i),n.Dom.isTag(i.previousSibling,"br")&&!n.Dom.findNotEmptySibling(i,!1)&&n.Dom.after(i,t.createInside.element("br"))),y}}});var o=i(82758),n=i(22732),r=i(21537),s=i(63785);function a(e,t,i){let o=n.Dom.sibling(e,t);return!o&&e.parentNode&&e.parentNode!==i&&(o=(0,s.findMostNestedNeighbor)(e,!t,i,!0))&&n.Dom.closest(e,n.Dom.isBlock,i)!==n.Dom.closest(o,n.Dom.isBlock,i)?null:o}function l(e){return" "===e||e===o.NBSP_SPACE}},87536:function(e,t,i){"use strict";i.d(t,{checkRemoveContentNotEditable:function(){return a}});var o=i(22732),n=i(21537),r=i(45124),s=i(62845);function a(e,t,i){let a=t,c=o.Dom.findSibling(a,i);for(;!c&&a.parentElement&&a.parentElement!==e.editor&&!o.Dom.isCell(a.parentElement);)if(a=a.parentElement,c=o.Dom.findSibling(a,i),i&&o.Dom.isLeaf(a)&&!(o.Dom.isLeaf(c)&&l(e,c)))return!1;if(l(e,c)){if(o.Dom.isBlock(c)){let n=!(i&&o.Dom.isLeaf(c));o.Dom.safeRemove(c),n&&(0,s.checkJoinNeighbors)(e,t,i)}else(0,n.call)(i?o.Dom.before:o.Dom.after,c,t),o.Dom.safeRemove(c),(0,r.moveNodeInsideStart)(e,t,i);return(0,n.call)(i?e.s.setCursorBefore:e.s.setCursorAfter,t),!0}return!1}function l(e,t){return o.Dom.isElement(t)&&!o.Dom.isContentEditable(t,e.editor)}},12474:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyNeighbor:function(){return n}});var o=i(2748);function n(e,t,i){let n=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!n)return!1;let r=o.Dom.findNotEmptySibling(n,i);return!!(r&&o.Dom.isEmpty(r))&&(o.Dom.safeRemove(r),e.s.setCursorBefore(t),!0)}},58940:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyParent:function(){return s}});var o=i(82758),n=i(22732),r=i(91748);function s(e,t,i){let s=!1,{setCursorBefore:a,setCursorIn:l}=e.s,c=n.Dom.closest(t,n.Dom.isElement,e.editor);if(!c||!n.Dom.isEmpty(c))return!1;do if(c&&n.Dom.isEmpty(c)&&!n.Dom.isCell(c)){n.Dom.after(c,t);let i=n.Dom.closest(c,e=>n.Dom.isElement(e)&&e!==c,e.editor);n.Dom.safeRemove(c),s=!0,c=i}else break;while(c)if(s&&(0,r.checkJoinTwoLists)(e,t,i))return!0;let d=n.Dom.findNotEmptyNeighbor(t,i,e.editor);return!d||n.Dom.isText(d)||n.Dom.isTag(d,o.INSEPARABLE_TAGS)?a(t):l(d,!i),s}},56825:function(e,t,i){"use strict";i.d(t,{checkRemoveUnbreakableElement:function(){return s}});var o=i(82758),n=i(2748),r=i(58940);function s(e,t,i){let s=n.Dom.findSibling(t,i);return!!(n.Dom.isElement(s)&&(n.Dom.isTag(s,o.INSEPARABLE_TAGS)||n.Dom.isEmpty(s)))&&(n.Dom.safeRemove(s),n.Dom.isTag(s,"br")&&!n.Dom.findNotEmptySibling(t,!1)&&n.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),n.Dom.isTag(s,"br")&&(0,r.checkRemoveEmptyParent)(e,t,i),!0)}},90240:function(e,t,i){"use strict";i.d(t,{checkTableCell:function(){return n}});var o=i(2748);function n(e,t){let i=t.parentElement;return!!o.Dom.isCell(i)}},68034:function(e,t,i){"use strict";i.d(t,{checkUnwrapFirstListItem:function(){return r}});var o=i(2748),n=i(43555);function r(e,t,i){var r;let s=o.Dom.closest(t,o.Dom.isElement,e.editor),{s:a}=e;if(o.Dom.isLeaf(s)&&(null==(r=null==s?void 0:s.parentElement)?void 0:r[i?"firstElementChild":"lastElementChild"])===s&&a.cursorInTheEdge(i,s)){let r=s.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,n.call)(i?o.Dom.before:o.Dom.after,r,l),o.Dom.moveContent(s,l),o.Dom.safeRemove(s),o.Dom.isEmpty(r)&&o.Dom.safeRemove(r),(0,n.call)(i?a.setCursorBefore:a.setCursorAfter,t),!0}return!1}},70921:function(e,t,i){"use strict";i.d(t,{checkUnwrapListItem:function(){return n}});var o=i(2748);function n(e,t,i){if(!i)return!1;let n=o.Dom.closest(t,"li",e.editor),r=n?n.parentElement:null;if(!n||!o.Dom.isList(r)||!n.previousElementSibling||o.Dom.isEmpty(n)||Array.from(n.childNodes).some(e=>o.Dom.isBlock(e))||!e.s.cursorInTheEdge(!0,n))return!1;let s=e.createInside.element(e.o.enterBlock);if(o.Dom.after(r,s),n.nextElementSibling){let e=r.cloneNode(!1);for(e.removeAttribute("id");n.nextSibling;)o.Dom.append(e,n.nextSibling);if(o.Dom.isTag(r,"ol")){let t=parseInt(r.getAttribute("start")||"1",10)||1;e.setAttribute("start",t+r.children.length-1+"")}o.Dom.after(s,e)}return o.Dom.moveContent(n,s),o.Dom.safeRemove(n),e.s.setCursorBefore(t),!0}},14630:function(e,t,i){"use strict";var o=i(62845),n=i(91748),r=i(73792),s=i(87536),a=i(12474),l=i(58940),c=i(56825),d=i(90240),u=i(68034),h=i(70921);let p=[["remove-unbreakable",c.checkRemoveUnbreakableElement],["remove-not-editable",s.checkRemoveContentNotEditable],["remove-char",r.checkRemoveChar],["table-cell",d.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",n.checkJoinTwoLists],["unwrap-list-item",h.checkUnwrapListItem],["join-neighbors",o.checkJoinNeighbors],["unwrap-first-list-item",u.checkUnwrapFirstListItem]];p.map(([,e])=>e),i.d(t,["casesMap",0,p])},32496:function(e,t,i){"use strict";var o=i(82758);i(6441).Config.prototype.delete={hotkeys:{delete:o.IS_MAC?["delete"]:["delete","cmd+backspace"],deleteWord:o.IS_MAC?["ctrl+delete"]:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:o.IS_MAC?[]:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},63785:function(e,t,i){"use strict";i.d(t,{addBRInsideEmptyBlock:function(){return s},findMostNestedNeighbor:function(){return n},getMoveFilter:function(){return r}});var o=i(22732);function n(e,t,i,r=!1){let s=e=>t?e.firstChild:e.lastChild,a=o.Dom.findNotEmptyNeighbor(e,!t,i);if(r&&o.Dom.isElement(a)&&!o.Dom.isInlineBlock(a))return null;if(a)do{if(!s(a))return a;a=s(a)}while(a)return null}function r(e){return t=>!0!==e.e.fire("backSpaceIsMovedIgnore",t)}function s(e,t){t.parentElement!==e.editor&&o.Dom.isBlock(t.parentElement)&&o.Dom.each(t.parentElement,o.Dom.isEmptyTextNode)&&o.Dom.after(t,e.createInside.element("br"))}},41107:function(e,t,i){"use strict";var o=i(580),n=i(21537),r=i(12153),s=i(6441);i(73674);var a=i(820),l=i(53651),c=i(16020),d=i(89758),u=i(98527),h=i(51855);o.pluginSystem.add("bold",function(e){let t=t=>{let i,o=s.Config.defaultOptions.controls[t],r={...o.css};Object.keys(r).forEach(e=>{i||(i={}),i[e]=(0,n.isArray)(r[e])?r[e][0]:r[e]});let a=o.tags?o.tags[0]:void 0;return e.s.commitStyle({element:a,exclude:"sub"===a?["sup"]:"sup"===a?["sub"]:[]}),e.synchronizeValues(),!1};["bold","italic","underline","strikethrough"].forEach(t=>{e.registerButton({name:t,group:"font-style"})}),["superscript","subscript"].forEach(t=>{e.registerButton({name:t,group:"script"})}),e.registerCommand("bold",{exec:t,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:t,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:t,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:t}).registerCommand("subscript",{exec:t}).registerCommand("superscript",{exec:t})}),r.Icon.set("bold",a.default).set("italic",l.default).set("strikethrough",c.default).set("subscript",d.default).set("superscript",u.default).set("underline",h.default)},73674:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.controls.subscript={tags:["sub"],tooltip:"Subscript"},o.Config.prototype.controls.superscript={tags:["sup"],tooltip:"Superscript"},o.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},o.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},o.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},o.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration-line":"line-through"},tooltip:"Strike through"}},820:function(e,t){"use strict";t.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.75" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 4h7a4 4 0 0 1 0 8H6V4Zm0 8h8a4 4 0 0 1 0 8H6v-8Z"/> </g> </svg> '},53651:function(e,t){"use strict";t.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"> <path d="M10 4h9M5 20h9M15 4 9 20"/> </g> </svg> '},16020:function(e,t){"use strict";t.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"> <path d="M17 6c-1-1.5-2.5-2-5-2-3 0-5 1.5-5 4 0 1.8 1.5 3 5 4s5 2.2 5 4c0 2.5-2 4-5 4-2.5 0-4-.5-5-2M3 12h18"/> </g> </svg> '},89758:function(e,t){"use strict";t.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"> <path d="m3 4 9 12M12 4 3 16M16 16a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg> '},98527:function(e,t){"use strict";t.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"> <path d="m3 8 9 12M12 8 3 20M16 4a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg> '},51855:function(e,t){"use strict";t.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"> <path d="M6 3v8a6 6 0 0 0 12 0V3M4 21h16"/> </g> </svg> '},71255:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(37790),s=i(50911),a=i(12153),l=i(6441),c=i(31151);l.Config.prototype.controls.classSpan={command:"applyClassName",exec:r.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&n.classList.contains(t.control.args[0].toString()))}return!1},isActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor,r=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{n.classList.contains(e)&&(r=!0)}),!!(n&&n!==e.editor&&void 0!==t.control.list&&r)}return!1},childTemplate:(e,t,i)=>`<span class="${t}">${e.i18n(i)}</span>`,tooltip:"Insert className"};class d extends s.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,i,o)=>(e.s.commitStyle({attributes:{class:o}}),!1))}beforeDestruct(){}constructor(){super(...arguments),this.buttons=[{name:"classSpan",group:"script"}]}}n.pluginSystem.add("classSpan",d),a.Icon.set("class-span",c.default)},31151:function(e,t){"use strict";t.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"> <path d="M8 4H5v16h3m8-16h3v16h-3M9 15l3-7 3 7m-5-2h4"/> </g> </svg> '},82439:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(70071),s=i(580),a=i(86518),l=i(20356);i(46776);var c=i(80973),d=i(59498),u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class h extends l.Plugin{afterInit(){this.onChangeCleanHTML()}get isEditMode(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}onChangeCleanHTML(){if(!this.isEditMode)return;let e=this.j;this.walker.setWork(e.editor),this.currentSelectionNode=e.s.current()}onInputRemovePlaceholderBr(e){var t;this.isEditMode&&("input"!==e.type||!e.isComposing&&(null==(t=e.inputType)?void 0:t.startsWith("insert")))&&(0,d.removePlaceholderBr)(this.j)}startWalker(){let{jodit:e}=this,t=(0,d.getHash)(this.j.o.cleanHTML.allowTags),i=(0,d.getHash)(this.j.o.cleanHTML.denyTags);this.walker.on("visit",o=>(0,d.visitNodeWalker)(e,o,t,i,this.currentSelectionNode)).on("end",e=>{this.j.e.fire(e?"internalChange finishedCleanHTMLWorker":"finishedCleanHTMLWorker")})}beforeCommand(e){if("removeformat"===e.toLowerCase())return this.j.s.isCollapsed()?(0,d.removeFormatForWord)(this.j):(0,d.removeFormatForSelection)(this.j),!1}onAfterSetNativeEditorValue(){(0,a.safeHTML)(this.j.editor,this.j.o.cleanHTML)}onBeforeSetNativeEditorValue(e){let[t,i]=this.j.o.cleanHTML.useIframeSandbox?this.j.createInside.sandbox():[this.j.od.implementation.createHTMLDocument("").body];return t.innerHTML=e.value,this.j.e.fire("safeHTML",t),this.__replaceOldTags(t),e.value=t.innerHTML,(0,a.safeHTML)(t,{safeJavaScriptLink:!0,removeOnError:!0}),n.Dom.safeRemove(i),!1}__replaceOldTags(e){let{replaceOldTags:t,disableCleanFilter:i}=this.j.o.cleanHTML;!t||(null==i?void 0:i.has("replaceOldTags"))||n.Dom.each(e,e=>{(0,c.replaceOldTags)(this.j,e,!1)})}onAfterGetValueFromEditor(e){if(this.__singleQuotesInFontFamily(e),this.__removeTrailingBr(e),!this.j.o.cleanHTML.collapseEmptyValueToEmptyString)return;let t=/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(e.value.trim());t&&/^(p|div|h[1-6]|blockquote|pre)$/i.test(t[1])&&(e.value="")}__removeTrailingBr(e){if(!this.j.o.cleanHTML.removeTrailingBr||!/<br/i.test(e.value))return;let t=this.j.c.div();t.innerHTML=e.value,[t,...t.querySelectorAll("p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote")].forEach(e=>{var t;let i=e.lastChild;if(!n.Dom.isTag(i,"br"))return;let o=i.previousSibling;!o||n.Dom.isTag(o,"br")||(!n.Dom.isText(o)||(null==(t=o.nodeValue)?void 0:t.trim())||o.previousSibling)&&n.Dom.safeRemove(i)}),e.value=t.innerHTML}__singleQuotesInFontFamily(e){this.j.o.cleanHTML.singleQuotesInFontFamily&&e.value.includes("&quot;")&&(e.value=e.value.replace(/\sstyle="([^"]*)"/gi,(e,t)=>{if(!t.includes("&quot;")||!/font-family/i.test(t))return e;let i=t.replace(/font-family\s*:(?:&quot;|[^;])*/gi,e=>e.includes("'")?e:e.replace(/&quot;/g,"'"));return e.replace(t,i)}))}onSafeHTML(e){let t=this.j.o.cleanHTML.sanitizer;t&&(e.innerHTML=t(e.innerHTML)),(0,a.safeHTML)(e,this.j.o.cleanHTML)}beforeDestruct(){this.j.e.off("safeHTML",this.onSafeHTML).off("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).off("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue),this.walker.destruct()}constructor(e){super(e),this.buttons=[{name:"eraser",group:"font-style"}],this.currentSelectionNode=null,this.walker=new r.LazyWalker(this.j.async,{timeout:this.j.o.cleanHTML.timeout}),e.e.on("safeHTML",this.onSafeHTML).on("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).on("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue)}}u([(0,o.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],h.prototype,"onChangeCleanHTML",null),u([(0,o.watch)([":input","jodit.editor:compositionend"])],h.prototype,"onInputRemovePlaceholderBr",null),u([(0,o.hook)("ready")],h.prototype,"startWalker",null),u([(0,o.watch)(":beforeCommand")],h.prototype,"beforeCommand",null),u([o.autobind],h.prototype,"onAfterSetNativeEditorValue",null),u([o.autobind],h.prototype,"onBeforeSetNativeEditorValue",null),u([(0,o.watch)(":afterGetValueFromEditor")],h.prototype,"onAfterGetValueFromEditor",null),u([o.autobind],h.prototype,"onSafeHTML",null),s.pluginSystem.add("cleanHtml",h)},46776:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,collapseEmptyValueToEmptyString:!1,singleQuotesInFontFamily:!0,removeTrailingBr:!1,replaceNBSP:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:"script,iframe,object,embed",useIframeSandbox:!1,removeOnError:!0,removeEventAttributes:!0,safeJavaScriptLink:!0,safeLinksTarget:!0,allowedStyles:!1,sanitizer:!1,sandboxIframesInContent:!0,convertUnsafeEmbeds:["object","embed"],disableCleanFilter:null},o.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},83447:function(e,t,i){"use strict";i.d(t,{getHash:function(){return r}});var o=i(70799),n=i(49055);function r(e){let t=/([^[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,s={};return(0,o.isString)(e)?(e.split(i).map(e=>{e=(0,n.trim)(e);let o=t.exec(e),a={};if(o){let e=o[2].split(i);o[1]&&(e.forEach(e=>{e=(0,n.trim)(e);let t=r.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),s[o[1].toUpperCase()]=a)}else s[e.toUpperCase()]=!0}),s):!!e&&(Object.keys(e).forEach(t=>{s[t.toUpperCase()]=e[t]}),s)}},59498:function(e,t,i){"use strict";i.d(t,{getHash:function(){return o.getHash},removeFormatForSelection:function(){return n.removeFormatForSelection},removeFormatForWord:function(){return r.removeFormatForWord},removePlaceholderBr:function(){return s.removePlaceholderBr},visitNodeWalker:function(){return a.visitNodeWalker}});var o=i(83447);i(84272);var n=i(42312),r=i(70464),s=i(56385),a=i(39516)},15908:function(e,t,i){"use strict";i.d(t,{isAllowedMediaEmbed:function(){return r}});let o=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,n=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function r(e){return o.test(e)||n.test(e)}},84272:function(e,t,i){"use strict";i.d(t,{isInlineBlock:function(){return s},removeFormatForCollapsedSelection:function(){return r}});var o=i(82758),n=i(2748);function r(e,t){let{s:i}=e,o=t;if(!o){o=e.createInside.fake();let{range:t}=i;n.Dom.safeInsertNode(t,o),t.collapse()}let r=n.Dom.furthest(o,s,e.editor);if(r)if(i.cursorOnTheLeft(r))n.Dom.before(r,o);else if(i.cursorOnTheRight(r))n.Dom.after(r,o);else{let e=i.splitSelection(r);e&&n.Dom.after(e,o)}t||(i.setCursorBefore(o),n.Dom.safeRemove(o))}function s(e){return n.Dom.isInlineBlock(e)&&!n.Dom.isTag(e,o.INSEPARABLE_TAGS)}},42312:function(e,t,i){"use strict";i.d(t,{removeFormatForSelection:function(){return s}});var o=i(2748),n=i(43555),r=i(84272);function s(e){let{s:t,editor:i,createInside:s}=e,{range:a}=t,l=a.cloneRange(),c=a.cloneRange(),d=s.fake(),u=s.fake();l.collapse(!0),c.collapse(!1),o.Dom.safeInsertNode(l,d),o.Dom.safeInsertNode(c,u),a.setStartBefore(d),a.collapse(!0),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,d),a.setEndAfter(u),a.collapse(!1),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,u);let h=[];o.Dom.between(d,u,e=>{(0,r.isInlineBlock)(e)&&!o.Dom.isTag(e,"a")&&h.push(e),o.Dom.isElement(e)&&(0,n.attr)(e,"style")&&(0,n.attr)(e,"style",null)}),h.forEach(e=>o.Dom.unwrap(e));let p=(e,t)=>{if(!o.Dom.findNotEmptySibling(e,t)){let o=e.parentNode;if(o&&o!==i&&(0,n.attr)(o,"style"))return(0,n.attr)(o,"style",null),p(o,t),!0}};p(d,!0)&&p(u,!1),a.setStartAfter(d),a.setEndBefore(u),t.selectRange(a),o.Dom.safeRemove(d),o.Dom.safeRemove(u)}},70464:function(e,t,i){"use strict";i.d(t,{removeFormatForWord:function(){return s}});var o=i(82758),n=i(2748),r=i(42312);function s(e){let{range:t}=e.s,i=n.Dom.closest(t.startContainer,n.Dom.isBlock,e.editor);if(!i)return;let o=l(i),s=o.map(e=>n.Dom.isText(e)?e.nodeValue:" ").join(""),u=function(e,t){let i=0;for(let o of e){if(o===t.startContainer)return i+t.startOffset;let e=c(o);if(t.comparePoint(o,n.Dom.isText(o)?e:0)>0)break;i+=e}return i}(o,t);if(!a(s[u-1])||!a(s[u]))return;let h=u,p=u;for(;a(s[h-1]);)h-=1;for(;a(s[p]);)p+=1;let m=e.s.createRange();m.setStart(...d(o,h,!0)),m.setEnd(...d(o,p,!1)),e.s.selectRange(m),(0,r.removeFormatForSelection)(e);let f=e.s.createRange();f.setStart(...d(l(i),u,!1)),e.s.selectRange(f)}function a(e){return!!(e&&e!==o.INVISIBLE_SPACE&&/\S/.test(e))}function l(e){let t=[];return n.Dom.each(e,i=>{!n.Dom.closest(i,n.Dom.isBlock,e)&&(n.Dom.isText(i)||n.Dom.isTag(i,o.INSEPARABLE_TAGS))&&t.push(i)}),t}function c(e){var t,i;return n.Dom.isText(e)?null!=(i=null==(t=e.nodeValue)?void 0:t.length)?i:0:1}function d(e,t,i){var o,r;let s=0,a=null;for(let o of e){let e=c(o);if(n.Dom.isText(o)&&(t<s+e||!i&&t===s+e))return[o,t-s];n.Dom.isText(o)&&(a=o),s+=e}return[a,null!=(r=null==(o=null==a?void 0:a.nodeValue)?void 0:o.length)?r:0]}},56385:function(e,t,i){"use strict";i.d(t,{removePlaceholderBr:function(){return a}});var o=i(82758),n=i(2748),r=i(49055);function s(e){let t=e.lastChild;for(;n.Dom.isText(t)&&!t.nodeValue;)t=t.previousSibling;return t}function a(e){var t;let i=n.Dom.closest(e.s.current(),n.Dom.isBlock,e.editor);if(!i||!(0,r.trim)(null!=(t=i.textContent)?t:""))return;let a=s(i);for(;n.Dom.isElement(a)&&!n.Dom.isTag(a,o.INSEPARABLE_TAGS)&&!n.Dom.isBlock(a);)a=s(a);!n.Dom.isTag(a,"br")||n.Dom.each(i,e=>{if(e!==a&&n.Dom.isElement(e)&&(n.Dom.isTag(e,o.INSEPARABLE_TAGS)||n.Dom.isBlock(e)||n.Dom.isHTMLElement(e)&&!e.isContentEditable))return!1})&&n.Dom.safeRemove(a)}},82558:function(e,t,i){"use strict";i.d(t,{allowAttributes:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i,r){let s=r&&o.Dom.isElement(t)&&r[t.nodeName];if(r&&o.Dom.isElement(t)&&!0!==s){if(!s)return i;let e=t.attributes;if(e&&e.length){let o=[];for(let t=0;t<e.length;t+=1){let i=s[e[t].name];i&&(!0===i||i===e[t].value)||o.push(e[t].name)}o.length&&(i=!0),o.forEach(e=>{(0,n.attrRaw)(t,e,null)})}}return i}},1962:function(e,t,i){"use strict";i.d(t,{convertUnsafeEmbeds:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!o.Dom.isElement(t))return i;let s=t.nodeName.toLowerCase();if(!r.includes(s))return i;let a=(0,n.attr)(t,"data")||(0,n.attr)(t,"src")||(0,n.attr)(t,"movie")||"";if(!a)return o.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,n.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,n.attr)(t,"width"),height:(0,n.attr)(t,"height")}),o.Dom.replace(t,l,void 0,!1,!0),!0}},39433:function(e,t,i){"use strict";i.d(t,{fillEmptyParagraph:function(){return s}});var o=i(82758),n=i(2748);let r=new Set(["table","tbody","thead","tfoot","tr"]);function s(e,t,i){if(e.o.cleanHTML.fillEmptyParagraph&&n.Dom.isBlock(t)&&n.Dom.isEmpty(t,o.INSEPARABLE_TAGS)&&!n.Dom.isTag(t,r)){let i=e.createInside.element("br");return n.Dom.append(t,i),!0}return i}},45235:function(e,t,i){"use strict";i.r(t),i.d(t,{allowAttributes:function(){return o.allowAttributes},convertUnsafeEmbeds:function(){return n.convertUnsafeEmbeds},fillEmptyParagraph:function(){return r.fillEmptyParagraph},removeEmptyTextNode:function(){return s.removeEmptyTextNode},removeInvTextNodes:function(){return a.removeInvTextNodes},replaceOldTags:function(){return l.replaceOldTags},safeLinksTarget:function(){return c.safeLinksTarget},sandboxIframesInContent:function(){return d.sandboxIframesInContent},sanitizeAttributes:function(){return u.sanitizeAttributes},sanitizeStyles:function(){return h.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var o=i(82558),n=i(1962),r=i(39433),s=i(53392),a=i(25813),l=i(80973),c=i(95614),d=i(85978),u=i(384),h=i(15583),p=i(28800)},53392:function(e,t,i){"use strict";i.d(t,{removeEmptyTextNode:function(){return n}});var o=i(2748);function n(e,t,i,n,r,s){return o.Dom.isText(t)&&!t.nodeValue?(t===s&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),o.Dom.safeRemove(t),!0):i}},25813:function(e,t,i){"use strict";i.d(t,{removeInvTextNodes:function(){return r}});var o=i(82758),n=i(2748);function r(e,t,i,r,s,a){if(a===t||!n.Dom.isText(t)||null==t.nodeValue||!(0,o.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return i;let l=n.Dom.furthest(a,n.Dom.isBlock,e.editor);return!l||n.Dom.isOrContains(l,t)?i:(t.nodeValue=t.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||n.Dom.safeRemove(t),!0)}},80973:function(e,t,i){"use strict";i.d(t,{replaceOldTags:function(){return n}});var o=i(2748);function n(e,t,i){let n=function(e,t,i){if(!i||!o.Dom.isHTMLElement(t))return t;let n=i[t.nodeName.toLowerCase()]||i[t.nodeName];if(n){let i=function(e,t){let{sel:i}=e.s;if(!(null==i?void 0:i.anchorNode)||!i.focusNode||!e.s.isFocused())return null;let{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:a}=i;return o.Dom.isOrContains(t,n)||o.Dom.isOrContains(t,s)?e=>{i.setBaseAndExtent(n===t?e:n,r,s===t?e:s,a)}:null}(e,t),r=o.Dom.replace(t,n,e.createInside,!0,!1);return null==i||i(r),r}return t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==n||i}},95614:function(e,t,i){"use strict";i.d(t,{safeLinksTarget:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){if(!e.o.cleanHTML.safeLinksTarget||!o.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,n.attr)(t,"target"))return i;let r=((0,n.attr)(t,"rel")||"").split(/\s+/).filter(Boolean),s=!1;return(r.includes("noopener")||(r.push("noopener"),s=!0),r.includes("noreferrer")||(r.push("noreferrer"),s=!0),s)?((0,n.attr)(t,"rel",r.join(" ")),!0):i}},85978:function(e,t,i){"use strict";i.d(t,{sandboxIframesInContent:function(){return s}});var o=i(2748),n=i(29960),r=i(15908);function s(e,t,i){return e.o.cleanHTML.sandboxIframesInContent&&o.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,r.isAllowedMediaEmbed)((0,n.attr)(t,"src")||"")||t.hasAttribute("sandbox")?i:((0,n.attr)(t,"sandbox",""),!0):i}},384:function(e,t,i){"use strict";i.d(t,{sanitizeAttributes:function(){return r}});var o=i(2748),n=i(21537);function r(e,t,i){if(!o.Dom.isElement(t))return i;let r=e.options.cleanHTML;return!!(0,n.sanitizeHTMLElement)(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})||i}},15583:function(e,t,i){"use strict";i.d(t,{sanitizeStyles:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=e.o.cleanHTML.allowedStyles;if(!r||!o.Dom.isElement(t))return i;let s=(0,n.attr)(t,"style");if(!s)return i;let a=function(e,t){let i=t[e],o=t["*"];if(!i&&!o)return null;let n=new Set;if(o)for(let e of o)n.add(e.toLowerCase());if(i)for(let e of i)n.add(e.toLowerCase());return n}(t.nodeName.toLowerCase(),r);if(!a)return i;let l=s.split(";").map(e=>e.trim()).filter(e=>{if(!e)return!1;let t=e.indexOf(":");if(-1===t)return!1;let i=e.substring(0,t).trim().toLowerCase();return a.has(i)}).join("; ").replace(/;\s*$/,"");return l!==s?((0,n.attr)(t,"style",l||null),!0):i}},28800:function(e,t,i){"use strict";i.d(t,{tryRemoveNode:function(){return l}});var o=i(82758),n=i(2748),r=i(49055),s=i(29960),a=i(15908);function l(e,t,i,l,c,d){return!function(e,t,i,l,c){if(!n.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let i="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,s.attr)(t,"src")||"");if(!l&&c&&c[e]&&!i)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let d=e.s.isCollapsed()?e.s.range.startContainer:null;return n.Dom.isElement(t)&&null!=t.nodeName.match(o.IS_INLINE)&&!n.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,r.trimInv)(t.innerHTML).length&&(null==i||!n.Dom.isOrContains(t,i))&&(null==d||!n.Dom.isOrContains(t,d))}(e,t,d,l,c)?i:(n.Dom.safeRemove(t),!0)}},39516:function(e,t,i){"use strict";i.d(t,{visitNodeWalker:function(){return s}});var o=i(82758),n=i(45235);let r=Object.keys(n);function s(e,t,i,s,a){let l=!1,c=e.o.cleanHTML.disableCleanFilter;for(let d of r)if(!(c&&c.has(d))&&(l=(0,n[d])(e,t,l,i,s,a),o.IS_PROD,!t.isConnected))return!0;return l}},61323:function(e,t,i){"use strict";var o=i(82758),n=i(33433),r=i(2748),s=i(580),a=i(21537);i(79419);class l{init(e){var t;null==(t=this.buttons)||t.forEach(t=>e.registerButton(t)),e.e.off(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`).on(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`,t=>{var i;let n=function(e,t){if(!t||e.s.isCollapsed())return t;let i=e.s.range.commonAncestorContainer;r.Dom.isElement(i)||(i=i.parentElement);let o=t;for(;i&&i!==e.editor&&r.Dom.isElement(i)&&!r.Dom.isBlock(i);){let e=i.cloneNode(!1);e.innerHTML=o,o=e.outerHTML,i=i.parentElement}return o}(e,e.s.html),s=(0,a.getDataTransfer)(t)||(0,a.getDataTransfer)(e.ew)||(0,a.getDataTransfer)(t.originalEvent);s&&(s.setData(o.TEXT_PLAIN,(0,a.stripTags)(n)),s.setData(o.TEXT_HTML,n)),e.buffer.set(o.CLIPBOARD_ID,n),e.e.fire("pasteStack",{html:n,action:e.o.defaultActionOnPaste||o.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),null==(i=null==e?void 0:e.events)||i.fire("afterCopy",n)})}destruct(e){var t,i;null==(t=(0,n.cached)(e,"buffer"))||t.set(o.CLIPBOARD_ID,""),null==(i=null==e?void 0:e.events)||i.off("."+o.CLIPBOARD_ID)}constructor(){this.buttons=[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}]}}s.pluginSystem.add("clipboard",l)},79419:function(e,t,i){"use strict";var o=i(12153),n=i(6441),r=i(94775),s=i(23140),a=i(92699),l=i(10052);n.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},n.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},n.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},o.Icon.set("copy",r.default).set("cut",s.default).set("paste",a.default).set("select-all",l.default)},94775:function(e,t){"use strict";t.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="8" y="8" width="13" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/> </g> </svg> '},23140:function(e,t){"use strict";t.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"> <circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="m8.2 8.2 12.3 12.3M8.2 15.8 20.5 3.5"/> </g> </svg> '},92699:function(e,t){"use strict";t.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="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/> </g> </svg> '},10052:function(e,t){"use strict";t.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"> <path d="M3 6V3h3m4 0h4m4 0h3v3m0 4v4m0 4v3h-3m-4 0h-4m-4 0H3v-3m0-4v-4"/><rect x="7" y="7" width="10" height="10" rx="1"/> </g> </svg> '},46104:function(e,t){"use strict";t.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"> <path d="M12 3c-2 3.2-5.5 7-5.5 10a5.5 5.5 0 0 0 11 0c0-3-3.5-6.8-5.5-10Z"/> </g> <rect x="5" y="21" width="14" height="2" rx="1" fill="inherit" stroke="none"/> </svg> '},93079:function(e,t,i){"use strict";var o=i(580),n=i(21537);i(21988),o.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,i,o)=>{var r;let s=(0,n.normalizeColor)(o)||"",a="background"===t?{backgroundColor:s}:{color:s},l=e.getInstance("Table",e.o).getAllSelectedCells();return l.length&&e.s.isCollapsed()?(l.forEach(t=>{e.s.select(t,!0),e.s.commitStyle({attributes:{style:a}})}),null==(r=e.s.sel)||r.removeAllRanges()):e.s.commitStyle({attributes:{style:a}}),e.synchronizeValues(),!1};e.registerCommand("forecolor",t).registerCommand("background",t)})},21988:function(e,t,i){"use strict";var o=i(2748),n=i(21537),r=i(12153),s=i(6441),a=i(92762),l=i(46104);function c(e,t,i){(0,n.css)(e,t,i),(0,n.attr)(e,"style")||(0,n.attr)(e,"style",null)}r.Icon.set("brush",l.default),s.Config.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes("color"),icon:"brush",popup(e,t,i){if(!(0,n.isJoditObject)(e))return;let o=e.getInstance("Table",e.o).getAllSelectedCells();if(!o.length)return!1;let r=t=>(0,a.ColorPickerWidget)(e,n=>{o.forEach(e=>{c(e,t,n)}),e.lock(),e.synchronizeValues(),i(),e.unlock()},(0,n.css)(o[0],t));return(0,a.TabsWidget)(e,[{name:"Background",content:r("background-color")},{name:"Text",content:r("color")},{name:"Border",content:r("border-color")}])},tooltip:"Background"},s.Config.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes("color"),update(e,t){let i=(0,n.dataBind)(t,"color"),r=(i,o)=>!!o&&o!==(0,n.css)(e.editor,i).toString()&&(t.state.icon.fill=o,!0);if(i){let e=(0,n.dataBind)(t,"color");r("color"===e?e:"background-color",i);return}let s=e.s.current();if(s&&!t.state.disabled){let t=o.Dom.closest(s,o.Dom.isElement,e.editor)||e.editor,i=r("color",(0,n.css)(t,"color").toString()),a=r("background-color",(0,n.css)(t,"background-color").toString());if(i||a)return}t.state.icon.fill="",t.state.activated=!1},popup(e,t,i,r){let s="",l="",d,u=null;return t&&t!==e.editor&&o.Dom.isNode(t)&&(o.Dom.isElement(t)&&e.s.isCollapsed()&&!o.Dom.isTag(t,new Set(["br","hr"]))&&(u=t),o.Dom.up(t,e=>{if(o.Dom.isHTMLElement(e)){let t=(0,n.css)(e,"color",!0),i=(0,n.css)(e,"background-color",!0);if(t)return s=t.toString(),!0;if(i)return l=i.toString(),!0}},e.editor)),d=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{u?c(u,"backgroundColor",t):e.execCommand("background",!1,t),(0,n.dataBind)(r,"color",t),(0,n.dataBind)(r,"color-mode","background"),i()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{u?c(u,"color",t):e.execCommand("forecolor",!1,t),(0,n.dataBind)(r,"color",t),(0,n.dataBind)(r,"color-mode","color"),i()},s)}],"background"!==e.o.colorPickerDefaultTab&&(d=d.reverse()),(0,a.TabsWidget)(e,d,u)},exec(e,t,{button:i}){let r=(0,n.dataBind)(i,"color-mode"),s=(0,n.dataBind)(i,"color");if(!r)return!1;if(t&&t!==e.editor&&o.Dom.isNode(t)&&o.Dom.isElement(t))switch(r){case"color":c(t,"color",s);break;case"background":c(t,"backgroundColor",s)}else e.execCommand("background"===r?r:"forecolor",!1,s)},tooltip:"Fill color or set the text color"}},19063:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(41180),s=i(12153),a=i(6441),l=i(57487),c=i(23914);let d="copy-format",u=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],h=(e,t,i,o)=>{let n=(0,r.css)(i,t);return n===o[t]&&(n=i.parentNode&&i!==e.editor&&i.parentNode!==e.editor?h(e,t,i.parentNode,o):void 0),n};a.Config.prototype.controls.copyformat={exec(e,t,{button:i}){if(t){if(e.buffer.exists(d))e.buffer.delete(d),e.e.off(e.editor,"mouseup."+d);else{let i,n={},s=o.Dom.up(t,e=>e&&!o.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();o.Dom.append(e.editor,a),u.forEach(e=>{n[e]=(0,r.css)(a,e)}),a!==e.editor&&o.Dom.safeRemove(a);let l=(i={},s&&u.forEach(t=>{i[t]=h(e,t,s,n),t.match(/border(Style|Color)/)&&!i.borderWidth&&(i[t]=void 0)}),i);e.e.on(e.editor,"mouseup."+d,()=>{e.buffer.delete(d);let t=e.s.current();t&&(o.Dom.isTag(t,"img")?(0,r.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+d)}),e.buffer.set(d,!0)}i.update()}},isActive:e=>e.buffer.exists(d),tooltip:"Paint format"},n.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,n.extendLang)(c)}),s.Icon.set("copyformat",l.default)},57487:function(e,t){"use strict";t.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="14" height="6" rx="1"/><path d="M17 6h4v7H11v3"/><rect x="9" y="16" width="4" height="6" rx="1"/> </g> </svg> '},23914:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return n.a},cs_cz:function(){return n.a},de:function(){return n.a},es:function(){return n.a},fa:function(){return n.a},fi:function(){return n.a},fr:function(){return n.a},he:function(){return n.a},hu:function(){return n.a},id:function(){return n.a},it:function(){return n.a},ja:function(){return n.a},ko:function(){return n.a},mn:function(){return n.a},nl:function(){return n.a},pl:function(){return n.a},pt_br:function(){return n.a},ru:function(){return n.a},tr:function(){return n.a},zh_cn:function(){return n.a},zh_tw:function(){return n.a}});var o=i(41324),n=i.n(o)},66707:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(21537),a=i(49055),l=i(50911);let c=new Set(["img","table","jodit","iframe","hr"]),d=new Set(["pre","pre-wrap","break-spaces"]);function u(e,t){let i=0;for(;i<e.length&&" "===e.charAt(t?e.length-1-i:i);)i+=1;return 0===i?e:t?e.slice(0,e.length-i)+o.NBSP_SPACE.repeat(i):o.NBSP_SPACE.repeat(i)+e.slice(i)}function h(e,t){var i;return!e||n.Dom.isTag(e,"br")||n.Dom.isBlock(e)||n.Dom.isText(e)&&t.test(null!=(i=e.nodeValue)?i:"")}class p extends l.Plugin{afterInit(e){e.e.on("afterCommand.delete",e=>{"delete"===e&&this.__afterDeleteCommand()}),e.registerCommand("delete",{exec:this.__onDeleteCommand.bind(this)},{stopPropagation:!1})}beforeDestruct(e){e.e.off("afterCommand.delete")}__afterDeleteCommand(){let e=this.j,t=e.s.current();if(t&&n.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,a.trim)(e.editor.textContent||"")&&!n.Dom.first(e.editor,e=>n.Dom.isTag(e,c))&&(!t||!n.Dom.closest(t,"table",e.editor))){n.Dom.detach(e.editor);let t=e.s.setCursorIn(e.editor);e.s.removeNode(t)}}__onDeleteCommand(e,t,i){let{jodit:o}=this;if(o.s.isCollapsed())return;o.s.expandSelection();let r=o.s.range;this.__moveEdgesIntoCells(r);let s=!0===i?this.__formatTakenWhole(r):[],a=this.__clearSelectedCells(r);if(a&&r.collapsed)return o.s.selectRange(a),!1;r.deleteContents();let l=o.createInside.fake();r.insertNode(l);let c=n.Dom.findSibling(l,!0),d=n.Dom.findSibling(l,!1);return this.__moveContentInLeftSibling(l,c,d),this.__keepSpacesVisible(l),this.__keepSpacesVisibleBesideTable(l),r.setStartBefore(l),r.collapse(!0),s.length&&!a?this.__keepFormat(s,l,r):(this.__moveCursorInEditableSibling(o,c,l,r),this.__addBrInEmptyBlock(l,r)),n.Dom.safeRemove(l),o.s.selectRange(null!=a?a:r),!1}__moveEdgesIntoCells(e){let{startContainer:t,startOffset:i,endContainer:o,endOffset:r}=e,s=n.Dom.isTag(t,"tr")?t.childNodes[i]:null,a=n.Dom.isTag(o,"tr")?o.childNodes[r-1]:null;n.Dom.isCell(s)&&e.setStart(s,0),n.Dom.isCell(a)&&e.setEnd(a,a.childNodes.length)}__formatTakenWhole(e){let t=[],i=this.jodit.s.createRange(),{startContainer:o,startOffset:r}=e,a=n.Dom.isText(o)?null:o.childNodes[r];for(;n.Dom.isHTMLElement(a);){var l;if(i.selectNode(a),0>e.compareBoundaryPoints(Range.END_TO_END,i))break;if(l=a,n.Dom.isHTMLElement(l)&&!l.hasAttribute("contenteditable")&&!n.Dom.isTemporary(l)&&(/^(STRONG|B|EM|I|U|S|SUB|SUP)$/.test(l.nodeName)||n.Dom.isTag(l,"span")&&l.hasAttribute("style")))t.push(a);else if(t.length||!n.Dom.isBlock(a))break;a=(0,s.toArray)(a.childNodes).find(e=>{var t;return!n.Dom.isText(e)||(0,s.trimInv)(null!=(t=e.nodeValue)?t:"")})}return t}__keepFormat(e,t,i){let r=e.map(e=>e.cloneNode(!1));for(let e=1;e<r.length;e+=1)n.Dom.append(r[e-1],r[e]);let s=this.jodit.createInside.text(o.INVISIBLE_SPACE);n.Dom.append(r[r.length-1],s),n.Dom.before(t,r[0]),i.setStartAfter(s),i.collapse(!0)}__clearSelectedCells(e){let{editor:t,createInside:i}=this.j,o=n.Dom.closest(e.startContainer,n.Dom.isCell,t),r=n.Dom.closest(e.endContainer,n.Dom.isCell,t);if(o===r)return null;let a=n.Dom.closest(o,"table",t),l=n.Dom.closest(r,"table",t),c=e.cloneRange();c.collapse(!0);let d=e.cloneRange();d.collapse(!1);let u=[],h=t=>{(0,s.toArray)(t.rows).flatMap(e=>(0,s.toArray)(e.cells)).filter(t=>e.intersectsNode(t)).forEach(t=>{let i=e.cloneRange();n.Dom.isOrContains(t,e.startContainer)||i.setStart(t,0),n.Dom.isOrContains(t,e.endContainer)||i.setEnd(t,t.childNodes.length),u.push([t,i])})};return a&&(h(a),a===l?e.collapse(!0):e.setStartAfter(a)),l&&l!==a&&(h(l),e.setEndBefore(l)),u.forEach(([e,t])=>{if(t.deleteContents(),n.Dom.isEmpty(e)){n.Dom.detach(e),n.Dom.append(e,i.element("br"));return}[c,d].filter(t=>n.Dom.isOrContains(e,t.startContainer)).forEach(e=>{let t=i.fake();e.insertNode(t),this.__keepSpacesVisible(t),e.setStartBefore(t),e.collapse(!0),n.Dom.safeRemove(t)})}),a?c:null}__moveContentInLeftSibling(e,t,i){if(t=this.__defineRightLeftBox(t),n.Dom.isTag(t,"table")){n.Dom.isBlock(i)&&n.Dom.isEmpty(i)&&n.Dom.safeRemove(i);return}if(!n.Dom.isList(i)&&!n.Dom.isTag(i,"table")&&n.Dom.isBlock(i)&&n.Dom.isBlock(t)&&(n.Dom.append(t,e),n.Dom.moveContent(i,t),n.Dom.safeRemove(i)),n.Dom.isList(i)&&n.Dom.isLeaf(i.firstElementChild)){let o=i.firstElementChild;if(!n.Dom.isEmpty(o)&&n.Dom.isBlock(t))for(n.Dom.append(t,e);o.firstChild&&!n.Dom.isBlock(o.firstChild);)n.Dom.append(t,o.firstChild);n.Dom.isEmpty(o)&&n.Dom.safeRemove(o),n.Dom.isEmpty(i)&&n.Dom.safeRemove(i)}}__keepSpacesVisible(e){var t;let{jodit:i}=this,o=null!=(t=n.Dom.closest(e,n.Dom.isBlock,i.editor))?t:i.editor;if(d.has(i.ew.getComputedStyle(o).whiteSpace))return;let r=this.__findNeighbor(e,!0,o),s=this.__findNeighbor(e,!1,o);n.Dom.isText(r)&&h(s,/^ /)&&(r.nodeValue=u(r.nodeValue,!0)),n.Dom.isText(s)&&h(r,/ $/)&&(s.nodeValue=u(s.nodeValue,!1))}__keepSpacesVisibleBesideTable(e){let t=n.Dom.findNotEmptySibling(e,!0),i=n.Dom.findNotEmptySibling(e,!1),o=n.Dom.isTag(i,"table")?t:n.Dom.isTag(t,"table")?i:null;if(!n.Dom.isBlock(o)||n.Dom.isTag(o,"table"))return;let r=this.jodit.createInside.fake();o===t?n.Dom.append(o,r):o.insertBefore(r,o.firstChild),this.__keepSpacesVisible(r),n.Dom.safeRemove(r)}__findNeighbor(e,t,i){return(0,s.call)(t?n.Dom.prev:n.Dom.next,e,e=>{var t;return n.Dom.isText(e)?(0,s.trimInv)(null!=(t=e.nodeValue)?t:"").length>0:!n.Dom.isComment(e)&&!(n.Dom.isInlineBlock(e)&&e.firstChild)},i)}__defineRightLeftBox(e){if(!n.Dom.isList(e))return e;let t=e.lastElementChild;return n.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),n.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t){let i=this.j;if(e.isConnected&&n.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let o=i.createInside.element("br");n.Dom.after(e,o),t.setStartBefore(o),t.collapse(!0)}}__moveCursorInEditableSibling(e,t,i,o){var r;if(!t||!n.Dom.isText(t)){let t=null!=(r=n.Dom.closest(i,n.Dom.isBlock,e.editor))?r:e.editor,s=n.Dom.prev(i,n.Dom.isText,t);s&&(o.setStartAfter(s),o.collapse(!0),n.Dom.safeRemove(i))}}}p.requires=["backspace"],r.pluginSystem.add("deleteCommand",p)},44586:function(e,t,i){"use strict";i(6441).Config.prototype.draggableTags=["img","jodit-media","jodit"]},1255:function(e,t,i){"use strict";var o,n,r=i(65478),s=i(22732),a=i(580),l=i(21537),c=i(50911);i(44586);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(o=n||(n={}))[o.IDLE=0]="IDLE",o[o.WAIT_DRAGGING=1]="WAIT_DRAGGING",o[o.DRAGGING=2]="DRAGGING";class u extends c.Plugin{afterInit(){this.dragList=this.j.o.draggableTags?(0,l.splitArray)(this.j.o.draggableTags).filter(Boolean).map(e=>e.toLowerCase()):[],this.j.e.on("startDragElement",this.onStartDragElement),this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}onStartDragElement(e,t){this.isInDestruct||this.state>n.IDLE||!e||this.startDragging(e,t)}onDragStart(e){var t;if("dragstart"===e.type&&this.draggable)return!1;if(this.state>n.IDLE)return;let i=e.target;if(!this.dragList.length||!i)return;let o=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),r=s.Dom.furthest(i,o,this.j.editor)||(o(i)?i:null);r&&(s.Dom.isTag(r.parentElement,"a")&&r.parentElement.firstChild===r&&r.parentElement.lastChild===r&&(r=r.parentElement),this.startDragging(null!=(t=(0,l.getCaptionWrapper)(this.j,r))?t:r,e))}startDragging(e,t){this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,l.ctrlKey)(t),this.draggable=e.cloneNode(!0),(0,l.dataBind)(this.draggable,"target",e),this.state=n.WAIT_DRAGGING,this.addDragListeners()}onDrag(e){var t,i;if(!this.draggable||this.state===n.IDLE)return;let o=e.clientX,r=e.clientY;if(this.state===n.WAIT_DRAGGING&&Math.sqrt(Math.pow(o-this.startX,2)+Math.pow(r-this.startY,2))<this.diffStep)return;this.state===n.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=n.DRAGGING),this.j.e.fire("hidePopup hideResizer");let c=this.__ghostOffset();if(!this.draggable.parentNode){let o=(0,l.dataBind)(this.draggable,"target");(0,l.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:e.clientX+c.left,top:e.clientY+c.top,width:null!=(t=null==o?void 0:o.offsetWidth)?t:100,height:null!=(i=null==o?void 0:o.offsetHeight)?i:100}),s.Dom.append((0,a.getContainer)(this.j,u),this.draggable)}(0,l.css)(this.draggable,{left:e.clientX+c.left,top:e.clientY+c.top}),this.j.s.insertCursorAtPoint(e.clientX,e.clientY)}__ghostOffset(){let e=this.j.iframe;if(!e)return{left:0,top:0};let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}onDragEnd(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=n.IDLE,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<n.DRAGGING)return void this.onDragEnd();let e=(0,l.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(e=e.cloneNode(!0));let{parentElement:t}=e;this.j.s.insertNode(e,!0,!1),[e.previousSibling,e.nextSibling].forEach(e=>{s.Dom.isEmptyTextNode(e)&&s.Dom.safeRemove(e)}),t&&s.Dom.isEmpty(t)&&!s.Dom.isCell(t)&&s.Dom.safeRemove(t),s.Dom.isTag(e,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",e),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove",this.onDrag).on("mouseup",this.onDrop).on([this.j.ew,this.ow],"mouseup",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove",this.onDrag).off("mouseup",this.onDrop).off([this.j.ew,this.ow],"mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown dragstart",this.onDragStart).off("startDragElement",this.onStartDragElement),this.removeDragListeners()}constructor(){super(...arguments),this.dragList=[],this.draggable=null,this.isCopyMode=!1,this.diffStep=10,this.startX=0,this.startY=0,this.state=n.IDLE}}d([r.autobind],u.prototype,"onStartDragElement",null),d([r.autobind],u.prototype,"onDragStart",null),d([(0,r.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),d([r.autobind],u.prototype,"onDragEnd",null),d([r.autobind],u.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",u)},19271:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(8172),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart).on("drop.DragAndDrop",this.onDrop)}onDragStart(e){var t;let i=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=r.Dom.isOrContains(this.j.editor,i,!0),this.isCopyMode=!this.isFragmentFromEditor||(0,a.ctrlKey)(e),this.isFragmentFromEditor){let e=this.j.s.sel,t=e&&e.rangeCount?e.getRangeAt(0):null;t&&(this.bufferRange=t.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=e.clientX,this.startDragPoint.y=e.clientY,t=i,r.Dom.isElement(t)&&t.classList.contains(c.FileBrowserFiles.prototype.getFullElName("item"))&&(i=r.Dom.first(i,e=>r.Dom.isTag(e,"img"))),r.Dom.isTag(i,"img")&&(this.draggable=i.cloneNode(!0),(0,a.dataBind)(this.draggable,"target",i)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}onDrag(e){this.draggable&&(this.j.e.fire("hidePopup"),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),e.preventDefault(),e.stopPropagation())}onDragEnd(){this.draggable&&(r.Dom.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(e){if(!e.dataTransfer||!e.dataTransfer.files||!e.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire("paste",e),e.preventDefault(),e.stopPropagation(),!1;let t=this.j.s.sel,i=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),o=this.__getWorkFragment(i,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),o&&this.__insertFragment.call(this,o,i),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let i=null;if(!this.draggable&&e)i=this.isCopyMode?e.cloneContents():e.extractContents();else if(this.draggable)if(this.isCopyMode){let[e,t]="1"===(0,a.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(e),(0,a.attr)(i,t,(0,a.attr)(this.draggable,"data-src")||(0,a.attr)(this.draggable,"src")||""),"a"===e&&(i.textContent=(0,a.attr)(i,t)||"")}else i=(0,a.dataBind)(this.draggable,"target");else if(this.getText(t)){let e=this.j.createInside.div();e.innerHTML=this.getText(t),this.j.e.fire("safeHTML",e),i=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e}return i}__insertFragment(e,t){this.j.s.insertNode(e,!1,!1),t&&e.firstChild&&e.lastChild&&(t.setStartBefore(e.firstChild),t.setEndAfter(e.lastChild),this.j.s.selectRange(t),this.j.e.fire("synchro")),r.Dom.isTag(e,"img")&&this.j.events&&this.j.e.fire("afterInsertImage",e)}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,".DragAndDrop").off(".DragAndDrop").off([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.getText=e=>{let t=(0,a.getDataTransfer)(e);return t?t.getData(o.TEXT_HTML)||t.getData(o.TEXT_PLAIN):null}}}d([n.autobind],u.prototype,"onDragStart",null),d([(0,n.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),d([n.autobind],u.prototype,"onDragEnd",null),d([n.autobind],u.prototype,"onDrop",null),s.pluginSystem.add("dragAndDrop",u)},46124:function(e,t,i){"use strict";i.r(t),i.d(t,{removeExtraBr:function(){return o.removeExtraBr}});var o=i(94870)},94870:function(e,t,i){"use strict";i.d(t,{removeExtraBr:function(){return r}});var o=i(2748);let n=new Set(["table","pre","blockquote","code"]);function r(e,t){if(!e.o.dtd.removeExtraBr||o.Dom.isTag(t,"br"))return;let i=o.Dom.furthest(t,o.Dom.isBlock,e.editor);if(i&&!o.Dom.isTag(i,n)){let i=o.Dom.isTag(t,"br")?t:o.Dom.findNotEmptySibling(t,!1);if(!o.Dom.isTag(i,"br")||o.Dom.findNotEmptySibling(i,!1))return;if(!o.Dom.isOrContains(t,e.s.range.startContainer)){let t=e.s.createRange();t.setStartBefore(i),t.collapse(!0),e.s.selectRange(t)}o.Dom.safeRemove(i)}}},78720:function(e,t,i){"use strict";i.d(t,{checkBlockNesting:function(){return n}});var o=i(2748);function n(e,t){var i,n;if(o.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&o.Dom.isBlock(t)){let r=null,s=null!=(n=null==(i=e.s.current())?void 0:i.parentElement)?n:null;for(;s&&s!==e.editor;){if(o.Dom.isBlock(s)){let t=!r&&o.Dom.isTag(s,e.o.enter)&&o.Dom.isEmpty(s);if(e.o.dtd.blockLimits[s.nodeName.toLowerCase()]&&!t)break;r=s}s=s.parentElement}o.Dom.isLeaf(s)&&o.Dom.isList(t)&&o.Dom.isFragment(t.parentNode)&&!o.Dom.findNotEmptySibling(t,!1)&&(o.Dom.unwrap(t),r=s),r&&function(e,t){var i;let{s:n}=e;if(o.Dom.isEmpty(t)){n.setCursorAfter(t),o.Dom.safeRemove(t);return}n.cursorOnTheRight(t)?n.setCursorAfter(t):n.cursorOnTheLeft(t)?n.setCursorBefore(t):n.setCursorAfter(null!=(i=n.splitSelection(t))?i:t)}(e,r)}}},43267:function(e,t,i){"use strict";i.r(t),i.d(t,{checkBlockNesting:function(){return o.checkBlockNesting}});var o=i(78720)},9045:function(e,t,i){"use strict";i(6441).Config.prototype.dtd={removeExtraBr:!0,checkBlockNesting:!0,blockLimits:{article:1,aside:1,audio:1,body:1,caption:1,dd:1,details:1,dir:1,div:1,dl:1,dt:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,li:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1}}},65735:function(e,t,i){"use strict";var o=i(37133),n=i(580),r=i(50911);i(9045);var s=i(46124),a=i(43267),l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends r.Plugin{afterInit(e){}beforeDestruct(e){}__onBeforeInsertNode(e){Object.keys(a).forEach(t=>{a[t](this.j,e)})}__onAfterInsertNode(e){Object.keys(s).forEach(t=>{s[t](this.j,e)})}}l([(0,o.watch)(":beforeInsertNode")],c.prototype,"__onBeforeInsertNode",null),l([(0,o.watch)(":afterInsertNode")],c.prototype,"__onAfterInsertNode",null),n.pluginSystem.add("dtd",c)},575:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(87612),l=i(20356),c=i(35399);class d extends l.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),i=t===o.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=i?o.PARAGRAPH:t),e.registerCommand("enter",(e,t,i={})=>this.onEnter(i))}onEnterKeyDown(e){if(e.key===o.KEY_ENTER){let t=this.j,i=t.e.fire("beforeEnter",e);return void 0!==i?i:(t.history.snapshot.transaction(()=>{t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),t.e.fire("afterEnter",e)}),t.synchronizeValues(),!1)}}onEnter(e){let{jodit:t}=this,i=t.createInside.fake();try{r.Dom.safeInsertNode(t.s.range,i),(0,c.moveCursorOutFromSpecialTags)(t,i,["a"]);let o=(0,c.getBlockWrapper)(i,t),n=r.Dom.isLeaf(o);if((!n||(null==e?void 0:e.shiftKey))&&(0,c.checkBR)(i,t,null==e?void 0:e.shiftKey,o))return!1;if(o||(0,c.hasPreviousBlock)(i,t)||(o=(0,c.wrapText)(i,t)),!o)return(0,c.insertParagraph)(i,t,n?"li":t.o.enter),!1;if(!(0,c.checkUnsplittableBox)(i,t,o))return!1;if(n&&this.__isEmptyListLeaf(o))return(0,c.processEmptyLILeaf)(i,t,o),!1;(0,c.splitFragment)(i,t,o)}finally{i.isConnected&&t.s.setCursorBefore(i),r.Dom.safeRemove(i)}}__isEmptyListLeaf(e){let t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,a.isBoolean)(t)?t:r.Dom.isEmpty(e)}beforeDestruct(e){e.e.off("keydown.enter")}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":keydown.enter")],d.prototype,"onEnterKeyDown",null),s.pluginSystem.add("enter",d)},41872:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return s}});var o=i(82758),n=i(2748),r=i(26395);function s(e,t,i,s){let l=!!n.Dom.closest(e,"pre",t.editor)||(s?n.Dom.isTag(s,"blockquote"):!!n.Dom.closest(e,"blockquote",t.editor)),c=!l&&(s?n.Dom.isCell(s):!!n.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===o.BR.toLowerCase()||c||i&&!l||!i&&l){var d;let i;if(l&&(i=a(a(d=e)))&&(n.Dom.safeRemove(a(d)),n.Dom.safeRemove(i),1))return!1;let o=t.createInside.element("br");if(n.Dom.before(e,o),!n.Dom.findNotEmptySibling(o,!1)){let t=o.cloneNode();n.Dom.after(o,t),n.Dom.before(t,e)}let s=o.cloneNode();return n.Dom.before(e,s),(0,r.scrollIntoViewIfNeeded)(s,t.editor,t.ed),n.Dom.safeRemove(s),!0}return!1}function a(e){if(!e)return!1;let t=n.Dom.findSibling(e,!0);return!!t&&!!n.Dom.isTag(t,"br")&&t}},61991:function(e,t,i){"use strict";i.d(t,{checkUnsplittableBox:function(){return n}});var o=i(2748);function n(e,t,i){return!!o.Dom.canSplitBlock(i)||(o.Dom.before(e,t.createInside.element("br")),!1)}},54041:function(e,t,i){"use strict";i.d(t,{getBlockWrapper:function(){return function e(t,i,r=o.IS_BLOCK){let s=t,a=i.editor;do{if(!s||s===a)break;if(r.test(s.nodeName)){if(n.Dom.isLeaf(s))return s;return e(s.parentNode,i,/^li$/i)||s}s=s.parentNode}while(s&&s!==a)return null}}});var o=i(82758),n=i(2748)},19057:function(e,t,i){"use strict";i.d(t,{hasPreviousBlock:function(){return n}});var o=i(2748);function n(e,t){return!!o.Dom.prev(e,e=>o.Dom.isBlock(e)||o.Dom.isImage(e),t.editor)}},35399:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return o.checkBR},checkUnsplittableBox:function(){return n.checkUnsplittableBox},getBlockWrapper:function(){return r.getBlockWrapper},hasPreviousBlock:function(){return s.hasPreviousBlock},insertParagraph:function(){return a.insertParagraph},moveCursorOutFromSpecialTags:function(){return l.moveCursorOutFromSpecialTags},processEmptyLILeaf:function(){return c.processEmptyLILeaf},splitFragment:function(){return d.splitFragment},wrapText:function(){return u.wrapText}});var o=i(41872),n=i(61991),r=i(54041),s=i(19057),a=i(44245),l=i(91388),c=i(65181),d=i(54600),u=i(5287)},44245:function(e,t,i){"use strict";i.d(t,{insertParagraph:function(){return s}});var o=i(2748),n=i(29960),r=i(26395);function s(e,t,i,s){let a="br"===i.toLowerCase(),{createInside:l}=t,c=l.element(i),d=l.element("br");return a||o.Dom.append(c,d),s&&s.cssText&&(0,n.attr)(c,"style",s.cssText),o.Dom.after(e,c),o.Dom.before(a?c:d,e),(0,r.scrollIntoViewIfNeeded)(c,t.editor,t.ed),c}},91388:function(e,t,i){"use strict";i.d(t,{moveCursorOutFromSpecialTags:function(){return n}});var o=i(2748);function n(e,t,i){let{s:n}=e,r=o.Dom.closest(t,i,e.editor);if(r){if(n.cursorOnTheRight(r,t))o.Dom.after(r,t);else{if(!n.cursorOnTheLeft(r,t))return;o.Dom.before(r,t)}let e=n.createRange();e.setStartBefore(t),n.selectRange(e)}}},65181:function(e,t,i){"use strict";i.d(t,{processEmptyLILeaf:function(){return s}});var o=i(2748),n=i(76078),r=i(44245);function s(e,t,i){let s=o.Dom.closest(i,["ol","ul"],t.editor);if(!s)return;let a=s.parentElement,l=o.Dom.isLeaf(a),c=l?a:s,d=t.s.createRange();d.setStartAfter(i),d.setEndAfter(s);let u=d.extractContents();o.Dom.after(c,e),o.Dom.safeRemove(i),(0,n.$$)("li",s).length||o.Dom.safeRemove(s);let h=(0,r.insertParagraph)(e,t,l?"li":t.o.enter);o.Dom.first(u,e=>o.Dom.isTag(e,"li"))&&(l?o.Dom.append(h,u):o.Dom.after(h,u))}},54600:function(e,t,i){"use strict";i.d(t,{splitFragment:function(){return s}});var o=i(2748),n=i(26395),r=i(44245);function s(e,t,i){let s=t.s,{enter:a}=t.o,l=a.toLowerCase(),c=o.Dom.isLeaf(i),d=i.tagName.toLowerCase()===l||c,u=s.cursorOnTheRight(i,e),h=s.cursorOnTheLeft(i,e);if(!d&&(u||h)){u?o.Dom.after(i,e):o.Dom.before(i,e),(0,r.insertParagraph)(e,t,l),h&&!u&&o.Dom.prepend(i,e);return}let{scrollTop:p}=t.editor;s.splitSelection(i,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,n.scrollIntoViewIfNeeded)(i,t.editor,t.ed)}},5287:function(e,t,i){"use strict";i.d(t,{wrapText:function(){return n}});var o=i(2748);function n(e,t){let i=e;o.Dom.up(i,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(i=e)},t.editor);let n=o.Dom.wrapInline(i,t.o.enter,t);if(o.Dom.isEmpty(n)){let i=t.createInside.element("br");o.Dom.append(n,i),o.Dom.before(i,e)}return n}},11317:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(29960),s=i(6441),a=i(2073),l=i(92762);function c(e,t,i=""){if(e.s.isCollapsed())return!1;let o=e.s.wrapInTag("a");return!!o.length&&(o.forEach(e=>{(0,r.attr)(e,"href",t),i&&(0,r.attr)(e,"title",i)}),e.s.setCursorAfter(o[o.length-1]),!0)}function d(e){let{baseurl:t}=e;(0,a.getItems)(e).forEach(({file:e})=>{let i=t+e;if(c(this,i))return;let o=this.createInside.element("a",{href:i});o.textContent=this.o.uploader.getDisplayName.call(this.uploader,t,e),this.s.insertNode(o)})}s.Config.prototype.file={defaultHandlerSuccess:d},s.Config.prototype.controls.file={popup(e,t,i){let n=e.s.isCollapsed()?null:e.s.range,s=()=>{n&&e.s.selectRange(n)},u=(t,i="")=>{s(),c(e,t,i)||e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))},h=null;return t&&(o.Dom.isTag(t,"a")||o.Dom.closest(t,"a",e.editor))&&(h=o.Dom.isTag(t,"a")?t:o.Dom.closest(t,"a",e.editor)),(0,l.FileSelectorWidget)(e,{filebrowser(e){(0,a.getItems)(e).forEach(({file:t})=>u(e.baseurl+t)),i()},upload(t){var i,o;s(),(null!=(o=null==(i=e.o.file)?void 0:i.defaultHandlerSuccess)?o:d).call(e,t)},url(e,t){h?((0,r.attr)(h,"href",e),(0,r.attr)(h,"title",t)):u(e,t),i()}},h,i,!1)},tags:["a"],tooltip:"Insert file"},n.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},36243:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(6441);s.Config.prototype.autofocus=!1,s.Config.prototype.cursorAfterAutofocus="end",s.Config.prototype.saveSelectionOnBlur=!0,r.pluginSystem.add("focus",function(e){if(e.o.saveSelectionOnBlur){let t=!1;e.e.on("blur",()=>{t=!1,e.isEditorMode()&&e.s.save(!0)}).on("mousedown touchstart",()=>{t=!e.editorIsActive}).on("focus",()=>{e.isEditorMode()&&(t?e.s.removeMarkers():e.s.restore()),t=!1})}let t=()=>{e.s.focus();let t=null;switch(e.o.cursorAfterAutofocus){case"start":t=n.Dom.first(e.editor,e=>n.Dom.isText(e));break;case"end":t=n.Dom.last(e.editor,e=>n.Dom.isText(e))}t&&e.s.setCursorIn(t,"start"===e.o.cursorAfterAutofocus)};e.e.on("afterInit",()=>{if(e.o.autofocus)if(e.defaultTimeout){let i="mousedown touchstart keydown",o=()=>{e.async.clearTimeout(n),e.e.off(i,o)},n=e.async.setTimeout(()=>{e.e.off(i,o),t()},300);e.e.on(i,o)}else t()}),e.e.on("afterInit afterAddPlace",()=>{e.e.off(e.editor,"mousedown.autofocus").on(e.editor,"mousedown.autofocus",t=>{e.isEditorMode()&&t.target&&n.Dom.isBlock(t.target)&&!n.Dom.isTag(t.target,o.INSEPARABLE_TAGS)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},28252:function(e,t,i){"use strict";var o=i(22732),n=i(68345),r=i(49055),s=i(41180),a=i(12153),l=i(6441),c=i(4104),d=i(83709),u=i(40222);l.Config.prototype.defaultFontSizePoints="px",l.Config.prototype.font={googleFonts:{url:""}},a.Icon.set("font",c.default).set("fontsize",d.default);let h=new WeakSet;l.Config.prototype.controls.fontsize={command:"fontsize",data:{cssRule:"font-size",normalize:e=>e.toString().replace(/(px|pt)$/i,"")},list:[8,9,10,11,12,14,16,18,24,30,32,34,36,48,60,72,96],textTemplate:(e,t)=>t+e.o.defaultFontSizePoints,childTemplate:(e,t,i)=>`${i}${e.o.defaultFontSizePoints}`,tooltip:"Font size",value(e,t){var i;let n=e.s.current(),r=n&&o.Dom.closest(n,o.Dom.isElement,e.editor),a=t.control;if(r)h.add(t);else if("select"!==a.component||h.has(t))return;let l=(null==(i=a.data)?void 0:i.cssRule)||"font-size",c=(0,s.css)(r||e.editor,l);if("font-size"===l){let t=parseFloat(c.toString());return"pt"===e.o.defaultFontSizePoints?Math.round(.75*t).toString():Math.round(t).toString()}return c.toString()},isChildActive(e,t){var i,o;let n=t.state.value,r=null!=(o=null==(i=t.control.data)?void 0:i.normalize)?o:e=>e;return!!(n&&t.control.args&&r(t.control.args[0].toString())===r(n.toString()))},isActive(e,t){var i,o;let n=t.state.value;if(!n)return!1;let r=null!=(o=null==(i=t.control.data)?void 0:i.normalize)?o:e=>e,s=t.control.data.cacheListSet;return s||(s=new Set(Object.keys(t.control.list).map(r)),t.control.data.cacheListSet=s),s.has(r(n.toString()))}},l.Config.prototype.controls.font={...l.Config.prototype.controls.fontsize,command:"fontname",textTemplate(e,t){let[i]=t.split(",");return(0,r.trimChars)(i,"\"'")},list:{"":"Default","Arial, Helvetica, sans-serif":"Arial","'Courier New', Courier, monospace":"Courier New","Georgia, Palatino, serif":"Georgia","'Lucida Sans Unicode', 'Lucida Grande', sans-serif":"Lucida Sans Unicode","Tahoma, Geneva, sans-serif":"Tahoma","'Times New Roman', Times, serif":"Times New Roman","'Trebuchet MS', Helvetica, sans-serif":"Trebuchet MS","Helvetica, sans-serif":"Helvetica","Impact, Charcoal, sans-serif":"Impact","Verdana, Geneva, sans-serif":"Verdana"},childTemplate(e,t,i){let o=!1;try{o=-1===t.indexOf("dings")&&document.fonts.check("16px "+t,i)}catch(e){}return`<span data-style="${t}" style="${o?`font-family: ${t}!important;`:""}">${i}</span>`},popup:(e,t,i,o)=>!!e.o.font.googleFonts.url&&new u.UIFontPicker(e,o,i),data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value(e,t){let i=e.s.current(),r=i&&o.Dom.closest(i,o.Dom.isElement,e.editor);if(r)h.add(t);else if(h.has(t))return;let a=(0,s.css)(r||e.editor,"font-family").toString(),{list:l}=t.control;return a===(0,s.css)(e.editor,"font-family").toString()&&((0,n.isArray)(l)?l.includes(""):""in(null!=l?l:{}))?"":a},tooltip:"Font family"}},40222:function(e,t,i){"use strict";i.d(t,{UIFontPicker:function(){return g}});var o=i(87325),n=i(37133),r=i(2748),s=i(580),a=i(68345),l=i(29960),c=i(41180),d=i(37790),u=i(48538),h=i(41870),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=["h1","h2","h3","h4","h5","h6"],f=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),g=class e extends u.UIElement{className(){return"UIFontPicker"}__render(){var e,t;let{control:i}=this.__button,{list:o={}}=i,n=(0,a.isArray)(o)?o.map(e=>({value:e.toString(),title:e.toString()})):(0,d.keys)(o,!1).map(e=>({value:e,title:o[e].toString()})),s=Array.from(this.__googleFonts.fonts.values(),e=>({value:this.__googleFonts.value(e),title:e.family,font:e})),l=new Map;[...s,...n].forEach(e=>l.set((0,h.firstFamily)(e.value),e));let c=new Map,u=new Map;this.__themeFonts().forEach(e=>{var t;let i=(0,h.firstFamily)(e),o=e.split(",")[0].replace(/["']/g,"").trim(),n=null!=(t=l.get(i))?t:!i||i.startsWith("-")||f.has(i)?void 0:{value:e,title:o};n&&!c.has(i)&&c.set(i,n)}),this.__usedFonts().forEach(e=>{let t=(0,h.firstFamily)(e),i=l.get(t);i&&!c.has(t)&&u.set(t,i)});let p=n.find(e=>""===e.value),m=(0,h.firstFamily)(null!=(t=null==(e=i.value)?void 0:e.call(i,this.j,this.__button))?t:"");r.Dom.detach(this.container),this.__fonts.clear(),p&&this.__append(m,[p]),this.__append(m,[...c.values()],"Theme fonts"),this.__append(m,[...u.values()],"Used fonts"),this.__append(m,n.filter(e=>e!==p),"System fonts"),this.__append(m,s,"Google Fonts"),this.__observeGoogleFonts()}__themeFonts(){let{editor:e}=this.j,t=[(0,c.css)(e,"font-family").toString()];return m.forEach(i=>{let o=this.j.createInside.element(i,{style:"display: none"});r.Dom.append(e,o),t.push((0,c.css)(o,"font-family").toString()),r.Dom.safeRemove(o)}),t}__usedFonts(){return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'),e=>e.style.fontFamily)}__append(e,t,i){if(!t.length)return;let{control:o}=this.__button,n=this.j.c.div(this.getFullElName("group"));if(i){let e=this.j.c.div(this.getFullElName("heading"),{id:`${this.getFullElName("heading")}-${(0,s.uniqueUid)()}`});e.textContent=this.i18n(i),(0,l.attr)(n,{role:"group","aria-labelledby":e.id}),r.Dom.append(n,e)}t.forEach(t=>{var i,s;let a=this.j.c.element("button",{type:"button",class:this.getFullElName("item"),"data-value":t.value,"aria-pressed":(0,h.firstFamily)(t.value)===e});t.font?(a.textContent=t.title,this.__fonts.set(a,t.font)):a.innerHTML=null!=(s=null==(i=o.childTemplate)?void 0:i.call(o,this.j,t.value,t.title,this.__button))?s:t.title,r.Dom.append(n,a)}),r.Dom.append(this.container,n)}__observeGoogleFonts(){this.j.async.requestAnimationFrame(()=>{var e;if(null==(e=this.__observer)||e.disconnect(),this.isDestructed||!this.__fonts.size)return;let t=new IntersectionObserver(e=>{let i=[];e.forEach(({isIntersecting:e,target:o})=>{let n=this.__fonts.get(o);e&&n&&(i.push(n),(0,c.css)(o,{fontFamily:this.__googleFonts.value(n)}),t.unobserve(o))}),this.__googleFonts.preview(i)},{root:this.container.parentElement,rootMargin:"0px 0px 400px 0px"});this.__fonts.forEach((e,i)=>t.observe(i)),this.__observer=t})}onMouseDown(e){e.preventDefault()}onClick(e){var t;let i=r.Dom.up(e.target,e=>r.Dom.isHTMLElement(e)&&e.hasAttribute("data-value"),this.container);if(!i)return;let o=null!=(t=(0,l.attr)(i,"data-value"))?t:"",n=this.__googleFonts.find(o),s=(0,h.firstFamily)(o)===(0,h.firstFamily)(this.__blockFont());n&&!s&&this.__googleFonts.load(n),this.j.execCommand("fontname",!1,s?"":o),this.__close()}__blockFont(){let e=r.Dom.up(this.j.s.current(),r.Dom.isBlock,this.j.editor);return(0,c.css)(null!=e?e:this.j.editor,"font-family").toString()}destruct(){var e;null==(e=this.__observer)||e.disconnect(),super.destruct()}constructor(e,t,i){super(e),this.__button=t,this.__close=i,this.__fonts=new Map,this.__observer=null,this.__googleFonts=e.getInstance(h.GoogleFonts),this.__render(),this.__googleFonts.fonts.size||this.__googleFonts.ready.then(()=>!this.isDestructed&&this.__render())}};p([(0,n.watch)("container:mousedown")],g.prototype,"onMouseDown",null),p([(0,n.watch)("container:click")],g.prototype,"onClick",null),g=p([o.component],g)},23399:function(e,t,i){"use strict";var o=i(580),n=i(21537);i(28252);var r=i(41870);o.pluginSystem.add("font",function(e){if(e.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"}),e.o.font.googleFonts.url){let t=e.getInstance(r.GoogleFonts),i=e.async.debounce(()=>t.loadUsed(),e.defaultTimeout);t.ready.then(i),e.e.on("afterInit afterSetMode change",i)}e.e.on("afterInit",()=>{e.iframe&&e.e.on(e.ed,"load",()=>e.e.fire("updateToolbar"),{capture:!0})});let t=(t,i,o)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,n.normalizeSize)(o,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:o}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},41870:function(e,t,i){"use strict";i.d(t,{GoogleFonts:function(){return c},firstFamily:function(){return l}});var o=i(80480),n=i(2748),r=i(54079);let s={serif:"serif",monospace:"monospace"},a=new Map;function l(e){return e.split(",")[0].replace(/["']/g,"").trim().toLowerCase()}class c extends o.ViewComponent{className(){return"GoogleFonts"}find(e){return this.fonts.get(l(e))}value(e){var t;return`'${e.family}', ${null!=(t=s[e.category])?t:"sans-serif"}`}load(e){let t=this.__loadedInto(this.j.ed);if(t.has(e.family))return;t.add(e.family);let i=[["regular","0,400"],["700","0,700"],["italic","1,400"],["700italic","1,700"]].filter(([t])=>e.variants.includes(t)).map(([,e])=>e);this.__append(this.j.ed,`family=${this.__family(e)}:ital,wght@${i.join(";")}`)}loadUsed(){this.j.editor.querySelectorAll('[style*="font-family"]').forEach(e=>{let t=this.find(e.style.fontFamily);t&&this.load(t)})}preview(e){let t=this.__loadedInto(this.j.od);if(!(e=e.filter(e=>!this.__previewed.has(e.family)&&!t.has(e.family))).length)return;e.forEach(e=>this.__previewed.add(e.family));let i=e.map(e=>"family="+this.__family(e)),o=new Set(e.map(e=>e.family).join(""));this.__append(this.j.od,`${i.join("&")}&text=${encodeURIComponent([...o].join(""))}`)}__loadedInto(e){var t;let i=null!=(t=this.__loaded.get(e))?t:new Set;return this.__loaded.set(e,i),i}__family(e){return encodeURIComponent(e.family).replace(/%20/g,"+")}__append(e,t){let i=e.createElement("link");i.rel="stylesheet",i.href=`https://fonts.googleapis.com/css2?${t}&display=swap`,e.head.appendChild(i),this.__links.push(i)}destruct(){this.__links.forEach(e=>n.Dom.safeRemove(e)),super.destruct()}constructor(e){super(e),this.fonts=new Map,this.__links=[],this.__loaded=new WeakMap,this.__previewed=new Set,this.ready=(function(e,t){let i=a.get(t);if(!i){let o=new r.Ajax({url:t,method:"GET"},e.o.defaultAjaxOptions);i=o.send().then(e=>e.json()).then(({items:e})=>e.filter(e=>e.variants.includes("regular"))).catch(()=>(a.delete(t),[])).finally(()=>o.destruct()),a.set(t,i)}return i})(e,e.o.font.googleFonts.url).then(e=>{e.forEach(e=>this.fonts.set(e.family.toLowerCase(),e))})}}},4104:function(e,t){"use strict";t.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"> <path d="m5 17 7-14 7 14M8 12h8M3 21h18"/> </g> </svg> '},83709:function(e,t){"use strict";t.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"> <path d="M2 5h9M6.5 5v15M4 20h5M19 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg> '},24630:function(e,t,i){"use strict";var o=i(2748),n=i(72430),r=i(12153),s=i(6441),a=i(4932),l=i(89816);r.Icon.set("paragraph",l.default),s.Config.prototype.formatBlock={previewProperties:[]},s.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){var i,n;let r=t.control,s=e.s.current(),a=o.Dom.closest(s,o.Dom.isBlock,e.editor);return null!=(i=null==a?void 0:a.nodeName.toLowerCase())?i:null==(n=r.data)?void 0:n.currentValue},update(e,t){let i=t.control;if(!e.s.current())return!1;let o=t.state.value,r=i.list;return(0,n.isPlainObject)(r)&&r[o.toString()]&&e.o.textIcons&&(t.state.text=r[o.toString()].toString()),!1},data:{currentValue:"p"},list:{p:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},isChildActive(e,t){var i,o;return t.state.value===(null==(o=null==(i=t.control)?void 0:i.args)?void 0:o[0])},isActive:(e,t)=>t.state.value!==e.o.enter&&(0,n.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,i)=>`<${t} style="margin:0;padding:0${function(e,t){let{previewProperties:i}=e.o.formatBlock;if(!i.length)return"";let n=e.createInside.element(t,{style:"display: none"});o.Dom.append(e.editor,n);let r=e.ew.getComputedStyle(n),s=parseFloat(r.fontSize)||16,l=i.map(t=>{let i=r.getPropertyValue(t);return i&&"font-family"===t&&(i=(0,a.withContentFonts)(e,i)),i?`;${t}:${i.replace(/(-?[\d.]+)px/g,(e,t)=>`${parseFloat(t)/s}em`).replace(/"/g,"'")}`:""}).join("");return o.Dom.safeRemove(n),l}(e,t)}"><span>${e.i18n(i)}</span></${t}>`,tooltip:"Insert format block"}},4932:function(e,t,i){"use strict";i.d(t,{withContentFonts:function(){return s}});let o=new WeakMap,n=new Map,r=0;function s(e,t){let{ed:i,od:n}=e;if(i===n)return t;let s=function(e){let t=o.get(e);if(!t){let{od:i}=e,n={prefix:`jodit-preview-${++r}-`,faces:new Map,pending:!1};o.set(e,n),e.e.on("beforeDestruct",()=>n.faces.forEach(e=>i.fonts.delete(e))),t=n}return t}(e);!function(e,t){if(t.pending)return;t.pending=!0;let{ed:i,od:o}=e;Promise.all(Array.from(i.styleSheets,e=>a(e,i.baseURI))).then(i=>{t.pending=!1,e.isInDestruct||i.flat().forEach(e=>{let i=JSON.stringify(e);if(!t.faces.has(i)){let n=new FontFace(t.prefix+e.family,e.source,e.descriptors);o.fonts.add(n),t.faces.set(i,n)}})})}(e,s);let l=new Set;return i.fonts.forEach(e=>l.add(c(e.family))),t.split(",").map(e=>{let t=c(e);return l.has(t)?`"${s.prefix}${t}", ${e.trim()}`:e.trim()}).join(", ")}function a(e,t){var i;let o;try{o=e.cssRules}catch(o){let{href:t}=e;if(!t)return Promise.resolve([]);let i=n.get(t);return i||(i=fetch(t).then(e=>e.text()).then(e=>{let i=document.implementation.createHTMLDocument(""),o=i.createElement("style");return o.textContent=e,i.head.appendChild(o),o.sheet?l(o.sheet.cssRules,t):[]}).catch(()=>[]),n.set(t,i)),i}return l(o,null!=(i=e.href)?i:t)}function l(e,t){return Promise.all(Array.from(e,e=>{var i;let o;if("styleSheet"in e){let{styleSheet:i}=e;return i?a(i,t):[]}return"cssRules"in e?l(e.cssRules,t):e.cssText.startsWith("@font-face")?[(o=t=>e.style.getPropertyValue(t)||void 0,{family:c(e.style.getPropertyValue("font-family")),source:(i=e.style.getPropertyValue("src"),i.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g,(e,i,o)=>{try{return`url("${new URL(o,t).href}")`}catch(t){return e}})),descriptors:{style:o("font-style"),weight:o("font-weight"),stretch:o("font-stretch"),unicodeRange:o("unicode-range")}})]:[]})).then(e=>e.flat())}function c(e){return e.replace(/["']/g,"").trim().toLowerCase()}},96111:function(e,t,i){"use strict";var o=i(580);i(24630),o.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,i,o)=>(e.s.commitStyle({element:o}),e.synchronizeValues(),!1))})},89816:function(e,t){"use strict";t.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"> <path d="M20 4H9a5 5 0 0 0 0 10h3M12 4v17M18 4v17"/> </g> </svg> '},99823:function(e,t,i){"use strict";var o=i(82758),n=i(12153),r=i(6441),s=i(6950),a=i(28911);r.Config.prototype.fullsize=!1,r.Config.prototype.globalFullSize=!0,n.Icon.set("fullsize",s.default).set("shrink",a.default),r.Config.prototype.controls.fullsize={exec(e){e.toggleFullSize()},isActive:e=>e.isFullSize,update(e,t){let i=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=i:t.state.icon.name=i},tooltip:"Open in fullsize",mode:o.MODE_SOURCE+o.MODE_WYSIWYG}},2169:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(19306),s=i(41180);i(99823);let a=new Set;n.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,i=0,n=0,l=0,c=0,d=!1,u=()=>{let{container:o,events:r}=e;r&&(t?(d||(i=(0,s.css)(o,"height",!0),n=(0,s.css)(o,"width",!0),d=!0),(0,s.css)(o,{height:e.ow.innerHeight,width:e.ow.innerWidth})):d&&((0,s.css)(o,{height:i||"auto",width:n||"auto"}),d=!1))},h=i=>{let{container:n,events:d}=e;if(n){if(void 0===i&&(i=!n.classList.contains("jodit_fullsize")),e.setMod("fullsize",i),e.o.fullsize=i,t=i,n.classList.toggle("jodit_fullsize",i),e.toolbar&&((0,r.isJoditObject)(e)&&e.toolbarContainer&&o.Dom.append(e.toolbarContainer,e.toolbar.container),(0,s.css)(e.toolbar.container,"width","auto")),i?a.add(n):a.delete(n),e.o.globalFullSize&&(1===a.size&&i||0===a.size&&!i)){i&&(l=e.ow.scrollX,c=e.ow.scrollY);let t=n.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",i),t=t.parentNode;u(),i||e.ow.scrollTo(l,c)}d.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",u),e.e.on("afterInit afterOpen",()=>{var t;e.toggleFullSize(null==(t=null==e?void 0:e.options)?void 0:t.fullsize)}).on("toggleFullSize",h).on("beforeDestruct",()=>{t&&h(!1)}).on("beforeDestruct",()=>{e.events&&e.e.off(e.ow,"resize",u)})})},6950:function(e,t){"use strict";t.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"> <path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"/> </g> </svg> '},28911:function(e,t){"use strict";t.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"> <path d="M3 8h5V3M8 8 3 3m13 0v5h5m-5 0 5-5M3 16h5v5m0-5-5 5m13 0v-5h5m-5 0 5 5"/> </g> </svg> '},78524:function(e,t,i){"use strict";i(6441).Config.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8","cmd+shift+8"],selectall:["ctrl+a","cmd+a"]}},42263:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(21537),s=i(50911);i(78524);class a extends s.Plugin{afterInit(e){(0,r.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let i=e.o.commandToHotkeys[t];i&&((0,r.isArray)(i)||(0,r.isString)(i))&&e.registerHotkeyToCommand(i,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===o.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",i=>{let o=this.onKeyPress(i),n={shouldStop:!0};if(!1===this.j.e.fire(o+".hotkey",i.type,n))if(n.shouldStop)return t=!0,e.e.stopPropagation("keydown"),!1;else i.preventDefault()},{top:!0}).on("keyup.hotkeys",()=>{if(t)return t=!1,e.e.stopPropagation("keyup"),!1},{top:!0})}beforeDestruct(e){e.events&&e.e.off(".hotkeys")}constructor(){super(...arguments),this.onKeyPress=e=>{let t=this.specialKeys[e.which],i=(e.key||String.fromCharCode(e.which)).toLowerCase(),o=[t||i];return["alt","ctrl","shift","meta"].forEach(i=>{e[i+"Key"]&&t!==i&&o.push(i)}),(0,r.normalizeKeyAliases)(o.join("+"))},this.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}}}n.pluginSystem.add("hotkeys",a)},16233:function(e,t,i){"use strict";var o=i(22732),n=i(580),r=i(12153),s=i(6441),a=i(72337);r.Icon.set("hr",a.default),s.Config.prototype.controls.hr={command:"insertHorizontalRule",tooltip:"Insert Horizontal Line"},n.pluginSystem.add("hr",function(e){e.registerButton({name:"hr",group:"insert"}),e.registerCommand("insertHorizontalRule",()=>{var t;let i=e.createInside.element("hr");e.s.insertNode(i,!1,!1);let n=o.Dom.closest(i.parentElement,o.Dom.isBlock,e.editor);n&&o.Dom.isEmpty(n)&&n!==e.editor&&!(null==(t=e.o.dtd)?void 0:t.blockLimits[n.nodeName.toLowerCase()])&&(o.Dom.after(n,i),o.Dom.safeRemove(n));let r=o.Dom.findNotEmptySibling(i,!1);if(o.Dom.isBlock(r))return e.s.setCursorIn(r,!0),!1;if(r||i.parentNode!==e.editor&&!o.Dom.isBlock(o.Dom.findNotEmptySibling(i,!0)))return e.s.setCursorAfter(i),!1;let s=e.createInside.element(e.o.enter);return o.Dom.isTag(s,"br")||o.Dom.append(s,e.createInside.element("br")),o.Dom.after(i,s),e.s.setCursorIn(s),!1})})},72337:function(e,t){"use strict";t.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"> <path d="M4 12h16"/> </g> </svg> '},50963:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.iframeBaseUrl="",o.Config.prototype.iframeTitle="Jodit Editor",o.Config.prototype.iframeDoctype="<!DOCTYPE html>",o.Config.prototype.iframeDefaultSrc="about:blank",o.Config.prototype.iframeStyle="html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}table{width:100%;border:none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}p{margin-top:0;}.jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}",o.Config.prototype.iframeCSSLinks=[],o.Config.prototype.iframeSandbox=null},77469:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537),a=i(76241);i(50963),r.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,i)=>{let o=e||i.iframe.contentWindow.document;if(o.open(),o.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${(0,s.defaultLanguage)(t.language)}">`+"<head>"+`<title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),o.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=o.createElement("link");(0,s.attr)(t,"rel","stylesheet"),(0,s.attr)(t,"href",e),o.head&&n.Dom.append(o.head,t),i.e.on(t,"load",()=>i.e.fire("resize"))}),t.iframeStyle){let e=o.createElement("style");e.innerHTML=t.iframeStyle,o.head&&n.Dom.append(o.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let i=e.c.element("iframe");(0,s.css)(i,"display","block"),i.src="about:blank",i.className="jodit-wysiwyg_iframe",(0,s.attr)(i,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,s.attr)(i,"sandbox",t.iframeSandbox),n.Dom.append(e.workplace,i),e.iframe=i;let r=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,s.callPromise)(r,()=>{if(!e.iframe)return!1;let i=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let r=t.editHTMLDocumentMode,l=()=>{(0,s.attr)(i.body,"contenteditable",e.getMode()!==o.MODE_SOURCE&&!e.getReadOnly()||null)},c=(e,t)=>{for(;t>0&&/\s/.test(e.charAt(t-1));)t-=1;return t},d=e=>{e=(0,a.removeBetween)(e,"<style",">","</style>","jodit-box");let t=(0,a.indexOfOpenTag)(e,"body"),i=-1;for(let o=(0,a.indexOfClosingTag)(e,"body",t+1);-1!==o;o=(0,a.indexOfClosingTag)(e,"body",o+1))i=o;if(-1!==t&&-1!==i){let o=i+7,n=e.indexOf(">",t),r=e.slice(t,o);for(let s of(-1!==n&&n<i&&(r=(e=>{e=e.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i,"");let t=(t,i)=>{for(;i.test(e.charAt(t));)t+=1;return t},i=e.indexOf("contenteditable");for(;-1!==i;){let o=t(i+15,/["'\s]/);if("="===e.charAt(o)&&(o=t(o+1,/[\s"']/),e.startsWith("true",o))){o=t(o+4,/["']/);let n=i;return/["']/.test(e.charAt(n-1))&&(n-=1),n=c(e,n),e.slice(0,n)+e.slice(o)}i=e.indexOf("contenteditable",i+1)}return e})(e.slice(t,n))+e.slice(n,o)),["style","script","span"]))r=(0,a.removeBetween)(r,"<"+s,">","</"+s+">","jodit");let s=e=>(0,a.removeBetween)((0,a.removeBetween)(e,"<span",">","</span>"),"&lt;span","&gt;","&lt;/span&gt;");e=(s(e.slice(0,t))+r+s(e.slice(o))).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,"$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim,"$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,"$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim,"$1")}return e};if(r){let t=e.element.tagName;if("TEXTAREA"!==t&&"INPUT"!==t)throw(0,s.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on("beforeGetNativeEditorValue",()=>d(e.o.iframeDoctype+i.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(d(i.documentElement.outerHTML)!==d(t)){var o;let r,a;o=d(t),r=new DOMParser().parseFromString(o,"text/html"),e.e.fire("safeHTML",r.documentElement),a=(0,s.$$)("style.jodit-box",i.head),i.replaceChild(i.adoptNode(r.documentElement),i.documentElement),a.forEach(e=>n.Dom.append(i.head,e)),e.editor=i.body,l(),e.e.fire("prepareWYSIWYGEditor"),e.e.stopPropagation("beforeSetNativeEditorValue")}return!0}return!1},{top:!0})}if(e.editor=i.body,e.e.on("afterSetMode afterInit afterAddPlace",l),"auto"===t.height){i.documentElement&&(0,s.css)(i.documentElement,"overflowY","hidden");let o=e.async.throttle((...i)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&"auto"===t.height){let t=e.ew.getComputedStyle(e.editor),i=parseInt(t.marginTop||"0",10)+parseInt(t.marginBottom||"0",10);(0,s.css)(e.iframe,"height",e.editor.offsetHeight+i)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",o).on([e.iframe,e.ew,i.documentElement],"load",o).on(i,"readystatechange DOMContentLoaded",o),"function"==typeof ResizeObserver){let t=new ResizeObserver(o);t.observe(i.body),e.e.on("beforeDestruct",()=>{t.disconnect()})}}return i.documentElement&&e.e.on(i.documentElement,"mousedown touchend",()=>{e.s.isFocused()||(e.s.focus(),e.editor===i.body&&e.s.setCursorIn(i.body))}).on(e.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",t=>{var i;null==(i=e.events)||i.fire(e.ow,t)}),!1})})})},43687:function(e,t,i){"use strict";i(6441).Config.prototype.imageCaption={wrapper:{tag:"figure",className:""},inner:null,caption:{tag:"figcaption",className:""}}},84571:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(41180),c=i(20356),d=i(45124);i(43687);var u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let h=["margin-top","margin-right","margin-bottom","margin-left"],p=new Set([o.KEY_UP,o.KEY_DOWN,o.KEY_LEFT,o.KEY_RIGHT]),m=/^(P|H[1-6]|PRE)$/i,f=new Set(["formatblock","insertorderedlist","insertunorderedlist"]),g="data-jodit-placeholder",b=`:where(.jodit-wysiwyg [contenteditable=false] [contenteditable=true]:focus){outline:1px solid var(--jd-color-border-selected,#1e88e5)}:where(.jodit-wysiwyg [${g}]){position:relative}:where(.jodit-wysiwyg [${g}])::before{position:absolute;top:0;right:0;left:0;padding:inherit;color:var(--jd-color-placeholder,#a5a5a5);content:attr(${g});pointer-events:none}`;class v extends c.Plugin{afterInit(e){(0,s.getContainer)(e,"imageCaption","style",!0).textContent=b,e.e.on("beforeCommandSelectall",this.__onSelectAll,{top:!0}),this.onChangePlace()}onToggleImageCaption(e,t){let i=(0,a.getCaptionWrapper)(this.j,e);if(i&&!0!==t){let t=this.__freshCaption(i);return t?this.__unrecorded(()=>this.__restore(t)):this.__uncaption(i,e),null}if(!i&&!1!==t)return this.__caption(e)}__freshCaption(e){let t=this.__fresh;return t&&t.wrapper===e&&e.parentNode===t.parent&&e.previousSibling===t.previous&&e.nextSibling===t.next&&y(e,t.image)===t.shape&&(0,a.getImageCaption)(this.j,e)===t.caption&&r.Dom.isEmpty(t.caption)?t:null}__caption(e){let t,{j:i}=this,{snapshot:o}=i.history;i.setEditorValue(),i.e.fire("internalUpdate");let n=o.make();return o.transaction(()=>{t=this.__fresh={...this.__wrap(e),before:n},i.setEditorValue()}),i.e.fire("updateToolbar"),t.caption}__unrecorded(e){let{j:t}=this;t.setEditorValue(),this.__fresh=null,t.history.snapshot.transaction(()=>{e(),t.setEditorValue()}),t.e.fire("internalUpdate"),t.e.fire("updateToolbar")}__wrap(e){var t,i;let{j:o}=this,{wrapper:n,inner:s,caption:c}=o.o.imageCaption,d=r.Dom.closest(e,"a",o.editor),u=!d||(null==(t=d.textContent)?void 0:t.trim())||1!==d.getElementsByTagName("img").length?e:d,h=[(0,a.attr)(e,"style"),(0,a.attr)(e,"class")],p=u.parentNode,m=(0,l.cssInline)(e,"width")||((i=(0,a.attr)(e,"width"))?(0,a.isNumeric)(i)?`${i}px`:i:"")||(e.offsetWidth?`${e.offsetWidth}px`:""),f=(0,a.getAlignClasses)(o,e),g=(0,a.getHAlign)(e,f);(0,a.clearHAlign)(e,f);let b=this.__create(n),v=s?this.__create(s):b,_=this.__create(c);_.appendChild(o.createInside.element("br"));let k=this.__insert(b,u);return v!==b&&r.Dom.append(b,v),r.Dom.append(v,[u,_]),w(e,b),m&&((0,a.css)(b,"width",m),(0,a.css)(e,"width","100%")),(0,a.hAlignElement)(b,g,(0,a.getAlignClasses)(o,b)),this.__mark(b),{caption:_,wrapper:b,image:e,target:u,place:p,split:k,attributes:h,parent:b.parentNode,previous:b.previousSibling,next:b.nextSibling,shape:y(b,e)}}__restore(e){var t,i;let{wrapper:o,image:n,target:s,place:l,split:c,attributes:d}=e;if(c)if(c.head||c.tail){let{sel:e}=this.j.s,o=(null==e?void 0:e.rangeCount)?e.getRangeAt(0).startContainer:null,{head:n,tail:l}=c;if(n&&!(l&&o&&r.Dom.isOrContains(l,o)))r.Dom.append(n,[s,...(0,a.toArray)(null!=(t=null==l?void 0:l.childNodes)?t:[])]),r.Dom.safeRemove(l);else if(l){let e=l.firstChild;[...(0,a.toArray)(null!=(i=null==n?void 0:n.childNodes)?i:[]),s].forEach(t=>l.insertBefore(t,e)),r.Dom.safeRemove(n)}}else r.Dom.append(l,s),r.Dom.before(o,c.block);else r.Dom.before(o,s);r.Dom.safeRemove(o),(0,a.attr)(n,{style:d[0],class:d[1]})}__uncaption(e,t){var i;let{j:n}=this,s=(0,a.getHAlign)(e,(0,a.getAlignClasses)(n,e)),c=(0,l.cssInline)(e,"width");r.Dom.safeRemove((0,a.getImageCaption)(n,e));let d=null!=(i=r.Dom.closest(t,"a",e))?i:t;if(w(e,t),c&&(0,a.css)(t,"width",c),(0,a.hAlignElement)(t,s,(0,a.getAlignClasses)(n,t)),r.Dom.isBlock(e)&&e.parentNode===n.editor&&n.o.enter.toLowerCase()!==o.BR){let t=n.createInside.element(n.o.enter);r.Dom.before(e,t),r.Dom.append(t,d)}else r.Dom.before(e,d);r.Dom.safeRemove(e)}__create({tag:e,className:t}){return this.j.createInside.element(e,t?{class:t}:{})}__insert(e,t){let{j:i}=this,o=r.Dom.isBlock(e)?r.Dom.closest(t,r.Dom.isBlock,i.editor):null;if(!o||!m.test(o.nodeName))return r.Dom.before(t,e),null;let n=i.ed.createRange();n.setStartBefore(o),n.setEndBefore(t);let s=n.extractContents();n.setStartAfter(t),n.setEndAfter(o);let[l,c]=[s,n.extractContents()].map((e,t)=>{let i=e.firstChild;return!i||r.Dom.isEmpty(i)?null:((0,a.call)(t?r.Dom.after:r.Dom.before,o,i),i)});return r.Dom.before(o,e),r.Dom.safeRemove(o),{block:o,head:l,tail:c}}__mark(e){(0,a.attr)(e,"contenteditable",!1);let t=(0,a.getImageCaption)(this.j,e);t&&((0,a.attr)(t,"contenteditable",!0),this.__placeholder(t))}__placeholder(e){let t=r.Dom.isEmpty(e)?this.j.i18n("Caption"):null;(0,a.attr)(e,g)!==t&&(0,a.attr)(e,g,t)}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===o.MODE_SOURCE||(0,a.toArray)(e.editor.getElementsByTagName(e.o.imageCaption.wrapper.tag)).forEach(t=>{r.Dom.isHTMLElement(t)&&(0,a.getCaptionedImage)(e,t)&&this.__mark(t)})}onInput(){let e=this.__caretCaption();e&&this.__placeholder(e)}onAfterGetValueFromEditor(e){if(!e.value.includes("contenteditable"))return;let{j:t}=this,i=t.c.element("template");i.innerHTML=e.value;let o=e=>(0,a.toArray)(e.querySelectorAll(t.o.imageCaption.wrapper.tag)).filter(e=>(0,a.getCaptionedImage)(t,e)),n=o(i.content),s=this.__fresh&&this.__freshCaption(this.__fresh.wrapper),l=s&&n[o(t.editor).indexOf(s.wrapper)],c=s&&l&&function(e,t,i){var o;let n=(0,a.getCaptionedImage)(e,i),{split:s}=t;if(!n)return null;let l={wrapper:i,image:n,target:null!=(o=r.Dom.closest(n,"a",i))?o:n,place:t.place,split:null,attributes:t.attributes};if(s){let e=s.head?i.previousSibling:null,o=s.tail?i.nextSibling:null;if(s.head&&!r.Dom.isHTMLElement(e)||s.tail&&!r.Dom.isHTMLElement(o))return null;let n=s.block.cloneNode(!0);l.split={block:n,head:e,tail:o},l.place=function(e,t,i){let o=[];for(let i=t;i!==e&&i.parentNode;i=i.parentNode)o.unshift((0,a.toArray)(i.parentNode.childNodes).indexOf(i));return o.reduce((e,t)=>e.childNodes[t],i)}(s.block,t.place,n)}return l}(t,s,l),d=!1;c&&(this.__restore(c),d=!0),n.forEach(e=>{[e,(0,a.getImageCaption)(t,e)].forEach(e=>["contenteditable",g].forEach(t=>{(null==e?void 0:e.hasAttribute(t))&&(e.removeAttribute(t),d=!0)}))}),d&&(e.value=i.innerHTML)}onChangePlace(){let{j:e}=this;e.e.off([e.editor,e.ow,e.ew],".imageCaption").on(e.editor,"focusout.imageCaption",this.__onFocusOut,{capture:!0}).on(e.editor,"mousedown.imageCaption",this.__onMouseDown,{capture:!0}).on([e.ow,e.ew],"mouseup.imageCaption",this.__onMouseUp)}__onMouseDown(e){this.__press=e.target}__onFocusOut(e){let t=e.target;(0,a.getImageCaption)(this.j,(0,a.getCaptionWrapper)(this.j,t))===t&&(this.__press?this.__afterPress.push(t):this.__dropBlank(t,null))}__onMouseUp(){let e=this.__press;this.__press=null,this.__afterPress.splice(0).forEach(t=>this.__dropBlank(t,e))}__dropBlank(e,t){this.j.async.setTimeout(()=>{let{j:i}=this,o=(0,a.getCaptionWrapper)(i,e),n=(0,a.getCaptionedImage)(i,o);if(!o||!n||!r.Dom.isEmpty(e)||this.__keepsFocus(e))return;let s=!!(t&&r.Dom.isOrContains(o,t)),l=this.__freshCaption(o);this.__unrecorded(()=>l?this.__restore(l):this.__uncaption(o,n)),s&&i.e.fire("recalcPositionPopup")},1)}__keepsFocus(e){let{j:t}=this,i=e.ownerDocument;if(i.activeElement===e&&(i.hasFocus()||!t.od.hasFocus()))return!0;let o=t.od.activeElement;return!!(o&&o!==t.iframe&&!r.Dom.isOrContains(t.editor,o)&&(r.Dom.isOrContains(t.container,o)||r.Dom.closest(o,e=>r.Dom.isElement(e)&&(0,a.attr)(e,"data-editor_id")===t.id,t.od.body)))}__caretCaption(){let{s:e}=this.j;if(!e.isInsideArea)return null;let t=e.range.startContainer,i=(0,a.getImageCaption)(this.j,(0,a.getCaptionWrapper)(this.j,t));return i&&r.Dom.isOrContains(i,t)?i:null}onBeforeEnter(e){let t=(null==e?void 0:e.shiftKey)?null:this.__caretCaption(),i=(0,a.getCaptionWrapper)(this.j,t);if(!i)return;let{j:o}=this;if(this.__focusEditor(),!r.Dom.isBlock(i))return void o.s.setCursorAfter(i);let n=this.__line();return r.Dom.after(i,n),o.s.setCursorIn(n),o.synchronizeValues(),!1}__focusEditor(){this.j.editor.focus({preventScroll:!0})}__line(){let{j:e}=this,t=e.createInside.element(e.o.enter);return r.Dom.isTag(t,"br")||r.Dom.append(t,e.createInside.element("br")),t}onBeforeInsertNode(e){let t=(0,a.getCaptionWrapper)(this.j,this.__caretCaption());if(!t||!((r.Dom.isElement(e)||r.Dom.isFragment(e))&&[e,...(0,a.toArray)(e.querySelectorAll("*"))].some(e=>r.Dom.isElement(e)&&(r.Dom.isBlock(e)||o.NO_EMPTY_TAGS.has(e.nodeName.toLowerCase())))))return;let{j:i}=this;if(this.__focusEditor(),!r.Dom.isBlock(t))return void i.s.setCursorAfter(t);let n=this.__line();r.Dom.after(t,n),i.s.setCursorIn(n)}onBeforeCommandDelete(){let e=this.__selectedWrapper();if(!e||!r.Dom.isBlock(e))return;let t=this.__line();return r.Dom.before(e,t),r.Dom.safeRemove(e),this.j.s.setCursorIn(t),!1}__selectedWrapper(){let{s:e}=this.j;if(!e.isInsideArea||e.isCollapsed())return null;let{startContainer:t,startOffset:i,endContainer:o,endOffset:n}=e.range,r=t.childNodes[i];return t===o&&n===i+1&&(0,a.getCaptionedImage)(this.j,r)?r:null}onKeyDown(e){var t;if(this.__arrow=null,(null==(t=e.key)?void 0:t.length)===1&&!e.ctrlKey&&!e.metaKey&&this.__selectedWrapper())return void this.j.execCommand("Delete");if(!p.has(e.key)||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||!this.j.s.isCollapsed())return;let i=this.__caretCaption();i&&(this.__arrow={key:e.key,range:this.j.s.range.cloneRange(),caption:i})}onKeyUp(e){let t=this.__arrow;if(this.__arrow=null,!t||e.key!==t.key||(0,d.isMoved)(this.j,t.range))return;let i=(0,a.getCaptionWrapper)(this.j,t.caption);if(!i)return;let n=t.key===o.KEY_DOWN||t.key===o.KEY_RIGHT,{s}=this.j;if(this.__focusEditor(),!r.Dom.isBlock(i))return void(n?s.setCursorAfter(i):s.setCursorBefore(i));let l=r.Dom.findNotEmptySibling(i,!n);if(r.Dom.isHTMLElement(l))return void s.setCursorIn(l,n);if(r.Dom.isText(l))return void(n?s.setCursorBefore(l):s.setCursorAfter(l));let c=this.__line();(0,a.call)(n?r.Dom.after:r.Dom.before,i,c),s.setCursorIn(c),this.j.synchronizeValues()}onBeforeCommand(e){let t=e.toLowerCase();if(f.has(t)&&this.__caretCaption())return!1;let i="undo"===t&&this.__fresh?this.__freshCaption(this.__fresh.wrapper):null;if(i)return this.__unrecorded(()=>{this.__restore(i),this.j.history.snapshot.restore(i.before)}),!1}__onSelectAll(){let e=this.__caretCaption();if(e)return this.j.e.stopPropagation("beforeCommandSelectall"),this.j.s.select(e,!0),!1}beforeDestruct(e){e.e.off("beforeCommandSelectall",this.__onSelectAll).off([e.editor,e.ow,e.ew],".imageCaption")}constructor(){super(...arguments),this.__fresh=null,this.__press=null,this.__afterPress=[],this.__arrow=null}}function y(e,t){return[e,t].flatMap(e=>[(0,a.attr)(e,"style"),(0,a.attr)(e,"class")]).join("|")}function w(e,t){var i;h.forEach(i=>{let o=(0,l.cssInline)(e,i);o&&((0,a.css)(t,i,o),(0,a.css)(e,i,""))}),(null==(i=(0,a.attr)(e,"style"))?void 0:i.trim())||(0,a.attr)(e,"style",null)}u([(0,n.watch)(":toggleImageCaption")],v.prototype,"onToggleImageCaption",null),u([(0,n.watch)([":change",":afterInit",":afterSetMode",":changePlace"]),(0,n.debounce)()],v.prototype,"onChange",null),u([(0,n.watch)([":input",":keyup",":afterPaste"])],v.prototype,"onInput",null),u([(0,n.watch)(":afterGetValueFromEditor")],v.prototype,"onAfterGetValueFromEditor",null),u([(0,n.watch)(":changePlace")],v.prototype,"onChangePlace",null),u([n.autobind],v.prototype,"__onMouseDown",null),u([n.autobind],v.prototype,"__onFocusOut",null),u([n.autobind],v.prototype,"__onMouseUp",null),u([(0,n.watch)(":beforeEnter")],v.prototype,"onBeforeEnter",null),u([(0,n.watch)(":beforeInsertNode")],v.prototype,"onBeforeInsertNode",null),u([(0,n.watch)(":beforeCommandDelete")],v.prototype,"onBeforeCommandDelete",null),u([(0,n.watch)(":keydown")],v.prototype,"onKeyDown",null),u([(0,n.watch)(":keyup")],v.prototype,"onKeyUp",null),u([(0,n.watch)(":beforeCommand")],v.prototype,"onBeforeCommand",null),u([n.autobind],v.prototype,"__onSelectAll",null),s.pluginSystem.add("imageCaption",v)},85745:function(e,t,i){"use strict";i(6441).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},80763:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(74569);i(85745);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="__jodit_imageprocessor_binded",h=u+"blob-id",p="jodit-wysiwyg_image-selected",m=new Set(["img","jodit","jodit-media"]);class f extends l.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange),(0,s.getContainer)(e,"image-processor","style",!0).textContent=`.jodit-wysiwyg.${p}::selection,.jodit-wysiwyg.${p} *:not(img)::selection{background:transparent}`}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(p);let t=(0,n.cached)(e,"buffer"),i=null==t?void 0:t.get(h);if(t&&i){for(let e of Object.keys(i))URL.revokeObjectURL(e);t.delete(h)}}onAfterGetValueFromEditor(e,t){if(t!==o.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let i=t.buffer.get(h);if(i)for(let t of Object.keys(i))for(;e.value.includes(t);)e.value=e.value.replace(t,i[t])}onSelectionChange(){let{jodit:e}=this;e.editor.classList.toggle(p,function(e){var t;let{sel:i}=e.s;if(!i||!i.rangeCount)return!1;let{startContainer:o,startOffset:n,endContainer:s,endOffset:l}=i.getRangeAt(0),c=o.childNodes[n];return o===s&&l===n+1&&(r.Dom.isTag(c,m)||!!(null!=(t=(0,a.getWrappedMedia)(e,c))?t:(0,a.getCaptionedImage)(e,c)))&&r.Dom.isOrContains(e.editor,o)}(e))}async afterChange(e){let{jodit:t}=this;t.editor&&(0,a.$$)("img",t.editor).forEach(e=>{(0,a.dataBind)(e,u)||((0,a.dataBind)(e,u,!0),e.complete||t.e.on(e,"load",function i(){var o;t.isInDestruct||null==(o=t.e)||o.fire("resize"),t.e.off(e,"load",i)}),e.src&&/^data:/.test(e.src)&&function(e,t){let i;if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||"u"<typeof ArrayBuffer||"u"<typeof URL)return;let o=t.src;try{i=(0,c.dataURItoBlob)(o)}catch(e){return}t.src=URL.createObjectURL(i),e.e.fire("internalUpdate");let{buffer:n}=e,r=n.get(h)||{};r[t.src]=o,e.buffer.set(h,r)}(t,e),t.e.on(e,"mousedown touchstart",()=>{var i;(function(e){var t;for(let i of["previousSibling","nextSibling"]){let n=e[i];for(;r.Dom.isText(n)&&!(null==(t=n.nodeValue)?void 0:t.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""));){let e=n[i];r.Dom.safeRemove(n),n=e}}})(e),t.s.select(null!=(i=(0,a.getCaptionWrapper)(t,e))?i:e)}))})}}d([(0,n.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),d([(0,n.watch)(":beforeSetElementValue")],f.prototype,"onBeforeSetElementValue",null),d([n.autobind],f.prototype,"onSelectionChange",null),d([(0,n.watch)([":change",":afterInit",":changePlace"]),(0,n.debounce)()],f.prototype,"afterChange",null),s.pluginSystem.add("imageProcessor",f)},97536:function(e,t,i){"use strict";i(6441).Config.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,showCaptionCheckbox:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,availableClasses:[],editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0}},3215:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(580),s=i(21537),a=i(20356),l=i(62843);i(97536);var c=i(59436),d=i(53636),u=i(10263),h=i(94575),p=i(34755),m=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class f extends a.Plugin{get form(){return new c.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,d.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,u.openImagePopup)(this.j,this.dialog,this.state,e)})}get dialog(){let{j:e}=this,t=e.dlg({minWidth:Math.min(400,screen.width),minHeight:590,buttons:["fullsize","dialog.close"]}),i=this.__buttons;return i.check.onAction(()=>{(0,p.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),i.remove.onAction(()=>{var i;let{sourceImage:o}=this.state,n=null!=(i=(0,s.getCaptionWrapper)(e,o))?i:o,r=e.s.createRange();r.setStartBefore(n),r.collapse(!0),e.s.removeNode(n),t.close(),e.s.selectRange(r)}),i.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[i.cancel,i.remove],i.check]),t.e.on(t,"afterClose",()=>{let{sourceImage:t}=this.state;if(e.isInDestruct||!n.Dom.isOrContains(e.editor,t))return;let i=(0,s.getCaptionWrapper)(e,t),o=(0,s.getImageCaption)(e,i);if(o&&n.Dom.isEmpty(o))return void e.s.setCursorIn(o);let r=null!=i?i:t;if(e.o.image.selectImageAfterClose)return void e.s.select(r);let a=e.s.createRange();a.setStartAfter(r),a.collapse(!0),e.s.selectRange(a)}),t.setSize(e.o.image.dialogWidth),(0,s.markOwner)(e,t.container),t}get __buttons(){let{j:e}=this;return{check:(0,l.Button)(e,"ok","Apply","primary"),remove:(0,l.Button)(e,"bin","Delete"),cancel:(0,l.Button)(e,"cancel","Cancel")}}open(){return this.activeTabState.activeTab="Image",this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.__focusFirstField(),this.async.promise((e,t)=>(0,h.readValuesFromImage)(this.j,this.state).then(e,t)).catch(e=>{(0,s.isAbortError)(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__focusFirstField(){var e;let t=e=>(0,s.toArray)(e.querySelectorAll("input, select, textarea"));null==(e=t(this.form.getElm("tabsBox")).concat(t(this.form.container)).find(e=>null!=e.offsetParent))||e.focus()}__lock(){this.dialog.lock(),this.form.setMod("lock",!0),Object.values(this.__buttons).forEach(e=>e.state.disabled=!0)}__unlock(){this.dialog.unlock(),this.form.setMod("lock",!1),Object.values(this.__buttons).forEach(e=>e.state.disabled=!1)}afterInit(e){let t=this;e.e.on("afterConstructor changePlace",()=>{e.e.off(e.editor,".imageproperties").on(e.editor,"dblclick.imageproperties",i=>{let o=i.target;if(n.Dom.isTag(o,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",o))return;t.state.sourceImage=o,t.state.image=o.cloneNode(!0),e.o.readonly||(i.stopImmediatePropagation(),i.preventDefault(),t.open())}else i.stopImmediatePropagation(),e.s.select(o)})}).on("openImageProperties.imageproperties",e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}async onStateValuesImageSrcChange(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{await e.decode()}catch(e){}if(this.state.sizeIsLocked&&(0,s.isNumeric)(t.imageWidth)){let e=parseFloat(t.imageWidth.toString());t.imageHeight=Math.round(e/this.state.ratio)}this.j.e.fire("updateImageProperties.imageproperties",e)}catch(e){this.j.alert(e.message)}finally{this.__unlock()}}beforeDestruct(e){var t,i,n;Object.values(null!=(t=(0,o.cached)(this,"__buttons"))?t:{}).forEach(e=>e.destruct()),null==(i=(0,o.cached)(this,"dialog"))||i.destruct(),null==(n=(0,o.cached)(this,"form"))||n.destruct(),e.e.off(e.editor,".imageproperties").off(".imageproperties")}constructor(){super(...arguments),this.state={image:new Image,sourceImage:new Image,get ratio(){let{naturalWidth:e,naturalHeight:t}=this.image;return e/t||1},sizeIsLocked:!0,marginIsLocked:!0,values:{style:"",imageSrc:"",borderRadius:0,imageTitle:"",imageAlt:"",imageCaption:!1,imageLink:"",imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:"",id:"",align:""}},this.activeTabState={activeTab:"Image"}}}m([o.cache],f.prototype,"form",null),m([o.cache],f.prototype,"dialog",null),m([o.cache],f.prototype,"__buttons",null),m([(0,o.watch)("state.image")],f.prototype,"onStateValuesImageSrcChange",null),r.pluginSystem.add("imageProperties",f)},51642:function(e,t,i){"use strict";i.d(t,{readAlign:function(){return n}});var o=i(25726);function n(e,t,i){let n=(0,o.getHAlign)(e,i);t.align="normal"===n?"":n}},94575:function(e,t,i){"use strict";i.d(t,{readValuesFromImage:function(){return u}});var o=i(25726),n=i(29960),r=i(41180),s=i(68645),a=i(51642),l=i(75595),c=i(47749),d=i(32566);async function u(e,t){let{sourceImage:i,values:u}=t,h=(0,s.getCaptionWrapper)(e,i),p=null!=h?h:i;return u.imageCaption=!!h,(0,a.readAlign)(p,u,(0,o.getAlignClasses)(e,p)),u.borderRadius=parseInt((0,r.cssInline)(i,"border-radius")||"0",10)||0,u.id=(0,n.attr)(i,"id")||"",u.imageTitle=(0,n.attr)(i,"title")||"",u.imageAlt=(0,n.attr)(i,"alt")||"",u.style=(0,n.attr)(i,"style")||"",u.classes=((0,n.attr)(i,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,c.readMargins)(p,u,t),(0,l.readLink)(t,e,u),u.imageSrc=(0,n.attr)(i,"src")||"",(0,d.readSizes)(i,u,t,h)}},75595:function(e,t,i){"use strict";i.d(t,{readLink:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=o.Dom.closest(e.sourceImage,"a",t.editor);r?(i.imageLink=(0,n.attr)(r,"href")||"",i.imageLinkOpenInNewTab="_blank"===(0,n.attr)(r,"target")):(i.imageLink="",i.imageLinkOpenInNewTab=!1)}},47749:function(e,t,i){"use strict";i.d(t,{readMargins:function(){return n}});var o=i(12475);function n(e,t,i){let n=!0,r=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(i=>{let s=e.style.getPropertyValue((0,o.kebabCase)(i));if(!s){r=!0,t[i]=0;return}/^[0-9]+(px)?$/.test(s)&&(s=parseInt(s,10)),t[i]=s,(r&&t[i]||n&&"marginTop"!==i&&t[i]!==t.marginTop)&&(n=!1)}),i.marginIsLocked=n}},32566:function(e,t,i){"use strict";i.d(t,{readSizes:function(){return a}});var o=i(29807),n=i(29960),r=i(41180),s=i(14415);async function a(e,t,i,a){try{await e.decode()}catch(e){}let l=(0,r.css)(null!=a?a:e,"width",!0)||(0,n.attr)(e,"width")||!1,c=(0,r.css)(e,"height",!0)||(0,n.attr)(e,"height")||!1;t.imageWidth=!1!==l?(0,s.normalSizeFromString)(l):e.offsetWidth||e.naturalWidth,(0,o.isNumeric)(t.imageWidth)?t.imageHeight=!1!==c?(0,s.normalSizeFromString)(c):e.offsetHeight||e.naturalHeight:t.imageHeight=c||"";let{imageWidth:d,imageHeight:u}=t,h=parseFloat(d.toString());if(!(0,o.isNumeric)(d)||!(0,o.isNumeric)(u)){i.sizeIsLocked=!1;return}if(!1===c){t.imageHeight=Math.round(h/i.ratio),i.sizeIsLocked=!0;return}i.sizeIsLocked=1>Math.abs(h-parseFloat(u.toString())*i.ratio)}},59436:function(e,t,i){"use strict";i.d(t,{UIImagePropertiesForm:function(){return p}});var o=i(65478),n=i(87325),r=i(2748),s=i(21537),a=i(62405),l=i(12153),c=i(92762),d=i(35105),u=i(29827),h=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let p=class e extends a.UIGroup{className(){return"UIImagePropertiesForm"}appendChildToContainer(){}getElm(e){let t=super.getElm(e);if(t)return t;for(let t of this.elements){let i=t.getElm(e);if(i)return i}return null}render(){return`<form>
145
145
  <div class="jodit-grid jodit-grid_xs-column">
146
146
  <div class="jodit_col-lg-2-5 jodit_col-xs-5-5">
147
147
  <div class="&__view-box">
@@ -231,7 +231,7 @@
231
231
  `,"paragraph","link","align","dots"]}},61122:function(e,t,i){"use strict";var o=i(29960);t.default=[{name:"eye",tooltip:"Open link",exec(e,t){let i=(0,o.attr)(t,"href");t&&i&&/^(https?:|mailto:|tel:)/i.test(i.trim())&&!/^(javascript:|data:|vbscript:)/i.test(i.trim())&&e.ow.open(i)}},{name:"link",tooltip:"Edit link",icon:"pencil"},"unlink","brush","file"]},62e3:function(e,t,i){"use strict";var o=i(2748),n=i(27613),r=i(41180);let s=e=>e.args&&(0,n.isString)(e.args[0])?e.args[0].toLowerCase():"";t.default=["brushCell",{name:"valign",list:["Top","Middle","Bottom","Normal"],childTemplate:(e,t,i)=>i,exec(e,t,{control:i}){let o=s(i);e.getInstance("Table",e.o).getAllSelectedCells().forEach(e=>{(0,r.css)(e,"vertical-align","normal"===o?"":o)})},tooltip:"Vertical align"},{name:"splitv",list:{tablesplitv:"Split vertical",tablesplitg:"Split horizontal"},tooltip:"Split"},{name:"align",icon:"left"},`
232
232
  `,{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec(e,t,{control:i}){if(!(0,n.isJoditObject)(e))return;if(!i.args)return!1;let o=s(i);e.execCommand(o,!1,t)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec(e,t,{control:i}){if(!(0,n.isJoditObject)(e))return;if(!i.args)return!1;let o=s(i);e.execCommand(o,!1,t)},tooltip:"Add row"},{name:"headerrow",exec(e,t){(0,n.isJoditObject)(e)&&o.Dom.isTag(t,"table")&&e.execCommand("tableheaderrow",!1,t)},isActive:(e,t)=>o.Dom.isTag(t.target,"table")&&e.getInstance("Table",e.o).hasHeaderRow(t.target),isDisabled:(e,t)=>!o.Dom.isTag(t.target,"table")||!e.getInstance("Table",e.o).canToggleHeaderRow(t.target),tooltip:"Header row"},{name:"deleteTable",icon:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec(e,t,{control:i}){if(!(0,n.isJoditObject)(e))return;if(!i.args)return!1;let o=s(i);e.execCommand(o,!1,t),e.e.fire("hidePopup")},tooltip:"Delete"}]},66789:function(e,t,i){"use strict";var o=i(20882);t.default=[{name:"replace",icon:"video",tooltip:"Replace",popup:(e,t,i)=>t?e.e.fire("generateReplaceVideoTabs",t,i):void 0},{name:"bin",tooltip:"Delete",exec(e,t){t&&e.s.removeNode(t)}},{name:"pencil",tooltip:"Edit",exec(e,t){t&&e.e.fire("openVideoProperties",t)}},o.align]},20882:function(e,t,i){"use strict";var o=i(22732),n=i(70799),r=i(25726),s=i(41180),a=i(68645),l=i(61477);let c=(e,t)=>{var i;return null!=(i=(0,a.getCaptionWrapper)(e,t))?i:t},d=(e,t)=>{let i=c(e,t);return i?(0,r.getHAlign)(i,(0,r.getAlignClasses)(e,i)):"normal"},u={name:"left",childTemplate:(e,t,i)=>i,list:["Left","Right","Center","Normal"],update(e,t){let i=d(e,t.target);t.state.icon.name="normal"===i?((e,t)=>{let i=t&&o.Dom.closest(t,o.Dom.isBlock,e.editor)||e.editor,n="rtl"===(0,s.css)(i,"direction");switch((0,s.css)(i,"text-align")){case"center":case"-webkit-center":return"center";case"justify":return"justify";case"right":return"right";case"end":return n?"left":"right";case"start":return n?"right":"left";default:return"left"}})(e,t.target):i},isActive:(e,t)=>"normal"!==d(e,t.target),isChildActive(e,t){var i;let[o]=null!=(i=t.control.args)?i:[];return(0,n.isString)(o)&&d(e,t.target)===o.toLowerCase()},exec(e,t,{control:i}){if(!o.Dom.isHTMLElement(t)||!o.Dom.isTag(t,new Set(["img","jodit","jodit-media"]))&&(0,l.getMediaWrapper)(e,t)!==t)return;let s=i.args&&(0,n.isString)(i.args[0])?i.args[0].toLowerCase():"";if(!s)return!1;let a=c(e,t);if((0,r.hAlignElement)(a,s,(0,r.getAlignClasses)(e,a)),o.Dom.isTag(t,new Set(["jodit","jodit-media"]))&&t.firstElementChild){let i=t.firstElementChild;(0,r.hAlignElement)(i,s,(0,r.getAlignClasses)(e,i))}e.synchronizeValues(),e.e.fire("recalcPositionPopup")},tooltip:"Horizontal align"};t.default=[{name:"delete",icon:"bin",tooltip:"Delete",exec(e,t){var i;t&&e.s.removeNode(null!=(i=(0,a.getCaptionWrapper)(e,t))?i:t)}},{name:"pencil",exec(e,t){"img"===t.tagName.toLowerCase()&&e.e.fire("openImageProperties",t)},tooltip:"Edit"},{name:"caption",exec(e,t){if(!o.Dom.isTag(t,"img"))return;let i=e.e.fire("toggleImageCaption",t);e.synchronizeValues(),o.Dom.isHTMLElement(i)?(e.e.fire("hidePopup hideResizer"),e.s.setCursorIn(i)):e.e.fire("recalcPositionPopup")},isActive:(e,t)=>!!(0,a.getCaptionWrapper)(e,t.target),tooltip:"Caption"},{name:"valign",list:["Top","Middle","Bottom","Normal"],tooltip:"Vertical align",isDisabled(e,t){let i=t.target;return!!(i&&(["left","right"].includes((0,s.css)(i,"float"))||"block"===(0,s.css)(i,"display")||(0,a.getCaptionWrapper)(e,i)))},exec(e,t,{control:i}){if(!o.Dom.isTag(t,"img"))return;let r=i.args&&(0,n.isString)(i.args[0])?i.args[0].toLowerCase():"";if(!r)return!1;(0,s.css)(t,"vertical-align","normal"===r?"":r),e.e.fire("recalcPositionPopup")}},u],i.d(t,["align",0,u])},14306:function(e,t){"use strict";t.default=["bold","italic","|","ul","ol","eraser","|","fontsize","brush","paragraph","---","image","table",`
233
233
  `,"link","|","align","|","undo","redo","|","copyformat","fullsize","---","dots"]},24231:function(e,t){"use strict";t.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="7" height="18" rx="1"/><path d="M3 12h7M14 12h7m-3.5-3.5v7"/> </g> </svg> '},75393:function(e,t){"use strict";t.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> '},72972:function(e,t){"use strict";t.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> '},44597:function(e,t){"use strict";t.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> '},14862:function(e,t){"use strict";t.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="2.5" y="4" width="19" height="16" rx="1.5"/><path d="M12 4v2m0 12v2M3 12h6m-2.5-2.5L9 12l-2.5 2.5M21 12h-6m2.5-2.5L15 12l2.5 2.5" stroke-width="2"/> </g> </svg> '},96257:function(e,t){"use strict";t.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"/><path d="M3 12h18"/> </g> </svg> '},9914:function(e,t){"use strict";t.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"/><path d="M12 3v18"/> </g> </svg> '},33489:function(e,t){"use strict";t.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"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg> '},53696:function(e,t){"use strict";t.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="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/> </g> </svg> '},93401:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(21537),a=i(50911),l=i(45124),c=i(67510),d=i(61259),u=i(21491);i(24526);var h=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class p extends a.Plugin{get popup(){let e=new d.Popup(this.jodit,!1);return e.keepOpen=this.j.o.toolbarInlineKeepOpen,e}get toolbar(){return(0,u.makeCollection)(this.jodit,this.popup)}onClick(e){let t=this.elmsList,i=(0,s.getMediaWrapper)(this.j,e),o=null!=i?i:n.Dom.isTag(e,"img")?e:n.Dom.closest(e,t,this.j.editor),r=i?"jodit-media":null==o?void 0:o.nodeName.toLowerCase();if(o&&r&&this.canShowPopupForType(r)){let e="jodit-media"===r,t=()=>i&&(0,s.getWrappedMedia)(this.j,i)||(0,s.getCaptionWrapper)(this.j,o)||o;return this.showPopup(()=>this.__bound(t(),e),r,o),!1}}__bound(e,t){let i=(0,s.position)(e,this.j),o=this.j.o.allowResizeTags;if(!t&&!(o&&n.Dom.isTag(e,o)))return i;let r=parseInt(this.j.ow.getComputedStyle(this.j.container).getPropertyValue("--jd-resizer-handle-size"),10)/2||0;return{...i,top:i.top-r,height:i.height+2*r}}showPopup(e,t,i,o=!1){if(t=t.toLowerCase(),!this.canShowPopupForType(t))return!1;if(o||this.type!==t||i!==this.previousTarget){let e;this.previousTarget=i,this.popup.elements.slice().forEach(e=>this.popup.remove(e)),n.Dom.detach(this.popup.getElm("content"));let o=this.j.o.popup[t];if(e=(0,s.isFunction)(o)?o(this.j,i,this.popup.close):o,(0,s.isArray)(e)){let t=this.j.o.toolbarInlineDisabledButtons;this.toolbar.build(t.length?e.filter(e=>{let i=(0,s.isString)(e)?e:e.name;return!t.includes(null!=i?i:"")}):e,i),this.toolbar.buttonSize=this.j.o.toolbarButtonSize,e=this.toolbar.container}this.popup.setContent(e),this.type=t}return this.popup.open(e),!0}hidePopup(e){this.popup.isOpened&&(!(0,s.isString)(e)||e===this.type)&&this.popup.close()}onOutsideClick(){this.popup.close()}onKeyUp(){this.__followCaret()}__followCaret(){if(!(0,l.isMoved)(this.j,this.snapRange))return;let{range:e}=this.j.s,t=this.previousTarget;this.popup.isOpened&&"selection"!==this.type&&t&&!e.intersectsNode(t)&&this.popup.close();let i=e.startContainer,o=this.__elementAt(i);e.collapsed&&o&&o!==this.__keyDownElement&&this.onClick(i)}__elementAt(e){return n.Dom.closest(e,this.elmsList,this.j.editor)}canShowPopupForType(e){let t=this.j.o.popup[e.toLowerCase()];return!this.j.o.readonly&&!!this.j.o.toolbarInline&&!!t&&!this.isExcludedTarget(e)}isExcludedTarget(e){return(0,s.splitArray)(this.j.o.toolbarInlineDisableFor).map(e=>e.toLowerCase()).includes(e.toLowerCase())}afterInit(e){this.j.e.on("getDiffButtons.mobile",t=>{if(this.toolbar===t){let t=this.toolbar.getButtonsNames();return(0,s.toArray)(e.registeredButtons).filter(e=>!this.j.o.toolbarInlineDisabledButtons.includes(e.name)).filter(e=>{let i=(0,s.isString)(e)?e:e.name;return i&&"|"!==i&&`
234
- `!==i&&!t.includes(i)})}}).on("hidePopup",this.hidePopup).on("showInlineToolbar",this.showInlineToolbar).on("showPopup",(e,t,i,o)=>{this.showPopup(t,i||((0,s.isString)(e)?e:e.nodeName),(0,s.isString)(e)?void 0:e,o)}).on("mousedown keydown",this.onSelectionStart).on("change",()=>{this.popup.isOpened&&(this.previousTarget&&!this.previousTarget.parentNode?(this.hidePopup(),this.previousTarget=void 0):"selection"!==this.type||this.__hasSelectedContent()||this.hidePopup())}).on([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd),this.addListenersForElements()}onRecalcPositionPopup(){this.popup.updatePosition()}__selectionBound(){let e=this.j.s.range.getBoundingClientRect(),{left:t,top:i}=e;if(this.j.iframe){let e=(0,s.position)(this.j.iframe,this.j,!0);t+=e.left,i+=e.top}return{left:t,top:i,width:e.width,height:e.height}}onSelectionStart(e){(null==e?void 0:e.repeat)&&this.__followCaret(),this.snapRange=this.j.s.range.cloneRange(),this.__keyDownElement=this.__elementAt(this.snapRange.startContainer)}onSelectionEnd(e){if(e&&e.target&&c.UIElement.closestElement(e.target,d.Popup))return;let{snapRange:t}=this,{range:i}=this.j.s;(!t||i.collapsed||i.startContainer!==t.startContainer||i.startOffset!==t.startOffset||i.endContainer!==t.endContainer||i.endOffset!==t.endOffset)&&this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;let e="selection",t=this.j.s.range;if(!this.__hasSelectedContent()||this.isSelectedTarget(t)){this.type===e&&this.popup.isOpened&&this.hidePopup();return}this.j.s.current()&&this.showPopup(()=>this.__selectionBound(),e)}__hasSelectedContent(){let{sel:e,range:t}=this.j.s;if(!e||e.isCollapsed)return!1;let i=e=>/[^\t\n\f\r \uFEFF\u200B]/.test(e.toString()),o=n.Dom.closest(t.startContainer,n.Dom.isBlock,this.j.editor);if(!o||o===this.j.editor||i(t))return!0;let r=this.j.s.createRange();return r.setStart(t.startContainer,t.startOffset),r.setEnd(o,o.childNodes.length),i(r)||(0,s.toArray)(o.querySelectorAll(":not(br):empty")).some(e=>r.intersectsNode(e))}isSelectedTarget(e){let t=e.startContainer;return n.Dom.isElement(t)&&t===e.endContainer&&n.Dom.isTag(t.childNodes[e.startOffset],new Set((0,s.keys)(this.j.o.popup,!1)))&&e.startOffset===e.endOffset-1}beforeDestruct(e){e.e.off("showPopup").off([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd),this.removeListenersForElements()}_eventsList(){var e;let t=Object.values(null!=(e=this.j.o.mediaWrappers)?e:{}).map(({tag:e})=>e.toLowerCase()),i=[...new Set(this.elmsList.concat(t))];return i.map(e=>(0,s.camelCase)("click_"+e)).concat(i.map(e=>(0,s.camelCase)("touchstart_"+e))).join(" ")}addListenersForElements(){this.j.e.on(this._eventsList(),this.onClick)}removeListenersForElements(){this.j.e.off(this._eventsList(),this.onClick)}showInlineToolbar(e){this.showPopup(()=>{if(e)return e;let{range:t}=this.j.s;return t.getBoundingClientRect()},"toolbar")}constructor(){super(...arguments),this.type=null,this.snapRange=null,this.__keyDownElement=null,this.elmsList=(0,s.keys)(this.j.o.popup,!1).filter(e=>!this.isExcludedTarget(e))}}p.requires=["select"],h([o.cache],p.prototype,"popup",null),h([o.cache],p.prototype,"toolbar",null),h([o.autobind],p.prototype,"onClick",null),h([(0,o.wait)(e=>!e.j.isLocked)],p.prototype,"showPopup",null),h([(0,o.watch)([":clickEditor",":beforeCommandDelete",":backSpaceAfterDelete"]),o.autobind],p.prototype,"hidePopup",null),h([(0,o.watch)(":outsideClick")],p.prototype,"onOutsideClick",null),h([(0,o.watch)(":keyup")],p.prototype,"onKeyUp",null),h([(0,o.watch)(":recalcPositionPopup")],p.prototype,"onRecalcPositionPopup",null),h([o.autobind],p.prototype,"onSelectionStart",null),h([o.autobind],p.prototype,"onSelectionEnd",null),h([(0,o.debounce)(e=>e.defaultTimeout)],p.prototype,"onSelectionChange",null),h([o.autobind],p.prototype,"showInlineToolbar",null),r.pluginSystem.add("inlinePopup",p)},76295:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(21537),s=i(25726),a=i(41180),l=i(12153),c=i(6441),d=i(5567);l.Icon.set("justify",d.default),c.Config.prototype.controls.align={name:"left",tooltip:"Align",update(e,t){let i=t.control,n=e.s.current();if(n){let s=o.Dom.closest(n,o.Dom.isBlock,e.editor)||e.editor,l=(0,a.css)(s,"text-align").toString();i.defaultValue&&-1!==i.defaultValue.indexOf(l)&&(l="left");let{list:c,data:d}=i;d&&d.currentValue!==l&&c&&((0,r.isPlainObject)(c)?c[l]:c.includes(l))&&(e.o.textIcons||"select"===i.component?t.state.text=l:t.state.icon.name=l,d.currentValue=l)}},isActive(e,t){let i=e.s.current();if(!i||!t.control.defaultValue)return!1;let n=o.Dom.closest(i,o.Dom.isBlock,e.editor)||e.editor;return -1===t.control.defaultValue.indexOf((0,a.css)(n,"text-align").toString())},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},c.Config.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},c.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},c.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},c.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},n.pluginSystem.add("justify",function(e){e.registerButton({name:"align",group:"indent"});let t=t=>(e.s.focus(),e.s.eachSelection(i=>{if(!i)return;let n=o.Dom.up(i,o.Dom.isBlock,e.editor);n||(n=o.Dom.wrapInline(i,e.o.enterBlock,e)),(0,s.alignElement)(t,n)}),!1);e.registerCommand("justifyfull",t),e.registerCommand("justifyright",t),e.registerCommand("justifyleft",t),e.registerCommand("justifycenter",t)})},5567:function(e,t){"use strict";t.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"> <path d="M2.6667 5.3333h18.6666M2.6667 12h18.6666M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},59483:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(50911);class l extends a.Plugin{afterInit(e){}beforeDestruct(e){}onKeyDownArrow(e){var t;if(e.key!==o.KEY_RIGHT||!this.j.selection.isCollapsed())return;let{endContainer:i,endOffset:n}=this.j.selection.range;if(r.Dom.isText(i)&&(null==(t=i.nodeValue)?void 0:t.length)===n){let{parentNode:e}=i;r.Dom.isInlineBlock(e)&&!r.Dom.findNotEmptyNeighbor(e,!1,this.j.editor)&&r.Dom.after(e,this.j.createInside.text(o.NBSP_SPACE))}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":keydown")],l.prototype,"onKeyDownArrow",null),s.pluginSystem.add("keyArrowOutside",l)},57288:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.limitWords=!1,o.Config.prototype.limitChars=!1,o.Config.prototype.limitHTML=!1},91071:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(580),s=i(50911);i(57288);var a=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class l extends s.Plugin{afterInit(e){let{limitWords:t,limitChars:i}=e.o;if(e&&(t||i)){let t=null;e.e.off(".limit").on("beforePaste.limit",()=>{t=e.history.snapshot.make()}).on("keydown.limit keyup.limit beforeEnter.limit",this.checkPreventKeyPressOrPaste).on("change.limit",this.checkPreventChanging).on("afterPaste.limit",()=>{if(this.__shouldDenyInput(!0)&&t)return e.history.snapshot.restore(t),e.e.fire("denyPaste.limit"),!1})}}shouldPreventInsertHTML(e){return!(e&&(o.COMMAND_KEYS.includes(e.key)||e.ctrlKey||e.metaKey))&&this.__shouldDenyInput(!1)}__shouldDenyInput(e){var t;let{jodit:i}=this,{limitWords:n,limitChars:r}=i.o,s=i.o.limitHTML?i.value:i.text,a=this.__splitWords(s);if(n&&(t=a.length,e?t>n:t>=n))return i.e.fire("denyWords.limit limit.limit"),!0;let l=i.o.countTextSpaces?s.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,"").length:a.join("").length,c=!!(r&&(e?l>r:l>=r));return c&&i.e.fire("denyChars.limit limit.limit"),c}checkPreventKeyPressOrPaste(e){if(this.shouldPreventInsertHTML(e))return!1}checkPreventChanging(e,t){let{jodit:i}=this;this.__shouldDenyInput(!0)&&(i.value=t)}__splitWords(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").split((0,o.SPACE_REG_EXP)()).filter(e=>e.length)}beforeDestruct(e){e.e.off(".limit")}}a([n.autobind],l.prototype,"checkPreventKeyPressOrPaste",null),a([n.autobind],l.prototype,"checkPreventChanging",null),r.pluginSystem.add("limit",l)},26295:function(e,t,i){"use strict";var o=i(21537),n=i(12153),r=i(6441),s=i(53259);r.Config.prototype.defaultLineHeight=null,n.Icon.set("line-height",s.default),r.Config.prototype.controls.lineHeight={command:"applyLineHeight",tags:["ol"],tooltip:"Line height",list:[1,1.1,1.2,1.3,1.4,1.5,2],exec:(e,t,{control:i})=>(0,o.memorizeExec)(e,t,{control:i},e=>e)}},28143:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},sk:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},61019:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(580),s=i(21537),a=i(50911);i(26295);var l=i(28143);class c extends a.Plugin{afterInit(e){(0,s.css)(e.editor,{lineHeight:e.o.defaultLineHeight}),e.registerCommand("applyLineHeight",this.applyLineHeight)}applyLineHeight(e,t,i){let o,{s:r,createInside:a,editor:l,o:c}=this.j;r.isFocused()||r.focus(),r.save();let d=e=>{let t=n.Dom.closest(e,n.Dom.isBlock,l);t||(t=n.Dom.wrap(e,c.enter,a));let r=(0,s.css)(t,"lineHeight");void 0===o&&(o=r.toString()!==i.toString()),(0,s.css)(t,"lineHeight",o?i:null)};try{if(r.isCollapsed()){let e=a.fake();n.Dom.safeInsertNode(r.range,e),d(e),n.Dom.safeRemove(e)}else r.eachSelection(d)}finally{r.restore()}}beforeDestruct(e){(0,s.css)(e.editor,{lineHeight:null})}constructor(e){super(e),this.buttons=[{name:"lineHeight",group:"font"}],(0,r.extendLang)(l)}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],c.prototype,"applyLineHeight",null),r.pluginSystem.add("lineHeight",c)},53259:function(e,t){"use strict";t.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"> <path d="M2.6667 5.3333h9.3333M2.6667 12H12M2.6667 18.6667h9.3333" stroke-width="2.6667" stroke-linecap="butt"/><path d="M18 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg> '},5827:function(e,t,i){"use strict";var o=i(2748),n=i(12153),r=i(6441),s=i(27190),a=i(42345),l=i(10411);r.Config.prototype.link={formTemplate:l.formTemplate,followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,processTypedLink:!1,typedLinkTlds:[],typedLinkFileEndings:["zip","mov","md","py","sh","pub"],deriveUrlFromText:!1,noFollowCheckbox:!0,openInNewTabCheckbox:!0,openInNewTabCheckboxDefaultChecked:!1,ariaLabelInput:!1,modeClassName:"input",selectMultipleClassName:!0,preventReadOnlyNavigation:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:["ctrl+k","cmd+k"]},n.Icon.set("link",s.default).set("unlink",a.default),r.Config.prototype.controls.unlink={exec(e,t){let i=o.Dom.closest(t,"a",e.editor);i&&o.Dom.unwrap(i),e.synchronizeValues(),e.e.fire("hidePopup")},tooltip:"Unlink"},r.Config.prototype.controls.link={isActive(e){let t=e.s.current();return!!(t&&o.Dom.closest(t,"a",e.editor))},popup:(e,t,i)=>e.e.fire("generateLinkForm.link",t,i),tags:["a"],tooltip:"Insert link"}},27190:function(e,t){"use strict";t.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"> <path d="m10 7 3-3a5 5 0 0 1 7 7l-3 3M14 17l-3 3a5 5 0 0 1-7-7l3-3m1 6 8-8"/> </g> </svg> '},42345:function(e,t){"use strict";t.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"> <path d="m14 5 1-1a3.5 3.5 0 0 1 5 5l-1 1M10 19l-1 1a3.5 3.5 0 0 1-5-5l1-1M4 10l6-6m4 16 6-6"/> </g> </svg> '},65517:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(22732),s=i(580),a=i(21537),l=i(50911),c=i(48538),d=i(12153),u=i(56917);i(5827);var h=i(58970),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class m extends l.Plugin{afterInit(e){e.o.link.followOnDblClick&&e.e.on("dblclick.link",this.__onDblClickOnLink),e.e.on(e.editor,"click.link",this.__onClickReadOnlyLink),e.o.link.processPastedLink&&e.e.on("processPaste.link",this.onProcessPasteLink),e.o.link.processTypedLink&&(this.__linkAfterEnter=e.async.microDebounce(this.__linkTyped),e.e.on("input.link",this.__onTypedSpace).on("beforeEnter.link",this.__onBeforeEnter).on("afterEnter.link",this.__onAfterEnter).on("mousedown.link blur.link beforeCommand.link",this.__forgetLink).on("keydown",this.__onKeyDown,{top:!0})),e.e.on("generateLinkForm.link",this.__generateForm),e.registerCommand("openLinkDialog",{exec:()=>{let t=e.dlg({resizable:!1}),i=this.__generateForm(e.s.current(),()=>{t.close()});i.container.classList.add("jodit-dialog_alert"),t.setContent(i),t.open(),e.async.requestIdleCallback(()=>{let{url_input:e}=(0,a.refs)(i.container);null==e||e.focus()})},hotkeys:e.o.link.hotkeys})}__onDblClickOnLink(e){if(!r.Dom.isTag(e.target,"a"))return;let t=(0,a.attr)(e.target,"href");t&&(location.href=t,e.preventDefault())}onProcessPasteLink(e,t){var i,o,n,r;let{jodit:s}=this;if((0,a.isURL)(t)&&s.o.link.processPastedLink){if(s.e.stopPropagation("processPaste"),s.o.link.processVideoLink){let e=(0,a.call)(null!=(o=null==(i=s.o.video)?void 0:i.parseUrlToVideoEmbed)?o:a.convertMediaUrlToVideoEmbed,t,{width:null==(n=s.o.video)?void 0:n.defaultWidth,height:null==(r=s.o.video)?void 0:r.defaultHeight});if(e!==t){let t=(0,a.prepareEmbedCode)(s,e);return(0,a.isString)(t)?s.createInside.fromHTML(t):t}}if(s.s.isCollapsed()){let e=s.createInside.element("a");return(0,a.attr)(e,"href",t),e.textContent=t,s.e.fire("applyLink",s,e,null),e}return s.s.commitStyle({element:"a",attributes:{href:t}}),!0}}__generateForm(e,t){let i,n,{jodit:l}=this,p=l.i18n.bind(l),{openInNewTabCheckbox:m,openInNewTabCheckboxDefaultChecked:f,noFollowCheckbox:g,formTemplate:b,formClassName:v,modeClassName:y}=l.o.link,w=b(l),_=(0,a.isString)(w)?l.c.fromHTML(w,{target_checkbox_box:m,nofollow_checkbox_box:g}):w,k=r.Dom.isElement(_)?_:_.container,C=(0,a.refs)(k),{insert:S,unlink:x,content_input_box:E}=C,{target_checkbox:I,nofollow_checkbox:T,url_input:j}=C,D=r.Dom.isImage(e),{content_input:A}=C,{className_input:P}=C,{className_select:M}=C,{aria_label_input:L}=C;A||(A=l.c.element("input",{type:"hidden",ref:"content_input"})),v&&k.classList.add(v),D&&r.Dom.hide(E);let R=()=>n?n.innerText:(0,a.stripTags)(l.s.range.cloneContents(),l.ed);n=!!(e&&r.Dom.closest(e,"a",l.editor))&&r.Dom.closest(e,"a",l.editor),!D&&e&&(A.value=R()),L&&(L.value=n&&(0,a.attr)(n,"aria-label")||""),n?(j.value=(0,a.attr)(n,"href")||"",y&&function(e,t,i,o){switch(e){case"input":t&&(t.value=(0,a.attr)(i,"class")||"");break;case"select":if(o){for(let e=0;e<o.selectedOptions.length;e++){let t=o.options.item(e);t&&(t.selected=!1)}((0,a.attr)(i,"class")||"").split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{if(e)for(let t=0;t<o.options.length;t++){let i=o.options.item(t);(null==i?void 0:i.value)&&i.value.split(/\s+/).map(e=>e.trim()).includes(e)&&(i.selected=!0)}})}}}(y,P,n,M),m&&I&&(I.checked="_blank"===(0,a.attr)(n,"target")),g&&T&&(T.checked=((0,a.attr)(n,"rel")||"").split(/\s+/).includes("nofollow")),S.textContent=p("Update")):(r.Dom.hide(x),l.o.link.deriveUrlFromText&&j&&!D&&!j.value.trim()&&(j.value=!(i=A.value.trim())||/\s/.test(i)?"":/^(https?:|mailto:|tel:|ftp:|#|\/|\.{1,2}\/)/i.test(i)?i:h.EMAIL.test(i)?"mailto:"+i:/^[a-z0-9-]+(\.[a-z0-9-]+)+(\/\S*)?$/i.test(i)?"https://"+i:""),m&&I&&(I.checked=f)),function(e,t,i,n){let l=(0,a.getAnchors)(e.editor),h=null==t?void 0:t.closest(".jodit-ui-input__wrapper"),p=h&&c.UIElement.closestElement(h,c.UIElement);if(!h||!p||!l.length)return;let{c:m}=e,f=e.i18n("Link to an anchor"),g=m.element("button",{type:"button",class:"jodit-link-anchors__toggle",title:f,"aria-label":f}),b=m.div("jodit-link-anchors__heading",{id:"jodit-link-anchors-"+(0,s.uniqueUid)()}),v=m.div("jodit-link-anchors",{role:"group","aria-labelledby":b.id}),y=t=>{var i;return null!=(i=d.Icon.makeIcon(e,{name:t,iconURL:"",fill:"",scale:void 0}))?i:m.span()},w=new u.Popup(e).setMod("padding",!1),_=[],k="",C=()=>{var e;w.isOpened||(w.parentElement||(w.parentElement=p),v.style.minWidth=h.offsetWidth+"px",w.open(()=>(0,a.position)(h)),(0,a.attr)(g,"aria-expanded",!0),_.forEach((e,i)=>(0,a.attr)(e,"aria-current",t.value==="#"+(0,a.getAnchorName)(l[i]))),null==(e=v.querySelector("[aria-current=true]"))||e.scrollIntoView({block:"nearest"}))};g.append(y("chevron")),(0,a.attr)(g,"aria-expanded",!1),b.textContent=e.i18n("On this page"),v.appendChild(b),w.setContent(v),l.forEach(o=>{var s;let l,c,d=(0,a.getAnchorName)(o),u=((l=e.ed.createRange()).selectNodeContents(null!=(s=r.Dom.up(o,r.Dom.isBlock,e.editor))?s:e.editor),l.setStartAfter(o),((c=l.toString().replace(/\s+/g," ").trim()).length>50?c.slice(0,50).replace(/\s+\S*$/,"")+"…":c)||d),h=m.element("button",{type:"button",tabindex:-1,class:"jodit-link-anchors__item"});_.push(h);let p=m.span("jodit-link-anchors__text");p.textContent=u;let f=m.span("jodit-link-anchors__name");f.textContent="#"+d,h.append(y("anchor"),p,f),v.appendChild(h),e.e.on(h,"click",()=>{w.close(),t.value="#"+d,n||i.value.trim()&&i.value!==k||(i.value=k=u),t.focus()})});let S=!1;e.e.on(w,"beforeClose",()=>(0,a.attr)(g,"aria-expanded",!1)).on(g,"mousedown",()=>S=w.isOpened).on(g,"click",()=>{S||w.isOpened?w.close():C(),S=!1}).on(t,"input.anchors",()=>{t.value&&!t.value.startsWith("#")&&w.close()}).on(t,"keydown.anchors",e=>{e.key===o.KEY_DOWN&&(e.preventDefault(),C(),_[0].focus()),e.key===o.KEY_ESC&&w.isOpened&&(e.stopPropagation(),w.close())}).on(v,"keydown",e=>{var i;let n=_.indexOf(e.target);(e.key===o.KEY_DOWN||e.key===o.KEY_UP)&&(e.preventDefault(),null==(i=_[n+(e.key===o.KEY_DOWN?1:-1)])||i.focus()),e.key===o.KEY_ESC&&(e.stopPropagation(),w.close(),t.focus())}),p.hookStatus("destructed",()=>{w.destruct(),e.e.off([g,v,..._]).off(t,".anchors")}),r.Dom.after(t,g)}(l,j,A,D),l.editor.normalize();let B=l.history.snapshot.make();x&&l.e.on(x,"click",e=>{l.s.restore(),l.history.snapshot.restore(B),n&&r.Dom.unwrap(n),l.synchronizeValues(),t(),e.preventDefault()});let z=()=>{let e;if(!j.value.trim().length)return j.focus(),j.classList.add("jodit_error"),!1;l.s.restore(),l.s.removeMarkers(),l.editor.normalize(),l.history.snapshot.restore(B);let i=R()!==A.value.trim(),o=l.createInside,s=null;if(n&&r.Dom.isOrContains(l.editor,n))e=[n];else{if(l.s.isCollapsed()){let t=o.element("a");l.s.insertNode(t,!1,!1),e=[t],s=t}else{let t=l.s.current();e=r.Dom.isTag(t,"img")?[r.Dom.wrap(t,"a",o)]:l.s.wrapInTag("a")}e.forEach(e=>l.s.select(e))}return e.forEach(e=>{var t;let o;if((0,a.attr)(e,"href",j.value),function(e,t,i,o){var n;if(e&&(null!=t?t:i)){if("input"===e)""===t.value&&o.hasAttribute("class")&&(0,a.attr)(o,"class",null),""!==t.value&&(0,a.attr)(o,"class",t.value);else if("select"===e){o.hasAttribute("class")&&(0,a.attr)(o,"class",null);for(let e=0;e<i.selectedOptions.length;e++){let t=null==(n=i.selectedOptions.item(e))?void 0:n.value;t&&t.split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{o.classList.add(e)})}}}}(y,P,M,e),D||(t=A,o=e.textContent,t.value.trim().length?i&&(o=t.value):o=j.value,o!==e.textContent&&(e.textContent=o)),m&&I&&(0,a.attr)(e,"target",I.checked?"_blank":null),g&&T){let t=((0,a.attr)(e,"rel")||"").split(/\s+/).filter(Boolean),i=t.includes("nofollow");T.checked&&!i?t.push("nofollow"):!T.checked&&i&&t.splice(t.indexOf("nofollow"),1),(0,a.attr)(e,"rel",t.length?t.join(" "):null)}if(L){let t=L.value.trim();(0,a.attr)(e,"aria-label",t||null)}l.e.fire("applyLink",l,e,_)}),s&&l.s.setCursorAfter(s),l.synchronizeValues(),t(),!1};return r.Dom.isElement(_)?l.e.on(_,"submit",e=>(e.preventDefault(),e.stopImmediatePropagation(),z(),!1)):_.onSubmit(z),_}beforeDestruct(e){e.e.off("generateLinkForm.link",this.__generateForm).off("dblclick.link",this.__onDblClickOnLink).off(e.editor,"click.link",this.__onClickReadOnlyLink).off("processPaste.link",this.onProcessPasteLink).off("input.link",this.__onTypedSpace).off("beforeEnter.link",this.__onBeforeEnter).off("afterEnter.link",this.__onAfterEnter).off("mousedown.link blur.link beforeCommand.link",this.__forgetLink).off("keydown",this.__onKeyDown)}__onTypedSpace(e){if("insertText"!==e.inputType||!e.data||/\S/.test(e.data))return;let{range:t}=this.j.s;t.collapsed&&this.__linkTyped(t.startContainer,t.startOffset-e.data.length)}__onBeforeEnter(){let{range:e}=this.j.s;this.__enteredAt=e.collapsed?[e.startContainer,e.startOffset]:null}__onAfterEnter(){this.__enteredAt&&(this.__linkAfterEnter(...this.__enteredAt),this.__enteredAt=null)}__forgetLink(){this.__justLinked=null}__onKeyDown(e){let{jodit:t}=this;if(t.o.readonly)return;let i=this.__justLinked,n=e.ctrlKey||e.metaKey||e.altKey;if(g.has(e.key)||(this.__justLinked=null),e.key===o.KEY_BACKSPACE&&!n&&(null==i?void 0:i.isConnected))return this.__recordStep(),t.s.save(),r.Dom.unwrap(i),t.s.restore(),this.__recordStep(),t.e.stopPropagation("keydown"),!1;let{range:s}=t.s;e.key===o.KEY_TAB&&!n&&s.collapsed&&this.__linkTyped(s.startContainer,s.startOffset)}__linkTyped(e,t){let{jodit:i}=this;if(!r.Dom.isText(e)||!e.isConnected||t<0||t>e.length||r.Dom.closest(e,f,i.editor))return;let o=(0,h.findTypedLink)(e.data,t,i.o.link.typedLinkTlds,i.o.link.typedLinkFileEndings);if(!o)return;let[n,s,l]=o;this.__recordStep(),i.s.save();let c=i.ed.createRange();c.setStart(e,n),c.setEnd(e,s);let d=i.createInside.element("a");(0,a.attr)(d,"href",l),c.surroundContents(d),i.s.restore(),i.e.fire("applyLink",i,d,null),this.__recordStep(),this.__justLinked=d}__recordStep(){this.j.setEditorValue(),this.j.e.fire("internalChange")}__onClickReadOnlyLink(e){let{jodit:t}=this;t.o.readonly&&t.o.link.preventReadOnlyNavigation&&r.Dom.isTag(e.target,"a")&&e.preventDefault()}constructor(){super(...arguments),this.buttons=[{name:"link",group:"insert"}],this.__enteredAt=null,this.__linkAfterEnter=()=>{},this.__justLinked=null}}p([n.autobind],m.prototype,"__onDblClickOnLink",null),p([n.autobind],m.prototype,"onProcessPasteLink",null),p([n.autobind],m.prototype,"__generateForm",null),p([n.autobind],m.prototype,"__onTypedSpace",null),p([n.autobind],m.prototype,"__onBeforeEnter",null),p([n.autobind],m.prototype,"__onAfterEnter",null),p([n.autobind],m.prototype,"__forgetLink",null),p([n.autobind],m.prototype,"__onKeyDown",null),p([n.autobind],m.prototype,"__linkTyped",null),p([n.autobind],m.prototype,"__onClickReadOnlyLink",null);let f=new Set(["a","pre","code"]),g=new Set(["Shift","Control","Alt","Meta","CapsLock"]);s.pluginSystem.add("link",m)},10411:function(e,t,i){"use strict";var o=i(62843),n=i(2525);i.d(t,["formTemplate",0,e=>{let{openInNewTabCheckbox:t,noFollowCheckbox:i,ariaLabelInput:r,modeClassName:s,selectSizeClassName:a,selectMultipleClassName:l,selectOptionsClassName:c}=e.o.link;return new n.UIForm(e,[new n.UIBlock(e,[new n.UIInput(e,{name:"url",type:"url",ref:"url_input",label:"URL",placeholder:"http://",required:!0})]),r?new n.UIBlock(e,[new n.UIInput(e,{name:"ariaLabel",ref:"aria_label_input",label:"Aria label"})]):null,new n.UIBlock(e,[new n.UIInput(e,{name:"content",ref:"content_input",label:"Text"})],{ref:"content_input_box"}),s?new n.UIBlock(e,["input"===s?new n.UIInput(e,{name:"className",ref:"className_input",label:"Class name"}):"select"===s?new n.UISelect(e,{name:"className",ref:"className_select",label:"Class name",size:a,multiple:l,options:c}):null]):null,t?new n.UICheckbox(e,{name:"target",ref:"target_checkbox",label:"Open in new tab"}):null,i?new n.UICheckbox(e,{name:"nofollow",ref:"nofollow_checkbox",label:"No follow"}):null,new n.UIBlock(e,[new o.UIButton(e,{name:"unlink",variant:"default",text:"Unlink"}),new o.UIButton(e,{name:"insert",type:"submit",variant:"primary",text:"Insert"})],{align:"full"})])}])},67272:function(e,t,i){"use strict";let o=new Set(`
234
+ `!==i&&!t.includes(i)})}}).on("hidePopup",this.hidePopup).on("showInlineToolbar",this.showInlineToolbar).on("showPopup",(e,t,i,o)=>{this.showPopup(t,i||((0,s.isString)(e)?e:e.nodeName),(0,s.isString)(e)?void 0:e,o)}).on("mousedown keydown",this.onSelectionStart).on("change",()=>{this.popup.isOpened&&(this.previousTarget&&!this.previousTarget.parentNode?(this.hidePopup(),this.previousTarget=void 0):"selection"!==this.type||this.__hasSelectedContent()||this.hidePopup())}).on([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd),this.addListenersForElements()}onRecalcPositionPopup(){this.popup.updatePosition()}__selectionBound(){let e=this.j.s.range.getBoundingClientRect(),{left:t,top:i}=e;if(this.j.iframe){let e=(0,s.position)(this.j.iframe,this.j,!0);t+=e.left,i+=e.top}return{left:t,top:i,width:e.width,height:e.height}}onSelectionStart(e){(null==e?void 0:e.repeat)&&this.__followCaret(),this.snapRange=this.j.s.range.cloneRange(),this.__keyDownElement=this.__elementAt(this.snapRange.startContainer)}onSelectionEnd(e){if(e&&e.target&&c.UIElement.closestElement(e.target,d.Popup))return;let{snapRange:t}=this,{range:i}=this.j.s;(!t||i.collapsed||i.startContainer!==t.startContainer||i.startOffset!==t.startOffset||i.endContainer!==t.endContainer||i.endOffset!==t.endOffset)&&this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;let e="selection",t=this.j.s.range;if(!this.__hasSelectedContent()||this.isSelectedTarget(t)){this.type===e&&this.popup.isOpened&&this.hidePopup();return}this.j.s.current()&&this.showPopup(()=>this.__selectionBound(),e)}__hasSelectedContent(){let{sel:e,range:t}=this.j.s;if(!e||e.isCollapsed)return!1;let i=e=>/[^\t\n\f\r \uFEFF\u200B]/.test(e.toString()),o=n.Dom.closest(t.startContainer,n.Dom.isBlock,this.j.editor);if(!o||o===this.j.editor||i(t))return!0;let r=this.j.s.createRange();return r.setStart(t.startContainer,t.startOffset),r.setEnd(o,o.childNodes.length),i(r)||(0,s.toArray)(o.querySelectorAll(":not(br):empty")).some(e=>r.intersectsNode(e))}isSelectedTarget(e){let t=e.startContainer;return n.Dom.isElement(t)&&t===e.endContainer&&n.Dom.isTag(t.childNodes[e.startOffset],new Set((0,s.keys)(this.j.o.popup,!1)))&&e.startOffset===e.endOffset-1}beforeDestruct(e){e.e.off("showPopup").off([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd),this.removeListenersForElements()}_eventsList(){var e;let t=Object.values(null!=(e=this.j.o.mediaWrappers)?e:{}).map(({tag:e})=>e.toLowerCase()),i=[...new Set(this.elmsList.concat(t))];return i.map(e=>(0,s.camelCase)("click_"+e)).concat(i.map(e=>(0,s.camelCase)("touchstart_"+e))).join(" ")}addListenersForElements(){this.j.e.on(this._eventsList(),this.onClick)}removeListenersForElements(){this.j.e.off(this._eventsList(),this.onClick)}showInlineToolbar(e){this.showPopup(()=>{if(e)return e;let{range:t}=this.j.s;return t.getBoundingClientRect()},"toolbar")}constructor(){super(...arguments),this.type=null,this.snapRange=null,this.__keyDownElement=null,this.elmsList=(0,s.keys)(this.j.o.popup,!1).filter(e=>!this.isExcludedTarget(e))}}p.requires=["select"],h([o.cache],p.prototype,"popup",null),h([o.cache],p.prototype,"toolbar",null),h([o.autobind],p.prototype,"onClick",null),h([(0,o.wait)(e=>!e.j.isLocked)],p.prototype,"showPopup",null),h([(0,o.watch)([":clickEditor",":beforeCommandDelete",":backSpaceAfterDelete"]),o.autobind],p.prototype,"hidePopup",null),h([(0,o.watch)(":outsideClick")],p.prototype,"onOutsideClick",null),h([(0,o.watch)(":keyup")],p.prototype,"onKeyUp",null),h([(0,o.watch)(":recalcPositionPopup")],p.prototype,"onRecalcPositionPopup",null),h([o.autobind],p.prototype,"onSelectionStart",null),h([o.autobind],p.prototype,"onSelectionEnd",null),h([(0,o.debounce)(e=>e.defaultTimeout)],p.prototype,"onSelectionChange",null),h([o.autobind],p.prototype,"showInlineToolbar",null),r.pluginSystem.add("inlinePopup",p)},76295:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(21537),s=i(25726),a=i(41180),l=i(12153),c=i(6441),d=i(5567);l.Icon.set("justify",d.default),c.Config.prototype.controls.align={name:"left",tooltip:"Align",update(e,t){let i=t.control,n=e.s.current();if(n){let s=o.Dom.closest(n,o.Dom.isBlock,e.editor)||e.editor,l=(0,a.css)(s,"text-align").toString();i.defaultValue&&-1!==i.defaultValue.indexOf(l)&&(l="left");let{list:c,data:d}=i;d&&d.currentValue!==l&&c&&((0,r.isPlainObject)(c)?c[l]:c.includes(l))&&(e.o.textIcons||"select"===i.component?t.state.text=l:t.state.icon.name=l,d.currentValue=l)}},isActive(e,t){let i=e.s.current();if(!i||!t.control.defaultValue)return!1;let n=o.Dom.closest(i,o.Dom.isBlock,e.editor)||e.editor;return -1===t.control.defaultValue.indexOf((0,a.css)(n,"text-align").toString())},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},c.Config.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},c.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},c.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},c.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},n.pluginSystem.add("justify",function(e){e.registerButton({name:"align",group:"indent"});let t=t=>(e.s.focus(),e.s.eachSelection(i=>{if(!i)return;let n=o.Dom.up(i,o.Dom.isBlock,e.editor);n||(n=o.Dom.wrapInline(i,e.o.enterBlock,e)),(0,s.alignElement)(t,n)}),!1);e.registerCommand("justifyfull",t),e.registerCommand("justifyright",t),e.registerCommand("justifyleft",t),e.registerCommand("justifycenter",t)})},5567:function(e,t){"use strict";t.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"> <path d="M2.6667 5.3333h18.6666M2.6667 12h18.6666M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},59483:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(50911);class l extends a.Plugin{afterInit(e){}beforeDestruct(e){}onKeyDownArrow(e){var t;if(e.key!==o.KEY_RIGHT||!this.j.selection.isCollapsed())return;let{endContainer:i,endOffset:n}=this.j.selection.range;if(r.Dom.isText(i)&&(null==(t=i.nodeValue)?void 0:t.length)===n){let{parentNode:e}=i;r.Dom.isInlineBlock(e)&&!r.Dom.findNotEmptyNeighbor(e,!1,this.j.editor)&&r.Dom.after(e,this.j.createInside.text(o.NBSP_SPACE))}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":keydown")],l.prototype,"onKeyDownArrow",null),s.pluginSystem.add("keyArrowOutside",l)},57288:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.limitWords=!1,o.Config.prototype.limitChars=!1,o.Config.prototype.limitHTML=!1},91071:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(580),s=i(50911);i(57288);var a=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class l extends s.Plugin{afterInit(e){let{limitWords:t,limitChars:i}=e.o;if(e&&(t||i)){let t=null;e.e.off(".limit").on("beforePaste.limit",()=>{t=e.history.snapshot.make()}).on("keydown.limit keyup.limit beforeEnter.limit",this.checkPreventKeyPressOrPaste).on("change.limit",this.checkPreventChanging).on("afterPaste.limit",()=>{if(this.__shouldDenyInput(!0)&&t)return e.history.snapshot.restore(t),e.e.fire("denyPaste.limit"),!1})}}shouldPreventInsertHTML(e){return!(e&&(o.COMMAND_KEYS.includes(e.key)||e.ctrlKey||e.metaKey))&&this.__shouldDenyInput(!1)}__shouldDenyInput(e){var t;let{jodit:i}=this,{limitWords:n,limitChars:r}=i.o,s=i.o.limitHTML?i.value:i.text,a=this.__splitWords(s);if(n&&(t=a.length,e?t>n:t>=n))return i.e.fire("denyWords.limit limit.limit"),!0;let l=i.o.countTextSpaces?s.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,"").length:a.join("").length,c=!!(r&&(e?l>r:l>=r));return c&&i.e.fire("denyChars.limit limit.limit"),c}checkPreventKeyPressOrPaste(e){if(this.shouldPreventInsertHTML(e))return!1}checkPreventChanging(e,t){let{jodit:i}=this;this.__shouldDenyInput(!0)&&(i.value=t)}__splitWords(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").split((0,o.SPACE_REG_EXP)()).filter(e=>e.length)}beforeDestruct(e){e.e.off(".limit")}}a([n.autobind],l.prototype,"checkPreventKeyPressOrPaste",null),a([n.autobind],l.prototype,"checkPreventChanging",null),r.pluginSystem.add("limit",l)},26295:function(e,t,i){"use strict";var o=i(21537),n=i(12153),r=i(6441),s=i(53259);r.Config.prototype.defaultLineHeight=null,n.Icon.set("line-height",s.default),r.Config.prototype.controls.lineHeight={command:"applyLineHeight",tooltip:"Line height",list:[1,1.1,1.2,1.3,1.4,1.5,2],exec:(e,t,{control:i})=>(0,o.memorizeExec)(e,t,{control:i},e=>e)}},28143:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return o},de:function(){return o},es:function(){return o},fa:function(){return o},fi:function(){return o},fr:function(){return o},he:function(){return o},hu:function(){return o},id:function(){return o},it:function(){return o},ja:function(){return o},ko:function(){return o},mn:function(){return o},nl:function(){return o},pl:function(){return o},pt_br:function(){return o},ru:function(){return o},sk:function(){return o},tr:function(){return o},ua:function(){return o},zh_cn:function(){return o},zh_tw:function(){return o}});var o=i(41324)},61019:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(580),s=i(21537),a=i(50911);i(26295);var l=i(28143);class c extends a.Plugin{afterInit(e){(0,s.css)(e.editor,{lineHeight:e.o.defaultLineHeight}),e.registerCommand("applyLineHeight",this.applyLineHeight)}applyLineHeight(e,t,i){let o,{s:r,createInside:a,editor:l,o:c}=this.j;r.isFocused()||r.focus(),r.save();let d=e=>{let t=n.Dom.closest(e,n.Dom.isBlock,l);t||(t=n.Dom.wrap(e,c.enter,a));let r=(0,s.css)(t,"lineHeight");void 0===o&&(o=r.toString()!==i.toString()),(0,s.css)(t,"lineHeight",o?i:null)};try{if(r.isCollapsed()){let e=a.fake();n.Dom.safeInsertNode(r.range,e),d(e),n.Dom.safeRemove(e)}else r.eachSelection(d)}finally{r.restore()}}beforeDestruct(e){(0,s.css)(e.editor,{lineHeight:null})}constructor(e){super(e),this.buttons=[{name:"lineHeight",group:"font"}],(0,r.extendLang)(l)}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],c.prototype,"applyLineHeight",null),r.pluginSystem.add("lineHeight",c)},53259:function(e,t){"use strict";t.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"> <path d="M2.6667 5.3333h9.3333M2.6667 12H12M2.6667 18.6667h9.3333" stroke-width="2.6667" stroke-linecap="butt"/><path d="M18 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg> '},5827:function(e,t,i){"use strict";var o=i(2748),n=i(12153),r=i(6441),s=i(27190),a=i(42345),l=i(10411);r.Config.prototype.link={formTemplate:l.formTemplate,followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,processTypedLink:!1,typedLinkTlds:[],typedLinkFileEndings:["zip","mov","md","py","sh","pub"],deriveUrlFromText:!1,noFollowCheckbox:!0,openInNewTabCheckbox:!0,openInNewTabCheckboxDefaultChecked:!1,ariaLabelInput:!1,modeClassName:"input",selectMultipleClassName:!0,preventReadOnlyNavigation:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:["ctrl+k","cmd+k"]},n.Icon.set("link",s.default).set("unlink",a.default),r.Config.prototype.controls.unlink={exec(e,t){let i=o.Dom.closest(t,"a",e.editor);i&&o.Dom.unwrap(i),e.synchronizeValues(),e.e.fire("hidePopup")},tooltip:"Unlink"},r.Config.prototype.controls.link={isActive(e){let t=e.s.current();return!!(t&&o.Dom.closest(t,"a",e.editor))},popup:(e,t,i)=>e.e.fire("generateLinkForm.link",t,i),tags:["a"],tooltip:"Insert link"}},27190:function(e,t){"use strict";t.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"> <path d="m10 7 3-3a5 5 0 0 1 7 7l-3 3M14 17l-3 3a5 5 0 0 1-7-7l3-3m1 6 8-8"/> </g> </svg> '},42345:function(e,t){"use strict";t.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"> <path d="m14 5 1-1a3.5 3.5 0 0 1 5 5l-1 1M10 19l-1 1a3.5 3.5 0 0 1-5-5l1-1M4 10l6-6m4 16 6-6"/> </g> </svg> '},65517:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(22732),s=i(580),a=i(21537),l=i(50911),c=i(48538),d=i(12153),u=i(56917);i(5827);var h=i(58970),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class m extends l.Plugin{afterInit(e){e.o.link.followOnDblClick&&e.e.on("dblclick.link",this.__onDblClickOnLink),e.e.on(e.editor,"click.link",this.__onClickReadOnlyLink),e.o.link.processPastedLink&&e.e.on("processPaste.link",this.onProcessPasteLink),e.o.link.processTypedLink&&(this.__linkAfterEnter=e.async.microDebounce(this.__linkTyped),e.e.on("input.link",this.__onTypedSpace).on("beforeEnter.link",this.__onBeforeEnter).on("afterEnter.link",this.__onAfterEnter).on("mousedown.link blur.link beforeCommand.link",this.__forgetLink).on("keydown",this.__onKeyDown,{top:!0})),e.e.on("generateLinkForm.link",this.__generateForm),e.registerCommand("openLinkDialog",{exec:()=>{let t=e.dlg({resizable:!1}),i=this.__generateForm(e.s.current(),()=>{t.close()});i.container.classList.add("jodit-dialog_alert"),t.setContent(i),t.open(),e.async.requestIdleCallback(()=>{let{url_input:e}=(0,a.refs)(i.container);null==e||e.focus()})},hotkeys:e.o.link.hotkeys})}__onDblClickOnLink(e){if(!r.Dom.isTag(e.target,"a"))return;let t=(0,a.attr)(e.target,"href");t&&(location.href=t,e.preventDefault())}onProcessPasteLink(e,t){var i,o,n,r;let{jodit:s}=this;if((0,a.isURL)(t)&&s.o.link.processPastedLink){if(s.e.stopPropagation("processPaste"),s.o.link.processVideoLink){let e=(0,a.call)(null!=(o=null==(i=s.o.video)?void 0:i.parseUrlToVideoEmbed)?o:a.convertMediaUrlToVideoEmbed,t,{width:null==(n=s.o.video)?void 0:n.defaultWidth,height:null==(r=s.o.video)?void 0:r.defaultHeight});if(e!==t){let t=(0,a.prepareEmbedCode)(s,e);return(0,a.isString)(t)?s.createInside.fromHTML(t):t}}if(s.s.isCollapsed()){let e=s.createInside.element("a");return(0,a.attr)(e,"href",t),e.textContent=t,s.e.fire("applyLink",s,e,null),e}return s.s.commitStyle({element:"a",attributes:{href:t}}),!0}}__generateForm(e,t){let i,n,{jodit:l}=this,p=l.i18n.bind(l),{openInNewTabCheckbox:m,openInNewTabCheckboxDefaultChecked:f,noFollowCheckbox:g,formTemplate:b,formClassName:v,modeClassName:y}=l.o.link,w=b(l),_=(0,a.isString)(w)?l.c.fromHTML(w,{target_checkbox_box:m,nofollow_checkbox_box:g}):w,k=r.Dom.isElement(_)?_:_.container,C=(0,a.refs)(k),{insert:S,unlink:x,content_input_box:E}=C,{target_checkbox:I,nofollow_checkbox:T,url_input:j}=C,D=r.Dom.isImage(e),{content_input:A}=C,{className_input:P}=C,{className_select:M}=C,{aria_label_input:L}=C;A||(A=l.c.element("input",{type:"hidden",ref:"content_input"})),v&&k.classList.add(v),D&&r.Dom.hide(E);let R=()=>n?n.innerText:(0,a.stripTags)(l.s.range.cloneContents(),l.ed);n=!!(e&&r.Dom.closest(e,"a",l.editor))&&r.Dom.closest(e,"a",l.editor),!D&&e&&(A.value=R()),L&&(L.value=n&&(0,a.attr)(n,"aria-label")||""),n?(j.value=(0,a.attr)(n,"href")||"",y&&function(e,t,i,o){switch(e){case"input":t&&(t.value=(0,a.attr)(i,"class")||"");break;case"select":if(o){for(let e=0;e<o.selectedOptions.length;e++){let t=o.options.item(e);t&&(t.selected=!1)}((0,a.attr)(i,"class")||"").split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{if(e)for(let t=0;t<o.options.length;t++){let i=o.options.item(t);(null==i?void 0:i.value)&&i.value.split(/\s+/).map(e=>e.trim()).includes(e)&&(i.selected=!0)}})}}}(y,P,n,M),m&&I&&(I.checked="_blank"===(0,a.attr)(n,"target")),g&&T&&(T.checked=((0,a.attr)(n,"rel")||"").split(/\s+/).includes("nofollow")),S.textContent=p("Update")):(r.Dom.hide(x),l.o.link.deriveUrlFromText&&j&&!D&&!j.value.trim()&&(j.value=!(i=A.value.trim())||/\s/.test(i)?"":/^(https?:|mailto:|tel:|ftp:|#|\/|\.{1,2}\/)/i.test(i)?i:h.EMAIL.test(i)?"mailto:"+i:/^[a-z0-9-]+(\.[a-z0-9-]+)+(\/\S*)?$/i.test(i)?"https://"+i:""),m&&I&&(I.checked=f)),function(e,t,i,n){let l=(0,a.getAnchors)(e.editor),h=null==t?void 0:t.closest(".jodit-ui-input__wrapper"),p=h&&c.UIElement.closestElement(h,c.UIElement);if(!h||!p||!l.length)return;let{c:m}=e,f=e.i18n("Link to an anchor"),g=m.element("button",{type:"button",class:"jodit-link-anchors__toggle",title:f,"aria-label":f}),b=m.div("jodit-link-anchors__heading",{id:"jodit-link-anchors-"+(0,s.uniqueUid)()}),v=m.div("jodit-link-anchors",{role:"group","aria-labelledby":b.id}),y=t=>{var i;return null!=(i=d.Icon.makeIcon(e,{name:t,iconURL:"",fill:"",scale:void 0}))?i:m.span()},w=new u.Popup(e).setMod("padding",!1),_=[],k="",C=()=>{var e;w.isOpened||(w.parentElement||(w.parentElement=p),v.style.minWidth=h.offsetWidth+"px",w.open(()=>(0,a.position)(h)),(0,a.attr)(g,"aria-expanded",!0),_.forEach((e,i)=>(0,a.attr)(e,"aria-current",t.value==="#"+(0,a.getAnchorName)(l[i]))),null==(e=v.querySelector("[aria-current=true]"))||e.scrollIntoView({block:"nearest"}))};g.append(y("chevron")),(0,a.attr)(g,"aria-expanded",!1),b.textContent=e.i18n("On this page"),v.appendChild(b),w.setContent(v),l.forEach(o=>{var s;let l,c,d=(0,a.getAnchorName)(o),u=((l=e.ed.createRange()).selectNodeContents(null!=(s=r.Dom.up(o,r.Dom.isBlock,e.editor))?s:e.editor),l.setStartAfter(o),((c=l.toString().replace(/\s+/g," ").trim()).length>50?c.slice(0,50).replace(/\s+\S*$/,"")+"…":c)||d),h=m.element("button",{type:"button",tabindex:-1,class:"jodit-link-anchors__item"});_.push(h);let p=m.span("jodit-link-anchors__text");p.textContent=u;let f=m.span("jodit-link-anchors__name");f.textContent="#"+d,h.append(y("anchor"),p,f),v.appendChild(h),e.e.on(h,"click",()=>{w.close(),t.value="#"+d,n||i.value.trim()&&i.value!==k||(i.value=k=u),t.focus()})});let S=!1;e.e.on(w,"beforeClose",()=>(0,a.attr)(g,"aria-expanded",!1)).on(g,"mousedown",()=>S=w.isOpened).on(g,"click",()=>{S||w.isOpened?w.close():C(),S=!1}).on(t,"input.anchors",()=>{t.value&&!t.value.startsWith("#")&&w.close()}).on(t,"keydown.anchors",e=>{e.key===o.KEY_DOWN&&(e.preventDefault(),C(),_[0].focus()),e.key===o.KEY_ESC&&w.isOpened&&(e.stopPropagation(),w.close())}).on(v,"keydown",e=>{var i;let n=_.indexOf(e.target);(e.key===o.KEY_DOWN||e.key===o.KEY_UP)&&(e.preventDefault(),null==(i=_[n+(e.key===o.KEY_DOWN?1:-1)])||i.focus()),e.key===o.KEY_ESC&&(e.stopPropagation(),w.close(),t.focus())}),p.hookStatus("destructed",()=>{w.destruct(),e.e.off([g,v,..._]).off(t,".anchors")}),r.Dom.after(t,g)}(l,j,A,D),l.editor.normalize();let B=l.history.snapshot.make();x&&l.e.on(x,"click",e=>{l.s.restore(),l.history.snapshot.restore(B),n&&r.Dom.unwrap(n),l.synchronizeValues(),t(),e.preventDefault()});let z=()=>{let e;if(!j.value.trim().length)return j.focus(),j.classList.add("jodit_error"),!1;l.s.restore(),l.s.removeMarkers(),l.editor.normalize(),l.history.snapshot.restore(B);let i=R()!==A.value.trim(),o=l.createInside,s=null;if(n&&r.Dom.isOrContains(l.editor,n))e=[n];else{if(l.s.isCollapsed()){let t=o.element("a");l.s.insertNode(t,!1,!1),e=[t],s=t}else{let t=l.s.current();e=r.Dom.isTag(t,"img")?[r.Dom.wrap(t,"a",o)]:l.s.wrapInTag("a")}e.forEach(e=>l.s.select(e))}return e.forEach(e=>{var t;let o;if((0,a.attr)(e,"href",j.value),function(e,t,i,o){var n;if(e&&(null!=t?t:i)){if("input"===e)""===t.value&&o.hasAttribute("class")&&(0,a.attr)(o,"class",null),""!==t.value&&(0,a.attr)(o,"class",t.value);else if("select"===e){o.hasAttribute("class")&&(0,a.attr)(o,"class",null);for(let e=0;e<i.selectedOptions.length;e++){let t=null==(n=i.selectedOptions.item(e))?void 0:n.value;t&&t.split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{o.classList.add(e)})}}}}(y,P,M,e),D||(t=A,o=e.textContent,t.value.trim().length?i&&(o=t.value):o=j.value,o!==e.textContent&&(e.textContent=o)),m&&I&&(0,a.attr)(e,"target",I.checked?"_blank":null),g&&T){let t=((0,a.attr)(e,"rel")||"").split(/\s+/).filter(Boolean),i=t.includes("nofollow");T.checked&&!i?t.push("nofollow"):!T.checked&&i&&t.splice(t.indexOf("nofollow"),1),(0,a.attr)(e,"rel",t.length?t.join(" "):null)}if(L){let t=L.value.trim();(0,a.attr)(e,"aria-label",t||null)}l.e.fire("applyLink",l,e,_)}),s&&l.s.setCursorAfter(s),l.synchronizeValues(),t(),!1};return r.Dom.isElement(_)?l.e.on(_,"submit",e=>(e.preventDefault(),e.stopImmediatePropagation(),z(),!1)):_.onSubmit(z),_}beforeDestruct(e){e.e.off("generateLinkForm.link",this.__generateForm).off("dblclick.link",this.__onDblClickOnLink).off(e.editor,"click.link",this.__onClickReadOnlyLink).off("processPaste.link",this.onProcessPasteLink).off("input.link",this.__onTypedSpace).off("beforeEnter.link",this.__onBeforeEnter).off("afterEnter.link",this.__onAfterEnter).off("mousedown.link blur.link beforeCommand.link",this.__forgetLink).off("keydown",this.__onKeyDown)}__onTypedSpace(e){if("insertText"!==e.inputType||!e.data||/\S/.test(e.data))return;let{range:t}=this.j.s;t.collapsed&&this.__linkTyped(t.startContainer,t.startOffset-e.data.length)}__onBeforeEnter(){let{range:e}=this.j.s;this.__enteredAt=e.collapsed?[e.startContainer,e.startOffset]:null}__onAfterEnter(){this.__enteredAt&&(this.__linkAfterEnter(...this.__enteredAt),this.__enteredAt=null)}__forgetLink(){this.__justLinked=null}__onKeyDown(e){let{jodit:t}=this;if(t.o.readonly)return;let i=this.__justLinked,n=e.ctrlKey||e.metaKey||e.altKey;if(g.has(e.key)||(this.__justLinked=null),e.key===o.KEY_BACKSPACE&&!n&&(null==i?void 0:i.isConnected))return this.__recordStep(),t.s.save(),r.Dom.unwrap(i),t.s.restore(),this.__recordStep(),t.e.stopPropagation("keydown"),!1;let{range:s}=t.s;e.key===o.KEY_TAB&&!n&&s.collapsed&&this.__linkTyped(s.startContainer,s.startOffset)}__linkTyped(e,t){let{jodit:i}=this;if(!r.Dom.isText(e)||!e.isConnected||t<0||t>e.length||r.Dom.closest(e,f,i.editor))return;let o=(0,h.findTypedLink)(e.data,t,i.o.link.typedLinkTlds,i.o.link.typedLinkFileEndings);if(!o)return;let[n,s,l]=o;this.__recordStep(),i.s.save();let c=i.ed.createRange();c.setStart(e,n),c.setEnd(e,s);let d=i.createInside.element("a");(0,a.attr)(d,"href",l),c.surroundContents(d),i.s.restore(),i.e.fire("applyLink",i,d,null),this.__recordStep(),this.__justLinked=d}__recordStep(){this.j.setEditorValue(),this.j.e.fire("internalChange")}__onClickReadOnlyLink(e){let{jodit:t}=this;t.o.readonly&&t.o.link.preventReadOnlyNavigation&&r.Dom.isTag(e.target,"a")&&e.preventDefault()}constructor(){super(...arguments),this.buttons=[{name:"link",group:"insert"}],this.__enteredAt=null,this.__linkAfterEnter=()=>{},this.__justLinked=null}}p([n.autobind],m.prototype,"__onDblClickOnLink",null),p([n.autobind],m.prototype,"onProcessPasteLink",null),p([n.autobind],m.prototype,"__generateForm",null),p([n.autobind],m.prototype,"__onTypedSpace",null),p([n.autobind],m.prototype,"__onBeforeEnter",null),p([n.autobind],m.prototype,"__onAfterEnter",null),p([n.autobind],m.prototype,"__forgetLink",null),p([n.autobind],m.prototype,"__onKeyDown",null),p([n.autobind],m.prototype,"__linkTyped",null),p([n.autobind],m.prototype,"__onClickReadOnlyLink",null);let f=new Set(["a","pre","code"]),g=new Set(["Shift","Control","Alt","Meta","CapsLock"]);s.pluginSystem.add("link",m)},10411:function(e,t,i){"use strict";var o=i(62843),n=i(2525);i.d(t,["formTemplate",0,e=>{let{openInNewTabCheckbox:t,noFollowCheckbox:i,ariaLabelInput:r,modeClassName:s,selectSizeClassName:a,selectMultipleClassName:l,selectOptionsClassName:c}=e.o.link;return new n.UIForm(e,[new n.UIBlock(e,[new n.UIInput(e,{name:"url",type:"url",ref:"url_input",label:"URL",placeholder:"http://",required:!0})]),r?new n.UIBlock(e,[new n.UIInput(e,{name:"ariaLabel",ref:"aria_label_input",label:"Aria label"})]):null,new n.UIBlock(e,[new n.UIInput(e,{name:"content",ref:"content_input",label:"Text"})],{ref:"content_input_box"}),s?new n.UIBlock(e,["input"===s?new n.UIInput(e,{name:"className",ref:"className_input",label:"Class name"}):"select"===s?new n.UISelect(e,{name:"className",ref:"className_select",label:"Class name",size:a,multiple:l,options:c}):null]):null,t?new n.UICheckbox(e,{name:"target",ref:"target_checkbox",label:"Open in new tab"}):null,i?new n.UICheckbox(e,{name:"nofollow",ref:"nofollow_checkbox",label:"No follow"}):null,new n.UIBlock(e,[new o.UIButton(e,{name:"unlink",variant:"default",text:"Unlink"}),new o.UIButton(e,{name:"insert",type:"submit",variant:"primary",text:"Insert"})],{align:"full"})])}])},67272:function(e,t,i){"use strict";let o=new Set(`
235
235
  app biz casino click cloud club com dev edu gov info live net online org pro
236
236
  shop site space store tech top vip xyz
237
237
  ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi
@@ -247,7 +247,7 @@
247
247
  `.trim().split(/\s+/));i.d(t,["TLDS",0,o])},58970:function(e,t,i){"use strict";i.d(t,{findTypedLink:function(){return d}});var o=i(26049),n=i(67272);let r=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,s=new Set(["(","[",'"',"'","“","‘","<"]),a=new Set([".",",",";",":","!","?",'"',"'","”","’",">"]),l={")":"(","]":"["},c=/^[a-z\d][a-z\d-]{0,62}$/i;function d(e,t,i,d){var u;let h,p,m,f,g=t;for(;g>0&&!/\s/.test(e[g-1]);)g-=1;for(;g<t&&s.has(e[g]);)g+=1;for(;t>g;){let i=e[t-1],o=l[i];if(a.has(i)||o&&!e.slice(g,t-1).includes(o))t-=1;else break}let b=(u=e.slice(g,t),h=u.replace(/^mailto:/i,""),r.test(h)?"mailto:"+h:/^www\.[^\s.]+\.\S+$/i.test(u)||(f=(m=((p=u.search(/[/?#]/))<0?u:u.slice(0,p)).split("."))[m.length-1],m.length>1&&m.every(e=>c.test(e)&&!e.endsWith("-"))&&(n.TLDS.has(f)||i.includes(f))&&!d.includes(f)&&/[a-z]/i.test(m[0]))?"https://"+u:/^[a-z][a-z\d+.-]*:\/\//i.test(u)&&(0,o.isURL)(u)?u:"");return b?[g,t,b]:null}i.d(t,["EMAIL",0,r])},757:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.mediaFakeTag="jodit-media",o.Config.prototype.mediaInFakeBlock=!0,o.Config.prototype.mediaBlocks=["video","audio"],o.Config.prototype.mediaWrappers={}},20071:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(76241),a=i(43555),l=i(41180);i(757),r.pluginSystem.add("media",function(e){let t="jodit_fake_wrapper",{mediaFakeTag:i,mediaBlocks:c,mediaInFakeBlock:d,mediaWrappers:u}=e.options,h=Object.values(u);h.length&&e.e.on("afterInit",()=>{let t=e=>[...new Set(e)].join(","),i=({tag:e,className:t})=>`.jodit-wysiwyg ${e}.${t}`,n=t(h.filter(({tag:e})=>o.IS_INLINE.test(e)).map(i)),s=t(h.flatMap(e=>c.map(t=>`${i(e)}>${t}`)));(0,r.getContainer)(e,"media-wrappers","style",!0).innerHTML=(n?`:where(${n}){display:inline-block}`:"")+`${s}{pointer-events:none}`}),(d||Object.keys(u).length)&&e.e.on("afterGetValueFromEditor",e=>{e.value=(0,s.unwrapMarkedTags)(e.value,i,"data-"+t)}).on("change afterInit afterSetMode changePlace",e.async.debounce(()=>{e.isDestructed||e.getMode()===o.MODE_SOURCE||(0,a.$$)(c.join(","),e.editor).forEach(o=>{(0,a.dataBind)(o,t)||((0,a.dataBind)(o,t,!0),(o=>{var r;if(o.parentNode&&(0,a.attr)(o.parentNode,"data-jodit_iframe_wrapper"))o=o.parentNode;else if(u[o.nodeName.toLowerCase()])o=null!=(r=(0,a.getMediaWrapper)(e,o))?r:(0,a.wrapMedia)(e,o);else{if(!d)return;let r=o,s=e.createInside.element(i,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,["data-"+t]:1});(0,a.attr)(s,"style",(0,a.attr)(o,"style"));let c=()=>{let e=(0,l.cssInline)(r,"width").endsWith("%");(0,l.css)(s,{display:!e&&/^inline/.test((0,l.css)(r,"display").toString())?"inline-block":"block",width:e?"":"fit-content",height:""})};c(),e.e.on(r,"changesize",c),o.parentNode&&n.Dom.before(o,s),n.Dom.append(s,o),o=s}e.e.off(o,"mousedown.select touchstart.select").on(o,"mousedown.select touchstart.select",()=>{e.s.select(o)})})(o))})},e.defaultTimeout))})},37585:function(e,t,i){"use strict";var o=i(82758),n=i(21537),r=i(41180),s=i(6441),a=i(11676),l=i(21491);s.Config.prototype.mobileTapTimeout=300,s.Config.prototype.toolbarAdaptive=!0,s.Config.prototype.buttonsMD=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"media",buttons:[]},`
248
248
  `,{group:"state",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},"---",{group:"history",buttons:[]},{group:"other",buttons:[]},"|","dots"],s.Config.prototype.buttonsSM=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},"---",{group:"font",buttons:[]},`
249
249
  `,{group:"state",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},"---",{group:"history",buttons:[]},"|","dots"],s.Config.prototype.buttonsXS=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},"---",{group:"font",buttons:[]},{group:"color",buttons:[]},"---","dots"],s.Config.prototype.controls.dots={mode:o.MODE_SOURCE+o.MODE_WYSIWYG,popup(e,t,i,o){let s=o.control.data;return void 0===s&&(s={toolbar:(0,l.makeCollection)(e),rebuild(){var t,i;if(o){let l=e.e.fire("getDiffButtons.mobile",o.closest(a.ToolbarCollection));if(l&&s){s.toolbar.build((0,n.splitArray)(l));let o=(null==(i=null==(t=e.toolbar)?void 0:t.firstButton)?void 0:i.container.offsetWidth)||36;(0,r.css)(s.toolbar.container,"width",(o+4)*3)}}}},o.control.data=s),s.rebuild(),s.toolbar},tooltip:"Show all"}},32309:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(21537),s=i(70799),a=i(43649);i(37585);let l=e=>"|"===e||"---"===e||`
250
- `===e;function c(e,t){var i;let o=(0,a.flatButtonsSet)((0,r.splitArray)(t.o.buttons),t),n=t.getRegisteredButtonGroups(),s=!1,c=!1,d=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...null!=(i=n[t.group])?i:[]],r=e.filter(e=>o.has(e));r.length!==e.length&&(s=!0),d.push(...r)}else l(t)?d.push(t):"dots"===t?c=!0:o.has(t)?d.push(t):s=!0;if(!s)return e;let u=[];for(let e of d)l(e)&&(0===u.length||l(u[u.length-1]))||u.push(e);for(;u.length&&l(u[u.length-1]);)u.pop();if(c){let e=(0,a.flatButtonsSet)(u,t);(0,r.toArray)(o).some(t=>!e.has(t))&&u.push("dots")}return u}n.pluginSystem.add("mobile",function(e){let t=0,i=(0,r.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",i=>{if(i.changedTouches&&i.changedTouches.length){let o=new Date().getTime(),n=o-t;n>e.o.mobileTapTimeout&&(t=o,n<1.5*e.o.mobileTapTimeout&&e.s.insertCursorAtPoint(i.clientX,i.clientY))}}),e.e.on("getDiffButtons.mobile",t=>{if(t===e.toolbar){let t=(0,a.flatButtonsSet)((0,r.splitArray)(e.o.buttons),e),o=(0,a.flatButtonsSet)(i,e);return(0,r.toArray)(t).reduce((e,t)=>(o.has(t)||e.push(t),e),[])}}),e.o.toolbarAdaptive&&e.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace",()=>{var t;if(!e.o.toolbar)return;let n=(()=>{if(e.isFullSize)return(0,r.splitArray)(e.o.buttons);let t=function(e){var t;let{toolbar:i}=e.o;if((0,s.isString)(i)||o.Dom.isHTMLElement(i)){let t=e.toolbarContainer.offsetWidth;if(t)return t}return e.container.offsetWidth||(null!=(t=e.container.parentElement)?t:e.container).offsetWidth}(e);return t>=e.o.sizeLG?(0,r.splitArray)(e.o.buttons):t>=e.o.sizeMD?c((0,r.splitArray)(e.o.buttonsMD),e):t>=e.o.sizeSM?c((0,r.splitArray)(e.o.buttonsSM),e):c((0,r.splitArray)(e.o.buttonsXS),e)})();n.toString()!==i.toString()&&(i=n,e.e.fire("closeAllPopups"),null==(t=e.toolbar)||t.setRemoveButtons(e.o.removeButtons).build(i.concat(e.o.extraButtons)))}).on(e.ow,"load resize",()=>e.e.fire("recalcAdaptive"))})},57951:function(e,t,i){"use strict";var o=i(86583),n=i(12153),r=i(6441),s=i(13465),a=i(50267),l=i(83086);let c="start",d=(e,t,{control:i})=>{var n;let r="button"+i.command,s=null!=(n=i.args&&i.args[0])?n:(0,o.dataBind)(e,r);s===c?(0,l.openStartDialog)(e):((0,o.dataBind)(e,r,s),e.execCommand(i.command,!1,"default"===s?null:s))};n.Icon.set("ol",s.default).set("ul",a.default),r.Config.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:d},r.Config.prototype.controls.ol={command:"insertOrderedList",tags:["ol"],tooltip:"Insert Ordered List",list:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman",[c]:"Start at..."},exec:d,isChildDisabled(e,t){var i;return(null==(i=t.control.args)?void 0:i[0])===c&&!(0,l.closestOrderedList)(e)}}},13465:function(e,t){"use strict";t.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"> <path d="M10.6667 6.6667h10.6666M10.6667 17.3333h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="m2.5 5 2.5-2v7M2.5 10h5M2.5 16a2.5 2.5 0 0 1 5 0c0 1.5-1.5 2.5-5 5h5" stroke-width="2" /> </g> </svg> '},50267:function(e,t){"use strict";t.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"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg> '},64837:function(e,t,i){"use strict";var o=i(65478),n=i(580),r=i(50911);i(57951);class s extends r.Plugin{afterInit(e){e.registerCommand("insertUnorderedList",this.onCommand).registerCommand("insertOrderedList",this.onCommand)}onCommand(e,t,i){return this.jodit.s.commitStyle({element:"insertunorderedlist"===e?"ul":"ol",attributes:{style:{listStyleType:null!=i?i:null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}constructor(){super(...arguments),this.buttons=[{name:"ul",group:"list"},{name:"ol",group:"list"}]}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"onCommand",null),n.pluginSystem.add("orderedList",s)},83086:function(e,t,i){"use strict";i.d(t,{closestOrderedList:function(){return a},openStartDialog:function(){return l}});var o=i(2748),n=i(29960),r=i(62843),s=i(2525);function a(e){let t=e.s.current();return t?o.Dom.closest(t,"ol",e.editor):null}function l(e){let t=a(e);if(!t)return;let i=e.dlg({resizable:!1,closeOnClickOverlay:!0}),o=new s.UIInput(e,{name:"start",type:"number",label:"Number for the first item",value:t.start}),l=new s.UIForm(e,[new s.UIBlock(e,[o])]);l.container.classList.add("jodit-dialog_alert"),l.onSubmit(({start:r})=>{let s=""===r?1:parseInt(r,10);if(isNaN(s))return o.focus(),!1;i.close(),(0,n.attr)(t,"start",1===s?null:s),e.synchronizeValues()}),e.s.save(),i.e.on(i,"afterClose",()=>{e.s.focus(),e.s.restore()}),i.setFooter([(0,r.Button)(e,"cancel","Cancel").onAction(()=>i.close()),(0,r.Button)(e,"ok","Apply","primary").onAction(()=>l.submit())]),i.open(l,e.i18n("Start numbering at"),!0,!0),o.focus(),o.nativeInput.select()}},71842:function(e,t,i){"use strict";var o=i(82758),n=i(6441);n.Config.prototype.askBeforePasteFromWord=!0,n.Config.prototype.processPasteFromWord=!0,n.Config.prototype.defaultActionOnPasteFromWord=null,n.Config.prototype.pasteFromWordActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Clean"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}]},31571:function(e,t,i){"use strict";i.d(t,{pasteFromWord:function(){return c}});var o=i(82758),n=i(65478),r=i(580),s=i(21537),a=i(50911);i(71842);var l=i(117);class c extends a.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,i){let{j:o}=this,{processPasteFromWord:n,askBeforePasteFromWord:r,defaultActionOnPasteFromWord:a,defaultActionOnPaste:c,pasteFromWordActionList:d}=o.o;return!!(n&&(0,s.isHtmlFromWord)(t))&&(r?(0,l.askInsertTypeDialog)(o,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected",o=>{this.insertFromWordByType(e,t,o,i)},d):this.insertFromWordByType(e,t,a||c,i),!0)}insertFromWordByType(e,t,i,n){var r;switch(i){case o.INSERT_AS_HTML:{t=(0,s.applyStyles)(t);let e=null==(r=this.j.events)?void 0:r.fire("beautifyHTML",t);(0,s.isString)(e)&&(t=e);break}case o.INSERT_AS_TEXT:t=(0,s.cleanFromWord)(t);break;case o.INSERT_ONLY_TEXT:t=(0,s.stripTags)((0,s.cleanFromWord)(t),this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText)}(0,l.pasteInsertHtml)(e,this.j,t)}}c.requires=["paste"],function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":processHTML")],c.prototype,"processWordHTML",null),r.pluginSystem.add("pasteFromWord",c)},85407:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537),a=i(20356),l=i(10830);class c extends a.Plugin{createDialog(){this.dialog=this.j.dlg();let e=(0,l.Button)(this.j,"paste","Paste","primary");e.onAction(this.paste);let t=(0,l.Button)(this.j,"","Cancel");t.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add("jodit-paste-storage"),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),n.Dom.append(this.container,this.listBox),n.Dom.append(this.container,this.previewBox),this.dialog.setHeader(this.j.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([e,t]),this.j.e.on(this.listBox,"click dblclick",e=>{let t=e.target;return n.Dom.isTag(t,"a")&&t.hasAttribute("data-index")&&this.selectIndex(parseInt((0,s.attr)(t,"-index")||"0",10)),"dblclick"===e.type&&this.paste(),!1})}afterInit(){this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage",()=>this.list.length).on("afterCopy.paste-storage",e=>{-1!==this.list.indexOf(e)&&this.list.splice(this.list.indexOf(e),1),this.list.unshift(e),this.list.length>5&&(this.list.length=5)}),this.j.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(".paste-storage"),n.Dom.safeRemove(this.previewBox),n.Dom.safeRemove(this.listBox),n.Dom.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){let e=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=e}this.dialog&&this.dialog.close(),this.j.synchronizeValues(),this.j.e.fire("afterPaste")},this.onKeyDown=e=>{let t=this.currentIndex;if(-1!==[o.KEY_UP,o.KEY_DOWN,o.KEY_ENTER].indexOf(e.key)){if(e.key===o.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===o.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===o.KEY_ENTER)return void this.paste();t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}},this.selectIndex=e=>{this.listBox&&(0,s.toArray)(this.listBox.childNodes).forEach((t,i)=>{t.classList.remove("jodit_active"),e===i&&this.previewBox&&(t.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[e],t.focus())}),this.currentIndex=e},this.showDialog=()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&n.Dom.detach(this.listBox),this.previewBox&&n.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let i=this.j.c.element("a");i.textContent=t+1+". "+e.replace((0,o.SPACE_REG_EXP)(),""),this.j.e.on(i,"keydown",this.onKeyDown),(0,s.attr)(i,"href","#"),(0,s.attr)(i,"data-index",t.toString()),(0,s.attr)(i,"tab-index","-1"),this.listBox&&n.Dom.append(this.listBox,i)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))}}}r.pluginSystem.add("pasteStorage",c)},84380:function(e,t,i){"use strict";var o=i(82758),n=i(6441),r=i(117);n.Config.prototype.askBeforePasteHTML=!0,n.Config.prototype.processPasteHTML=!0,n.Config.prototype.scrollToPastedContent=!0,n.Config.prototype.pasteExcludeStripTags=["br","hr"],n.Config.prototype.pasteHTMLActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Insert as Text"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}],n.Config.prototype.memorizeChoiceWhenPasteFragment=!1,n.Config.prototype.nl2brInPlainText=!0;let s="pasteStorage";n.Config.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(e,t,{control:i}){var n;if(i.name===s)return void e.execCommand("showPasteStorage");e.s.focus();let a="",l=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],i=(null==(n=t.types)?void 0:n.includes(o.TEXT_HTML))?o.TEXT_HTML:o.TEXT_PLAIN,r=await t.getType(i);a=await new Response(r).text()}l=!1}catch(e){o.IS_PROD}if(l)try{a=await navigator.clipboard.readText(),l=!1}catch(e){o.IS_PROD}}l&&(l=0===(a=e.buffer.get(o.CLIPBOARD_ID)||"").length);let c=e.value;l?(e.ed.execCommand("paste"),(l=c===e.value)||e.e.fire("afterPaste")):a.length?((0,r.pasteInsertHtml)(null,e,a),e.e.fire("afterPaste")):l&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},list:{[s]:"Paste Storage"},isChildDisabled:e=>2>e.e.fire("pasteStorageList")}},117:function(e,t,i){"use strict";i.d(t,{askInsertTypeDialog:function(){return h},getAllTypes:function(){return u},pasteInsertHtml:function(){return d},removeGoogleDocsWrapper:function(){return c}});var o=i(82758),n=i(2748),r=i(4510),s=i(27613),a=i(76241),l=i(10830);function c(e){if(!/docs-internal-guid-/i.test(e))return e;let{body:t}=new DOMParser().parseFromString(e,"text/html");return(0,r.toArray)(t.querySelectorAll('b[id^="docs-internal-guid-"]')).forEach(n.Dom.unwrap),t.innerHTML}function d(e,t,i){var o;let r,l;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let d=t.e.fire("beforePasteInsert",i);!(0,s.isVoid)(d)&&((0,s.isString)(d)||(0,s.isNumber)(d)||n.Dom.isNode(d))&&(i=d),(0,s.isString)(i)&&(o=c(i),-1!==(r=(o=(0,a.removeTagsByPrefix)(o,["<meta"])).search(/<!--StartFragment-->/i))&&(o=o.substring(r+20)),-1!==(l=o.search(/<!--EndFragment-->/i))&&(o=o.substring(0,l)),i=o),t.s.insertHTML(i)}function u(e){let t=e.types,i="";if((0,s.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(let e=0;e<t.length;e+=1)i+=t[e]+";";else i=(t||o.TEXT_PLAIN).toString()+";";return i}function h(e,t,i,o,n){if(!1===e.e.fire("beforeOpenPasteDialog",t,i,o,n))return;let r=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(i)),s=n.map(({text:t,value:i})=>(0,l.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{r.close(),o(i)}));r.e.on(r,"beforeClose",()=>{e.e.fire("beforeClosePasteDialog",r)}).one(r,"afterClose",()=>{e.s.isFocused()||e.s.focus(),e.e.fire("afterClosePasteDialog",r)});let a=(0,l.Button)(e,{text:"Cancel",tabIndex:0}).onAction(()=>{r.close()});return r.setFooter([...s,a]),s[0].focus(),s[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",r,t,i,o,n),r}},79799:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(20356);i(84380);var c=i(117),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(e){e.e.on("paste.paste",this.onPaste).on("pasteStack.paste",e=>this.pasteStack.push(e)),this.j.e.on("processPaste.paste",this.onProcessPasteReplaceNl2Br)}beforeDestruct(e){e.e.off("paste.paste",this.onPaste).off("processPaste.paste",this.onProcessPasteReplaceNl2Br).off(".paste")}onPaste(e){try{if(!1===this.customPasteProcess(e)||!1===this.j.e.fire("beforePaste",e))return e.preventDefault(),!1;this.defaultPasteProcess(e)}finally{this.j.e.fire("afterPaste",e)}}customPasteProcess(e){if(!this.j.o.processPasteHTML)return;let t=(0,a.getDataTransfer)(e),i=[null==t?void 0:t.getData(o.TEXT_PLAIN),null==t?void 0:t.getData(o.TEXT_HTML),null==t?void 0:t.getData(o.TEXT_RTF)];for(let t of i)if((0,a.isHTML)(t)&&(this.j.e.fire("processHTML",e,t,{plain:i[0],html:i[1],rtf:i[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=(0,a.getDataTransfer)(e),i=(null==t?void 0:t.getData(o.TEXT_HTML))||(null==t?void 0:t.getData(o.TEXT_PLAIN));if(t&&i&&""!==(0,a.trim)(i)){let o=this.j.e.fire("processPaste",e,i,(0,c.getAllTypes)(t));void 0!==o&&(i=o),((0,a.isString)(i)||r.Dom.isNode(i))&&this.__insertByType(e,i,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let i=this.pasteStack.find(e=>e.html===t);if(i)return this.__insertByType(e,t,i.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let i=(0,c.askInsertTypeDialog)(this.j,"Your code is similar to HTML. Keep as HTML?","Paste as HTML",i=>{this._isDialogOpened=!1,this.__insertByType(e,t,i)},this.j.o.pasteHTMLActionList);return i&&(this._isDialogOpened=!0,i.e.on("beforeClose",()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,i){if(this.pasteStack.push({html:t,action:i}),(0,a.isString)(t))switch(this.j.buffer.set(o.CLIPBOARD_ID,t),i){case o.INSERT_CLEAR_HTML:t=(0,a.cleanFromWord)((0,c.removeGoogleDocsWrapper)(t));break;case o.INSERT_ONLY_TEXT:t=(0,a.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case o.INSERT_AS_TEXT:t=(0,a.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,a.nl2br)(t));break;default:{let o=this.j.e.fire("onCustomPasteHTMLOption",i,t,e);"string"==typeof o&&(t=o)}}(0,c.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,i){if(i===o.TEXT_PLAIN+";"&&!(0,a.isHTML)(t)){let e=(0,a.htmlspecialchars)(t);return this.j.o.nl2brInPlainText?(0,a.nl2br)(e):e}}constructor(){super(...arguments),this.pasteStack=new a.LimitedStack(20),this._isDialogOpened=!1}}d([n.autobind],u.prototype,"onPaste",null),d([n.autobind],u.prototype,"onProcessPasteReplaceNl2Br",null),s.pluginSystem.add("paste",u)},61926:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.showPlaceholder=!0,o.Config.prototype.placeholder="Type something",o.Config.prototype.useInputsPlaceholder=!0},59451:function(e,t,i){"use strict";i.d(t,{isEditorEmpty:function(){return u}});var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(78116),l=i(29960),c=i(41180),d=i(20356);function u(e){var t;return function(e){var t;if(!e.firstChild)return!0;let i=e.firstChild;if(r.Dom.isTag(i,"br")&&!r.Dom.next(i,Boolean,e))return!0;if(o.INSEPARABLE_TAGS.has(null==(t=i.nodeName)?void 0:t.toLowerCase())||/^(TABLE)$/i.test(i.nodeName))return!1;let n=r.Dom.next(i,e=>e&&!r.Dom.isEmptyTextNode(e),e);return r.Dom.isText(i)&&!n?r.Dom.isEmptyTextNode(i):!n&&r.Dom.each(i,e=>!(r.Dom.isLeaf(e)||r.Dom.isList(e))&&(r.Dom.isEmpty(e)||r.Dom.isTag(e,"br")))}(e)&&!(null==(t=e.textContent)?void 0:t.includes(o.NBSP_SPACE))}i(61926);class h extends d.Plugin{afterInit(e){e.o.showPlaceholder&&(this.placeholderElm=e.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${e.i18n(e.o.placeholder)}</span>`),"rtl"===e.o.direction&&(0,c.css)(this.placeholderElm,{right:0,direction:"rtl"}),e.e.on("readonly",e=>{e?this.hide():this.toggle()}).on("changePlace",this.addEvents),this.addEvents())}show(){let e=this.j;if(e.o.readonly)return;let t=0,i=0,o=e.s.current(),n=o&&r.Dom.closest(o,r.Dom.isBlock,e.editor)||e.editor,s=e.ew.getComputedStyle(n),l=e.ew.getComputedStyle(e.editor);r.Dom.append(e.workplace,this.placeholderElm);let{firstChild:d}=e.editor;if(r.Dom.isElement(d)&&!(0,a.isMarker)(d)){let o=e.ew.getComputedStyle(d);t=parseInt(o.getPropertyValue("margin-top"),10),i=parseInt(o.getPropertyValue("margin-left"),10),(0,c.css)(this.placeholderElm,{fontFamily:o.getPropertyValue("font-family"),fontSize:parseInt(o.getPropertyValue("font-size"),10),lineHeight:o.getPropertyValue("line-height")})}else(0,c.css)(this.placeholderElm,{fontFamily:s.getPropertyValue("font-family"),fontSize:parseInt(s.getPropertyValue("font-size"),10),lineHeight:s.getPropertyValue("line-height")});(0,c.css)(this.placeholderElm,{display:"block",textAlign:s.getPropertyValue("text-align"),paddingTop:parseInt(l.paddingTop,10)+"px",paddingLeft:parseInt(l.paddingLeft,10)+"px",paddingRight:parseInt(l.paddingRight,10)+"px",marginTop:Math.max(parseInt(s.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(s.getPropertyValue("margin-left"),10),i)})}hide(){r.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){if(e.getRealMode()!==o.MODE_WYSIWYG)return void this.hide();u(e.editor)?this.show():this.hide()}}beforeDestruct(e){this.hide(),e.e.off(".placeholder").off(window,"load",this.toggle)}constructor(){super(...arguments),this.addNativeListeners=()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)},this.addEvents=()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,l.attr)(e.element,"placeholder")||""),e.e.fire("placeholder",this.placeholderElm.innerHTML),e.e.off(".placeholder").on("changePlace.placeholder",this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder internalChange.placeholder afterCommand.placeholder resize.placeholder",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.debounce)(e=>e.defaultTimeout/10,!0)],h.prototype,"toggle",null),s.pluginSystem.add("placeholder",h)},18363:function(e,t,i){"use strict";i(580).pluginSystem.add("poweredByJodit",function(e){let{o:t}=e;!t.hidePoweredByJodit&&!t.inline&&(t.showCharsCounter||t.showWordsCounter||t.showXPathInStatusbar)&&e.hookStatus("ready",()=>{e.statusbar.append(e.create.fromHTML(`<a
250
+ `===e;function c(e,t){var i;let o=(0,a.flatButtonsSet)((0,r.splitArray)(t.o.buttons),t),n=t.getRegisteredButtonGroups(),s=!1,c=!1,d=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...null!=(i=n[t.group])?i:[]],r=e.filter(e=>o.has(e));r.length!==e.length&&(s=!0),d.push(...r)}else l(t)?d.push(t):"dots"===t?c=!0:o.has(t)?d.push(t):s=!0;if(!s)return e;let u=[];for(let e of d)l(e)&&(0===u.length||l(u[u.length-1]))||u.push(e);for(;u.length&&l(u[u.length-1]);)u.pop();if(c){let e=(0,a.flatButtonsSet)(u,t);(0,r.toArray)(o).some(t=>!e.has(t))&&u.push("dots")}return u}n.pluginSystem.add("mobile",function(e){let t=0,i=(0,r.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",i=>{if(i.changedTouches&&i.changedTouches.length){let o=new Date().getTime(),n=o-t;n>e.o.mobileTapTimeout&&(t=o,n<1.5*e.o.mobileTapTimeout&&e.s.insertCursorAtPoint(i.clientX,i.clientY))}}),e.e.on("getDiffButtons.mobile",t=>{if(t===e.toolbar){let t=(0,a.flatButtonsSet)((0,r.splitArray)(e.o.buttons),e),o=(0,a.flatButtonsSet)(i,e);return(0,r.toArray)(t).reduce((e,t)=>(o.has(t)||e.push(t),e),[])}}),e.o.toolbarAdaptive&&e.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace",()=>{var t;if(!e.o.toolbar)return;let n=(()=>{if(e.isFullSize)return(0,r.splitArray)(e.o.buttons);let t=function(e){var t;let{toolbar:i}=e.o;if((0,s.isString)(i)||o.Dom.isHTMLElement(i)){let t=e.toolbarContainer.offsetWidth;if(t)return t}return e.container.offsetWidth||(null!=(t=e.container.parentElement)?t:e.container).offsetWidth}(e);return t>=e.o.sizeLG?(0,r.splitArray)(e.o.buttons):t>=e.o.sizeMD?c((0,r.splitArray)(e.o.buttonsMD),e):t>=e.o.sizeSM?c((0,r.splitArray)(e.o.buttonsSM),e):c((0,r.splitArray)(e.o.buttonsXS),e)})();n.toString()!==i.toString()&&(i=n,e.e.fire("closeAllPopups"),null==(t=e.toolbar)||t.setRemoveButtons(e.o.removeButtons).build(i.concat(e.o.extraButtons)))}).on(e.ow,"load resize",()=>e.e.fire("recalcAdaptive"))})},57951:function(e,t,i){"use strict";var o=i(86583),n=i(12153),r=i(6441),s=i(13465),a=i(50267),l=i(83086);let c="start",d=(e,t,{control:i})=>{var n;let r="button"+i.command,s=null!=(n=i.args&&i.args[0])?n:(0,o.dataBind)(e,r);s===c?(0,l.openStartDialog)(e):((0,o.dataBind)(e,r,s),e.execCommand(i.command,!1,"default"===s?null:s))};n.Icon.set("ol",s.default).set("ul",a.default),r.Config.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:d},r.Config.prototype.controls.ol={command:"insertOrderedList",tags:["ol"],tooltip:"Insert Ordered List",list:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman",[c]:"Start at..."},exec:d,isChildDisabled(e,t){var i;return(null==(i=t.control.args)?void 0:i[0])===c&&!(0,l.closestOrderedList)(e)}}},13465:function(e,t){"use strict";t.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"> <path d="M10.6667 6.6667h10.6666M10.6667 17.3333h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="m2.5 5 2.5-2v7M2.5 10h5M2.5 16a2.5 2.5 0 0 1 5 0c0 1.5-1.5 2.5-5 5h5" stroke-width="2" /> </g> </svg> '},50267:function(e,t){"use strict";t.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"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg> '},64837:function(e,t,i){"use strict";var o=i(65478),n=i(580),r=i(50911);i(57951);class s extends r.Plugin{afterInit(e){e.registerCommand("insertUnorderedList",this.onCommand).registerCommand("insertOrderedList",this.onCommand)}onCommand(e,t,i){return this.jodit.s.commitStyle({element:"insertunorderedlist"===e?"ul":"ol",attributes:{style:{listStyleType:null!=i?i:null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}constructor(){super(...arguments),this.buttons=[{name:"ul",group:"list"},{name:"ol",group:"list"}]}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"onCommand",null),n.pluginSystem.add("orderedList",s)},83086:function(e,t,i){"use strict";i.d(t,{closestOrderedList:function(){return a},openStartDialog:function(){return l}});var o=i(2748),n=i(29960),r=i(62843),s=i(2525);function a(e){let t=e.s.current();return t?o.Dom.closest(t,"ol",e.editor):null}function l(e){let t=a(e);if(!t)return;let i=e.dlg({resizable:!1,closeOnClickOverlay:!0}),o=new s.UIInput(e,{name:"start",type:"number",label:"Number for the first item",value:t.start}),l=new s.UIForm(e,[new s.UIBlock(e,[o])]);l.container.classList.add("jodit-dialog_alert"),l.onSubmit(({start:r})=>{let s=""===r?1:parseInt(r,10);if(isNaN(s))return o.focus(),!1;i.close(),(0,n.attr)(t,"start",1===s?null:s),e.synchronizeValues()}),e.s.save(),i.e.on(i,"afterClose",()=>{e.s.focus(),e.s.restore()}),i.setFooter([(0,r.Button)(e,"cancel","Cancel").onAction(()=>i.close()),(0,r.Button)(e,"ok","Apply","primary").onAction(()=>l.submit())]),i.open(l,e.i18n("Start numbering at"),!0,!0),o.focus(),o.nativeInput.select()}},71842:function(e,t,i){"use strict";var o=i(82758),n=i(6441);n.Config.prototype.askBeforePasteFromWord=!0,n.Config.prototype.processPasteFromWord=!0,n.Config.prototype.defaultActionOnPasteFromWord=null,n.Config.prototype.pasteFromWordActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Clean"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}]},31571:function(e,t,i){"use strict";i.d(t,{pasteFromWord:function(){return c}});var o=i(82758),n=i(65478),r=i(580),s=i(21537),a=i(50911);i(71842);var l=i(117);class c extends a.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,i){let{j:o}=this,{processPasteFromWord:n,askBeforePasteFromWord:r,defaultActionOnPasteFromWord:a,defaultActionOnPaste:c,pasteFromWordActionList:d}=o.o;return!!(n&&(0,s.isHtmlFromWord)(t))&&(r?(0,l.askInsertTypeDialog)(o,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected",o=>{this.insertFromWordByType(e,t,o,i)},d):this.insertFromWordByType(e,t,a||c,i),!0)}insertFromWordByType(e,t,i,n){var r;switch(i){case o.INSERT_AS_HTML:{t=(0,s.applyStyles)(t);let e=null==(r=this.j.events)?void 0:r.fire("beautifyHTML",t);(0,s.isString)(e)&&(t=e);break}case o.INSERT_AS_TEXT:t=(0,s.cleanFromWord)(t);break;case o.INSERT_ONLY_TEXT:t=(0,s.stripTags)((0,s.cleanFromWord)(t),this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText)}(0,l.pasteInsertHtml)(e,this.j,t)}}c.requires=["paste"],function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":processHTML")],c.prototype,"processWordHTML",null),r.pluginSystem.add("pasteFromWord",c)},85407:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537),a=i(20356),l=i(10830);class c extends a.Plugin{createDialog(){this.dialog=this.j.dlg();let e=(0,l.Button)(this.j,"paste","Paste","primary");e.onAction(this.paste);let t=(0,l.Button)(this.j,"","Cancel");t.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add("jodit-paste-storage"),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),n.Dom.append(this.container,this.listBox),n.Dom.append(this.container,this.previewBox),this.dialog.setHeader(this.j.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([e,t]),this.j.e.on(this.listBox,"click dblclick",e=>{let t=e.target;return n.Dom.isTag(t,"a")&&t.hasAttribute("data-index")&&this.selectIndex(parseInt((0,s.attr)(t,"-index")||"0",10)),"dblclick"===e.type&&this.paste(),!1})}afterInit(){this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage",()=>this.list.length).on("afterCopy.paste-storage",e=>{-1!==this.list.indexOf(e)&&this.list.splice(this.list.indexOf(e),1),this.list.unshift(e),this.list.length>5&&(this.list.length=5)}),this.j.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(".paste-storage"),n.Dom.safeRemove(this.previewBox),n.Dom.safeRemove(this.listBox),n.Dom.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){let e=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=e}this.dialog&&this.dialog.close(),this.j.synchronizeValues(),this.j.e.fire("afterPaste")},this.onKeyDown=e=>{let t=this.currentIndex;if(-1!==[o.KEY_UP,o.KEY_DOWN,o.KEY_ENTER].indexOf(e.key)){if(e.key===o.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===o.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===o.KEY_ENTER)return void this.paste();t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}},this.selectIndex=e=>{this.listBox&&(0,s.toArray)(this.listBox.childNodes).forEach((t,i)=>{t.classList.remove("jodit_active"),e===i&&this.previewBox&&(t.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[e],t.focus())}),this.currentIndex=e},this.showDialog=()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&n.Dom.detach(this.listBox),this.previewBox&&n.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let i=this.j.c.element("a");i.textContent=t+1+". "+e.replace((0,o.SPACE_REG_EXP)(),""),this.j.e.on(i,"keydown",this.onKeyDown),(0,s.attr)(i,"href","#"),(0,s.attr)(i,"data-index",t.toString()),(0,s.attr)(i,"tab-index","-1"),this.listBox&&n.Dom.append(this.listBox,i)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))}}}r.pluginSystem.add("pasteStorage",c)},84380:function(e,t,i){"use strict";var o=i(82758),n=i(6441),r=i(117);n.Config.prototype.askBeforePasteHTML=!0,n.Config.prototype.processPasteHTML=!0,n.Config.prototype.scrollToPastedContent=!0,n.Config.prototype.pasteExcludeStripTags=["br","hr"],n.Config.prototype.pasteHTMLActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Insert as Text"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}],n.Config.prototype.memorizeChoiceWhenPasteFragment=!1,n.Config.prototype.nl2brInPlainText=!0;let s="pasteStorage";n.Config.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(e,t,{control:i}){var n;if(i.name===s)return void e.execCommand("showPasteStorage");e.s.focus();let a="",l=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],i=(null==(n=t.types)?void 0:n.includes(o.TEXT_HTML))?o.TEXT_HTML:o.TEXT_PLAIN,r=await t.getType(i);a=await new Response(r).text()}l=!1}catch(e){o.IS_PROD}if(l)try{a=await navigator.clipboard.readText(),l=!1}catch(e){o.IS_PROD}}l&&(l=0===(a=e.buffer.get(o.CLIPBOARD_ID)||"").length);let c=e.value;l?(e.ed.execCommand("paste"),(l=c===e.value)||e.e.fire("afterPaste")):a.length?((0,r.pasteInsertHtml)(null,e,a),e.e.fire("afterPaste")):l&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},list:{[s]:"Paste Storage"},isChildDisabled:e=>2>e.e.fire("pasteStorageList")}},117:function(e,t,i){"use strict";i.d(t,{askInsertTypeDialog:function(){return h},getAllTypes:function(){return u},pasteInsertHtml:function(){return d},removeGoogleDocsWrapper:function(){return c}});var o=i(82758),n=i(2748),r=i(4510),s=i(27613),a=i(76241),l=i(10830);function c(e){if(!/docs-internal-guid-/i.test(e))return e;let{body:t}=new DOMParser().parseFromString(e,"text/html");return(0,r.toArray)(t.querySelectorAll('b[id^="docs-internal-guid-"]')).forEach(n.Dom.unwrap),t.innerHTML}function d(e,t,i){var o;let r,l;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let d=t.e.fire("beforePasteInsert",i);!(0,s.isVoid)(d)&&((0,s.isString)(d)||(0,s.isNumber)(d)||n.Dom.isNode(d))&&(i=d),(0,s.isString)(i)&&(o=c(i),-1!==(r=(o=(0,a.removeTagsByPrefix)(o,["<meta"])).search(/<!--StartFragment-->/i))&&(o=o.substring(r+20)),-1!==(l=o.search(/<!--EndFragment-->/i))&&(o=o.substring(0,l)),i=o),t.s.insertHTML(i)}function u(e){let t=e.types,i="";if((0,s.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(let e=0;e<t.length;e+=1)i+=t[e]+";";else i=(t||o.TEXT_PLAIN).toString()+";";return i}function h(e,t,i,o,n){if(!1===e.e.fire("beforeOpenPasteDialog",t,i,o,n))return;let r=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(i)),s=n.map(({text:t,value:i})=>(0,l.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{r.close(),o(i)}));r.e.on(r,"beforeClose",()=>{e.e.fire("beforeClosePasteDialog",r)}).one(r,"afterClose",()=>{e.s.isFocused()||e.s.focus(),e.e.fire("afterClosePasteDialog",r)});let a=(0,l.Button)(e,{text:"Cancel",tabIndex:0}).onAction(()=>{r.close()});return r.setFooter([...s,a]),s[0].focus(),s[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",r,t,i,o,n),r}},79799:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(20356);i(84380);var c=i(117),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(e){e.e.on("paste.paste",this.onPaste).on("pasteStack.paste",e=>this.pasteStack.push(e)),this.j.e.on("processPaste.paste",this.onProcessPasteReplaceNl2Br)}beforeDestruct(e){e.e.off("paste.paste",this.onPaste).off("processPaste.paste",this.onProcessPasteReplaceNl2Br).off(".paste")}onPaste(e){try{if(!1===this.customPasteProcess(e)||!1===this.j.e.fire("beforePaste",e))return e.preventDefault(),!1;this.defaultPasteProcess(e)}finally{this.j.e.fire("afterPaste",e)}}customPasteProcess(e){if(!this.j.o.processPasteHTML)return;let t=(0,a.getDataTransfer)(e),i=[null==t?void 0:t.getData(o.TEXT_PLAIN),null==t?void 0:t.getData(o.TEXT_HTML),null==t?void 0:t.getData(o.TEXT_RTF)];for(let t of i)if((0,a.isHTML)(t)&&(this.j.e.fire("processHTML",e,t,{plain:i[0],html:i[1],rtf:i[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=(0,a.getDataTransfer)(e),i=(null==t?void 0:t.getData(o.TEXT_HTML))||(null==t?void 0:t.getData(o.TEXT_PLAIN));if(t&&i&&""!==(0,a.trim)(i)){let o=this.j.e.fire("processPaste",e,i,(0,c.getAllTypes)(t));void 0!==o&&(i=o),((0,a.isString)(i)||r.Dom.isNode(i))&&this.__insertByType(e,i,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let i=this.pasteStack.find(e=>e.html===t);if(i)return this.__insertByType(e,t,i.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let i=(0,c.askInsertTypeDialog)(this.j,"Your code is similar to HTML. Keep as HTML?","Paste as HTML",i=>{this._isDialogOpened=!1,this.__insertByType(e,t,i)},this.j.o.pasteHTMLActionList);return i&&(this._isDialogOpened=!0,i.e.on("beforeClose",()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,i){if(this.pasteStack.push({html:t,action:i}),(0,a.isString)(t))switch(this.j.buffer.set(o.CLIPBOARD_ID,t),i){case o.INSERT_CLEAR_HTML:t=(0,a.cleanFromWord)((0,c.removeGoogleDocsWrapper)(t));break;case o.INSERT_ONLY_TEXT:t=(0,a.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case o.INSERT_AS_TEXT:t=(0,a.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,a.nl2br)(t));break;default:{let o=this.j.e.fire("onCustomPasteHTMLOption",i,t,e);"string"==typeof o&&(t=o)}}(0,c.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,i){if(i===o.TEXT_PLAIN+";"&&!(0,a.isHTML)(t)){let e=(0,a.htmlspecialchars)(t);return this.j.o.nl2brInPlainText?(0,a.nl2br)(e):e}}constructor(){super(...arguments),this.pasteStack=new a.LimitedStack(20),this._isDialogOpened=!1}}d([n.autobind],u.prototype,"onPaste",null),d([n.autobind],u.prototype,"onProcessPasteReplaceNl2Br",null),s.pluginSystem.add("paste",u)},61926:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.showPlaceholder=!0,o.Config.prototype.placeholder="Type something",o.Config.prototype.useInputsPlaceholder=!0},59451:function(e,t,i){"use strict";i.d(t,{isEditorEmpty:function(){return h}});var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(78116),l=i(70442),c=i(29960),d=i(41180),u=i(20356);function h(e){var t;return function(e){var t;if(!e.firstChild)return!0;let i=e.firstChild;if(r.Dom.isTag(i,"br")&&!r.Dom.next(i,Boolean,e))return!0;if(o.INSEPARABLE_TAGS.has(null==(t=i.nodeName)?void 0:t.toLowerCase())||/^(TABLE)$/i.test(i.nodeName))return!1;let n=r.Dom.next(i,e=>e&&!r.Dom.isEmptyTextNode(e),e);return r.Dom.isText(i)&&!n?r.Dom.isEmptyTextNode(i):!n&&r.Dom.each(i,e=>!(r.Dom.isLeaf(e)||r.Dom.isList(e)||(0,l.isAnchor)(e))&&(r.Dom.isEmpty(e)||r.Dom.isTag(e,"br")))}(e)&&!(null==(t=e.textContent)?void 0:t.includes(o.NBSP_SPACE))}i(61926);class p extends u.Plugin{afterInit(e){e.o.showPlaceholder&&(this.placeholderElm=e.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${e.i18n(e.o.placeholder)}</span>`),"rtl"===e.o.direction&&(0,d.css)(this.placeholderElm,{right:0,direction:"rtl"}),e.e.on("readonly",e=>{e?this.hide():this.toggle()}).on("changePlace",this.addEvents),this.addEvents())}show(){let e=this.j;if(e.o.readonly)return;let t=0,i=0,o=e.s.current(),n=o&&r.Dom.closest(o,r.Dom.isBlock,e.editor)||e.editor,s=e.ew.getComputedStyle(n),l=e.ew.getComputedStyle(e.editor);r.Dom.append(e.workplace,this.placeholderElm);let{firstChild:c}=e.editor;if(r.Dom.isElement(c)&&!(0,a.isMarker)(c)){let o=e.ew.getComputedStyle(c);t=parseInt(o.getPropertyValue("margin-top"),10),i=parseInt(o.getPropertyValue("margin-left"),10),(0,d.css)(this.placeholderElm,{fontFamily:o.getPropertyValue("font-family"),fontSize:parseInt(o.getPropertyValue("font-size"),10),lineHeight:o.getPropertyValue("line-height")})}else(0,d.css)(this.placeholderElm,{fontFamily:s.getPropertyValue("font-family"),fontSize:parseInt(s.getPropertyValue("font-size"),10),lineHeight:s.getPropertyValue("line-height")});(0,d.css)(this.placeholderElm,{display:"block",textAlign:s.getPropertyValue("text-align"),paddingTop:parseInt(l.paddingTop,10)+"px",paddingLeft:parseInt(l.paddingLeft,10)+"px",paddingRight:parseInt(l.paddingRight,10)+"px",marginTop:Math.max(parseInt(s.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(s.getPropertyValue("margin-left"),10),i)})}hide(){r.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){if(e.getRealMode()!==o.MODE_WYSIWYG)return void this.hide();h(e.editor)?this.show():this.hide()}}beforeDestruct(e){this.hide(),e.e.off(".placeholder").off(window,"load",this.toggle)}constructor(){super(...arguments),this.addNativeListeners=()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)},this.addEvents=()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,c.attr)(e.element,"placeholder")||""),e.e.fire("placeholder",this.placeholderElm.innerHTML),e.e.off(".placeholder").on("changePlace.placeholder",this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder internalChange.placeholder afterCommand.placeholder resize.placeholder",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.debounce)(e=>e.defaultTimeout/10,!0)],p.prototype,"toggle",null),s.pluginSystem.add("placeholder",p)},18363:function(e,t,i){"use strict";i(580).pluginSystem.add("poweredByJodit",function(e){let{o:t}=e;!t.hidePoweredByJodit&&!t.inline&&(t.showCharsCounter||t.showWordsCounter||t.showXPathInStatusbar)&&e.hookStatus("ready",()=>{e.statusbar.append(e.create.fromHTML(`<a
251
251
  tabindex="-1"
252
252
  style="text-transform: uppercase"
253
253
  class="jodit-status-bar-link"