jodit-pro 4.20.3 → 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 (342) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +6 -6
  3. package/es2015/jodit.js +90 -21
  4. package/es2015/jodit.min.js +6 -6
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  11. package/es2015/plugins/backup/backup.css +1 -1
  12. package/es2015/plugins/backup/backup.js +1 -1
  13. package/es2015/plugins/backup/backup.min.js +1 -1
  14. package/es2015/plugins/button-generator/button-generator.css +1 -1
  15. package/es2015/plugins/button-generator/button-generator.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  17. package/es2015/plugins/change-case/change-case.js +1 -1
  18. package/es2015/plugins/change-case/change-case.min.js +1 -1
  19. package/es2015/plugins/chart/chart.css +1 -1
  20. package/es2015/plugins/chart/chart.js +1 -1
  21. package/es2015/plugins/chart/chart.min.js +1 -1
  22. package/es2015/plugins/color-picker/color-picker.css +1 -1
  23. package/es2015/plugins/color-picker/color-picker.js +1 -1
  24. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  25. package/es2015/plugins/emoji/emoji.css +1 -1
  26. package/es2015/plugins/emoji/emoji.js +1 -1
  27. package/es2015/plugins/emoji/emoji.min.js +1 -1
  28. package/es2015/plugins/export-docs/export-docs.js +1 -1
  29. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  30. package/es2015/plugins/finder/finder.css +1 -1
  31. package/es2015/plugins/finder/finder.js +1 -1
  32. package/es2015/plugins/finder/finder.min.js +1 -1
  33. package/es2015/plugins/google-maps/google-maps.css +1 -1
  34. package/es2015/plugins/google-maps/google-maps.js +1 -1
  35. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  36. package/es2015/plugins/google-search/google-search.js +1 -1
  37. package/es2015/plugins/google-search/google-search.min.js +1 -1
  38. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  39. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  40. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  41. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  42. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  43. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  44. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  45. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  46. package/es2015/plugins/keyboard/keyboard.css +1 -1
  47. package/es2015/plugins/keyboard/keyboard.js +1 -1
  48. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  49. package/es2015/plugins/math/math.css +1 -1
  50. package/es2015/plugins/math/math.js +1 -1
  51. package/es2015/plugins/math/math.min.js +1 -1
  52. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  53. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  54. package/es2015/plugins/page-break/page-break.js +1 -1
  55. package/es2015/plugins/page-break/page-break.min.js +1 -1
  56. package/es2015/plugins/paste-code/paste-code.css +1 -1
  57. package/es2015/plugins/paste-code/paste-code.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  59. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  60. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  61. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  62. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  63. package/es2015/plugins/style/style.css +1 -1
  64. package/es2015/plugins/style/style.js +1 -1
  65. package/es2015/plugins/style/style.min.js +1 -1
  66. package/es2015/plugins/templates/templates.css +1 -1
  67. package/es2015/plugins/templates/templates.js +1 -1
  68. package/es2015/plugins/templates/templates.min.js +1 -1
  69. package/es2015/plugins/todo-list/todo-list.css +1 -1
  70. package/es2015/plugins/todo-list/todo-list.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  72. package/es2015/plugins/translate/translate.css +1 -1
  73. package/es2015/plugins/translate/translate.js +1 -1
  74. package/es2015/plugins/translate/translate.min.js +1 -1
  75. package/es2015/plugins/tune-block/tune-block.css +1 -1
  76. package/es2015/plugins/tune-block/tune-block.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  78. package/es2018/jodit.fat.min.js +6 -6
  79. package/es2018/jodit.min.js +6 -6
  80. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  81. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  82. package/es2018/plugins/backup/backup.min.js +1 -1
  83. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  84. package/es2018/plugins/change-case/change-case.min.js +1 -1
  85. package/es2018/plugins/chart/chart.min.js +1 -1
  86. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  87. package/es2018/plugins/emoji/emoji.min.js +1 -1
  88. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  89. package/es2018/plugins/finder/finder.min.js +1 -1
  90. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  91. package/es2018/plugins/google-search/google-search.min.js +1 -1
  92. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  93. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  94. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  95. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  96. package/es2018/plugins/math/math.min.js +1 -1
  97. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  98. package/es2018/plugins/page-break/page-break.min.js +1 -1
  99. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  100. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  101. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  102. package/es2018/plugins/style/style.min.js +1 -1
  103. package/es2018/plugins/templates/templates.min.js +1 -1
  104. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  105. package/es2018/plugins/translate/translate.min.js +1 -1
  106. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  107. package/es2021/jodit.css +1 -1
  108. package/es2021/jodit.fat.min.js +6 -6
  109. package/es2021/jodit.js +90 -21
  110. package/es2021/jodit.min.js +6 -6
  111. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  112. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  113. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  114. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  115. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  116. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  117. package/es2021/plugins/backup/backup.css +1 -1
  118. package/es2021/plugins/backup/backup.js +1 -1
  119. package/es2021/plugins/backup/backup.min.js +1 -1
  120. package/es2021/plugins/button-generator/button-generator.css +1 -1
  121. package/es2021/plugins/button-generator/button-generator.js +1 -1
  122. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  123. package/es2021/plugins/change-case/change-case.js +1 -1
  124. package/es2021/plugins/change-case/change-case.min.js +1 -1
  125. package/es2021/plugins/chart/chart.css +1 -1
  126. package/es2021/plugins/chart/chart.js +1 -1
  127. package/es2021/plugins/chart/chart.min.js +1 -1
  128. package/es2021/plugins/color-picker/color-picker.css +1 -1
  129. package/es2021/plugins/color-picker/color-picker.js +1 -1
  130. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  131. package/es2021/plugins/emoji/emoji.css +1 -1
  132. package/es2021/plugins/emoji/emoji.js +1 -1
  133. package/es2021/plugins/emoji/emoji.min.js +1 -1
  134. package/es2021/plugins/export-docs/export-docs.js +1 -1
  135. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  136. package/es2021/plugins/finder/finder.css +1 -1
  137. package/es2021/plugins/finder/finder.js +1 -1
  138. package/es2021/plugins/finder/finder.min.js +1 -1
  139. package/es2021/plugins/google-maps/google-maps.css +1 -1
  140. package/es2021/plugins/google-maps/google-maps.js +1 -1
  141. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  142. package/es2021/plugins/google-search/google-search.js +1 -1
  143. package/es2021/plugins/google-search/google-search.min.js +1 -1
  144. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  145. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  146. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  147. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  148. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  149. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  150. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  151. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  152. package/es2021/plugins/keyboard/keyboard.css +1 -1
  153. package/es2021/plugins/keyboard/keyboard.js +1 -1
  154. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  155. package/es2021/plugins/math/math.css +1 -1
  156. package/es2021/plugins/math/math.js +1 -1
  157. package/es2021/plugins/math/math.min.js +1 -1
  158. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  159. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  160. package/es2021/plugins/page-break/page-break.js +1 -1
  161. package/es2021/plugins/page-break/page-break.min.js +1 -1
  162. package/es2021/plugins/paste-code/paste-code.css +1 -1
  163. package/es2021/plugins/paste-code/paste-code.js +1 -1
  164. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  165. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  166. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  167. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  168. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  169. package/es2021/plugins/style/style.css +1 -1
  170. package/es2021/plugins/style/style.js +1 -1
  171. package/es2021/plugins/style/style.min.js +1 -1
  172. package/es2021/plugins/templates/templates.css +1 -1
  173. package/es2021/plugins/templates/templates.js +1 -1
  174. package/es2021/plugins/templates/templates.min.js +1 -1
  175. package/es2021/plugins/todo-list/todo-list.css +1 -1
  176. package/es2021/plugins/todo-list/todo-list.js +1 -1
  177. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  178. package/es2021/plugins/translate/translate.css +1 -1
  179. package/es2021/plugins/translate/translate.js +1 -1
  180. package/es2021/plugins/translate/translate.min.js +1 -1
  181. package/es2021/plugins/tune-block/tune-block.css +1 -1
  182. package/es2021/plugins/tune-block/tune-block.js +1 -1
  183. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  184. package/es2021.en/jodit.css +1 -1
  185. package/es2021.en/jodit.fat.min.js +6 -6
  186. package/es2021.en/jodit.js +90 -21
  187. package/es2021.en/jodit.min.js +6 -6
  188. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  189. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  190. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  191. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  192. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  193. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  194. package/es2021.en/plugins/backup/backup.css +1 -1
  195. package/es2021.en/plugins/backup/backup.js +1 -1
  196. package/es2021.en/plugins/backup/backup.min.js +1 -1
  197. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  198. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  199. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  200. package/es2021.en/plugins/change-case/change-case.js +1 -1
  201. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  202. package/es2021.en/plugins/chart/chart.css +1 -1
  203. package/es2021.en/plugins/chart/chart.js +1 -1
  204. package/es2021.en/plugins/chart/chart.min.js +1 -1
  205. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  206. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  207. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  208. package/es2021.en/plugins/emoji/emoji.css +1 -1
  209. package/es2021.en/plugins/emoji/emoji.js +1 -1
  210. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  211. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  212. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  213. package/es2021.en/plugins/finder/finder.css +1 -1
  214. package/es2021.en/plugins/finder/finder.js +1 -1
  215. package/es2021.en/plugins/finder/finder.min.js +1 -1
  216. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  217. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  218. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  219. package/es2021.en/plugins/google-search/google-search.js +1 -1
  220. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  221. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  222. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  223. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  224. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  225. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  226. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  227. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  228. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  229. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  230. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  231. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  232. package/es2021.en/plugins/math/math.css +1 -1
  233. package/es2021.en/plugins/math/math.js +1 -1
  234. package/es2021.en/plugins/math/math.min.js +1 -1
  235. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  236. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  237. package/es2021.en/plugins/page-break/page-break.js +1 -1
  238. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  239. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  240. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  241. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  242. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  243. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  244. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  245. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  246. package/es2021.en/plugins/style/style.css +1 -1
  247. package/es2021.en/plugins/style/style.js +1 -1
  248. package/es2021.en/plugins/style/style.min.js +1 -1
  249. package/es2021.en/plugins/templates/templates.css +1 -1
  250. package/es2021.en/plugins/templates/templates.js +1 -1
  251. package/es2021.en/plugins/templates/templates.min.js +1 -1
  252. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  253. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  254. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  255. package/es2021.en/plugins/translate/translate.css +1 -1
  256. package/es2021.en/plugins/translate/translate.js +1 -1
  257. package/es2021.en/plugins/translate/translate.min.js +1 -1
  258. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  259. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  260. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  261. package/es5/jodit.css +2 -2
  262. package/es5/jodit.fat.min.js +2 -2
  263. package/es5/jodit.js +98 -21
  264. package/es5/jodit.min.css +2 -2
  265. package/es5/jodit.min.js +2 -2
  266. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  267. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  268. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  269. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  270. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  271. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  272. package/es5/plugins/backup/backup.css +1 -1
  273. package/es5/plugins/backup/backup.js +1 -1
  274. package/es5/plugins/backup/backup.min.js +1 -1
  275. package/es5/plugins/button-generator/button-generator.css +1 -1
  276. package/es5/plugins/button-generator/button-generator.js +1 -1
  277. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  278. package/es5/plugins/change-case/change-case.js +1 -1
  279. package/es5/plugins/change-case/change-case.min.js +1 -1
  280. package/es5/plugins/chart/chart.css +1 -1
  281. package/es5/plugins/chart/chart.js +1 -1
  282. package/es5/plugins/chart/chart.min.js +1 -1
  283. package/es5/plugins/color-picker/color-picker.css +1 -1
  284. package/es5/plugins/color-picker/color-picker.js +1 -1
  285. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  286. package/es5/plugins/emoji/emoji.css +1 -1
  287. package/es5/plugins/emoji/emoji.js +1 -1
  288. package/es5/plugins/emoji/emoji.min.js +1 -1
  289. package/es5/plugins/export-docs/export-docs.js +1 -1
  290. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  291. package/es5/plugins/finder/finder.css +1 -1
  292. package/es5/plugins/finder/finder.js +1 -1
  293. package/es5/plugins/finder/finder.min.js +1 -1
  294. package/es5/plugins/google-maps/google-maps.css +1 -1
  295. package/es5/plugins/google-maps/google-maps.js +1 -1
  296. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  297. package/es5/plugins/google-search/google-search.js +1 -1
  298. package/es5/plugins/google-search/google-search.min.js +1 -1
  299. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  300. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  301. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  302. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  303. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  304. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  305. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  306. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  307. package/es5/plugins/keyboard/keyboard.css +1 -1
  308. package/es5/plugins/keyboard/keyboard.js +1 -1
  309. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  310. package/es5/plugins/math/math.css +1 -1
  311. package/es5/plugins/math/math.js +1 -1
  312. package/es5/plugins/math/math.min.js +1 -1
  313. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  314. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  315. package/es5/plugins/page-break/page-break.js +1 -1
  316. package/es5/plugins/page-break/page-break.min.js +1 -1
  317. package/es5/plugins/paste-code/paste-code.css +1 -1
  318. package/es5/plugins/paste-code/paste-code.js +1 -1
  319. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  320. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  321. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  322. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  323. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  324. package/es5/plugins/style/style.css +1 -1
  325. package/es5/plugins/style/style.js +1 -1
  326. package/es5/plugins/style/style.min.js +1 -1
  327. package/es5/plugins/templates/templates.css +1 -1
  328. package/es5/plugins/templates/templates.js +1 -1
  329. package/es5/plugins/templates/templates.min.js +1 -1
  330. package/es5/plugins/todo-list/todo-list.css +1 -1
  331. package/es5/plugins/todo-list/todo-list.js +1 -1
  332. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  333. package/es5/plugins/translate/translate.css +1 -1
  334. package/es5/plugins/translate/translate.js +1 -1
  335. package/es5/plugins/translate/translate.min.js +1 -1
  336. package/es5/plugins/tune-block/tune-block.css +1 -1
  337. package/es5/plugins/tune-block/tune-block.js +1 -1
  338. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  339. package/es5/polyfills.fat.min.js +1 -1
  340. package/es5/polyfills.js +1 -1
  341. package/es5/polyfills.min.js +1 -1
  342. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.20.3
4
+ * Version: v4.20.4
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
8
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,function(){return function(){"use strict";var e,t,n,i,o,r,s={6441:function(e,t,n){n.d(t,{Config:function(){return r}});var i=n(82758);let o={};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=i.globalDocument,this.ownerWindow=i.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=i.INSERT_AS_HTML,this.enter=i.PARAGRAPH,this.iframe=!1,this.editHTMLDocumentMode=!1,this.enterBlock="br"!==this.enter?this.enter:i.PARAGRAPH,this.defaultMode=i.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:[]},"\n",{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,o)}}o=r.prototype,r.prototype.controls={}},26992:function(e,t,n){n.d(t,{Async:function(){return f}});var i=n(82758),o=n(91898),r=n(12045),s=n(23282),a=n(84767),l=n(72430),c=n(14773),u=n(70799),d=n(86068),h=n(38837),p=n(93661);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...n){if(this.isDestructed)return 0;let i={};(0,d.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(i=t).timeout||0),i.label&&this.clearLabel(i.label);let r=(0,o.setTimeout)(e,t,...n),s=i.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 n=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(n),"Callback is not a function"),this.setTimeout(n,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,o.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,u.isString)(e))return this.clearLabel(e);(0,o.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,n=!1){let i=0,a=!1,u=[],d=(...t)=>{if(!a){i=0;let n=e(...t);if(a=!0,u.length){let e=()=>{u.forEach(e=>e()),u.length=0};(0,c.isPromise)(n)?n.finally(e):e()}}},h=(...r)=>{a=!1,t?(!i&&n&&d(...r),(0,o.clearTimeout)(i),i=this.setTimeout(()=>d(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,i)):d(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{u.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let n,i=!1,o=!0;return(...r)=>{if(n=r,i){o=!0;return}o=!0,t&&(o=!1,e(...n)),i=!0,this.__queueMicrotaskNative(()=>{i=!1,!this.isDestructed&&o&&e(...n)})}}throttle(e,t,n=!1){let i=null,o,r,a;return(...n)=>{(o=!0,a=n,t)?i||(r=()=>{o?(e(...a),o=!1,i=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,i)):i=null})():e(...a)}}promise(e){let t=()=>{},n=new Promise((n,i)=>{t=()=>i((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(n,i)});return!n.finally&&"u">typeof process&&!i.IS_ES_NEXT&&(n.finally=e=>(n.then(e).catch(e),n)),n.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),n.rejectCallback=t,n}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 n=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(n),n}requestIdlePromise(e){return this.promise(t=>{let n=this.requestIdleCallback(()=>t(n),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let n=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>n.abort()),this.__controllers.add(n),void 0!==globalThis.scheduler){var i,o;let r=globalThis.scheduler.postTask(e,(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},t),o=o={signal:n.signal},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}),i));return r.finally(()=>{this.__controllers.delete(n)}).catch(()=>null),r}return this.promise((i,o)=>{let r=this.setTimeout(()=>{try{i(e())}catch(e){o(e)}this.__controllers.delete(n)},t.delay||1);n.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(n),o((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,o.clearTimeout)(e)),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,n,i,o;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!=(n=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?n:(e,t)=>{var n;let i=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-i))})},null!=(n=null==t?void 0:t.timeout)?n:1)},this.__cancelIdleCallbackNative=null!=(o=null==(i=window.cancelIdleCallback)?void 0:i.bind(window))?o:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,n){n.d(t,{Async:function(){return i.Async}});var i=n(26992)},4012:function(e,t,n){n.d(t,{Component:function(){return l}});var i=n(8884),o=n(78213),r=n(580),s=n(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,n){let i=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),i.push(`__${e}`)),t&&(i.push("_",t),i.push("_",(0,s.isVoid)(n)?"true":n.toString())),i.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===o.STATUSES.ready}get isDestructed(){return this.componentStatus===o.STATUSES.destructed}get isInDestruct(){return o.STATUSES.beforeDestruct===this.componentStatus||o.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(o.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(o.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 n=Object.getPrototypeOf(this);n&&(0,s.isFunction)(n.setStatusComponent)&&n.setStatusComponent(e,t);let i=a.get(this),o=null==i?void 0:i[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let n=a.get(this);n||(n={},a.set(this,n)),n[e]||(n[e]=[]),n[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new i.Async,this.ownerWindow=window,this.__componentStatus=o.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=o.STATUSES},91907:function(e,t,n){n.d(t,{Component:function(){return i.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var i=n(4012),o=n(78213),r=n(80480)},78213:function(e,t,n){n.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,n){n.d(t,{ViewComponent:function(){return o}});var i=n(4012);class o extends i.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,n){n.r(t),n.d(t,{IS_TEST:function(){return i}});let i=!1,o="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),u="Meta",d="Backspace",h="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[u,d,v,m,b,g,f,h,p,"F3","Tab"],w="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),_=void 0!==o&&/Mac|iPod|iPhone|iPad/.test(o.navigator.platform),S=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:k,isMin:C}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return S(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?S(t[t.length-1].src):S(o.location.href)})(),E=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);n.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.20.3","BASE_PATH",0,k,"BASE_PATH_IS_MIN",0,C,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ERROR_CODE_CONFLICT",0,409,"ES",0,"es2015","FAT_MODE",0,!1,"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,!1,"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,d,"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,f,"KEY_META",0,u,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,m,"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,"\xa0","NEARBY",0,5,"NO_EMPTY_TAGS",0,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,E,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>i=!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,o,"lang",0,{}])},20218:function(e,t,n){n.d(t,{Create:function(){return a}});var i=n(82758),o=n(2748),r=n(21537),s=n(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,n){let i=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(i),t&&((0,r.isPlainObject)(t)?(0,r.attr)(i,t):n=t),n&&(0,r.asArray)(n).forEach(e=>o.Dom.append(i,(0,r.isString)(e)?this.fromHTML(e):e)),i}div(e,t,n){let i=this.element("div",t,n);return e&&(i.className=e),i}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});o.Dom.append(this.doc.body,t);let n=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(n,"iframe.contentWindow.document"),!n)throw Error("Iframe error");return n.open(),n.write("<!DOCTYPE html><html><head></head><body></body></html>"),n.close(),[n.body,t]}span(e,t,n){let i=this.element("span",t,n);return e&&(i.className=e),i}a(e,t,n){let i=this.element("a",t,n);return e&&(i.className=e),i}text(e){return this.doc.createTextNode(e)}fake(){return this.text(i.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let n=this.div();n.innerHTML=e.toString();let i=n.firstChild===n.lastChild&&n.firstChild?n.firstChild:n;if(o.Dom.safeRemove(i),t){let e=(0,r.refs)(i);Object.keys(t).forEach(n=>{let i=e[n];i&&!1===t[n]&&o.Dom.hide(i)})}return i}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let n=t[e.tagName.toLowerCase()];(0,r.isFunction)(n)?n(e):(0,r.isPlainObject)(n)&&(0,r.attr)(e,n)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,n){n.d(t,{Create:function(){return i.Create}});var i=n(20218)},45219:function(e,t,n){n.d(t,{autobind:function(){return o}});var i=n(23282);function o(e,t,n){if(!(0,i.isFunction)(n.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=n.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,n){n.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var i=n(78213),o=n(2748),r=n(27613),s=n(82760);function a(e,t){let n=Object.getOwnPropertyDescriptor(e,t);return!n||(0,r.isFunction)(n.get)?null:n.value}function l(e,t,n){let i=n.get;if(!i)throw(0,s.error)("Getter property descriptor expected");n.get=function(){let e=i.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:n.configurable,enumerable:n.enumerable,writable:!1,value:e}),e}}function c(e,t,n){let a=n.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;n.value=function(...e){var t;let n,i=null!=(n=this.od)?n:document,r=c.get(i);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&&o.Dom.isElement(s)&&(r?r.set(this.constructor,s):c.set(i,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(i.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,n){n.d(t,{component:function(){return l},getComponentClass:function(){return c}});var i=n(82758),o=n(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")):i.IS_PROD||s.has(this.constructor)||a.has(this.constructor)||a.add(this.constructor)}}s.add(e),s.add(t);let n=(0,o.getClassName)(e.prototype);if(r.has(n)&&!i.IS_PROD)throw Error(`Component with name "${n}" is already registered`);return r.set(n,t),t}function c(e){return r.get(e)}},81577:function(e,t,n){n.d(t,{debounce:function(){return a},throttle:function(){return l}});var i=n(91907),o=n(27613),r=n(38837),s=n(89890);function a(e,t=!1,n="debounce"){return(a,l)=>{let c=a[l];if(!(0,o.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(i.STATUSES.ready,i=>{let{async:s}=i;(0,r.assert)(null!=s,`Component ${i.componentName||i.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(i):e,c=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:i.defaultTimeout;Object.defineProperty(i,l,{configurable:!0,value:s[n](i[l].bind(i),c,t)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,n){n.d(t,{derive:function(){return o}});var i=n(23282);function o(...e){return t=>{let n=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,i.isFunction)(s.value)&&!(0,i.isFunction)(n[t])&&Object.defineProperty(n,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,n){n.d(t,{hook:function(){return r}});var i=n(23282),o=n(89890);function r(e){return(t,n)=>{if(!(0,i.isFunction)(t[n]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[n].call(e)})}}},78927:function(e,t,n){n.d(t,{idle:function(){return s}});var i=n(91907),o=n(23282),r=n(89890);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(i.STATUSES.ready,e=>{let{async:n}=e,i=e[t];e[t]=(...t)=>n.requestIdleCallback(i.bind(e,...t))})}}},65478:function(e,t,n){n.r(t),n.d(t,{autobind:function(){return i.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.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 u.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var i=n(45219),o=n(33433),r=n(87325),s=n(81577),a=n(55153),l=n(97357),c=n(78927),u=n(31589),d=n(53213),h=n(13525),p=n(37133)},31589:function(e,t,n){n.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,n){n.d(t,{persistent:function(){return r}});var i=n(78213),o=n(39955);function r(e,t){e.hookStatus(i.STATUSES.ready,e=>{let n=(0,o.isViewObject)(e)?e:e.jodit,i=`${n.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=n.storage.get(i))?e:r},set(e){n.storage.set(i,e)}})})}},13525:function(e,t,n){n.d(t,{wait:function(){return s}});var i=n(78213),o=n(23282),r=n(89890);function s(e){return(t,n)=>{let s=t[n];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(i.STATUSES.ready,t=>{let{async:i}=t,o=t[n],r=0;Object.defineProperty(t,n,{configurable:!0,value:function n(...s){i.clearTimeout(r),e(t)?o.apply(t,s):r=i.setTimeout(()=>n(...s),10)}})})}}},37133:function(e,t,n){n.d(t,{watch:function(){return d}});var i=n(78213),o=n(73026),r=n(46559),s=n(23282),a=n(72430),l=n(39955),c=n(89890),u=n(37790);function d(e,t){return(n,d)=>{var h;if(!(0,s.isFunction)(n[d]))throw(0,c.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let i=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...n)=>{if(!t.isInDestruct)return t[d](e,...n)};p||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[n,o]=e.split(":"),r=f;n.length&&(r=t.get(n)),(0,s.isFunction)(r)&&(r=r(t)),i.events.on(r||t,o,c),r||i.events.on(o,c),t.hookStatus("beforeDestruct",()=>{i.events.off(r||t,o,c).off(o,c)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on(`change.${d.join(".")}`,c);let p=(0,u.getPropertyDescriptor)(n,l);Object.defineProperty(t,l,{configurable:!0,set(e){let n=h;n!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on(`change.${d.join(".")}`,c),c(l,n,h))},get(){return p&&p.get?p.get.call(t):h}})})};(0,s.isFunction)(n.hookStatus)?n.hookStatus(i.STATUSES.ready,m):m(n)}}},2748:function(e,t,n){n.d(t,{Dom:function(){return y}});var i=n(82758),o=n(4510),r=n(68345),s=n(23282),a=n(58487),l=n(42320),c=n(70799),u=n(86068),d=n(76241),h=n(49055),p=n(38837),f=n(29960),m=n(41180),g=n(86583),b=n(89890),v=n(37790);class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,n){let i,o,r=e;n.s.save();do o=!1,(i=r.nextSibling)&&!y.isBlock(i)&&!y.isTag(i,"br")&&(o=!0,r=i);while(o);return y.__wrapElements(t,n,e,r)}static __wrapElements(e,t,n,i){let o=(0,c.isString)(e)?t.createInside.element(e):e;n.parentNode&&n.parentNode.insertBefore(o,n);let r=n;for(;r&&(r=n.nextSibling,o.appendChild(n),n!==i&&r);)n=r;return t.s.restore(),o}static wrapInline(e,t,n){let i,o,r=e,s=e;n.s.save();do o=!1,(i=r.previousSibling)&&!y.isBlock(i)&&(o=!0,r=i);while(o);do o=!1,(i=s.nextSibling)&&!y.isBlock(i)&&(o=!0,s=i);while(o);return y.__wrapElements(t,n,r,s)}static wrap(e,t,n){let i=(0,c.isString)(t)?n.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,b.error)("Element should be in DOM");e.parentNode.insertBefore(i,e),i.appendChild(e)}else{let t=e.extractContents();e.insertNode(i),i.appendChild(t)}return i}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,n){let i=e;for(;i&&i!==t&&!(e!==i&&n(i));){let e=i.firstChild||i.nextSibling;if(!e){for(;i&&!i.nextSibling;)if((i=i.parentNode)===t)return;e=null==i?void 0:i.nextSibling}i=e}}static replace(e,t,n,i=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,p.assert)(n,"Need create instance for new tag"),t=n.fromHTML(t)),(0,c.isString)(t)?((0,p.assert)(n,"Need create instance for new tag"),s=n.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return i&&y.isElement(e)&&y.isElement(s)&&(0,o.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(i.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){let n=y.closest(e,e=>y.isElement(e)&&e.hasAttribute("contenteditable"),t);return y.isNode(e)&&(null==n?void 0:n.getAttribute("contenteditable"))!=="false"}static isEmpty(e,t=i.NO_EMPTY_TAGS){let n;if(!e)return!0;n=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,h.trim)(e.nodeValue).length;return y.isText(e)?o(e):!(y.isElement(e)&&n(e))&&y.each(e,e=>{if(y.isText(e)&&!o(e)||y.isElement(e)&&n(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,i.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,u.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&i.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 n=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(n?n.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,m.css)(e,"display").toString())}static canSplitBlock(e){return!(0,u.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,n){let i=n?"lastChild":"firstChild",o=n?"previousSibling":"nextSibling",r=null==e?void 0:e[i];if(!r)return null;do{if(t(r))return r;let n=r[i]||r[o];if(!n&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[o]&&r.parentNode!==e);n=null==r?void 0:r[o]}r=n}while(r);return null}static prev(e,t,n,i=!0){return y.find(e,t,n,!1,i)}static next(e,t,n,i=!0){return y.find(e,t,n,!0,i)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,n){let i=e=>y.isElement(e)&&e.classList.contains(t),o=e.parentNode;return n?y.prev(e,i,o):y.next(e,i,o)}static find(e,t,n,i=!0,o=!0){let r=this.nextGen(e,n,i,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,n=!0,i=!0){let o=[],r=e;do{let t=n?r.nextSibling:r.previousSibling;for(;t;)o.push(t),t=n?t.nextSibling:t.previousSibling;o.reverse(),yield*this.runInStack(e,o,n,i),r=r.parentNode}while(r&&r!==t);return null}static each(e,t,n=!0){let i=this.eachGen(e,n),o=i.next();for(;!o.done;){if(!1===t(o.value))return!1;o=i.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,n,i=!0){for(;t.length;){let o=t.pop();if(i){let e=n?o.lastChild:o.firstChild;for(;e;)t.push(e),e=n?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,n,i="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=y.findWithCurrent(r[o],t,r,i,o);if(e)return e}for(;r&&!r[i]&&r!==n;)r=r.parentNode;r&&r[i]&&r!==n&&(r=r[i])}while(r&&r!==n);return null}static findSibling(e,t=!0,n=e=>!y.isEmptyTextNode(e)){let i=y.sibling(e,t);for(;i&&!n(i);)i=y.sibling(i,t);return i&&n(i)?i: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,n){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)),n)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,n,i=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===n||!o.parentNode)break;o=o.parentNode}while(o&&o!==n);return o===n&&i&&t(o)?o:null}static closest(e,t,n){let i,o=e=>e.toLowerCase();if((0,s.isFunction)(t))i=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));i=t=>!!(t&&e.has(o(t.nodeName)))}else i=e=>!!(e&&o(t)===o(e.nodeName));return y.up(e,i,n)}static furthest(e,t,n){let i=null,o=null==e?void 0:e.parentElement;for(;o&&o!==n;)t(o)&&(i=o),o=null==o?void 0:o.parentElement;return i}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var n;null==(n=e.parentNode)||n.insertBefore(t,e.nextSibling)}static before(e,t){var n;null==(n=e.parentNode)||n.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,n=!1,r=()=>!0){let s=(e.ownerDocument||i.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,n?t.firstChild:null)}static isOrContains(e,t,n=!1){return e===t?!n:!!(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 n=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,i.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),n&&e.setStartBefore(n)),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 n=e.tagName.toLowerCase();return t instanceof Set?t.has(n)||t.has(e.tagName.toUpperCase()):n===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,f.attr)(e,t),(0,f.attr)(e,i.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,f.attr)(e,i.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+i.MARKER_CLASS)}static replaceTemporaryFromString(e){return(0,d.unwrapMarkedTags)(e,null,i.TEMP_ATTR)}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(i.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,n){n.d(t,{Dom:function(){return i.Dom},LazyWalker:function(){return o.LazyWalker}});var i=n(2748),o=n(70071)},70071:function(e,t,n){n.d(t,{LazyWalker:function(){return s}});var i=n(45219),o=n(2748),r=n(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=o.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,n=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<n;){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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([i.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,n){n.d(t,{EventEmitter:function(){return u}});var i=n(82758),o=n(46559),r=n(68345),s=n(23282),a=n(70799),l=n(89890),c=n(15738);class u{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,o.splitArray)(e).map(e=>e.trim()).forEach(e=>{let n=e.split("."),i=n[1]||c.defaultNameSpace;t.call(this,n[0],i)})}__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 n=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?n.initEvent(t,!0,!0):(n.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","view","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(n,e,{value:t[e],enumerable:!0})}),Object.defineProperty(n,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(n)}get current(){return this.currents[this.currents.length-1]}on(e,t,n,o){let c,u,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(c=this,u=e,h=t,p=n):(c=e,u=t,h=n,p=o),!((0,a.isString)(u)||(0,a.isStringArray)(u))||0===u.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,u,h,p)}),this;let f=c,m=this.__getStore(f),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return d(f)&&(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(u,(e,t)=>{var n,o;if(0===e.length)throw(0,l.error)("Need event name");if(!1===m.indexOf(e,t,h)){let r={event:e,originalCallback:h,syntheticCallback:b};if(m.set(e,t,r,null==p?void 0:p.top),d(f)){let t=i.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(n=null==p?void 0:p.capture)&&n}:null!=(o=null==p?void 0:p.capture)&&o;b.options=t,f.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(f,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let n=this.__domEventsMap.get(e)||new Set;n.add(t),this.__domEventsMap.set(e,n)}__unmemoryDOMSubjectToHandler(e,t){let n=this.__domEventsMap,i=n.get(e)||new Set;i.delete(t),i.size?n.set(e,i):n.delete(e)}one(e,t,n,i){let o,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,r=e,s=t,l=n):(o=e,r=t,s=n,l=i);let c=(...e)=>(this.off(o,r,c),s(...e));return this.on(o,r,c,l),this}off(e,t,n){let i,o,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(i=this,o=e,l=t):(i=e,o=t,l=n),(0,r.isArray)(i))return i.forEach(e=>{this.off(e,o,l)}),this;let u=i,h=this.__getStore(u);if(!((0,a.isString)(o)||(0,a.isStringArray)(o))||0===o.length)return h.namespaces().forEach(e=>{this.off(u,"."+e)}),this.__removeStoreFromSubject(u),this;let p=e=>{var t;d(u)&&(u.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(u,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let n=h.get(e,t);if(n&&n.length)if((0,s.isFunction)(l)){let i=h.indexOf(e,t,l);!1!==i&&(p(n[i]),n.splice(i,1),n.length||h.clearEvents(t,e))}else n.forEach(p),n.length=0,h.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===c.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(u),this}stopPropagation(e,t){let n=(0,a.isString)(e)?this:e,i=(0,a.isString)(e)?e:t;if("string"!=typeof i)throw(0,l.error)("Need event names");let o=this.__getStore(n);this.__eachEvent(i,(e,t)=>{let i=o.get(e,t);i&&this.__stopped.push(i),t===c.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(n,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,...n){let i,o,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,u=(0,a.isString)(e)?[t,...n]:n;if(!d(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&d(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(d(r))this.__triggerNativeEvent(r,e);else{let n=h.get(e,t);if(n)try{[...n].every(t=>!this.__isStopped(n)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...u),this.currents.pop(),void 0!==o&&(i=o),!0))}finally{this.__removeStop(n)}t!==c.defaultNameSpace||d(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let n=this.fire.apply(this,[r,e+"."+t,...u]);void 0!==n&&(i=n)})}}),i}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=i.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 d(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,n){n.d(t,{Eventify:function(){return i}});class i{on(e,t){var n;return this.__map.has(e)||this.__map.set(e,new Set),null==(n=this.__map.get(e))||n.add(t),this}off(e,t){var n;return this.__map.has(e)&&(null==(n=this.__map.get(e))||n.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var n;let i;return this.__map.has(e)&&(null==(n=this.__map.get(e))||n.forEach(e=>{i=e(...t)})),i}constructor(){this.__map=new Map}}},57012:function(e,t,n){let i=new(n(98220)).EventEmitter;n.d(t,["eventEmitter",0,i])},3827:function(e,t,n){n.d(t,{EventEmitter:function(){return i.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var i=n(98220),o=n(72757),r=n(73026),s=n(15738)},73026:function(e,t,n){n.d(t,{observable:function(){return c}});var i=n(68345),o=n(59292),r=n(72430),s=n(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},n={},c=(t,o)=>((0,i.isArray)(t)?t.map(e=>c(e,o)):(n[t]||(n[t]=[]),n[t].push(o)),e),u=(o,...r)=>{if((0,i.isArray)(o))return void o.map(e=>u(e,...r));try{!t[o]&&n[o]&&(t[o]=!0,n[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,n=[])=>{let i={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=n.concat(a).filter(e=>e.length);i[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set:t=>{let n=i[a];if(!(0,o.isFastEqual)(i[a],t)){u(["beforeChange",`beforeChange.${l.join(".")}`],a,t),(0,r.isPlainObject)(t)&&d(t,l),c&&c.set?c.set.call(e,t):i[a]=t;let o=[];u(["change",...l.reduce((e,t)=>(o.push(t),e.push(`change.${o.join(".")}`),e),[])],l.join("."),n,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):i[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(i[a])&&d(i[a],l)}),Object.defineProperty(e,"on",{value:c}))};return d(e),e}},15738:function(e,t,n){n.d(t,{EventHandlersStore:function(){return s}});var i=n(4510),o=n(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let n=this.__store.get(t);return(0,o.assert)(n,"-"),n[e]}}indexOf(e,t,n){let i=this.get(e,t);if(i){for(let e=0;e<i.length;e+=1)if(i[e].originalCallback===n)return e}return!1}namespaces(e=!1){let t=(0,i.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,n,i=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),i?o[e].unshift(n):o[e].push(n)}clear(){this.__store.clear()}clearEvents(e,t){let n=this.__store.get(e);n&&n[t]&&(delete n[t],Object.keys(n).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}n.d(t,["defaultNameSpace",0,r])},580:function(e,t,n){n.d(t,{getContainer:function(){return _},getPopupViewRoot:function(){return S},uniqueUid:function(){return v}});var i=n(19306),o=n(72430),r=n(70799),s=n(39955),a=n(12475),l=n(29960),c=n(41180),u=n(80568),d=n(69175),h=n(41876),p=n(57012),f=n(82758),m=n(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,n="div",o=!1){let c,d=(0,r.isString)(t)?t:t?(0,u.getClassName)(t.prototype):"jodit-utils",h=w.get(e)||{},p=d+n,f=(0,s.isViewObject)(e)?e:e.j;if(!h[p]){let t=f.c;if(c=S(f.o,f.container,e.od.body),o&&(0,i.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===n?e.ed.head:e.ed.body;c=(0,i.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let r=t.element(n,{className:`jodit jodit-${(0,a.kebabCase)(d)}-container jodit-box`});f.o.nonce&&("style"===n||"script"===n)&&(0,l.attr)(r,"nonce",f.o.nonce),r.classList.add(`jodit_theme_${f.o.theme||"default"}`),m.Dom.append(c,r),h[p]=r,e.hookStatus("beforeDestruct",()=>{f.events.off(r),m.Dom.safeRemove(r),delete h[p],Object.keys(h).length&&w.delete(e)}),w.set(e,h),f.events.fire("getContainer",r)}return h[p].classList.remove("jodit_theme_default","jodit_theme_dark"),h[p].classList.add(`jodit_theme_${f.o.theme||"default"}`),h[p]}function S(e,t,n){var i,o,r;return null!=(r=null!=(o=null!=(i=e.popupRoot)?i:e.shadowRoot)?o:m.Dom.closest(t,e=>m.Dom.isHTMLElement(e)&&(m.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,c.css)(e,"position"))),n))?r:n}let k=p.eventEmitter;n.d(t,["eventEmitter",0,k,"extendLang",0,e=>{Object.keys(e).forEach(t=>{let n,i=(n=e[t],(0,o.isPlainObject)(n)&&(0,o.isPlainObject)(n.default)?n.default:n);!(0,d.isUnsafeProtoKey)(t)&&(0,o.isPlainObject)(i)&&(Object.prototype.hasOwnProperty.call(f.lang,t)&&(0,o.isPlainObject)(f.lang[t])||(f.lang[t]={}),Object.keys(i).forEach(e=>{(0,d.isUnsafeProtoKey)(e)||(f.lang[t][e]=i[e])}))})},"instances",0,{},"modules",0,{},"pluginSystem",0,y])},29999:function(e,t,n){var i=n(68345);n.d(t,["asArray",0,e=>(0,i.isArray)(e)?e:[e]])},76855:function(e,t,n){n.d(t,{asArray:function(){return i.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var i=n(29999),o=n(46559),r=n(4510)},46559:function(e,t,n){n.d(t,{splitArray:function(){return i}});function i(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}},4510:function(e,t,n){var i=n(70722),o=n(58844);n.d(t,["toArray",0,function(...e){var t;return((0,i.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,o.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,n){n.d(t,{clearTimeout:function(){return i.clearTimeout},setTimeout:function(){return i.setTimeout}});var i=n(13252)},13252:function(e,t,n){n.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var i=n(82758);function o(e,t,...n){return t?i.globalWindow.setTimeout(e,t,...n):(e.call(null,...n),0)}function r(e){i.globalWindow.clearTimeout(e)}},54765:function(e,t,n){n.d(t,{hasBrowserColorPicker:function(){return o}});var i=n(82758);function o(){let e;try{let t=i.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,n){n.d(t,{hasBrowserColorPicker:function(){return i.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return u.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.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 S.isString},isStringArray:function(){return S.isStringArray},isURL:function(){return k.isURL},isValidName:function(){return C.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return D.isVoid},isWindow:function(){return I.isWindow}});var i=n(54765),o=n(12045),r=n(68345),s=n(87612),a=n(59292),l=n(23282),c=n(58487),u=n(29673),d=n(60132),h=n(72913),p=n(19306),f=n(45603),m=n(78116),g=n(70722),b=n(84767),v=n(29807),y=n(72430),w=n(14773),_=n(42320),S=n(70799),k=n(26049),C=n(37508),E=n(39955),D=n(86068),I=n(52742)},12045:function(e,t,n){n.d(t,{isAbortError:function(){return i}});function i(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}},68345:function(e,t,n){n.d(t,{isArray:function(){return i}});function i(e){return Array.isArray(e)}},87612:function(e,t,n){n.d(t,{isBoolean:function(){return i}});function i(e){return"boolean"==typeof e}},59292:function(e,t,n){n.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var i=n(67462);function o(e,t){return e===t||(0,i.stringify)(e)===(0,i.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,n){n.d(t,{isFunction:function(){return i}});function i(e){return"function"==typeof e}},29673:function(e,t,n){n.d(t,{isHtmlFromWord:function(){return l}});let i=/\s/,o=/\d/,r=/\w/;function s(e,t){let n=e.indexOf(t);for(;-1!==n;){let r=n+t.length;if(i.test(e.charAt(r))&&o.test(e.charAt(r+1)))return!0;n=e.indexOf(t,r)}return!1}function a(e,t){let n="style="+t,i=e.indexOf(n);for(;-1!==i;){let o=i+n.length,r=e.indexOf(t,o);if(-1===r&&(r=e.length),e.slice(o,r).includes("mso-"))return!0;i=e.indexOf(n,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 n=e.indexOf(">",t);-1===n&&(n=e.length);let o=e.slice(t,n);if("<meta"===o.slice(0,5).toLowerCase()&&function(e){if(s(e,"Microsoft Word")||s(e,"Microsoft Excel"))return!0;let t=e.toLowerCase(),n=t.indexOf("progid");return -1!==n&&(-1!==t.indexOf("word.",n)||-1!==t.indexOf("excel.",n))||t.includes("libreoffice")||t.includes("openoffice")}(o)||function(e){let t=e.indexOf("class=");for(;-1!==t;){if(t>0&&i.test(e.charAt(t-1))){let n=t+6,i=e.charAt(n);if(('"'===i||"'"===i)&&(n+=1),e.startsWith("Mso",n))return!0}t=e.indexOf("class=",t+6)}return!1}(o))return!0;t=e.indexOf("<",n)}return a(e,"'")||a(e,'"')&&e.includes("<font")}},58487:function(e,t,n){var i=n(70799);let o=/[A-Za-z]/,r=/[A-Za-z0-9]/,s=/\w/;function a(e,t){if(!o.test(e.charAt(t)))return"";let n=t+1;for(;r.test(e.charAt(n));)n+=1;return e.slice(t,n)}n.d(t,["isHTML",0,e=>(0,i.isString)(e)&&function(e){let t=new Map,n=e.indexOf("</");for(;-1!==n;){let i=a(e,n+2);""!==i&&">"===e.charAt(n+2+i.length)&&t.set(i,n),n=e.indexOf("</",n+2)}if(0===t.size)return!1;let i=-1;for(n=e.indexOf("<");-1!==n;){let o=a(e,n+1),r=n+1+o.length;if(""!==o&&!s.test(e.charAt(r))){if(i<r&&(i=e.indexOf(">",r)),-1===i)return!1;let n=t.get(o);if(void 0!==n&&n>i)return!0}n=e.indexOf("<",n+1)}return!1}(e)])},60132:function(e,t,n){n.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var i=n(2748),o=n(23282),r=n(86068);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&i.Dom.isElement(e.container)}},72913:function(e,t,n){n.d(t,{isInt:function(){return r}});var i=n(29807),o=n(70799);function r(e){return(0,o.isString)(e)&&(0,i.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,n){n.d(t,{isJoditObject:function(){return o}});var i=n(23282);function o(e){return!!(e&&e instanceof Object&&(0,i.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,n){var i=n(70799);n.d(t,["isLicense",0,e=>(0,i.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,n){n.d(t,{isMarker:function(){return o}});var i=n(2748);function o(e){return i.Dom.isMarker(e)}},70722:function(e,t,n){n.d(t,{isNativeFunction:function(){return i}});function i(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(String(e)))}},84767:function(e,t,n){n.d(t,{isNumber:function(){return i}});function i(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},29807:function(e,t,n){n.d(t,{isNumeric:function(){return o}});var i=n(70799);function o(e){if((0,i.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,n){n.d(t,{isPlainObject:function(){return o}});var i=n(52742);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,i.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,n){n.d(t,{isPromise:function(){return i}});function i(e){return e&&"function"==typeof e.then}},42320:function(e,t,n){n.d(t,{isSet:function(){return o}});var i=n(23282);function o(e){return!!e&&(0,i.isFunction)(e.has)&&(0,i.isFunction)(e.add)&&(0,i.isFunction)(e.delete)}},70799:function(e,t,n){n.d(t,{isString:function(){return o},isStringArray:function(){return r}});var i=n(68345);function o(e){return"string"==typeof e}function r(e){return(0,i.isArray)(e)&&o(e[0])}},26049:function(e,t,n){n.d(t,{isURL:function(){return o}});var i=n(82758);function o(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=i.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,n){n.d(t,{isValidName:function(){return i}});function i(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}},39955:function(e,t,n){n.d(t,{isViewObject:function(){return o}});var i=n(23282);function o(e){return!!(e&&e instanceof Object&&(0,i.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,n){n.d(t,{isVoid:function(){return i}});function i(e){return null==e}},52742:function(e,t,n){n.d(t,{isWindow:function(){return i}});function i(e){return null!=e&&e===e.window}},35278:function(e,t,n){n.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 n=parseInt(t[2],10),i=parseInt(t[3],10),o=(parseInt(t[4],10)|i<<8|n<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}])},32574:function(e,t,n){n.d(t,{applyStyles:function(){return h}});var i=n(82758),o=n(2748),r=n(76241),s=n(90723),a=n(49055),l=n(29960),c=n(41180),u=n(76078);function d(e){let t=e.split(";"),n=t.length-1;return t.filter((e,t)=>{let i=/^\s*([a-z-]{1,64})\s*:/i.exec(e);if(!i)return!0;let o=i[1].toLowerCase();return!(o.startsWith("mso-")||o.startsWith("border")&&t!==n)}).join(";").replace(/([0-9.]{1,32})(pt|cm)/gi,(e,t,n)=>{switch(n.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 n=(e=e.substring(t)).toLowerCase().lastIndexOf("</html>");-1!==n&&(e=e.substring(0,n+7));let h=i.globalDocument.createElement("iframe");(0,c.css)(h,"display","none"),o.Dom.append(i.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 n=(0,s.readWordListItems)(t.body);o.Dom.each(t.body,e=>{o.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,l.attr)(e,"style")||"")&&o.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let n=t.styleSheets[e].cssRules;for(let e=0;e<n.length;e+=1)""!==n[e].selectorText&&(0,u.$$)(n[e].selectorText,t.body).forEach(t=>{t.style.cssText=d(n[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!i.IS_PROD)throw e}(0,s.wrapWordListItems)(n),o.Dom.each(t.body,e=>{if(o.Dom.isElement(e)){let t=(0,l.attr)(e,"style");t&&(e.style.cssText=d(t)),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)}}),p=t.firstChild?(0,a.trim)(t.body.innerHTML):""}}catch(e){}finally{o.Dom.safeRemove(h)}return p&&(e=p),(0,a.trim)((0,r.removeWordWrappers)(e))}},53212:function(e,t,n){n.d(t,{cleanFromWord:function(){return u}});var i=n(82758),o=n(2748),r=n(4510),s=n(76241),a=n(90723),l=n(49055),c=n(29960);function u(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let n=i.globalDocument.createElement("div");n.innerHTML=e;let s=[],l=(0,a.readWordListItems)(n);n.firstChild&&o.Dom.each(n,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":o.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)}}),o.Dom.safeRemove.apply(null,s),(0,a.wrapWordListItems)(l),t=n.innerHTML}catch(e){}return t&&(e=t),e=e.split(/(\n)/).filter(l.trim).join("\n"),(0,s.removeWordWrappers)(e)}},53326:function(e,t,n){n.d(t,{htmlspecialchars:function(){return o}});var i=n(82758);function o(e){let t=i.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},75275:function(e,t,n){n.d(t,{applyStyles:function(){return i.applyStyles},cleanFromWord:function(){return o.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 i=n(32574),o=n(53212),r=n(53326),s=n(45971),a=n(86518),l=n(91003),c=n(76241)},45971:function(e,t,n){n.d(t,{nl2br:function(){return i}});function i(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}},86518:function(e,t,n){n.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return m}});var i=n(2748),o=n(43555),r=n(29960);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var n;if(!i.Dom.isElement(e)&&!i.Dom.isFragment(e))return;let r=[];for(let t of(i.Dom.each(e,e=>{i.Dom.isElement(e)&&i.Dom.up(e.parentNode,a)&&r.push(e)}),r))i.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==i.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)&&i.Dom.safeRemove(t);let l=[];for(let t of(i.Dom.each(e,e=>{i.Dom.isElement(e)&&"NOSCRIPT"===e.nodeName&&l.push(e)}),l))i.Dom.safeRemove(t);let u=null!=(n=t.removeEventAttributes)?n:t.removeOnError,d=e=>{if(i.Dom.isElement(e)&&(u&&c(e),m(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,o.attr)(e,"target"))){let t=((0,o.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}};d(e),i.Dom.each(e,d)}function c(e){if(!i.Dom.isElement(e))return!1;let t=!1,n=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&n.push(e.attributes[t].name);for(let i of n)(0,r.attrRaw)(e,i,null),t=!0;return t}let u=["src","data","action","formaction","poster","background","xlink:href"],d=new Set(["animate","set","animatemotion","animatetransform"]),h=["values","from","to","by"],p=new Set(["iframe","frame","object","embed"]);function f(e,t){let n=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(n)||/^data:(?:text\/html|application\/xhtml)/.test(n))||/^data:image\/svg/.test(n)&&p.has(t)}function m(e,{safeJavaScriptLink:t,removeOnError:n,removeEventAttributes:s}={safeJavaScriptLink:!0,removeOnError:!0}){if(!i.Dom.isElement(e))return!1;let a=!1;s&&c(e)&&(a=!0),n&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),a=!0);let l=e.nodeName.toLowerCase(),p=(0,o.attr)(e,"href");if(t&&p&&f(p,l)){let t="u">typeof location?location.protocol:"http:";(0,o.attr)(e,"href",t+"//"+p),a=!0}if(t){for(let t of(e.hasAttribute("srcdoc")&&((0,o.attr)(e,"srcdoc",null),a=!0),u)){let n=(0,r.attrRaw)(e,t);n&&f(n,l)&&((0,o.attr)(e,t,null),a=!0)}if(d.has(l))for(let t of h){let n=(0,r.attrRaw)(e,t);n&&n.split(";").some(e=>f(e,"a"))&&((0,o.attr)(e,t,null),a=!0)}}return a}},91003:function(e,t,n){n.d(t,{stripTags:function(){return function e(t,n=document,u=null,d=!1){let h=n.createElement("div");(0,o.isString)(t)?h.innerHTML=t:i.Dom.append(h,t);let p=[];i.Dom.each(h,e=>{i.Dom.isElement(e)&&p.push(e)});let f=new Set,m=()=>{let e=n.createTextNode(d?"%%%jodit-single-br%%%":" ");return f.add(e),e};return p.forEach(t=>{if(!t.parentNode)return;if(u&&i.Dom.isTag(t,u)){let o=t.nodeName.toLowerCase(),r=i.Dom.isTag(t,c)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,n,u,d)}%%%/jodit-${o}%%%`;i.Dom.before(t,n.createTextNode(r)),i.Dom.safeRemove(t);return}if(i.Dom.isTag(t,l))return void i.Dom.safeRemove(t);if(!i.Dom.isTag(t,s))return;let o=t.previousSibling;i.Dom.isTag(t,a)&&o&&!f.has(o)&&!(i.Dom.isText(o)&&/\s$/.test(o.nodeValue||""))&&i.Dom.before(t,m());let r=t.nextSibling;!(i.Dom.isText(r)&&/^\s/.test(r.nodeValue||""))&&r&&i.Dom.before(r,m())}),(0,r.trim)(h.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,n,i)=>`<${t?"/":""}${i}>`)}}});var i=n(2748),o=n(70799),r=n(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,n){n.d(t,{indexOfClosingTag:function(){return a},indexOfOpenTag:function(){return u},removeBetween:function(){return f},removeEmptyMarkedTags:function(){return m},removeTagsByPrefix:function(){return l},removeWordWrappers:function(){return c},unwrapMarkedTags:function(){return h}});let i=/[a-z0-9:-]/i,o=["<html","</html","<col","</col","<o:p","</o:p"];function r(e,t,n){return e.substr(t,n.length).toLowerCase()===n}function s(e,t,n){let i=e.indexOf("<",n);for(;-1!==i;){for(let n of t)if(r(e,i,n))return[i,n];i=e.indexOf("<",i+1)}return[-1,""]}function a(e,t,n){let i="</"+t+">",o=e.indexOf("</",n);for(;-1!==o;){if(r(e,o,i))return o;o=e.indexOf("</",o+2)}return -1}function l(e,t){let n=t.map(e=>e.toLowerCase()),i="",o=0;for(;;){let[t]=s(e,n,o);if(-1===t)break;let r=e.indexOf(">",t);if(-1===r)break;i+=e.slice(o,t),o=r+1}return 0===o?e:i+e.slice(o)}function c(e){return l(l(e,o),["\x3c!--"])}function u(e,t){let n="<"+t.toLowerCase(),i=0;for(;;){let[t]=s(e,[n],i);if(-1===t)return -1;let o=e.charAt(t+n.length);if(">"===o)return t;if(/\s/.test(o)){if(-1===e.indexOf(">",t))return -1;return t}i=t+1}}function d(e,t){let n=t;for(;i.test(e.charAt(n));)n+=1;return e.slice(t,n)}function h(e,t,n,i){let o=n.toLowerCase(),r=[null==t?"<":"<"+t.toLowerCase()],a=function(e){let t=new Map,n=e.indexOf("</");for(;-1!==n;){let i=d(e,n+2).toLowerCase();if(""!==i&&">"===e.charAt(n+2+i.length)){let e=t.get(i);e?e.push(n):t.set(i,[n])}n=e.indexOf("</",n+2)}return t}(e),l="",c=0;for(;;){let[n]=s(e,r,c);if(-1===n)break;let u=(null!=t?t:d(e,n+1)).toLowerCase(),h=e.indexOf(">",n);if(-1===h)break;let p=""!==u&&e.slice(n,h).toLowerCase().includes(o)?function(e,t){if(!e)return -1;let n=0,i=e.length;for(;n<i;){let o=n+i>>1;e[o]<t?n=o+1:i=o}return n<e.length?e[n]:-1}(a.get(u),h+1):-1;if(-1===p){l+=e.slice(c,n+1),c=n+1;continue}let f=e.slice(h+1,p),m=p+u.length+3;l+=e.slice(c,n),l+=""!==f&&(!i||i(f))?f:e.slice(n,m),c=m}return 0===c?e:l+e.slice(c)}function p(e,t,n){let i=t.charAt(0),o=e.indexOf(i,n);for(;-1!==o;){if(r(e,o,t))return o;o=e.indexOf(i,o+1)}return -1}function f(e,t,n,i,o=""){let r=t.toLowerCase(),s=o.toLowerCase(),a="",l=0;for(;;){let o=p(e,r,l);if(-1===o)break;let c=p(e,n,o+t.length);if(-1===c)break;if(""!==s&&!e.slice(o,c).toLowerCase().includes(s)){a+=e.slice(l,c+n.length),l=c+n.length;continue}let u=p(e,i,c+n.length);if(-1===u)break;a+=e.slice(l,o),l=u+i.length}return 0===l?e:a+e.slice(l)}function m(e,t,n){let i=t.toLowerCase(),o=n.toLowerCase(),a="</"+i+">",l="",c=0;for(;;){let[t]=s(e,["<"+i],c);if(-1===t)break;let n=e.indexOf(">",t);if(-1===n)break;if(e.slice(t,n).toLowerCase().includes(o)&&r(e,n+1,a)){l+=e.slice(c,t),c=n+1+a.length;continue}l+=e.slice(c,n+1),c=n+1}return 0===c?e:l+e.slice(c)}},90723:function(e,t,n){n.d(t,{readWordListItems:function(){return a},wrapWordListItems:function(){return l}});var i=n(2748),o=n(4510),r=n(29960);let s={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3};function a(e){let t=[];return(0,o.toArray)(e.querySelectorAll("p")).forEach(e=>{let n=/mso-list:\s*l(\d+)\s+level(\d+)(?:\s+lfo(\d+))?/i.exec((0,r.attr)(e,"style")||"");if(!n)return;let a=(0,o.toArray)(e.querySelectorAll("[style]")).find(e=>/mso-list:\s*ignore/i.test((0,r.attr)(e,"style")||""));t.push(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({paragraph:e,list:`${n[1]}:${n[3]||""}`,level:Number(n[2])},function(e){let t=e.replace(/\s+/g,""),n=/^\(?(?:\d+\.)*(\d+)[.)]?$/.exec(t);if(n)return{tag:"ol",listStyleType:null,start:Number(n[1])};let i=/^\(?([a-z]+|[A-Z]+)[.)]$/.exec(t);if(i){let e=i[1],t=e.toLowerCase(),n=e!==t;if(/^[ivxlcdm]+$/.test(t)&&(t.length>1||"i"===t))return{tag:"ol",listStyleType:n?"upper-roman":"lower-roman",start:function(e){let t=0;for(let n=0;n<e.length;n+=1){let i=s[e[n]];t+=(s[e[n+1]]||0)>i?-i:i}return t}(t)};if(/^([a-z])\1*$/.test(t))return{tag:"ol",listStyleType:n?"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 n=e.parentNode;for(i.Dom.safeRemove(e);n&&n!==t&&i.Dom.isElement(n)&&i.Dom.isEmpty(n);){let e=n.parentNode;i.Dom.safeRemove(n),n=e}}(a,e)}),t}function l(e){let t=[],n=e.map((t,n)=>{var o;return n>0&&(o=e[n-1],i.Dom.findSibling(t.paragraph,!0,e=>!i.Dom.isEmptyTextNode(e)&&!i.Dom.isComment(e))===o.paragraph)});e.forEach((e,s)=>{let{paragraph:a}=e;for(n[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 n=c.createElement(e.tag);e.listStyleType&&(n.style.listStyleType=e.listStyleType),"ol"===e.tag&&1!==e.start&&(0,r.attr)(n,"start",e.start),l&&l.li?l.li.appendChild(n):i.Dom.before(a,n),l={level:e.level,list:e.list,element:n},t.push(l)}let u=c.createElement("li");(0,o.toArray)(a.attributes).forEach(e=>{"class"!==e.name&&u.setAttribute(e.name,e.value)}),u.style.removeProperty("margin-left"),u.style.removeProperty("text-indent"),(0,r.attr)(u,"style")||(0,r.attr)(u,"style",null),i.Dom.moveContent(a,u),i.Dom.safeRemove(a),l.element.appendChild(u),l.li=u})}},21537:function(e,t,n){n.r(t),n.d(t,{$$:function(){return d.$$},AnswerError:function(){return d.AnswerError},CamelCaseToKebabCase:function(){return u.CamelCaseToKebabCase},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return d.ConnectionError},LimitedStack:function(){return d.LimitedStack},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},OptionsError:function(){return d.OptionsError},UNSAFE_PROTO_KEYS:function(){return d.UNSAFE_PROTO_KEYS},abort:function(){return d.abort},alignElement:function(){return d.alignElement},alreadyLoadedList:function(){return d.alreadyLoadedList},answer:function(){return d.answer},appendScriptAsync:function(){return d.appendScriptAsync},appendStyleAsync:function(){return d.appendStyleAsync},applyStyles:function(){return a.applyStyles},asArray:function(){return i.asArray},assert:function(){return d.assert},attr:function(){return d.attr},attrRaw:function(){return d.attrRaw},browser:function(){return d.browser},buildQuery:function(){return d.buildQuery},call:function(){return d.call},callPromise:function(){return d.callPromise},callThis:function(){return d.callThis},camelCase:function(){return u.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearAlign:function(){return d.clearAlign},clearCenterAlign:function(){return d.clearCenterAlign},clearHAlign:function(){return d.clearHAlign},clearTimeout:function(){return o.clearTimeout},cns:function(){return d.cns},colorToHex:function(){return s.colorToHex},completeUrl:function(){return d.completeUrl},connection:function(){return d.connection},convertMediaUrlToVideoEmbed:function(){return d.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return d.createMediaWrapper},css:function(){return d.css},cssInline:function(){return d.cssInline},cssPath:function(){return d.cssPath},ctrlKey:function(){return d.ctrlKey},dataBind:function(){return d.dataBind},defaultLanguage:function(){return d.defaultLanguage},error:function(){return d.error},fastClone:function(){return d.fastClone},fuzzySearchIndex:function(){return u.fuzzySearchIndex},get:function(){return d.get},getAlignClasses:function(){return d.getAlignClasses},getAnchorName:function(){return d.getAnchorName},getAnchors:function(){return d.getAnchors},getCaptionWrapper:function(){return d.getCaptionWrapper},getCaptionedImage:function(){return d.getCaptionedImage},getClassName:function(){return d.getClassName},getContentWidth:function(){return c.getContentWidth},getDataTransfer:function(){return d.getDataTransfer},getFixedPositionOffset:function(){return c.getFixedPositionOffset},getHAlign:function(){return d.getHAlign},getImageCaption:function(){return d.getImageCaption},getMediaWrapper:function(){return d.getMediaWrapper},getPropertyDescriptor:function(){return d.getPropertyDescriptor},getScrollParent:function(){return c.getScrollParent},getWrappedMedia:function(){return d.getWrappedMedia},getXPathByElement:function(){return d.getXPathByElement},hAlignElement:function(){return d.hAlignElement},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},humanSizeToBytes:function(){return d.humanSizeToBytes},i18n:function(){return u.i18n},inView:function(){return d.inView},indexOfClosingTag:function(){return a.indexOfClosingTag},indexOfOpenTag:function(){return a.indexOfOpenTag},innerWidth:function(){return c.innerWidth},isAbortError:function(){return r.isAbortError},isAnchor:function(){return d.isAnchor},isArray:function(){return r.isArray},isAtom:function(){return d.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 d.isUnsafeProtoKey},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return u.kebabCase},keepNames:function(){return d.keepNames},keys:function(){return d.keys},loadImage:function(){return d.loadImage},loadNext:function(){return d.loadNext},loadNextStyle:function(){return d.loadNextStyle},markAsAtomic:function(){return d.markAsAtomic},markDeprecated:function(){return d.markDeprecated},markOwner:function(){return d.markOwner},memorizeExec:function(){return d.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 d.options},parseQuery:function(){return d.parseQuery},position:function(){return c.position},prepareEmbedCode:function(){return d.prepareEmbedCode},prepareMedia:function(){return d.prepareMedia},previewBox:function(){return d.previewBox},refs:function(){return d.refs},removeBetween:function(){return a.removeBetween},removeEmptyMarkedTags:function(){return a.removeEmptyMarkedTags},removeTagsByPrefix:function(){return a.removeTagsByPrefix},removeWordWrappers:function(){return a.removeWordWrappers},reset:function(){return d.reset},resolveElement:function(){return d.resolveElement},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},scrollIntoViewIfNeeded:function(){return d.scrollIntoViewIfNeeded},set:function(){return d.set},setTimeout:function(){return o.setTimeout},size:function(){return c.size},splitArray:function(){return i.splitArray},sprintf:function(){return u.sprintf},stringify:function(){return u.stringify},stripTags:function(){return a.stripTags},toArray:function(){return i.toArray},trim:function(){return u.trim},trimChars:function(){return u.trimChars},trimInv:function(){return u.trimInv},trimInvEnd:function(){return u.trimInvEnd},ucfirst:function(){return u.ucfirst},unwrapMarkedTags:function(){return a.unwrapMarkedTags},wrapMedia:function(){return d.wrapMedia}});var i=n(76855),o=n(91898),r=n(27613),s=n(35278),a=n(75275),l=n(71521),c=n(56175),u=n(59007),d=n(43555)},71521:function(e,t,n){n.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return i.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.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 u.normalizeUrl}});var i=n(21224),o=n(3760),r=n(49033),s=n(12972),a=n(9992),l=n(70091),c=n(46334),u=n(37406)},21224:function(e,t,n){var i=n(35278),o=n(49055);n.d(t,["normalizeColor",0,e=>{let t=["#"],n=(0,i.colorToHex)(e);if(!n)return!1;if(3===(n=(n=(0,o.trim)(n.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(n[e]),t.push(n[e]);return t.join("")}return n.length>6&&(n=n.slice(0,6)),"#"+n}])},3760:function(e,t,n){n.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var i=n(29807),o=n(86068),r=n(35278),s=n(12475);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,i.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,i.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}n.d(t,["NUMBER_FIELDS_REG",0,a])},49033:function(e,t,n){n.d(t,{normalizeKeyAliases:function(){return r}});var i=n(82758),o=n(49055);function r(e){let t={},n={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>i.KEY_ALIASES[e]||e).sort((e,t)=>n[e]&&!n[t]?-1:!n[e]&&n[t]?1:n[e]&&n[t]?n[e]-n[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},12972:function(e,t,n){n.d(t,["normalizeLicense",0,(e,t=8)=>{let n=[];for(;e.length;)n.push(e.substr(0,t)),e=e.substr(t);return n[1]=n[1].replace(/./g,"*"),n[2]=n[2].replace(/./g,"*"),n.join("-")}])},9992:function(e,t,n){var i=n(49055);n.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,i.trim)(e).length).map((t,n)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),n&&(t=t.replace(/^\//,"")),n!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},70091:function(e,t,n){n.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,n){n.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},37406:function(e,t,n){n.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},44506:function(e,t,n){n.d(t,["getContentWidth",0,(e,t)=>{let n=t.getComputedStyle(e);return e.offsetWidth-parseInt(n.getPropertyValue("padding-left")||"0",10)-parseInt(n.getPropertyValue("padding-right")||"0",10)}])},35224:function(e,t,n){n.d(t,{getFixedPositionOffset:function(){return i}});function i(e){var t,n;let i=null==(t=e.ownerDocument)?void 0:t.defaultView,o=e.parentElement;for(;i&&o;){if(""!==(n=i.getComputedStyle(o)).transform&&"none"!==n.transform||""!==n.perspective&&"none"!==n.perspective||""!==n.filter&&"none"!==n.filter||"transform"===n.willChange||"perspective"===n.willChange||"filter"===n.willChange||"paint"===n.contain||"layout"===n.contain||"strict"===n.contain||"content"===n.contain){let e=o.getBoundingClientRect();return{x:e.left,y:e.top}}o=o.parentElement}let r=null==i?void 0:i.visualViewport;return i&&r&&(r.offsetLeft||r.offsetTop)&&1>Math.abs(r.pageLeft-i.scrollX)&&1>Math.abs(r.pageTop-i.scrollY)?{x:-Math.round(r.offsetLeft),y:-Math.round(r.offsetTop)}:{x:0,y:0}}},16442:function(e,t,n){n.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let n=o.Dom.isHTMLElement(t),s=n&&(0,r.css)(t,"overflowY");return n&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||i.globalDocument.scrollingElement||i.globalDocument.body}}});var i=n(82758),o=n(2748),r=n(43555)},56175:function(e,t,n){n.d(t,{getContentWidth:function(){return i.getContentWidth},getFixedPositionOffset:function(){return o.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 i=n(44506),o=n(35224),r=n(16442),s=n(81630),a=n(21496),l=n(81284),c=n(5700)},81630:function(e,t,n){n.d(t,["innerWidth",0,(e,t)=>{let n=t.getComputedStyle(e);return e.clientWidth-(parseFloat(n.paddingLeft||"0")+parseFloat(n.paddingRight||"0"))}])},21496:function(e,t,n){n.d(t,{size:function(){return o}});var i=n(27613);function o(e){return(0,i.isString)(e)||(0,i.isArray)(e)?e.length:(0,i.isPlainObject)(e)?Object.keys(e).length:0}},81284:function(e,t,n){let i=(e,t,n,o=!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=n.body,c=n.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},u=n.defaultView||n.parentWindow,d=u.pageYOffset||c.scrollTop||l.scrollTop,h=u.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,f=c.clientLeft||l.clientLeft||0,m=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&m){let{top:e,left:n}=i(m,t,t.od,!0);s=r.top+e,a=r.left+n}else s=r.top+d-p,a=r.left+h-f;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};n.d(t,["offset",0,i])},5700:function(e,t,n){n.d(t,{position:function(){return function e(t,n,o=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,c=a.top;if((0,i.isJoditObject)(n)&&n.iframe&&n.ed.body.contains(t)&&!o){let{left:t,top:i}=e(n.iframe,n,!0);l+=t,c+=i}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 i=n(19306)},87058:function(e,t,n){n.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,n)=>n.toUpperCase())])},67477:function(e,t,n){n.d(t,{fuzzySearchIndex:function(){return o}});var i=n(82758);function o(e,t,n=0,r=1){let s=0,a,l=-1,c=0,u=0;for(a=n;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,c++,u=0,-1===l&&(l=a)):s>0&&(u>=r&&t[a]!==i.INVISIBLE_SPACE?(s=0,l=-1,c=0,u=0,a--):(u++,c++)),a++;return s===e.length?[l,c]:[-1,0]}},56967:function(e,t,n){n.d(t,{i18n:function(){return c}});var i=n(82758),o=n(70799),r=n(36409),s=n(43555),a=n(6441);let l=(e,t)=>{if(!t||!t.length)return e;let n=/%([sd])/g,i=n.exec(e),o=e,r=0;for(;i&&void 0!==t[r];)o=o.replace(i[0],t[r].toString()),r+=1,i=n.exec(e);return o};function c(e,t,n){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!(null==n?void 0:n.debugLanguage),u={},d=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==n?void 0:n.language,h),f=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let n=e.toLowerCase();if((0,o.isString)(t[n]))return d(t[n]);let i=(0,r.ucfirst)(e);if((0,o.isString)(t[i]))return d(t[i])};void 0!==i.lang[p]?u=i.lang[p]:c||(u=void 0!==i.lang[h]?i.lang[h]:i.lang.en);let m=null==n?void 0:n.i18n;if(m&&m[p]){let e=f(m[p]);if(e)return e}return f(u)||(!c&&i.lang.en&&(0,o.isString)(i.lang.en[e])&&i.lang.en[e]?d(i.lang.en[e]):c?"{"+e+"}":(i.IS_PROD,d(e)))}n.d(t,["sprintf",0,l])},59007:function(e,t,n){n.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return i.camelCase},fuzzySearchIndex:function(){return o.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 i=n(87058),o=n(67477),r=n(56967),s=n(12475),a=n(67462),l=n(49055),c=n(36409)},12475:function(e,t,n){n.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,n){n.d(t,{stringify:function(){return i}});function i(e,t={}){if("object"!=typeof e)return String(e);let n=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!n.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}},49055:function(e,t,n){n.d(t,{trim:function(){return s},trimChars:function(){return a},trimInv:function(){return l},trimInvEnd:function(){return c}});let i=/[\s\u200b]/,o=/\uFEFF/;function r(e,t){let n=0,i=e.length;for(;n<i&&t.test(e.charAt(n));)n+=1;for(;i>n&&t.test(e.charAt(i-1));)i-=1;return 0===n&&i===e.length?e:e.slice(n,i)}function s(e){return r(e,i)}function a(e,t){return r(e,RegExp(`[${t}]`))}function l(e){return r(e,o)}function c(e){let t=e.length;for(;t>0&&o.test(e.charAt(t-1));)t-=1;return t===e.length?e:e.slice(0,t)}},36409:function(e,t,n){n.d(t,{ucfirst:function(){return i}});function i(e){return e.length?e[0].toUpperCase()+e.substring(1):""}},25726:function(e,t,n){n.d(t,{alignElement:function(){return g},clearAlign:function(){return f},clearHAlign:function(){return h},getAlignClasses:function(){return u},getHAlign:function(){return p},hAlignElement:function(){return d}});var i=n(22732),o=n(68345),r=n(29960),s=n(41180),a=n(68645),l=n(61477);let c=e=>((0,o.isArray)(e)?e:[null!=e?e:""]).map(e=>e.split(/\s+/).filter(Boolean)).filter(e=>e.length);function u(e,t){var n,o,r;if(!t)return null;let s=i.Dom.isTag(t,new Set(["jodit","jodit-media"]))?t.firstElementChild:null!=(n=(0,l.getWrappedMedia)(e,t))?n:(0,a.getCaptionedImage)(e,t);return null!=(r=null==(o=e.o.alignClasses)?void 0:o[(null!=s?s:t).nodeName.toLowerCase()])?r:null}function d(e,t,n){var i;if(n){h(e,n),e.classList.add(...null!=(i=c(n[t||"normal"])[0])?i:[]);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){d(e,"normal"),t&&Object.values(t).forEach(t=>c(t).forEach(t=>e.classList.remove(...t))),["class","style"].forEach(t=>{var n;(null==(n=(0,r.attr)(e,t))?void 0:n.trim())||(0,r.attr)(e,t,null)})}function p(e,t){if(t){for(let n of["left","right","center","normal"])if(c(t[n]).some(t=>t.every(t=>e.classList.contains(t))))return n}let n=(0,s.cssInline)(e,"float").toLowerCase();return"left"===n||"right"===n?n:"block"===(0,s.css)(e,"display")&&"auto"===(0,s.cssInline)(e,"margin-left")&&"auto"===(0,s.cssInline)(e,"margin-right")?"center":"normal"}function f(e){i.Dom.each(e,e=>{i.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 m=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function g(e,t){if(i.Dom.isNode(t)&&i.Dom.isElement(t)){f(t);let n=m.get(e.toLowerCase());n&&(0,s.css)(t,"textAlign",n)}}},70442:function(e,t,n){n.d(t,{getAnchorName:function(){return r},getAnchors:function(){return a},isAnchor:function(){return s}});var i=n(2748),o=n(4510);function r(e){return e.id||e.getAttribute("name")||""}function s(e){return i.Dom.isTag(e,"a")&&!e.hasAttribute("href")&&!e.hasChildNodes()&&""!==r(e)}function a(e){return(0,o.toArray)(e.querySelectorAll("a")).filter(s)}},63799:function(e,t,n){n.d(t,{loadNext:function(){return function e(t,n,i=0){return(0,o.isString)(n[i])?c(t,n[i]).then(()=>e(t,n,i+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,n,i=0){return(0,o.isString)(n[i])?u(t,n[i]).then(()=>e(t,n,i+1)):Promise.resolve()}}});var i=n(2748),o=n(70799),r=n(29960),s=n(66292);let a=new Map,l=e=>(t,n)=>{if(a.has(n))return a.get(n);let i=e(t,n);return a.set(n,i),i},c=l((e,t)=>e.async.promise((n,o)=>{if(e.isInDestruct)return o();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",o).one(a,"load",n),i.Dom.append(e.od.body,a)})),u=l((e,t)=>e.async.promise((n,o)=>{if(e.isInDestruct)return o();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",()=>n(a)).on(a,"error",o),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?i.Dom.append(e.o.shadowRoot,a):i.Dom.append(e.od.body,a)}));n.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,c,"appendStyleAsync",0,u])},38837:function(e,t,n){n.d(t,{assert:function(){return o}});class i extends Error{constructor(e){super(e),this.name="AssertionError"}}function o(e,t){if(!e)throw new i(`Assertion failed: ${t}`)}},29960:function(e,t,n){n.d(t,{attr:function(){return function e(t,n,l){if(!t||!(0,i.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(n))return Object.keys(n).forEach(i=>{let r=n[i];(0,o.isPlainObject)(r)&&"style"===i?(0,a.css)(t,r):("className"===i&&(i="class"),e(t,i,r))}),null;let c=(0,s.CamelCaseToKebabCase)(n);if(/^-/.test(c)){let n=e(t,`data${c}`);if(n)return n;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 i=n(23282),o=n(72430),r=n(70799),s=n(12475),a=n(41180);function l(e,t,n){if(void 0===n)return e.getAttribute(t);if(null==n){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,n)}},97639:function(e,t,n){n.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),n=/(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?n[2]:"webkit"===e?"chrome"===n[1]||"webkit"===n[1]:"ff"===e?"firefox"===n[1]:"msie"===e?"trident"===n[1]||"msie"===n[1]:n[1]===e}])},44710:function(e,t,n){var i=n(72430);let o=(e,t)=>{let n=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];n.push((0,i.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return n.join("&")};n.d(t,["buildQuery",0,o])},66292:function(e,t,n){var i=n(82758);n.d(t,["completeUrl",0,e=>("file:"===i.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},68934:function(e,t,n){n.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,u.keys)(t,!1).reduce((n,i)=>(n[i]=(0,o.isPlainObject)(t[i])?e(t[i]):t[i],n),{})}},ConfigFlatten:function(){return d},ConfigMerge:function(){return function e(t,n){Object.keys(n).forEach(i=>{if((0,c.isUnsafeProtoKey)(i))return;let r=n[i],s=t[i];(0,o.isPlainObject)(r)&&(0,o.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[i]=r})}},ConfigProto:function(){return function e(t,n,u=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let d=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==d.presets[t.preset]){let e=d.presets[t.preset];Object.keys(e).forEach(n=>{(0,s.isVoid)(t[n])&&(t[n]=e[n])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,c.isUnsafeProtoKey)(r))return;let s=t[r],a=n?n[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,u+1);return}if(0!==u&&(0,i.isArray)(s)&&!(0,l.isAtom)(s)&&(0,i.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,n),h}}});var i=n(68345),o=n(72430),r=n(70799),s=n(86068),a=n(6441),l=n(97735),c=n(69175),u=n(37790);function d(e){return(0,u.keys)(e,!1).reduce((t,n)=>(t[n]=e[n],t),{})}},55877:function(e,t,n){var i=n(82758),o=n(26049),r=n(82501);n.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:n=345}={})=>{if(!(0,o.isURL)(e))return e;let s=i.globalDocument.createElement("a");s.href=e,t||(t=400),n||(n=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let i=s.pathname.split("/").filter(Boolean),o=i.findIndex(e=>/^\d+$/.test(e));if(-1===o)return e;let r=i[o],l=i[o+1];return l&&0===o&&(r+="/"+l),'<iframe width="'+t+'" height="'+n+'" 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 i=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(i=i.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+n+'" src="'+a+"//www.youtube.com/embed/"+i+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},41180:function(e,t,n){n.d(t,{css:function(){return l},cssInline:function(){return c}});var i=n(87612),o=n(72430),r=n(3760),s=n(87058),a=n(12475);function l(e,t,n,c=!1){if((0,i.isBoolean)(n)&&(c=n,n=void 0),(0,o.isPlainObject)(t)||void 0!==n){let i=(e,t,n)=>{void 0!==(n=(0,r.normalizeCssNumericValue)(t,n))&&(null==n||l(e,t,!0)!==(0,r.normalizeCssValue)(t,n))&&(e.style[t]=n)};if((0,o.isPlainObject)(t)){let n=Object.keys(t);for(let o=0;o<n.length;o+=1)i(e,(0,s.camelCase)(n[o]),t[n[o]])}else i(e,(0,s.camelCase)(t),n);return""}let u=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],f="";return void 0!==p&&""!==p?f=p:h&&!c&&(f=h.getComputedStyle(e).getPropertyValue(u)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,r.normalizeCssValue)(t,f)}function c(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}n.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,n){n.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,n){var i=n(39955);let o=new WeakMap;n.d(t,["dataBind",0,(e,t,n)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,i.isViewObject)(e.j)&&(t=e.j.e),(0,i.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===n?r[t]:(r[t]=n,n)}])},96325:function(e,t,n){var i=n(82758),o=n(70799);n.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:i.globalDocument.documentElement&&i.globalDocument.documentElement.lang?i.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},82760:function(e,t,n){n.d(t,{answer:function(){return a},connection:function(){return r},error:function(){return o},options:function(){return s}});var i=n(32880);function o(e){return TypeError(e)}function r(e){return new i.ConnectionError(e)}function s(e){return new i.OptionsError(e)}function a(e,t,n){return new i.AnswerError(e,t,n)}},93661:function(e,t,n){n.d(t,{abort:function(){return i}});function i(e="Aborted"){return new DOMException(e,"AbortError")}},5311:function(e,t,n){n.d(t,{AnswerError:function(){return i}});class i extends Error{constructor(e,t,n){super(e),this.answer=t,this.code=n,Object.setPrototypeOf(this,i.prototype)}}},86397:function(e,t,n){n.d(t,{ConnectionError:function(){return i}});class i extends Error{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}},32880:function(e,t,n){n.d(t,{AnswerError:function(){return o.AnswerError},ConnectionError:function(){return r.ConnectionError},OptionsError:function(){return s.OptionsError},abort:function(){return i.abort}});var i=n(93661),o=n(5311),r=n(86397),s=n(57865)},57865:function(e,t,n){n.d(t,{OptionsError:function(){return i}});class i extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}},89890:function(e,t,n){n.d(t,{AnswerError:function(){return o.AnswerError},ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},answer:function(){return i.answer},connection:function(){return i.connection},error:function(){return i.error},options:function(){return i.options}});var i=n(82760),o=n(32880)},97735:function(e,t,n){n.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var i=n(67462);function o(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,i.stringify)(e))}},80568:function(e,t,n){var i=n(23282);let o=new Map;n.d(t,["getClassName",0,e=>{var t;if((0,i.isFunction)(e.className))return e.className();let n=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(o.has(n))return o.get(n);if(n.name)return n.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=n.toString().match(r);return s?s[1]:""},"keepNames",0,o])},94643:function(e,t,n){n.d(t,{get:function(){return r}});var i=n(70799),o=n(86068);function r(e,t){if(!(0,i.isString)(e)||!e.length)return null;let n=e.split("."),r=t;try{for(let e of n){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,o.isVoid)(r)?null:r}},38420:function(e,t,n){n.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),n=["KB","MB","GB","TB"],i=parseFloat(e.substr(0,e.length-2));return -1!==n.indexOf(t)?i*Math.pow(1024,n.indexOf(t)+1):parseInt(e,10)}])},68645:function(e,t,n){n.d(t,{getCaptionWrapper:function(){return l},getCaptionedImage:function(){return a},getImageCaption:function(){return s}});var i=n(2748),o=n(4510);let r=(e,t)=>i.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&(!t.className||e.classList.contains(t.className));function s(e,t){var n;let i=e.o.imageCaption;return i&&r(t,i.wrapper)&&null!=(n=(0,o.toArray)(t.getElementsByTagName(i.caption.tag)).find(e=>r(e,i.caption)))?n:null}function a(e,t){let n=s(e,t);if(!n)return null;let i=t.getElementsByTagName("img");return 1!==i.length||n.contains(i[0])?null:i[0]}function l(e,t){return i.Dom.closest(t,t=>!!a(e,t),e.editor)}},43555:function(e,t,n){n.d(t,{$$:function(){return x.$$},AnswerError:function(){return b.AnswerError},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return b.ConnectionError},LimitedStack:function(){return L.LimitedStack},OptionsError:function(){return b.OptionsError},UNSAFE_PROTO_KEYS:function(){return k.UNSAFE_PROTO_KEYS},abort:function(){return b.abort},alignElement:function(){return i.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 R.call},callPromise:function(){return R.callPromise},callThis:function(){return R.callThis},clearAlign:function(){return i.clearAlign},clearCenterAlign:function(){return p.clearCenterAlign},clearHAlign:function(){return i.clearHAlign},cns:function(){return C.cns},completeUrl:function(){return u.completeUrl},connection:function(){return b.connection},convertMediaUrlToVideoEmbed:function(){return h.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return E.createMediaWrapper},css:function(){return p.css},cssInline:function(){return p.cssInline},cssPath:function(){return x.cssPath},ctrlKey:function(){return f.ctrlKey},dataBind:function(){return m.dataBind},defaultLanguage:function(){return g.defaultLanguage},error:function(){return b.error},fastClone:function(){return v.fastClone},get:function(){return y.get},getAlignClasses:function(){return i.getAlignClasses},getAnchorName:function(){return o.getAnchorName},getAnchors:function(){return o.getAnchors},getCaptionWrapper:function(){return S.getCaptionWrapper},getCaptionedImage:function(){return S.getCaptionedImage},getClassName:function(){return w.getClassName},getDataTransfer:function(){return R.getDataTransfer},getHAlign:function(){return i.getHAlign},getImageCaption:function(){return S.getImageCaption},getMediaWrapper:function(){return E.getMediaWrapper},getPropertyDescriptor:function(){return R.getPropertyDescriptor},getWrappedMedia:function(){return E.getWrappedMedia},getXPathByElement:function(){return x.getXPathByElement},hAlignElement:function(){return i.hAlignElement},humanSizeToBytes:function(){return _.humanSizeToBytes},inView:function(){return A.inView},isAnchor:function(){return o.isAnchor},isAtom:function(){return v.isAtom},isUnsafeProtoKey:function(){return k.isUnsafeProtoKey},keepNames:function(){return w.keepNames},keys:function(){return R.keys},loadImage:function(){return R.loadImage},loadNext:function(){return r.loadNext},loadNextStyle:function(){return r.loadNextStyle},markAsAtomic:function(){return v.markAsAtomic},markDeprecated:function(){return C.markDeprecated},markOwner:function(){return R.markOwner},memorizeExec:function(){return R.memorizeExec},options:function(){return b.options},parseQuery:function(){return D.parseQuery},prepareEmbedCode:function(){return I.prepareEmbedCode},prepareMedia:function(){return I.prepareMedia},previewBox:function(){return T.previewBox},refs:function(){return x.refs},reset:function(){return j.reset},resolveElement:function(){return x.resolveElement},scrollIntoViewIfNeeded:function(){return A.scrollIntoViewIfNeeded},set:function(){return P.set},wrapMedia:function(){return E.wrapMedia}});var i=n(25726),o=n(70442),r=n(63799),s=n(38837),a=n(29960),l=n(97639),c=n(44710),u=n(66292),d=n(68934),h=n(55877),p=n(41180),f=n(15456),m=n(86583),g=n(96325),b=n(89890),v=n(97735),y=n(94643),w=n(80568),_=n(38420),S=n(68645),k=n(69175),C=n(95942),E=n(61477),D=n(82501),I=n(96437),T=n(11628),j=n(58844),A=n(26395),x=n(76078),P=n(3703),L=n(50535),R=n(37790)},69175:function(e,t,n){n.d(t,{isUnsafeProtoKey:function(){return o}});let i=["__proto__","constructor","prototype"];function o(e){return -1!==i.indexOf(e)}n.d(t,["UNSAFE_PROTO_KEYS",0,i])},95942:function(e,t,n){n.d(t,{markDeprecated:function(){return o}});let i=console;function o(e,t=[""],n=null){return(...o)=>(i.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(n,...o))}n.d(t,["cns",0,i])},61477:function(e,t,n){n.d(t,{createMediaWrapper:function(){return a},getMediaWrapper:function(){return s},getWrappedMedia:function(){return r},wrapMedia:function(){return l}});var i=n(2748);let o=(e,t)=>i.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&e.classList.contains(t.className);function r(e,t){var n;for(let[i,r]of Object.entries(null!=(n=e.o.mediaWrappers)?n:{}))if(o(t,r)){let e=t.querySelector(i);if(e)return e}return null}function s(e,t){return i.Dom.closest(t,t=>!!r(e,t),e.editor)}function a(e,t){var n;let i=null==(n=e.o.mediaWrappers)?void 0:n[t.toLowerCase()];return i?e.createInside.element(i.tag,{class:i.className,contenteditable:!1,draggable:!0}):null}function l(e,t){let n=a(e,t.nodeName);return n?(t.parentNode&&i.Dom.before(t,n),i.Dom.append(n,t),n):t}},82501:function(e,t,n){n.d(t,["parseQuery",0,e=>{let t={},n=e.substring(1).split("&");for(let e=0;e<n.length;e+=1){let i=n[e].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}return t}])},96437:function(e,t,n){n.d(t,{prepareEmbedCode:function(){return s},prepareMedia:function(){return r}});var i=n(25726),o=n(61477);function r(e,t){let n=(0,o.wrapMedia)(e,t),{mediaDefaultAlign:r}=e.o;return r&&"normal"!==r&&(0,i.hAlignElement)(n,r,(0,i.getAlignClasses)(e,n)),n}function s(e,t){let n=e.createInside.div();n.innerHTML=t.trim();let i=n.firstElementChild;return i&&1===n.childNodes.length?r(e,i):t}},11628:function(e,t,n){n.d(t,{previewBox:function(){return a}});var i=n(2748),o=n(70799),r=n(29960),s=n(41180);function a(e,t,n="px",l=null){let c=[],u=function(e,t){let n=[],o=[];i.Dom.each(e.editor,e=>{i.Dom.isTag(e,"img")&&o.push(e)});try{o.forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),(0,r.attr)(o,"src")];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();i.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(o,"src")||""),(0,r.attr)(o,"src",a.href),i.Dom.safeRemove(a),n.push(()=>{(0,r.attr)(o,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw n.forEach(e=>e()),n.length=0,e}return n}(e,n);try{let a=e.e.fire("beforePreviewBox",t,n);if(null!=a)return a;let u=e.c.div("jodit__preview-box jodit-context");l&&i.Dom.append(l,u),(0,s.css)(u,{position:"relative",padding:16});let d=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}),i.Dom.append(u,t);let n=t.contentWindow;if(n&&(e.e.fire("generateDocumentStructure.iframe",n.document,e),u=n.document.body,"function"==typeof ResizeObserver)){let i=!1,o=n.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),(0,s.css)(t,"height",o.offsetHeight+20),e.async.requestAnimationFrame(()=>{i||r.observe(o)})},100)),a=()=>{i=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",a)};c.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(u,{minWidth:1024,minHeight:600,border:0});let h=(t,n)=>{let s=(0,o.isString)(n)?e.c.div():n;(0,o.isString)(n)&&(s.innerHTML=n);for(let e=0;e<s.childNodes.length;e+=1){let n=s.childNodes[e];if(i.Dom.isElement(n)){let e=t.ownerDocument.createElement(n.nodeName);for(let t=0;t<n.attributes.length;t+=1)(0,r.attr)(e,n.attributes[t].name,n.attributes[t].value);0===n.childNodes.length||i.Dom.isTag(n,"table")?"SCRIPT"===n.nodeName?n.textContent&&(e.textContent=n.textContent):n.innerHTML&&(e.innerHTML=n.innerHTML):h(e,n);try{i.Dom.append(t,e)}catch(e){}}else try{i.Dom.append(t,n.cloneNode(!0))}catch(e){}}};return h(u,d),e.e.fire("afterPreviewBox",u),[u,()=>{c.forEach(e=>e())}]}finally{u.forEach(e=>e())}}},58844:function(e,t,n){n.d(t,{reset:function(){return a}});var i=n(82758),o=n(23282),r=n(94643);let s={};function a(e){var t,n;if(!(e in s)){let n=i.globalDocument.createElement("iframe");try{if(n.src="about:blank",i.globalDocument.body.appendChild(n),!n.contentWindow)return null;let t=(0,r.get)(e,n.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),n.contentWindow);(0,o.isFunction)(t)&&(s[e]=t.bind(a))}catch(e){if(!i.IS_PROD)throw e}finally{null==(t=n.parentNode)||t.removeChild(n)}}return null!=(n=s[e])?n:null}},26395:function(e,t,n){n.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var i=n(2748);function o(e,t,n){var i;let o=e.getBoundingClientRect(),r=e,s=o.top,a=o.height;for(;r&&r!==t&&r.parentNode;)if(s+a>(o=(r=r.parentNode).getBoundingClientRect()).bottom+1&&s>o.top||s+a<=o.top)return!1;let l=n.documentElement&&n.documentElement.clientHeight||0,c=null==(i=n.defaultView)?void 0:i.getComputedStyle(n.documentElement),u=(e="")=>e.endsWith("%")?parseFloat(e)*l/100:parseFloat(e)||0,d=u(null==c?void 0:c.scrollPaddingTop);return(s+a<=l-u(null==c?void 0:c.scrollPaddingBottom)+1||d>=s)&&s+a>=d}function r(e,t,n){if(i.Dom.isHTMLElement(e)&&!o(e,t,n)){if(t.clientHeight!==t.scrollHeight){let n=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<n?n:e.offsetTop}o(e,t,n)||e.scrollIntoView({block:"nearest"})}}},76078:function(e,t,n){n.d(t,{$$:function(){return d},resolveElement:function(){return p}});var i=n(82758),o=n(2748),r=n(4510),s=n(70799),a=n(87058),l=n(29960),c=n(89890);let u=1;function d(e,t){let n;if(!i.IS_ES_NEXT&&/:scope/.test(e)&&i.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let i=t.id,o=i||"_selector_id_"+String(Math.random()).slice(2)+ ++u;e=e.replace(/:scope/g,"#"+o),i||t.setAttribute("id",o),n=t.parentNode.querySelectorAll(e),i||t.removeAttribute("id")}else n=t.querySelectorAll(e);return[].slice.call(n)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let n=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(n.length>1?"["+((0,r.toArray)(n).indexOf(e)+1)+"]":"")};function p(e,t){let n=e;if((0,s.isString)(e))try{n=t.querySelector(e)}catch(t){throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!n||"object"!=typeof n||!o.Dom.isElement(n)||!n.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return n}n.d(t,["cssPath",0,e=>{if(!o.Dom.isElement(e))return null;let t=[],n=e;for(;n&&n.nodeType===Node.ELEMENT_NODE;){let e=n.nodeName.toLowerCase();if(n.id){e+="#"+n.id,t.unshift(e);break}{let t=n,i=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&i++;while(t);e+=":nth-of-type("+i+")"}t.unshift(e),n=n.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return o.Dom.each(e,e=>{if(o.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let n=(0,l.attr)(e,"-ref");n&&(0,s.isString)(n)&&(t[(0,a.camelCase)(n)]=e,t[n]=e)}}),t}])},3703:function(e,t,n){n.d(t,{set:function(){return l}});var i=n(68345),o=n(29807),r=n(72430),s=n(70799),a=n(69175);function l(e,t,n){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let c=n;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,i.isArray)(c[t])||(0,r.isPlainObject)(c[t])||(c[t]=(0,o.isNumeric)(l[e+1])?[]:{}),c=c[t]}c&&(c[l[l.length-1]]=t)}},50535:function(e,t,n){n.d(t,{LimitedStack:function(){return i}});class i{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,n){n.d(t,{call:function(){return a},callPromise:function(){return u},callThis:function(){return l},getPropertyDescriptor:function(){return d},markOwner:function(){return c}});var i=n(14773),o=n(86068),r=n(29960),s=n(86583);function a(e,...t){return e(...t)}function l(e,t,...n){return e.apply(t,n)}function c(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function u(e,t){return(0,i.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function d(e,t){let n;do n=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!n&&e);return n}n.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 n=[];for(let t in e)n.push(t);return n},"loadImage",0,(e,t)=>t.async.promise((n,i)=>{let o=new Image,r=()=>{t.e.off(o),null==i||i()},s=()=>{t.e.off(o),n(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),"memorizeExec",0,(e,t,{control:n},i)=>{var r;let a=`button${n.command}`,l=null!=(r=n.args&&n.args[0])?r:(0,s.dataBind)(e,a);if((0,o.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),i&&(l=i(l)),e.execCommand(n.command,!1,null!=l?l:void 0)}])},31359:function(e,t,n){n.d(t,{init:function(){return s}});var i=n(82758),o=n(60132),r=n(14041);function s(e,t,n,s,a,l,c){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!i.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{i.IS_PROD}),s.styles&&(c(e,t,"style").innerHTML=s.styles)}},14041:function(e,t,n){n.d(t,{loadExtras:function(){return d},loadStyle:function(){return c}});var i=n(82758),o=n(12475),r=n(63799),s=n(89672);function a(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}let l=new Set;function c(e,t){var n;return(n=function*(){let n=u(e,t,!1);if(!l.has(n))return l.add(n),(0,r.appendStyleAsync)(e,n)},function(){var e=this,t=arguments;return new Promise(function(i,o){var r=n.apply(e,t);function s(e){a(r,i,o,s,l,"next",e)}function l(e){a(r,i,o,s,l,"throw",e)}s(void 0)})})()}function u(e,t,n){t=(0,o.kebabCase)(t);let i=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+i+"."+(n?"js":"css")}function d(e,t,n,o){try{let i=n.filter(t=>!e.has((0,s.normalizeName)(t.name)));i.length&&i.map(e=>{let n=e.url||u(t,e.name,!0);return(0,r.appendScriptAsync)(t,n).then(o).catch(()=>null)})}catch(e){if(!i.IS_PROD)throw e}}},48591:function(e,t,n){n.d(t,{makeInstance:function(){return r}});var i=n(82758),o=n(23282);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(n){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!i.IS_PROD)throw e}return null}},89672:function(e,t,n){n.d(t,{normalizeName:function(){return o}});var i=n(12475);function o(e){return(0,i.kebabCase)(e).toLowerCase()}},50911:function(e,t,n){n.d(t,{Plugin:function(){return i.Plugin}});var i=n(20356);n(41876)},41876:function(e,t,n){n.d(t,{PluginSystem:function(){return p}});var i=n(82758),o=n(57012),r=n(46559),s=n(68345),a=n(60132),l=n(70799),c=n(31359),u=n(14041),d=n(48591),h=n(89672);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,h.normalizeName)(e),t),o.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((n,i)=>{(!e||e.has(i))&&t.push([i,n])}),t}__init(e){let{extraList:t,disableList:n,filter:o}={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,f={},m=new Set;e.__plugins=f;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(o).forEach(([i,o])=>{if(n.has(i)||p.has(i))return;let r=null==o?void 0:o.requires;if(r&&(0,s.isArray)(r)&&r.length){if(r.some(e=>n.has(e)))return;if(!r.every(e=>p.has(e)))return void m.add(i)}t=!0;let a=(0,d.makeInstance)(e,o);if(!a){p.set(i,null),m.delete(i);return}(0,c.init)(e,i,o,a,p,m,this.opts.getContainer),f[i]=a}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,u.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(f).forEach(t=>{let n=f[t];(0,a.isDestructable)(n)&&n.destruct(e),delete f[t]}),delete e.__plugins}),i.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let n=()=>{t(),o.eventEmitter.off(`plugin:${e}:ready`,n)};o.eventEmitter.on(`plugin:${e}:ready`,n)})}constructor(e){this.opts=e,this.__items=new Map}}},20356:function(e,t,n){n.d(t,{Plugin:function(){return a}});var i=n(91907),o=n(65478),r=n(19306),s=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class a extends i.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(i.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(i.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([o.autobind],a.prototype,"__afterPluginSystemInit",null),s([o.autobind],a.prototype,"__afterInit",null),s([o.autobind],a.prototype,"__beforeDestruct",null)},54079:function(e,t,n){n.d(t,{Ajax:function(){return p}});var i=n(8884),o=n(82758),r=n(45219),s=n(21537),a=n(89890),l=n(6441);n(57459);var c=n(98582);function u(e){var t,n;function i(t,n){try{var r=e[t](n),s=r.value,a=s instanceof h;Promise.resolve(a?s.v:s).then(function(n){if(a){var l="return"===t?"return":"next";if(!s.k||n.done)return i(l,n);n=e[l](n).value}o(r.done?"return":"normal",n)},function(e){i("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(r,s){var a={key:e,arg:o,resolve:r,reject:s,next:null};n?n=n.next=a:(t=n=a,i(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function d(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function h(e,t){this.v=e,this.k=t}u.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},u.prototype.next=function(e){return this._invoke("next",e)},u.prototype.throw=function(e){return this._invoke("throw",e)},u.prototype.return=function(e){return this._invoke("return",e)};class p{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 o.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,n=this.prepareRequest();return this.__async.promise((i,o)=>{var r;return(r=function*(){var r;let l=()=>{this.__isFulfilled=!0,o(a.connection("Connection error"))},u=()=>{this.__isFulfilled=!0,i(new c.Response(n,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=u,e.onabort=()=>{this.__isFulfilled=!0,o(a.abort("Abort connection"))},e.onerror=l,e.ontimeout=l,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,n;let i=0;e.lengthComputable&&(i=e.loaded/e.total*100),null==(n=(t=this.options).onProgress)||n.call(t,i)},e.onreadystatechange=()=>{var n,i;null==(i=(n=this.options).onProgress)||i.call(n,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)||this.__hasAnswerEnvelope()?u():e.statusText&&(this.__isFulfilled=!0,o(a.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:d,data:h,method:p}=n;e.open(p,d,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:f}=t;(0,s.isFunction)(f)&&(f=yield f.call(this)),f&&e.setRequestHeader&&Object.keys(f).forEach(t=>{e.setRequestHeader(t,f[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)},function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(e){d(o,n,i,s,a,"next",e)}function a(e){d(o,n,i,s,a,"throw",e)}s(void 0)})}).call(this)})}stream(){var e;return(e=function*(){var e,t;this.__activated=!0;let{xhr:n,o:i}=this,o=this.prepareRequest(),r=0,l="",c=[],u=null,d=!1,p=null,f=()=>{if(u){let e=u;u=null,e()}},m=e=>{var t;let i=n.responseText;l+=i.substring(r),r=i.length;let o=l.split("\n\n");for(let n of(l=e?"":null!=(t=o.pop())?t:"",o)){let e=n.trim();if(!e)continue;let t=[];for(let n of e.split("\n"))n.startsWith("data: ")?t.push(n.slice(6)):n.startsWith("data:")&&t.push(n.slice(5));t.length&&c.push(t.join("\n"))}f()};n.onprogress=()=>m(!1),n.onload=()=>{m(!0),d=!0,this.__isFulfilled=!0,f()},n.onerror=()=>{p=a.connection("Connection error"),d=!0,this.__isFulfilled=!0,f()},n.onabort=()=>{p=a.abort("Abort connection"),d=!0,this.__isFulfilled=!0,f()},n.withCredentials=null!=(e=i.withCredentials)&&e;let{url:g,data:b,method:v}=o;n.open(v,g,!0),i.contentType&&n.setRequestHeader&&n.setRequestHeader("Content-type",i.contentType);let{headers:y}=i;(0,s.isFunction)(y)&&(y=yield new h(y.call(this),0)),y&&n.setRequestHeader&&Object.keys(y).forEach(e=>{n.setRequestHeader(e,y[e])}),n.send(b?this.__buildParams(b):void 0);try{for(;;)if(c.length>0)yield c.shift();else if(d)break;else yield(t=new Promise(e=>{u=e}),new h(t,0))}finally{this.__isFulfilled||this.abort()}if(p)throw p},function(){return new u(e.apply(this,arguments))}).call(this)}prepareRequest(){if(!this.o.url)throw a.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,n=(this.o.method||"get").toLowerCase();if("get"===n&&t&&(0,s.isPlainObject)(t)){let n=e.indexOf("?");if(-1!==n){let i=(0,s.parseQuery)(e.substring(n));e=e.substring(0,n)+"?"+(0,s.buildQuery)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},i,t))}else e+="?"+(0,s.buildQuery)(this.o.data)}let i={url:e,method:n,data:t};return p.log.splice(100),p.log.push(i),i}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=l.Config.prototype.defaultAjaxOptions){this.__async=new i.Async,this.__isFulfilled=!1,this.__activated=!1,this.__isDestructed=!1,this.options=(0,s.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}p.log=[],function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([r.autobind],p.prototype,"destruct",null)},57459:function(e,t,n){n(6441).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr(){return new XMLHttpRequest}}},41601:function(e,t,n){n.d(t,{Ajax:function(){return i.Ajax},Response:function(){return o.Response}});var i=n(54079),o=n(98582)},98582:function(e,t,n){function i(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var s=e.apply(t,n);function a(e){i(s,o,r,a,l,"next",e)}function l(e){i(s,o,r,a,l,"throw",e)}a(void 0)})}}n.d(t,{Response:function(){return r}});class r{get url(){return this.request.url}json(){return o(function*(){return JSON.parse(this.body)}).call(this)}text(){return Promise.resolve(this.body)}blob(){return o(function*(){return this.body}).call(this)}constructor(e,t,n,i){this.request=e,this.status=t,this.statusText=n,this.body=i}}},79505:function(e,t,n){n.d(t,{composedRanges:function(){return o}});var i=n(27613);function o(e,t){let n=e.getComposedRanges;if(!(0,i.isFunction)(n))return null;for(let i of[[{shadowRoots:[t]}],[t]]){let o;try{o=n.apply(e,i)}catch(e){continue}if(function(e,t){return Array.isArray(e)&&e.length>0&&e.every(e=>{var n;return(n=e.startContainer)===t||t.contains(n)})}(o,t))return o}return null}},45124:function(e,t,n){n.d(t,{composedRanges:function(){return s.composedRanges},cursorInTheEdgeOfString:function(){return c},findCorrectCurrentNode:function(){return u},isMoved:function(){return a.isMoved},moveNodeInsideStart:function(){return l.moveNodeInsideStart}});var i=n(82758),o=n(2748),r=n(49055),s=n(79505),a=n(12604),l=n(26716);function c(e,t,n,o){var s;let a=(null==(s=e.nodeValue)?void 0:s.length)?e.nodeValue:"";if(o&&(0,r.trimInvEnd)(a).length>t)return!0;let l=(0,i.INVISIBLE_SPACE_REG_EXP_START)().exec(a);return n&&(l&&l[0].length<t||!l&&t>0)}function u(e,t,n,i,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],n=!0),e&&i&&!o.Dom.isText(e)){if(!n&&o.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=e=>n?e.lastChild:s(e),i=t(e);for(;i;){if(i&&o.Dom.isText(i)){e=i;break}i=t(i)}}}if(e&&!i&&!o.Dom.isText(e)){let t=e,n=e;do t=t.firstChild,n=n.lastChild;while(t&&n&&!o.Dom.isText(t));t===n&&t&&o.Dom.isText(t)&&(e=t)}return{node:e,rightMode:n}}n(43463)},12604:function(e,t,n){n.d(t,{isMoved:function(){return i}});function i(e,t){let{s:n}=e;if(!t||!n.isInsideArea)return!1;let{range:i}=n;return i.startContainer!==t.startContainer||i.startOffset!==t.startOffset||i.endContainer!==t.endContainer||i.endOffset!==t.endOffset}},26716:function(e,t,n){n.d(t,{moveNodeInsideStart:function(){return r}});var i=n(82758),o=n(2748);function r(e,t,n){let r=e=>{var t;return!o.Dom.isEmptyTextNode(e)||!!(null==(t=e.nodeValue)?void 0:t.includes(i.NBSP_SPACE))},s=o.Dom.findSibling(t,n,r),a=o.Dom.findSibling(t,!n,r);for(;o.Dom.isElement(s)&&!o.Dom.isTag(s,i.INSEPARABLE_TAGS)&&o.Dom.isContentEditable(s,e.editor)&&(!a||!o.Dom.closest(t,o.Dom.isElement,e.editor));)n||!s.firstChild?o.Dom.append(s,t):o.Dom.before(s.firstChild,t),s=o.Dom.sibling(t,n),a=o.Dom.sibling(t,!n)}},43463:function(e,t,n){n.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return o}});var i=n(2748);function o(e,t,n){let o=e;for(;o&&o!==n&&!(i.Dom.findSibling(o,t)||i.Dom.isBlock(o.parentElement));)(o=o.parentElement)&&o!==n&&(t?i.Dom.before(o,e):i.Dom.after(o,e))}},59242:function(e,t,n){n.d(t,{CHANGE:function(){return"change"},CommitStyle:function(){return o.CommitStyle},REPLACE:function(){return r.REPLACE},Selection:function(){return i.Selection},UNWRAP:function(){return"unwrap"},WRAP:function(){return"wrap"}});var i=n(79348),o=n(25639),r=n(77361)},79348:function(e,t,n){n.d(t,{Selection:function(){return f}});var i=n(82758),o=n(65478),r=n(2748),s=n(21537),a=n(27613),l=n(25726),c=n(38837),u=n(43463),d=n(25639),h=n(45124),p=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class f{get j(){return this.jodit}errorNode(e){if(!r.Dom.isNode(e))throw(0,s.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){let{shadowRoot:e}=this.j.o;if(e){if((0,a.isFunction)(e.getSelection))return e.getSelection();let t=this.__composedSelection(e);if(t)return t}return this.win.getSelection()}__composedSelection(e){let t=this.win.getSelection();if(!t)return null;let{anchorNode:n}=t;if(n&&r.Dom.isOrContains(e,n))return null;let i=(0,h.composedRanges)(t,e);if(!i)return null;let o=i.map(e=>{let t=this.createRange();return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t}),s=o[0],l={rangeCount:o.length,getRangeAt:e=>o[e],isCollapsed:o.every(e=>e.collapsed),anchorNode:s?s.startContainer:null,anchorOffset:s?s.startOffset:0,focusNode:s?s.endContainer:null,focusOffset:s?s.endOffset:0,toString:()=>o.map(e=>e.toString()).join("")};return new Proxy(t,{get(e,t){if((0,a.isString)(t)&&t in l)return l[t];let n=Reflect.get(e,t,e);return(0,a.isFunction)(n)?n.bind(e):n}})}__nativeRangeCount(){var e,t,n,i;let{shadowRoot:o}=this.j.o;return o&&(0,a.isFunction)(o.getSelection)?null!=(t=null==(e=o.getSelection())?void 0:e.rangeCount)?t:0:null!=(i=null==(n=this.win.getSelection())?void 0:n.rangeCount)?i:0}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!(null==e?void 0:e.rangeCount))return!1;for(let t=0;t<e.rangeCount;t+=1)if(!r.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let n=e.getRangeAt(t);r.Dom.isOrContains(this.area,n.commonAncestorContainer)&&(n.deleteContents(),n.collapse(!0))}}clear(){var e,t;(null==(e=this.sel)?void 0:e.rangeCount)&&(null==(t=this.sel)||t.removeAllRanges())}removeNode(e){if(!r.Dom.isOrContains(this.j.editor,e,!0))throw(0,s.error)("Selection.removeNode can remove only editor's children");r.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){var n,i,o,s;try{let a=this.createRange(),l=null==(i=(n=this.doc).caretPositionFromPoint)?void 0:i.call(n,e,t),c=l?null:null==(s=(o=this.doc).caretRangeFromPoint)?void 0:s.call(o,e,t);if(l)a.setStart(l.offsetNode,l.offset);else{if(!c)return!1;a.setStart(c.startContainer,c.startOffset)}if(!r.Dom.isOrContains(this.area,a.startContainer))return!1;return a.collapse(!0),this.removeMarkers(),this.selectRange(a),!0}catch(e){}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,s.$$)("span[data-"+i.MARKER_CLASS+"]",this.area)}removeMarkers(){r.Dom.safeRemove(...this.markers)}marker(e=!1,t){var n;let o=null;t&&(o=t.cloneRange()).collapse(e);let a=this.j.createInside.span();if(a.id=i.MARKER_CLASS+"_"+Number(new Date)+"_"+String(Math.random()).slice(2),(0,s.css)(a,{lineHeight:"0",display:"none"}),r.Dom.markTemporary(a),(0,s.attr)(a,"data-"+i.MARKER_CLASS,e?"start":"end"),r.Dom.append(a,this.j.createInside.text(i.INVISIBLE_SPACE)),o&&r.Dom.isOrContains(this.area,e?o.startContainer:o.endContainer)){let{startContainer:e,startOffset:t}=o;r.Dom.isText(e)&&0===t?r.Dom.before(e,a):r.Dom.isText(e)&&t===(null==(n=e.nodeValue)?void 0:n.length)?r.Dom.after(e,a):o.insertNode(a)}return a}restore(){var e,t;let n=this.markers,o=new Map(n.map(e=>[e.id,e])),a=[],l=!1;for(let c=0;c<n.length;c+=1){let u=n[c];if("start"!==(0,s.attr)(u,"data-"+i.MARKER_CLASS))continue;l||(l="true"===(0,s.attr)(u,"data-selection-backward"));let d=(0,s.attr)(u,"data-selection-end"),h=d?o.get(d):void 0;!d&&n[c+1]&&"end"===(0,s.attr)(n[c+1],"data-"+i.MARKER_CLASS)&&(h=n[c+1]);let p=this.createRange();if(h)p.setStartAfter(u),p.setEndBefore(h);else{let n=u.previousSibling;r.Dom.isText(n)?p.setStart(n,null!=(t=null==(e=n.nodeValue)?void 0:e.length)?t:0):p.setStartBefore(u),p.collapse(!0)}a.push(p)}r.Dom.safeRemove(...n),a.length&&this.__selectRanges(a,l)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,n)=>e.getRangeAt(n).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),n=t.map(e=>{let t=e.collapsed,n=e.cloneRange();n.collapse(!0);let i=this.j.createInside.fake();r.Dom.safeInsertNode(n,i),e.setStartBefore(i);let o=[i];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let n=this.j.createInside.fake();r.Dom.safeInsertNode(t,n),e.setEndAfter(n),o.push(n)}return o});return this.__fakeSelections.set(n[0][0],{pairs:n,backward:e}),this.__selectRanges(t,e),n[0]}restoreFakes(e){var t,n,i;if(!e.length)return;let o=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let s=[];for(let a of null!=(t=null==o?void 0:o.pairs)?t:[e]){let e=a.filter(e=>e.isConnected&&r.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,o]=e,l=this.createRange();for(let s of(l.setStartAfter(t),o?l.setEndBefore(o):l.collapse(!0),e))(null==(n=s.parentNode)?void 0:n.firstChild)!==(null==(i=s.parentNode)?void 0:i.lastChild)&&r.Dom.safeRemove(s);s.push(l)}s.length&&this.__selectRanges(s,null==o?void 0:o.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let n=this.__isBackward(),i=[],o=t.rangeCount,a=[];for(let e=0;o>e;e+=1)if(a[e]=t.getRangeAt(e),!r.Dom.isOrContains(this.area,a[e].commonAncestorContainer))return[];for(let e=0;o>e;e+=1)if(a[e].collapsed){let t=this.marker(!0,a[e]);i[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,a[e]),r=this.marker(!1,a[e]);o>1&&(0,s.attr)(t,"data-selection-end",r.id),n&&(0,s.attr)(t,"data-selection-backward","true"),i[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=o-1;e>=0;--e){let n=this.area.querySelector("#"+i[e].startId);if(n){if(i[e].collapsed)a[e].setStartAfter(n),a[e].collapse(!0);else if(a[e].setStartBefore(n),i[e].endId){let t=this.area.querySelector("#"+i[e].endId);t&&a[e].setEndAfter(t)}try{t.addRange(a[e].cloneRange())}catch(e){}}}}return i}focus(e={preventScroll:!0}){var t,n;if(!this.isFocused()){let i=(0,s.getScrollParent)(this.j.container),o=null==i?void 0:i.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),o&&(null==i?void 0:i.scrollTo)&&i.scrollTo(0,o);let a=this.sel,l=(null==a?void 0:a.rangeCount)?null==a?void 0:a.getRangeAt(0):null;if(!l||!r.Dom.isOrContains(this.area,l.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||null==(n=null==(t=this.j)?void 0:t.events)||n.fire("focus"),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){let e=this.doc.activeElement;return!!(this.doc.hasFocus&&this.doc.hasFocus()&&e&&(this.area===e||r.Dom.isHTMLElement(e)&&e.isContentEditable&&r.Dom.isOrContains(this.area,e)))}current(e=!0){if(this.j.getRealMode()!==i.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let n=t.getRangeAt(0),o=n.startContainer,s=!1;if(!r.Dom.isOrContains(this.area,o))return null;if(r.Dom.isTag(o,"br")&&t.isCollapsed)return o;if(!r.Dom.isText(o)){let i=(0,h.findCorrectCurrentNode)(o,n,s,t.isCollapsed,e,e=>s?e.lastChild:e.firstChild);o=i.node,s=i.rightMode}return o&&r.Dom.isOrContains(this.area,o)?o:null}insertNode(e,t=!0,n=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let o=r.Dom.isFragment(e)?e.lastChild:e;if(!o||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let a=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(o=r.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(a&&a.rangeCount){let t=a.getRangeAt(0),n=r.Dom.isBlock(e),o=n?e:e.firstChild;r.Dom.isOrContains(this.area,t.commonAncestorContainer)?r.Dom.safeInsertNode(t,e):r.Dom.append(this.area,e),[()=>null==o?void 0:o.previousSibling,()=>null==o?void 0:o.previousSibling,()=>{var e;return null==(e=null==o?void 0:o.previousSibling)?void 0:e.lastChild},()=>n?e.nextSibling:null].forEach(e=>{var t;let n=e();n&&r.Dom.isText(n)&&0===(null!=(t=n.nodeValue)?t:"").replace(i.INVISIBLE_SPACE_REG_EXP(),"").length&&r.Dom.safeRemove(n)})}else r.Dom.append(this.area,e);let n=e=>{if(r.Dom.isBlock(e)){let t=e.lastChild;if(t)return n(t)}this.setCursorAfter(e)};t&&(r.Dom.isFragment(e)?o&&n(o):n(e)),this.j.o.scrollToPastedContent&&(0,s.scrollIntoViewIfNeeded)(null!=o?o:e,this.j.editor,this.doc)}),n&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",r.Dom.isFragment(e)?o:e)}insertHTML(e,t=!0){if(""===e)return;let n=this.j.createInside.div(),i=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),r.Dom.isNode(e)?r.Dom.append(n,e):n.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",n.innerHTML)||n.lastChild&&(r.Dom.moveContent(n,i),this.insertNode(i,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,n=null){let i=(0,a.isString)(e)?this.j.createInside.element("img"):e;if((0,a.isString)(e)&&(0,s.attr)(i,"src",e),null!=n){let e=n.toString();e&&"auto"!==e&&0>String(e).indexOf("px")&&0>String(e).indexOf("%")&&(e+="px"),(0,s.attr)(i,"width",e)}t&&"object"==typeof t&&(0,s.css)(i,t);let{imageDefaultAlign:o}=this.j.o;o&&"normal"!==o&&(0,l.hAlignElement)(i,o,(0,l.getAlignClasses)(this.j,i));let r=()=>{(i.naturalHeight<i.offsetHeight||i.naturalWidth<i.offsetWidth)&&(0,s.css)(i,{width:"",height:""}),i.removeEventListener("load",r)};this.j.e.on(i,"load",r),i.complete&&r(),this.insertNode(i),this.j.e.fire("afterInsertImage",i)}eachSelection(e){let t=new Set;for(let n of this.__ranges())r.Dom.isOrContains(this.area,n.commonAncestorContainer)&&this.__eachRange(n,n=>{t.has(n)||(t.add(n),e(n))})}__eachRange(e,t){var n;let o=e.commonAncestorContainer;r.Dom.isHTMLElement(o)||(o=o.parentElement);let l=[],c=e.startOffset,u=o.childNodes.length,d=e.startContainer===this.area?o.childNodes[c<u?c:u-1]:e.startContainer,h=e.endContainer===this.area?o.childNodes[e.endOffset-1]:e.endContainer;r.Dom.isText(d)&&d===e.startContainer&&e.startOffset===(null==(n=d.nodeValue)?void 0:n.length)&&d.nextSibling&&(d=d.nextSibling),r.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===o||r.Dom.isEmptyTextNode(e)||(0,a.isMarker)(e)||l.push(e)};p(d),d!==h&&r.Dom.isOrContains(o,d,!0)&&r.Dom.find(d,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),o,!0,!1);let f=e=>{if(r.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,s.toArray)(e.childNodes).forEach(f);if(r.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(i.INVISIBLE_SPACE);r.Dom.append(e,t),e=t}t(e)}};0===l.length&&(r.Dom.isEmptyTextNode(d)&&l.push(d),(null==d?void 0:d.firstChild)&&l.push(d.firstChild)),l.forEach(f)}cursorInTheEdge(e,t,n=null){let i=!e,o=this.sel,s=(null==o?void 0:o.rangeCount)?o.getRangeAt(0):null;if(!s)return null;let a=e?s.startContainer:s.endContainer,l=e?s.startOffset:s.endOffset;if(null!=n||(n=a),!r.Dom.isOrContains(t,a)||!r.Dom.isOrContains(t,n))return null;let c=e=>!!(e&&!r.Dom.isTag(e,"br")&&!r.Dom.isEmptyTextNode(e)&&!r.Dom.isTemporary(e)&&!(r.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(r.Dom.isText(a)){if((0,h.cursorInTheEdgeOfString)(a,l,e,i))return!1}else{let e=a.childNodes,t=i?e.length:l;for(let n=i?l:0;t>n;n+=1)if(c(e[n]))return!1}let u=n;for(;u&&u!==t;){let t=r.Dom.sibling(u,e);if(!t){u=u.parentNode;continue}if(c(u=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){var n,i;if(this.errorNode(e),!r.Dom.isOrContains(this.area,e,!0))throw(0,s.error)("Node element must be in editor");let o=this.createRange(),a=null;return r.Dom.isText(e)?t?o.setStart(e,0):o.setEnd(e,null!=(i=null==(n=e.nodeValue)?void 0:n.length)?i:0):(a=this.j.createInside.fake(),t?o.setStartBefore(e):o.setEndAfter(e),o.collapse(t),r.Dom.safeInsertNode(o,a),o.selectNode(a)),o.collapse(t),this.selectRange(o),a}setCursorIn(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let n=this.createRange(),o=e,a=e;do{if(r.Dom.isText(o)||r.Dom.isTag(o,i.INSEPARABLE_TAGS))break;a=o,o=t?o.firstChild:o.lastChild}while(o);if(!o){let e=this.j.createInside.text(i.INVISIBLE_SPACE);r.Dom.isTag(a,i.INSEPARABLE_TAGS)?o=a:(r.Dom.append(a,e),a=e)}let l=o||a;return r.Dom.isTag(l,i.INSEPARABLE_TAGS)?t||r.Dom.isTag(l,"br")?n.setStartBefore(l):n.setEndAfter(l):n.selectNodeContents(l),n.collapse(t),this.selectRange(n),a}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,n=!0){let i=this.sel;if(n&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),i){if(i.removeAllRanges(),e.forEach(e=>i.addRange(e)),t&&1===e.length){let t=e[0];i.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}else if(1===e.length&&!this.__nativeRangeCount()&&(0,a.isFunction)(i.setBaseAndExtent)){let t=e[0];i.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let n=!t&&this.__closestNotEditable(e)||e,i=this.createRange();return i[t||n===this.area?"selectNodeContents":"selectNode"](n),this.selectRange(i)}__closestNotEditable(e){let{area:t}=this,n=null,i=e.parentNode;for(;i&&i!==t&&t.contains(i);){if(r.Dom.isElement(i)){let e=i.getAttribute("contenteditable");if("true"===e)break;"false"===e&&(n=i)}i=i.parentNode}return n}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>r.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(r.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){var t,n,i,o;let{endContainer:s,endOffset:a}=e;r.Dom.isText(s)&&a>0&&a<(null!=(n=null==(t=s.nodeValue)?void 0:t.length)?n:0)&&s.splitText(a);let{startContainer:l,startOffset:c}=e;if(r.Dom.isText(l)&&c>0&&c<(null!=(o=null==(i=l.nodeValue)?void 0:i.length)?o:0)){let t=l.splitText(c);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){var n,i;let o=t?e.startContainer:e.endContainer;if(!r.Dom.isText(o))return;let s=t?e.startOffset:e.endOffset,a=null!=(i=null==(n=o.nodeValue)?void 0:n.length)?i:0;0===s?t?e.setStartBefore(o):e.setEndBefore(o):s>=a&&(t?e.setStartAfter(o):e.setEndAfter(o))}__collectContainedNodes(e,t,n=this.createRange()){let i=[];return(0,s.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,n)?i.push(e):e.childNodes.length&&t.intersectsNode(e)&&i.push(...this.__collectContainedNodes(e,t,n))}),i}__isFullyContained(e,t,n){return n.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,n)&&e.compareBoundaryPoints(Range.END_TO_END,n)>=0}__wrapSelectionRuns(e){let t=[],n=[],i=()=>{n.length&&(t.push(this.__wrapRunInFont(n)),n=[])};return e.forEach(e=>{r.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(i(),t.push(...this.__wrapSelectionRuns((0,s.toArray)(e.childNodes)))):(n.length&&n[n.length-1].parentNode!==e.parentNode&&i(),n.push(e))}),i(),t}__isOrContainsBlock(e){return!!r.Dom.isBlock(e)||(0,s.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[n]=e;return r.Dom.before(n,t),e.forEach(e=>r.Dom.append(t,e)),t}*wrapInTagGen(e){var t;if((null==(t=this.sel)?void 0:t.rangeCount)&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",i.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&r.Dom.append(t,e[0]);try{yield t}finally{r.Dom.unwrap(t)}return}let n=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of n){if(this.j.isInDestruct||!r.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:n}=e;if(t&&t===n&&(0,a.isMarker)(t)){r.Dom.unwrap(e);continue}t&&(0,a.isMarker)(t)&&r.Dom.before(e,t),n&&(0,a.isMarker)(n)&&r.Dom.after(e,n),yield e,r.Dom.unwrap(e)}}finally{n.forEach(e=>r.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let n of this.wrapInTagGen())try{if(n.firstChild&&n.firstChild===n.lastChild&&(0,a.isMarker)(n.firstChild))continue;(0,a.isFunction)(e)?e(n):t.push(r.Dom.replace(n,e,this.j.createInside))}finally{let e=n.parentNode;e&&(r.Dom.unwrap(n),r.Dom.isEmpty(e)&&r.Dom.unwrap(e))}return t}commitStyle(e){(0,c.assert)((0,s.size)(e)>0,"Need to pass at least one option"),new d.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!r.Dom.isOrContains(this.area,e,!0)||!r.Dom.isOrContains(e,this.range.startContainer)||t&&!r.Dom.isOrContains(e,t,!0))return null;let n=this.createRange(),o=this.range;n.setStartBefore(e);let s=this.cursorOnTheRight(e,t),a=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),u=this.j.createInside.fake(),d=u.cloneNode();try{if(s||a){t?r.Dom.before(t,l):r.Dom.safeInsertNode(o,l);let e=(e,t)=>{let n=t(e);for(;n;){let e=t(n);if(n&&(r.Dom.isTag(n,"br")||r.Dom.isEmptyTextNode(n)))r.Dom.safeRemove(n);else break;n=e}};e(l,e=>e.nextSibling),e(l,e=>e.previousSibling),r.Dom.after(l,d),r.Dom.before(l,u),s?(n.setEndBefore(l),o.setEndBefore(l)):(n.setEndAfter(l),o.setEndAfter(l))}else n.setEnd(o.startContainer,o.startOffset);let h=n.extractContents(),p=e=>r.Dom.each(e,e=>r.Dom.isEmptyTextNode(e)&&r.Dom.safeRemove(e));(0,c.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),r.Dom.before(e,h),!t&&s&&(null==l?void 0:l.parentNode)){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!i.IS_PROD)throw e}let f=e=>{let t=null==e?void 0:e.parentNode;t&&t.firstChild===t.lastChild&&r.Dom.append(t,l.cloneNode())};f(u),f(d)}finally{r.Dom.safeRemove(u),r.Dom.safeRemove(d)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!r.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let n=t=>{let n=this.j.createInside.fake(),i=e.cloneRange();return i.collapse(t),r.Dom.safeInsertNode(i,n),(0,u.moveTheNodeAlongTheEdgeOutward)(n,t,this.j.editor),n},i=n(!0),o=n(!1);t.setStartAfter(i),t.setEndBefore(o);let a=r.Dom.findSibling(i,!1),l=r.Dom.findSibling(o,!0);if(a!==l){let e=r.Dom.isElement(a)&&r.Dom.isOrContains(a,o),n=!e&&r.Dom.isElement(l)&&r.Dom.isOrContains(l,i);if(e||n){let n=e?a:l,s=n;for(;r.Dom.isElement(n);)(n=e?n.firstElementChild:n.lastElementChild)&&(e?r.Dom.isOrContains(n,o):r.Dom.isOrContains(n,i))&&(s=n);e?t.setStart(s,0):t.setEnd(s,s.childNodes.length)}}if(r.Dom.safeRemove(i,o),t.collapsed)throw(0,s.error)("Selection is collapsed");return t}constructor(e){this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}p([o.autobind],f.prototype,"createRange",null),p([o.autobind],f.prototype,"focus",null),p([o.autobind],f.prototype,"setCursorAfter",null),p([o.autobind],f.prototype,"setCursorBefore",null),p([o.autobind],f.prototype,"setCursorIn",null)},32526:function(e,t,n){n.d(t,{extractSelectedPart:function(){return s}});var i=n(2748),o=n(78116),r=n(37790);function s(e,t,n){let i=n.s.createRange(),r=(0,o.isMarker)(t.previousSibling)?t.previousSibling:t;i.setStartBefore(e),i.setEndBefore(r),a(e,i,!0);let s=(0,o.isMarker)(t.nextSibling)?t.nextSibling:t;i.setStartAfter(s),i.setEndAfter(e),a(e,i,!1)}function a(e,t,n){let o=t.extractContents();i.Dom.isEmpty(o)&&o.firstChild&&i.Dom.unwrap(o.firstChild),e.parentNode&&(0,r.call)(n?i.Dom.before:i.Dom.after,e,o)}},49996:function(e,t,n){n.d(t,{FiniteStateMachine:function(){return s}});var i=n(82758),o=n(70799),r=n(38837);class s{setState(e){(0,r.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let n=this.transitions[this.getState()][e];if(n){let e=n.call(this,t);return(0,r.assert)(e&&e!==t,"Action should return new value"),(0,r.assert)((0,o.isString)(e.next),"Value should contain the next state"),(0,r.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),i.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},23738:function(e,t,n){n.d(t,{getSuitChild:function(){return s}});var i=n(2748),o=n(29136),r=n(97380);function s(e,t){let{firstChild:n}=t;for(;n&&!(0,o.isNormalNode)(n);)if(!(n=n.nextSibling))return null;return n&&!i.Dom.next(n,o.isNormalNode,t)&&(0,r.isSuitElement)(e,n,!1)?n:null}},44602:function(e,t,n){n.d(t,{getSuitParent:function(){return function e(t,n,s){var a;let{parentNode:l}=n;return l===s||!i.Dom.isHTMLElement(l)||i.Dom.next(n,o.isNormalNode,l)||i.Dom.prev(n,o.isNormalNode,l)?null:t.isElementCommit&&t.elementIsBlock&&!i.Dom.isBlock(l)?e(t,l,s):i.Dom.isTag(l,"li")&&!t.isElementCommit&&(null==(a=t.options.attributes)?void 0:a.style)||(0,r.isSuitElement)(t,l,!1)&&(!i.Dom.isBlock(l)||t.elementIsBlock)?l:t.isElementCommit&&!i.Dom.isBlock(l)?e(t,l,s):null}}});var i=n(2748),o=n(29136),r=n(97380)},22030:function(e,t,n){n.d(t,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return u}});var i=n(82758),o=n(2748),r=n(86068),s=n(3760),a=n(38837),l=n(41180);function c(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(n=>{let i=(0,l.css)(e,n,!0);return""===i&&(""===t[n]||null==t[n])||!(0,r.isVoid)(i)&&""!==i&&!(0,r.isVoid)(t[n])&&(0,s.normalizeCssValue)(n,t[n]).toString().toLowerCase()===i.toString().toLowerCase()}))}if(i.globalDocument){let e=i.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(c(e,{fontSize:null}),"Style test"),(0,a.assert)(c(e,{fontSize:""}),"Style test")}function u(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(i.globalDocument){let e=i.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(u(e,{color:"red"}),"Style test"),(0,a.assert)(!u(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!u(e,{border:"1px solid #ccc"}),"Style test")}},63687:function(e,t,n){n.d(t,{FiniteStateMachine:function(){return o.FiniteStateMachine},WRAP_NODES:function(){return h.WRAP_NODES},extractSelectedPart:function(){return i.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return u.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return d.unwrapChildren},wrap:function(){return h.wrap}});var i=n(32526),o=n(49996),r=n(23738),s=n(44602);n(22030);var a=n(64291);n(29136),n(94466);var l=n(97380),c=n(20199);n(82515);var u=n(44253),d=n(75882),h=n(19263);n(6980)},64291:function(e,t,n){n.d(t,{isInsideInvisibleElement:function(){return o}});var i=n(2748);function o(e,t){return!!i.Dom.closest(e,["style","script"],t)}},29136:function(e,t,n){n.d(t,{isNormalNode:function(){return r}});var i=n(2748),o=n(78116);function r(e){return!!(e&&!i.Dom.isEmptyTextNode(e)&&!i.Dom.isTemporary(e)&&!(0,o.isMarker)(e))}},94466:function(e,t,n){n.d(t,{elementsEqualAttributes:function(){return c},isSameAttributes:function(){return l}});var i=n(21496),o=n(43555),r=n(38837),s=n(29960),a=n(22030);function l(e,t){return!(0,i.size)(t)||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(n=>{var i;if("class"===n||"className"===n)return(null!=(i=String(t[n]).match(/[^\t\n\f\r ]+/g))?i:[]).every(t=>e.classList.contains(t));if("style"===n)return(0,a.hasSameStyle)(e,t[n]);let r=t[n];return(0,o.attr)(e,n)===(null==r?r:String(r))}))}function c(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,s.attrRaw)(t,e.name)===e.value)}},97380:function(e,t,n){n.d(t,{isSuitElement:function(){return s},suitableClosest:function(){return a}});var i=n(2748),o=n(22030),r=n(29136);function s(e,t,n,a=!0){var l;if(!t||!(0,r.isNormalNode)(t))return!1;let{element:c,elementIsDefault:u,options:d}=e;if(i.Dom.isList(t)&&e.elementIsList)return!0;let h=i.Dom.isTag(t,c);return!!(h&&!(u&&n)||(null==(l=d.attributes)?void 0:l.style)&&(a?(0,o.hasSameStyle)(t,d.attributes.style):(0,o.hasSameStyleKeys)(t,d.attributes.style))&&!e.elementIsList)||!h&&!n&&u&&i.Dom.isInlineBlock(t)}function a(e,t,n){return i.Dom.closest(t,t=>s(e,t,!0,!1),n)}},20199:function(e,t,n){n.d(t,{toggleOrderedList:function(){return d}});var i=n(2748),o=n(21496),r=n(38837),s=n(32526),a=n(94466),l=n(44253),c=n(77361),u=n(82515);function d(e,t,n,r,s=!1){if(!t)return r;let f=t.parentElement;if(!f)return r;let m=n.e.fire(`${c._PREFIX}BeforeToggleList`,r,e,f);if(void 0!==m)return m;let g=n.e.fire.bind(n.e,`${c._PREFIX}AfterToggleList`);if("unwrap"!==r){let d="change"===(0,l.toggleAttributes)(e,t.parentElement,n,c.INITIAL,!0),m=i.Dom.isTag(f,e.element);if(m&&d&&r!==c.REPLACE&&function({options:{attributes:e}}){return!!(null==e?void 0:e.style)&&1===(0,o.size)(e)}(e)){let t;return(0,l.toggleAttributes)(e,f,n,"change"),g("change",(t=i.Dom.findSibling(f,!0),"change"===r&&i.Dom.isTag(t,e.element)&&(0,a.elementsEqualAttributes)(t,f)?(i.Dom.append(t,Array.from(f.childNodes)),i.Dom.safeRemove(f),t):f),e),"change"}if(m&&"change"===r)return"change";if(r===c.REPLACE||d||!m){let o;for(let r of s&&!m?Array.from(f.children).filter(e=>i.Dom.isLeaf(e)):[t])o=h(r,t=>(0,u.wrapList)(e,p(c.REPLACE,t,r,n,e),n));return g(c.REPLACE,o,e),c.REPLACE}}return g("unwrap",h(t,i=>p("unwrap",i,t,n,e)),e),"unwrap"}function h(e,t){let n=e.parentElement,o=e.nextElementSibling,r=i.Dom.isTag(n,"ol")?(parseInt(n.getAttribute("start")||"1",10)||1)+Array.from(n.children).indexOf(e):0,s=t(n),a=null==o?void 0:o.parentElement;return r&&i.Dom.isTag(a,"ol")&&(r>1?a.setAttribute("start",String(r)):a.removeAttribute("start")),s}function p(e,t,n,o,a){let l=o.e.fire(`${c._PREFIX}BeforeUnwrapList`,e,t,a);return l?((0,r.assert)(i.Dom.isHTMLElement(l),`${c._PREFIX}BeforeUnwrapList hook must return HTMLElement`),l):((0,s.extractSelectedPart)(t,n,o),(0,r.assert)(i.Dom.isHTMLElement(n.parentElement),"Element should be inside the list"),i.Dom.unwrap(n.parentElement),e===c.REPLACE)?n:i.Dom.replace(n,"br"!==o.o.enter.toLowerCase()?o.o.enter:o.createInside.fragment(),o.createInside)}},82515:function(e,t,n){n.d(t,{wrapList:function(){return a}});var i=n(2748),o=n(94466),r=n(44253),s=n(77361);function a(e,t,n){let a=n.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e),l=null!=a?a:i.Dom.replace(t,"li",n.createInside),c=l.previousElementSibling,u=l.nextElementSibling,d=i.Dom.isTag(c,e.element)?c:null;return null!=d||(d=i.Dom.isTag(u,e.element)?u:null),i.Dom.isList(d)&&(0,o.isSameAttributes)(d,e.options.attributes)||(d=n.createInside.element(e.element),(0,r.toggleAttributes)(e,d,n,s.INITIAL),i.Dom.before(l,d)),c===d?i.Dom.append(d,l):i.Dom.prepend(d,l),i.Dom.isTag(d.nextElementSibling,e.element)&&(0,o.elementsEqualAttributes)(d,d.nextElementSibling)&&(i.Dom.append(d,Array.from(d.nextElementSibling.childNodes)),i.Dom.safeRemove(d.nextElementSibling)),n.e.fire(`${s._PREFIX}AfterWrapList`,"wrap",d,e),d}},44253:function(e,t,n){n.d(t,{toggleAttributes:function(){return f}});var i=n(82758),o=n(2748),r=n(580),s=n(27613),a=n(3760),l=n(21496),c=n(43555),u=n(41180),d=n(86583),h=n(77361);let p="toggleAttributes";function f(e,t,n,m,g=!1){var b;if(!g&&e.isApplied(t,p))return m;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,f;let b=v[e];switch(e){case"style":p=m,(0,c.assert)((0,s.isPlainObject)(b)&&(0,l.size)(b),"Style must be an object"),Object.keys(b).forEach(e=>{let s=(0,u.cssInline)(t,e),l=b[e];if(""!==s||null!=l){let h,f,m,b;if(null==l||""===l){s&&(g||(0,u.css)(t,e,null),p="change");return}if(h=function(e){var t;if(void 0!==(0,d.dataBind)(e,"shadowRoot"))return(0,d.dataBind)(e,"shadowRoot");let n=(0,r.getContainer)(e),s=i.globalDocument.createElement("iframe");(0,u.css)(s,{width:0,height:0,position:"absolute",border:0}),(0,c.attr)(s,"src","about:blank"),o.Dom.append(n,s);let a=null==(t=s.contentWindow)?void 0:t.document,l=a?a.body:e.od.body;return(0,d.dataBind)(e,"shadowRoot",l),l}(n),f=n.create.element("div"),(0,u.css)(f,"color",(0,u.css)(n.editor,"color")),m=n.create.element(t.tagName.toLowerCase()),(0,c.attr)(m,"style",(0,c.attr)(t,"style")),o.Dom.append(f,m),o.Dom.append(h,f),b=(0,u.css)(m,e),o.Dom.safeRemove(f),b===(0,a.normalizeCssValue)(e,l)){if(!s)return;g||(0,u.css)(t,e,null),p="unset";return}p="change",g||(0,u.css)(t,e,l)}}),m=p;break;case"className":case"class":m=function(e,t,n,i,o){var r;(0,c.assert)((0,s.isString)(t),"Class name must be a string");let a=null!=(r=t.match(/[^\t\n\f\r ]+/g))?r:[];if(!a.length)return i;let l=e.e.fire.bind(e.e,`${h._PREFIX}AfterToggleAttribute`);return a.every(e=>n.classList.contains(e))?(i="unset",o||(n.classList.remove(...a),0===n.classList.length&&(0,c.attr)(n,"class",null),l(i,n,"class",(0,c.attr)(n,"class")))):(i="change",o||(n.classList.add(...a),l(i,n,"class",t))),i}(n,b,t,m,g);break;default:let y;f=m,(0,c.assert)((0,s.isString)(b)||(0,s.isNumber)(b)||(0,s.isBoolean)(b)||null==b,"Attribute value must be a string or number or boolean or null"),y=n.e.fire.bind(n.e,`${h._PREFIX}AfterToggleAttribute`),(0,c.attr)(t,e)===(null==b?b:String(b))?(g||(0,c.attr)(t,e,null),f="unset",g||y(f,t,e,b)):(f="change",g||((0,c.attr)(t,e,b),y(f,t,e,b))),m=f}}),!g&&(null==v?void 0:v.style)?(b=m,!(0,c.attr)(t,"style")&&((0,c.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(o.Dom.unwrap(t),b="unwrap")),b):m}},75882:function(e,t,n){n.d(t,{unwrapChildren:function(){return a}});var i=n(2748),o=n(43555),r=n(22030),s=n(97380);function a(e,t){var n;let a,l=[],c=[],u=null==(n=e.options.attributes)?void 0:n.style,d=Object.keys(null!=u?u:{}),h={};d.forEach(e=>{h[e]=null});let p=t=>{(0,o.css)(t,h),(0,o.attr)(t,"style")||(0,o.attr)(t,"style",null),!t.attributes.length&&i.Dom.isTag(t,e.element)&&l.push(t)};for(let n of i.Dom.eachGen(t))i.Dom.isContentEditable(n,t)&&((0,s.isSuitElement)(e,n,!0)&&(!u||(0,r.hasSameStyleKeys)(n,u))?(void 0===a&&(a=!0),u?c.push(()=>p(n)):l.push(n)):u&&i.Dom.isHTMLElement(n)&&d.some(e=>""!==(0,o.css)(n,e,!0))?(void 0===a&&(a=!1),c.push(()=>p(n))):i.Dom.isEmptyTextNode(n)||void 0!==a||(a=!1));return c.forEach(e=>e()),l.forEach(i.Dom.unwrap),!!a}},6980:function(e,t,n){n.d(t,{wrapUnwrappedText:function(){return r}});var i=n(2748),o=n(78116);function r(e,t,n){let r=n.editor,s=n.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,o.isMarker)(a)&&!i.Dom.isTag(a,n.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!i.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!i.Dom.isBlock(a)););return s},l=a(t),c=a(t,"nextSibling"),u=n.s.createRange();u.setStartBefore(l),u.setEndAfter(c);let d=u.extractContents(),h=s.element(e.element);return i.Dom.append(h,d),i.Dom.safeInsertNode(u,h),e.elementIsBlock&&i.Dom.isEmpty(h)&&!h.querySelector("br")&&i.Dom.append(h,s.element("br")),h}},19263:function(e,t,n){n.d(t,{wrap:function(){return l}});var i=n(22732),o=n(29960),r=n(41180),s=n(82515),a=n(6980);function l(e,t,n){var l,u,d;let h=(l=e,u=t,d=n,l.elementIsBlock?i.Dom.up(u,e=>i.Dom.isBlock(e)&&!i.Dom.isTag(e,c)&&!Array.from(e.childNodes).some(e=>i.Dom.isBlock(e)),d.editor)||(0,a.wrapUnwrappedText)(l,u,d):((0,o.attr)(u,"size",null),u));if(e.elementIsList)return(0,s.wrapList)(e,h,n);let p=i.Dom.replace(h,e.element,n.createInside,!0);return e.elementIsBlock&&((0,r.css)(p,"fontSize",null),(0,r.css)(p,"fontWeight",null),(0,o.attr)(p,"style")||(0,o.attr)(p,"style",null)),p}let c=new Set(["td","th","tr","tbody","table","li","ul","ol"]);n.d(t,["WRAP_NODES",0,c])},83632:function(e,t,n){n.d(t,{ApplyStyle:function(){return l}});var i=n(2748),o=n(76078),r=n(63687),s=n(77361),a=n(55307);function l(e,t){var n,l;let{s:c,editor:u}=e;null==(n=u.firstChild)||n.normalize();let d=c.fakes(),h=c.isCollapsed(),p=s.INITIAL;try{for(let n of c.wrapInTagGen(d)){(null==(l=t.options.exclude)?void 0:l.length)&&function(e,t,n){let s=e.s.createRange(),a=i.Dom.closest(t.parentNode,n,e.editor);for(;a;){s.selectNodeContents(a),s.setEndBefore(t);let o=s.cloneContents();s.selectNodeContents(a),s.setStartAfter(t),i.Dom.isEmpty(o)&&i.Dom.isEmpty(s.cloneContents())||(0,r.extractSelectedPart)(a,t,e),i.Dom.unwrap(a),a=i.Dom.closest(t.parentNode,n,e.editor)}(0,o.$$)(n.join(","),t).forEach(e=>i.Dom.unwrap(e))}(e,n,t.options.exclude);let s={collapsed:h,mode:p,element:n,next:a.states.START,jodit:e,style:t},c=new r.FiniteStateMachine(a.states.START,a.transactions);for(;!e.isInDestruct&&c.getState()!==a.states.END;)s=c.dispatch("exec",s);p=s.mode}}finally{c.restoreFakes(d)}}},25639:function(e,t,n){n.d(t,{CommitStyle:function(){return a}});var i=n(82758),o=n(87058),r=n(77361),s=n(83632);class a{isApplied(e,t){let n=this.__applyMap.get(e);return!!n&&!!n[t]}setApplied(e,t){var n;let i=null!=(n=this.__applyMap.get(e))?n:{};i[t]=!0,this.__applyMap.set(e,i)}get elementIsList(){return!!(this.options.element&&i.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&i.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(e){let{hooks:t}=this.options,n=t?Object.keys(t):[];try{n.forEach(n=>{e.e.on((0,o.camelCase)(r._PREFIX+"_"+n),t[n])}),(0,s.ApplyStyle)(e,this)}finally{n.forEach(n=>{e.e.off((0,o.camelCase)(r._PREFIX+"_"+n),t[n])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){this.options=e,this.__applyMap=new WeakMap}}},77361:function(e,t,n){n.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},55307:function(e,t,n){var i=n(82758),o=n(2748),r=n(38837),s=n(63687),a=n(77361);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}let u={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},d={[u.START]:{exec(e){let{element:t,jodit:n,style:i,mode:r,collapsed:a}=e;if(!o.Dom.isContentEditable(t,n.editor)||(0,s.isInsideInvisibleElement)(t,n.editor)||!a&&o.Dom.isEmptyContent(t))return c(l({},e),{next:u.END});let d=(0,s.getSuitParent)(i,t,n.editor)||(0,s.getSuitChild)(i,t);if(d)return c(l({},e),{next:u.ELEMENT,element:d});let h=(0,s.suitableClosest)(i,t,n.editor);return i.elementIsList&&o.Dom.isList(h)?c(l({},e),{next:u.LIST}):h?c(l({},e),{next:u.EXTRACT}):c(l({},e),{next:"unwrap"!==r?u.UNWRAP_CHILDREN:u.END})}},[u.LIST]:{exec(e){let{element:t,jodit:n,mode:r}=e;if(r!==a.INITIAL&&"unwrap"!==r&&r!==a.REPLACE&&"change"!==r)return c(l({},e),{next:u.END});let s=o.Dom.closest(t,"li",n.editor);return s&&o.Dom.closest(t,i.LIST_TAGS,n.editor)?c(l({},e),{element:s,next:u.TOGGLE_LIST}):c(l({},e),{next:u.END})}},[u.TOGGLE_LIST]:{exec(e){return c(l({},e),{mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode,e.collapsed),next:u.END})}},[u.EXTRACT]:{exec(e){var t;let{element:n,jodit:i,style:a}=e,d=(0,s.suitableClosest)(a,n,i.editor);return((0,r.assert)(d,"This place should have an element"),!a.elementIsBlock&&(null==(t=a.options.attributes)?void 0:t.style)&&o.Dom.isBlock(d))?c(l({},e),{next:u.WRAP}):(a.elementIsBlock||(0,s.extractSelectedPart)(d,n,i),c(l({},e),{element:d,next:u.ELEMENT}))}},[u.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:n}=e;return(0,s.unwrapChildren)(n,t)?c(l({},e),{mode:"unwrap",next:u.END}):c(l({},e),{next:u.WRAP})}},[u.WRAP]:{exec(e){let{element:t,jodit:n,style:i}=e,o=(0,s.wrap)(i,t,n);return c(l({},e),{next:i.elementIsList?u.END:u.CHANGE,mode:"wrap",element:o})}},[u.ELEMENT]:{exec(e){let{style:t,element:n,jodit:i}=e;return(0,s.toggleAttributes)(t,n,i,a.INITIAL,!0)!==a.INITIAL?c(l({},e),{next:u.CHANGE}):o.Dom.isTag(n,t.element)?c(l({},e),{next:u.UNWRAP}):c(l({},e),{next:u.END})}},[u.CHANGE]:{exec(e){let{style:t,element:n,jodit:i,mode:r}=e,a=(0,s.toggleAttributes)(t,n,i,e.mode);return"wrap"!==r&&"unset"===a&&!n.attributes.length&&o.Dom.isTag(n,t.element)?c(l({},e),{next:u.UNWRAP}):c(l({},e),{mode:a,next:u.END})}},[u.UNWRAP]:{exec(e){let{element:t,style:n,jodit:i}=e;if(t.attributes.length&&o.Dom.isTag(t,n.element))return c(l({},e),{next:u.REPLACE_DEFAULT});let r=t.parentElement;return n.elementIsBlock&&!n.elementIsDefault&&r&&r!==i.editor&&o.Dom.isBlock(r)&&!o.Dom.isTag(r,s.WRAP_NODES)?c(l({},e),{next:u.REPLACE_DEFAULT}):(o.Dom.unwrap(t),c(l({},e),{mode:"unwrap",next:u.END}))}},[u.REPLACE_DEFAULT]:{exec(e){return o.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),c(l({},e),{mode:a.REPLACE,next:u.END})}},[u.END]:{exec(e){return e}}};n.d(t,["states",0,u,"transactions",0,d])},97333:function(e,t,n){n.d(t,{AsyncStorage:function(){return c}});var i=n(87058),o=n(2621),r=n(65638),s=n(21162);function a(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function l(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function s(e){a(r,i,o,s,l,"next",e)}function l(e){a(r,i,o,s,l,"throw",e)}s(void 0)})}}class c{set(e,t){return l(function*(){let n=yield this.provider;return yield n.set((0,i.camelCase)(this.prefix+e),t),this}).call(this)}delete(e){return l(function*(){let t=yield this.provider;return yield t.delete((0,i.camelCase)(this.prefix+e)),this}).call(this)}get(e){return l(function*(){return(yield this.provider).get((0,i.camelCase)(this.prefix+e))}).call(this)}exists(e){return l(function*(){return(yield this.provider).exists((0,i.camelCase)(this.prefix+e))}).call(this)}clear(){return l(function*(){let e=yield this.provider;return yield e.clear(),this}).call(this)}close(){return l(function*(){let e=yield this.provider;"close"in e&&"function"==typeof e.close&&(yield e.close())}).call(this)}static makeStorage(e=!1,t,n){let i,a=null==n?void 0:n.defaultProvider;return null!=a?new c(Promise.resolve(i="local"===a?(0,r.canUsePersistentStorage)("localStorage")?new r.LocalStorageProvider("Jodit_"+(t||"")):new s.MemoryStorageProvider:"memory"===a?new s.MemoryStorageProvider:a),t):("localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(i=new r.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(i=(0,o.canUseIndexedDB)().then(e=>e?new o.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new s.MemoryStorageProvider)),i||(i=new s.MemoryStorageProvider),new c(Promise.resolve(i),t))}constructor(e,t){this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},2621:function(e,t,n){n.d(t,{IndexedDBProvider:function(){return s},canUseIndexedDB:function(){return c},clearUseIndexedDBCache:function(){return l}});var i=n(82758);function o(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function r(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function a(e){o(s,i,r,a,l,"next",e)}function l(e){o(s,i,r,a,l,"throw",e)}a(void 0)})}}class s{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let n=indexedDB.open(this.dbName,this.DB_VERSION);n.onerror=()=>{t(n.error)},n.onsuccess=()=>{e(n.result)},n.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}performTransaction(e,t){return r(function*(){try{let n=(yield this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),i=t(n);return new Promise((e,t)=>{i.onsuccess=()=>{e(i.result)},i.onerror=()=>{t(i.error)}})}catch(e){return Promise.reject(e)}}).call(this)}set(e,t){return r(function*(){try{yield this.performTransaction("readwrite",n=>n.put(t,e))}catch(e){i.IS_PROD}return this}).call(this)}delete(e){return r(function*(){try{yield this.performTransaction("readwrite",t=>t.delete(e))}catch(e){}return this}).call(this)}get(e){return r(function*(){try{return yield this.performTransaction("readonly",t=>t.get(e))}catch(e){return}}).call(this)}exists(e){return r(function*(){try{let t=yield this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch(e){return!1}}).call(this)}clear(){return r(function*(){try{yield this.performTransaction("readwrite",e=>e.clear())}catch(e){}return this}).call(this)}close(){return r(function*(){if(this.dbPromise){try{(yield this.dbPromise).close()}catch(e){}this.dbPromise=null}}).call(this)}keys(){return r(function*(){try{let e=yield this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=yield e),e.map(e=>String(e))}catch(e){return[]}}).call(this)}values(){return r(function*(){try{let e=yield this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=yield e),e}catch(e){return[]}}).call(this)}entries(){return r(function*(){try{let[e,t]=yield Promise.all([this.keys(),this.values()]);return e.map((e,n)=>[e,t[n]])}catch(e){return[]}}).call(this)}constructor(e="JoditDB",t="keyValueStore"){this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let a=null;function l(){a=null}function c(){return r(function*(){if(null!=a)return a;try{if("u"<typeof indexedDB)return a=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return a=yield new Promise(n=>{t.onerror=()=>{n(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),n(!0)}})}catch(e){return a=!1,!1}})()}},65638:function(e,t,n){n.d(t,{LocalStorageProvider:function(){return i}});class i{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let n=this.storage.getItem(this.rootKey),i=n?JSON.parse(n):{};i[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(i))}catch(e){}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let n=JSON.parse(t);delete n[e],this.storage.setItem(this.rootKey,JSON.stringify(n))}}catch(e){}return this}get(e){try{let t=this.storage.getItem(this.rootKey),n=t?JSON.parse(t):{};return void 0!==n[e]?n[e]:void 0}catch(e){}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch(e){}return this}constructor(e,t="localStorage"){this.rootKey=e,this.strategy=t}}n.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let n="___Jodit___"+Math.random().toString(),i="sessionStorage"===e?sessionStorage:localStorage;try{i.setItem(n,"1");let o="1"===i.getItem(n);return i.removeItem(n),t.set(e,o),o}catch(e){}return t.set(e,!1),!1}])},21162:function(e,t,n){n.d(t,{MemoryStorageProvider:function(){return i}});class i{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){this.data=new Map}}},12081:function(e,t,n){n.d(t,{AsyncStorage:function(){return i.AsyncStorage},IndexedDBProvider:function(){return o.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return o.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return o.clearUseIndexedDBCache}});var i=n(97333),o=n(2621),r=n(65638),s=n(21162),a=n(6700)},6700:function(e,t,n){n.d(t,{Storage:function(){return a}});var i=n(87058),o=n(65638),r=n(21162);let s="Jodit_";class a{set(e,t){return this.provider.set((0,i.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,i.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,i.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,i.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let n;return"localStorage"===e||"sessionStorage"===e?(0,o.canUsePersistentStorage)(e)&&(n=new o.LocalStorageProvider(s+(t||""),e)):!0===e&&(0,o.canUsePersistentStorage)("localStorage")&&(n=new o.LocalStorageProvider(s+(t||""))),n||(n=new r.MemoryStorageProvider),new a(n,t)}constructor(e,t){this.provider=e,this.prefix=s,t&&(this.prefix+=t)}}},70231:function(e,t,n){n.d(t,{Dlgs:function(){return a}});var i=n(580),o=n(27613),r=n(37790),s=n(638);class a{dlg(e){let t=(0,i.getPopupViewRoot)(this.o,this.container,this.od.body),n=new s.Dialog(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize},e));return(0,r.markOwner)(this,n.container),n.parent=this,n.bindDestruct(this)}confirm(e,t,n){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,n)}prompt(e,t,n,i,o){return e=l(e,this),t=l(t,this),i=l(i,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,n,i,o)}alert(e,t,n,i){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,n,i)}}function l(e,t){return(0,o.isString)(e)&&!(0,o.isHTML)(e)&&(e=t.i18n(e)),e}},14316:function(e,t,n){n.d(t,{Elms:function(){return o}});var i=n(2748);class o{getElm(e){let t=this.getFullElName(e);return i.Dom.first(this.container,e=>i.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),n=[];return i.Dom.each(this.container,e=>{i.Dom.isHTMLElement(e)&&e.classList.contains(t)&&n.push(e)}),n}}},34176:function(e,t,n){n.d(t,{Mods:function(){return o}});var i=n(86068);class o{afterSetMod(e,t){}setMod(e,t,n){e=e.toLowerCase();let o=this.mods[e];if(o===t)return this;let r=`${this.componentName}_${e}_`,s=(n||this.container).classList;return null!=o&&s.remove(`${r}${o.toString().toLowerCase()}`),(0,i.isVoid)(t)||""===t||s.add(`${r}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){var t;return null!=(t=this.mods[e])?t:null}}},10830:function(e,t,n){n.d(t,{Button:function(){return b},UIButton:function(){return g}});var i=n(78213),o=n(33433),r=n(87325),s=n(37133),a=n(2748),l=n(23282),c=n(70799),u=n(38837),d=n(29960),h=n(48538),p=n(12153),f=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let m=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0}),g=class e extends h.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,u.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,u.assert)(e,"Icon element not found"),e}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,d.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,d.attr)(this.container,"role",this.state.role)}updateSize(){let e=(0,r.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,d.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,d.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,d.attr)(this.container,"data-ref",this.state.name),(0,d.attr)(this.container,"ref",this.state.name),this.updateAriaLabel()}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,d.attr)(this.container,"title",e),(0,d.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):!e&&this.state.name?this.state.name:null;(0,d.attr)(this.container,"aria-label",t),(0,d.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,d.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,l.isFunction)(e)&&e(this.state.name))return;a.Dom.detach(this.icon);let t=p.Icon.makeIcon(this.j,this.state.icon);t&&a.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&a.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),n=this.j.c.span(e+"__icon"),i=this.j.c.span(e+"__text");return a.Dom.append(t,n),a.Dom.append(t,i),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),this.isButton=!0,this.state=m(),this.actionHandlers=[],this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(i.STATUSES.ready,()=>{this.setState(t)})}};function b(e,t,n,i){let o=new g(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,c.isString)(t)?(o.state.icon.name=t,o.state.name=t,i&&(o.state.variant=i),n&&(o.state.text=n)):o.setState(t),o}f([o.cache],g.prototype,"text",null),f([o.cache],g.prototype,"icon",null),f([(0,s.watch)("state.size",{immediately:!1})],g.prototype,"onChangeSize",null),f([(0,s.watch)("state.type",{immediately:!1})],g.prototype,"onChangeType",null),f([(0,s.watch)("state.role",{immediately:!1})],g.prototype,"onChangeRole",null),f([(0,s.watch)("parentElement")],g.prototype,"updateSize",null),f([(0,s.watch)("state.variant",{immediately:!1})],g.prototype,"onChangeStatus",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeText",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeTextSetMode",null),f([(0,s.watch)("state.disabled")],g.prototype,"onChangeDisabled",null),f([(0,s.watch)("state.activated")],g.prototype,"onChangeActivated",null),f([(0,s.watch)("state.name",{immediately:!1})],g.prototype,"onChangeName",null),f([(0,s.watch)("state.tooltip",{immediately:!1})],g.prototype,"onChangeTooltip",null),f([(0,s.watch)("state.tabIndex",{immediately:!1})],g.prototype,"onChangeTabIndex",null),f([(0,s.watch)("state.icon",{immediately:!1})],g.prototype,"onChangeIcon",null),f([o.cacheHTML],g.prototype,"createContainer",null),f([(0,s.watch)("button:click")],g.prototype,"__onActionFire",null),g=f([r.component],g),n.d(t,["UIButtonState",0,m])},71916:function(e,t,n){n.d(t,{UIButtonGroup:function(){return l}});var i=n(87325),o=n(2748),r=n(38837),s=n(10830),a=n(62405);let l=class e extends a.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
8
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,function(){return function(){"use strict";var e,t,n,i,o,r,s={6441:function(e,t,n){n.d(t,{Config:function(){return r}});var i=n(82758);let o={};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=i.globalDocument,this.ownerWindow=i.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=i.INSERT_AS_HTML,this.enter=i.PARAGRAPH,this.iframe=!1,this.editHTMLDocumentMode=!1,this.enterBlock="br"!==this.enter?this.enter:i.PARAGRAPH,this.defaultMode=i.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:[]},"\n",{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,o)}}o=r.prototype,r.prototype.controls={}},26992:function(e,t,n){n.d(t,{Async:function(){return f}});var i=n(82758),o=n(91898),r=n(12045),s=n(23282),a=n(84767),l=n(72430),c=n(14773),u=n(70799),d=n(86068),h=n(38837),p=n(93661);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...n){if(this.isDestructed)return 0;let i={};(0,d.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(i=t).timeout||0),i.label&&this.clearLabel(i.label);let r=(0,o.setTimeout)(e,t,...n),s=i.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 n=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(n),"Callback is not a function"),this.setTimeout(n,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,o.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,u.isString)(e))return this.clearLabel(e);(0,o.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,n=!1){let i=0,a=!1,u=[],d=(...t)=>{if(!a){i=0;let n=e(...t);if(a=!0,u.length){let e=()=>{u.forEach(e=>e()),u.length=0};(0,c.isPromise)(n)?n.finally(e):e()}}},h=(...r)=>{a=!1,t?(!i&&n&&d(...r),(0,o.clearTimeout)(i),i=this.setTimeout(()=>d(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,i)):d(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{u.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let n,i=!1,o=!0;return(...r)=>{if(n=r,i){o=!0;return}o=!0,t&&(o=!1,e(...n)),i=!0,this.__queueMicrotaskNative(()=>{i=!1,!this.isDestructed&&o&&e(...n)})}}throttle(e,t,n=!1){let i=null,o,r,a;return(...n)=>{(o=!0,a=n,t)?i||(r=()=>{o?(e(...a),o=!1,i=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,i)):i=null})():e(...a)}}promise(e){let t=()=>{},n=new Promise((n,i)=>{t=()=>i((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(n,i)});return!n.finally&&"u">typeof process&&!i.IS_ES_NEXT&&(n.finally=e=>(n.then(e).catch(e),n)),n.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),n.rejectCallback=t,n}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 n=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(n),n}requestIdlePromise(e){return this.promise(t=>{let n=this.requestIdleCallback(()=>t(n),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let n=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>n.abort()),this.__controllers.add(n),void 0!==globalThis.scheduler){var i,o;let r=globalThis.scheduler.postTask(e,(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},t),o=o={signal:n.signal},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}),i));return r.finally(()=>{this.__controllers.delete(n)}).catch(()=>null),r}return this.promise((i,o)=>{let r=this.setTimeout(()=>{try{i(e())}catch(e){o(e)}this.__controllers.delete(n)},t.delay||1);n.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(n),o((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,o.clearTimeout)(e)),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,n,i,o;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!=(n=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?n:(e,t)=>{var n;let i=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-i))})},null!=(n=null==t?void 0:t.timeout)?n:1)},this.__cancelIdleCallbackNative=null!=(o=null==(i=window.cancelIdleCallback)?void 0:i.bind(window))?o:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,n){n.d(t,{Async:function(){return i.Async}});var i=n(26992)},4012:function(e,t,n){n.d(t,{Component:function(){return l}});var i=n(8884),o=n(78213),r=n(580),s=n(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,n){let i=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),i.push(`__${e}`)),t&&(i.push("_",t),i.push("_",(0,s.isVoid)(n)?"true":n.toString())),i.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===o.STATUSES.ready}get isDestructed(){return this.componentStatus===o.STATUSES.destructed}get isInDestruct(){return o.STATUSES.beforeDestruct===this.componentStatus||o.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(o.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(o.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 n=Object.getPrototypeOf(this);n&&(0,s.isFunction)(n.setStatusComponent)&&n.setStatusComponent(e,t);let i=a.get(this),o=null==i?void 0:i[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let n=a.get(this);n||(n={},a.set(this,n)),n[e]||(n[e]=[]),n[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new i.Async,this.ownerWindow=window,this.__componentStatus=o.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=o.STATUSES},91907:function(e,t,n){n.d(t,{Component:function(){return i.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var i=n(4012),o=n(78213),r=n(80480)},78213:function(e,t,n){n.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,n){n.d(t,{ViewComponent:function(){return o}});var i=n(4012);class o extends i.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,n){n.r(t),n.d(t,{IS_TEST:function(){return i}});let i=!1,o="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),u="Meta",d="Backspace",h="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[u,d,v,m,b,g,f,h,p,"F3","Tab"],w="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),_=void 0!==o&&/Mac|iPod|iPhone|iPad/.test(o.navigator.platform),S=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:k,isMin:C}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return S(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?S(t[t.length-1].src):S(o.location.href)})(),E=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);n.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.20.4","BASE_PATH",0,k,"BASE_PATH_IS_MIN",0,C,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ERROR_CODE_CONFLICT",0,409,"ES",0,"es2015","FAT_MODE",0,!1,"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,!1,"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,d,"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,f,"KEY_META",0,u,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,m,"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,"\xa0","NEARBY",0,5,"NO_EMPTY_TAGS",0,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,E,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>i=!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,o,"lang",0,{}])},20218:function(e,t,n){n.d(t,{Create:function(){return a}});var i=n(82758),o=n(2748),r=n(21537),s=n(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,n){let i=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(i),t&&((0,r.isPlainObject)(t)?(0,r.attr)(i,t):n=t),n&&(0,r.asArray)(n).forEach(e=>o.Dom.append(i,(0,r.isString)(e)?this.fromHTML(e):e)),i}div(e,t,n){let i=this.element("div",t,n);return e&&(i.className=e),i}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});o.Dom.append(this.doc.body,t);let n=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(n,"iframe.contentWindow.document"),!n)throw Error("Iframe error");return n.open(),n.write("<!DOCTYPE html><html><head></head><body></body></html>"),n.close(),[n.body,t]}span(e,t,n){let i=this.element("span",t,n);return e&&(i.className=e),i}a(e,t,n){let i=this.element("a",t,n);return e&&(i.className=e),i}text(e){return this.doc.createTextNode(e)}fake(){return this.text(i.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let n=this.div();n.innerHTML=e.toString();let i=n.firstChild===n.lastChild&&n.firstChild?n.firstChild:n;if(o.Dom.safeRemove(i),t){let e=(0,r.refs)(i);Object.keys(t).forEach(n=>{let i=e[n];i&&!1===t[n]&&o.Dom.hide(i)})}return i}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let n=t[e.tagName.toLowerCase()];(0,r.isFunction)(n)?n(e):(0,r.isPlainObject)(n)&&(0,r.attr)(e,n)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,n){n.d(t,{Create:function(){return i.Create}});var i=n(20218)},45219:function(e,t,n){n.d(t,{autobind:function(){return o}});var i=n(23282);function o(e,t,n){if(!(0,i.isFunction)(n.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=n.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,n){n.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var i=n(78213),o=n(2748),r=n(27613),s=n(82760);function a(e,t){let n=Object.getOwnPropertyDescriptor(e,t);return!n||(0,r.isFunction)(n.get)?null:n.value}function l(e,t,n){let i=n.get;if(!i)throw(0,s.error)("Getter property descriptor expected");n.get=function(){let e=i.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:n.configurable,enumerable:n.enumerable,writable:!1,value:e}),e}}function c(e,t,n){let a=n.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;n.value=function(...e){var t;let n,i=null!=(n=this.od)?n:document,r=c.get(i);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&&o.Dom.isElement(s)&&(r?r.set(this.constructor,s):c.set(i,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(i.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,n){n.d(t,{component:function(){return l},getComponentClass:function(){return c}});var i=n(82758),o=n(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")):i.IS_PROD||s.has(this.constructor)||a.has(this.constructor)||a.add(this.constructor)}}s.add(e),s.add(t);let n=(0,o.getClassName)(e.prototype);if(r.has(n)&&!i.IS_PROD)throw Error(`Component with name "${n}" is already registered`);return r.set(n,t),t}function c(e){return r.get(e)}},81577:function(e,t,n){n.d(t,{debounce:function(){return a},throttle:function(){return l}});var i=n(91907),o=n(27613),r=n(38837),s=n(89890);function a(e,t=!1,n="debounce"){return(a,l)=>{let c=a[l];if(!(0,o.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(i.STATUSES.ready,i=>{let{async:s}=i;(0,r.assert)(null!=s,`Component ${i.componentName||i.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(i):e,c=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:i.defaultTimeout;Object.defineProperty(i,l,{configurable:!0,value:s[n](i[l].bind(i),c,t)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,n){n.d(t,{derive:function(){return o}});var i=n(23282);function o(...e){return t=>{let n=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,i.isFunction)(s.value)&&!(0,i.isFunction)(n[t])&&Object.defineProperty(n,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,n){n.d(t,{hook:function(){return r}});var i=n(23282),o=n(89890);function r(e){return(t,n)=>{if(!(0,i.isFunction)(t[n]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[n].call(e)})}}},78927:function(e,t,n){n.d(t,{idle:function(){return s}});var i=n(91907),o=n(23282),r=n(89890);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(i.STATUSES.ready,e=>{let{async:n}=e,i=e[t];e[t]=(...t)=>n.requestIdleCallback(i.bind(e,...t))})}}},65478:function(e,t,n){n.r(t),n.d(t,{autobind:function(){return i.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.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 u.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var i=n(45219),o=n(33433),r=n(87325),s=n(81577),a=n(55153),l=n(97357),c=n(78927),u=n(31589),d=n(53213),h=n(13525),p=n(37133)},31589:function(e,t,n){n.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,n){n.d(t,{persistent:function(){return r}});var i=n(78213),o=n(39955);function r(e,t){e.hookStatus(i.STATUSES.ready,e=>{let n=(0,o.isViewObject)(e)?e:e.jodit,i=`${n.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=n.storage.get(i))?e:r},set(e){n.storage.set(i,e)}})})}},13525:function(e,t,n){n.d(t,{wait:function(){return s}});var i=n(78213),o=n(23282),r=n(89890);function s(e){return(t,n)=>{let s=t[n];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(i.STATUSES.ready,t=>{let{async:i}=t,o=t[n],r=0;Object.defineProperty(t,n,{configurable:!0,value:function n(...s){i.clearTimeout(r),e(t)?o.apply(t,s):r=i.setTimeout(()=>n(...s),10)}})})}}},37133:function(e,t,n){n.d(t,{watch:function(){return d}});var i=n(78213),o=n(73026),r=n(46559),s=n(23282),a=n(72430),l=n(39955),c=n(89890),u=n(37790);function d(e,t){return(n,d)=>{var h;if(!(0,s.isFunction)(n[d]))throw(0,c.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let i=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...n)=>{if(!t.isInDestruct)return t[d](e,...n)};p||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[n,o]=e.split(":"),r=f;n.length&&(r=t.get(n)),(0,s.isFunction)(r)&&(r=r(t)),i.events.on(r||t,o,c),r||i.events.on(o,c),t.hookStatus("beforeDestruct",()=>{i.events.off(r||t,o,c).off(o,c)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on(`change.${d.join(".")}`,c);let p=(0,u.getPropertyDescriptor)(n,l);Object.defineProperty(t,l,{configurable:!0,set(e){let n=h;n!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on(`change.${d.join(".")}`,c),c(l,n,h))},get(){return p&&p.get?p.get.call(t):h}})})};(0,s.isFunction)(n.hookStatus)?n.hookStatus(i.STATUSES.ready,m):m(n)}}},2748:function(e,t,n){n.d(t,{Dom:function(){return y}});var i=n(82758),o=n(4510),r=n(68345),s=n(23282),a=n(58487),l=n(42320),c=n(70799),u=n(86068),d=n(76241),h=n(49055),p=n(38837),f=n(29960),m=n(41180),g=n(86583),b=n(89890),v=n(37790);class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,n){let i,o,r=e;n.s.save();do o=!1,(i=r.nextSibling)&&!y.isBlock(i)&&!y.isTag(i,"br")&&(o=!0,r=i);while(o);return y.__wrapElements(t,n,e,r)}static __wrapElements(e,t,n,i){let o=(0,c.isString)(e)?t.createInside.element(e):e;n.parentNode&&n.parentNode.insertBefore(o,n);let r=n;for(;r&&(r=n.nextSibling,o.appendChild(n),n!==i&&r);)n=r;return t.s.restore(),o}static wrapInline(e,t,n){let i,o,r=e,s=e;n.s.save();do o=!1,(i=r.previousSibling)&&!y.isBlock(i)&&(o=!0,r=i);while(o);do o=!1,(i=s.nextSibling)&&!y.isBlock(i)&&(o=!0,s=i);while(o);return y.__wrapElements(t,n,r,s)}static wrap(e,t,n){let i=(0,c.isString)(t)?n.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,b.error)("Element should be in DOM");e.parentNode.insertBefore(i,e),i.appendChild(e)}else{let t=e.extractContents();e.insertNode(i),i.appendChild(t)}return i}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,n){let i=e;for(;i&&i!==t&&!(e!==i&&n(i));){let e=i.firstChild||i.nextSibling;if(!e){for(;i&&!i.nextSibling;)if((i=i.parentNode)===t)return;e=null==i?void 0:i.nextSibling}i=e}}static replace(e,t,n,i=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,p.assert)(n,"Need create instance for new tag"),t=n.fromHTML(t)),(0,c.isString)(t)?((0,p.assert)(n,"Need create instance for new tag"),s=n.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return i&&y.isElement(e)&&y.isElement(s)&&(0,o.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(i.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){let n=y.closest(e,e=>y.isElement(e)&&e.hasAttribute("contenteditable"),t);return y.isNode(e)&&(null==n?void 0:n.getAttribute("contenteditable"))!=="false"}static isEmpty(e,t=i.NO_EMPTY_TAGS){let n;if(!e)return!0;n=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,h.trim)(e.nodeValue).length;return y.isText(e)?o(e):!(y.isElement(e)&&n(e))&&y.each(e,e=>{if(y.isText(e)&&!o(e)||y.isElement(e)&&n(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,i.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,u.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&i.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 n=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(n?n.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,m.css)(e,"display").toString())}static canSplitBlock(e){return!(0,u.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,n){let i=n?"lastChild":"firstChild",o=n?"previousSibling":"nextSibling",r=null==e?void 0:e[i];if(!r)return null;do{if(t(r))return r;let n=r[i]||r[o];if(!n&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[o]&&r.parentNode!==e);n=null==r?void 0:r[o]}r=n}while(r);return null}static prev(e,t,n,i=!0){return y.find(e,t,n,!1,i)}static next(e,t,n,i=!0){return y.find(e,t,n,!0,i)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,n){let i=e=>y.isElement(e)&&e.classList.contains(t),o=e.parentNode;return n?y.prev(e,i,o):y.next(e,i,o)}static find(e,t,n,i=!0,o=!0){let r=this.nextGen(e,n,i,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,n=!0,i=!0){let o=[],r=e;do{let t=n?r.nextSibling:r.previousSibling;for(;t;)o.push(t),t=n?t.nextSibling:t.previousSibling;o.reverse(),yield*this.runInStack(e,o,n,i),r=r.parentNode}while(r&&r!==t);return null}static each(e,t,n=!0){let i=this.eachGen(e,n),o=i.next();for(;!o.done;){if(!1===t(o.value))return!1;o=i.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,n,i=!0){for(;t.length;){let o=t.pop();if(i){let e=n?o.lastChild:o.firstChild;for(;e;)t.push(e),e=n?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,n,i="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=y.findWithCurrent(r[o],t,r,i,o);if(e)return e}for(;r&&!r[i]&&r!==n;)r=r.parentNode;r&&r[i]&&r!==n&&(r=r[i])}while(r&&r!==n);return null}static findSibling(e,t=!0,n=e=>!y.isEmptyTextNode(e)){let i=y.sibling(e,t);for(;i&&!n(i);)i=y.sibling(i,t);return i&&n(i)?i: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,n){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)),n)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,n,i=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===n||!o.parentNode)break;o=o.parentNode}while(o&&o!==n);return o===n&&i&&t(o)?o:null}static closest(e,t,n){let i,o=e=>e.toLowerCase();if((0,s.isFunction)(t))i=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));i=t=>!!(t&&e.has(o(t.nodeName)))}else i=e=>!!(e&&o(t)===o(e.nodeName));return y.up(e,i,n)}static furthest(e,t,n){let i=null,o=null==e?void 0:e.parentElement;for(;o&&o!==n;)t(o)&&(i=o),o=null==o?void 0:o.parentElement;return i}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var n;null==(n=e.parentNode)||n.insertBefore(t,e.nextSibling)}static before(e,t){var n;null==(n=e.parentNode)||n.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,n=!1,r=()=>!0){let s=(e.ownerDocument||i.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,n?t.firstChild:null)}static isOrContains(e,t,n=!1){return e===t?!n:!!(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 n=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,i.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),n&&e.setStartBefore(n)),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 n=e.tagName.toLowerCase();return t instanceof Set?t.has(n)||t.has(e.tagName.toUpperCase()):n===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,f.attr)(e,t),(0,f.attr)(e,i.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,f.attr)(e,i.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+i.MARKER_CLASS)}static replaceTemporaryFromString(e){return(0,d.unwrapMarkedTags)(e,null,i.TEMP_ATTR)}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(i.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,n){n.d(t,{Dom:function(){return i.Dom},LazyWalker:function(){return o.LazyWalker}});var i=n(2748),o=n(70071)},70071:function(e,t,n){n.d(t,{LazyWalker:function(){return s}});var i=n(45219),o=n(2748),r=n(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=o.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,n=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<n;){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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([i.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,n){n.d(t,{EventEmitter:function(){return u}});var i=n(82758),o=n(46559),r=n(68345),s=n(23282),a=n(70799),l=n(89890),c=n(15738);class u{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,o.splitArray)(e).map(e=>e.trim()).forEach(e=>{let n=e.split("."),i=n[1]||c.defaultNameSpace;t.call(this,n[0],i)})}__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 n=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?n.initEvent(t,!0,!0):(n.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","view","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(n,e,{value:t[e],enumerable:!0})}),Object.defineProperty(n,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(n)}get current(){return this.currents[this.currents.length-1]}on(e,t,n,o){let c,u,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(c=this,u=e,h=t,p=n):(c=e,u=t,h=n,p=o),!((0,a.isString)(u)||(0,a.isStringArray)(u))||0===u.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,u,h,p)}),this;let f=c,m=this.__getStore(f),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return d(f)&&(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(u,(e,t)=>{var n,o;if(0===e.length)throw(0,l.error)("Need event name");if(!1===m.indexOf(e,t,h)){let r={event:e,originalCallback:h,syntheticCallback:b};if(m.set(e,t,r,null==p?void 0:p.top),d(f)){let t=i.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(n=null==p?void 0:p.capture)&&n}:null!=(o=null==p?void 0:p.capture)&&o;b.options=t,f.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(f,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let n=this.__domEventsMap.get(e)||new Set;n.add(t),this.__domEventsMap.set(e,n)}__unmemoryDOMSubjectToHandler(e,t){let n=this.__domEventsMap,i=n.get(e)||new Set;i.delete(t),i.size?n.set(e,i):n.delete(e)}one(e,t,n,i){let o,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,r=e,s=t,l=n):(o=e,r=t,s=n,l=i);let c=(...e)=>(this.off(o,r,c),s(...e));return this.on(o,r,c,l),this}off(e,t,n){let i,o,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(i=this,o=e,l=t):(i=e,o=t,l=n),(0,r.isArray)(i))return i.forEach(e=>{this.off(e,o,l)}),this;let u=i,h=this.__getStore(u);if(!((0,a.isString)(o)||(0,a.isStringArray)(o))||0===o.length)return h.namespaces().forEach(e=>{this.off(u,"."+e)}),this.__removeStoreFromSubject(u),this;let p=e=>{var t;d(u)&&(u.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(u,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let n=h.get(e,t);if(n&&n.length)if((0,s.isFunction)(l)){let i=h.indexOf(e,t,l);!1!==i&&(p(n[i]),n.splice(i,1),n.length||h.clearEvents(t,e))}else n.forEach(p),n.length=0,h.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===c.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(u),this}stopPropagation(e,t){let n=(0,a.isString)(e)?this:e,i=(0,a.isString)(e)?e:t;if("string"!=typeof i)throw(0,l.error)("Need event names");let o=this.__getStore(n);this.__eachEvent(i,(e,t)=>{let i=o.get(e,t);i&&this.__stopped.push(i),t===c.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(n,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,...n){let i,o,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,u=(0,a.isString)(e)?[t,...n]:n;if(!d(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&d(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(d(r))this.__triggerNativeEvent(r,e);else{let n=h.get(e,t);if(n)try{[...n].every(t=>!this.__isStopped(n)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...u),this.currents.pop(),void 0!==o&&(i=o),!0))}finally{this.__removeStop(n)}t!==c.defaultNameSpace||d(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let n=this.fire.apply(this,[r,e+"."+t,...u]);void 0!==n&&(i=n)})}}),i}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=i.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 d(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,n){n.d(t,{Eventify:function(){return i}});class i{on(e,t){var n;return this.__map.has(e)||this.__map.set(e,new Set),null==(n=this.__map.get(e))||n.add(t),this}off(e,t){var n;return this.__map.has(e)&&(null==(n=this.__map.get(e))||n.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var n;let i;return this.__map.has(e)&&(null==(n=this.__map.get(e))||n.forEach(e=>{i=e(...t)})),i}constructor(){this.__map=new Map}}},57012:function(e,t,n){let i=new(n(98220)).EventEmitter;n.d(t,["eventEmitter",0,i])},3827:function(e,t,n){n.d(t,{EventEmitter:function(){return i.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var i=n(98220),o=n(72757),r=n(73026),s=n(15738)},73026:function(e,t,n){n.d(t,{observable:function(){return c}});var i=n(68345),o=n(59292),r=n(72430),s=n(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},n={},c=(t,o)=>((0,i.isArray)(t)?t.map(e=>c(e,o)):(n[t]||(n[t]=[]),n[t].push(o)),e),u=(o,...r)=>{if((0,i.isArray)(o))return void o.map(e=>u(e,...r));try{!t[o]&&n[o]&&(t[o]=!0,n[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,n=[])=>{let i={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=n.concat(a).filter(e=>e.length);i[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set:t=>{let n=i[a];if(!(0,o.isFastEqual)(i[a],t)){u(["beforeChange",`beforeChange.${l.join(".")}`],a,t),(0,r.isPlainObject)(t)&&d(t,l),c&&c.set?c.set.call(e,t):i[a]=t;let o=[];u(["change",...l.reduce((e,t)=>(o.push(t),e.push(`change.${o.join(".")}`),e),[])],l.join("."),n,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):i[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(i[a])&&d(i[a],l)}),Object.defineProperty(e,"on",{value:c}))};return d(e),e}},15738:function(e,t,n){n.d(t,{EventHandlersStore:function(){return s}});var i=n(4510),o=n(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let n=this.__store.get(t);return(0,o.assert)(n,"-"),n[e]}}indexOf(e,t,n){let i=this.get(e,t);if(i){for(let e=0;e<i.length;e+=1)if(i[e].originalCallback===n)return e}return!1}namespaces(e=!1){let t=(0,i.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,n,i=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),i?o[e].unshift(n):o[e].push(n)}clear(){this.__store.clear()}clearEvents(e,t){let n=this.__store.get(e);n&&n[t]&&(delete n[t],Object.keys(n).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}n.d(t,["defaultNameSpace",0,r])},580:function(e,t,n){n.d(t,{getContainer:function(){return _},getPopupViewRoot:function(){return S},uniqueUid:function(){return v}});var i=n(19306),o=n(72430),r=n(70799),s=n(39955),a=n(12475),l=n(29960),c=n(41180),u=n(80568),d=n(69175),h=n(41876),p=n(57012),f=n(82758),m=n(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,n="div",o=!1){let c,d=(0,r.isString)(t)?t:t?(0,u.getClassName)(t.prototype):"jodit-utils",h=w.get(e)||{},p=d+n,f=(0,s.isViewObject)(e)?e:e.j;if(!h[p]){let t=f.c;if(c=S(f.o,f.container,e.od.body),o&&(0,i.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===n?e.ed.head:e.ed.body;c=(0,i.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let r=t.element(n,{className:`jodit jodit-${(0,a.kebabCase)(d)}-container jodit-box`});f.o.nonce&&("style"===n||"script"===n)&&(0,l.attr)(r,"nonce",f.o.nonce),r.classList.add(`jodit_theme_${f.o.theme||"default"}`),m.Dom.append(c,r),h[p]=r,e.hookStatus("beforeDestruct",()=>{f.events.off(r),m.Dom.safeRemove(r),delete h[p],Object.keys(h).length&&w.delete(e)}),w.set(e,h),f.events.fire("getContainer",r)}return h[p].classList.remove("jodit_theme_default","jodit_theme_dark"),h[p].classList.add(`jodit_theme_${f.o.theme||"default"}`),h[p]}function S(e,t,n){var i,o,r;return null!=(r=null!=(o=null!=(i=e.popupRoot)?i:e.shadowRoot)?o:m.Dom.closest(t,e=>m.Dom.isHTMLElement(e)&&(m.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,c.css)(e,"position"))),n))?r:n}let k=p.eventEmitter;n.d(t,["eventEmitter",0,k,"extendLang",0,e=>{Object.keys(e).forEach(t=>{let n,i=(n=e[t],(0,o.isPlainObject)(n)&&(0,o.isPlainObject)(n.default)?n.default:n);!(0,d.isUnsafeProtoKey)(t)&&(0,o.isPlainObject)(i)&&(Object.prototype.hasOwnProperty.call(f.lang,t)&&(0,o.isPlainObject)(f.lang[t])||(f.lang[t]={}),Object.keys(i).forEach(e=>{(0,d.isUnsafeProtoKey)(e)||(f.lang[t][e]=i[e])}))})},"instances",0,{},"modules",0,{},"pluginSystem",0,y])},29999:function(e,t,n){var i=n(68345);n.d(t,["asArray",0,e=>(0,i.isArray)(e)?e:[e]])},76855:function(e,t,n){n.d(t,{asArray:function(){return i.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var i=n(29999),o=n(46559),r=n(4510)},46559:function(e,t,n){n.d(t,{splitArray:function(){return i}});function i(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}},4510:function(e,t,n){var i=n(70722),o=n(58844);n.d(t,["toArray",0,function(...e){var t;return((0,i.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,o.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,n){n.d(t,{clearTimeout:function(){return i.clearTimeout},setTimeout:function(){return i.setTimeout}});var i=n(13252)},13252:function(e,t,n){n.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var i=n(82758);function o(e,t,...n){return t?i.globalWindow.setTimeout(e,t,...n):(e.call(null,...n),0)}function r(e){i.globalWindow.clearTimeout(e)}},54765:function(e,t,n){n.d(t,{hasBrowserColorPicker:function(){return o}});var i=n(82758);function o(){let e;try{let t=i.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,n){n.d(t,{hasBrowserColorPicker:function(){return i.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return u.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.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 S.isString},isStringArray:function(){return S.isStringArray},isURL:function(){return k.isURL},isValidName:function(){return C.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return D.isVoid},isWindow:function(){return I.isWindow}});var i=n(54765),o=n(12045),r=n(68345),s=n(87612),a=n(59292),l=n(23282),c=n(58487),u=n(29673),d=n(60132),h=n(72913),p=n(19306),f=n(45603),m=n(78116),g=n(70722),b=n(84767),v=n(29807),y=n(72430),w=n(14773),_=n(42320),S=n(70799),k=n(26049),C=n(37508),E=n(39955),D=n(86068),I=n(52742)},12045:function(e,t,n){n.d(t,{isAbortError:function(){return i}});function i(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}},68345:function(e,t,n){n.d(t,{isArray:function(){return i}});function i(e){return Array.isArray(e)}},87612:function(e,t,n){n.d(t,{isBoolean:function(){return i}});function i(e){return"boolean"==typeof e}},59292:function(e,t,n){n.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var i=n(67462);function o(e,t){return e===t||(0,i.stringify)(e)===(0,i.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,n){n.d(t,{isFunction:function(){return i}});function i(e){return"function"==typeof e}},29673:function(e,t,n){n.d(t,{isHtmlFromWord:function(){return l}});let i=/\s/,o=/\d/,r=/\w/;function s(e,t){let n=e.indexOf(t);for(;-1!==n;){let r=n+t.length;if(i.test(e.charAt(r))&&o.test(e.charAt(r+1)))return!0;n=e.indexOf(t,r)}return!1}function a(e,t){let n="style="+t,i=e.indexOf(n);for(;-1!==i;){let o=i+n.length,r=e.indexOf(t,o);if(-1===r&&(r=e.length),e.slice(o,r).includes("mso-"))return!0;i=e.indexOf(n,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 n=e.indexOf(">",t);-1===n&&(n=e.length);let o=e.slice(t,n);if("<meta"===o.slice(0,5).toLowerCase()&&function(e){if(s(e,"Microsoft Word")||s(e,"Microsoft Excel"))return!0;let t=e.toLowerCase(),n=t.indexOf("progid");return -1!==n&&(-1!==t.indexOf("word.",n)||-1!==t.indexOf("excel.",n))||t.includes("libreoffice")||t.includes("openoffice")}(o)||function(e){let t=e.indexOf("class=");for(;-1!==t;){if(t>0&&i.test(e.charAt(t-1))){let n=t+6,i=e.charAt(n);if(('"'===i||"'"===i)&&(n+=1),e.startsWith("Mso",n))return!0}t=e.indexOf("class=",t+6)}return!1}(o))return!0;t=e.indexOf("<",n)}return a(e,"'")||a(e,'"')&&e.includes("<font")}},58487:function(e,t,n){var i=n(70799);let o=/[A-Za-z]/,r=/[A-Za-z0-9]/,s=/\w/;function a(e,t){if(!o.test(e.charAt(t)))return"";let n=t+1;for(;r.test(e.charAt(n));)n+=1;return e.slice(t,n)}n.d(t,["isHTML",0,e=>(0,i.isString)(e)&&function(e){let t=new Map,n=e.indexOf("</");for(;-1!==n;){let i=a(e,n+2);""!==i&&">"===e.charAt(n+2+i.length)&&t.set(i,n),n=e.indexOf("</",n+2)}if(0===t.size)return!1;let i=-1;for(n=e.indexOf("<");-1!==n;){let o=a(e,n+1),r=n+1+o.length;if(""!==o&&!s.test(e.charAt(r))){if(i<r&&(i=e.indexOf(">",r)),-1===i)return!1;let n=t.get(o);if(void 0!==n&&n>i)return!0}n=e.indexOf("<",n+1)}return!1}(e)])},60132:function(e,t,n){n.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var i=n(2748),o=n(23282),r=n(86068);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&i.Dom.isElement(e.container)}},72913:function(e,t,n){n.d(t,{isInt:function(){return r}});var i=n(29807),o=n(70799);function r(e){return(0,o.isString)(e)&&(0,i.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,n){n.d(t,{isJoditObject:function(){return o}});var i=n(23282);function o(e){return!!(e&&e instanceof Object&&(0,i.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,n){var i=n(70799);n.d(t,["isLicense",0,e=>(0,i.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,n){n.d(t,{isMarker:function(){return o}});var i=n(2748);function o(e){return i.Dom.isMarker(e)}},70722:function(e,t,n){n.d(t,{isNativeFunction:function(){return i}});function i(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(String(e)))}},84767:function(e,t,n){n.d(t,{isNumber:function(){return i}});function i(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},29807:function(e,t,n){n.d(t,{isNumeric:function(){return o}});var i=n(70799);function o(e){if((0,i.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,n){n.d(t,{isPlainObject:function(){return o}});var i=n(52742);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,i.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,n){n.d(t,{isPromise:function(){return i}});function i(e){return e&&"function"==typeof e.then}},42320:function(e,t,n){n.d(t,{isSet:function(){return o}});var i=n(23282);function o(e){return!!e&&(0,i.isFunction)(e.has)&&(0,i.isFunction)(e.add)&&(0,i.isFunction)(e.delete)}},70799:function(e,t,n){n.d(t,{isString:function(){return o},isStringArray:function(){return r}});var i=n(68345);function o(e){return"string"==typeof e}function r(e){return(0,i.isArray)(e)&&o(e[0])}},26049:function(e,t,n){n.d(t,{isURL:function(){return o}});var i=n(82758);function o(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=i.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,n){n.d(t,{isValidName:function(){return i}});function i(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}},39955:function(e,t,n){n.d(t,{isViewObject:function(){return o}});var i=n(23282);function o(e){return!!(e&&e instanceof Object&&(0,i.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,n){n.d(t,{isVoid:function(){return i}});function i(e){return null==e}},52742:function(e,t,n){n.d(t,{isWindow:function(){return i}});function i(e){return null!=e&&e===e.window}},35278:function(e,t,n){n.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 n=parseInt(t[2],10),i=parseInt(t[3],10),o=(parseInt(t[4],10)|i<<8|n<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}])},32574:function(e,t,n){n.d(t,{applyStyles:function(){return h}});var i=n(82758),o=n(2748),r=n(76241),s=n(90723),a=n(49055),l=n(29960),c=n(41180),u=n(76078);function d(e){let t=e.split(";"),n=t.length-1;return t.filter((e,t)=>{let i=/^\s*([a-z-]{1,64})\s*:/i.exec(e);if(!i)return!0;let o=i[1].toLowerCase();return!(o.startsWith("mso-")||o.startsWith("border")&&t!==n)}).join(";").replace(/([0-9.]{1,32})(pt|cm)/gi,(e,t,n)=>{switch(n.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 n=(e=e.substring(t)).toLowerCase().lastIndexOf("</html>");-1!==n&&(e=e.substring(0,n+7));let h=i.globalDocument.createElement("iframe");(0,c.css)(h,"display","none"),o.Dom.append(i.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 n=(0,s.readWordListItems)(t.body);o.Dom.each(t.body,e=>{o.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,l.attr)(e,"style")||"")&&o.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let n=t.styleSheets[e].cssRules;for(let e=0;e<n.length;e+=1)""!==n[e].selectorText&&(0,u.$$)(n[e].selectorText,t.body).forEach(t=>{t.style.cssText=d(n[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!i.IS_PROD)throw e}(0,s.wrapWordListItems)(n),o.Dom.each(t.body,e=>{if(o.Dom.isElement(e)){let t=(0,l.attr)(e,"style");t&&(e.style.cssText=d(t)),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)}}),p=t.firstChild?(0,a.trim)(t.body.innerHTML):""}}catch(e){}finally{o.Dom.safeRemove(h)}return p&&(e=p),(0,a.trim)((0,r.removeWordWrappers)(e))}},53212:function(e,t,n){n.d(t,{cleanFromWord:function(){return u}});var i=n(82758),o=n(2748),r=n(4510),s=n(76241),a=n(90723),l=n(49055),c=n(29960);function u(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let n=i.globalDocument.createElement("div");n.innerHTML=e;let s=[],l=(0,a.readWordListItems)(n);n.firstChild&&o.Dom.each(n,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":o.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)}}),o.Dom.safeRemove.apply(null,s),(0,a.wrapWordListItems)(l),t=n.innerHTML}catch(e){}return t&&(e=t),e=e.split(/(\n)/).filter(l.trim).join("\n"),(0,s.removeWordWrappers)(e)}},53326:function(e,t,n){n.d(t,{htmlspecialchars:function(){return o}});var i=n(82758);function o(e){let t=i.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},75275:function(e,t,n){n.d(t,{applyStyles:function(){return i.applyStyles},cleanFromWord:function(){return o.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 i=n(32574),o=n(53212),r=n(53326),s=n(45971),a=n(86518),l=n(91003),c=n(76241)},45971:function(e,t,n){n.d(t,{nl2br:function(){return i}});function i(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}},86518:function(e,t,n){n.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return m}});var i=n(2748),o=n(43555),r=n(29960);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var n;if(!i.Dom.isElement(e)&&!i.Dom.isFragment(e))return;let r=[];for(let t of(i.Dom.each(e,e=>{i.Dom.isElement(e)&&i.Dom.up(e.parentNode,a)&&r.push(e)}),r))i.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==i.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)&&i.Dom.safeRemove(t);let l=[];for(let t of(i.Dom.each(e,e=>{i.Dom.isElement(e)&&"NOSCRIPT"===e.nodeName&&l.push(e)}),l))i.Dom.safeRemove(t);let u=null!=(n=t.removeEventAttributes)?n:t.removeOnError,d=e=>{if(i.Dom.isElement(e)&&(u&&c(e),m(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,o.attr)(e,"target"))){let t=((0,o.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}};d(e),i.Dom.each(e,d)}function c(e){if(!i.Dom.isElement(e))return!1;let t=!1,n=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&n.push(e.attributes[t].name);for(let i of n)(0,r.attrRaw)(e,i,null),t=!0;return t}let u=["src","data","action","formaction","poster","background","xlink:href"],d=new Set(["animate","set","animatemotion","animatetransform"]),h=["values","from","to","by"],p=new Set(["iframe","frame","object","embed"]);function f(e,t){let n=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(n)||/^data:(?:text\/html|application\/xhtml)/.test(n))||/^data:image\/svg/.test(n)&&p.has(t)}function m(e,{safeJavaScriptLink:t,removeOnError:n,removeEventAttributes:s}={safeJavaScriptLink:!0,removeOnError:!0}){if(!i.Dom.isElement(e))return!1;let a=!1;s&&c(e)&&(a=!0),n&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),a=!0);let l=e.nodeName.toLowerCase(),p=(0,o.attr)(e,"href");if(t&&p&&f(p,l)){let t="u">typeof location?location.protocol:"http:";(0,o.attr)(e,"href",t+"//"+p),a=!0}if(t){for(let t of(e.hasAttribute("srcdoc")&&((0,o.attr)(e,"srcdoc",null),a=!0),u)){let n=(0,r.attrRaw)(e,t);n&&f(n,l)&&((0,o.attr)(e,t,null),a=!0)}if(d.has(l))for(let t of h){let n=(0,r.attrRaw)(e,t);n&&n.split(";").some(e=>f(e,"a"))&&((0,o.attr)(e,t,null),a=!0)}}return a}},91003:function(e,t,n){n.d(t,{stripTags:function(){return function e(t,n=document,u=null,d=!1){let h=n.createElement("div");(0,o.isString)(t)?h.innerHTML=t:i.Dom.append(h,t);let p=[];i.Dom.each(h,e=>{i.Dom.isElement(e)&&p.push(e)});let f=new Set,m=()=>{let e=n.createTextNode(d?"%%%jodit-single-br%%%":" ");return f.add(e),e};return p.forEach(t=>{if(!t.parentNode)return;if(u&&i.Dom.isTag(t,u)){let o=t.nodeName.toLowerCase(),r=i.Dom.isTag(t,c)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,n,u,d)}%%%/jodit-${o}%%%`;i.Dom.before(t,n.createTextNode(r)),i.Dom.safeRemove(t);return}if(i.Dom.isTag(t,l))return void i.Dom.safeRemove(t);if(!i.Dom.isTag(t,s))return;let o=t.previousSibling;i.Dom.isTag(t,a)&&o&&!f.has(o)&&!(i.Dom.isText(o)&&/\s$/.test(o.nodeValue||""))&&i.Dom.before(t,m());let r=t.nextSibling;!(i.Dom.isText(r)&&/^\s/.test(r.nodeValue||""))&&r&&i.Dom.before(r,m())}),(0,r.trim)(h.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,n,i)=>`<${t?"/":""}${i}>`)}}});var i=n(2748),o=n(70799),r=n(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,n){n.d(t,{indexOfClosingTag:function(){return a},indexOfOpenTag:function(){return u},removeBetween:function(){return f},removeEmptyMarkedTags:function(){return m},removeTagsByPrefix:function(){return l},removeWordWrappers:function(){return c},unwrapMarkedTags:function(){return h}});let i=/[a-z0-9:-]/i,o=["<html","</html","<col","</col","<o:p","</o:p"];function r(e,t,n){return e.substr(t,n.length).toLowerCase()===n}function s(e,t,n){let i=e.indexOf("<",n);for(;-1!==i;){for(let n of t)if(r(e,i,n))return[i,n];i=e.indexOf("<",i+1)}return[-1,""]}function a(e,t,n){let i="</"+t+">",o=e.indexOf("</",n);for(;-1!==o;){if(r(e,o,i))return o;o=e.indexOf("</",o+2)}return -1}function l(e,t){let n=t.map(e=>e.toLowerCase()),i="",o=0;for(;;){let[t]=s(e,n,o);if(-1===t)break;let r=e.indexOf(">",t);if(-1===r)break;i+=e.slice(o,t),o=r+1}return 0===o?e:i+e.slice(o)}function c(e){return l(l(e,o),["\x3c!--"])}function u(e,t){let n="<"+t.toLowerCase(),i=0;for(;;){let[t]=s(e,[n],i);if(-1===t)return -1;let o=e.charAt(t+n.length);if(">"===o)return t;if(/\s/.test(o)){if(-1===e.indexOf(">",t))return -1;return t}i=t+1}}function d(e,t){let n=t;for(;i.test(e.charAt(n));)n+=1;return e.slice(t,n)}function h(e,t,n,i){let o=n.toLowerCase(),r=[null==t?"<":"<"+t.toLowerCase()],a=function(e){let t=new Map,n=e.indexOf("</");for(;-1!==n;){let i=d(e,n+2).toLowerCase();if(""!==i&&">"===e.charAt(n+2+i.length)){let e=t.get(i);e?e.push(n):t.set(i,[n])}n=e.indexOf("</",n+2)}return t}(e),l="",c=0;for(;;){let[n]=s(e,r,c);if(-1===n)break;let u=(null!=t?t:d(e,n+1)).toLowerCase(),h=e.indexOf(">",n);if(-1===h)break;let p=""!==u&&e.slice(n,h).toLowerCase().includes(o)?function(e,t){if(!e)return -1;let n=0,i=e.length;for(;n<i;){let o=n+i>>1;e[o]<t?n=o+1:i=o}return n<e.length?e[n]:-1}(a.get(u),h+1):-1;if(-1===p){l+=e.slice(c,n+1),c=n+1;continue}let f=e.slice(h+1,p),m=p+u.length+3;l+=e.slice(c,n),l+=""!==f&&(!i||i(f))?f:e.slice(n,m),c=m}return 0===c?e:l+e.slice(c)}function p(e,t,n){let i=t.charAt(0),o=e.indexOf(i,n);for(;-1!==o;){if(r(e,o,t))return o;o=e.indexOf(i,o+1)}return -1}function f(e,t,n,i,o=""){let r=t.toLowerCase(),s=o.toLowerCase(),a="",l=0;for(;;){let o=p(e,r,l);if(-1===o)break;let c=p(e,n,o+t.length);if(-1===c)break;if(""!==s&&!e.slice(o,c).toLowerCase().includes(s)){a+=e.slice(l,c+n.length),l=c+n.length;continue}let u=p(e,i,c+n.length);if(-1===u)break;a+=e.slice(l,o),l=u+i.length}return 0===l?e:a+e.slice(l)}function m(e,t,n){let i=t.toLowerCase(),o=n.toLowerCase(),a="</"+i+">",l="",c=0;for(;;){let[t]=s(e,["<"+i],c);if(-1===t)break;let n=e.indexOf(">",t);if(-1===n)break;if(e.slice(t,n).toLowerCase().includes(o)&&r(e,n+1,a)){l+=e.slice(c,t),c=n+1+a.length;continue}l+=e.slice(c,n+1),c=n+1}return 0===c?e:l+e.slice(c)}},90723:function(e,t,n){n.d(t,{readWordListItems:function(){return a},wrapWordListItems:function(){return l}});var i=n(2748),o=n(4510),r=n(29960);let s={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3};function a(e){let t=[];return(0,o.toArray)(e.querySelectorAll("p")).forEach(e=>{let n=/mso-list:\s*l(\d+)\s+level(\d+)(?:\s+lfo(\d+))?/i.exec((0,r.attr)(e,"style")||"");if(!n)return;let a=(0,o.toArray)(e.querySelectorAll("[style]")).find(e=>/mso-list:\s*ignore/i.test((0,r.attr)(e,"style")||""));t.push(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({paragraph:e,list:`${n[1]}:${n[3]||""}`,level:Number(n[2])},function(e){let t=e.replace(/\s+/g,""),n=/^\(?(?:\d+\.)*(\d+)[.)]?$/.exec(t);if(n)return{tag:"ol",listStyleType:null,start:Number(n[1])};let i=/^\(?([a-z]+|[A-Z]+)[.)]$/.exec(t);if(i){let e=i[1],t=e.toLowerCase(),n=e!==t;if(/^[ivxlcdm]+$/.test(t)&&(t.length>1||"i"===t))return{tag:"ol",listStyleType:n?"upper-roman":"lower-roman",start:function(e){let t=0;for(let n=0;n<e.length;n+=1){let i=s[e[n]];t+=(s[e[n+1]]||0)>i?-i:i}return t}(t)};if(/^([a-z])\1*$/.test(t))return{tag:"ol",listStyleType:n?"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 n=e.parentNode;for(i.Dom.safeRemove(e);n&&n!==t&&i.Dom.isElement(n)&&i.Dom.isEmpty(n);){let e=n.parentNode;i.Dom.safeRemove(n),n=e}}(a,e)}),t}function l(e){let t=[],n=e.map((t,n)=>{var o;return n>0&&(o=e[n-1],i.Dom.findSibling(t.paragraph,!0,e=>!i.Dom.isEmptyTextNode(e)&&!i.Dom.isComment(e))===o.paragraph)});e.forEach((e,s)=>{let{paragraph:a}=e;for(n[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 n=c.createElement(e.tag);e.listStyleType&&(n.style.listStyleType=e.listStyleType),"ol"===e.tag&&1!==e.start&&(0,r.attr)(n,"start",e.start),l&&l.li?l.li.appendChild(n):i.Dom.before(a,n),l={level:e.level,list:e.list,element:n},t.push(l)}let u=c.createElement("li");(0,o.toArray)(a.attributes).forEach(e=>{"class"!==e.name&&u.setAttribute(e.name,e.value)}),u.style.removeProperty("margin-left"),u.style.removeProperty("text-indent"),(0,r.attr)(u,"style")||(0,r.attr)(u,"style",null),i.Dom.moveContent(a,u),i.Dom.safeRemove(a),l.element.appendChild(u),l.li=u})}},21537:function(e,t,n){n.r(t),n.d(t,{$$:function(){return d.$$},AnswerError:function(){return d.AnswerError},CamelCaseToKebabCase:function(){return u.CamelCaseToKebabCase},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return d.ConnectionError},LimitedStack:function(){return d.LimitedStack},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},OptionsError:function(){return d.OptionsError},UNSAFE_PROTO_KEYS:function(){return d.UNSAFE_PROTO_KEYS},abort:function(){return d.abort},alignElement:function(){return d.alignElement},alreadyLoadedList:function(){return d.alreadyLoadedList},answer:function(){return d.answer},appendScriptAsync:function(){return d.appendScriptAsync},appendStyleAsync:function(){return d.appendStyleAsync},applyStyles:function(){return a.applyStyles},asArray:function(){return i.asArray},assert:function(){return d.assert},attr:function(){return d.attr},attrRaw:function(){return d.attrRaw},browser:function(){return d.browser},buildQuery:function(){return d.buildQuery},call:function(){return d.call},callPromise:function(){return d.callPromise},callThis:function(){return d.callThis},camelCase:function(){return u.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearAlign:function(){return d.clearAlign},clearCenterAlign:function(){return d.clearCenterAlign},clearHAlign:function(){return d.clearHAlign},clearTimeout:function(){return o.clearTimeout},cns:function(){return d.cns},colorToHex:function(){return s.colorToHex},completeUrl:function(){return d.completeUrl},connection:function(){return d.connection},convertMediaUrlToVideoEmbed:function(){return d.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return d.createMediaWrapper},css:function(){return d.css},cssInline:function(){return d.cssInline},cssPath:function(){return d.cssPath},ctrlKey:function(){return d.ctrlKey},dataBind:function(){return d.dataBind},defaultLanguage:function(){return d.defaultLanguage},error:function(){return d.error},fastClone:function(){return d.fastClone},fuzzySearchIndex:function(){return u.fuzzySearchIndex},get:function(){return d.get},getAlignClasses:function(){return d.getAlignClasses},getAnchorName:function(){return d.getAnchorName},getAnchors:function(){return d.getAnchors},getCaptionWrapper:function(){return d.getCaptionWrapper},getCaptionedImage:function(){return d.getCaptionedImage},getClassName:function(){return d.getClassName},getContentWidth:function(){return c.getContentWidth},getDataTransfer:function(){return d.getDataTransfer},getFixedPositionOffset:function(){return c.getFixedPositionOffset},getHAlign:function(){return d.getHAlign},getImageCaption:function(){return d.getImageCaption},getMediaWrapper:function(){return d.getMediaWrapper},getPropertyDescriptor:function(){return d.getPropertyDescriptor},getScrollParent:function(){return c.getScrollParent},getWrappedMedia:function(){return d.getWrappedMedia},getXPathByElement:function(){return d.getXPathByElement},hAlignElement:function(){return d.hAlignElement},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},humanSizeToBytes:function(){return d.humanSizeToBytes},i18n:function(){return u.i18n},inView:function(){return d.inView},indexOfClosingTag:function(){return a.indexOfClosingTag},indexOfOpenTag:function(){return a.indexOfOpenTag},innerWidth:function(){return c.innerWidth},isAbortError:function(){return r.isAbortError},isAnchor:function(){return d.isAnchor},isArray:function(){return r.isArray},isAtom:function(){return d.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 d.isUnsafeProtoKey},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return u.kebabCase},keepNames:function(){return d.keepNames},keys:function(){return d.keys},loadImage:function(){return d.loadImage},loadNext:function(){return d.loadNext},loadNextStyle:function(){return d.loadNextStyle},markAsAtomic:function(){return d.markAsAtomic},markDeprecated:function(){return d.markDeprecated},markOwner:function(){return d.markOwner},memorizeExec:function(){return d.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 d.options},parseQuery:function(){return d.parseQuery},position:function(){return c.position},prepareEmbedCode:function(){return d.prepareEmbedCode},prepareMedia:function(){return d.prepareMedia},previewBox:function(){return d.previewBox},refs:function(){return d.refs},removeBetween:function(){return a.removeBetween},removeEmptyMarkedTags:function(){return a.removeEmptyMarkedTags},removeTagsByPrefix:function(){return a.removeTagsByPrefix},removeWordWrappers:function(){return a.removeWordWrappers},reset:function(){return d.reset},resolveElement:function(){return d.resolveElement},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},scrollIntoViewIfNeeded:function(){return d.scrollIntoViewIfNeeded},set:function(){return d.set},setTimeout:function(){return o.setTimeout},size:function(){return c.size},splitArray:function(){return i.splitArray},sprintf:function(){return u.sprintf},stringify:function(){return u.stringify},stripTags:function(){return a.stripTags},toArray:function(){return i.toArray},trim:function(){return u.trim},trimChars:function(){return u.trimChars},trimInv:function(){return u.trimInv},trimInvEnd:function(){return u.trimInvEnd},ucfirst:function(){return u.ucfirst},unwrapMarkedTags:function(){return a.unwrapMarkedTags},wrapMedia:function(){return d.wrapMedia}});var i=n(76855),o=n(91898),r=n(27613),s=n(35278),a=n(75275),l=n(71521),c=n(56175),u=n(59007),d=n(43555)},71521:function(e,t,n){n.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return i.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.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 u.normalizeUrl}});var i=n(21224),o=n(3760),r=n(49033),s=n(12972),a=n(9992),l=n(70091),c=n(46334),u=n(37406)},21224:function(e,t,n){var i=n(35278),o=n(49055);n.d(t,["normalizeColor",0,e=>{let t=["#"],n=(0,i.colorToHex)(e);if(!n)return!1;if(3===(n=(n=(0,o.trim)(n.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(n[e]),t.push(n[e]);return t.join("")}return n.length>6&&(n=n.slice(0,6)),"#"+n}])},3760:function(e,t,n){n.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var i=n(29807),o=n(86068),r=n(35278),s=n(12475);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,i.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,i.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}n.d(t,["NUMBER_FIELDS_REG",0,a])},49033:function(e,t,n){n.d(t,{normalizeKeyAliases:function(){return r}});var i=n(82758),o=n(49055);function r(e){let t={},n={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>i.KEY_ALIASES[e]||e).sort((e,t)=>n[e]&&!n[t]?-1:!n[e]&&n[t]?1:n[e]&&n[t]?n[e]-n[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},12972:function(e,t,n){n.d(t,["normalizeLicense",0,(e,t=8)=>{let n=[];for(;e.length;)n.push(e.substr(0,t)),e=e.substr(t);return n[1]=n[1].replace(/./g,"*"),n[2]=n[2].replace(/./g,"*"),n.join("-")}])},9992:function(e,t,n){var i=n(49055);n.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,i.trim)(e).length).map((t,n)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),n&&(t=t.replace(/^\//,"")),n!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},70091:function(e,t,n){n.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,n){n.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},37406:function(e,t,n){n.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},44506:function(e,t,n){n.d(t,["getContentWidth",0,(e,t)=>{let n=t.getComputedStyle(e);return e.offsetWidth-parseInt(n.getPropertyValue("padding-left")||"0",10)-parseInt(n.getPropertyValue("padding-right")||"0",10)}])},35224:function(e,t,n){n.d(t,{getFixedPositionOffset:function(){return i}});function i(e){var t,n;let i=null==(t=e.ownerDocument)?void 0:t.defaultView,o=e.parentElement;for(;i&&o;){if(""!==(n=i.getComputedStyle(o)).transform&&"none"!==n.transform||""!==n.perspective&&"none"!==n.perspective||""!==n.filter&&"none"!==n.filter||"transform"===n.willChange||"perspective"===n.willChange||"filter"===n.willChange||"paint"===n.contain||"layout"===n.contain||"strict"===n.contain||"content"===n.contain){let e=o.getBoundingClientRect();return{x:e.left,y:e.top}}o=o.parentElement}let r=null==i?void 0:i.visualViewport;return i&&r&&(r.offsetLeft||r.offsetTop)&&1>Math.abs(r.pageLeft-i.scrollX)&&1>Math.abs(r.pageTop-i.scrollY)?{x:-Math.round(r.offsetLeft),y:-Math.round(r.offsetTop)}:{x:0,y:0}}},16442:function(e,t,n){n.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let n=o.Dom.isHTMLElement(t),s=n&&(0,r.css)(t,"overflowY");return n&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||i.globalDocument.scrollingElement||i.globalDocument.body}}});var i=n(82758),o=n(2748),r=n(43555)},56175:function(e,t,n){n.d(t,{getContentWidth:function(){return i.getContentWidth},getFixedPositionOffset:function(){return o.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 i=n(44506),o=n(35224),r=n(16442),s=n(81630),a=n(21496),l=n(81284),c=n(5700)},81630:function(e,t,n){n.d(t,["innerWidth",0,(e,t)=>{let n=t.getComputedStyle(e);return e.clientWidth-(parseFloat(n.paddingLeft||"0")+parseFloat(n.paddingRight||"0"))}])},21496:function(e,t,n){n.d(t,{size:function(){return o}});var i=n(27613);function o(e){return(0,i.isString)(e)||(0,i.isArray)(e)?e.length:(0,i.isPlainObject)(e)?Object.keys(e).length:0}},81284:function(e,t,n){let i=(e,t,n,o=!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=n.body,c=n.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},u=n.defaultView||n.parentWindow,d=u.pageYOffset||c.scrollTop||l.scrollTop,h=u.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,f=c.clientLeft||l.clientLeft||0,m=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&m){let{top:e,left:n}=i(m,t,t.od,!0);s=r.top+e,a=r.left+n}else s=r.top+d-p,a=r.left+h-f;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};n.d(t,["offset",0,i])},5700:function(e,t,n){n.d(t,{position:function(){return function e(t,n,o=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,c=a.top;if((0,i.isJoditObject)(n)&&n.iframe&&n.ed.body.contains(t)&&!o){let{left:t,top:i}=e(n.iframe,n,!0);l+=t,c+=i}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 i=n(19306)},87058:function(e,t,n){n.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,n)=>n.toUpperCase())])},67477:function(e,t,n){n.d(t,{fuzzySearchIndex:function(){return o}});var i=n(82758);function o(e,t,n=0,r=1){let s=0,a,l=-1,c=0,u=0;for(a=n;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,c++,u=0,-1===l&&(l=a)):s>0&&(u>=r&&t[a]!==i.INVISIBLE_SPACE?(s=0,l=-1,c=0,u=0,a--):(u++,c++)),a++;return s===e.length?[l,c]:[-1,0]}},56967:function(e,t,n){n.d(t,{i18n:function(){return c}});var i=n(82758),o=n(70799),r=n(36409),s=n(43555),a=n(6441);let l=(e,t)=>{if(!t||!t.length)return e;let n=/%([sd])/g,i=n.exec(e),o=e,r=0;for(;i&&void 0!==t[r];)o=o.replace(i[0],t[r].toString()),r+=1,i=n.exec(e);return o};function c(e,t,n){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!(null==n?void 0:n.debugLanguage),u={},d=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==n?void 0:n.language,h),f=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let n=e.toLowerCase();if((0,o.isString)(t[n]))return d(t[n]);let i=(0,r.ucfirst)(e);if((0,o.isString)(t[i]))return d(t[i])};void 0!==i.lang[p]?u=i.lang[p]:c||(u=void 0!==i.lang[h]?i.lang[h]:i.lang.en);let m=null==n?void 0:n.i18n;if(m&&m[p]){let e=f(m[p]);if(e)return e}return f(u)||(!c&&i.lang.en&&(0,o.isString)(i.lang.en[e])&&i.lang.en[e]?d(i.lang.en[e]):c?"{"+e+"}":(i.IS_PROD,d(e)))}n.d(t,["sprintf",0,l])},59007:function(e,t,n){n.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return i.camelCase},fuzzySearchIndex:function(){return o.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 i=n(87058),o=n(67477),r=n(56967),s=n(12475),a=n(67462),l=n(49055),c=n(36409)},12475:function(e,t,n){n.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,n){n.d(t,{stringify:function(){return i}});function i(e,t={}){if("object"!=typeof e)return String(e);let n=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!n.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}},49055:function(e,t,n){n.d(t,{trim:function(){return s},trimChars:function(){return a},trimInv:function(){return l},trimInvEnd:function(){return c}});let i=/[\s\u200b]/,o=/\uFEFF/;function r(e,t){let n=0,i=e.length;for(;n<i&&t.test(e.charAt(n));)n+=1;for(;i>n&&t.test(e.charAt(i-1));)i-=1;return 0===n&&i===e.length?e:e.slice(n,i)}function s(e){return r(e,i)}function a(e,t){return r(e,RegExp(`[${t}]`))}function l(e){return r(e,o)}function c(e){let t=e.length;for(;t>0&&o.test(e.charAt(t-1));)t-=1;return t===e.length?e:e.slice(0,t)}},36409:function(e,t,n){n.d(t,{ucfirst:function(){return i}});function i(e){return e.length?e[0].toUpperCase()+e.substring(1):""}},25726:function(e,t,n){n.d(t,{alignElement:function(){return g},clearAlign:function(){return f},clearHAlign:function(){return h},getAlignClasses:function(){return u},getHAlign:function(){return p},hAlignElement:function(){return d}});var i=n(22732),o=n(68345),r=n(29960),s=n(41180),a=n(68645),l=n(61477);let c=e=>((0,o.isArray)(e)?e:[null!=e?e:""]).map(e=>e.split(/\s+/).filter(Boolean)).filter(e=>e.length);function u(e,t){var n,o,r;if(!t)return null;let s=i.Dom.isTag(t,new Set(["jodit","jodit-media"]))?t.firstElementChild:null!=(n=(0,l.getWrappedMedia)(e,t))?n:(0,a.getCaptionedImage)(e,t);return null!=(r=null==(o=e.o.alignClasses)?void 0:o[(null!=s?s:t).nodeName.toLowerCase()])?r:null}function d(e,t,n){var i;if(n){h(e,n),e.classList.add(...null!=(i=c(n[t||"normal"])[0])?i:[]);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){d(e,"normal"),t&&Object.values(t).forEach(t=>c(t).forEach(t=>e.classList.remove(...t))),["class","style"].forEach(t=>{var n;(null==(n=(0,r.attr)(e,t))?void 0:n.trim())||(0,r.attr)(e,t,null)})}function p(e,t){if(t){for(let n of["left","right","center","normal"])if(c(t[n]).some(t=>t.every(t=>e.classList.contains(t))))return n}let n=(0,s.cssInline)(e,"float").toLowerCase();return"left"===n||"right"===n?n:"block"===(0,s.css)(e,"display")&&"auto"===(0,s.cssInline)(e,"margin-left")&&"auto"===(0,s.cssInline)(e,"margin-right")?"center":"normal"}function f(e){i.Dom.each(e,e=>{i.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 m=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function g(e,t){if(i.Dom.isNode(t)&&i.Dom.isElement(t)){f(t);let n=m.get(e.toLowerCase());n&&(0,s.css)(t,"textAlign",n)}}},70442:function(e,t,n){n.d(t,{getAnchorName:function(){return r},getAnchors:function(){return a},isAnchor:function(){return s}});var i=n(2748),o=n(4510);function r(e){return e.id||e.getAttribute("name")||""}function s(e){return i.Dom.isTag(e,"a")&&!e.hasAttribute("href")&&!e.hasChildNodes()&&""!==r(e)}function a(e){return(0,o.toArray)(e.querySelectorAll("a")).filter(s)}},63799:function(e,t,n){n.d(t,{loadNext:function(){return function e(t,n,i=0){return(0,o.isString)(n[i])?c(t,n[i]).then(()=>e(t,n,i+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,n,i=0){return(0,o.isString)(n[i])?u(t,n[i]).then(()=>e(t,n,i+1)):Promise.resolve()}}});var i=n(2748),o=n(70799),r=n(29960),s=n(66292);let a=new Map,l=e=>(t,n)=>{if(a.has(n))return a.get(n);let i=e(t,n);return a.set(n,i),i},c=l((e,t)=>e.async.promise((n,o)=>{if(e.isInDestruct)return o();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",o).one(a,"load",n),i.Dom.append(e.od.body,a)})),u=l((e,t)=>e.async.promise((n,o)=>{if(e.isInDestruct)return o();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",()=>n(a)).on(a,"error",o),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?i.Dom.append(e.o.shadowRoot,a):i.Dom.append(e.od.body,a)}));n.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,c,"appendStyleAsync",0,u])},38837:function(e,t,n){n.d(t,{assert:function(){return o}});class i extends Error{constructor(e){super(e),this.name="AssertionError"}}function o(e,t){if(!e)throw new i(`Assertion failed: ${t}`)}},29960:function(e,t,n){n.d(t,{attr:function(){return function e(t,n,l){if(!t||!(0,i.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(n))return Object.keys(n).forEach(i=>{let r=n[i];(0,o.isPlainObject)(r)&&"style"===i?(0,a.css)(t,r):("className"===i&&(i="class"),e(t,i,r))}),null;let c=(0,s.CamelCaseToKebabCase)(n);if(/^-/.test(c)){let n=e(t,`data${c}`);if(n)return n;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 i=n(23282),o=n(72430),r=n(70799),s=n(12475),a=n(41180);function l(e,t,n){if(void 0===n)return e.getAttribute(t);if(null==n){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,n)}},97639:function(e,t,n){n.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),n=/(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?n[2]:"webkit"===e?"chrome"===n[1]||"webkit"===n[1]:"ff"===e?"firefox"===n[1]:"msie"===e?"trident"===n[1]||"msie"===n[1]:n[1]===e}])},44710:function(e,t,n){var i=n(72430);let o=(e,t)=>{let n=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];n.push((0,i.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return n.join("&")};n.d(t,["buildQuery",0,o])},66292:function(e,t,n){var i=n(82758);n.d(t,["completeUrl",0,e=>("file:"===i.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},68934:function(e,t,n){n.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,u.keys)(t,!1).reduce((n,i)=>(n[i]=(0,o.isPlainObject)(t[i])?e(t[i]):t[i],n),{})}},ConfigFlatten:function(){return d},ConfigMerge:function(){return function e(t,n){Object.keys(n).forEach(i=>{if((0,c.isUnsafeProtoKey)(i))return;let r=n[i],s=t[i];(0,o.isPlainObject)(r)&&(0,o.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[i]=r})}},ConfigProto:function(){return function e(t,n,u=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let d=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==d.presets[t.preset]){let e=d.presets[t.preset];Object.keys(e).forEach(n=>{(0,s.isVoid)(t[n])&&(t[n]=e[n])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,c.isUnsafeProtoKey)(r))return;let s=t[r],a=n?n[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,u+1);return}if(0!==u&&(0,i.isArray)(s)&&!(0,l.isAtom)(s)&&(0,i.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,n),h}}});var i=n(68345),o=n(72430),r=n(70799),s=n(86068),a=n(6441),l=n(97735),c=n(69175),u=n(37790);function d(e){return(0,u.keys)(e,!1).reduce((t,n)=>(t[n]=e[n],t),{})}},55877:function(e,t,n){var i=n(82758),o=n(26049),r=n(82501);n.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:n=345}={})=>{if(!(0,o.isURL)(e))return e;let s=i.globalDocument.createElement("a");s.href=e,t||(t=400),n||(n=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let i=s.pathname.split("/").filter(Boolean),o=i.findIndex(e=>/^\d+$/.test(e));if(-1===o)return e;let r=i[o],l=i[o+1];return l&&0===o&&(r+="/"+l),'<iframe width="'+t+'" height="'+n+'" 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 i=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(i=i.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+n+'" src="'+a+"//www.youtube.com/embed/"+i+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},41180:function(e,t,n){n.d(t,{css:function(){return l},cssInline:function(){return c}});var i=n(87612),o=n(72430),r=n(3760),s=n(87058),a=n(12475);function l(e,t,n,c=!1){if((0,i.isBoolean)(n)&&(c=n,n=void 0),(0,o.isPlainObject)(t)||void 0!==n){let i=(e,t,n)=>{void 0!==(n=(0,r.normalizeCssNumericValue)(t,n))&&(null==n||l(e,t,!0)!==(0,r.normalizeCssValue)(t,n))&&(e.style[t]=n)};if((0,o.isPlainObject)(t)){let n=Object.keys(t);for(let o=0;o<n.length;o+=1)i(e,(0,s.camelCase)(n[o]),t[n[o]])}else i(e,(0,s.camelCase)(t),n);return""}let u=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],f="";return void 0!==p&&""!==p?f=p:h&&!c&&(f=h.getComputedStyle(e).getPropertyValue(u)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,r.normalizeCssValue)(t,f)}function c(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}n.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,n){n.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,n){var i=n(39955);let o=new WeakMap;n.d(t,["dataBind",0,(e,t,n)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,i.isViewObject)(e.j)&&(t=e.j.e),(0,i.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===n?r[t]:(r[t]=n,n)}])},96325:function(e,t,n){var i=n(82758),o=n(70799);n.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:i.globalDocument.documentElement&&i.globalDocument.documentElement.lang?i.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},82760:function(e,t,n){n.d(t,{answer:function(){return a},connection:function(){return r},error:function(){return o},options:function(){return s}});var i=n(32880);function o(e){return TypeError(e)}function r(e){return new i.ConnectionError(e)}function s(e){return new i.OptionsError(e)}function a(e,t,n){return new i.AnswerError(e,t,n)}},93661:function(e,t,n){n.d(t,{abort:function(){return i}});function i(e="Aborted"){return new DOMException(e,"AbortError")}},5311:function(e,t,n){n.d(t,{AnswerError:function(){return i}});class i extends Error{constructor(e,t,n){super(e),this.answer=t,this.code=n,Object.setPrototypeOf(this,i.prototype)}}},86397:function(e,t,n){n.d(t,{ConnectionError:function(){return i}});class i extends Error{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}},32880:function(e,t,n){n.d(t,{AnswerError:function(){return o.AnswerError},ConnectionError:function(){return r.ConnectionError},OptionsError:function(){return s.OptionsError},abort:function(){return i.abort}});var i=n(93661),o=n(5311),r=n(86397),s=n(57865)},57865:function(e,t,n){n.d(t,{OptionsError:function(){return i}});class i extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}},89890:function(e,t,n){n.d(t,{AnswerError:function(){return o.AnswerError},ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},answer:function(){return i.answer},connection:function(){return i.connection},error:function(){return i.error},options:function(){return i.options}});var i=n(82760),o=n(32880)},97735:function(e,t,n){n.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var i=n(67462);function o(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,i.stringify)(e))}},80568:function(e,t,n){var i=n(23282);let o=new Map;n.d(t,["getClassName",0,e=>{var t;if((0,i.isFunction)(e.className))return e.className();let n=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(o.has(n))return o.get(n);if(n.name)return n.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=n.toString().match(r);return s?s[1]:""},"keepNames",0,o])},94643:function(e,t,n){n.d(t,{get:function(){return r}});var i=n(70799),o=n(86068);function r(e,t){if(!(0,i.isString)(e)||!e.length)return null;let n=e.split("."),r=t;try{for(let e of n){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,o.isVoid)(r)?null:r}},38420:function(e,t,n){n.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),n=["KB","MB","GB","TB"],i=parseFloat(e.substr(0,e.length-2));return -1!==n.indexOf(t)?i*Math.pow(1024,n.indexOf(t)+1):parseInt(e,10)}])},68645:function(e,t,n){n.d(t,{getCaptionWrapper:function(){return l},getCaptionedImage:function(){return a},getImageCaption:function(){return s}});var i=n(2748),o=n(4510);let r=(e,t)=>i.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&(!t.className||e.classList.contains(t.className));function s(e,t){var n;let i=e.o.imageCaption;return i&&r(t,i.wrapper)&&null!=(n=(0,o.toArray)(t.getElementsByTagName(i.caption.tag)).find(e=>r(e,i.caption)))?n:null}function a(e,t){let n=s(e,t);if(!n)return null;let i=t.getElementsByTagName("img");return 1!==i.length||n.contains(i[0])?null:i[0]}function l(e,t){return i.Dom.closest(t,t=>!!a(e,t),e.editor)}},43555:function(e,t,n){n.d(t,{$$:function(){return x.$$},AnswerError:function(){return b.AnswerError},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return b.ConnectionError},LimitedStack:function(){return L.LimitedStack},OptionsError:function(){return b.OptionsError},UNSAFE_PROTO_KEYS:function(){return k.UNSAFE_PROTO_KEYS},abort:function(){return b.abort},alignElement:function(){return i.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 R.call},callPromise:function(){return R.callPromise},callThis:function(){return R.callThis},clearAlign:function(){return i.clearAlign},clearCenterAlign:function(){return p.clearCenterAlign},clearHAlign:function(){return i.clearHAlign},cns:function(){return C.cns},completeUrl:function(){return u.completeUrl},connection:function(){return b.connection},convertMediaUrlToVideoEmbed:function(){return h.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return E.createMediaWrapper},css:function(){return p.css},cssInline:function(){return p.cssInline},cssPath:function(){return x.cssPath},ctrlKey:function(){return f.ctrlKey},dataBind:function(){return m.dataBind},defaultLanguage:function(){return g.defaultLanguage},error:function(){return b.error},fastClone:function(){return v.fastClone},get:function(){return y.get},getAlignClasses:function(){return i.getAlignClasses},getAnchorName:function(){return o.getAnchorName},getAnchors:function(){return o.getAnchors},getCaptionWrapper:function(){return S.getCaptionWrapper},getCaptionedImage:function(){return S.getCaptionedImage},getClassName:function(){return w.getClassName},getDataTransfer:function(){return R.getDataTransfer},getHAlign:function(){return i.getHAlign},getImageCaption:function(){return S.getImageCaption},getMediaWrapper:function(){return E.getMediaWrapper},getPropertyDescriptor:function(){return R.getPropertyDescriptor},getWrappedMedia:function(){return E.getWrappedMedia},getXPathByElement:function(){return x.getXPathByElement},hAlignElement:function(){return i.hAlignElement},humanSizeToBytes:function(){return _.humanSizeToBytes},inView:function(){return A.inView},isAnchor:function(){return o.isAnchor},isAtom:function(){return v.isAtom},isUnsafeProtoKey:function(){return k.isUnsafeProtoKey},keepNames:function(){return w.keepNames},keys:function(){return R.keys},loadImage:function(){return R.loadImage},loadNext:function(){return r.loadNext},loadNextStyle:function(){return r.loadNextStyle},markAsAtomic:function(){return v.markAsAtomic},markDeprecated:function(){return C.markDeprecated},markOwner:function(){return R.markOwner},memorizeExec:function(){return R.memorizeExec},options:function(){return b.options},parseQuery:function(){return D.parseQuery},prepareEmbedCode:function(){return I.prepareEmbedCode},prepareMedia:function(){return I.prepareMedia},previewBox:function(){return T.previewBox},refs:function(){return x.refs},reset:function(){return j.reset},resolveElement:function(){return x.resolveElement},scrollIntoViewIfNeeded:function(){return A.scrollIntoViewIfNeeded},set:function(){return P.set},wrapMedia:function(){return E.wrapMedia}});var i=n(25726),o=n(70442),r=n(63799),s=n(38837),a=n(29960),l=n(97639),c=n(44710),u=n(66292),d=n(68934),h=n(55877),p=n(41180),f=n(15456),m=n(86583),g=n(96325),b=n(89890),v=n(97735),y=n(94643),w=n(80568),_=n(38420),S=n(68645),k=n(69175),C=n(95942),E=n(61477),D=n(82501),I=n(96437),T=n(11628),j=n(58844),A=n(26395),x=n(76078),P=n(3703),L=n(50535),R=n(37790)},69175:function(e,t,n){n.d(t,{isUnsafeProtoKey:function(){return o}});let i=["__proto__","constructor","prototype"];function o(e){return -1!==i.indexOf(e)}n.d(t,["UNSAFE_PROTO_KEYS",0,i])},95942:function(e,t,n){n.d(t,{markDeprecated:function(){return o}});let i=console;function o(e,t=[""],n=null){return(...o)=>(i.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(n,...o))}n.d(t,["cns",0,i])},61477:function(e,t,n){n.d(t,{createMediaWrapper:function(){return a},getMediaWrapper:function(){return s},getWrappedMedia:function(){return r},wrapMedia:function(){return l}});var i=n(2748);let o=(e,t)=>i.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&e.classList.contains(t.className);function r(e,t){var n;for(let[i,r]of Object.entries(null!=(n=e.o.mediaWrappers)?n:{}))if(o(t,r)){let e=t.querySelector(i);if(e)return e}return null}function s(e,t){return i.Dom.closest(t,t=>!!r(e,t),e.editor)}function a(e,t){var n;let i=null==(n=e.o.mediaWrappers)?void 0:n[t.toLowerCase()];return i?e.createInside.element(i.tag,{class:i.className,contenteditable:!1,draggable:!0}):null}function l(e,t){let n=a(e,t.nodeName);return n?(t.parentNode&&i.Dom.before(t,n),i.Dom.append(n,t),n):t}},82501:function(e,t,n){n.d(t,["parseQuery",0,e=>{let t={},n=e.substring(1).split("&");for(let e=0;e<n.length;e+=1){let i=n[e].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}return t}])},96437:function(e,t,n){n.d(t,{prepareEmbedCode:function(){return s},prepareMedia:function(){return r}});var i=n(25726),o=n(61477);function r(e,t){let n=(0,o.wrapMedia)(e,t),{mediaDefaultAlign:r}=e.o;return r&&"normal"!==r&&(0,i.hAlignElement)(n,r,(0,i.getAlignClasses)(e,n)),n}function s(e,t){let n=e.createInside.div();n.innerHTML=t.trim();let i=n.firstElementChild;return i&&1===n.childNodes.length?r(e,i):t}},11628:function(e,t,n){n.d(t,{previewBox:function(){return a}});var i=n(2748),o=n(70799),r=n(29960),s=n(41180);function a(e,t,n="px",l=null){let c=[],u=function(e,t){let n=[],o=[];i.Dom.each(e.editor,e=>{i.Dom.isTag(e,"img")&&o.push(e)});try{o.forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),(0,r.attr)(o,"src")];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();i.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(o,"src")||""),(0,r.attr)(o,"src",a.href),i.Dom.safeRemove(a),n.push(()=>{(0,r.attr)(o,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw n.forEach(e=>e()),n.length=0,e}return n}(e,n);try{let a=e.e.fire("beforePreviewBox",t,n);if(null!=a)return a;let u=e.c.div("jodit__preview-box jodit-context");l&&i.Dom.append(l,u),(0,s.css)(u,{position:"relative",padding:16});let d=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}),i.Dom.append(u,t);let n=t.contentWindow;if(n&&(e.e.fire("generateDocumentStructure.iframe",n.document,e),u=n.document.body,"function"==typeof ResizeObserver)){let i=!1,o=n.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),(0,s.css)(t,"height",o.offsetHeight+20),e.async.requestAnimationFrame(()=>{i||r.observe(o)})},100)),a=()=>{i=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",a)};c.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(u,{minWidth:1024,minHeight:600,border:0});let h=(t,n)=>{let s=(0,o.isString)(n)?e.c.div():n;(0,o.isString)(n)&&(s.innerHTML=n);for(let e=0;e<s.childNodes.length;e+=1){let n=s.childNodes[e];if(i.Dom.isElement(n)){let e=t.ownerDocument.createElement(n.nodeName);for(let t=0;t<n.attributes.length;t+=1)(0,r.attr)(e,n.attributes[t].name,n.attributes[t].value);0===n.childNodes.length||i.Dom.isTag(n,"table")?"SCRIPT"===n.nodeName?n.textContent&&(e.textContent=n.textContent):n.innerHTML&&(e.innerHTML=n.innerHTML):h(e,n);try{i.Dom.append(t,e)}catch(e){}}else try{i.Dom.append(t,n.cloneNode(!0))}catch(e){}}};return h(u,d),e.e.fire("afterPreviewBox",u),[u,()=>{c.forEach(e=>e())}]}finally{u.forEach(e=>e())}}},58844:function(e,t,n){n.d(t,{reset:function(){return a}});var i=n(82758),o=n(23282),r=n(94643);let s={};function a(e){var t,n;if(!(e in s)){let n=i.globalDocument.createElement("iframe");try{if(n.src="about:blank",i.globalDocument.body.appendChild(n),!n.contentWindow)return null;let t=(0,r.get)(e,n.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),n.contentWindow);(0,o.isFunction)(t)&&(s[e]=t.bind(a))}catch(e){if(!i.IS_PROD)throw e}finally{null==(t=n.parentNode)||t.removeChild(n)}}return null!=(n=s[e])?n:null}},26395:function(e,t,n){n.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var i=n(2748);function o(e,t,n){var i;let o=e.getBoundingClientRect(),r=e,s=o.top,a=o.height;for(;r&&r!==t&&r.parentNode;)if(s+a>(o=(r=r.parentNode).getBoundingClientRect()).bottom+1&&s>o.top||s+a<=o.top)return!1;let l=n.documentElement&&n.documentElement.clientHeight||0,c=null==(i=n.defaultView)?void 0:i.getComputedStyle(n.documentElement),u=(e="")=>e.endsWith("%")?parseFloat(e)*l/100:parseFloat(e)||0,d=u(null==c?void 0:c.scrollPaddingTop);return(s+a<=l-u(null==c?void 0:c.scrollPaddingBottom)+1||d>=s)&&s+a>=d}function r(e,t,n){if(i.Dom.isHTMLElement(e)&&!o(e,t,n)){if(t.clientHeight!==t.scrollHeight){let n=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<n?n:e.offsetTop}o(e,t,n)||e.scrollIntoView({block:"nearest"})}}},76078:function(e,t,n){n.d(t,{$$:function(){return d},resolveElement:function(){return p}});var i=n(82758),o=n(2748),r=n(4510),s=n(70799),a=n(87058),l=n(29960),c=n(89890);let u=1;function d(e,t){let n;if(!i.IS_ES_NEXT&&/:scope/.test(e)&&i.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let i=t.id,o=i||"_selector_id_"+String(Math.random()).slice(2)+ ++u;e=e.replace(/:scope/g,"#"+o),i||t.setAttribute("id",o),n=t.parentNode.querySelectorAll(e),i||t.removeAttribute("id")}else n=t.querySelectorAll(e);return[].slice.call(n)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let n=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(n.length>1?"["+((0,r.toArray)(n).indexOf(e)+1)+"]":"")};function p(e,t){let n=e;if((0,s.isString)(e))try{n=t.querySelector(e)}catch(t){throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!n||"object"!=typeof n||!o.Dom.isElement(n)||!n.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return n}n.d(t,["cssPath",0,e=>{if(!o.Dom.isElement(e))return null;let t=[],n=e;for(;n&&n.nodeType===Node.ELEMENT_NODE;){let e=n.nodeName.toLowerCase();if(n.id){e+="#"+n.id,t.unshift(e);break}{let t=n,i=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&i++;while(t);e+=":nth-of-type("+i+")"}t.unshift(e),n=n.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return o.Dom.each(e,e=>{if(o.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let n=(0,l.attr)(e,"-ref");n&&(0,s.isString)(n)&&(t[(0,a.camelCase)(n)]=e,t[n]=e)}}),t}])},3703:function(e,t,n){n.d(t,{set:function(){return l}});var i=n(68345),o=n(29807),r=n(72430),s=n(70799),a=n(69175);function l(e,t,n){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let c=n;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,i.isArray)(c[t])||(0,r.isPlainObject)(c[t])||(c[t]=(0,o.isNumeric)(l[e+1])?[]:{}),c=c[t]}c&&(c[l[l.length-1]]=t)}},50535:function(e,t,n){n.d(t,{LimitedStack:function(){return i}});class i{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,n){n.d(t,{call:function(){return a},callPromise:function(){return u},callThis:function(){return l},getPropertyDescriptor:function(){return d},markOwner:function(){return c}});var i=n(14773),o=n(86068),r=n(29960),s=n(86583);function a(e,...t){return e(...t)}function l(e,t,...n){return e.apply(t,n)}function c(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function u(e,t){return(0,i.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function d(e,t){let n;do n=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!n&&e);return n}n.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 n=[];for(let t in e)n.push(t);return n},"loadImage",0,(e,t)=>t.async.promise((n,i)=>{let o=new Image,r=()=>{t.e.off(o),null==i||i()},s=()=>{t.e.off(o),n(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),"memorizeExec",0,(e,t,{control:n},i)=>{var r;let a=`button${n.command}`,l=null!=(r=n.args&&n.args[0])?r:(0,s.dataBind)(e,a);if((0,o.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),i&&(l=i(l)),e.execCommand(n.command,!1,null!=l?l:void 0)}])},31359:function(e,t,n){n.d(t,{init:function(){return s}});var i=n(82758),o=n(60132),r=n(14041);function s(e,t,n,s,a,l,c){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!i.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{i.IS_PROD}),s.styles&&(c(e,t,"style").innerHTML=s.styles)}},14041:function(e,t,n){n.d(t,{loadExtras:function(){return d},loadStyle:function(){return c}});var i=n(82758),o=n(12475),r=n(63799),s=n(89672);function a(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}let l=new Set;function c(e,t){var n;return(n=function*(){let n=u(e,t,!1);if(!l.has(n))return l.add(n),(0,r.appendStyleAsync)(e,n)},function(){var e=this,t=arguments;return new Promise(function(i,o){var r=n.apply(e,t);function s(e){a(r,i,o,s,l,"next",e)}function l(e){a(r,i,o,s,l,"throw",e)}s(void 0)})})()}function u(e,t,n){t=(0,o.kebabCase)(t);let i=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+i+"."+(n?"js":"css")}function d(e,t,n,o){try{let i=n.filter(t=>!e.has((0,s.normalizeName)(t.name)));i.length&&i.map(e=>{let n=e.url||u(t,e.name,!0);return(0,r.appendScriptAsync)(t,n).then(o).catch(()=>null)})}catch(e){if(!i.IS_PROD)throw e}}},48591:function(e,t,n){n.d(t,{makeInstance:function(){return r}});var i=n(82758),o=n(23282);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(n){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!i.IS_PROD)throw e}return null}},89672:function(e,t,n){n.d(t,{normalizeName:function(){return o}});var i=n(12475);function o(e){return(0,i.kebabCase)(e).toLowerCase()}},50911:function(e,t,n){n.d(t,{Plugin:function(){return i.Plugin}});var i=n(20356);n(41876)},41876:function(e,t,n){n.d(t,{PluginSystem:function(){return p}});var i=n(82758),o=n(57012),r=n(46559),s=n(68345),a=n(60132),l=n(70799),c=n(31359),u=n(14041),d=n(48591),h=n(89672);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,h.normalizeName)(e),t),o.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((n,i)=>{(!e||e.has(i))&&t.push([i,n])}),t}__init(e){let{extraList:t,disableList:n,filter:o}={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,f={},m=new Set;e.__plugins=f;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(o).forEach(([i,o])=>{if(n.has(i)||p.has(i))return;let r=null==o?void 0:o.requires;if(r&&(0,s.isArray)(r)&&r.length){if(r.some(e=>n.has(e)))return;if(!r.every(e=>p.has(e)))return void m.add(i)}t=!0;let a=(0,d.makeInstance)(e,o);if(!a){p.set(i,null),m.delete(i);return}(0,c.init)(e,i,o,a,p,m,this.opts.getContainer),f[i]=a}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,u.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(f).forEach(t=>{let n=f[t];(0,a.isDestructable)(n)&&n.destruct(e),delete f[t]}),delete e.__plugins}),i.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let n=()=>{t(),o.eventEmitter.off(`plugin:${e}:ready`,n)};o.eventEmitter.on(`plugin:${e}:ready`,n)})}constructor(e){this.opts=e,this.__items=new Map}}},20356:function(e,t,n){n.d(t,{Plugin:function(){return a}});var i=n(91907),o=n(65478),r=n(19306),s=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class a extends i.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(i.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(i.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([o.autobind],a.prototype,"__afterPluginSystemInit",null),s([o.autobind],a.prototype,"__afterInit",null),s([o.autobind],a.prototype,"__beforeDestruct",null)},54079:function(e,t,n){n.d(t,{Ajax:function(){return p}});var i=n(8884),o=n(82758),r=n(45219),s=n(21537),a=n(89890),l=n(6441);n(57459);var c=n(98582);function u(e){var t,n;function i(t,n){try{var r=e[t](n),s=r.value,a=s instanceof h;Promise.resolve(a?s.v:s).then(function(n){if(a){var l="return"===t?"return":"next";if(!s.k||n.done)return i(l,n);n=e[l](n).value}o(r.done?"return":"normal",n)},function(e){i("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(r,s){var a={key:e,arg:o,resolve:r,reject:s,next:null};n?n=n.next=a:(t=n=a,i(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function d(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function h(e,t){this.v=e,this.k=t}u.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},u.prototype.next=function(e){return this._invoke("next",e)},u.prototype.throw=function(e){return this._invoke("throw",e)},u.prototype.return=function(e){return this._invoke("return",e)};class p{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 o.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,n=this.prepareRequest();return this.__async.promise((i,o)=>{var r;return(r=function*(){var r;let l=()=>{this.__isFulfilled=!0,o(a.connection("Connection error"))},u=()=>{this.__isFulfilled=!0,i(new c.Response(n,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=u,e.onabort=()=>{this.__isFulfilled=!0,o(a.abort("Abort connection"))},e.onerror=l,e.ontimeout=l,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,n;let i=0;e.lengthComputable&&(i=e.loaded/e.total*100),null==(n=(t=this.options).onProgress)||n.call(t,i)},e.onreadystatechange=()=>{var n,i;null==(i=(n=this.options).onProgress)||i.call(n,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)||this.__hasAnswerEnvelope()?u():e.statusText&&(this.__isFulfilled=!0,o(a.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:d,data:h,method:p}=n;e.open(p,d,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:f}=t;(0,s.isFunction)(f)&&(f=yield f.call(this)),f&&e.setRequestHeader&&Object.keys(f).forEach(t=>{e.setRequestHeader(t,f[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)},function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(e){d(o,n,i,s,a,"next",e)}function a(e){d(o,n,i,s,a,"throw",e)}s(void 0)})}).call(this)})}stream(){var e;return(e=function*(){var e,t;this.__activated=!0;let{xhr:n,o:i}=this,o=this.prepareRequest(),r=0,l="",c=[],u=null,d=!1,p=null,f=()=>{if(u){let e=u;u=null,e()}},m=e=>{var t;let i=n.responseText;l+=i.substring(r),r=i.length;let o=l.split("\n\n");for(let n of(l=e?"":null!=(t=o.pop())?t:"",o)){let e=n.trim();if(!e)continue;let t=[];for(let n of e.split("\n"))n.startsWith("data: ")?t.push(n.slice(6)):n.startsWith("data:")&&t.push(n.slice(5));t.length&&c.push(t.join("\n"))}f()};n.onprogress=()=>m(!1),n.onload=()=>{m(!0),d=!0,this.__isFulfilled=!0,f()},n.onerror=()=>{p=a.connection("Connection error"),d=!0,this.__isFulfilled=!0,f()},n.onabort=()=>{p=a.abort("Abort connection"),d=!0,this.__isFulfilled=!0,f()},n.withCredentials=null!=(e=i.withCredentials)&&e;let{url:g,data:b,method:v}=o;n.open(v,g,!0),i.contentType&&n.setRequestHeader&&n.setRequestHeader("Content-type",i.contentType);let{headers:y}=i;(0,s.isFunction)(y)&&(y=yield new h(y.call(this),0)),y&&n.setRequestHeader&&Object.keys(y).forEach(e=>{n.setRequestHeader(e,y[e])}),n.send(b?this.__buildParams(b):void 0);try{for(;;)if(c.length>0)yield c.shift();else if(d)break;else yield(t=new Promise(e=>{u=e}),new h(t,0))}finally{this.__isFulfilled||this.abort()}if(p)throw p},function(){return new u(e.apply(this,arguments))}).call(this)}prepareRequest(){if(!this.o.url)throw a.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,n=(this.o.method||"get").toLowerCase();if("get"===n&&t&&(0,s.isPlainObject)(t)){let n=e.indexOf("?");if(-1!==n){let i=(0,s.parseQuery)(e.substring(n));e=e.substring(0,n)+"?"+(0,s.buildQuery)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},i,t))}else e+="?"+(0,s.buildQuery)(this.o.data)}let i={url:e,method:n,data:t};return p.log.splice(100),p.log.push(i),i}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=l.Config.prototype.defaultAjaxOptions){this.__async=new i.Async,this.__isFulfilled=!1,this.__activated=!1,this.__isDestructed=!1,this.options=(0,s.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}p.log=[],function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([r.autobind],p.prototype,"destruct",null)},57459:function(e,t,n){n(6441).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr(){return new XMLHttpRequest}}},41601:function(e,t,n){n.d(t,{Ajax:function(){return i.Ajax},Response:function(){return o.Response}});var i=n(54079),o=n(98582)},98582:function(e,t,n){function i(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var s=e.apply(t,n);function a(e){i(s,o,r,a,l,"next",e)}function l(e){i(s,o,r,a,l,"throw",e)}a(void 0)})}}n.d(t,{Response:function(){return r}});class r{get url(){return this.request.url}json(){return o(function*(){return JSON.parse(this.body)}).call(this)}text(){return Promise.resolve(this.body)}blob(){return o(function*(){return this.body}).call(this)}constructor(e,t,n,i){this.request=e,this.status=t,this.statusText=n,this.body=i}}},79505:function(e,t,n){n.d(t,{composedRanges:function(){return o}});var i=n(27613);function o(e,t){let n=e.getComposedRanges;if(!(0,i.isFunction)(n))return null;for(let i of[[{shadowRoots:[t]}],[t]]){let o;try{o=n.apply(e,i)}catch(e){continue}if(function(e,t){return Array.isArray(e)&&e.length>0&&e.every(e=>{var n;return(n=e.startContainer)===t||t.contains(n)})}(o,t))return o}return null}},45124:function(e,t,n){n.d(t,{composedRanges:function(){return s.composedRanges},cursorInTheEdgeOfString:function(){return c},findCorrectCurrentNode:function(){return u},isMoved:function(){return a.isMoved},moveNodeInsideStart:function(){return l.moveNodeInsideStart}});var i=n(82758),o=n(2748),r=n(49055),s=n(79505),a=n(12604),l=n(26716);function c(e,t,n,o){var s;let a=(null==(s=e.nodeValue)?void 0:s.length)?e.nodeValue:"";if(o&&(0,r.trimInvEnd)(a).length>t)return!0;let l=(0,i.INVISIBLE_SPACE_REG_EXP_START)().exec(a);return n&&(l&&l[0].length<t||!l&&t>0)}function u(e,t,n,i,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],n=!0),e&&i&&!o.Dom.isText(e)){if(!n&&o.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=e=>n?e.lastChild:s(e),i=t(e);for(;i;){if(i&&o.Dom.isText(i)){e=i;break}i=t(i)}}}if(e&&!i&&!o.Dom.isText(e)){let t=e,n=e;do t=t.firstChild,n=n.lastChild;while(t&&n&&!o.Dom.isText(t));t===n&&t&&o.Dom.isText(t)&&(e=t)}return{node:e,rightMode:n}}n(43463)},12604:function(e,t,n){n.d(t,{isMoved:function(){return i}});function i(e,t){let{s:n}=e;if(!t||!n.isInsideArea)return!1;let{range:i}=n;return i.startContainer!==t.startContainer||i.startOffset!==t.startOffset||i.endContainer!==t.endContainer||i.endOffset!==t.endOffset}},26716:function(e,t,n){n.d(t,{moveNodeInsideStart:function(){return r}});var i=n(82758),o=n(2748);function r(e,t,n){let r=e=>{var t;return!o.Dom.isEmptyTextNode(e)||!!(null==(t=e.nodeValue)?void 0:t.includes(i.NBSP_SPACE))},s=o.Dom.findSibling(t,n,r),a=o.Dom.findSibling(t,!n,r);for(;o.Dom.isElement(s)&&!o.Dom.isTag(s,i.INSEPARABLE_TAGS)&&o.Dom.isContentEditable(s,e.editor)&&(!a||!o.Dom.closest(t,o.Dom.isElement,e.editor));)n||!s.firstChild?o.Dom.append(s,t):o.Dom.before(s.firstChild,t),s=o.Dom.sibling(t,n),a=o.Dom.sibling(t,!n)}},43463:function(e,t,n){n.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return o}});var i=n(2748);function o(e,t,n){let o=e;for(;o&&o!==n&&!(i.Dom.findSibling(o,t)||i.Dom.isBlock(o.parentElement));)(o=o.parentElement)&&o!==n&&(t?i.Dom.before(o,e):i.Dom.after(o,e))}},59242:function(e,t,n){n.d(t,{CHANGE:function(){return"change"},CommitStyle:function(){return o.CommitStyle},REPLACE:function(){return r.REPLACE},Selection:function(){return i.Selection},UNWRAP:function(){return"unwrap"},WRAP:function(){return"wrap"}});var i=n(79348),o=n(25639),r=n(77361)},79348:function(e,t,n){n.d(t,{Selection:function(){return f}});var i=n(82758),o=n(65478),r=n(2748),s=n(21537),a=n(27613),l=n(25726),c=n(38837),u=n(43463),d=n(25639),h=n(45124),p=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class f{get j(){return this.jodit}errorNode(e){if(!r.Dom.isNode(e))throw(0,s.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){let{shadowRoot:e}=this.j.o;if(e){if((0,a.isFunction)(e.getSelection))return e.getSelection();let t=this.__composedSelection(e);if(t)return t}return this.win.getSelection()}__composedSelection(e){let t=this.win.getSelection();if(!t)return null;let{anchorNode:n}=t;if(n&&r.Dom.isOrContains(e,n))return null;let i=(0,h.composedRanges)(t,e);if(!i)return null;let o=i.map(e=>{let t=this.createRange();return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t}),s=o[0],l={rangeCount:o.length,getRangeAt:e=>o[e],isCollapsed:o.every(e=>e.collapsed),anchorNode:s?s.startContainer:null,anchorOffset:s?s.startOffset:0,focusNode:s?s.endContainer:null,focusOffset:s?s.endOffset:0,toString:()=>o.map(e=>e.toString()).join("")};return new Proxy(t,{get(e,t){if((0,a.isString)(t)&&t in l)return l[t];let n=Reflect.get(e,t,e);return(0,a.isFunction)(n)?n.bind(e):n}})}__nativeRangeCount(){var e,t,n,i;let{shadowRoot:o}=this.j.o;return o&&(0,a.isFunction)(o.getSelection)?null!=(t=null==(e=o.getSelection())?void 0:e.rangeCount)?t:0:null!=(i=null==(n=this.win.getSelection())?void 0:n.rangeCount)?i:0}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!(null==e?void 0:e.rangeCount))return!1;for(let t=0;t<e.rangeCount;t+=1)if(!r.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let n=e.getRangeAt(t);r.Dom.isOrContains(this.area,n.commonAncestorContainer)&&(n.deleteContents(),n.collapse(!0))}}clear(){var e,t;(null==(e=this.sel)?void 0:e.rangeCount)&&(null==(t=this.sel)||t.removeAllRanges())}removeNode(e){if(!r.Dom.isOrContains(this.j.editor,e,!0))throw(0,s.error)("Selection.removeNode can remove only editor's children");r.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){var n,i,o,s;try{let a=this.createRange(),l=null==(i=(n=this.doc).caretPositionFromPoint)?void 0:i.call(n,e,t),c=l?null:null==(s=(o=this.doc).caretRangeFromPoint)?void 0:s.call(o,e,t);if(l)a.setStart(l.offsetNode,l.offset);else{if(!c)return!1;a.setStart(c.startContainer,c.startOffset)}if(!r.Dom.isOrContains(this.area,a.startContainer))return!1;return a.collapse(!0),this.removeMarkers(),this.selectRange(a),!0}catch(e){}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,s.$$)("span[data-"+i.MARKER_CLASS+"]",this.area)}removeMarkers(){r.Dom.safeRemove(...this.markers)}marker(e=!1,t){var n;let o=null;t&&(o=t.cloneRange()).collapse(e);let a=this.j.createInside.span();if(a.id=i.MARKER_CLASS+"_"+Number(new Date)+"_"+String(Math.random()).slice(2),(0,s.css)(a,{lineHeight:"0",display:"none"}),r.Dom.markTemporary(a),(0,s.attr)(a,"data-"+i.MARKER_CLASS,e?"start":"end"),r.Dom.append(a,this.j.createInside.text(i.INVISIBLE_SPACE)),o&&r.Dom.isOrContains(this.area,e?o.startContainer:o.endContainer)){let{startContainer:e,startOffset:t}=o;r.Dom.isText(e)&&0===t?r.Dom.before(e,a):r.Dom.isText(e)&&t===(null==(n=e.nodeValue)?void 0:n.length)?r.Dom.after(e,a):o.insertNode(a)}return a}restore(){var e,t;let n=this.markers,o=new Map(n.map(e=>[e.id,e])),a=[],l=!1;for(let c=0;c<n.length;c+=1){let u=n[c];if("start"!==(0,s.attr)(u,"data-"+i.MARKER_CLASS))continue;l||(l="true"===(0,s.attr)(u,"data-selection-backward"));let d=(0,s.attr)(u,"data-selection-end"),h=d?o.get(d):void 0;!d&&n[c+1]&&"end"===(0,s.attr)(n[c+1],"data-"+i.MARKER_CLASS)&&(h=n[c+1]);let p=this.createRange();if(h)p.setStartAfter(u),p.setEndBefore(h);else{let n=u.previousSibling;r.Dom.isText(n)?p.setStart(n,null!=(t=null==(e=n.nodeValue)?void 0:e.length)?t:0):p.setStartBefore(u),p.collapse(!0)}a.push(p)}r.Dom.safeRemove(...n),a.length&&this.__selectRanges(a,l)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,n)=>e.getRangeAt(n).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),n=t.map(e=>{let t=e.collapsed,n=e.cloneRange();n.collapse(!0);let i=this.j.createInside.fake();r.Dom.safeInsertNode(n,i),e.setStartBefore(i);let o=[i];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let n=this.j.createInside.fake();r.Dom.safeInsertNode(t,n),e.setEndAfter(n),o.push(n)}return o});return this.__fakeSelections.set(n[0][0],{pairs:n,backward:e}),this.__selectRanges(t,e),n[0]}restoreFakes(e){var t,n,i;if(!e.length)return;let o=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let s=[];for(let a of null!=(t=null==o?void 0:o.pairs)?t:[e]){let e=a.filter(e=>e.isConnected&&r.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,o]=e,l=this.createRange();for(let s of(l.setStartAfter(t),o?l.setEndBefore(o):l.collapse(!0),e))(null==(n=s.parentNode)?void 0:n.firstChild)!==(null==(i=s.parentNode)?void 0:i.lastChild)&&r.Dom.safeRemove(s);s.push(l)}s.length&&this.__selectRanges(s,null==o?void 0:o.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let n=this.__isBackward(),i=[],o=t.rangeCount,a=[];for(let e=0;o>e;e+=1)if(a[e]=t.getRangeAt(e),!r.Dom.isOrContains(this.area,a[e].commonAncestorContainer))return[];for(let e=0;o>e;e+=1)if(a[e].collapsed){let t=this.marker(!0,a[e]);i[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,a[e]),r=this.marker(!1,a[e]);o>1&&(0,s.attr)(t,"data-selection-end",r.id),n&&(0,s.attr)(t,"data-selection-backward","true"),i[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=o-1;e>=0;--e){let n=this.area.querySelector("#"+i[e].startId);if(n){if(i[e].collapsed)a[e].setStartAfter(n),a[e].collapse(!0);else if(a[e].setStartBefore(n),i[e].endId){let t=this.area.querySelector("#"+i[e].endId);t&&a[e].setEndAfter(t)}try{t.addRange(a[e].cloneRange())}catch(e){}}}}return i}focus(e={preventScroll:!0}){var t,n;if(!this.isFocused()){let i=(0,s.getScrollParent)(this.j.container),o=null==i?void 0:i.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),o&&(null==i?void 0:i.scrollTo)&&i.scrollTo(0,o);let a=this.sel,l=(null==a?void 0:a.rangeCount)?null==a?void 0:a.getRangeAt(0):null;if(!l||!r.Dom.isOrContains(this.area,l.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||null==(n=null==(t=this.j)?void 0:t.events)||n.fire("focus"),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){let e=this.doc.activeElement;return!!(this.doc.hasFocus&&this.doc.hasFocus()&&e&&(this.area===e||r.Dom.isHTMLElement(e)&&e.isContentEditable&&r.Dom.isOrContains(this.area,e)))}current(e=!0){if(this.j.getRealMode()!==i.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let n=t.getRangeAt(0),o=n.startContainer,s=!1;if(!r.Dom.isOrContains(this.area,o))return null;if(r.Dom.isTag(o,"br")&&t.isCollapsed)return o;if(!r.Dom.isText(o)){let i=(0,h.findCorrectCurrentNode)(o,n,s,t.isCollapsed,e,e=>s?e.lastChild:e.firstChild);o=i.node,s=i.rightMode}return o&&r.Dom.isOrContains(this.area,o)?o:null}insertNode(e,t=!0,n=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let o=r.Dom.isFragment(e)?e.lastChild:e;if(!o||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let a=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(o=r.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(a&&a.rangeCount){let t=a.getRangeAt(0),n=r.Dom.isBlock(e),o=n?e:e.firstChild;r.Dom.isOrContains(this.area,t.commonAncestorContainer)?r.Dom.safeInsertNode(t,e):r.Dom.append(this.area,e),[()=>null==o?void 0:o.previousSibling,()=>null==o?void 0:o.previousSibling,()=>{var e;return null==(e=null==o?void 0:o.previousSibling)?void 0:e.lastChild},()=>n?e.nextSibling:null].forEach(e=>{var t;let n=e();n&&r.Dom.isText(n)&&0===(null!=(t=n.nodeValue)?t:"").replace(i.INVISIBLE_SPACE_REG_EXP(),"").length&&r.Dom.safeRemove(n)})}else r.Dom.append(this.area,e);let n=e=>{if(r.Dom.isBlock(e)){let t=e.lastChild;if(t)return n(t)}this.setCursorAfter(e)};t&&(r.Dom.isFragment(e)?o&&n(o):n(e)),this.j.o.scrollToPastedContent&&(0,s.scrollIntoViewIfNeeded)(null!=o?o:e,this.j.editor,this.doc)}),n&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",r.Dom.isFragment(e)?o:e)}insertHTML(e,t=!0){if(""===e)return;let n=this.j.createInside.div(),i=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),r.Dom.isNode(e)?r.Dom.append(n,e):n.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",n.innerHTML)||n.lastChild&&(r.Dom.moveContent(n,i),this.insertNode(i,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,n=null){let i=(0,a.isString)(e)?this.j.createInside.element("img"):e;if((0,a.isString)(e)&&(0,s.attr)(i,"src",e),null!=n){let e=n.toString();e&&"auto"!==e&&0>String(e).indexOf("px")&&0>String(e).indexOf("%")&&(e+="px"),(0,s.attr)(i,"width",e)}t&&"object"==typeof t&&(0,s.css)(i,t);let{imageDefaultAlign:o}=this.j.o;o&&"normal"!==o&&(0,l.hAlignElement)(i,o,(0,l.getAlignClasses)(this.j,i));let r=()=>{(i.naturalHeight<i.offsetHeight||i.naturalWidth<i.offsetWidth)&&(0,s.css)(i,{width:"",height:""}),i.removeEventListener("load",r)};this.j.e.on(i,"load",r),i.complete&&r(),this.insertNode(i),this.j.e.fire("afterInsertImage",i)}eachSelection(e){let t=new Set;for(let n of this.__ranges())r.Dom.isOrContains(this.area,n.commonAncestorContainer)&&this.__eachRange(n,n=>{t.has(n)||(t.add(n),e(n))})}__eachRange(e,t){var n;let o=e.commonAncestorContainer;r.Dom.isHTMLElement(o)||(o=o.parentElement);let l=[],c=e.startOffset,u=o.childNodes.length,d=e.startContainer===this.area?o.childNodes[c<u?c:u-1]:e.startContainer,h=e.endContainer===this.area?o.childNodes[e.endOffset-1]:e.endContainer;r.Dom.isText(d)&&d===e.startContainer&&e.startOffset===(null==(n=d.nodeValue)?void 0:n.length)&&d.nextSibling&&(d=d.nextSibling),r.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===o||r.Dom.isEmptyTextNode(e)||(0,a.isMarker)(e)||l.push(e)};p(d),d!==h&&r.Dom.isOrContains(o,d,!0)&&r.Dom.find(d,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),o,!0,!1);let f=e=>{if(r.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,s.toArray)(e.childNodes).forEach(f);if(r.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(i.INVISIBLE_SPACE);r.Dom.append(e,t),e=t}t(e)}};0===l.length&&(r.Dom.isEmptyTextNode(d)&&l.push(d),(null==d?void 0:d.firstChild)&&l.push(d.firstChild)),l.forEach(f)}cursorInTheEdge(e,t,n=null){let i=!e,o=this.sel,s=(null==o?void 0:o.rangeCount)?o.getRangeAt(0):null;if(!s)return null;let a=e?s.startContainer:s.endContainer,l=e?s.startOffset:s.endOffset;if(null!=n||(n=a),!r.Dom.isOrContains(t,a)||!r.Dom.isOrContains(t,n))return null;let c=e=>!!(e&&!r.Dom.isTag(e,"br")&&!r.Dom.isEmptyTextNode(e)&&!r.Dom.isTemporary(e)&&!(r.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(r.Dom.isText(a)){if((0,h.cursorInTheEdgeOfString)(a,l,e,i))return!1}else{let e=a.childNodes,t=i?e.length:l;for(let n=i?l:0;t>n;n+=1)if(c(e[n]))return!1}let u=n;for(;u&&u!==t;){let t=r.Dom.sibling(u,e);if(!t){u=u.parentNode;continue}if(c(u=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){var n,i;if(this.errorNode(e),!r.Dom.isOrContains(this.area,e,!0))throw(0,s.error)("Node element must be in editor");let o=this.createRange(),a=null;return r.Dom.isText(e)?t?o.setStart(e,0):o.setEnd(e,null!=(i=null==(n=e.nodeValue)?void 0:n.length)?i:0):(a=this.j.createInside.fake(),t?o.setStartBefore(e):o.setEndAfter(e),o.collapse(t),r.Dom.safeInsertNode(o,a),o.selectNode(a)),o.collapse(t),this.selectRange(o),a}setCursorIn(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let n=this.createRange(),o=e,a=e;do{if(r.Dom.isText(o)||r.Dom.isTag(o,i.INSEPARABLE_TAGS))break;a=o,o=t?o.firstChild:o.lastChild}while(o);if(!o){let e=this.j.createInside.text(i.INVISIBLE_SPACE);r.Dom.isTag(a,i.INSEPARABLE_TAGS)?o=a:(r.Dom.append(a,e),a=e)}let l=o||a;return r.Dom.isTag(l,i.INSEPARABLE_TAGS)?t||r.Dom.isTag(l,"br")?n.setStartBefore(l):n.setEndAfter(l):n.selectNodeContents(l),n.collapse(t),this.selectRange(n),a}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,n=!0){let i=this.sel;if(n&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),i){if(i.removeAllRanges(),e.forEach(e=>i.addRange(e)),t&&1===e.length){let t=e[0];i.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}else if(1===e.length&&!this.__nativeRangeCount()&&(0,a.isFunction)(i.setBaseAndExtent)){let t=e[0];i.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let n=!t&&this.__closestNotEditable(e)||e,i=this.createRange();return i[t||n===this.area?"selectNodeContents":"selectNode"](n),this.selectRange(i)}__closestNotEditable(e){let{area:t}=this,n=null,i=e.parentNode;for(;i&&i!==t&&t.contains(i);){if(r.Dom.isElement(i)){let e=i.getAttribute("contenteditable");if("true"===e)break;"false"===e&&(n=i)}i=i.parentNode}return n}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>r.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(r.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){var t,n,i,o;let{endContainer:s,endOffset:a}=e;r.Dom.isText(s)&&a>0&&a<(null!=(n=null==(t=s.nodeValue)?void 0:t.length)?n:0)&&s.splitText(a);let{startContainer:l,startOffset:c}=e;if(r.Dom.isText(l)&&c>0&&c<(null!=(o=null==(i=l.nodeValue)?void 0:i.length)?o:0)){let t=l.splitText(c);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){var n,i;let o=t?e.startContainer:e.endContainer;if(!r.Dom.isText(o))return;let s=t?e.startOffset:e.endOffset,a=null!=(i=null==(n=o.nodeValue)?void 0:n.length)?i:0;0===s?t?e.setStartBefore(o):e.setEndBefore(o):s>=a&&(t?e.setStartAfter(o):e.setEndAfter(o))}__collectContainedNodes(e,t,n=this.createRange()){let i=[];return(0,s.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,n)?i.push(e):e.childNodes.length&&t.intersectsNode(e)&&i.push(...this.__collectContainedNodes(e,t,n))}),i}__isFullyContained(e,t,n){return n.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,n)&&e.compareBoundaryPoints(Range.END_TO_END,n)>=0}__wrapSelectionRuns(e){let t=[],n=[],i=()=>{n.length&&(t.push(this.__wrapRunInFont(n)),n=[])};return e.forEach(e=>{r.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(i(),t.push(...this.__wrapSelectionRuns((0,s.toArray)(e.childNodes)))):(n.length&&n[n.length-1].parentNode!==e.parentNode&&i(),n.push(e))}),i(),t}__isOrContainsBlock(e){return!!r.Dom.isBlock(e)||(0,s.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[n]=e;return r.Dom.before(n,t),e.forEach(e=>r.Dom.append(t,e)),t}*wrapInTagGen(e){var t;if((null==(t=this.sel)?void 0:t.rangeCount)&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",i.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&r.Dom.append(t,e[0]);try{yield t}finally{r.Dom.unwrap(t)}return}let n=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of n){if(this.j.isInDestruct||!r.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:n}=e;if(t&&t===n&&(0,a.isMarker)(t)){r.Dom.unwrap(e);continue}t&&(0,a.isMarker)(t)&&r.Dom.before(e,t),n&&(0,a.isMarker)(n)&&r.Dom.after(e,n),yield e,r.Dom.unwrap(e)}}finally{n.forEach(e=>r.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let n of this.wrapInTagGen())try{if(n.firstChild&&n.firstChild===n.lastChild&&(0,a.isMarker)(n.firstChild))continue;(0,a.isFunction)(e)?e(n):t.push(r.Dom.replace(n,e,this.j.createInside))}finally{let e=n.parentNode;e&&(r.Dom.unwrap(n),r.Dom.isEmpty(e)&&r.Dom.unwrap(e))}return t}commitStyle(e){(0,c.assert)((0,s.size)(e)>0,"Need to pass at least one option"),new d.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!r.Dom.isOrContains(this.area,e,!0)||!r.Dom.isOrContains(e,this.range.startContainer)||t&&!r.Dom.isOrContains(e,t,!0))return null;let n=this.createRange(),o=this.range;n.setStartBefore(e);let s=this.cursorOnTheRight(e,t),a=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),u=this.j.createInside.fake(),d=u.cloneNode();try{if(s||a){t?r.Dom.before(t,l):r.Dom.safeInsertNode(o,l);let e=(e,t)=>{let n=t(e);for(;n;){let e=t(n);if(n&&(r.Dom.isTag(n,"br")||r.Dom.isEmptyTextNode(n)))r.Dom.safeRemove(n);else break;n=e}};e(l,e=>e.nextSibling),e(l,e=>e.previousSibling),r.Dom.after(l,d),r.Dom.before(l,u),s?(n.setEndBefore(l),o.setEndBefore(l)):(n.setEndAfter(l),o.setEndAfter(l))}else n.setEnd(o.startContainer,o.startOffset);let h=n.extractContents(),p=e=>r.Dom.each(e,e=>r.Dom.isEmptyTextNode(e)&&r.Dom.safeRemove(e));(0,c.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),r.Dom.before(e,h),!t&&s&&(null==l?void 0:l.parentNode)){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!i.IS_PROD)throw e}let f=e=>{let t=null==e?void 0:e.parentNode;t&&t.firstChild===t.lastChild&&r.Dom.append(t,l.cloneNode())};f(u),f(d)}finally{r.Dom.safeRemove(u),r.Dom.safeRemove(d)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!r.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let n=t=>{let n=this.j.createInside.fake(),i=e.cloneRange();return i.collapse(t),r.Dom.safeInsertNode(i,n),(0,u.moveTheNodeAlongTheEdgeOutward)(n,t,this.j.editor),n},i=n(!0),o=n(!1);t.setStartAfter(i),t.setEndBefore(o);let a=r.Dom.findSibling(i,!1),l=r.Dom.findSibling(o,!0);if(a!==l){let e=r.Dom.isElement(a)&&r.Dom.isOrContains(a,o),n=!e&&r.Dom.isElement(l)&&r.Dom.isOrContains(l,i);if(e||n){let n=e?a:l,s=n;for(;r.Dom.isElement(n);)(n=e?n.firstElementChild:n.lastElementChild)&&(e?r.Dom.isOrContains(n,o):r.Dom.isOrContains(n,i))&&(s=n);e?t.setStart(s,0):t.setEnd(s,s.childNodes.length)}}if(r.Dom.safeRemove(i,o),t.collapsed)throw(0,s.error)("Selection is collapsed");return t}constructor(e){this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}p([o.autobind],f.prototype,"createRange",null),p([o.autobind],f.prototype,"focus",null),p([o.autobind],f.prototype,"setCursorAfter",null),p([o.autobind],f.prototype,"setCursorBefore",null),p([o.autobind],f.prototype,"setCursorIn",null)},32526:function(e,t,n){n.d(t,{extractSelectedPart:function(){return s}});var i=n(2748),o=n(78116),r=n(37790);function s(e,t,n){let i=n.s.createRange(),r=(0,o.isMarker)(t.previousSibling)?t.previousSibling:t;i.setStartBefore(e),i.setEndBefore(r),a(e,i,!0);let s=(0,o.isMarker)(t.nextSibling)?t.nextSibling:t;i.setStartAfter(s),i.setEndAfter(e),a(e,i,!1)}function a(e,t,n){let o=t.extractContents();i.Dom.isEmpty(o)&&o.firstChild&&i.Dom.unwrap(o.firstChild),e.parentNode&&(0,r.call)(n?i.Dom.before:i.Dom.after,e,o)}},49996:function(e,t,n){n.d(t,{FiniteStateMachine:function(){return s}});var i=n(82758),o=n(70799),r=n(38837);class s{setState(e){(0,r.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let n=this.transitions[this.getState()][e];if(n){let e=n.call(this,t);return(0,r.assert)(e&&e!==t,"Action should return new value"),(0,r.assert)((0,o.isString)(e.next),"Value should contain the next state"),(0,r.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),i.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},23738:function(e,t,n){n.d(t,{getSuitChild:function(){return s}});var i=n(2748),o=n(29136),r=n(97380);function s(e,t){let{firstChild:n}=t;for(;n&&!(0,o.isNormalNode)(n);)if(!(n=n.nextSibling))return null;return n&&!i.Dom.next(n,o.isNormalNode,t)&&(0,r.isSuitElement)(e,n,!1)?n:null}},44602:function(e,t,n){n.d(t,{getSuitParent:function(){return function e(t,n,s){var a;let{parentNode:l}=n;return l===s||!i.Dom.isHTMLElement(l)||i.Dom.next(n,o.isNormalNode,l)||i.Dom.prev(n,o.isNormalNode,l)?null:t.isElementCommit&&t.elementIsBlock&&!i.Dom.isBlock(l)?e(t,l,s):i.Dom.isTag(l,"li")&&!t.isElementCommit&&(null==(a=t.options.attributes)?void 0:a.style)||(0,r.isSuitElement)(t,l,!1)&&(!i.Dom.isBlock(l)||t.elementIsBlock)?l:t.isElementCommit&&!i.Dom.isBlock(l)?e(t,l,s):null}}});var i=n(2748),o=n(29136),r=n(97380)},22030:function(e,t,n){n.d(t,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return u}});var i=n(82758),o=n(2748),r=n(86068),s=n(3760),a=n(38837),l=n(41180);function c(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(n=>{let i=(0,l.css)(e,n,!0);return""===i&&(""===t[n]||null==t[n])||!(0,r.isVoid)(i)&&""!==i&&!(0,r.isVoid)(t[n])&&(0,s.normalizeCssValue)(n,t[n]).toString().toLowerCase()===i.toString().toLowerCase()}))}if(i.globalDocument){let e=i.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(c(e,{fontSize:null}),"Style test"),(0,a.assert)(c(e,{fontSize:""}),"Style test")}function u(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(i.globalDocument){let e=i.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(u(e,{color:"red"}),"Style test"),(0,a.assert)(!u(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!u(e,{border:"1px solid #ccc"}),"Style test")}},63687:function(e,t,n){n.d(t,{FiniteStateMachine:function(){return o.FiniteStateMachine},WRAP_NODES:function(){return h.WRAP_NODES},extractSelectedPart:function(){return i.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return u.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return d.unwrapChildren},wrap:function(){return h.wrap}});var i=n(32526),o=n(49996),r=n(23738),s=n(44602);n(22030);var a=n(64291);n(29136),n(94466);var l=n(97380),c=n(20199);n(82515);var u=n(44253),d=n(75882),h=n(19263);n(6980)},64291:function(e,t,n){n.d(t,{isInsideInvisibleElement:function(){return o}});var i=n(2748);function o(e,t){return!!i.Dom.closest(e,["style","script"],t)}},29136:function(e,t,n){n.d(t,{isNormalNode:function(){return r}});var i=n(2748),o=n(78116);function r(e){return!!(e&&!i.Dom.isEmptyTextNode(e)&&!i.Dom.isTemporary(e)&&!(0,o.isMarker)(e))}},94466:function(e,t,n){n.d(t,{elementsEqualAttributes:function(){return c},isSameAttributes:function(){return l}});var i=n(21496),o=n(43555),r=n(38837),s=n(29960),a=n(22030);function l(e,t){return!(0,i.size)(t)||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(n=>{var i;if("class"===n||"className"===n)return(null!=(i=String(t[n]).match(/[^\t\n\f\r ]+/g))?i:[]).every(t=>e.classList.contains(t));if("style"===n)return(0,a.hasSameStyle)(e,t[n]);let r=t[n];return(0,o.attr)(e,n)===(null==r?r:String(r))}))}function c(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,s.attrRaw)(t,e.name)===e.value)}},97380:function(e,t,n){n.d(t,{isSuitElement:function(){return s},suitableClosest:function(){return a}});var i=n(2748),o=n(22030),r=n(29136);function s(e,t,n,a=!0){var l;if(!t||!(0,r.isNormalNode)(t))return!1;let{element:c,elementIsDefault:u,options:d}=e;if(i.Dom.isList(t)&&e.elementIsList)return!0;let h=i.Dom.isTag(t,c);return!!(h&&!(u&&n)||(null==(l=d.attributes)?void 0:l.style)&&(a?(0,o.hasSameStyle)(t,d.attributes.style):(0,o.hasSameStyleKeys)(t,d.attributes.style))&&!e.elementIsList)||!h&&!n&&u&&i.Dom.isInlineBlock(t)}function a(e,t,n){return i.Dom.closest(t,t=>s(e,t,!0,!1),n)}},20199:function(e,t,n){n.d(t,{toggleOrderedList:function(){return d}});var i=n(2748),o=n(21496),r=n(38837),s=n(32526),a=n(94466),l=n(44253),c=n(77361),u=n(82515);function d(e,t,n,r,s=!1){if(!t)return r;let f=t.parentElement;if(!f)return r;let m=n.e.fire(`${c._PREFIX}BeforeToggleList`,r,e,f);if(void 0!==m)return m;let g=n.e.fire.bind(n.e,`${c._PREFIX}AfterToggleList`);if("unwrap"!==r){let d="change"===(0,l.toggleAttributes)(e,t.parentElement,n,c.INITIAL,!0),m=i.Dom.isTag(f,e.element);if(m&&d&&r!==c.REPLACE&&function({options:{attributes:e}}){return!!(null==e?void 0:e.style)&&1===(0,o.size)(e)}(e)){let t;return(0,l.toggleAttributes)(e,f,n,"change"),g("change",(t=i.Dom.findSibling(f,!0),"change"===r&&i.Dom.isTag(t,e.element)&&(0,a.elementsEqualAttributes)(t,f)?(i.Dom.append(t,Array.from(f.childNodes)),i.Dom.safeRemove(f),t):f),e),"change"}if(m&&"change"===r)return"change";if(r===c.REPLACE||d||!m){let o;for(let r of s&&!m?Array.from(f.children).filter(e=>i.Dom.isLeaf(e)):[t])o=h(r,t=>(0,u.wrapList)(e,p(c.REPLACE,t,r,n,e),n));return g(c.REPLACE,o,e),c.REPLACE}}return g("unwrap",h(t,i=>p("unwrap",i,t,n,e)),e),"unwrap"}function h(e,t){let n=e.parentElement,o=e.nextElementSibling,r=i.Dom.isTag(n,"ol")?(parseInt(n.getAttribute("start")||"1",10)||1)+Array.from(n.children).indexOf(e):0,s=t(n),a=null==o?void 0:o.parentElement;return r&&i.Dom.isTag(a,"ol")&&(r>1?a.setAttribute("start",String(r)):a.removeAttribute("start")),s}function p(e,t,n,o,a){let l=o.e.fire(`${c._PREFIX}BeforeUnwrapList`,e,t,a);return l?((0,r.assert)(i.Dom.isHTMLElement(l),`${c._PREFIX}BeforeUnwrapList hook must return HTMLElement`),l):((0,s.extractSelectedPart)(t,n,o),(0,r.assert)(i.Dom.isHTMLElement(n.parentElement),"Element should be inside the list"),i.Dom.unwrap(n.parentElement),e===c.REPLACE)?n:i.Dom.replace(n,"br"!==o.o.enter.toLowerCase()?o.o.enter:o.createInside.fragment(),o.createInside)}},82515:function(e,t,n){n.d(t,{wrapList:function(){return a}});var i=n(2748),o=n(94466),r=n(44253),s=n(77361);function a(e,t,n){let a=n.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e),l=null!=a?a:i.Dom.replace(t,"li",n.createInside),c=l.previousElementSibling,u=l.nextElementSibling,d=i.Dom.isTag(c,e.element)?c:null;return null!=d||(d=i.Dom.isTag(u,e.element)?u:null),i.Dom.isList(d)&&(0,o.isSameAttributes)(d,e.options.attributes)||(d=n.createInside.element(e.element),(0,r.toggleAttributes)(e,d,n,s.INITIAL),i.Dom.before(l,d)),c===d?i.Dom.append(d,l):i.Dom.prepend(d,l),i.Dom.isTag(d.nextElementSibling,e.element)&&(0,o.elementsEqualAttributes)(d,d.nextElementSibling)&&(i.Dom.append(d,Array.from(d.nextElementSibling.childNodes)),i.Dom.safeRemove(d.nextElementSibling)),n.e.fire(`${s._PREFIX}AfterWrapList`,"wrap",d,e),d}},44253:function(e,t,n){n.d(t,{toggleAttributes:function(){return f}});var i=n(82758),o=n(2748),r=n(580),s=n(27613),a=n(3760),l=n(21496),c=n(43555),u=n(41180),d=n(86583),h=n(77361);let p="toggleAttributes";function f(e,t,n,m,g=!1){var b;if(!g&&e.isApplied(t,p))return m;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,f;let b=v[e];switch(e){case"style":p=m,(0,c.assert)((0,s.isPlainObject)(b)&&(0,l.size)(b),"Style must be an object"),Object.keys(b).forEach(e=>{let s=(0,u.cssInline)(t,e),l=b[e];if(""!==s||null!=l){let h,f,m,b;if(null==l||""===l){s&&(g||(0,u.css)(t,e,null),p="change");return}if(h=function(e){var t;if(void 0!==(0,d.dataBind)(e,"shadowRoot"))return(0,d.dataBind)(e,"shadowRoot");let n=(0,r.getContainer)(e),s=i.globalDocument.createElement("iframe");(0,u.css)(s,{width:0,height:0,position:"absolute",border:0}),(0,c.attr)(s,"src","about:blank"),o.Dom.append(n,s);let a=null==(t=s.contentWindow)?void 0:t.document,l=a?a.body:e.od.body;return(0,d.dataBind)(e,"shadowRoot",l),l}(n),f=n.create.element("div"),(0,u.css)(f,"color",(0,u.css)(n.editor,"color")),m=n.create.element(t.tagName.toLowerCase()),(0,c.attr)(m,"style",(0,c.attr)(t,"style")),o.Dom.append(f,m),o.Dom.append(h,f),b=(0,u.css)(m,e),o.Dom.safeRemove(f),b===(0,a.normalizeCssValue)(e,l)){if(!s)return;g||(0,u.css)(t,e,null),p="unset";return}p="change",g||(0,u.css)(t,e,l)}}),m=p;break;case"className":case"class":m=function(e,t,n,i,o){var r;(0,c.assert)((0,s.isString)(t),"Class name must be a string");let a=null!=(r=t.match(/[^\t\n\f\r ]+/g))?r:[];if(!a.length)return i;let l=e.e.fire.bind(e.e,`${h._PREFIX}AfterToggleAttribute`);return a.every(e=>n.classList.contains(e))?(i="unset",o||(n.classList.remove(...a),0===n.classList.length&&(0,c.attr)(n,"class",null),l(i,n,"class",(0,c.attr)(n,"class")))):(i="change",o||(n.classList.add(...a),l(i,n,"class",t))),i}(n,b,t,m,g);break;default:let y;f=m,(0,c.assert)((0,s.isString)(b)||(0,s.isNumber)(b)||(0,s.isBoolean)(b)||null==b,"Attribute value must be a string or number or boolean or null"),y=n.e.fire.bind(n.e,`${h._PREFIX}AfterToggleAttribute`),(0,c.attr)(t,e)===(null==b?b:String(b))?(g||(0,c.attr)(t,e,null),f="unset",g||y(f,t,e,b)):(f="change",g||((0,c.attr)(t,e,b),y(f,t,e,b))),m=f}}),!g&&(null==v?void 0:v.style)?(b=m,!(0,c.attr)(t,"style")&&((0,c.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(o.Dom.unwrap(t),b="unwrap")),b):m}},75882:function(e,t,n){n.d(t,{unwrapChildren:function(){return a}});var i=n(2748),o=n(43555),r=n(22030),s=n(97380);function a(e,t){var n;let a,l=[],c=[],u=null==(n=e.options.attributes)?void 0:n.style,d=Object.keys(null!=u?u:{}),h={};d.forEach(e=>{h[e]=null});let p=t=>{(0,o.css)(t,h),(0,o.attr)(t,"style")||(0,o.attr)(t,"style",null),!t.attributes.length&&i.Dom.isTag(t,e.element)&&l.push(t)};for(let n of i.Dom.eachGen(t))i.Dom.isContentEditable(n,t)&&((0,s.isSuitElement)(e,n,!0)&&(!u||(0,r.hasSameStyleKeys)(n,u))?(void 0===a&&(a=!0),u?c.push(()=>p(n)):l.push(n)):u&&i.Dom.isHTMLElement(n)&&d.some(e=>""!==(0,o.css)(n,e,!0))?(void 0===a&&(a=!1),c.push(()=>p(n))):i.Dom.isEmptyTextNode(n)||void 0!==a||(a=!1));return c.forEach(e=>e()),l.forEach(i.Dom.unwrap),!!a}},6980:function(e,t,n){n.d(t,{wrapUnwrappedText:function(){return r}});var i=n(2748),o=n(78116);function r(e,t,n){let r=n.editor,s=n.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,o.isMarker)(a)&&!i.Dom.isTag(a,n.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!i.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!i.Dom.isBlock(a)););return s},l=a(t),c=a(t,"nextSibling"),u=n.s.createRange();u.setStartBefore(l),u.setEndAfter(c);let d=u.extractContents(),h=s.element(e.element);return i.Dom.append(h,d),i.Dom.safeInsertNode(u,h),e.elementIsBlock&&i.Dom.isEmpty(h)&&!h.querySelector("br")&&i.Dom.append(h,s.element("br")),h}},19263:function(e,t,n){n.d(t,{wrap:function(){return l}});var i=n(22732),o=n(29960),r=n(41180),s=n(82515),a=n(6980);function l(e,t,n){var l,u,d;let h=(l=e,u=t,d=n,l.elementIsBlock?i.Dom.up(u,e=>i.Dom.isBlock(e)&&!i.Dom.isTag(e,c)&&!Array.from(e.childNodes).some(e=>i.Dom.isBlock(e)),d.editor)||(0,a.wrapUnwrappedText)(l,u,d):((0,o.attr)(u,"size",null),u));if(e.elementIsList)return(0,s.wrapList)(e,h,n);let p=i.Dom.replace(h,e.element,n.createInside,!0);return e.elementIsBlock&&((0,r.css)(p,"fontSize",null),(0,r.css)(p,"fontWeight",null),(0,o.attr)(p,"style")||(0,o.attr)(p,"style",null)),p}let c=new Set(["td","th","tr","tbody","table","li","ul","ol"]);n.d(t,["WRAP_NODES",0,c])},83632:function(e,t,n){n.d(t,{ApplyStyle:function(){return l}});var i=n(2748),o=n(76078),r=n(63687),s=n(77361),a=n(55307);function l(e,t){var n,l;let{s:c,editor:u}=e;null==(n=u.firstChild)||n.normalize();let d=c.fakes(),h=c.isCollapsed(),p=s.INITIAL;try{for(let n of c.wrapInTagGen(d)){(null==(l=t.options.exclude)?void 0:l.length)&&function(e,t,n){let s=e.s.createRange(),a=i.Dom.closest(t.parentNode,n,e.editor);for(;a;){s.selectNodeContents(a),s.setEndBefore(t);let o=s.cloneContents();s.selectNodeContents(a),s.setStartAfter(t),i.Dom.isEmpty(o)&&i.Dom.isEmpty(s.cloneContents())||(0,r.extractSelectedPart)(a,t,e),i.Dom.unwrap(a),a=i.Dom.closest(t.parentNode,n,e.editor)}(0,o.$$)(n.join(","),t).forEach(e=>i.Dom.unwrap(e))}(e,n,t.options.exclude);let s={collapsed:h,mode:p,element:n,next:a.states.START,jodit:e,style:t},c=new r.FiniteStateMachine(a.states.START,a.transactions);for(;!e.isInDestruct&&c.getState()!==a.states.END;)s=c.dispatch("exec",s);p=s.mode}}finally{c.restoreFakes(d)}}},25639:function(e,t,n){n.d(t,{CommitStyle:function(){return a}});var i=n(82758),o=n(87058),r=n(77361),s=n(83632);class a{isApplied(e,t){let n=this.__applyMap.get(e);return!!n&&!!n[t]}setApplied(e,t){var n;let i=null!=(n=this.__applyMap.get(e))?n:{};i[t]=!0,this.__applyMap.set(e,i)}get elementIsList(){return!!(this.options.element&&i.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&i.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(e){let{hooks:t}=this.options,n=t?Object.keys(t):[];try{n.forEach(n=>{e.e.on((0,o.camelCase)(r._PREFIX+"_"+n),t[n])}),(0,s.ApplyStyle)(e,this)}finally{n.forEach(n=>{e.e.off((0,o.camelCase)(r._PREFIX+"_"+n),t[n])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){this.options=e,this.__applyMap=new WeakMap}}},77361:function(e,t,n){n.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},55307:function(e,t,n){var i=n(82758),o=n(2748),r=n(38837),s=n(63687),a=n(77361);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}let u={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},d={[u.START]:{exec(e){let{element:t,jodit:n,style:i,mode:r,collapsed:a}=e;if(!o.Dom.isContentEditable(t,n.editor)||(0,s.isInsideInvisibleElement)(t,n.editor)||!a&&o.Dom.isEmptyContent(t))return c(l({},e),{next:u.END});let d=(0,s.getSuitParent)(i,t,n.editor)||(0,s.getSuitChild)(i,t);if(d)return c(l({},e),{next:u.ELEMENT,element:d});let h=(0,s.suitableClosest)(i,t,n.editor);return i.elementIsList&&o.Dom.isList(h)?c(l({},e),{next:u.LIST}):h?c(l({},e),{next:u.EXTRACT}):c(l({},e),{next:"unwrap"!==r?u.UNWRAP_CHILDREN:u.END})}},[u.LIST]:{exec(e){let{element:t,jodit:n,mode:r}=e;if(r!==a.INITIAL&&"unwrap"!==r&&r!==a.REPLACE&&"change"!==r)return c(l({},e),{next:u.END});let s=o.Dom.closest(t,"li",n.editor);return s&&o.Dom.closest(t,i.LIST_TAGS,n.editor)?c(l({},e),{element:s,next:u.TOGGLE_LIST}):c(l({},e),{next:u.END})}},[u.TOGGLE_LIST]:{exec(e){return c(l({},e),{mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode,e.collapsed),next:u.END})}},[u.EXTRACT]:{exec(e){var t;let{element:n,jodit:i,style:a}=e,d=(0,s.suitableClosest)(a,n,i.editor);return((0,r.assert)(d,"This place should have an element"),!a.elementIsBlock&&(null==(t=a.options.attributes)?void 0:t.style)&&o.Dom.isBlock(d))?c(l({},e),{next:u.WRAP}):(a.elementIsBlock||(0,s.extractSelectedPart)(d,n,i),c(l({},e),{element:d,next:u.ELEMENT}))}},[u.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:n}=e;return(0,s.unwrapChildren)(n,t)?c(l({},e),{mode:"unwrap",next:u.END}):c(l({},e),{next:u.WRAP})}},[u.WRAP]:{exec(e){let{element:t,jodit:n,style:i}=e,o=(0,s.wrap)(i,t,n);return c(l({},e),{next:i.elementIsList?u.END:u.CHANGE,mode:"wrap",element:o})}},[u.ELEMENT]:{exec(e){let{style:t,element:n,jodit:i}=e;return(0,s.toggleAttributes)(t,n,i,a.INITIAL,!0)!==a.INITIAL?c(l({},e),{next:u.CHANGE}):o.Dom.isTag(n,t.element)?c(l({},e),{next:u.UNWRAP}):c(l({},e),{next:u.END})}},[u.CHANGE]:{exec(e){let{style:t,element:n,jodit:i,mode:r}=e,a=(0,s.toggleAttributes)(t,n,i,e.mode);return"wrap"!==r&&"unset"===a&&!n.attributes.length&&o.Dom.isTag(n,t.element)?c(l({},e),{next:u.UNWRAP}):c(l({},e),{mode:a,next:u.END})}},[u.UNWRAP]:{exec(e){let{element:t,style:n,jodit:i}=e;if(t.attributes.length&&o.Dom.isTag(t,n.element))return c(l({},e),{next:u.REPLACE_DEFAULT});let r=t.parentElement;return n.elementIsBlock&&!n.elementIsDefault&&r&&r!==i.editor&&o.Dom.isBlock(r)&&!o.Dom.isTag(r,s.WRAP_NODES)?c(l({},e),{next:u.REPLACE_DEFAULT}):(o.Dom.unwrap(t),c(l({},e),{mode:"unwrap",next:u.END}))}},[u.REPLACE_DEFAULT]:{exec(e){return o.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),c(l({},e),{mode:a.REPLACE,next:u.END})}},[u.END]:{exec(e){return e}}};n.d(t,["states",0,u,"transactions",0,d])},97333:function(e,t,n){n.d(t,{AsyncStorage:function(){return c}});var i=n(87058),o=n(2621),r=n(65638),s=n(21162);function a(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function l(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function s(e){a(r,i,o,s,l,"next",e)}function l(e){a(r,i,o,s,l,"throw",e)}s(void 0)})}}class c{set(e,t){return l(function*(){let n=yield this.provider;return yield n.set((0,i.camelCase)(this.prefix+e),t),this}).call(this)}delete(e){return l(function*(){let t=yield this.provider;return yield t.delete((0,i.camelCase)(this.prefix+e)),this}).call(this)}get(e){return l(function*(){return(yield this.provider).get((0,i.camelCase)(this.prefix+e))}).call(this)}exists(e){return l(function*(){return(yield this.provider).exists((0,i.camelCase)(this.prefix+e))}).call(this)}clear(){return l(function*(){let e=yield this.provider;return yield e.clear(),this}).call(this)}close(){return l(function*(){let e=yield this.provider;"close"in e&&"function"==typeof e.close&&(yield e.close())}).call(this)}static makeStorage(e=!1,t,n){let i,a=null==n?void 0:n.defaultProvider;return null!=a?new c(Promise.resolve(i="local"===a?(0,r.canUsePersistentStorage)("localStorage")?new r.LocalStorageProvider("Jodit_"+(t||"")):new s.MemoryStorageProvider:"memory"===a?new s.MemoryStorageProvider:a),t):("localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(i=new r.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(i=(0,o.canUseIndexedDB)().then(e=>e?new o.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new s.MemoryStorageProvider)),i||(i=new s.MemoryStorageProvider),new c(Promise.resolve(i),t))}constructor(e,t){this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},2621:function(e,t,n){n.d(t,{IndexedDBProvider:function(){return s},canUseIndexedDB:function(){return c},clearUseIndexedDBCache:function(){return l}});var i=n(82758);function o(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function r(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function a(e){o(s,i,r,a,l,"next",e)}function l(e){o(s,i,r,a,l,"throw",e)}a(void 0)})}}class s{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let n=indexedDB.open(this.dbName,this.DB_VERSION);n.onerror=()=>{t(n.error)},n.onsuccess=()=>{e(n.result)},n.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}performTransaction(e,t){return r(function*(){try{let n=(yield this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),i=t(n);return new Promise((e,t)=>{i.onsuccess=()=>{e(i.result)},i.onerror=()=>{t(i.error)}})}catch(e){return Promise.reject(e)}}).call(this)}set(e,t){return r(function*(){try{yield this.performTransaction("readwrite",n=>n.put(t,e))}catch(e){i.IS_PROD}return this}).call(this)}delete(e){return r(function*(){try{yield this.performTransaction("readwrite",t=>t.delete(e))}catch(e){}return this}).call(this)}get(e){return r(function*(){try{return yield this.performTransaction("readonly",t=>t.get(e))}catch(e){return}}).call(this)}exists(e){return r(function*(){try{let t=yield this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch(e){return!1}}).call(this)}clear(){return r(function*(){try{yield this.performTransaction("readwrite",e=>e.clear())}catch(e){}return this}).call(this)}close(){return r(function*(){if(this.dbPromise){try{(yield this.dbPromise).close()}catch(e){}this.dbPromise=null}}).call(this)}keys(){return r(function*(){try{let e=yield this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=yield e),e.map(e=>String(e))}catch(e){return[]}}).call(this)}values(){return r(function*(){try{let e=yield this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=yield e),e}catch(e){return[]}}).call(this)}entries(){return r(function*(){try{let[e,t]=yield Promise.all([this.keys(),this.values()]);return e.map((e,n)=>[e,t[n]])}catch(e){return[]}}).call(this)}constructor(e="JoditDB",t="keyValueStore"){this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let a=null;function l(){a=null}function c(){return r(function*(){if(null!=a)return a;try{if("u"<typeof indexedDB)return a=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return a=yield new Promise(n=>{t.onerror=()=>{n(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),n(!0)}})}catch(e){return a=!1,!1}})()}},65638:function(e,t,n){n.d(t,{LocalStorageProvider:function(){return i}});class i{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let n=this.storage.getItem(this.rootKey),i=n?JSON.parse(n):{};i[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(i))}catch(e){}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let n=JSON.parse(t);delete n[e],this.storage.setItem(this.rootKey,JSON.stringify(n))}}catch(e){}return this}get(e){try{let t=this.storage.getItem(this.rootKey),n=t?JSON.parse(t):{};return void 0!==n[e]?n[e]:void 0}catch(e){}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch(e){}return this}constructor(e,t="localStorage"){this.rootKey=e,this.strategy=t}}n.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let n="___Jodit___"+Math.random().toString(),i="sessionStorage"===e?sessionStorage:localStorage;try{i.setItem(n,"1");let o="1"===i.getItem(n);return i.removeItem(n),t.set(e,o),o}catch(e){}return t.set(e,!1),!1}])},21162:function(e,t,n){n.d(t,{MemoryStorageProvider:function(){return i}});class i{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){this.data=new Map}}},12081:function(e,t,n){n.d(t,{AsyncStorage:function(){return i.AsyncStorage},IndexedDBProvider:function(){return o.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return o.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return o.clearUseIndexedDBCache}});var i=n(97333),o=n(2621),r=n(65638),s=n(21162),a=n(6700)},6700:function(e,t,n){n.d(t,{Storage:function(){return a}});var i=n(87058),o=n(65638),r=n(21162);let s="Jodit_";class a{set(e,t){return this.provider.set((0,i.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,i.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,i.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,i.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let n;return"localStorage"===e||"sessionStorage"===e?(0,o.canUsePersistentStorage)(e)&&(n=new o.LocalStorageProvider(s+(t||""),e)):!0===e&&(0,o.canUsePersistentStorage)("localStorage")&&(n=new o.LocalStorageProvider(s+(t||""))),n||(n=new r.MemoryStorageProvider),new a(n,t)}constructor(e,t){this.provider=e,this.prefix=s,t&&(this.prefix+=t)}}},70231:function(e,t,n){n.d(t,{Dlgs:function(){return a}});var i=n(580),o=n(27613),r=n(37790),s=n(638);class a{dlg(e){let t=(0,i.getPopupViewRoot)(this.o,this.container,this.od.body),n=new s.Dialog(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize},e));return(0,r.markOwner)(this,n.container),n.parent=this,n.bindDestruct(this)}confirm(e,t,n){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,n)}prompt(e,t,n,i,o){return e=l(e,this),t=l(t,this),i=l(i,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,n,i,o)}alert(e,t,n,i){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,n,i)}}function l(e,t){return(0,o.isString)(e)&&!(0,o.isHTML)(e)&&(e=t.i18n(e)),e}},14316:function(e,t,n){n.d(t,{Elms:function(){return o}});var i=n(2748);class o{getElm(e){let t=this.getFullElName(e);return i.Dom.first(this.container,e=>i.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),n=[];return i.Dom.each(this.container,e=>{i.Dom.isHTMLElement(e)&&e.classList.contains(t)&&n.push(e)}),n}}},34176:function(e,t,n){n.d(t,{Mods:function(){return o}});var i=n(86068);class o{afterSetMod(e,t){}setMod(e,t,n){e=e.toLowerCase();let o=this.mods[e];if(o===t)return this;let r=`${this.componentName}_${e}_`,s=(n||this.container).classList;return null!=o&&s.remove(`${r}${o.toString().toLowerCase()}`),(0,i.isVoid)(t)||""===t||s.add(`${r}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){var t;return null!=(t=this.mods[e])?t:null}}},10830:function(e,t,n){n.d(t,{Button:function(){return b},UIButton:function(){return g}});var i=n(78213),o=n(33433),r=n(87325),s=n(37133),a=n(2748),l=n(23282),c=n(70799),u=n(38837),d=n(29960),h=n(48538),p=n(12153),f=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let m=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0}),g=class e extends h.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,u.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,u.assert)(e,"Icon element not found"),e}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,d.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,d.attr)(this.container,"role",this.state.role)}updateSize(){let e=(0,r.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,d.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,d.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,d.attr)(this.container,"data-ref",this.state.name),(0,d.attr)(this.container,"ref",this.state.name),this.updateAriaLabel()}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,d.attr)(this.container,"title",e),(0,d.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):!e&&this.state.name?this.state.name:null;(0,d.attr)(this.container,"aria-label",t),(0,d.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,d.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,l.isFunction)(e)&&e(this.state.name))return;a.Dom.detach(this.icon);let t=p.Icon.makeIcon(this.j,this.state.icon);t&&a.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&a.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),n=this.j.c.span(e+"__icon"),i=this.j.c.span(e+"__text");return a.Dom.append(t,n),a.Dom.append(t,i),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),this.isButton=!0,this.state=m(),this.actionHandlers=[],this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(i.STATUSES.ready,()=>{this.setState(t)})}};function b(e,t,n,i){let o=new g(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,c.isString)(t)?(o.state.icon.name=t,o.state.name=t,i&&(o.state.variant=i),n&&(o.state.text=n)):o.setState(t),o}f([o.cache],g.prototype,"text",null),f([o.cache],g.prototype,"icon",null),f([(0,s.watch)("state.size",{immediately:!1})],g.prototype,"onChangeSize",null),f([(0,s.watch)("state.type",{immediately:!1})],g.prototype,"onChangeType",null),f([(0,s.watch)("state.role",{immediately:!1})],g.prototype,"onChangeRole",null),f([(0,s.watch)("parentElement")],g.prototype,"updateSize",null),f([(0,s.watch)("state.variant",{immediately:!1})],g.prototype,"onChangeStatus",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeText",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeTextSetMode",null),f([(0,s.watch)("state.disabled")],g.prototype,"onChangeDisabled",null),f([(0,s.watch)("state.activated")],g.prototype,"onChangeActivated",null),f([(0,s.watch)("state.name",{immediately:!1})],g.prototype,"onChangeName",null),f([(0,s.watch)("state.tooltip",{immediately:!1})],g.prototype,"onChangeTooltip",null),f([(0,s.watch)("state.tabIndex",{immediately:!1})],g.prototype,"onChangeTabIndex",null),f([(0,s.watch)("state.icon",{immediately:!1})],g.prototype,"onChangeIcon",null),f([o.cacheHTML],g.prototype,"createContainer",null),f([(0,s.watch)("button:click")],g.prototype,"__onActionFire",null),g=f([r.component],g),n.d(t,["UIButtonState",0,m])},71916:function(e,t,n){n.d(t,{UIButtonGroup:function(){return l}});var i=n(87325),o=n(2748),r=n(38837),s=n(10830),a=n(62405);let l=class e extends a.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
9
9
  <div class="&__label">~${e.label}~</div>
10
10
  <div class="&__options"></div>
11
11
  </div>`}appendChildToContainer(e){let t=this.getElm("options");(0,r.assert)(null!=t,"Options does not exist"),o.Dom.append(t,e)}select(e){var t,n;this.elements.forEach((t,n)=>{n===e||t.state.value===e?t.state.activated=!0:this.options.radio&&(t.state.activated=!1)});let i=this.elements.filter(e=>e.state.activated).map(e=>({text:e.state.text,value:e.state.value}));this.jodit.e.fire(this,"select",i),null==(n=(t=this.options).onChange)||n.call(t,i)}constructor(e,t={radio:!0}){var n,i;super(e,null==(n=t.options)?void 0:n.map(t=>{let n=new s.UIButton(e,{text:t.text,value:t.value,variant:"primary"});return n.onAction(()=>{this.select(t.value)}),n}),t),this.options=t,this.select(null!=(i=t.value)?i:0)}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],l)},62843:function(e,t,n){n.d(t,{Button:function(){return i.Button},UIButton:function(){return i.UIButton},UIButtonGroup:function(){return o.UIButtonGroup},UIButtonState:function(){return i.UIButtonState},UITooltip:function(){return r.UITooltip}});var i=n(10830),o=n(71916),r=n(57340)},57340:function(e,t,n){n.d(t,{UITooltip:function(){return m}});var i,o=n(91907),r=n(65478),s=n(22732),a=n(580),l=n(35224),c=n(5700),u=n(43555),d=n(48538),h=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let p=["scroll.tooltip","joditCloseDialog","mouseleave.tooltip"],f=["escape.tooltip","change.tooltip","changePlace.tooltip","afterOpenPopup.tooltip","hidePopup.tooltip","beforePopupClose.tooltip","closeAllPopups.tooltip"],m=i=class e extends d.UIElement{className(){return"UITooltip"}render(){return'<div><div class="&__content"></div></div>'}get __isEnabled(){let{o:e}=this.j;return!e.textIcons&&!!e.showTooltip&&!e.useNativeTooltip}attach(e){this.__isEnabled&&this.__onAttach(e)}__onAttach(e){s.Dom.append((0,a.getContainer)(this.j,i),this.container),this.__attachedContainers.add(e),this.__attachedContainers.add(this.j.container),this.j.e.on(e,"mouseenter.tooltip",this.__onMouseEnter,{capture:!0}).on(e,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0}).on(this.j.container,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0})}__addListenersOnEnter(){if(this.__listenClose)return;this.__listenClose=!0;let e=this.j;e.e.on(e.ow,p,this.__hide).on(f,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let e=this.j;e.e.off(e.ow,p,this.__hide).off(f,this.__hide)}__onMouseLeave(e){this.__currentTarget===e.target&&(this.__hideDelay(),this.__currentTarget=null)}__onMouseEnter(e){if(!s.Dom.isHTMLElement(e.target))return;let t=(0,u.attr)(e.target,"aria-label");if(!t||(0,u.attr)(e.target,"disabled")||!e.target.className.includes("jodit")||"dialog"===(0,u.attr)(e.target,"role")||s.Dom.isTag(e.target,"input")&&"file"===e.target.type)return;this.__currentTarget=e.target;let n=e.target;this.__open(()=>{let e=(0,c.position)(n);return{x:e.left+e.width/2,y:e.top+e.height}},t)}__open(e,t){this.__addListenersOnEnter(),this.__isOpened=!0,this.j.async.clearTimeout(this.__hideTimeout),this.j.async.clearTimeout(this.__delayShowTimeout);let n=this.j.o.showTooltipDelay||this.j.defaultTimeout;n?this.__delayShowTimeout=this.j.async.setTimeout(()=>this.__show(e,t),n):this.__show(e,t)}__show(e,t){this.setMod("visible",!0),this.setMod("above",!1),this.getElm("content").innerHTML=t;let n=e(),i=(0,l.getFixedPositionOffset)(this.container);(0,u.css)(this.container,{left:n.x-i.x,top:n.y-i.y});let o=(0,c.position)(this.container),r=this.j.ow.innerHeight;if(o.top+o.height>r){let e=(0,c.position)(this.__currentTarget);this.setMod("above",!0),(0,u.css)(this.container,{top:e.top-o.height-i.y})}}__hide(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__removeListenersOnLeave(),this.__isOpened&&(this.__isOpened=!1,this.setMod("visible",!1),s.Dom.detach(this.getElm("content")),(0,u.css)(this.container,{left:-5e3}))}__hideDelay(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__isOpened&&(this.__hideTimeout=this.async.setTimeout(this.__hide,this.j.defaultTimeout))}destruct(){this.__attachedContainers.forEach(e=>{this.j.e.off(e,"mouseenter.tooltip",this.__onMouseEnter).off(e,"mouseleave.tooltip",this.__onMouseLeave)}),this.__hide(),super.destruct()}constructor(e){super(e),this.__isOpened=!1,this.__attachedContainers=new Set,this.__listenClose=!1,this.__currentTarget=null,this.__delayShowTimeout=0,this.__hideTimeout=0,this.__isEnabled&&(this.j.e.on("getContainer",e=>{this.__onAttach(e)}),e.hookStatus(o.STATUSES.ready,()=>{this.__onAttach(this.j.container)}))}};h([r.autobind],m.prototype,"__onMouseLeave",null),h([r.autobind],m.prototype,"__onMouseEnter",null),h([r.autobind],m.prototype,"__hide",null),h([r.autobind],m.prototype,"__hideDelay",null),m=i=h([r.component],m)},48538:function(e,t,n){n.d(t,{UIElement:function(){return h}});var i,o=n(91907),r=n(55153),s=n(2748),a=n(70799),l=n(29960),c=n(14316),u=n(34176),d=n(12153);let h=i=class e extends o.ViewComponent{getRole(){var e;return(null==(e=this.options)?void 0:e.role)||""}get parentElement(){return this.__parentElement}set parentElement(e){this.__parentElement=e,e&&e.hookStatus("beforeDestruct",()=>this.destruct()),this.updateParentElement(this)}bubble(e){let t=this.parentElement;for(;t;)e(t),t=t.parentElement;return this}updateParentElement(e){var t;return null==(t=this.__parentElement)||t.updateParentElement(e),this}get(e,t){return super.get(e,t)||this.getElm(e)}closest(e){let t="object"==typeof e?t=>t===e:t=>o.Component.isInstanceOf(t,e),n=this.__parentElement;for(;n;){if(t(n))return n;n=!n.parentElement&&n.container.parentElement?i.closestElement(n.container.parentElement,i):n.parentElement}return null}static closestElement(e,t){let n=s.Dom.up(e,e=>{if(e){let{component:n}=e;return n&&o.Component.isInstanceOf(n,t)}return!1});return n?null==n?void 0:n.component:null}update(){}appendTo(e){return s.Dom.append(e,this.container),this}clearName(e){return e.replace(/[^a-zA-Z0-9]/g,"_")}render(e){return this.j.c.div(this.componentName)}createContainer(e){let t=this.render(e);if((0,a.isString)(t)){let e=this.parseTemplate(t);return e.classList.add(this.componentName),e}return t}parseTemplate(e){return this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,(e,t)=>d.Icon.get(t)||"").replace(/&_/g,this.componentName+"_").replace(/~([^~]+?)~/g,(e,t)=>this.i18n(t)))}destruct(){return s.Dom.safeRemove(this.container),this.parentElement=null,super.destruct()}constructor(e,t){super(e),this.name="",this.__parentElement=null,this.mods={},this.options=t,this.container=this.createContainer(t);let n=this.getRole();n&&(0,l.attr)(this.container,"role",n),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}};h=i=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,r.derive)(u.Mods,c.Elms)],h)},19070:function(e,t,n){n.d(t,{UIBlock:function(){return s}});var i=n(87325),o=n(43555),r=n(62405);let s=class e extends r.UIGroup{className(){return"UIBlock"}constructor(e,t,n={align:"left"}){super(e,t),this.options=n,this.setMod("align",this.options.align||"left"),this.setMod("width",this.options.width||""),this.options.mod&&this.setMod(this.options.mod,!0),this.options.className&&this.container.classList.add(this.options.className),(0,o.attr)(this.container,"data-ref",n.ref),(0,o.attr)(this.container,"ref",n.ref)}};s=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],s)},86327:function(e,t,n){n.d(t,{UIForm:function(){return c}});var i=n(4012),o=n(87325),r=n(43555),s=n(80256),a=n(12234),l=n(62405);let c=class e extends l.UIGroup{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){for(let e of this.allChildren.filter(e=>i.Component.isInstanceOf(e,s.UIInput)))if(!e.validate())return!1;for(let e of this.allChildren.filter(e=>i.Component.isInstanceOf(e,a.UISelect)))if(!e.validate())return!1;return!0}onSubmit(e){return this.j.e.on(this.container,"submit",()=>{let t=this.allChildren.filter(e=>i.Component.isInstanceOf(e,s.UIInput));return!!this.validate()&&(e(t.reduce((e,t)=>(e[t.state.name]=t.value,e),{})),!1)}),this}createContainer(){let e=this.j.c.element("form");return e.classList.add(this.componentName),(0,r.attr)(e,"dir",this.j.o.direction||"auto"),(0,r.attr)(e,"novalidate",""),e}constructor(...e){var t,n;super(...e),(null==(t=this.options)?void 0:t.className)&&this.container.classList.add(null==(n=this.options)?void 0:n.className)}};c=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([o.component],c)},2525:function(e,t,n){n.d(t,{UIBlock:function(){return i.UIBlock},UICheckbox:function(){return r.UICheckbox},UIFileInput:function(){return r.UIFileInput},UIForm:function(){return o.UIForm},UIInput:function(){return r.UIInput},UISelect:function(){return r.UISelect},UITextArea:function(){return r.UITextArea}});var i=n(19070),o=n(86327),r=n(8959)},85120:function(e,t,n){n.d(t,{UITextArea:function(){return h}});var i,o,r,s=n(65478),a=n(87325),l=n(41180),c=n(80256);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}var d=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let h=r=class e extends c.UIInput{className(){return"UITextArea"}createNativeInput(e){return this.j.create.element("textarea")}onChangeStateSize(){let{size:e,resizable:t}=this.state;(0,l.css)(this.nativeInput,"resize",t?"auto":"none"),this.nativeInput.rows=null!=e?e:5}constructor(e,t){super(e,t),this.state=u({},r.defaultState),Object.assign(this.state,t),!1===this.state.resizable&&(0,l.css)(this.nativeInput,"resize","none")}};h.defaultState=(i=u({},c.UIInput.defaultState),o=o={size:5,resizable:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}),i),d([(0,s.watch)(["state.size","state.resizable"])],h.prototype,"onChangeStateSize",null),h=r=d([a.component],h)},17328:function(e,t,n){n.d(t,{UICheckbox:function(){return u}});var i,o=n(65478),r=n(2748),s=n(80256);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var c=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let u=i=class e extends s.UIInput{className(){return"UICheckbox"}render(){return this.j.c.element("label",{className:this.componentName})}onChangeChecked(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod("checked",this.state.checked)}onChangeNativeCheckBox(){this.state.checked=this.nativeInput.checked}onChangeSwitch(){this.setMod("switch",this.state.switch);let e=this.getElm("switch-slider");this.state.switch?(e||(e=this.j.c.div(this.getFullElName("switch-slider"))),r.Dom.after(this.nativeInput,e)):r.Dom.safeRemove(e)}constructor(e,t){super(e,l(a({},t),{type:"checkbox"})),this.state=a({},i.defaultState),Object.assign(this.state,t)}};u.defaultState=l(a({},s.UIInput.defaultState),{checked:!1,switch:!1}),c([(0,o.watch)("state.checked"),(0,o.hook)("ready")],u.prototype,"onChangeChecked",null),c([(0,o.watch)("nativeInput:change")],u.prototype,"onChangeNativeCheckBox",null),c([(0,o.watch)("state.switch"),(0,o.hook)("ready")],u.prototype,"onChangeSwitch",null),u=i=c([o.component],u)},4242:function(e,t,n){n.d(t,{UIFileInput:function(){return l}});var i=n(87325),o=n(2748),r=n(10830),s=n(80256);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}let l=class e extends s.UIInput{className(){return"UIFileInput"}createContainer(e){this.button=new r.UIButton(this.j,{tooltip:e.tooltip,icon:{name:"plus"}});let{container:t}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(e));let{nativeInput:n}=this;return n.classList.add(this.getFullElName("input")),t.classList.add(this.componentName),o.Dom.append(t,n),t}createNativeInput(e){return this.j.create.fromHTML(`<input
@@ -28,7 +28,7 @@
28
28
  <div class="${t("footer")}"></div>
29
29
  <div class="${t("resizer")}">${g.Icon.get("resize_handler")}</div>
30
30
  </div>
31
- </div>`),"rtl"===this.options.direction&&((0,f.css)(this.container,"direction","rtl"),(0,f.attr)(this.container,"dir","rtl")),this.o.zIndex&&(0,f.css)(this.container,"zIndex",this.o.zIndex.toString()),(0,f.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 n=this.getElm("panel");(0,m.assert)(null!=n,"Panel element does not exist");let i=this.getElm("resizer");(0,m.assert)(null!=i,"Resizer element does not exist");let o=this.getElm("header-title");(0,m.assert)(null!=o,"header-title element does not exist");let s=this.getElm("content");(0,m.assert)(null!=s,"Content element does not exist");let a=this.getElm("footer");(0,m.assert)(null!=a,"Footer element does not exist");let l=this.getElm("header-toolbar");(0,m.assert)(null!=l,"header-toolbar element does not exist"),this.dialog=n,this.resizer=i,this.dialogbox_header=o,this.dialogbox_content=s,this.dialogbox_footer=a,this.dialogbox_toolbar=l,(0,f.css)(this.dialog,{maxWidth:this.options.maxWidth,minHeight:this.options.minHeight,minWidth:this.options.minWidth});let d=this.getElm("header");d&&this.e.on(d,"pointerdown touchstart",this.__onHeaderMouseDown),this.e.on(this.resizer,"mousedown touchstart",this.__onResizerMouseDown);let p=u.pluginSystem.get("fullsize");if((0,h.isFunction)(p)&&p(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,m.assert)(null!=e,"Overlay element does not exist"),this.e.on(e,"click",this.close)}}};S.__opened=new Set,S.defaultOptions=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},b.View.defaultOptions),o=o={closeOnClickOverlay:!1,closeOnEsc:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}),i),w([l.autobind],S.prototype,"__onMouseUp",null),w([l.autobind],S.prototype,"__onHeaderMouseDown",null),w([l.autobind],S.prototype,"__onMouseMove",null),w([l.autobind],S.prototype,"__onEsc",null),w([l.autobind],S.prototype,"__onResizerMouseDown",null),w([l.autobind],S.prototype,"close",null),w([(0,l.hook)("ready")],S.prototype,"buildToolbar",null),S=r=w([l.component],S)},638:function(e,t,n){n.d(t,{Alert:function(){return i.Alert},Confirm:function(){return o.Confirm},Dialog:function(){return r.Dialog},Prompt:function(){return s.Prompt}});var i=n(71568),o=n(26866),r=n(78584),s=n(36806)},36806:function(e,t,n){n.d(t,{Prompt:function(){return l}});var i=n(2748),o=n(23282),r=n(29960),s=n(10830),a=n(78584);function l(e,t,n,l,c){let u=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),d=(0,s.Button)(u,"cancel","Cancel"),h=(0,s.Button)(u,"ok","Ok"),p=u.c.element("form",{class:"jodit-dialog_prompt"}),f=u.c.element("input",{autofocus:!0,class:"jodit-input"}),m=u.c.element("label");(0,o.isFunction)(t)&&(n=t,t=void 0),l&&(0,r.attr)(f,"placeholder",l),i.Dom.append(m,u.c.text(e)),i.Dom.append(p,m),i.Dom.append(p,f),d.onAction(u.close);let g=()=>{n&&(0,o.isFunction)(n)&&!1===n(f.value)||u.close()};return h.onAction(g),u.e.on(p,"submit",()=>(g(),!1)),u.setFooter([h,d]),u.open(p,t||"&nbsp;",!0,!0),f.focus(),void 0!==c&&c.length&&(f.value=c,f.select()),u}},41457:function(e,t,n){var i=n(22732),o=n(29960),r=n(89890),s=n(12153),a=n(32118),l=n(21735),c=n(63399),u=n(44450),d=n(20201),h=n(50050);function p(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}let f="jodit-file-browser-preview",m=(e="next",t="right")=>`<div class="${f}__navigation ${f}__navigation_arrow_${e}">`+s.Icon.get("angle-"+t)+"</a>";t.default=e=>{if(!e.o.contextMenu)return()=>{};let t=(0,c.makeContextMenu)(e);return n=>{let s=(0,l.getItem)(n.target,e.container);if(!s)return;let c=s,g=e.options,b=e=>(0,o.attr)(c,e)||"";return e.async.setTimeout(()=>{let v=(0,l.elementToItem)(s,(0,a.elementsMap)(e));v&&(e.state.activeElements=[v],t.show(n.clientX,n.clientY,[!!("1"!==b("data-is-file")&&g.editImage&&(e.dataProvider.canI("ImageResize")||e.dataProvider.canI("ImageCrop")))&&{icon:"pencil",title:"Edit",exec:()=>h.openImageEditor.call(e,b("href"),b("data-name"),b("data-path"),b("data-source"))},!!e.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",exec:()=>{e.e.fire("fileRename.filebrowser",b("data-name"),b("data-path"),b("data-source"))}},!!e.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",exec:()=>{var t;return(t=function*(){try{yield(0,u.deleteFile)(e,b("data-name"),b("data-source"))}catch(t){return e.status(t)}return e.state.activeElements=[],(0,d.loadTree)(e).catch(e.status)},function(){var e=this,n=arguments;return new Promise(function(i,o){var r=t.apply(e,n);function s(e){p(r,i,o,s,a,"next",e)}function a(e){p(r,i,o,s,a,"throw",e)}s(void 0)})})()}},!!g.preview&&{icon:"eye",title:"Preview",exec:()=>{let t=e.dlg({buttons:["fullsize","dialog.close"]}),n=e.c.div(f,'<div class="jodit-icon_loader"></div>'),s=e.c.div(f+"__box"),a=e.c.fromHTML(m()),l=e.c.fromHTML(m("prev","left")),u=r=>{let u=e.c.element("img");(0,o.attr)(u,"src",r);let d=()=>{var o;e.isInDestruct||(e.e.off(u,"load"),i.Dom.detach(n),g.showPreviewNavigation&&(i.Dom.prevWithClass(c,e.files.getFullElName("item"))&&i.Dom.append(n,l),i.Dom.nextWithClass(c,e.files.getFullElName("item"))&&i.Dom.append(n,a)),i.Dom.append(n,s),i.Dom.append(s,u),t.setPosition(),null==(o=null==e?void 0:e.events)||o.fire("previewOpenedAndLoaded"))};e.e.on(u,"load",d),u.complete&&d()};e.e.on([a,l],"click",function(){if(!(c=this===a?i.Dom.nextWithClass(c,e.files.getFullElName("item")):i.Dom.prevWithClass(c,e.files.getFullElName("item"))))throw(0,r.error)("Need element");i.Dom.detach(n),i.Dom.detach(s),n.innerHTML='<div class="jodit-icon_loader"></div>',u(b("href"))}),e.e.on("beforeDestruct",()=>{t.destruct()}),t.container.classList.add(f+"__dialog"),t.setContent(n),t.setPosition(),t.open(),u(b("href")),e.events.on("beforeDestruct",()=>{t.destruct()}).fire("previewOpened")}},{icon:"download",title:"Download",exec:()=>{let t=b("href");t&&e.ow.open(t)}}]))},e.defaultTimeout),e.e.on("beforeClose",()=>{t.close()}).on("beforeDestruct",()=>t.destruct()),n.stopPropagation(),n.preventDefault(),!1}}},32118:function(e,t,n){let i=new WeakMap;n.d(t,["elementsMap",0,e=>{let t=i.get(e);return t||(t={},i.set(e,t)),t}])},159:function(e,t,n){n.d(t,{FileBrowserItem:function(){return o}});var i=n(21537);class o{static create(e){return e instanceof o?e:new o(e)}get path(){return(0,i.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:n,thumb:o,file:r}=this.data,s=o||r;return t&&s?s:(0,i.normalizeUrl)(n.baseurl,n.path,s||"")+"?_tmst="+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:n,source:o}=this.data;return void 0!==t&&(e=t),n&&e?e:(0,i.normalizeUrl)(o.baseurl,o.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,n){var i=n(2748);n.d(t,["elementToItem",0,(e,t)=>{let{key:n}=e.dataset,{item:i}=t[n||""];return i},"getItem",0,(e,t,n="a")=>i.Dom.closest(e,e=>i.Dom.isTag(e,n),t)])},61251:function(e,t,n){n(57459);var i,o,r=n(2748),s=n(27613),a=n(38420),l=n(4242),c=n(6441);c.Config.prototype.filebrowser={namespace:"",cache:!0,extraButtons:[],filter(e,t){return(t=t.toLowerCase(),(0,s.isString)(e))?-1!==e.toLowerCase().indexOf(t):(0,s.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,s.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t)},sortBy:"changed-desc",sort(e,t,n){let[i,o]=n.toLowerCase().split("-"),r="asc"===o,l=(e,t)=>t>e?r?-1:1:e>t?r?1:-1:0;if((0,s.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[i]||"name"===i)return(0,s.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,s.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(i){case"changed":{let n=new Date(e.changed).getTime(),i=new Date(t.changed).getTime();return r?n-i:i-n}case"size":{let n=(0,a.humanSizeToBytes)(e.size),i=(0,a.humanSizeToBytes)(t.size);return r?n-i:i-n}}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){return e.success},getMessage(e){return void 0!==e.data.messages&&(0,s.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,n){let i=this.options,o=this.files.getFullElName("item"),r=i.showFileName,s=i.showFileSize&&e.size,a=i.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);let c=`<div class="${o}-info">${r?`<span class="${o}-info-filename">${l}</span>`:""}${s?`<span class="${o}-info-filesize">${e.size}</span>`:""}${a?`<span class="${o}-info-filechanged">${a}</span>`:""}</div>`;return`<a
31
+ </div>`),"rtl"===this.options.direction&&((0,f.css)(this.container,"direction","rtl"),(0,f.attr)(this.container,"dir","rtl")),this.o.zIndex&&(0,f.css)(this.container,"zIndex",this.o.zIndex.toString()),(0,f.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 n=this.getElm("panel");(0,m.assert)(null!=n,"Panel element does not exist");let i=this.getElm("resizer");(0,m.assert)(null!=i,"Resizer element does not exist");let o=this.getElm("header-title");(0,m.assert)(null!=o,"header-title element does not exist");let s=this.getElm("content");(0,m.assert)(null!=s,"Content element does not exist");let a=this.getElm("footer");(0,m.assert)(null!=a,"Footer element does not exist");let l=this.getElm("header-toolbar");(0,m.assert)(null!=l,"header-toolbar element does not exist"),this.dialog=n,this.resizer=i,this.dialogbox_header=o,this.dialogbox_content=s,this.dialogbox_footer=a,this.dialogbox_toolbar=l,(0,f.css)(this.dialog,{maxWidth:this.options.maxWidth,minHeight:this.options.minHeight,minWidth:this.options.minWidth});let d=this.getElm("header");d&&this.e.on(d,"pointerdown touchstart",this.__onHeaderMouseDown),this.e.on(this.resizer,"mousedown touchstart",this.__onResizerMouseDown);let p=u.pluginSystem.get("fullsize");if((0,h.isFunction)(p)&&p(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,m.assert)(null!=e,"Overlay element does not exist"),this.e.on(e,"click",this.close)}}};S.__opened=new Set,S.defaultOptions=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},b.View.defaultOptions),o=o={closeOnClickOverlay:!1,closeOnEsc:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}),i),w([l.autobind],S.prototype,"__onMouseUp",null),w([l.autobind],S.prototype,"__onHeaderMouseDown",null),w([l.autobind],S.prototype,"__onMouseMove",null),w([l.autobind],S.prototype,"__onEsc",null),w([l.autobind],S.prototype,"__onResizerMouseDown",null),w([l.autobind],S.prototype,"close",null),w([(0,l.hook)("ready")],S.prototype,"buildToolbar",null),S=r=w([l.component],S)},638:function(e,t,n){n.d(t,{Alert:function(){return i.Alert},Confirm:function(){return o.Confirm},Dialog:function(){return r.Dialog},Prompt:function(){return s.Prompt}});var i=n(71568),o=n(26866),r=n(78584),s=n(36806)},36806:function(e,t,n){n.d(t,{Prompt:function(){return l}});var i=n(2748),o=n(23282),r=n(29960),s=n(10830),a=n(78584);function l(e,t,n,l,c){let u=this instanceof a.Dialog?this:new a.Dialog({closeOnClickOverlay:!0}),d=(0,s.Button)(u,"cancel","Cancel"),h=(0,s.Button)(u,"ok","Ok"),p=u.c.element("form",{class:"jodit-dialog_prompt"}),f=u.c.element("input",{autofocus:!0,class:"jodit-input"}),m=u.c.element("label");(0,o.isFunction)(t)&&(n=t,t=void 0),l&&(0,r.attr)(f,"placeholder",l),i.Dom.append(m,u.c.text(e)),i.Dom.append(p,m),i.Dom.append(p,f),d.onAction(u.close);let g=()=>{n&&(0,o.isFunction)(n)&&!1===n(f.value)||u.close()};return h.onAction(g),u.e.on(p,"submit",()=>(g(),!1)),u.setFooter([h,d]),u.open(p,t||"&nbsp;",!0,!0),f.focus(),void 0!==c&&c.length&&(f.value=c,f.select()),u}},41457:function(e,t,n){var i=n(22732),o=n(29960),r=n(89890),s=n(12153),a=n(32118),l=n(21735),c=n(63399),u=n(44450),d=n(20201),h=n(50050);function p(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}let f="jodit-file-browser-preview",m=(e="next",t="right")=>`<div class="${f}__navigation ${f}__navigation_arrow_${e}">`+s.Icon.get("angle-"+t)+"</a>";t.default=e=>{if(!e.o.contextMenu)return()=>{};let t=(0,c.makeContextMenu)(e);return n=>{let s=(0,l.getItem)(n.target,e.container);if(!s)return;let c=s,g=e.options,b=e=>(0,o.attr)(c,e)||"";return e.async.setTimeout(()=>{let v=(0,l.elementToItem)(s,(0,a.elementsMap)(e));v&&(e.state.activeElements=[v],t.show(n.clientX,n.clientY,[!!("1"!==b("data-is-file")&&g.editImage&&(e.dataProvider.canI("ImageResize")||e.dataProvider.canI("ImageCrop")))&&{icon:"pencil",title:"Edit",exec:()=>h.openImageEditor.call(e,b("href"),b("data-name"),b("data-path"),b("data-source"))},!!e.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",exec:()=>{e.e.fire("fileRename.filebrowser",b("data-name"),b("data-path"),b("data-source"))}},!!e.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",exec:()=>{var t;return(t=function*(){try{yield(0,u.deleteFile)(e,b("data-name"),b("data-source"))}catch(t){return e.status(t)}return e.state.activeElements=[],(0,d.loadTree)(e).catch(e.status)},function(){var e=this,n=arguments;return new Promise(function(i,o){var r=t.apply(e,n);function s(e){p(r,i,o,s,a,"next",e)}function a(e){p(r,i,o,s,a,"throw",e)}s(void 0)})})()}},!!g.preview&&{icon:"eye",title:"Preview",exec:()=>{let t=e.dlg({buttons:["fullsize","dialog.close"]}),n=e.c.div(f,'<div class="jodit-icon_loader"></div>'),s=e.c.div(f+"__box"),a=e.c.fromHTML(m()),l=e.c.fromHTML(m("prev","left")),u=r=>{let u=e.c.element("img");(0,o.attr)(u,"src",r),(0,o.attr)(u,"alt",b("data-name"));let d=()=>{var o;e.isInDestruct||(e.e.off(u,"load error"),i.Dom.detach(n),g.showPreviewNavigation&&(i.Dom.prevWithClass(c,e.files.getFullElName("item"))&&i.Dom.append(n,l),i.Dom.nextWithClass(c,e.files.getFullElName("item"))&&i.Dom.append(n,a)),i.Dom.append(n,s),i.Dom.append(s,u),t.setPosition(),null==(o=null==e?void 0:e.events)||o.fire("previewOpenedAndLoaded"))};e.e.on(u,"load error",d),u.complete&&d()};e.e.on([a,l],"click",function(){if(!(c=this===a?i.Dom.nextWithClass(c,e.files.getFullElName("item")):i.Dom.prevWithClass(c,e.files.getFullElName("item"))))throw(0,r.error)("Need element");i.Dom.detach(n),i.Dom.detach(s),n.innerHTML='<div class="jodit-icon_loader"></div>',u(b("href"))}),e.e.on("beforeDestruct",()=>{t.destruct()}),t.container.classList.add(f+"__dialog"),t.setContent(n),t.setPosition(),t.open(),u(b("href")),e.events.on("beforeDestruct",()=>{t.destruct()}).fire("previewOpened")}},{icon:"download",title:"Download",exec:()=>{let t=b("href");t&&e.ow.open(t)}}]))},e.defaultTimeout),e.e.on("beforeClose",()=>{t.close()}).on("beforeDestruct",()=>t.destruct()),n.stopPropagation(),n.preventDefault(),!1}}},32118:function(e,t,n){let i=new WeakMap;n.d(t,["elementsMap",0,e=>{let t=i.get(e);return t||(t={},i.set(e,t)),t}])},159:function(e,t,n){n.d(t,{FileBrowserItem:function(){return o}});var i=n(21537);class o{static create(e){return e instanceof o?e:new o(e)}get path(){return(0,i.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){let e=this.time||new Date().getTime().toString(),{thumbIsAbsolute:t,source:n,thumb:o,file:r}=this.data,s=o||r;return t&&s?s:(0,i.normalizeUrl)(n.baseurl,n.path,s||"")+"?_tmst="+encodeURIComponent(e)}get fileURL(){let{name:e}=this.data,{file:t,fileIsAbsolute:n,source:o}=this.data;return void 0!==t&&(e=t),n&&e?e:(0,i.normalizeUrl)(o.baseurl,o.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,n){var i=n(2748);n.d(t,["elementToItem",0,(e,t)=>{let{key:n}=e.dataset,{item:i}=t[n||""];return i},"getItem",0,(e,t,n="a")=>i.Dom.closest(e,e=>i.Dom.isTag(e,n),t)])},61251:function(e,t,n){n(57459);var i,o,r=n(2748),s=n(27613),a=n(38420),l=n(4242),c=n(6441);c.Config.prototype.filebrowser={namespace:"",cache:!0,extraButtons:[],filter(e,t){return(t=t.toLowerCase(),(0,s.isString)(e))?-1!==e.toLowerCase().indexOf(t):(0,s.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,s.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t)},sortBy:"changed-desc",sort(e,t,n){let[i,o]=n.toLowerCase().split("-"),r="asc"===o,l=(e,t)=>t>e?r?-1:1:e>t?r?1:-1:0;if((0,s.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[i]||"name"===i)return(0,s.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,s.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(i){case"changed":{let n=new Date(e.changed).getTime(),i=new Date(t.changed).getTime();return r?n-i:i-n}case"size":{let n=(0,a.humanSizeToBytes)(e.size),i=(0,a.humanSizeToBytes)(t.size);return r?n-i:i-n}}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){return e.success},getMessage(e){return void 0!==e.data.messages&&(0,s.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,n){let i=this.options,o=this.files.getFullElName("item"),r=i.showFileName,s=i.showFileSize&&e.size,a=i.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);let c=`<div class="${o}-info">${r?`<span class="${o}-info-filename">${l}</span>`:""}${s?`<span class="${o}-info-filesize">${e.size}</span>`:""}${a?`<span class="${o}-info-filechanged">${a}</span>`:""}</div>`;return`<a
32
32
  data-jodit-file-browser-item="true"
33
33
  data-is-file="${+!e.isImage}"
34
34
  draggable="true"
@@ -106,7 +106,7 @@
106
106
  </div>`:""}
107
107
  </div>
108
108
  </div>
109
- </form>`)}])},41409:function(e,t,n){n.r(t),n.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 f.Button},CommitStyle:function(){return T.CommitStyle},Component:function(){return i.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return c.Create},Dialog:function(){return s.Dialog},Dom:function(){return u.Dom},EventEmitter:function(){return d.EventEmitter},EventHandlersStore:function(){return d.EventHandlersStore},Eventify:function(){return d.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return o},History:function(){return b.History},Icon:function(){return f.Icon},ImageEditor:function(){return y.ImageEditor},IndexedDBProvider:function(){return j.IndexedDBProvider},LazyWalker:function(){return u.LazyWalker},LocalStorageProvider:function(){return j.LocalStorageProvider},MemoryStorageProvider:function(){return j.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return I.PluginSystem},Popup:function(){return f.Popup},ProgressBar:function(){return f.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return i.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 S.Table},ToolbarButton:function(){return k.ToolbarButton},ToolbarCollection:function(){return C.ToolbarCollection},ToolbarContent:function(){return k.ToolbarContent},ToolbarEditorCollection:function(){return E.ToolbarEditorCollection},ToolbarSelect:function(){return k.ToolbarSelect},UIBlock:function(){return f.UIBlock},UIButton:function(){return f.UIButton},UIButtonGroup:function(){return f.UIButtonGroup},UIButtonState:function(){return f.UIButtonState},UICheckbox:function(){return f.UICheckbox},UIElement:function(){return f.UIElement},UIFileInput:function(){return f.UIFileInput},UIForm:function(){return f.UIForm},UIGroup:function(){return f.UIGroup},UIInput:function(){return f.UIInput},UIList:function(){return f.UIList},UIMessages:function(){return w.UIMessages},UISelect:function(){return f.UISelect},UISeparator:function(){return f.UISeparator},UISpacer:function(){return f.UISpacer},UITextArea:function(){return f.UITextArea},UITooltip:function(){return f.UITooltip},Uploader:function(){return D.Uploader},View:function(){return m.View},ViewComponent:function(){return i.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return j.canUseIndexedDB},canUsePersistentStorage:function(){return j.canUsePersistentStorage},clearUseIndexedDBCache:function(){return j.clearUseIndexedDBCache},defaultNameSpace:function(){return d.defaultNameSpace},observable:function(){return d.observable}});var i=n(91907),o=n(21537),r=n(80870),s=n(638),a=n(78513),l=n(8884),c=n(12060),u=n(22732),d=n(3827),h=n(50911),p=n(41601),f=n(67510),m=n(35608),g=n(84075),b=n(78818),v=n(52604),y=n(50050),w=n(1808),_=n(23512),S=n(76014),k=n(36646),C=n(11676),E=n(37426),D=n(57380),I=n(41876),T=n(59242),j=n(12081)},68389:function(e,t,n){n.d(t,{UIMessage:function(){return r}});var i=n(87325),o=n(67510);let r=class e extends o.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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],r)},1808:function(e,t,n){n.d(t,{UIMessages:function(){return l}});var i=n(87325),o=n(2748),r=n(41180),s=n(62405),a=n(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,n){this.__message(e,t,n)}__message(e,t="info",n){let i=e+":"+t;if(this.__messages.has(i))return void this.async.updateTimeout(i,n||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+i);o.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(i);let s=this.__getRemoveCallback(r,i);this.j.e.on(r.container,"pointerdown",s),this.async.setTimeout(s,{label:i,timeout:n||this.options.defaultTimeout})}__getRemoveCallback(e,t){let n=i=>{i&&i.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",n),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return n}__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,n={defaultTimeout:3e3,defaultOffset:5}){super(e),this.__box=t,this.options=n,this.__messages=new Set}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],l)},23512:function(e,t,n){n.d(t,{StatusBar:function(){return l}});var i=n(91907),o=n(65478),r=n(2748),s=n(14316),a=n(34176);let l=class e extends i.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 n=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&n.classList.add(this.getFullElName("item-right")),r.Dom.append(n,e),this.container&&r.Dom.append(this.container,n),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(i.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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([o.component,(0,o.derive)(a.Mods,s.Elms)],l)},76014:function(e,t,n){n.d(t,{Table:function(){return d}});var i=n(91907),o=n(82758),r=n(22732),s=n(580),a=n(21537),l=n(41180);let c=new Set(["thead","tbody","tfoot"]),u=new WeakMap;class d extends i.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 n=d.__selectedByTable.get(t)||new Set;n.add(e),d.__selectedByTable.set(t,n)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=r.Dom.closest(e,"table",this.j.editor);if(t){let n=d.__selectedByTable.get(t);n&&(n.delete(e),n.size||d.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,a.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=d.__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 d.__getRowsCount(e)}static __getColumnsCount(e){return d.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return d.__getColumnsCount(e)}static __formalMatrix(e,t){let n=[[]],i=(0,a.toArray)(e.rows),o=(e,i)=>{void 0===n[i]&&(n[i]=[]);let o=e.colSpan,r=e.rowSpan,s,a,l=0;for(;n[i][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<o;s+=1){if(void 0===n[i+a]&&(n[i+a]=[]),t&&!1===t(e,i+a,l+s,o,r))return!1;n[i+a][l+s]=e}};for(let e=0;e<i.length;e+=1){let t=(0,a.toArray)(i[e].cells);for(let i=0;i<t.length;i+=1)if(!1===o(t[i],e))return n}return n}formalMatrix(e,t){return d.__formalMatrix(e,t)}static __formalCoordinate(e,t,n=!1){let i=0,o=0,r=1,s=1;return d.__formalMatrix(e,(e,a,l,c,u)=>{if(t===e)return i=a,o=l,r=c||1,s=u||1,n&&(o+=(c||1)-1,i+=(u||1)-1),!1}),[i,o,r,s]}formalCoordinate(e,t,n=!1){return d.__formalCoordinate(e,t,n)}static __appendRow(e,t,n,i){let o;if(t)o=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 n=parseInt(t,10)-1;(0,a.attr)(e,"rowspan",n>1?n:null)}}),r.Dom.each(o,e=>{r.Dom.isCell(e)&&(r.Dom.detach(e),r.Dom.append(e,i.element("br")))});else{let t=d.__getColumnsCount(e);o=i.element("tr");for(let e=0;e<t;e+=1){let e=i.element("td");r.Dom.append(e,i.element("br")),r.Dom.append(o,e)}}let s=t&&t.parentElement;if(n&&t&&!t.nextElementSibling&&r.Dom.isTag(s,"thead")){let t=d.__bodyOf(e,s,i);t.insertBefore(o,t.firstChild),d.__setCellsTag(o,"td",i)}else n&&t&&t.nextSibling?r.Dom.after(t,o):!n&&t?r.Dom.before(t,o):r.Dom.append(r.Dom.first(e,e=>r.Dom.isTag(e,"tbody"))||e,o)}static __bodyOf(e,t,n){let i=e.tBodies[0];return i||(i=n.element("tbody"),r.Dom.after(t,i)),i}static __setCellsTag(e,t,n,i){(0,a.toArray)(e.cells).forEach(e=>{let o=r.Dom.isTag(e,t)?e:r.Dom.replace(e,t,n,!0);o!==e&&(null==i||i.set(e,o)),"td"===t?(0,a.attr)(o,"scope",null):o.hasAttribute("scope")||(0,a.attr)(o,"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,n=this.j.createInside,i=e.tHead;if(!this.canToggleHeaderRow(e))return t;if(i&&this.hasHeaderRow(e)){let o=d.__bodyOf(e,i,n),s=o.firstChild;(0,a.toArray)(i.rows).forEach(e=>{o.insertBefore(e,s),d.__setCellsTag(e,"td",n,t)}),r.Dom.safeRemove(i)}else{let[o]=(0,a.toArray)(e.rows),s=i||n.element("thead");i||(e.tHead=s),r.Dom.append(s,o),d.__setCellsTag(o,"th",n,t)}return t}appendRow(e,t,n){return d.__appendRow(e,t,n,this.j.createInside)}static __removeRow(e,t){let n,i=d.__formalMatrix(e),o=e.rows[t];i[t].forEach((s,l)=>{if(n=!1,t-1>=0&&i[t-1][l]===s)n=!0;else if(i[t+1]&&i[t+1][l]===s){if(s.parentNode===o&&s.parentNode.nextSibling){n=!0;let o=l+1;for(;i[t+1][o]===s;)o+=1;let a=r.Dom.next(s.parentNode,e=>r.Dom.isTag(e,"tr"),e);if(a){let e=null;for(let n=o;n<i[t+1].length;n+=1){let o=i[t+1][n];if(o&&o.parentNode===a){e=o;break}}e?r.Dom.before(e,s):r.Dom.append(a,s)}}}else r.Dom.safeRemove(s);if(n&&(s.parentNode===o||s!==i[t][l-1])){let e=s.rowSpan;(0,a.attr)(s,"rowspan",e-1>1?e-1:null)}});let s=o.parentElement;r.Dom.safeRemove(o),r.Dom.isTag(s,c)&&!s.rows.length&&r.Dom.safeRemove(s)}removeRow(e,t){return d.__removeRow(e,t)}appendColumn(e,t,n=!0){let i=d.__formalMatrix(e);if(!n&&r.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,o]=d.__formalCoordinate(e,t,n),s=n?o+1:o;for(let e=0;e<i.length;){let t=i[e];if(t[o]!==t[s]||o===s){let e=this.j.createInside.element("td");r.Dom.append(e,this.j.createInside.element("br")),n?r.Dom.after(t[o],e):r.Dom.before(t[o],e),t[o].rowSpan>1&&(e.rowSpan=t[o].rowSpan)}else t[o].colSpan+=1;e+=t[o].rowSpan||1}}static __removeColumn(e,t){let n,i=d.__formalMatrix(e);i.forEach((e,o)=>{let s=e[t];if(n=!1,t-1>=0&&i[o][t-1]===s||t+1<e.length&&i[o][t+1]===s?n=!0:r.Dom.safeRemove(s),n&&(o-1<0||s!==i[o-1][t])){let e=s.colSpan;(0,a.attr)(s,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return d.__removeColumn(e,t)}static __getSelectedBound(e,t){let n,i,o,r=[[1/0,1/0],[0,0]],s=d.__formalMatrix(e);for(n=0;n<s.length;n+=1)for(i=0;s[n]&&i<s[n].length;i+=1)t.includes(s[n][i])&&(r[0][0]=Math.min(n,r[0][0]),r[0][1]=Math.min(i,r[0][1]),r[1][0]=Math.max(n,r[1][0]),r[1][1]=Math.max(i,r[1][1]));for(n=r[0][0];n<=r[1][0];n+=1)for(o=1,i=r[0][1];i<=r[1][1];i+=1){for(;s[n]&&s[n][i-o]&&s[n][i]===s[n][i-o];)r[0][1]=Math.min(i-o,r[0][1]),r[1][1]=Math.max(i-o,r[1][1]),o+=1;for(o=1;s[n]&&s[n][i+o]&&s[n][i]===s[n][i+o];)r[0][1]=Math.min(i+o,r[0][1]),r[1][1]=Math.max(i+o,r[1][1]),o+=1;for(o=1;s[n-o]&&s[n][i]===s[n-o][i];)r[0][0]=Math.min(n-o,r[0][0]),r[1][0]=Math.max(n-o,r[1][0]),o+=1;for(o=1;s[n+o]&&s[n][i]===s[n+o][i];)r[0][0]=Math.min(n+o,r[0][0]),r[1][0]=Math.max(n+o,r[1][0]),o+=1}return r}getSelectedBound(e,t){return d.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],n=d.__formalMatrix(e);d.__removeExtraColspans(n,t),d.__removeExtraRowspans(n,t);for(let e=0;e<n.length;e+=1)for(let t=0;t<n[e].length;t+=1)void 0!==n[e][t]&&(n[e][t].hasAttribute("rowspan")&&1===n[e][t].rowSpan&&(0,a.attr)(n[e][t],"rowspan",null),n[e][t].hasAttribute("colspan")&&1===n[e][t].colSpan&&(0,a.attr)(n[e][t],"colspan",null),n[e][t].hasAttribute("class")&&!(0,a.attr)(n[e][t],"class")&&(0,a.attr)(n[e][t],"class",null));d.__unmark(t)}static __removeExtraColspans(e,t){for(let n=0;n<e[0].length;n+=1){let i=1e6,o=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][n]){if(e[t][n].colSpan<2){o=!0;break}i=Math.min(i,e[t][n].colSpan)}if(!o)for(let o=0;o<e.length;o+=1)void 0!==e[o][n]&&d.__mark(e[o][n],"colspan",e[o][n].colSpan-i+1,t)}}static __removeExtraRowspans(e,t){let n,i;for(n=0;n<e.length;n+=1){let o=1e6,r=!1;for(i=0;i<e[n].length;i+=1)if(void 0!==e[n][i]){if(e[n][i].rowSpan<2){r=!0;break}o=Math.min(o,e[n][i].rowSpan)}if(!r)for(i=0;i<e[n].length;i+=1)void 0!==e[n][i]&&d.__mark(e[n][i],"rowspan",e[n][i].rowSpan-o+1,t)}}normalizeTable(e){return d.__normalizeTable(e)}static __mergeSelected(e,t){let n=[],i=d.__getSelectedBound(e,d.__getSelectedCellsByTable(e)),s=0,c=null,u=0,p=0,f=0,m=new Set,g=[];i&&(i[0][0]-i[1][0]||i[0][1]-i[1][1])&&(d.__formalMatrix(e,(e,o,r,b,v)=>{o>=i[0][0]&&o<=i[1][0]&&r>=i[0][1]&&r<=i[1][1]&&(m.has(e)||(m.add(e),o===i[0][0]&&(0,l.cssInline)(e,"width")&&(s+=e.offsetWidth),""!==(0,a.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&n.push(e.innerHTML),b>1&&(p+=b-1),v>1&&(f+=v-1),c?(d.__mark(e,"remove",1,g),h(t).removeSelection(e)):(c=e,u=r)))}),p=i[1][1]-i[0][1]+1,f=i[1][0]-i[0][0]+1,c&&(p>1&&d.__mark(c,"colspan",p,g),f>1&&d.__mark(c,"rowspan",f,g),s&&(d.__mark(c,"width",(s/e.offsetWidth*100).toFixed(o.ACCURACY)+"%",g),u&&d.__setColumnWidthByDelta(e,u,0,!0,g)),c.innerHTML=n.join("<br/>")||"<br/>",h(t).addSelection(c),m.delete(c),d.__unmark(g),d.__normalizeTable(e),(0,a.toArray)(e.rows).forEach(e=>{e.cells.length||r.Dom.safeRemove(e)})))}mergeSelected(e){return d.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let n,i,o,s,a,l=[];d.__getSelectedCellsByTable(e).forEach(c=>{i=t.createInside.element("td"),r.Dom.append(i,t.createInside.element("br")),o=t.createInside.element("tr"),n=d.__formalCoordinate(e,c),c.rowSpan<2?(d.__formalMatrix(e,(e,t,i)=>{n[0]===t&&n[1]!==i&&e!==c&&d.__mark(e,"rowspan",e.rowSpan+1,l)}),r.Dom.after(r.Dom.closest(c,"tr",e),o),r.Dom.append(o,i)):(d.__mark(c,"rowspan",c.rowSpan-1,l),d.__formalMatrix(e,(t,i,o)=>{i>n[0]&&i<n[0]+c.rowSpan&&n[1]>o&&t.parentNode.rowIndex===i&&(a=t),n[0]<i&&t===c&&(s=e.rows[i])}),a?r.Dom.after(a,i):r.Dom.prepend(s,i)),c.colSpan>1&&d.__mark(i,"colspan",c.colSpan,l),d.__unmark(l),h(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return d.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let n,i,s,a=[];d.__getSelectedCellsByTable(e).forEach(l=>{n=d.__formalCoordinate(e,l),l.colSpan<2?d.__formalMatrix(e,(e,t,i)=>{n[1]===i&&n[0]!==t&&e!==l&&d.__mark(e,"colspan",e.colSpan+1,a)}):d.__mark(l,"colspan",l.colSpan-1,a),i=t.createInside.element("td"),r.Dom.append(i,t.createInside.element("br")),l.rowSpan>1&&d.__mark(i,"rowspan",l.rowSpan,a);let c=l.offsetWidth;r.Dom.after(l,i),s=c/e.offsetWidth/2,d.__mark(l,"width",(100*s).toFixed(o.ACCURACY)+"%",a),d.__mark(i,"width",(100*s).toFixed(o.ACCURACY)+"%",a),d.__unmark(a),h(t).removeSelection(l)}),d.__normalizeTable(e)}splitVertical(e){return d.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,n,i,r){let s=d.__formalMatrix(e),a=0;for(let i=0;i<s.length;i+=1){let l=s[i][t];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+n)/e.offsetWidth*100;d.__mark(l,"width",c.toFixed(o.ACCURACY)+"%",r),a=i;break}for(let e=a+1;e<s.length;e+=1){let n=s[e][t];d.__mark(n,"width",null,r)}i||d.__unmark(r)}setColumnWidthByDelta(e,t,n,i,o){return d.__setColumnWidthByDelta(e,t,n,i,o)}static __mark(e,t,n,i){var o;i.push(e);let r=null!=(o=u.get(e))?o:{};r[t]=void 0===n?1:n,u.set(e,r)}static __unmark(e){e.forEach(e=>{let t=u.get(e);t&&(Object.keys(t).forEach(n=>{let i=t[n];switch(n){case"remove":r.Dom.safeRemove(e);break;case"rowspan":(0,a.attr)(e,"rowspan",(0,a.isNumber)(i)&&i>1?i:null);break;case"colspan":(0,a.attr)(e,"colspan",(0,a.isNumber)(i)&&i>1?i:null);break;case"width":null==i?(e.style.removeProperty("width"),(0,a.attr)(e,"style")||(0,a.attr)(e,"style",null)):(0,a.css)(e,"width",i.toString())}delete t[n]}),u.delete(e))})}constructor(){super(...arguments),this.selected=new Set,this.__recalculateStyles=this.async.microDebounce(()=>{let e=(0,s.getContainer)(this.j,d,"style",!0),t=[];this.selected.forEach(e=>{let n=(0,a.cssPath)(e);n&&t.push(n)});let n=t.length>1?t.map(e=>`${e}::selection,${e} ::selection`).join(",")+"{background:transparent}":"";e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`+n:""})}}d.__selectedByTable=new WeakMap;let h=e=>e.getInstance("Table",e.o)},78644:function(e,t,n){n.d(t,{ToolbarButton:function(){return P}});var i,o=n(4012),r=n(78213),s=n(82758),a=n(45219),l=n(33433),c=n(87325),u=n(37133),d=n(2748),h=n(68345),p=n(23282),f=n(19306),m=n(72430),g=n(70799),b=n(56175),v=n(87058),y=n(38837),w=n(29960),_=n(37790),S=n(62843),k=n(20014),C=n(72157),E=n(12153),D=n(56917),I=n(21491);function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function j(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var A=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let x=new Set(["input","textarea","select"]),P=i=class e extends S.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:n,state:i}=this,o=this.toolbar;if(!o)return;let r=null==(e=n.value)?void 0:e.call(n,o.jodit,this);void 0!==r&&(i.value=r),i.disabled=this.__calculateDisabledStatus(o),i.activated=this.__calculateActivatedStatus(o),null==(t=n.update)||t.call(n,o.jodit,this)}__calculateActivatedStatus(e){var t,n;return(!(0,f.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(null!=(n=(t=this.control).isActive)&&!!n.call(t,this.j,this)||!!(e&&e.shouldBeActive(this)))}__calculateDisabledStatus(e){var t,n;return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||(null==(n=(t=this.control).isDisabled)?void 0:n.call(t,this.j,this)))||!!(e&&e.shouldBeDisabled(this))}get isToggle(){let{isActive:e,tags:t,css:n}=this.control;return!!(e||t||n)}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),n=super.createContainer();n.classList.remove(e),n.classList.add(e+"__button"),Object.defineProperty(n,"component",{value:this,configurable:!0}),d.Dom.append(t,n);let i=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${E.Icon.get("chevron")}</span>`);return d.Dom.append(n,i),t}focus(){var e;null==(e=d.Dom.first(this.container,e=>d.Dom.isTag(e,"button")))||e.focus()}onChangeHasTrigger(){this.state.hasTrigger?d.Dom.append(this.container,this.trigger):d.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:n}=this,{textIcons:i}=this.j.o;if(!0===i||(0,p.isFunction)(i)&&i(t.name)||t.template){n.icon=(0,S.UIButtonState)().icon,n.text=t.text||t.name;return}if(!(0,g.isString)(t.icon)&&null!=t.icon){n.icon={name:t.icon.name||t.name,iconURL:t.icon.iconURL||"",fill:t.icon.fill||"",scale:t.icon.scale};return}if(t.iconURL)n.icon.iconURL=t.iconURL;else{let i=t.icon||t.name;n.icon.name=E.Icon.exists(i)||(null==(e=this.j.o.extraIcons)?void 0:e[i])?i:""}t.iconURL||n.icon.name||(n.text=t.text||t.name)}onTriggerClick(e){var t,n,i;if(this.openedPopup)return void this.__closePopup();let{control:o}=this;if((0,w.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},o.list)return this.__openControlList(o);if((0,p.isFunction)(o.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,v.camelCase)(`before-${o.name}-open-popup`),this.target,o,e)){let r=null!=(i=null!=(n=null==(t=this.toolbar)?void 0:t.getTarget(this))?n:this.target)?i:null,s=o.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,k.focusFormField)(e.container)):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,v.camelCase)(`after-${o.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(d.Dom.isTag(t,x)&&e.key!==s.KEY_ESC)return;let n=this.__popupFocusables(),i=n.indexOf(t);switch(e.key){case s.KEY_ESC:this.__closePopup();break;case s.KEY_UP:i<=0?this.__closePopup():n[i-1].focus();break;case s.KEY_DOWN:if(!n.length)return;n[(i+1)%n.length].focus();break;default:if(!this.control.list||!this.__typeAhead(e.key,n,i))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,n){var i,o;let r=Date.now();if((r-this.__typedAt>1e3||t[n]!==this.__typedTo)&&(this.__typed=""),1!==e.length||" "===e&&!this.__typed)return!1;this.__typedAt=r,this.__typed+=e,this.__typedTo=t[n];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,u=l?n+1:Math.max(n,0);for(let e=0;e<t.length;e+=1){let n=t[(u+e)%t.length];if(0===s((null!=(o=null==(i=n.textContent)?void 0:i.trim())?o:"").slice(0,c.length),c)){n.focus(),this.__typedTo=n;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,n,i,o,r;let s=null!=(t=this.jodit.options.controls)?t:{},a=e=>(0,C.findControlType)(e,s),l=e.list,c=this.openPopup();c.parentElement=this;let u=null==(n=e.popup)?void 0:n.call(e,this.j,null!=(r=null!=(o=null==(i=this.toolbar)?void 0:i.getTarget(this))?o:this.target)?r:null,this.__closePopup,this);if(u)return this.__openMenu(c,u);let d=(0,I.makeCollection)(this.j);d.parentElement=c,d.mode="vertical";let p=(t,n)=>{let i;if((0,g.isString)(n)&&a(n))return T({name:n.toString()},a(n));if((0,g.isString)(t)&&a(t))return T({name:t.toString()},a(t),"object"==typeof n?n:{});i=t,(0,m.isPlainObject)(i)&&"title"in i&&"value"in i&&(n=t.value,t=t.title);let{childTemplate:o}=e,r={name:t.toString(),template:o&&((e,t,n)=>o(e,t,n,this)),exec:e.childExec?(t,n,i)=>{var o;return null==(o=e.childExec)?void 0:o.call(e,t,n,j(T({},i),{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,n]};return(0,g.isString)(n)&&(r.text=n),r};d.build((0,h.isArray)(l)?l.map(p):(0,_.keys)(l,!1).map(e=>p(e,l[e])),this.target),this.__openMenu(c,d)}__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&&d.Dom.isNode(e.target)&&(d.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new D.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,n=t&&d.Dom.isOrContains(e.container,t),i=n&&d.Dom.closest(t,"form",e.container);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,w.attr)(this.trigger,"aria-expanded",!1),i&&(0,f.isJoditObject)(this.j)?this.j.s.focus():n&&this.focus()}onClick(e){var t,n,i,o,r,s,a;let{control:l}=this;if((0,p.isFunction)(l.exec)){let c=null!=(i=null!=(n=null==(t=this.toolbar)?void 0:t.getTarget(this))?n:this.target)?i:null,u=l.exec(this.j,c,{control:l,originalEvent:e,button:this});if(!1!==u&&!0!==u&&(null==(r=null==(o=this.j)?void 0:o.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!==u)return}return l.list?this.__openControlList(l):(0,p.isFunction)(l.popup)?this.onTriggerClick(e):void((l.command||l.name)&&((0,_.call)((0,f.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 n=[this];for(let e=this.parentElement;e;e=e.parentElement){if(o.Component.isInstanceOf(e,D.Popup)&&e.keepOpen&&(!this.target||this.target.isConnected)){n.forEach(e=>e.__closePopup()),e.updatePosition();return}o.Component.isInstanceOf(e,i)&&n.push(e)}null==(t=null==(e=this.j)?void 0:e.e)||t.fire("closeAllPopups")}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,n=null){super(e),this.control=t,this.target=n,this.state=j(T({},(0,S.UIButtonState)()),{theme:"toolbar",currentValue:"",hasTrigger:!1}),this.__typed="",this.__typedAt=0,this.__typedTo=null,this.openedPopup=null;let i=this.getElm("button");(0,y.assert)(i,"Element button should exists"),this.button=i,Object.defineProperty(i,"component",{value:this,configurable:!0});let o=this.getElm("trigger");(0,y.assert)(o,"Element trigger should exists"),this.trigger=o,o.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])})}};A([l.cacheHTML],P.prototype,"createContainer",null),A([(0,u.watch)("state.hasTrigger",{immediately:!1})],P.prototype,"onChangeHasTrigger",null),A([(0,u.watch)("trigger:click")],P.prototype,"onTriggerClick",null),A([(0,u.watch)("trigger:keydown")],P.prototype,"onTriggerKeyDown",null),A([(0,u.watch)("button:keydown")],P.prototype,"onButtonKeyDown",null),A([a.autobind],P.prototype,"__onPopupKeyDown",null),A([a.autobind],P.prototype,"__onEditorKeyDown",null),A([a.autobind],P.prototype,"onOutsideClick",null),A([a.autobind],P.prototype,"__closePopup",null),P=i=A([c.component],P)},80319:function(e,t,n){n.d(t,{ToolbarContent:function(){return l}});var i=n(65478),o=n(22732),r=n(21537),s=n(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,n;let{control:i}=this,s=i.getContent(this.j,this);((0,r.isString)(s)||s.parentNode!==this.container)&&(o.Dom.detach(this.container),o.Dom.append(this.container,(0,r.isString)(s)?this.j.create.fromHTML(s):s)),this.state.disabled=!!(null==(e=i.isDisabled)?void 0:e.call(i,this.j,this)),this.state.activated=!!(null==(t=i.isActive)?void 0:t.call(i,this.j,this)),null==(n=i.update)||n.call(i,this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),o.Dom.each(this.container,e=>{o.Dom.isTag(e,a)&&(0,r.attr)(e,"disabled",this.state.disabled||null)})}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,n=null){super(e),this.control=t,this.target=n,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],l)},36646:function(e,t,n){n.d(t,{ToolbarButton:function(){return i.ToolbarButton},ToolbarContent:function(){return o.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var i=n(78644),o=n(80319),r=n(83111)},83111:function(e,t,n){n.d(t,{ToolbarSelect:function(){return l}});var i=n(65478),o=n(72430),r=n(70799),s=n(29960),a=n(78644);let l=class e extends a.ToolbarButton{className(){return"ToolbarSelect"}get isToggle(){return!1}update(){var e,t,n;super.update(),this.state.icon.name="";let{list:i,data:s}=this.control;if(i){let a=this.state.value||(s&&(0,r.isString)(s.currentValue)?s.currentValue:void 0);a||(a=Object.keys(i)[0]);let l=((0,o.isPlainObject)(i)&&i[a.toString()]||a).toString();this.state.text=null!=(n=null==(t=(e=this.control).textTemplate)?void 0:t.call(e,this.jodit,l))?n:l}}updateAriaLabel(){var e;super.updateAriaLabel();let{tooltip:t}=this.state,n=null==(e=this.text.textContent)?void 0:e.trim();t&&n&&(0,s.attr)(this.button,"aria-label",`${this.jodit.i18n(t)}, ${n}`)}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],l)},11676:function(e,t,n){n.d(t,{ToolbarCollection:function(){return f}});var i=n(65478),o=n(45219),r=n(87325),s=n(97357),a=n(37133),l=n(29960),c=n(41180),u=n(82760),d=n(24536),h=n(21491),p=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let f=class e extends d.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,u.error)("The method is not implemented for this class.")}build(e,t=null){let n=this.j.e.fire("beforeToolbarBuild",e);return n&&(e=n),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"),o.autobind],f.prototype,"__immediateUpdate",null),p([(0,i.debounce)(e=>e.j.defaultTimeout,!0)],f.prototype,"update",null),p([(0,s.hook)("ready")],f.prototype,"__initEvents",null),f=p([r.component],f)},37426:function(e,t,n){n.d(t,{ToolbarEditorCollection:function(){return l}});var i=n(82758),o=n(65478),r=n(22732),s=n(21537),a=n(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 n=void 0===e.control.mode?i.MODE_WYSIWYG:e.control.mode;return n!==i.MODE_SPLIT&&n!==this.j.getRealMode()}shouldBeActive(e){let t,n=super.shouldBeActive(e);if(void 0!==n)return n;let i=this.j.selection?this.j.s.current():null;if(!i)return!1;if(e.control.tags){let n=e.control.tags;if(t=i,r.Dom.up(t,e=>{if(e&&-1!==n.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let n=e.control.css;if(t=i,r.Dom.up(t,e=>{if(e&&!r.Dom.isText(e)&&!r.Dom.isComment(e))return this.checkActiveStatus(n,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 n=0,i=0;return Object.keys(e).forEach(o=>{let r=e[o];(0,s.isFunction)(r)?r(this.j,(0,s.css)(t,o).toString())&&(n+=1):-1!==r.indexOf((0,s.css)(t,o).toString())&&(n+=1),i+=1}),i===n},this.prependInvisibleInput(this.container)}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([o.component],l)},21491:function(e,t,n){n.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var i=n(87325),o=n(23282),r=n(19306);function s(e,t){let n=(0,i.getComponentClass)("ToolbarCollection"),o=(0,i.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new o(e):new n(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,n=null){if((0,o.isFunction)(t.getContent))return new((0,i.getComponentClass)("ToolbarContent"))(e,t,n);let r=new((0,i.getComponentClass)("ToolbarButton"))(e,t,n);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,n=null){return new((0,i.getComponentClass)("ToolbarSelect"))(e,t,n)}},80536:function(e,t,n){var i=n(68345),o=n(19306),r=n(29960),s=n(6441),a=n(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){return`files[${e}]`},withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData(e){return e},isSuccess(e){return e.success},getMessage(e){return void 0!==e.data.messages&&(0,i.isArray)(e.data.messages)?e.data.messages.join(" "):""},processFileName(e,t,n){return[e,t,n]},process(e){return e.data},error(e){this.j.message.error(e.message,4e3)},getDisplayName(e,t){return e+t},defaultHandlerSuccess(e){let t=this.j||this;if(!(0,o.isJoditObject)(t))return;let{baseurl:n}=e;(0,a.getItems)(e).forEach(({file:e,isImage:i})=>{let[o,s]=i?["img","src"]:["a","href"],a=t.createInside.element(o);(0,r.attr)(a,s,n+e),"a"===o&&(a.textContent=t.o.uploader.getDisplayName.call(this,n,e)),"img"===o?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},promptOnExists:!0,promptOnExistsSuggestName(e){return e},contentType(e){return(void 0===this.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},83987:function(e,t,n){n.d(t,{buildData:function(){return o}});var i=n(21537);function o(e,t){if((0,i.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let n=e.ow.FormData;if(void 0!==n){if(t instanceof n||(0,i.isString)(t))return t;let e=new n;return Object.keys(t).forEach(n=>{e.append(n,t[n])}),e}return t}},74569:function(e,t,n){n.d(t,{dataURItoBlob:function(){return i}});function i(e){var t,n;let[i,...o]=e.split(","),r=o.join(","),s=null!=(n=null==(t=i.split(":")[1])?void 0:t.split(";")[0])?n:"",a=/;base64/i.test(i)?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})}},94122:function(e,t,n){n.d(t,{ajaxInstances:function(){return r.ajaxInstances},hasFiles:function(){return a},hasItems:function(){return l},normalizeUploaderData:function(){return i.normalizeUploaderData},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return r.send},sendFiles:function(){return s.sendFiles}}),n(83987);var i=n(2073),o=n(50373),r=n(71686),s=n(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,n){n.d(t,{getItems:function(){return a},normalizeUploaderData:function(){return l}});var i=n(68345),o=n(70799);function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function s(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function a(e){let{files:t,isImages:n,fileNames:o,items:s}=e;return(0,i.isArray)(t)?t.map((e,t)=>{let i=null==o?void 0:o[t];return r({file:e,isImage:!!(null==n?void 0:n[t])},void 0!==i?{name:i}:{})}):null!=s?s:[]}function l(e){if(!e||"object"!=typeof e)return e;let{files:t,items:n}=e;if(!n||(0,i.isArray)(t)&&(t.length||!n.length))return s(r({},e),{items:a(e)});let l=n.map(({name:e})=>e);return s(r(s(r({},e),{files:n.map(({file:e})=>e),isImages:n.map(({isImage:e})=>e)}),l.every(o.isString)?{fileNames:l}:{}),{items:n})}},50373:function(e,t,n){n.d(t,{processOldBrowserDrag:function(){return c}});var i=n(82758),o=n(22732),r=n(580),s=n(21537),a=n(74569),l=n(80020);function c(e,t,n,c,u){if(t&&(!t.types.length||t.types[0]!==i.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});o.Dom.append((0,r.getContainer)(e.j,e.constructor),t);let i=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(o.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";i&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],n,c).finally(u)}},e.j.defaultTimeout)}}},80020:function(e,t,n){n.d(t,{sendFiles:function(){return function e(t,n,d,h,p,f){var m;return(m=function*(){if(!n)throw(0,o.error)("Need files");let{o:u}=t,m=(0,o.toArray)(n);if(!m.length)throw(0,o.error)("Need files");let g=null==f?void 0:f.data;if(!f&&(0,o.isFunction)(u.beforeUpload)){let e;try{e=yield u.beforeUpload.call(t,m)}catch(e){throw(h||u.defaultHandlerError).call(t,e),e}if(!1===e){let e=(0,o.error)("Upload canceled");throw(h||u.defaultHandlerError).call(t,e),e}if((0,o.isArray)(e)?m=e:(0,o.isPlainObject)(e)&&(0,o.isArray)(e.files)&&(m=e.files,g=e.data),!m.length)return[]}let b=[];if(u.insertImageAsBase64URI&&function(e,t,n,i,r,s){let l,c,u=[];for(c=0;c<e.length;c+=1)if((l=e[c])&&l.type){let d=l.type.match(/\/([a-z0-9]+)/i),h=d[1]?d[1].toLowerCase():"";if(!t.includes(h))continue;let p=new FileReader,{name:f}=l,m=i.j.async.promise((e,t)=>{p.onerror=t,p.onloadend=()=>{let t=(0,a.normalizeUploaderData)({baseurl:"",items:[{file:p.result,isImage:!0,name:f}]});((0,o.isFunction)(r)?r:s).call(i,t),e(t)},p.readAsDataURL(l)});u.push(m),n.push(m),e[c]=null}u.length&&Promise.all(u).then(()=>{i.j.events&&i.j.e.fire("filesWereUploaded")}).catch(()=>{})}(m,u.imagesExtensions,b,t,d,u.defaultHandlerSuccess),(m=m.filter(e=>e)).length){let n,f=new FormData;f.append(u.pathVariableName,t.path),f.append("source",t.source);for(let e=0;e<m.length;e+=1)if(n=m[e]){let i=/\.\w+$/.test(n.name),o=n.type.match(/\/([a-z0-9]+)/i),r=o&&o[1]?o[1].toLowerCase():"",s=m[e].name||Math.random().toString().replace(".","");if(!i&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[a,l,c]=u.processFileName.call(t,u.filesVariableName(e),m[e],s);f.append(a,l,c)}p&&p(f),u.data&&(0,o.isPlainObject)(u.data)&&Object.keys(u.data).forEach(e=>{f.append(e,u.data[e])}),g&&Object.keys(g).forEach(e=>{f.append(e,g[e])}),u.prepareData.call(t,f),b.push((0,l.send)(t,f).then(n=>{if(u.isSuccess.call(t,n))return((0,o.isFunction)(d)?d:u.defaultHandlerSuccess).call(t,(0,a.normalizeUploaderData)(u.process.call(t,n))),n;let l=new c.UploadError(u.getMessage.call(t,n),n,m,n=>{var i;return e(t,null!=(i=null==n?void 0:n.files)?i:m,d,h,p,{data:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},g,null==n?void 0:n.data)})});return l.code===i.ERROR_CODE_CONFLICT&&u.promptOnExists?function(e,t){let{files:n}=t;if(n.length>1)return n.reduce((e,n)=>e.then(()=>t.retry({files:[n]})),Promise.resolve());let[i]=n,{j:o,o:a}=e;return new Promise(n=>{let l=!1,c=s.Prompt.call(r.Dlgs.prototype.dlg.call(o,{closeOnClickOverlay:!0}),o.i18n(t.message),o.i18n("Rename"),e=>{if(!(e=e.trim()))return!1;l=!0,n(t.retry({files:[new File([i],e,{type:i.type})]}))},o.i18n("Enter new name"),a.promptOnExistsSuggestName.call(e,i.name));c.e.on(c,"afterClose",()=>{l||n(void 0)})})}(t,l):(((0,o.isFunction)(h)?h:u.defaultHandlerError).call(t,l),n)}).then(()=>{t.j.events&&t.j.e.fire("filesWereUploaded")}))}return Promise.all(b)},function(){var e=this,t=arguments;return new Promise(function(n,i){var o=m.apply(e,t);function r(e){u(o,n,i,r,s,"next",e)}function s(e){u(o,n,i,r,s,"throw",e)}r(void 0)})})()}}});var i=n(82758),o=n(21537),r=n(70231),s=n(36806),a=n(2073),l=n(71686),c=n(76198);function u(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}},71686:function(e,t,n){n.d(t,{send:function(){return a}});var i=n(21537),o=n(41601),r=n(83987);let s=new WeakMap;function a(e,t){let n=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,n)=>{let r=new o.Ajax({xhr:()=>{let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(n(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;n(t*=100)}},!1)):n(100),t},method:e.o.method||"POST",data:t,url:(0,i.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,i.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,i.isPromise)(n))?n.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(n,a)}n.d(t,["ajaxInstances",0,s])},76198:function(e,t,n){n.d(t,{UploadError:function(){return o}});var i=n(89890);class o extends i.AnswerError{constructor(e,t,n,i){var r;super(e,t,null==(r=t.data)?void 0:r.code),this.files=n,this.retry=i,Object.setPrototypeOf(this,o.prototype)}}},57380:function(e,t,n){n.d(t,{Uploader:function(){return u}});var i=n(91907),o=n(82758),r=n(2748),s=n(21537),a=n(89890),l=n(6441),c=n(94122);n(80536);class u extends i.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,n){let i=()=>{e.classList.remove("jodit_drag_hover")},r=this,s=e=>{let s,a,l,u=e.clipboardData,d=e=>{a&&(e.append("extension",l),e.append("mimetype",a.type))};if(!o.IS_IE&&(0,c.hasFiles)(u))return(0,c.sendFiles)(r,u.files,t,n).finally(i),!1;if(o.IS_IE&&!o.IS_ES_NEXT)return(0,c.processOldBrowserDrag)(r,u,t,n,i);if((0,c.hasItems)(u)){let{items:o}=u;for(s=0;s<o.length;s+=1)if("file"===o[s].kind&&"image/png"===o[s].type){if(a=o[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);l=e[1]?e[1].toLowerCase():"",(0,c.sendFiles)(r,[a],t,n,d).finally(i)}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,n,i)}attachEvents(e,t,n,i){let o=this;o.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)(o,r.dataTransfer.files,t,n).finally(i))});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&&o.j.e.on(a,"change",()=>{(0,c.sendFiles)(o,a.files,t,n).then(()=>{a.value="",/safari/i.test(navigator.userAgent)||(a.type="",a.type="file")}).finally(i)})}uploadRemoteImage(e,t,n){let i=this,{o}=i,r=(0,s.isFunction)(n)?n:o.defaultHandlerError;(0,c.send)(i,{action:"fileUploadRemote",url:e}).then(e=>{var n;o.isSuccess.call(i,e)?((0,s.isFunction)(t)?t:o.defaultHandlerSuccess).call(i,(0,c.normalizeUploaderData)(o.process.call(i,e))):r.call(i,(0,a.answer)(o.getMessage.call(i,e),e,null==(n=e.data)?void 0:n.code))}).catch(e=>r.call(i,e))}upload(e){return this.async.promise((t,n)=>{let i=!1,o=e=>t=>{i=!0,e(t)};(0,c.sendFiles)(this,e,o(t),o(n)).then(()=>{i||t({baseurl:"",items:[],files:[],isImages:[]})},o(n))})}destruct(){this.setStatus(i.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,n){var i=n(82758),o=n(22732),r=n(21537),s=n(67510),a=n(37068);s.Icon.set("palette",a.default),n.d(t,["ColorPickerWidget",0,(e,t,n)=>{var a;let l="jodit-color-picker",c=(0,r.normalizeColor)(n),u=e.c.div(l),d=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(n=>{t.push(`<div class="${l}__group ${l}__group-${n}">`),t.push(h(e[n])),t.push("</div>")}):(0,r.isArray)(e)&&e.forEach(e=>{let n=c===e;t.push(`<button type="button" class='${l}__color-item ${n?l+"__color-item_active_true":""}' title="${e}" aria-pressed="${n}" 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);o.Dom.append(u,e.c.fromHTML(`<div class="${l}__groups">${p}</div>`));let f=(0,r.toArray)(u.querySelectorAll(`.${l}__color-item`)),m=null!=(a=f.find(e=>"true"===(0,r.attr)(e,"aria-pressed")))?a:f[0];m&&(0,r.attr)(m,"tabindex",0),o.Dom.append(u,e.c.fromHTML(`<div data-ref="extra" class="${l}__extra"></div>`));let{extra:g}=(0,r.refs)(u);o.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)(u),v=null,y=()=>{let e=b.value.trim();if(e===v)return;let n=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),i=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!n&&!i)return;let o=(0,r.normalizeColor)(n&&!e.startsWith("#")?"#"+e:e);o&&(0,r.isFunction)(t)&&(v=e,t(o))};e.e.on(b,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),y())}).on(b,"change",e=>{e.stopPropagation(),y()}),o.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)()&&(o.Dom.append(g,e.c.fromHTML(`<div class="${l}__native">${d}<input type="color" value="#ffffff"/></div>`)),e.e.on(u,"change",e=>{e.stopPropagation();let n=e.target;if(!n||!n.tagName||!o.Dom.isTag(n,"input")||"color"!==n.type)return;let i=n.value||"";(0,r.isFunction)(t)&&t(i),e.preventDefault()}));let w=e=>{let t=o.Dom.closest(e,e=>o.Dom.isHTMLElement(e)&&(e.classList.contains(l+"__color-item")||e.classList.contains(l+"__remove")),u);return t?(0,r.attr)(t,"-color")||"":void 0},_=e=>{t&&(0,r.isFunction)(t)&&t(e)},S=!1;return e.e.on(u,"mousedown touchend",e=>{if(o.Dom.isTag(e.target,"input"))return void e.stopPropagation();e.stopPropagation(),e.preventDefault();let t=w(e.target);void 0!==t&&(S="mousedown"===e.type,_(t))}),e.e.on(u,"click",e=>{let t=w(e.target);void 0===t||S||_(t),S=!1}).on(u,"keydown",e=>{var t;S=!1;let n=e.target;f.includes(n)&&[i.KEY_LEFT,i.KEY_RIGHT,i.KEY_UP,i.KEY_DOWN].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),null==(t=((e,t)=>{let n=f.indexOf(e);if(t===i.KEY_LEFT||t===i.KEY_RIGHT){let o=t===i.KEY_LEFT?-1:1;return f[n+("rtl"===(0,r.css)(e,"direction")?-o:o)]}let o=t===i.KEY_DOWN,s=f.filter(t=>o?t.offsetTop>e.offsetTop:t.offsetTop<e.offsetTop);if(!s.length)return;let a=(o?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)})(n,e.key))||t.focus())}).on(u,"focusin",e=>{f.includes(e.target)&&f.forEach(t=>(0,r.attr)(t,"tabindex",t===e.target?0:-1))}),e.e.fire("afterGenerateColorPicker",u,g,t,c),u}])},37068:function(e,t){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,n){var i=n(2748),o=n(21537),r=n(67510),s=n(38927);let a=(e,t,{label:n,accept:i})=>{let o=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(n)}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${i}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(o,n=>{t.call(e,n),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:o}};function l(e,t,n){let r=i.Dom.first(e,e=>i.Dom.isTag(e,"input")&&(0,o.attr)(e,"name")===t);return r?(n&&(r.value=n),r.value):""}n.d(t,["FileSelectorWidget",0,(e,t,n,c,u=!0)=>{let d,h=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:n}=t;h.push(a(e,t=>{let i=(0,o.isFunction)(n)?n:p.defaultHandlerSuccess;(0,o.isFunction)(i)&&i.call(e,t)},u?{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,u)}}),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])]);n&&!i.Dom.isText(n)&&!i.Dom.isComment(n)&&(i.Dom.isTag(n,"img")||(0,o.$$)("img",n).length)&&(d="IMG"===n.tagName?n:(0,o.$$)("img",n)[0],l(a.container,"url",(0,o.attr)(d,"src")),l(a.container,"text",(0,o.attr)(d,"alt")),s.state.text="Update"),n&&i.Dom.isTag(n,"a")&&(l(a.container,"url",(0,o.attr)(n,"href")),l(a.container,"text",(0,o.attr)(n,"title")),s.state.text="Update"),a.onSubmit(n=>{(0,o.isFunction)(t.url)&&t.url.call(e,n.url,n.text)}),h.push({icon:"link",name:"URL",content:a.container})}let f=(0,s.TabsWidget)(e,h);return f.classList.add("jodit-file-selector"),f},"UploadTab",0,a])},92762:function(e,t,n){n.d(t,{ColorPickerWidget:function(){return i.ColorPickerWidget},FileSelectorWidget:function(){return o.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget},UploadTab:function(){return o.UploadTab}});var i=n(22859),o=n(34793),r=n(38927)},38927:function(e,t,n){var i=n(91907),o=n(2748),r=n(23282),s=n(29960),a=n(67510),l=n(20014);n.d(t,["TabsWidget",0,(e,t,n)=>{let c=e.c.div("jodit-tabs"),u=e.c.div("jodit-tabs__wrapper"),d=e.c.div("jodit-tabs__buttons");(0,s.attr)(d,{role:"tablist","aria-orientation":"horizontal"});let h={},p=[],f="";o.Dom.append(c,d),o.Dom.append(c,u);let m=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()),f||(f=g),o.Dom.append(d,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"):o.Dom.append(v,i.Component.isInstanceOf(b,a.UIElement)?b.container:b),o.Dom.append(u,v),y.onAction(()=>(m(g),(0,r.isFunction)(b)&&!o.Dom.isElement(b)&&b.call(e),n&&(n.activeTab=g),(0,l.focusFormField)(v),!1)),h[g]={button:y,tab:v}}),m(n&&n.activeTab&&h[n.activeTab]?n.activeTab:f),n){let e=n.activeTab;Object.defineProperty(n,"activeTab",{configurable:!0,enumerable:!1,get(){return e},set(t){e=t,m(t)}})}return c}])},73391:function(e,t,n){var i=n(82758),o=n(580),r=n(21537),s=n(12153),a=n(6441),l=n(49399);a.Config.prototype.controls.about={exec:e=>{let t=e.dlg({closeOnClickOverlay:!0}),n=e.i18n.bind(e);t.setMod("theme",e.o.theme).setHeader(n("About Jodit")).setContent(`<div class="jodit-about">
109
+ </form>`)}])},41409:function(e,t,n){n.r(t),n.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 f.Button},CommitStyle:function(){return T.CommitStyle},Component:function(){return i.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return c.Create},Dialog:function(){return s.Dialog},Dom:function(){return u.Dom},EventEmitter:function(){return d.EventEmitter},EventHandlersStore:function(){return d.EventHandlersStore},Eventify:function(){return d.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return o},History:function(){return b.History},Icon:function(){return f.Icon},ImageEditor:function(){return y.ImageEditor},IndexedDBProvider:function(){return j.IndexedDBProvider},LazyWalker:function(){return u.LazyWalker},LocalStorageProvider:function(){return j.LocalStorageProvider},MemoryStorageProvider:function(){return j.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return I.PluginSystem},Popup:function(){return f.Popup},ProgressBar:function(){return f.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return i.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 S.Table},ToolbarButton:function(){return k.ToolbarButton},ToolbarCollection:function(){return C.ToolbarCollection},ToolbarContent:function(){return k.ToolbarContent},ToolbarEditorCollection:function(){return E.ToolbarEditorCollection},ToolbarSelect:function(){return k.ToolbarSelect},UIBlock:function(){return f.UIBlock},UIButton:function(){return f.UIButton},UIButtonGroup:function(){return f.UIButtonGroup},UIButtonState:function(){return f.UIButtonState},UICheckbox:function(){return f.UICheckbox},UIElement:function(){return f.UIElement},UIFileInput:function(){return f.UIFileInput},UIForm:function(){return f.UIForm},UIGroup:function(){return f.UIGroup},UIInput:function(){return f.UIInput},UIList:function(){return f.UIList},UIMessages:function(){return w.UIMessages},UISelect:function(){return f.UISelect},UISeparator:function(){return f.UISeparator},UISpacer:function(){return f.UISpacer},UITextArea:function(){return f.UITextArea},UITooltip:function(){return f.UITooltip},Uploader:function(){return D.Uploader},View:function(){return m.View},ViewComponent:function(){return i.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return j.canUseIndexedDB},canUsePersistentStorage:function(){return j.canUsePersistentStorage},clearUseIndexedDBCache:function(){return j.clearUseIndexedDBCache},defaultNameSpace:function(){return d.defaultNameSpace},observable:function(){return d.observable}});var i=n(91907),o=n(21537),r=n(80870),s=n(638),a=n(78513),l=n(8884),c=n(12060),u=n(22732),d=n(3827),h=n(50911),p=n(41601),f=n(67510),m=n(35608),g=n(84075),b=n(78818),v=n(52604),y=n(50050),w=n(1808),_=n(23512),S=n(76014),k=n(36646),C=n(11676),E=n(37426),D=n(57380),I=n(41876),T=n(59242),j=n(12081)},68389:function(e,t,n){n.d(t,{UIMessage:function(){return r}});var i=n(87325),o=n(67510);let r=class e extends o.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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],r)},1808:function(e,t,n){n.d(t,{UIMessages:function(){return l}});var i=n(87325),o=n(2748),r=n(41180),s=n(62405),a=n(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,n){this.__message(e,t,n)}__message(e,t="info",n){let i=e+":"+t;if(this.__messages.has(i))return void this.async.updateTimeout(i,n||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+i);o.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(i);let s=this.__getRemoveCallback(r,i);this.j.e.on(r.container,"pointerdown",s),this.async.setTimeout(s,{label:i,timeout:n||this.options.defaultTimeout})}__getRemoveCallback(e,t){let n=i=>{i&&i.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",n),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return n}__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,n={defaultTimeout:3e3,defaultOffset:5}){super(e),this.__box=t,this.options=n,this.__messages=new Set}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],l)},23512:function(e,t,n){n.d(t,{StatusBar:function(){return l}});var i=n(91907),o=n(65478),r=n(2748),s=n(14316),a=n(34176);let l=class e extends i.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 n=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&n.classList.add(this.getFullElName("item-right")),r.Dom.append(n,e),this.container&&r.Dom.append(this.container,n),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(i.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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([o.component,(0,o.derive)(a.Mods,s.Elms)],l)},76014:function(e,t,n){n.d(t,{Table:function(){return d}});var i=n(91907),o=n(82758),r=n(22732),s=n(580),a=n(21537),l=n(41180);let c=new Set(["thead","tbody","tfoot"]),u=new WeakMap;class d extends i.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 n=d.__selectedByTable.get(t)||new Set;n.add(e),d.__selectedByTable.set(t,n)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=r.Dom.closest(e,"table",this.j.editor);if(t){let n=d.__selectedByTable.get(t);n&&(n.delete(e),n.size||d.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,a.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=d.__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 d.__getRowsCount(e)}static __getColumnsCount(e){return d.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return d.__getColumnsCount(e)}static __formalMatrix(e,t){let n=[[]],i=(0,a.toArray)(e.rows),o=(e,i)=>{void 0===n[i]&&(n[i]=[]);let o=e.colSpan,r=e.rowSpan,s,a,l=0;for(;n[i][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<o;s+=1){if(void 0===n[i+a]&&(n[i+a]=[]),t&&!1===t(e,i+a,l+s,o,r))return!1;n[i+a][l+s]=e}};for(let e=0;e<i.length;e+=1){let t=(0,a.toArray)(i[e].cells);for(let i=0;i<t.length;i+=1)if(!1===o(t[i],e))return n}return n}formalMatrix(e,t){return d.__formalMatrix(e,t)}static __formalCoordinate(e,t,n=!1){let i=0,o=0,r=1,s=1;return d.__formalMatrix(e,(e,a,l,c,u)=>{if(t===e)return i=a,o=l,r=c||1,s=u||1,n&&(o+=(c||1)-1,i+=(u||1)-1),!1}),[i,o,r,s]}formalCoordinate(e,t,n=!1){return d.__formalCoordinate(e,t,n)}static __appendRow(e,t,n,i){let o;if(t)o=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 n=parseInt(t,10)-1;(0,a.attr)(e,"rowspan",n>1?n:null)}}),r.Dom.each(o,e=>{r.Dom.isCell(e)&&(r.Dom.detach(e),r.Dom.append(e,i.element("br")))});else{let t=d.__getColumnsCount(e);o=i.element("tr");for(let e=0;e<t;e+=1){let e=i.element("td");r.Dom.append(e,i.element("br")),r.Dom.append(o,e)}}let s=t&&t.parentElement;if(n&&t&&!t.nextElementSibling&&r.Dom.isTag(s,"thead")){let t=d.__bodyOf(e,s,i);t.insertBefore(o,t.firstChild),d.__setCellsTag(o,"td",i)}else n&&t&&t.nextSibling?r.Dom.after(t,o):!n&&t?r.Dom.before(t,o):r.Dom.append(r.Dom.first(e,e=>r.Dom.isTag(e,"tbody"))||e,o)}static __bodyOf(e,t,n){let i=e.tBodies[0];return i||(i=n.element("tbody"),r.Dom.after(t,i)),i}static __setCellsTag(e,t,n,i){(0,a.toArray)(e.cells).forEach(e=>{let o=r.Dom.isTag(e,t)?e:r.Dom.replace(e,t,n,!0);o!==e&&(null==i||i.set(e,o)),"td"===t?(0,a.attr)(o,"scope",null):o.hasAttribute("scope")||(0,a.attr)(o,"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,n=this.j.createInside,i=e.tHead;if(!this.canToggleHeaderRow(e))return t;if(i&&this.hasHeaderRow(e)){let o=d.__bodyOf(e,i,n),s=o.firstChild;(0,a.toArray)(i.rows).forEach(e=>{o.insertBefore(e,s),d.__setCellsTag(e,"td",n,t)}),r.Dom.safeRemove(i)}else{let[o]=(0,a.toArray)(e.rows),s=i||n.element("thead");i||(e.tHead=s),r.Dom.append(s,o),d.__setCellsTag(o,"th",n,t)}return t}appendRow(e,t,n){return d.__appendRow(e,t,n,this.j.createInside)}static __removeRow(e,t){let n,i=d.__formalMatrix(e),o=e.rows[t];i[t].forEach((s,l)=>{if(n=!1,t-1>=0&&i[t-1][l]===s)n=!0;else if(i[t+1]&&i[t+1][l]===s){if(s.parentNode===o&&s.parentNode.nextSibling){n=!0;let o=l+1;for(;i[t+1][o]===s;)o+=1;let a=r.Dom.next(s.parentNode,e=>r.Dom.isTag(e,"tr"),e);if(a){let e=null;for(let n=o;n<i[t+1].length;n+=1){let o=i[t+1][n];if(o&&o.parentNode===a){e=o;break}}e?r.Dom.before(e,s):r.Dom.append(a,s)}}}else r.Dom.safeRemove(s);if(n&&(s.parentNode===o||s!==i[t][l-1])){let e=s.rowSpan;(0,a.attr)(s,"rowspan",e-1>1?e-1:null)}});let s=o.parentElement;r.Dom.safeRemove(o),r.Dom.isTag(s,c)&&!s.rows.length&&r.Dom.safeRemove(s)}removeRow(e,t){return d.__removeRow(e,t)}appendColumn(e,t,n=!0){let i=d.__formalMatrix(e);if(!n&&r.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,o]=d.__formalCoordinate(e,t,n),s=n?o+1:o;for(let e=0;e<i.length;){let t=i[e];if(t[o]!==t[s]||o===s){let e=this.j.createInside.element("td");r.Dom.append(e,this.j.createInside.element("br")),n?r.Dom.after(t[o],e):r.Dom.before(t[o],e),t[o].rowSpan>1&&(e.rowSpan=t[o].rowSpan)}else t[o].colSpan+=1;e+=t[o].rowSpan||1}}static __removeColumn(e,t){let n,i=d.__formalMatrix(e);i.forEach((e,o)=>{let s=e[t];if(n=!1,t-1>=0&&i[o][t-1]===s||t+1<e.length&&i[o][t+1]===s?n=!0:r.Dom.safeRemove(s),n&&(o-1<0||s!==i[o-1][t])){let e=s.colSpan;(0,a.attr)(s,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return d.__removeColumn(e,t)}static __getSelectedBound(e,t){let n,i,o,r=[[1/0,1/0],[0,0]],s=d.__formalMatrix(e);for(n=0;n<s.length;n+=1)for(i=0;s[n]&&i<s[n].length;i+=1)t.includes(s[n][i])&&(r[0][0]=Math.min(n,r[0][0]),r[0][1]=Math.min(i,r[0][1]),r[1][0]=Math.max(n,r[1][0]),r[1][1]=Math.max(i,r[1][1]));for(n=r[0][0];n<=r[1][0];n+=1)for(o=1,i=r[0][1];i<=r[1][1];i+=1){for(;s[n]&&s[n][i-o]&&s[n][i]===s[n][i-o];)r[0][1]=Math.min(i-o,r[0][1]),r[1][1]=Math.max(i-o,r[1][1]),o+=1;for(o=1;s[n]&&s[n][i+o]&&s[n][i]===s[n][i+o];)r[0][1]=Math.min(i+o,r[0][1]),r[1][1]=Math.max(i+o,r[1][1]),o+=1;for(o=1;s[n-o]&&s[n][i]===s[n-o][i];)r[0][0]=Math.min(n-o,r[0][0]),r[1][0]=Math.max(n-o,r[1][0]),o+=1;for(o=1;s[n+o]&&s[n][i]===s[n+o][i];)r[0][0]=Math.min(n+o,r[0][0]),r[1][0]=Math.max(n+o,r[1][0]),o+=1}return r}getSelectedBound(e,t){return d.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],n=d.__formalMatrix(e);d.__removeExtraColspans(n,t),d.__removeExtraRowspans(n,t);for(let e=0;e<n.length;e+=1)for(let t=0;t<n[e].length;t+=1)void 0!==n[e][t]&&(n[e][t].hasAttribute("rowspan")&&1===n[e][t].rowSpan&&(0,a.attr)(n[e][t],"rowspan",null),n[e][t].hasAttribute("colspan")&&1===n[e][t].colSpan&&(0,a.attr)(n[e][t],"colspan",null),n[e][t].hasAttribute("class")&&!(0,a.attr)(n[e][t],"class")&&(0,a.attr)(n[e][t],"class",null));d.__unmark(t)}static __removeExtraColspans(e,t){for(let n=0;n<e[0].length;n+=1){let i=1e6,o=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][n]){if(e[t][n].colSpan<2){o=!0;break}i=Math.min(i,e[t][n].colSpan)}if(!o)for(let o=0;o<e.length;o+=1)void 0!==e[o][n]&&d.__mark(e[o][n],"colspan",e[o][n].colSpan-i+1,t)}}static __removeExtraRowspans(e,t){let n,i;for(n=0;n<e.length;n+=1){let o=1e6,r=!1;for(i=0;i<e[n].length;i+=1)if(void 0!==e[n][i]){if(e[n][i].rowSpan<2){r=!0;break}o=Math.min(o,e[n][i].rowSpan)}if(!r)for(i=0;i<e[n].length;i+=1)void 0!==e[n][i]&&d.__mark(e[n][i],"rowspan",e[n][i].rowSpan-o+1,t)}}normalizeTable(e){return d.__normalizeTable(e)}static __mergeSelected(e,t){let n=[],i=d.__getSelectedBound(e,d.__getSelectedCellsByTable(e)),s=0,c=null,u=0,p=0,f=0,m=new Set,g=[];i&&(i[0][0]-i[1][0]||i[0][1]-i[1][1])&&(d.__formalMatrix(e,(e,o,r,b,v)=>{o>=i[0][0]&&o<=i[1][0]&&r>=i[0][1]&&r<=i[1][1]&&(m.has(e)||(m.add(e),o===i[0][0]&&(0,l.cssInline)(e,"width")&&(s+=e.offsetWidth),""!==(0,a.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&n.push(e.innerHTML),b>1&&(p+=b-1),v>1&&(f+=v-1),c?(d.__mark(e,"remove",1,g),h(t).removeSelection(e)):(c=e,u=r)))}),p=i[1][1]-i[0][1]+1,f=i[1][0]-i[0][0]+1,c&&(p>1&&d.__mark(c,"colspan",p,g),f>1&&d.__mark(c,"rowspan",f,g),s&&(d.__mark(c,"width",(s/e.offsetWidth*100).toFixed(o.ACCURACY)+"%",g),u&&d.__setColumnWidthByDelta(e,u,0,!0,g)),c.innerHTML=n.join("<br/>")||"<br/>",h(t).addSelection(c),m.delete(c),d.__unmark(g),d.__normalizeTable(e),(0,a.toArray)(e.rows).forEach(e=>{e.cells.length||r.Dom.safeRemove(e)})))}mergeSelected(e){return d.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let n,i,o,s,a,l=[];d.__getSelectedCellsByTable(e).forEach(c=>{i=t.createInside.element("td"),r.Dom.append(i,t.createInside.element("br")),o=t.createInside.element("tr"),n=d.__formalCoordinate(e,c),c.rowSpan<2?(d.__formalMatrix(e,(e,t,i)=>{n[0]===t&&n[1]!==i&&e!==c&&d.__mark(e,"rowspan",e.rowSpan+1,l)}),r.Dom.after(r.Dom.closest(c,"tr",e),o),r.Dom.append(o,i)):(d.__mark(c,"rowspan",c.rowSpan-1,l),d.__formalMatrix(e,(t,i,o)=>{i>n[0]&&i<n[0]+c.rowSpan&&n[1]>o&&t.parentNode.rowIndex===i&&(a=t),n[0]<i&&t===c&&(s=e.rows[i])}),a?r.Dom.after(a,i):r.Dom.prepend(s,i)),c.colSpan>1&&d.__mark(i,"colspan",c.colSpan,l),d.__unmark(l),h(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return d.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let n,i,s,a=[];d.__getSelectedCellsByTable(e).forEach(l=>{n=d.__formalCoordinate(e,l),l.colSpan<2?d.__formalMatrix(e,(e,t,i)=>{n[1]===i&&n[0]!==t&&e!==l&&d.__mark(e,"colspan",e.colSpan+1,a)}):d.__mark(l,"colspan",l.colSpan-1,a),i=t.createInside.element("td"),r.Dom.append(i,t.createInside.element("br")),l.rowSpan>1&&d.__mark(i,"rowspan",l.rowSpan,a);let c=l.offsetWidth;r.Dom.after(l,i),s=c/e.offsetWidth/2,d.__mark(l,"width",(100*s).toFixed(o.ACCURACY)+"%",a),d.__mark(i,"width",(100*s).toFixed(o.ACCURACY)+"%",a),d.__unmark(a),h(t).removeSelection(l)}),d.__normalizeTable(e)}splitVertical(e){return d.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,n,i,r){let s=d.__formalMatrix(e),a=0;for(let i=0;i<s.length;i+=1){let l=s[i][t];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+n)/e.offsetWidth*100;d.__mark(l,"width",c.toFixed(o.ACCURACY)+"%",r),a=i;break}for(let e=a+1;e<s.length;e+=1){let n=s[e][t];d.__mark(n,"width",null,r)}i||d.__unmark(r)}setColumnWidthByDelta(e,t,n,i,o){return d.__setColumnWidthByDelta(e,t,n,i,o)}static __mark(e,t,n,i){var o;i.push(e);let r=null!=(o=u.get(e))?o:{};r[t]=void 0===n?1:n,u.set(e,r)}static __unmark(e){e.forEach(e=>{let t=u.get(e);t&&(Object.keys(t).forEach(n=>{let i=t[n];switch(n){case"remove":r.Dom.safeRemove(e);break;case"rowspan":(0,a.attr)(e,"rowspan",(0,a.isNumber)(i)&&i>1?i:null);break;case"colspan":(0,a.attr)(e,"colspan",(0,a.isNumber)(i)&&i>1?i:null);break;case"width":null==i?(e.style.removeProperty("width"),(0,a.attr)(e,"style")||(0,a.attr)(e,"style",null)):(0,a.css)(e,"width",i.toString())}delete t[n]}),u.delete(e))})}constructor(){super(...arguments),this.selected=new Set,this.__recalculateStyles=this.async.microDebounce(()=>{let e=(0,s.getContainer)(this.j,d,"style",!0),t=[];this.selected.forEach(e=>{let n=(0,a.cssPath)(e);n&&t.push(n)});let n=t.length>1?t.map(e=>`${e}::selection,${e} ::selection`).join(",")+"{background:transparent}":"";e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`+n:""})}}d.__selectedByTable=new WeakMap;let h=e=>e.getInstance("Table",e.o)},78644:function(e,t,n){n.d(t,{ToolbarButton:function(){return P}});var i,o=n(4012),r=n(78213),s=n(82758),a=n(45219),l=n(33433),c=n(87325),u=n(37133),d=n(2748),h=n(68345),p=n(23282),f=n(19306),m=n(72430),g=n(70799),b=n(56175),v=n(87058),y=n(38837),w=n(29960),_=n(37790),S=n(62843),k=n(20014),C=n(72157),E=n(12153),D=n(56917),I=n(21491);function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function j(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var A=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let x=new Set(["input","textarea","select"]),P=i=class e extends S.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:n,state:i}=this,o=this.toolbar;if(!o)return;let r=null==(e=n.value)?void 0:e.call(n,o.jodit,this);void 0!==r&&(i.value=r),i.disabled=this.__calculateDisabledStatus(o),i.activated=this.__calculateActivatedStatus(o),null==(t=n.update)||t.call(n,o.jodit,this)}__calculateActivatedStatus(e){var t,n;return(!(0,f.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(null!=(n=(t=this.control).isActive)&&!!n.call(t,this.j,this)||!!(e&&e.shouldBeActive(this)))}__calculateDisabledStatus(e){var t,n;return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||(null==(n=(t=this.control).isDisabled)?void 0:n.call(t,this.j,this)))||!!(e&&e.shouldBeDisabled(this))}get isToggle(){let{isActive:e,tags:t,css:n}=this.control;return!!(e||t||n)}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),n=super.createContainer();n.classList.remove(e),n.classList.add(e+"__button"),Object.defineProperty(n,"component",{value:this,configurable:!0}),d.Dom.append(t,n);let i=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${E.Icon.get("chevron")}</span>`);return d.Dom.append(n,i),t}focus(){var e;null==(e=d.Dom.first(this.container,e=>d.Dom.isTag(e,"button")))||e.focus()}onChangeHasTrigger(){this.state.hasTrigger?d.Dom.append(this.container,this.trigger):d.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:n}=this,{textIcons:i}=this.j.o;if(!0===i||(0,p.isFunction)(i)&&i(t.name)||t.template){n.icon=(0,S.UIButtonState)().icon,n.text=t.text||t.name;return}if(!(0,g.isString)(t.icon)&&null!=t.icon){n.icon={name:t.icon.name||t.name,iconURL:t.icon.iconURL||"",fill:t.icon.fill||"",scale:t.icon.scale};return}if(t.iconURL)n.icon.iconURL=t.iconURL;else{let i=t.icon||t.name;n.icon.name=E.Icon.exists(i)||(null==(e=this.j.o.extraIcons)?void 0:e[i])?i:""}t.iconURL||n.icon.name||(n.text=t.text||t.name)}onTriggerClick(e){var t,n,i;if(this.openedPopup)return void this.__closePopup();let{control:o}=this;if((0,w.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},o.list)return this.__openControlList(o);if((0,p.isFunction)(o.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,v.camelCase)(`before-${o.name}-open-popup`),this.target,o,e)){let r=null!=(i=null!=(n=null==(t=this.toolbar)?void 0:t.getTarget(this))?n:this.target)?i:null,s=o.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,k.focusFormField)(e.container)):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,v.camelCase)(`after-${o.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(d.Dom.isTag(t,x)&&e.key!==s.KEY_ESC)return;let n=this.__popupFocusables(),i=n.indexOf(t);switch(e.key){case s.KEY_ESC:this.__closePopup();break;case s.KEY_UP:i<=0?this.__closePopup():n[i-1].focus();break;case s.KEY_DOWN:if(!n.length)return;n[(i+1)%n.length].focus();break;default:if(!this.control.list||!this.__typeAhead(e.key,n,i))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,n){var i,o;let r=Date.now();if((r-this.__typedAt>1e3||t[n]!==this.__typedTo)&&(this.__typed=""),1!==e.length||" "===e&&!this.__typed)return!1;this.__typedAt=r,this.__typed+=e,this.__typedTo=t[n];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,u=l?n+1:Math.max(n,0);for(let e=0;e<t.length;e+=1){let n=t[(u+e)%t.length];if(0===s((null!=(o=null==(i=n.textContent)?void 0:i.trim())?o:"").slice(0,c.length),c)){n.focus(),this.__typedTo=n;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,n,i,o,r;let s=null!=(t=this.jodit.options.controls)?t:{},a=e=>(0,C.findControlType)(e,s),l=e.list,c=this.openPopup();c.parentElement=this;let u=null==(n=e.popup)?void 0:n.call(e,this.j,null!=(r=null!=(o=null==(i=this.toolbar)?void 0:i.getTarget(this))?o:this.target)?r:null,this.__closePopup,this);if(u)return this.__openMenu(c,u);let d=(0,I.makeCollection)(this.j);d.parentElement=c,d.mode="vertical";let p=(t,n)=>{let i;if((0,g.isString)(n)&&a(n))return T({name:n.toString()},a(n));if((0,g.isString)(t)&&a(t))return T({name:t.toString()},a(t),"object"==typeof n?n:{});i=t,(0,m.isPlainObject)(i)&&"title"in i&&"value"in i&&(n=t.value,t=t.title);let{childTemplate:o}=e,r={name:t.toString(),template:o&&((e,t,n)=>o(e,t,n,this)),exec:e.childExec?(t,n,i)=>{var o;return null==(o=e.childExec)?void 0:o.call(e,t,n,j(T({},i),{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,n]};return(0,g.isString)(n)&&(r.text=n),r};d.build((0,h.isArray)(l)?l.map(p):(0,_.keys)(l,!1).map(e=>p(e,l[e])),this.target),this.__openMenu(c,d)}__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&&d.Dom.isNode(e.target)&&(d.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new D.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,n=t&&d.Dom.isOrContains(e.container,t),i=n&&d.Dom.closest(t,"form",e.container);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,w.attr)(this.trigger,"aria-expanded",!1),i&&(0,f.isJoditObject)(this.j)?this.j.s.focus():n&&this.focus()}onClick(e){var t,n,i,o,r,s,a;let{control:l}=this;if((0,p.isFunction)(l.exec)){let c=null!=(i=null!=(n=null==(t=this.toolbar)?void 0:t.getTarget(this))?n:this.target)?i:null,u=l.exec(this.j,c,{control:l,originalEvent:e,button:this});if(!1!==u&&!0!==u&&(null==(r=null==(o=this.j)?void 0:o.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!==u)return}return l.list?this.__openControlList(l):(0,p.isFunction)(l.popup)?this.onTriggerClick(e):void((l.command||l.name)&&((0,_.call)((0,f.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 n=[this];for(let e=this.parentElement;e;e=e.parentElement){if(o.Component.isInstanceOf(e,D.Popup)&&e.keepOpen&&(!this.target||this.target.isConnected)){n.forEach(e=>e.__closePopup()),e.updatePosition();return}o.Component.isInstanceOf(e,i)&&n.push(e)}null==(t=null==(e=this.j)?void 0:e.e)||t.fire("closeAllPopups")}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,n=null){super(e),this.control=t,this.target=n,this.state=j(T({},(0,S.UIButtonState)()),{theme:"toolbar",currentValue:"",hasTrigger:!1}),this.__typed="",this.__typedAt=0,this.__typedTo=null,this.openedPopup=null;let i=this.getElm("button");(0,y.assert)(i,"Element button should exists"),this.button=i,Object.defineProperty(i,"component",{value:this,configurable:!0});let o=this.getElm("trigger");(0,y.assert)(o,"Element trigger should exists"),this.trigger=o,o.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])})}};A([l.cacheHTML],P.prototype,"createContainer",null),A([(0,u.watch)("state.hasTrigger",{immediately:!1})],P.prototype,"onChangeHasTrigger",null),A([(0,u.watch)("trigger:click")],P.prototype,"onTriggerClick",null),A([(0,u.watch)("trigger:keydown")],P.prototype,"onTriggerKeyDown",null),A([(0,u.watch)("button:keydown")],P.prototype,"onButtonKeyDown",null),A([a.autobind],P.prototype,"__onPopupKeyDown",null),A([a.autobind],P.prototype,"__onEditorKeyDown",null),A([a.autobind],P.prototype,"onOutsideClick",null),A([a.autobind],P.prototype,"__closePopup",null),P=i=A([c.component],P)},80319:function(e,t,n){n.d(t,{ToolbarContent:function(){return l}});var i=n(65478),o=n(22732),r=n(21537),s=n(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,n;let{control:i}=this,s=i.getContent(this.j,this);((0,r.isString)(s)||s.parentNode!==this.container)&&(o.Dom.detach(this.container),o.Dom.append(this.container,(0,r.isString)(s)?this.j.create.fromHTML(s):s)),this.state.disabled=!!(null==(e=i.isDisabled)?void 0:e.call(i,this.j,this)),this.state.activated=!!(null==(t=i.isActive)?void 0:t.call(i,this.j,this)),null==(n=i.update)||n.call(i,this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),o.Dom.each(this.container,e=>{o.Dom.isTag(e,a)&&(0,r.attr)(e,"disabled",this.state.disabled||null)})}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,n=null){super(e),this.control=t,this.target=n,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],l)},36646:function(e,t,n){n.d(t,{ToolbarButton:function(){return i.ToolbarButton},ToolbarContent:function(){return o.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var i=n(78644),o=n(80319),r=n(83111)},83111:function(e,t,n){n.d(t,{ToolbarSelect:function(){return l}});var i=n(65478),o=n(72430),r=n(70799),s=n(29960),a=n(78644);let l=class e extends a.ToolbarButton{className(){return"ToolbarSelect"}get isToggle(){return!1}update(){var e,t,n;super.update(),this.state.icon.name="";let{list:i,data:s}=this.control;if(i){let a=this.state.value||(s&&(0,r.isString)(s.currentValue)?s.currentValue:void 0);a||(a=Object.keys(i)[0]);let l=((0,o.isPlainObject)(i)&&i[a.toString()]||a).toString();this.state.text=null!=(n=null==(t=(e=this.control).textTemplate)?void 0:t.call(e,this.jodit,l))?n:l}}updateAriaLabel(){var e;super.updateAriaLabel();let{tooltip:t}=this.state,n=null==(e=this.text.textContent)?void 0:e.trim();t&&n&&(0,s.attr)(this.button,"aria-label",`${this.jodit.i18n(t)}, ${n}`)}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([i.component],l)},11676:function(e,t,n){n.d(t,{ToolbarCollection:function(){return f}});var i=n(65478),o=n(45219),r=n(87325),s=n(97357),a=n(37133),l=n(29960),c=n(41180),u=n(82760),d=n(24536),h=n(21491),p=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let f=class e extends d.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,u.error)("The method is not implemented for this class.")}build(e,t=null){let n=this.j.e.fire("beforeToolbarBuild",e);return n&&(e=n),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"),o.autobind],f.prototype,"__immediateUpdate",null),p([(0,i.debounce)(e=>e.j.defaultTimeout,!0)],f.prototype,"update",null),p([(0,s.hook)("ready")],f.prototype,"__initEvents",null),f=p([r.component],f)},37426:function(e,t,n){n.d(t,{ToolbarEditorCollection:function(){return l}});var i=n(82758),o=n(65478),r=n(22732),s=n(21537),a=n(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 n=void 0===e.control.mode?i.MODE_WYSIWYG:e.control.mode;return n!==i.MODE_SPLIT&&n!==this.j.getRealMode()}shouldBeActive(e){let t,n=super.shouldBeActive(e);if(void 0!==n)return n;let i=this.j.selection?this.j.s.current():null;if(!i)return!1;if(e.control.tags){let n=e.control.tags;if(t=i,r.Dom.up(t,e=>{if(e&&-1!==n.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let n=e.control.css;if(t=i,r.Dom.up(t,e=>{if(e&&!r.Dom.isText(e)&&!r.Dom.isComment(e))return this.checkActiveStatus(n,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 n=0,i=0;return Object.keys(e).forEach(o=>{let r=e[o];(0,s.isFunction)(r)?r(this.j,(0,s.css)(t,o).toString())&&(n+=1):-1!==r.indexOf((0,s.css)(t,o).toString())&&(n+=1),i+=1}),i===n},this.prependInvisibleInput(this.container)}};l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([o.component],l)},21491:function(e,t,n){n.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var i=n(87325),o=n(23282),r=n(19306);function s(e,t){let n=(0,i.getComponentClass)("ToolbarCollection"),o=(0,i.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new o(e):new n(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,n=null){if((0,o.isFunction)(t.getContent))return new((0,i.getComponentClass)("ToolbarContent"))(e,t,n);let r=new((0,i.getComponentClass)("ToolbarButton"))(e,t,n);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,n=null){let o=new((0,i.getComponentClass)("ToolbarSelect"))(e,t,n);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,o}},80536:function(e,t,n){var i=n(68345),o=n(19306),r=n(29960),s=n(6441),a=n(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){return`files[${e}]`},withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData(e){return e},isSuccess(e){return e.success},getMessage(e){return void 0!==e.data.messages&&(0,i.isArray)(e.data.messages)?e.data.messages.join(" "):""},processFileName(e,t,n){return[e,t,n]},process(e){return e.data},error(e){this.j.message.error(e.message,4e3)},getDisplayName(e,t){return e+t},defaultHandlerSuccess(e){let t=this.j||this;if(!(0,o.isJoditObject)(t))return;let{baseurl:n}=e;(0,a.getItems)(e).forEach(({file:e,isImage:i})=>{let[o,s]=i?["img","src"]:["a","href"],a=t.createInside.element(o);(0,r.attr)(a,s,n+e),"a"===o&&(a.textContent=t.o.uploader.getDisplayName.call(this,n,e)),"img"===o?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},promptOnExists:!0,promptOnExistsSuggestName(e){return e},contentType(e){return(void 0===this.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},83987:function(e,t,n){n.d(t,{buildData:function(){return o}});var i=n(21537);function o(e,t){if((0,i.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let n=e.ow.FormData;if(void 0!==n){if(t instanceof n||(0,i.isString)(t))return t;let e=new n;return Object.keys(t).forEach(n=>{e.append(n,t[n])}),e}return t}},74569:function(e,t,n){n.d(t,{dataURItoBlob:function(){return i}});function i(e){var t,n;let[i,...o]=e.split(","),r=o.join(","),s=null!=(n=null==(t=i.split(":")[1])?void 0:t.split(";")[0])?n:"",a=/;base64/i.test(i)?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})}},94122:function(e,t,n){n.d(t,{ajaxInstances:function(){return r.ajaxInstances},hasFiles:function(){return a},hasItems:function(){return l},normalizeUploaderData:function(){return i.normalizeUploaderData},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return r.send},sendFiles:function(){return s.sendFiles}}),n(83987);var i=n(2073),o=n(50373),r=n(71686),s=n(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,n){n.d(t,{getItems:function(){return a},normalizeUploaderData:function(){return l}});var i=n(68345),o=n(70799);function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}function s(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function a(e){let{files:t,isImages:n,fileNames:o,items:s}=e;return(0,i.isArray)(t)?t.map((e,t)=>{let i=null==o?void 0:o[t];return r({file:e,isImage:!!(null==n?void 0:n[t])},void 0!==i?{name:i}:{})}):null!=s?s:[]}function l(e){if(!e||"object"!=typeof e)return e;let{files:t,items:n}=e;if(!n||(0,i.isArray)(t)&&(t.length||!n.length))return s(r({},e),{items:a(e)});let l=n.map(({name:e})=>e);return s(r(s(r({},e),{files:n.map(({file:e})=>e),isImages:n.map(({isImage:e})=>e)}),l.every(o.isString)?{fileNames:l}:{}),{items:n})}},50373:function(e,t,n){n.d(t,{processOldBrowserDrag:function(){return c}});var i=n(82758),o=n(22732),r=n(580),s=n(21537),a=n(74569),l=n(80020);function c(e,t,n,c,u){if(t&&(!t.types.length||t.types[0]!==i.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});o.Dom.append((0,r.getContainer)(e.j,e.constructor),t);let i=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(o.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";i&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],n,c).finally(u)}},e.j.defaultTimeout)}}},80020:function(e,t,n){n.d(t,{sendFiles:function(){return function e(t,n,d,h,p,f){var m;return(m=function*(){if(!n)throw(0,o.error)("Need files");let{o:u}=t,m=(0,o.toArray)(n);if(!m.length)throw(0,o.error)("Need files");let g=null==f?void 0:f.data;if(!f&&(0,o.isFunction)(u.beforeUpload)){let e;try{e=yield u.beforeUpload.call(t,m)}catch(e){throw(h||u.defaultHandlerError).call(t,e),e}if(!1===e){let e=(0,o.error)("Upload canceled");throw(h||u.defaultHandlerError).call(t,e),e}if((0,o.isArray)(e)?m=e:(0,o.isPlainObject)(e)&&(0,o.isArray)(e.files)&&(m=e.files,g=e.data),!m.length)return[]}let b=[];if(u.insertImageAsBase64URI&&function(e,t,n,i,r,s){let l,c,u=[];for(c=0;c<e.length;c+=1)if((l=e[c])&&l.type){let d=l.type.match(/\/([a-z0-9]+)/i),h=d[1]?d[1].toLowerCase():"";if(!t.includes(h))continue;let p=new FileReader,{name:f}=l,m=i.j.async.promise((e,t)=>{p.onerror=t,p.onloadend=()=>{let t=(0,a.normalizeUploaderData)({baseurl:"",items:[{file:p.result,isImage:!0,name:f}]});((0,o.isFunction)(r)?r:s).call(i,t),e(t)},p.readAsDataURL(l)});u.push(m),n.push(m),e[c]=null}u.length&&Promise.all(u).then(()=>{i.j.events&&i.j.e.fire("filesWereUploaded")}).catch(()=>{})}(m,u.imagesExtensions,b,t,d,u.defaultHandlerSuccess),(m=m.filter(e=>e)).length){let n,f=new FormData;f.append(u.pathVariableName,t.path),f.append("source",t.source);for(let e=0;e<m.length;e+=1)if(n=m[e]){let i=/\.\w+$/.test(n.name),o=n.type.match(/\/([a-z0-9]+)/i),r=o&&o[1]?o[1].toLowerCase():"",s=m[e].name||Math.random().toString().replace(".","");if(!i&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[a,l,c]=u.processFileName.call(t,u.filesVariableName(e),m[e],s);f.append(a,l,c)}p&&p(f),u.data&&(0,o.isPlainObject)(u.data)&&Object.keys(u.data).forEach(e=>{f.append(e,u.data[e])}),g&&Object.keys(g).forEach(e=>{f.append(e,g[e])}),u.prepareData.call(t,f),b.push((0,l.send)(t,f).then(n=>{if(u.isSuccess.call(t,n))return((0,o.isFunction)(d)?d:u.defaultHandlerSuccess).call(t,(0,a.normalizeUploaderData)(u.process.call(t,n))),n;let l=new c.UploadError(u.getMessage.call(t,n),n,m,n=>{var i;return e(t,null!=(i=null==n?void 0:n.files)?i:m,d,h,p,{data:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},g,null==n?void 0:n.data)})});return l.code===i.ERROR_CODE_CONFLICT&&u.promptOnExists?function(e,t){let{files:n}=t;if(n.length>1)return n.reduce((e,n)=>e.then(()=>t.retry({files:[n]})),Promise.resolve());let[i]=n,{j:o,o:a}=e;return new Promise(n=>{let l=!1,c=s.Prompt.call(r.Dlgs.prototype.dlg.call(o,{closeOnClickOverlay:!0}),o.i18n(t.message),o.i18n("Rename"),e=>{if(!(e=e.trim()))return!1;l=!0,n(t.retry({files:[new File([i],e,{type:i.type})]}))},o.i18n("Enter new name"),a.promptOnExistsSuggestName.call(e,i.name));c.e.on(c,"afterClose",()=>{l||n(void 0)})})}(t,l):(((0,o.isFunction)(h)?h:u.defaultHandlerError).call(t,l),n)}).then(()=>{t.j.events&&t.j.e.fire("filesWereUploaded")}))}return Promise.all(b)},function(){var e=this,t=arguments;return new Promise(function(n,i){var o=m.apply(e,t);function r(e){u(o,n,i,r,s,"next",e)}function s(e){u(o,n,i,r,s,"throw",e)}r(void 0)})})()}}});var i=n(82758),o=n(21537),r=n(70231),s=n(36806),a=n(2073),l=n(71686),c=n(76198);function u(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}},71686:function(e,t,n){n.d(t,{send:function(){return a}});var i=n(21537),o=n(41601),r=n(83987);let s=new WeakMap;function a(e,t){let n=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,n)=>{let r=new o.Ajax({xhr:()=>{let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(n(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;n(t*=100)}},!1)):n(100),t},method:e.o.method||"POST",data:t,url:(0,i.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,i.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,i.isPromise)(n))?n.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(n,a)}n.d(t,["ajaxInstances",0,s])},76198:function(e,t,n){n.d(t,{UploadError:function(){return o}});var i=n(89890);class o extends i.AnswerError{constructor(e,t,n,i){var r;super(e,t,null==(r=t.data)?void 0:r.code),this.files=n,this.retry=i,Object.setPrototypeOf(this,o.prototype)}}},57380:function(e,t,n){n.d(t,{Uploader:function(){return u}});var i=n(91907),o=n(82758),r=n(2748),s=n(21537),a=n(89890),l=n(6441),c=n(94122);n(80536);class u extends i.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,n){let i=()=>{e.classList.remove("jodit_drag_hover")},r=this,s=e=>{let s,a,l,u=e.clipboardData,d=e=>{a&&(e.append("extension",l),e.append("mimetype",a.type))};if(!o.IS_IE&&(0,c.hasFiles)(u))return(0,c.sendFiles)(r,u.files,t,n).finally(i),!1;if(o.IS_IE&&!o.IS_ES_NEXT)return(0,c.processOldBrowserDrag)(r,u,t,n,i);if((0,c.hasItems)(u)){let{items:o}=u;for(s=0;s<o.length;s+=1)if("file"===o[s].kind&&"image/png"===o[s].type){if(a=o[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);l=e[1]?e[1].toLowerCase():"",(0,c.sendFiles)(r,[a],t,n,d).finally(i)}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,n,i)}attachEvents(e,t,n,i){let o=this;o.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)(o,r.dataTransfer.files,t,n).finally(i))});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&&o.j.e.on(a,"change",()=>{(0,c.sendFiles)(o,a.files,t,n).then(()=>{a.value="",/safari/i.test(navigator.userAgent)||(a.type="",a.type="file")}).finally(i)})}uploadRemoteImage(e,t,n){let i=this,{o}=i,r=(0,s.isFunction)(n)?n:o.defaultHandlerError;(0,c.send)(i,{action:"fileUploadRemote",url:e}).then(e=>{var n;o.isSuccess.call(i,e)?((0,s.isFunction)(t)?t:o.defaultHandlerSuccess).call(i,(0,c.normalizeUploaderData)(o.process.call(i,e))):r.call(i,(0,a.answer)(o.getMessage.call(i,e),e,null==(n=e.data)?void 0:n.code))}).catch(e=>r.call(i,e))}upload(e){return this.async.promise((t,n)=>{let i=!1,o=e=>t=>{i=!0,e(t)};(0,c.sendFiles)(this,e,o(t),o(n)).then(()=>{i||t({baseurl:"",items:[],files:[],isImages:[]})},o(n))})}destruct(){this.setStatus(i.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,n){var i=n(82758),o=n(22732),r=n(21537),s=n(67510),a=n(37068);s.Icon.set("palette",a.default),n.d(t,["ColorPickerWidget",0,(e,t,n)=>{var a;let l="jodit-color-picker",c=(0,r.normalizeColor)(n),u=e.c.div(l),d=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(n=>{t.push(`<div class="${l}__group ${l}__group-${n}">`),t.push(h(e[n])),t.push("</div>")}):(0,r.isArray)(e)&&e.forEach(e=>{let n=c===e;t.push(`<button type="button" class='${l}__color-item ${n?l+"__color-item_active_true":""}' title="${e}" aria-pressed="${n}" 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);o.Dom.append(u,e.c.fromHTML(`<div class="${l}__groups">${p}</div>`));let f=(0,r.toArray)(u.querySelectorAll(`.${l}__color-item`)),m=null!=(a=f.find(e=>"true"===(0,r.attr)(e,"aria-pressed")))?a:f[0];m&&(0,r.attr)(m,"tabindex",0),o.Dom.append(u,e.c.fromHTML(`<div data-ref="extra" class="${l}__extra"></div>`));let{extra:g}=(0,r.refs)(u);o.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)(u),v=null,y=()=>{let e=b.value.trim();if(e===v)return;let n=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),i=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!n&&!i)return;let o=(0,r.normalizeColor)(n&&!e.startsWith("#")?"#"+e:e);o&&(0,r.isFunction)(t)&&(v=e,t(o))};e.e.on(b,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),y())}).on(b,"change",e=>{e.stopPropagation(),y()}),o.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)()&&(o.Dom.append(g,e.c.fromHTML(`<div class="${l}__native">${d}<input type="color" value="#ffffff"/></div>`)),e.e.on(u,"change",e=>{e.stopPropagation();let n=e.target;if(!n||!n.tagName||!o.Dom.isTag(n,"input")||"color"!==n.type)return;let i=n.value||"";(0,r.isFunction)(t)&&t(i),e.preventDefault()}));let w=e=>{let t=o.Dom.closest(e,e=>o.Dom.isHTMLElement(e)&&(e.classList.contains(l+"__color-item")||e.classList.contains(l+"__remove")),u);return t?(0,r.attr)(t,"-color")||"":void 0},_=e=>{t&&(0,r.isFunction)(t)&&t(e)},S=!1;return e.e.on(u,"mousedown touchend",e=>{if(o.Dom.isTag(e.target,"input"))return void e.stopPropagation();e.stopPropagation(),e.preventDefault();let t=w(e.target);void 0!==t&&(S="mousedown"===e.type,_(t))}),e.e.on(u,"click",e=>{let t=w(e.target);void 0===t||S||_(t),S=!1}).on(u,"keydown",e=>{var t;S=!1;let n=e.target;f.includes(n)&&[i.KEY_LEFT,i.KEY_RIGHT,i.KEY_UP,i.KEY_DOWN].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),null==(t=((e,t)=>{let n=f.indexOf(e);if(t===i.KEY_LEFT||t===i.KEY_RIGHT){let o=t===i.KEY_LEFT?-1:1;return f[n+("rtl"===(0,r.css)(e,"direction")?-o:o)]}let o=t===i.KEY_DOWN,s=f.filter(t=>o?t.offsetTop>e.offsetTop:t.offsetTop<e.offsetTop);if(!s.length)return;let a=(o?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)})(n,e.key))||t.focus())}).on(u,"focusin",e=>{f.includes(e.target)&&f.forEach(t=>(0,r.attr)(t,"tabindex",t===e.target?0:-1))}),e.e.fire("afterGenerateColorPicker",u,g,t,c),u}])},37068:function(e,t){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,n){var i=n(2748),o=n(21537),r=n(67510),s=n(38927);let a=(e,t,{label:n,accept:i})=>{let o=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(n)}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${i}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(o,n=>{t.call(e,n),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:o}};function l(e,t,n){let r=i.Dom.first(e,e=>i.Dom.isTag(e,"input")&&(0,o.attr)(e,"name")===t);return r?(n&&(r.value=n),r.value):""}n.d(t,["FileSelectorWidget",0,(e,t,n,c,u=!0)=>{let d,h=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:n}=t;h.push(a(e,t=>{let i=(0,o.isFunction)(n)?n:p.defaultHandlerSuccess;(0,o.isFunction)(i)&&i.call(e,t)},u?{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,u)}}),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])]);n&&!i.Dom.isText(n)&&!i.Dom.isComment(n)&&(i.Dom.isTag(n,"img")||(0,o.$$)("img",n).length)&&(d="IMG"===n.tagName?n:(0,o.$$)("img",n)[0],l(a.container,"url",(0,o.attr)(d,"src")),l(a.container,"text",(0,o.attr)(d,"alt")),s.state.text="Update"),n&&i.Dom.isTag(n,"a")&&(l(a.container,"url",(0,o.attr)(n,"href")),l(a.container,"text",(0,o.attr)(n,"title")),s.state.text="Update"),a.onSubmit(n=>{(0,o.isFunction)(t.url)&&t.url.call(e,n.url,n.text)}),h.push({icon:"link",name:"URL",content:a.container})}let f=(0,s.TabsWidget)(e,h);return f.classList.add("jodit-file-selector"),f},"UploadTab",0,a])},92762:function(e,t,n){n.d(t,{ColorPickerWidget:function(){return i.ColorPickerWidget},FileSelectorWidget:function(){return o.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget},UploadTab:function(){return o.UploadTab}});var i=n(22859),o=n(34793),r=n(38927)},38927:function(e,t,n){var i=n(91907),o=n(2748),r=n(23282),s=n(29960),a=n(67510),l=n(20014);n.d(t,["TabsWidget",0,(e,t,n)=>{let c=e.c.div("jodit-tabs"),u=e.c.div("jodit-tabs__wrapper"),d=e.c.div("jodit-tabs__buttons");(0,s.attr)(d,{role:"tablist","aria-orientation":"horizontal"});let h={},p=[],f="";o.Dom.append(c,d),o.Dom.append(c,u);let m=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()),f||(f=g),o.Dom.append(d,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"):o.Dom.append(v,i.Component.isInstanceOf(b,a.UIElement)?b.container:b),o.Dom.append(u,v),y.onAction(()=>(m(g),(0,r.isFunction)(b)&&!o.Dom.isElement(b)&&b.call(e),n&&(n.activeTab=g),(0,l.focusFormField)(v),!1)),h[g]={button:y,tab:v}}),m(n&&n.activeTab&&h[n.activeTab]?n.activeTab:f),n){let e=n.activeTab;Object.defineProperty(n,"activeTab",{configurable:!0,enumerable:!1,get(){return e},set(t){e=t,m(t)}})}return c}])},73391:function(e,t,n){var i=n(82758),o=n(580),r=n(21537),s=n(12153),a=n(6441),l=n(49399);a.Config.prototype.controls.about={exec:e=>{let t=e.dlg({closeOnClickOverlay:!0}),n=e.i18n.bind(e);t.setMod("theme",e.o.theme).setHeader(n("About Jodit")).setContent(`<div class="jodit-about">
110
110
  <div>${n("Jodit Editor")} v.${e.getVersion()}</div>
111
111
  <div>${n("License: %s",!(0,r.isLicense)(e.o.license)?e.o.license||"MIT":(0,r.normalizeLicense)(e.o.license))}</div>
112
112
  <div>
@@ -126,7 +126,7 @@
126
126
  <div class="&__spinner"></div>
127
127
  </div>
128
128
  </div>
129
- </div>`}setPrompt(e){if(e){let{jodit:t}=this,n=t.o.aiAssistant[e],{aiCommonPrefixPrompt:i,aiCommonSuffixPrompt:o}=t.o.aiAssistant;this.promptInput.value=[i,(0,s.isString)(n)?n:"",o].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:n}){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(()=>n(this.__aiResult));let i=()=>{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(i),this.__tryAgainButton=(0,a.Button)(e,{icon:{name:"update"},name:"update",tooltip:"Try Again",variant:"initial"}).onAction(i),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 o=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 n=this.getFullElName("","hide","true");this.__results.classList.remove(n),this.__buttons.classList.remove(n),r.Dom.detach(this.__results),r.Dom.append(this.__results,this.__spinner),this.__insertButton.focus()}),r.Dom.append(this.__buttons,o.container),r.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}};c([(0,o.watch)(":ai-assistant-response")],u.prototype,"onAiAssistentResponse",null),c([(0,o.watch)(":ai-assistant-error")],u.prototype,"onAiAssistentError",null),c([(0,o.watch)("promptInput:change")],u.prototype,"onChangePromptValue",null),u=c([i.component],u)},25187:function(e,t,n){n(73391),n(12391),n(93183),n(66707),n(41107),n(71255),n(82439),n(61323),n(93079),n(19063),n(19271),n(1255),n(575),n(11317),n(36243),n(23399),n(96111),n(2169),n(42263),n(16233),n(77469),n(23531),n(84571),n(80763),n(3215),n(70045),n(93401),n(76295),n(59483),n(91071),n(61019),n(65517),n(36911),n(20071),n(32309),n(64837),n(79799),n(31571),n(85407),n(59451),n(18363),n(8355),n(58519),n(6687),n(56113),n(9159),n(12019),n(36125),n(9881),n(28545),n(45927),n(52951),n(43809),n(7309),n(68687),n(59495),n(39627),n(767),n(43003),n(72439),n(94529),n(26551),n(96139),n(72253),n(65735),n(83671),n(3115)},36911:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(50911),c=n(62843),u=n(2525),d=n(12153);n(50712);var h=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let p="jodit-wysiwyg_anchors",f=' contenteditable="false"';class m extends l.Plugin{afterInit(e){var t;let n,i,o=e.ed===e.od;o&&e.editor.classList.add(p),(0,s.getContainer)(e,"anchor","style",!0).textContent=(t=o?"."+p:"",n=["id","name"].map(e=>`.jodit-wysiwyg${t} a[${e}]:not([href]):empty::before`).join(","),i=`url("data:image/svg+xml,${encodeURIComponent(d.Icon.get("anchor"))}") center/contain no-repeat`,`${n}{display:inline-block;width:.75em;height:1em;margin:0 .1em;vertical-align:-.15em;background-color:var(--jd-color-icon,#4c4c4c);-webkit-mask:${i};mask:${i};cursor:pointer;content:''}`),e.e.on("generateAnchorForm.anchor",this.__generateForm).on("clickA touchstartA",this.__onClickA,{top:!0})}__onClickA(e,t){var n;let{j:i}=this;if(!i.o.readonly&&(0,a.isAnchor)(e))return i.e.stopPropagation((0,a.camelCase)((null!=(n=null==t?void 0:t.type)?n:"click")+"_a")),i.e.fire("showPopup",e,()=>(0,a.position)(e,i),"anchor",!0),!1}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===i.MODE_SOURCE||(0,a.getAnchors)(e.editor).forEach(g)}onAfterGetValueFromEditor(e){e.value=function(e){if(!e.includes(f))return e;let t="",n=0,i=0;for(;;){let o=e.indexOf("<",i);if(-1===o)break;let r=e.indexOf(">",o);if(-1===r)break;if(e.startsWith("<a",o)&&/\s/.test(e.charAt(o+2))&&e.startsWith("</a>",r+1)){let i=e.slice(o,r),s=i.indexOf(f);-1===s||/\shref=/.test(i)||(t+=e.slice(n,o+s),n=o+s+f.length)}i=r+1}return 0===n?e:t+e.slice(n)}(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:n}=this,o=(0,a.isAnchor)(e)?e:null,s=new u.UIInput(n,{name:"name",ref:"name_input",label:"Anchor",required:!0}),l=[new c.UIButton(n,{name:"insert",type:"submit",variant:"primary",text:o?"Update":"Insert"})];o&&(s.value=(0,a.getAnchorName)(o),l.unshift(new c.UIButton(n,{name:"remove",variant:"default",text:"Remove"}).onAction(()=>{n.o.readonly||(n.s.restore(),r.Dom.safeRemove(o),n.synchronizeValues()),t()})));let d=new u.UIForm(n,[new u.UIBlock(n,[s]),new u.UIBlock(n,l,{align:"full"})]);return o&&(this.__dropForm(),this.__form=d,n.e.on(d.container,"keydown",e=>{e.key===i.KEY_ESC&&(t(),n.s.restore())})),d.onSubmit(()=>{if(n.o.readonly)return t(),!1;let e=s.value.trim().replace(/^#/,""),i=e?/\s/.test(e)?"The name cannot contain spaces":this.__isTaken(e,o)?"This name is already in use":"":"Please fill out this field";return i?(s.error=i,s.focus()):(n.s.restore(),o?this.__rename(o,e):this.__insert(e),n.synchronizeValues(),t()),!1}),n.async.requestIdleCallback(()=>s.focus()),d}__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(n=>n!==t&&(n.id===e||(0,a.isAnchor)(n)&&(0,a.attr)(n,"name")===e))}__insert(e){let{j:t}=this,n=t.createInside.element("a",{id:e}),i=t.s.range;g(n),i.collapsed||(i.collapse(!0),t.s.selectRange(i));let o=r.Dom.closest(i.startContainer,"a",t.editor);o?(r.Dom.before(o,n),t.s.setCursorAfter(n)):t.s.insertNode(n,!0,!1)}__rename(e,t){let n=(0,a.getAnchorName)(e),i=this.__isTaken(n,e);["id","name"].forEach(n=>{e.hasAttribute(n)&&(0,a.attr)(e,n,t)}),i||(0,a.toArray)(this.j.editor.querySelectorAll("a[href]")).forEach(e=>{(0,a.attr)(e,"href")==="#"+n&&(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"))),n=new Map;return((0,a.isAnchor)(e)?[e]:(0,a.getAnchors)(e)).forEach(e=>{let i=(0,a.getAnchorName)(e);if(!this.__isTaken(i,null))return;let o=i;for(let e=2;t.has(o)||this.__isTaken(o,null);e+=1)o=`${i}-${e}`;["id","name"].forEach(t=>{e.hasAttribute(t)&&(0,a.attr)(e,t,o)}),t.add(o),n.set(i,o)}),!!n.size&&((0,a.toArray)(e.querySelectorAll("a[href]")).forEach(e=>{var t;let i=null!=(t=(0,a.attr)(e,"href"))?t:"",o="#"===i[0]&&n.get(i.slice(1));o&&(0,a.attr)(e,"href","#"+o)}),!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([o.autobind],m.prototype,"__onClickA",null),h([(0,o.watch)([":change",":afterInit",":afterSetMode"]),(0,o.debounce)()],m.prototype,"onChange",null),h([(0,o.watch)(":afterGetValueFromEditor")],m.prototype,"onAfterGetValueFromEditor",null),h([(0,o.watch)(":beforePasteInsert")],m.prototype,"onBeforePasteInsert",null),h([o.autobind],m.prototype,"__generateForm",null),s.pluginSystem.add("anchor",m)},50712:function(e,t,n){var i=n(6441);n(24526),i.Config.prototype.controls.anchor={popup:(e,t,n)=>e.e.fire("generateAnchorForm.anchor",null,n),tooltip:"Insert anchor"},i.Config.prototype.popup.anchor=(e,t,n)=>e.e.fire("generateAnchorForm.anchor",t,n)},93183:function(e,t,n){var i=n(82758),o=n(22732),r=n(580),s=n(23282),a=n(50911),l=n(45124);n(32496);var c=n(11338),u=n(14630),d=n(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 n=this.j,r=n.selection;if(r.isFocused()||r.focus(),!r.isInsideArea)return;if((0,c.checkNotCollapsed)(n))return n.e.fire("backSpaceAfterDelete",e),!1;let a=r.range,d=n.createInside.text(i.INVISIBLE_SPACE);try{if(o.Dom.safeInsertNode(a,d),!o.Dom.isOrContains(n.editor,d))return;let c=o.Dom.closest(d,e=>o.Dom.isElement(e)&&e.hasAttribute("contenteditable")&&!o.Dom.isContentEditable(e.parentNode,n.editor),n.editor);if(c&&r.cursorInTheEdge(e,c,d)||n.e.fire("backSpaceBeforeCases",e,d))return!1;(0,l.moveNodeInsideStart)(n,d,e);let h=n.o.delete.disableCases;if(u.casesMap.some(([o,r])=>{if(!(h&&h.has(o))&&(0,s.isFunction)(r)&&r(n,d,e,t))return i.IS_PROD,!0}))return!1}catch(e){throw i.IS_PROD,e}finally{n.e.fire("backSpaceAfterDelete",e,d),this.moveCaretToTextBefore(d),this.safeRemoveEmptyNode(d)}return!1}moveCaretToTextBefore(e){var t,n;let{jodit:i}=this,{range:r}=i.s;if(!e.parentNode)return;let s=i.ed.createRange();if(s.selectNode(e),!r.collapsed||!s.isPointInRange(r.startContainer,r.startOffset))return;let a=e.previousSibling;for(;o.Dom.isText(a)&&!/\S|\u00A0/.test(a.data);)a=a.previousSibling;let l=o.Dom.isText(a)?a:(0,d.findMostNestedNeighbor)(e,!1,i.editor,!0),c=o.Dom.closest(l,"a",i.editor);o.Dom.isText(l)&&o.Dom.isContentEditable(l,i.editor)&&(!c||o.Dom.isOrContains(c,e))&&o.Dom.closest(l,o.Dom.isBlock,i.editor)===o.Dom.closest(e,o.Dom.isBlock,i.editor)&&(r.setStart(l,null!=(n=null==(t=l.nodeValue)?void 0:t.length)?n:0),r.collapse(!0),i.s.selectRange(r))}safeRemoveEmptyNode(e){var t,n,r;let{range:s}=this.j.s;o.Dom.isText(e)&&e.nodeValue!==i.INVISIBLE_SPACE&&(null==(t=e.nodeValue)?void 0:t.startsWith(i.INVISIBLE_SPACE))?e.deleteData(0,i.INVISIBLE_SPACE.length):(s.startContainer===e&&(e.previousSibling?o.Dom.isText(e.previousSibling)?s.setStart(e.previousSibling,null!=(r=null==(n=e.previousSibling.nodeValue)?void 0:n.length)?r:0):s.setStartAfter(e.previousSibling):e.nextSibling&&(o.Dom.isText(e.nextSibling)?s.setStart(e.nextSibling,0):s.setStartBefore(e.nextSibling)),s.collapse(!0),this.j.s.selectRange(s)),o.Dom.safeRemove(e))}}h.requires=["hotkeys"],r.pluginSystem.add("backspace",h)},62845:function(e,t,n){n.d(t,{checkJoinNeighbors:function(){return s}});var i=n(82758),o=n(2748),r=n(63785);function s(e,t,n){return function e(t,n,s,h){if(function(e,t,n){let i=o.Dom.findNotEmptySibling(t,n);if(!u(e,i))return!1;let s=(0,r.getMoveFilter)(e);if(n)for(let e=t;e&&!o.Dom.isBlock(e);){let t=e.nextSibling;if(o.Dom.isTag(e,"br")){o.Dom.safeRemove(e);break}s(e)?o.Dom.append(i,e):o.Dom.safeRemove(e),e=t}else{let t=o.Dom.findNotEmptySibling(i,!1);!t||o.Dom.isBlock(t)||o.Dom.isTag(t,"br")||o.Dom.after(i,e.createInside.element("br")),o.Dom.unwrap(i)}return e.s.setCursorBefore(t),!0}(t,n,s))return!0;let p=o.Dom.findNotEmptySibling(n,s);if(u(t,function(e,t){var n;let i=e;for(;o.Dom.isElement(i)&&!o.Dom.isBlock(i);){let e=Array.from(i.childNodes).filter(e=>!o.Dom.isEmptyTextNode(e));i=null!=(n=t?e[e.length-1]:e[0])?n:null}return i===e?null:i}(p,s))&&a(p,t.editor))return e(t,n,s,h);let f=n,m=f;for(;f&&!o.Dom.findNotEmptySibling(f,s)&&f.parentElement!==t.editor;)m=f=f.parentElement;if(o.Dom.isElement(m)&&o.Dom.isContentEditable(m,t.editor)){var g,b;let u,p,f,v;if(o.Dom.up(n,o.Dom.isCell,m,!0))return!1;let y=o.Dom.findNotEmptySibling(m,s);if(y&&(a(o.Dom.furthest(n,e=>o.Dom.isElement(e)&&!o.Dom.isBlock(e)&&!o.Dom.isOrContains(e,y),t.editor),t.editor)||a(y,t.editor)))return e(t,n,s,h);if(o.Dom.isTag(y,"br"))return o.Dom.safeRemove(y),t.s.setCursorBefore(n),!0;if(s&&o.Dom.isTag(y,"table"))return t.s.setCursorBefore(n),!0;if(o.Dom.isElement(y)&&!o.Dom.isContentEditable(y,t.editor))return!1;let w=(g=m,(u=o.Dom.up(n,o.Dom.isBlock,g))?o.Dom.isLeaf(u)&&u.parentElement?u.parentElement:u:g);if(!h&&y&&function(e,t,n,r,s){if(s||o.Dom.isTag(r,"table")||o.Dom.isTag(r,i.INSEPARABLE_TAGS)||!o.Dom.isContentEditable(r,e.editor))return!1;let a=o.Dom.up(t,o.Dom.isBlock,n,!0),u=l(r,!1,e.editor);if(!a||!u||!o.Dom.isContentEditable(u,e.editor)||!(o.Dom.isLeaf(a)||o.Dom.isLeaf(u))||o.Dom.isLeaf(a.parentElement)||o.Dom.isLeaf(u.parentElement)||c(a)===c(u))return!1;let d=a.parentElement;o.Dom.isLeaf(a)&&o.Dom.isLeaf(u)?o.Dom.before(u,a):o.Dom.isLeaf(a)?o.Dom.before(u,function(e){let t=e.parentElement,n=t.cloneNode(!1),i=Array.from(t.children).indexOf(e);if(i&&(n.removeAttribute("id"),o.Dom.isTag(t,"ol"))){let e=parseInt(t.getAttribute("start")||"1",10)||1;n.setAttribute("start",String(e+i))}return o.Dom.append(n,e),n}(a)):o.Dom.before(u.parentElement,a);let h=d;for(;h&&h!==e.editor&&o.Dom.isEmpty(h);){let e=h.parentElement;o.Dom.safeRemove(h),h=e}return!0}(t,n,w,y,s))return e(t,n,s,!0)||t.s.setCursorBefore(n),!0;if(y&&(function(e,t,n,s,a){if(a||!(o.Dom.isList(n)||o.Dom.isList(s)))return!1;let l=o.Dom.up(t,o.Dom.isBlock,n,!0),c=o.Dom.isList(s)?s.firstElementChild:s;if(!l||!c||o.Dom.isTag(c,i.INSEPARABLE_TAGS)||o.Dom.isTag(c,"table"))return!1;if(!o.Dom.isEmpty(c)){let t=[];for(let e=c.firstChild;e&&!o.Dom.isBlock(e);e=e.nextSibling)t.push(e);if(!t.length)return!1;let n=(0,r.getMoveFilter)(e);t.forEach(e=>n(e)?o.Dom.append(l,e):o.Dom.safeRemove(e))}let u=c;for(;u&&u!==e.editor&&o.Dom.isEmpty(u);){let e=u.parentElement;o.Dom.safeRemove(u),u=e}return!0}(t,n,w,y,s)||(b=y,p=o.Dom.isTag(b,i.LIST_TAGS),f=o.Dom.isTag(w,i.LIST_TAGS),v=(e,t)=>t?e.firstElementChild:e.lastElementChild,f?(b=t.createInside.element(t.o.enterBlock),o.Dom.before(w,b),d(t,v(w,s),b,s)):!!b&&!!p&&!f&&d(t,w,v(b,!s),s))||function(e,t,n,i){if(o.Dom.isBlock(n)||!o.Dom.isBlock(t)||o.Dom.isList(t)||t.parentNode!==n.parentNode||Array.from(t.childNodes).some(e=>o.Dom.isBlock(e)))return!1;if(i){let n=o.Dom.findNotEmptySibling(t,!1);return!n||o.Dom.isBlock(n)||o.Dom.isTag(n,"br")||o.Dom.after(t,e.createInside.element("br")),o.Dom.unwrap(t),!0}let s=(0,r.getMoveFilter)(e);for(let e=n;e&&!o.Dom.isBlock(e);){let n=e.nextSibling;if(o.Dom.isTag(e,"br")){o.Dom.safeRemove(e);break}s(e)?o.Dom.append(t,e):o.Dom.safeRemove(e),e=n}return!0}(t,w,y,s)||d(t,w,l(function(e,t){if(!o.Dom.isTag(e,"table"))return e;let n=[];return o.Dom.each(e,e=>{o.Dom.isCell(e)&&n.push(e)}),n.length?n[t?n.length-1:0]:null}(y,s),s,t.editor),s)))return t.s.setCursorBefore(n),!0}return!1}(e,t,n,!1)}function a(e,t){if(!o.Dom.isElement(e)||o.Dom.isBlock(e))return!1;let n=e=>o.Dom.isBlock(e)&&!o.Dom.isTag(e,i.NO_EMPTY_TAGS);Array.from(e.childNodes).forEach(e=>a(e,t));let r=Array.from(e.childNodes);if(!r.some(n))return!1;let s=null;for(let l of r){if(!n(l)){s||o.Dom.isEmptyTextNode(l)||(s=e.cloneNode(!1),o.Dom.before(l,s)),s&&o.Dom.append(s,l);continue}if(s=null,o.Dom.isTag(l,i.INSEPARABLE_TAGS)||!o.Dom.isContentEditable(l,t))continue;let r=e.cloneNode(!1);o.Dom.moveContent(l,r),o.Dom.append(l,r),a(r,t)}return o.Dom.unwrap(e),!0}function l(e,t,n){let r=e;for(;r;){let e=t?r.lastChild:r.firstChild,s=e&&o.Dom.isEmptyTextNode(e)?o.Dom.findNotEmptySibling(e,t):e;if(!o.Dom.isBlock(s)||o.Dom.isTag(s,i.INSEPARABLE_TAGS)||o.Dom.isTag(s,"table")||!o.Dom.isContentEditable(s,n))break;r=s}return r}function c(e){let t=e.parentElement;for(;o.Dom.isList(t)||o.Dom.isLeaf(t);)t=t.parentElement;return t}function u(e,t){return o.Dom.isElement(t)&&o.Dom.isBlock(t)&&!o.Dom.isList(t)&&!o.Dom.isTag(t,"table")&&!o.Dom.isCell(t)&&o.Dom.isContentEditable(t,e.editor)&&!Array.from(t.childNodes).some(e=>o.Dom.isBlock(e))}function d(e,t,n,i){if(t&&o.Dom.isElement(n)){o.Dom.moveContent(t,n,!i,(0,r.getMoveFilter)(e));let s=t;for(;s&&s!==e.editor&&o.Dom.isEmpty(s);){let e=s.parentElement;o.Dom.safeRemove(s),s=e}return!0}return!1}},91748:function(e,t,n){n.d(t,{checkJoinTwoLists:function(){return s}});var i=n(2748),o=n(37790),r=n(63785);function s(e,t,n){let s=i.Dom.findSibling(t,n),a=i.Dom.findSibling(t,!n);if(!i.Dom.closest(t,i.Dom.isElement,e.editor)&&i.Dom.isList(s)&&i.Dom.isList(a)&&i.Dom.isTag(s.lastElementChild,"li")&&i.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:c}=e.s,u=s.lastElementChild,d=a.firstElementChild;return(0,o.call)(n?i.Dom.prepend:i.Dom.append,d,t),i.Dom.moveContent(a,s,!n,(0,r.getMoveFilter)(e)),i.Dom.safeRemove(a),(0,o.call)(n?i.Dom.append:i.Dom.prepend,u,t),(0,o.call)(n?l:c,t),!0}return!1}},11338:function(e,t,n){n.d(t,{checkNotCollapsed:function(){return i}});function i(e){return!e.s.isCollapsed()&&(e.execCommand("Delete"),!0)}},73792:function(e,t,n){n.d(t,{checkRemoveChar:function(){return function e(t,n,c,u,d=!1){var h,p;let f,m=c?-1:1,g=o.Dom.sibling(n,!c),b=o.Dom.sibling(n,c),v=null,y=!1;for(b||(b=a(n,c,t.editor));b&&(o.Dom.isText(b)||o.Dom.isInlineBlock(b));){for(;o.Dom.isInlineBlock(b);)b=c?null==b?void 0:b.lastChild:null==b?void 0:b.firstChild;if(!b||o.Dom.isBlock(b))break;if(null==(h=b.nodeValue)?void 0:h.length){if(d&&l(function(e,t){let n=(0,r.toArray)(e),o=t?-1:1,s=t?n.length-1:0;for(;n[s]===i.INVISIBLE_SPACE;)s+=o;return n[s]}(b.nodeValue,c)))break;f=function(e,t,n,s){let a=(0,r.toArray)(e.nodeValue),l=a.length,c=t?l-1:0;if(a[c]===i.INVISIBLE_SPACE)for(;a[c]===i.INVISIBLE_SPACE;)c+=n;let u=a[c];if(a[c+n]===i.INVISIBLE_SPACE){for(c+=n;a[c]===i.INVISIBLE_SPACE;)c+=n;c+=t?1:-1}return a=t&&c<0?[]:a.slice(t?0:c+1,t?c:l),function(e,t,n){var s;if(!e||!o.Dom.isText(e)||(!t?/ $/:/^ /).test(null!=(s=e.nodeValue)?s:"")||!(0,r.trimInv)(e.nodeValue||"").length)for(let e=t?n.length-1:0;t?e>=0:e<n.length;e+=t?-1:1)if(" "===n[e])n[e]=i.NBSP_SPACE;else break}(s,t,a),e.nodeValue=a.join(""),u}(b,c,m,g),!b.nodeValue.length&&o.Dom.isInlineBlock(b.parentNode)&&(b.nodeValue=i.INVISIBLE_SPACE)}if((null==(p=b.nodeValue)?void 0:p.length)||(v=b),!(0,r.isVoid)(f)&&f!==i.INVISIBLE_SPACE){(function(t,n,i,s,a,c){(0,r.call)(t?o.Dom.after:o.Dom.before,n,i);let u="word"===s&&!l(a);("sentence"===s||u||"word"===s&&t)&&e(c,i,t,s,u&&t)})(c,b,n,u,f,t),y=!0;break}let s=a(b,c,t.editor);v&&(o.Dom.safeRemove(v),v=null),b=s}return v&&o.Dom.safeRemove(v),y&&(function(e){let t=e.parentElement;for(;t&&o.Dom.isInlineBlock(t)&&o.Dom.isTag(t,"a");){let n=t.parentElement;o.Dom.isEmpty(t)&&(o.Dom.after(t,e),o.Dom.safeRemove(t)),t=n}}(n),(0,s.addBRInsideEmptyBlock)(t,n),t.s.setCursorBefore(n),o.Dom.isTag(n.previousSibling,"br")&&!o.Dom.findNotEmptySibling(n,!1)&&o.Dom.after(n,t.createInside.element("br"))),y}}});var i=n(82758),o=n(22732),r=n(21537),s=n(63785);function a(e,t,n){let i=o.Dom.sibling(e,t);return!i&&e.parentNode&&e.parentNode!==n&&(i=(0,s.findMostNestedNeighbor)(e,!t,n,!0))&&o.Dom.closest(e,o.Dom.isBlock,n)!==o.Dom.closest(i,o.Dom.isBlock,n)?null:i}function l(e){return" "===e||e===i.NBSP_SPACE}},87536:function(e,t,n){n.d(t,{checkRemoveContentNotEditable:function(){return a}});var i=n(22732),o=n(21537),r=n(45124),s=n(62845);function a(e,t,n){let a=t,c=i.Dom.findSibling(a,n);for(;!c&&a.parentElement&&a.parentElement!==e.editor&&!i.Dom.isCell(a.parentElement);)if(a=a.parentElement,c=i.Dom.findSibling(a,n),n&&i.Dom.isLeaf(a)&&!(i.Dom.isLeaf(c)&&l(e,c)))return!1;if(l(e,c)){if(i.Dom.isBlock(c)){let o=!(n&&i.Dom.isLeaf(c));i.Dom.safeRemove(c),o&&(0,s.checkJoinNeighbors)(e,t,n)}else(0,o.call)(n?i.Dom.before:i.Dom.after,c,t),i.Dom.safeRemove(c),(0,r.moveNodeInsideStart)(e,t,n);return(0,o.call)(n?e.s.setCursorBefore:e.s.setCursorAfter,t),!0}return!1}function l(e,t){return i.Dom.isElement(t)&&!i.Dom.isContentEditable(t,e.editor)}},12474:function(e,t,n){n.d(t,{checkRemoveEmptyNeighbor:function(){return o}});var i=n(2748);function o(e,t,n){let o=i.Dom.closest(t,i.Dom.isElement,e.editor);if(!o)return!1;let r=i.Dom.findNotEmptySibling(o,n);return!!(r&&i.Dom.isEmpty(r))&&(i.Dom.safeRemove(r),e.s.setCursorBefore(t),!0)}},58940:function(e,t,n){n.d(t,{checkRemoveEmptyParent:function(){return s}});var i=n(82758),o=n(22732),r=n(91748);function s(e,t,n){let s=!1,{setCursorBefore:a,setCursorIn:l}=e.s,c=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!c||!o.Dom.isEmpty(c))return!1;do if(c&&o.Dom.isEmpty(c)&&!o.Dom.isCell(c)){o.Dom.after(c,t);let n=o.Dom.closest(c,e=>o.Dom.isElement(e)&&e!==c,e.editor);o.Dom.safeRemove(c),s=!0,c=n}else break;while(c);if(s&&(0,r.checkJoinTwoLists)(e,t,n))return!0;let u=o.Dom.findNotEmptyNeighbor(t,n,e.editor);return!u||o.Dom.isText(u)||o.Dom.isTag(u,i.INSEPARABLE_TAGS)?a(t):l(u,!n),s}},56825:function(e,t,n){n.d(t,{checkRemoveUnbreakableElement:function(){return s}});var i=n(82758),o=n(2748),r=n(58940);function s(e,t,n){let s=o.Dom.findSibling(t,n);return!!(o.Dom.isElement(s)&&(o.Dom.isTag(s,i.INSEPARABLE_TAGS)||o.Dom.isEmpty(s)))&&(o.Dom.safeRemove(s),o.Dom.isTag(s,"br")&&!o.Dom.findNotEmptySibling(t,!1)&&o.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),o.Dom.isTag(s,"br")&&(0,r.checkRemoveEmptyParent)(e,t,n),!0)}},90240:function(e,t,n){n.d(t,{checkTableCell:function(){return o}});var i=n(2748);function o(e,t){let n=t.parentElement;return!!i.Dom.isCell(n)}},68034:function(e,t,n){n.d(t,{checkUnwrapFirstListItem:function(){return r}});var i=n(2748),o=n(43555);function r(e,t,n){var r;let s=i.Dom.closest(t,i.Dom.isElement,e.editor),{s:a}=e;if(i.Dom.isLeaf(s)&&(null==(r=null==s?void 0:s.parentElement)?void 0:r[n?"firstElementChild":"lastElementChild"])===s&&a.cursorInTheEdge(n,s)){let r=s.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,o.call)(n?i.Dom.before:i.Dom.after,r,l),i.Dom.moveContent(s,l),i.Dom.safeRemove(s),i.Dom.isEmpty(r)&&i.Dom.safeRemove(r),(0,o.call)(n?a.setCursorBefore:a.setCursorAfter,t),!0}return!1}},70921:function(e,t,n){n.d(t,{checkUnwrapListItem:function(){return o}});var i=n(2748);function o(e,t,n){if(!n)return!1;let o=i.Dom.closest(t,"li",e.editor),r=o?o.parentElement:null;if(!o||!i.Dom.isList(r)||!o.previousElementSibling||i.Dom.isEmpty(o)||Array.from(o.childNodes).some(e=>i.Dom.isBlock(e))||!e.s.cursorInTheEdge(!0,o))return!1;let s=e.createInside.element(e.o.enterBlock);if(i.Dom.after(r,s),o.nextElementSibling){let e=r.cloneNode(!1);for(e.removeAttribute("id");o.nextSibling;)i.Dom.append(e,o.nextSibling);if(i.Dom.isTag(r,"ol")){let t=parseInt(r.getAttribute("start")||"1",10)||1;e.setAttribute("start",String(t+r.children.length-1))}i.Dom.after(s,e)}return i.Dom.moveContent(o,s),i.Dom.safeRemove(o),e.s.setCursorBefore(t),!0}},14630:function(e,t,n){var i=n(62845),o=n(91748),r=n(73792),s=n(87536),a=n(12474),l=n(58940),c=n(56825),u=n(90240),d=n(68034),h=n(70921);let p=[["remove-unbreakable",c.checkRemoveUnbreakableElement],["remove-not-editable",s.checkRemoveContentNotEditable],["remove-char",r.checkRemoveChar],["table-cell",u.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",o.checkJoinTwoLists],["unwrap-list-item",h.checkUnwrapListItem],["join-neighbors",i.checkJoinNeighbors],["unwrap-first-list-item",d.checkUnwrapFirstListItem]];p.map(([,e])=>e),n.d(t,["casesMap",0,p])},32496:function(e,t,n){var i=n(82758);n(6441).Config.prototype.delete={hotkeys:{delete:i.IS_MAC?["delete"]:["delete","cmd+backspace"],deleteWord:i.IS_MAC?["ctrl+delete"]:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:i.IS_MAC?[]:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},63785:function(e,t,n){n.d(t,{addBRInsideEmptyBlock:function(){return s},findMostNestedNeighbor:function(){return o},getMoveFilter:function(){return r}});var i=n(22732);function o(e,t,n,r=!1){let s=e=>t?e.firstChild:e.lastChild,a=i.Dom.findNotEmptyNeighbor(e,!t,n);if(r&&i.Dom.isElement(a)&&!i.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&&i.Dom.isBlock(t.parentElement)&&i.Dom.each(t.parentElement,i.Dom.isEmptyTextNode)&&i.Dom.after(t,e.createInside.element("br"))}},41107:function(e,t,n){var i=n(580),o=n(21537),r=n(12153),s=n(6441);n(73674);var a=n(820),l=n(53651),c=n(16020),u=n(89758),d=n(98527),h=n(51855);i.pluginSystem.add("bold",function(e){let t=t=>{let n,i=s.Config.defaultOptions.controls[t],r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},i.css);Object.keys(r).forEach(e=>{n||(n={}),n[e]=(0,o.isArray)(r[e])?r[e][0]:r[e]});let a=i.tags?i.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",u.default).set("superscript",d.default).set("underline",h.default)},73674:function(e,t,n){var i=n(6441);i.Config.prototype.controls.subscript={tags:["sub"],tooltip:"Subscript"},i.Config.prototype.controls.superscript={tags:["sup"],tooltip:"Superscript"},i.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},i.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},i.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},i.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration-line":"line-through"},tooltip:"Strike through"}},820:function(e,t){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){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){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){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){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){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,n){var i=n(2748),o=n(580),r=n(37790),s=n(50911),a=n(12153),l=n(6441),c=n(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 n=e.s.current();if(n){let o=i.Dom.closest(n,i.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&o.classList.contains(t.control.args[0].toString()))}return!1},isActive:(e,t)=>{let n=e.s.current();if(n){let o=i.Dom.closest(n,i.Dom.isElement,e.editor)||e.editor,r=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{o.classList.contains(e)&&(r=!0)}),!!(o&&o!==e.editor&&void 0!==t.control.list&&r)}return!1},childTemplate:(e,t,n)=>`<span class="${t}">${e.i18n(n)}</span>`,tooltip:"Insert className"};class u extends s.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,n,i)=>(e.s.commitStyle({attributes:{class:i}}),!1))}beforeDestruct(){}constructor(){super(...arguments),this.buttons=[{name:"classSpan",group:"script"}]}}o.pluginSystem.add("classSpan",u),a.Icon.set("class-span",c.default)},31151:function(e,t){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,n){var i=n(65478),o=n(2748),r=n(70071),s=n(580),a=n(86518),l=n(20356);n(46776);var c=n(80973),u=n(59498),d=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,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,u.removePlaceholderBr)(this.j)}startWalker(){let{jodit:e}=this,t=(0,u.getHash)(this.j.o.cleanHTML.allowTags),n=(0,u.getHash)(this.j.o.cleanHTML.denyTags);this.walker.on("visit",i=>(0,u.visitNodeWalker)(e,i,t,n,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,u.removeFormatForWord)(this.j):(0,u.removeFormatForSelection)(this.j),!1}onAfterSetNativeEditorValue(){(0,a.safeHTML)(this.j.editor,this.j.o.cleanHTML)}onBeforeSetNativeEditorValue(e){let[t,n]=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}),o.Dom.safeRemove(n),!1}__replaceOldTags(e){let{replaceOldTags:t,disableCleanFilter:n}=this.j.o.cleanHTML;!t||(null==n?void 0:n.has("replaceOldTags"))||o.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 n=e.lastChild;if(!o.Dom.isTag(n,"br"))return;let i=n.previousSibling;!i||o.Dom.isTag(i,"br")||(!o.Dom.isText(i)||(null==(t=i.nodeValue)?void 0:t.trim())||i.previousSibling)&&o.Dom.safeRemove(n)}),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 n=t.replace(/font-family\s*:(?:&quot;|[^;])*/gi,e=>e.includes("'")?e:e.replace(/&quot;/g,"'"));return e.replace(t,n)}))}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)}}d([(0,i.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],h.prototype,"onChangeCleanHTML",null),d([(0,i.watch)([":input","jodit.editor:compositionend"])],h.prototype,"onInputRemovePlaceholderBr",null),d([(0,i.hook)("ready")],h.prototype,"startWalker",null),d([(0,i.watch)(":beforeCommand")],h.prototype,"beforeCommand",null),d([i.autobind],h.prototype,"onAfterSetNativeEditorValue",null),d([i.autobind],h.prototype,"onBeforeSetNativeEditorValue",null),d([(0,i.watch)(":afterGetValueFromEditor")],h.prototype,"onAfterGetValueFromEditor",null),d([i.autobind],h.prototype,"onSafeHTML",null),s.pluginSystem.add("cleanHtml",h)},46776:function(e,t,n){var i=n(6441);i.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},i.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},83447:function(e,t,n){n.d(t,{getHash:function(){return r}});var i=n(70799),o=n(49055);function r(e){let t=/([^[]*)\[([^\]]+)]/,n=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,s={};return(0,i.isString)(e)?(e.split(n).map(e=>{e=(0,o.trim)(e);let i=t.exec(e),a={};if(i){let e=i[2].split(n);i[1]&&(e.forEach(e=>{e=(0,o.trim)(e);let t=r.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),s[i[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,n){n.d(t,{getHash:function(){return i.getHash},removeFormatForSelection:function(){return o.removeFormatForSelection},removeFormatForWord:function(){return r.removeFormatForWord},removePlaceholderBr:function(){return s.removePlaceholderBr},visitNodeWalker:function(){return a.visitNodeWalker}});var i=n(83447);n(84272);var o=n(42312),r=n(70464),s=n(56385),a=n(39516)},15908:function(e,t,n){n.d(t,{isAllowedMediaEmbed:function(){return r}});let i=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,o=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function r(e){return i.test(e)||o.test(e)}},84272:function(e,t,n){n.d(t,{isInlineBlock:function(){return s},removeFormatForCollapsedSelection:function(){return r}});var i=n(82758),o=n(2748);function r(e,t){let{s:n}=e,i=t;if(!i){i=e.createInside.fake();let{range:t}=n;o.Dom.safeInsertNode(t,i),t.collapse()}let r=o.Dom.furthest(i,s,e.editor);if(r)if(n.cursorOnTheLeft(r))o.Dom.before(r,i);else if(n.cursorOnTheRight(r))o.Dom.after(r,i);else{let e=n.splitSelection(r);e&&o.Dom.after(e,i)}t||(n.setCursorBefore(i),o.Dom.safeRemove(i))}function s(e){return o.Dom.isInlineBlock(e)&&!o.Dom.isTag(e,i.INSEPARABLE_TAGS)}},42312:function(e,t,n){n.d(t,{removeFormatForSelection:function(){return s}});var i=n(2748),o=n(43555),r=n(84272);function s(e){let{s:t,editor:n,createInside:s}=e,{range:a}=t,l=a.cloneRange(),c=a.cloneRange(),u=s.fake(),d=s.fake();l.collapse(!0),c.collapse(!1),i.Dom.safeInsertNode(l,u),i.Dom.safeInsertNode(c,d),a.setStartBefore(u),a.collapse(!0),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,u),a.setEndAfter(d),a.collapse(!1),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,d);let h=[];i.Dom.between(u,d,e=>{(0,r.isInlineBlock)(e)&&!i.Dom.isTag(e,"a")&&h.push(e),i.Dom.isElement(e)&&(0,o.attr)(e,"style")&&(0,o.attr)(e,"style",null)}),h.forEach(e=>i.Dom.unwrap(e));let p=(e,t)=>{if(!i.Dom.findNotEmptySibling(e,t)){let i=e.parentNode;if(i&&i!==n&&(0,o.attr)(i,"style"))return(0,o.attr)(i,"style",null),p(i,t),!0}};p(u,!0)&&p(d,!1),a.setStartAfter(u),a.setEndBefore(d),t.selectRange(a),i.Dom.safeRemove(u),i.Dom.safeRemove(d)}},70464:function(e,t,n){n.d(t,{removeFormatForWord:function(){return s}});var i=n(82758),o=n(2748),r=n(42312);function s(e){let{range:t}=e.s,n=o.Dom.closest(t.startContainer,o.Dom.isBlock,e.editor);if(!n)return;let i=l(n),s=i.map(e=>o.Dom.isText(e)?e.nodeValue:" ").join(""),d=function(e,t){let n=0;for(let i of e){if(i===t.startContainer)return n+t.startOffset;let e=c(i);if(t.comparePoint(i,o.Dom.isText(i)?e:0)>0)break;n+=e}return n}(i,t);if(!a(s[d-1])||!a(s[d]))return;let h=d,p=d;for(;a(s[h-1]);)h-=1;for(;a(s[p]);)p+=1;let f=e.s.createRange();f.setStart(...u(i,h,!0)),f.setEnd(...u(i,p,!1)),e.s.selectRange(f),(0,r.removeFormatForSelection)(e);let m=e.s.createRange();m.setStart(...u(l(n),d,!1)),e.s.selectRange(m)}function a(e){return!!(e&&e!==i.INVISIBLE_SPACE&&/\S/.test(e))}function l(e){let t=[];return o.Dom.each(e,n=>{!o.Dom.closest(n,o.Dom.isBlock,e)&&(o.Dom.isText(n)||o.Dom.isTag(n,i.INSEPARABLE_TAGS))&&t.push(n)}),t}function c(e){var t,n;return o.Dom.isText(e)?null!=(n=null==(t=e.nodeValue)?void 0:t.length)?n:0:1}function u(e,t,n){var i,r;let s=0,a=null;for(let i of e){let e=c(i);if(o.Dom.isText(i)&&(t<s+e||!n&&t===s+e))return[i,t-s];o.Dom.isText(i)&&(a=i),s+=e}return[a,null!=(r=null==(i=null==a?void 0:a.nodeValue)?void 0:i.length)?r:0]}},56385:function(e,t,n){n.d(t,{removePlaceholderBr:function(){return a}});var i=n(82758),o=n(2748),r=n(49055);function s(e){let t=e.lastChild;for(;o.Dom.isText(t)&&!t.nodeValue;)t=t.previousSibling;return t}function a(e){var t;let n=o.Dom.closest(e.s.current(),o.Dom.isBlock,e.editor);if(!n||!(0,r.trim)(null!=(t=n.textContent)?t:""))return;let a=s(n);for(;o.Dom.isElement(a)&&!o.Dom.isTag(a,i.INSEPARABLE_TAGS)&&!o.Dom.isBlock(a);)a=s(a);!o.Dom.isTag(a,"br")||o.Dom.each(n,e=>{if(e!==a&&o.Dom.isElement(e)&&(o.Dom.isTag(e,i.INSEPARABLE_TAGS)||o.Dom.isBlock(e)||o.Dom.isHTMLElement(e)&&!e.isContentEditable))return!1})&&o.Dom.safeRemove(a)}},82558:function(e,t,n){n.d(t,{allowAttributes:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n,r){let s=r&&i.Dom.isElement(t)&&r[t.nodeName];if(r&&i.Dom.isElement(t)&&!0!==s){if(!s)return n;let e=t.attributes;if(e&&e.length){let i=[];for(let t=0;t<e.length;t+=1){let n=s[e[t].name];n&&(!0===n||n===e[t].value)||i.push(e[t].name)}i.length&&(n=!0),i.forEach(e=>{(0,o.attrRaw)(t,e,null)})}}return n}},1962:function(e,t,n){n.d(t,{convertUnsafeEmbeds:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!i.Dom.isElement(t))return n;let s=t.nodeName.toLowerCase();if(!r.includes(s))return n;let a=(0,o.attr)(t,"data")||(0,o.attr)(t,"src")||(0,o.attr)(t,"movie")||"";if(!a)return i.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,o.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,o.attr)(t,"width"),height:(0,o.attr)(t,"height")}),i.Dom.replace(t,l,void 0,!1,!0),!0}},39433:function(e,t,n){n.d(t,{fillEmptyParagraph:function(){return s}});var i=n(82758),o=n(2748);let r=new Set(["table","tbody","thead","tfoot","tr"]);function s(e,t,n){if(e.o.cleanHTML.fillEmptyParagraph&&o.Dom.isBlock(t)&&o.Dom.isEmpty(t,i.INSEPARABLE_TAGS)&&!o.Dom.isTag(t,r)){let n=e.createInside.element("br");return o.Dom.append(t,n),!0}return n}},45235:function(e,t,n){n.r(t),n.d(t,{allowAttributes:function(){return i.allowAttributes},convertUnsafeEmbeds:function(){return o.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 u.sandboxIframesInContent},sanitizeAttributes:function(){return d.sanitizeAttributes},sanitizeStyles:function(){return h.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var i=n(82558),o=n(1962),r=n(39433),s=n(53392),a=n(25813),l=n(80973),c=n(95614),u=n(85978),d=n(384),h=n(15583),p=n(28800)},53392:function(e,t,n){n.d(t,{removeEmptyTextNode:function(){return o}});var i=n(2748);function o(e,t,n,o,r,s){return i.Dom.isText(t)&&!t.nodeValue?(t===s&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),i.Dom.safeRemove(t),!0):n}},25813:function(e,t,n){n.d(t,{removeInvTextNodes:function(){return r}});var i=n(82758),o=n(2748);function r(e,t,n,r,s,a){if(a===t||!o.Dom.isText(t)||null==t.nodeValue||!(0,i.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return n;let l=o.Dom.furthest(a,o.Dom.isBlock,e.editor);return!l||o.Dom.isOrContains(l,t)?n:(t.nodeValue=t.nodeValue.replace((0,i.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||o.Dom.safeRemove(t),!0)}},80973:function(e,t,n){n.d(t,{replaceOldTags:function(){return o}});var i=n(2748);function o(e,t,n){let o=function(e,t,n){if(!n||!i.Dom.isHTMLElement(t))return t;let o=n[t.nodeName.toLowerCase()]||n[t.nodeName];if(o){let n=function(e,t){let{sel:n}=e.s;if(!(null==n?void 0:n.anchorNode)||!n.focusNode||!e.s.isFocused())return null;let{anchorNode:o,anchorOffset:r,focusNode:s,focusOffset:a}=n;return i.Dom.isOrContains(t,o)||i.Dom.isOrContains(t,s)?e=>{n.setBaseAndExtent(o===t?e:o,r,s===t?e:s,a)}:null}(e,t),r=i.Dom.replace(t,o,e.createInside,!0,!1);return null==n||n(r),r}return t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==o||n}},95614:function(e,t,n){n.d(t,{safeLinksTarget:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n){if(!e.o.cleanHTML.safeLinksTarget||!i.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,o.attr)(t,"target"))return n;let r=((0,o.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,o.attr)(t,"rel",r.join(" ")),!0):n}},85978:function(e,t,n){n.d(t,{sandboxIframesInContent:function(){return s}});var i=n(2748),o=n(29960),r=n(15908);function s(e,t,n){return e.o.cleanHTML.sandboxIframesInContent&&i.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,r.isAllowedMediaEmbed)((0,o.attr)(t,"src")||"")||t.hasAttribute("sandbox")?n:((0,o.attr)(t,"sandbox",""),!0):n}},384:function(e,t,n){n.d(t,{sanitizeAttributes:function(){return r}});var i=n(2748),o=n(21537);function r(e,t,n){if(!i.Dom.isElement(t))return n;let r=e.options.cleanHTML;return!!(0,o.sanitizeHTMLElement)(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})||n}},15583:function(e,t,n){n.d(t,{sanitizeStyles:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n){let r=e.o.cleanHTML.allowedStyles;if(!r||!i.Dom.isElement(t))return n;let s=(0,o.attr)(t,"style");if(!s)return n;let a=function(e,t){let n=t[e],i=t["*"];if(!n&&!i)return null;let o=new Set;if(i)for(let e of i)o.add(e.toLowerCase());if(n)for(let e of n)o.add(e.toLowerCase());return o}(t.nodeName.toLowerCase(),r);if(!a)return n;let l=s.split(";").map(e=>e.trim()).filter(e=>{if(!e)return!1;let t=e.indexOf(":");if(-1===t)return!1;let n=e.substring(0,t).trim().toLowerCase();return a.has(n)}).join("; ").replace(/;\s*$/,"");return l!==s?((0,o.attr)(t,"style",l||null),!0):n}},28800:function(e,t,n){n.d(t,{tryRemoveNode:function(){return l}});var i=n(82758),o=n(2748),r=n(49055),s=n(29960),a=n(15908);function l(e,t,n,l,c,u){return!function(e,t,n,l,c){if(!o.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let n="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,s.attr)(t,"src")||"");if(!l&&c&&c[e]&&!n)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let u=e.s.isCollapsed()?e.s.range.startContainer:null;return o.Dom.isElement(t)&&null!=t.nodeName.match(i.IS_INLINE)&&!o.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,r.trimInv)(t.innerHTML).length&&(null==n||!o.Dom.isOrContains(t,n))&&(null==u||!o.Dom.isOrContains(t,u))}(e,t,u,l,c)?n:(o.Dom.safeRemove(t),!0)}},39516:function(e,t,n){n.d(t,{visitNodeWalker:function(){return s}});var i=n(82758),o=n(45235);let r=Object.keys(o);function s(e,t,n,s,a){let l=!1,c=e.o.cleanHTML.disableCleanFilter;for(let u of r)if(!(c&&c.has(u))&&(l=(0,o[u])(e,t,l,n,s,a),i.IS_PROD,!t.isConnected))return!0;return l}},61323:function(e,t,n){var i=n(82758),o=n(33433),r=n(2748),s=n(580),a=n(21537);n(79419);class l{init(e){var t;null==(t=this.buttons)||t.forEach(t=>e.registerButton(t)),e.e.off(`copy.${i.CLIPBOARD_ID} cut.${i.CLIPBOARD_ID}`).on(`copy.${i.CLIPBOARD_ID} cut.${i.CLIPBOARD_ID}`,t=>{var n;let o=function(e,t){if(!t||e.s.isCollapsed())return t;let n=e.s.range.commonAncestorContainer;r.Dom.isElement(n)||(n=n.parentElement);let i=t;for(;n&&n!==e.editor&&r.Dom.isElement(n)&&!r.Dom.isBlock(n);){let e=n.cloneNode(!1);e.innerHTML=i,i=e.outerHTML,n=n.parentElement}return i}(e,e.s.html),s=(0,a.getDataTransfer)(t)||(0,a.getDataTransfer)(e.ew)||(0,a.getDataTransfer)(t.originalEvent);s&&(s.setData(i.TEXT_PLAIN,(0,a.stripTags)(o)),s.setData(i.TEXT_HTML,o)),e.buffer.set(i.CLIPBOARD_ID,o),e.e.fire("pasteStack",{html:o,action:e.o.defaultActionOnPaste||i.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),null==(n=null==e?void 0:e.events)||n.fire("afterCopy",o)})}destruct(e){var t,n;null==(t=(0,o.cached)(e,"buffer"))||t.set(i.CLIPBOARD_ID,""),null==(n=null==e?void 0:e.events)||n.off("."+i.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,n){var i=n(12153),o=n(6441),r=n(94775),s=n(23140),a=n(92699),l=n(10052);o.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},o.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},o.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},i.Icon.set("copy",r.default).set("cut",s.default).set("paste",a.default).set("select-all",l.default)},94775:function(e,t){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){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){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){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){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,n){var i=n(580),o=n(21537);n(21988),i.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,n,i)=>{var r;let s=(0,o.normalizeColor)(i)||"",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,n){var i=n(2748),o=n(21537),r=n(12153),s=n(6441),a=n(92762),l=n(46104);function c(e,t,n){(0,o.css)(e,t,n),(0,o.attr)(e,"style")||(0,o.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,n)=>{if(!(0,o.isJoditObject)(e))return;let i=e.getInstance("Table",e.o).getAllSelectedCells();if(!i.length)return!1;let r=t=>(0,a.ColorPickerWidget)(e,o=>{i.forEach(e=>{c(e,t,o)}),e.lock(),e.synchronizeValues(),n(),e.unlock()},(0,o.css)(i[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 n=(0,o.dataBind)(t,"color"),r=(n,i)=>!!i&&i!==(0,o.css)(e.editor,n).toString()&&(t.state.icon.fill=i,!0);if(n){let e=(0,o.dataBind)(t,"color");r("color"===e?e:"background-color",n);return}let s=e.s.current();if(s&&!t.state.disabled){let t=i.Dom.closest(s,i.Dom.isElement,e.editor)||e.editor,n=r("color",(0,o.css)(t,"color").toString()),a=r("background-color",(0,o.css)(t,"background-color").toString());if(n||a)return}t.state.icon.fill="",t.state.activated=!1},popup:(e,t,n,r)=>{let s="",l="",u,d=null;return t&&t!==e.editor&&i.Dom.isNode(t)&&(i.Dom.isElement(t)&&e.s.isCollapsed()&&!i.Dom.isTag(t,new Set(["br","hr"]))&&(d=t),i.Dom.up(t,e=>{if(i.Dom.isHTMLElement(e)){let t=(0,o.css)(e,"color",!0),n=(0,o.css)(e,"background-color",!0);if(t)return s=t.toString(),!0;if(n)return l=n.toString(),!0}},e.editor)),u=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{d?c(d,"backgroundColor",t):e.execCommand("background",!1,t),(0,o.dataBind)(r,"color",t),(0,o.dataBind)(r,"color-mode","background"),n()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{d?c(d,"color",t):e.execCommand("forecolor",!1,t),(0,o.dataBind)(r,"color",t),(0,o.dataBind)(r,"color-mode","color"),n()},s)}],"background"!==e.o.colorPickerDefaultTab&&(u=u.reverse()),(0,a.TabsWidget)(e,u,d)},exec(e,t,{button:n}){let r=(0,o.dataBind)(n,"color-mode"),s=(0,o.dataBind)(n,"color");if(!r)return!1;if(t&&t!==e.editor&&i.Dom.isNode(t)&&i.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,n){var i=n(2748),o=n(580),r=n(41180),s=n(12153),a=n(6441),l=n(57487),c=n(23914);let u="copy-format",d=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],h=(e,t,n,i)=>{let o=(0,r.css)(n,t);return o===i[t]&&(o=n.parentNode&&n!==e.editor&&n.parentNode!==e.editor?h(e,t,n.parentNode,i):void 0),o};a.Config.prototype.controls.copyformat={exec:(e,t,{button:n})=>{if(t){if(e.buffer.exists(u))e.buffer.delete(u),e.e.off(e.editor,"mouseup."+u);else{let n,o={},s=i.Dom.up(t,e=>e&&!i.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();i.Dom.append(e.editor,a),d.forEach(e=>{o[e]=(0,r.css)(a,e)}),a!==e.editor&&i.Dom.safeRemove(a);let l=(n={},s&&d.forEach(t=>{n[t]=h(e,t,s,o),t.match(/border(Style|Color)/)&&!n.borderWidth&&(n[t]=void 0)}),n);e.e.on(e.editor,"mouseup."+u,()=>{e.buffer.delete(u);let t=e.s.current();t&&(i.Dom.isTag(t,"img")?(0,r.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+u)}),e.buffer.set(u,!0)}n.update()}},isActive:e=>e.buffer.exists(u),tooltip:"Paint format"},o.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,o.extendLang)(c)}),s.Icon.set("copyformat",l.default)},57487:function(e,t){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> '},63819:function(e){e.exports={"copy-format":"نسخ التنسيق"}},72392:function(e){e.exports={"copy-format":"Kop\xedrovat form\xe1t"}},74551:function(e){e.exports={"copy-format":"Format kopierenт"}},2536:function(e){e.exports={"copy-format":"Copiar formato"}},52285:function(e){e.exports={"copy-format":"کپی کردن قالب"}},12117:function(e){e.exports={"copy-format":"Kopioi muotoilu"}},35140:function(e){e.exports={"copy-format":"Format de copie"}},28435:function(e){e.exports={"copy-format":"העתק עיצוב"}},98019:function(e){e.exports={"copy-format":"Form\xe1tum m\xe1sol\xe1s"}},96457:function(e){e.exports={"copy-format":"salin format"}},23914:function(e,t,n){n.r(t),n.d(t,{ar:function(){return i},cs_cz:function(){return o},de:function(){return r},es:function(){return s},fa:function(){return a},fi:function(){return l},fr:function(){return c},he:function(){return u},hu:function(){return d},id:function(){return h},it:function(){return p},ja:function(){return f},ko:function(){return m},mn:function(){return g},nl:function(){return b},pl:function(){return v},pt_br:function(){return y},ru:function(){return w},tr:function(){return _},zh_cn:function(){return S},zh_tw:function(){return k}});var i=n(63819),o=n(72392),r=n(74551),s=n(2536),a=n(52285),l=n(12117),c=n(35140),u=n(28435),d=n(98019),h=n(96457),p=n(33561),f=n(96545),m=n(52230),g=n(33307),b=n(71042),v=n(32172),y=n(39179),w=n(60629),_=n(68278),S=n(1172),k=n(4164)},33561:function(e){e.exports={"copy-format":"Copia il formato"}},96545:function(e){e.exports={"copy-format":"copyformat"}},52230:function(e){e.exports={"copy-format":"복사 형식"}},33307:function(e){e.exports={"copy-format":"Формат хуулах"}},71042:function(e){e.exports={"copy-format":"opmaak kopi\xebren"}},32172:function(e){e.exports={"copy-format":"format kopii"}},39179:function(e){e.exports={"copy-format":"Copiar formato"}},60629:function(e){e.exports={"copy-format":"Копировать формат"}},68278:function(e){e.exports={"copy-format":"Kopyalama Bi\xe7imi"}},1172:function(e){e.exports={"copy-format":"复制格式"}},4164:function(e){e.exports={"copy-format":"複製格式"}},66707:function(e,t,n){var i=n(82758),o=n(22732),r=n(580),s=n(21537),a=n(49055),l=n(50911);let c=new Set(["img","table","jodit","iframe","hr"]),u=new Set(["pre","pre-wrap","break-spaces"]);function d(e,t){let n=0;for(;n<e.length&&" "===e.charAt(t?e.length-1-n:n);)n+=1;return 0===n?e:t?e.slice(0,e.length-n)+i.NBSP_SPACE.repeat(n):i.NBSP_SPACE.repeat(n)+e.slice(n)}function h(e,t){var n;return!e||o.Dom.isTag(e,"br")||o.Dom.isBlock(e)||o.Dom.isText(e)&&t.test(null!=(n=e.nodeValue)?n:"")}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&&o.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,a.trim)(e.editor.textContent||"")&&!o.Dom.first(e.editor,e=>o.Dom.isTag(e,c))&&(!t||!o.Dom.closest(t,"table",e.editor))){o.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 n=this.__clearSelectedCells(t);if(n&&t.collapsed)return e.s.selectRange(n),!1;t.deleteContents();let i=e.createInside.fake();t.insertNode(i);let r=o.Dom.findSibling(i,!0),s=o.Dom.findSibling(i,!1);return this.__moveContentInLeftSibling(i,r,s),this.__keepSpacesVisible(i),this.__keepSpacesVisibleBesideTable(i),t.setStartBefore(i),t.collapse(!0),this.__moveCursorInEditableSibling(e,r,i,t),this.__addBrInEmptyBlock(i,t),o.Dom.safeRemove(i),e.s.selectRange(null!=n?n:t),!1}__moveEdgesIntoCells(e){let{startContainer:t,startOffset:n,endContainer:i,endOffset:r}=e,s=o.Dom.isTag(t,"tr")?t.childNodes[n]:null,a=o.Dom.isTag(i,"tr")?i.childNodes[r-1]:null;o.Dom.isCell(s)&&e.setStart(s,0),o.Dom.isCell(a)&&e.setEnd(a,a.childNodes.length)}__clearSelectedCells(e){let{editor:t,createInside:n}=this.j,i=o.Dom.closest(e.startContainer,o.Dom.isCell,t),r=o.Dom.closest(e.endContainer,o.Dom.isCell,t);if(i===r)return null;let a=o.Dom.closest(i,"table",t),l=o.Dom.closest(r,"table",t),c=e.cloneRange();c.collapse(!0);let u=e.cloneRange();u.collapse(!1);let d=[],h=t=>{(0,s.toArray)(t.rows).flatMap(e=>(0,s.toArray)(e.cells)).filter(t=>e.intersectsNode(t)).forEach(t=>{let n=e.cloneRange();o.Dom.isOrContains(t,e.startContainer)||n.setStart(t,0),o.Dom.isOrContains(t,e.endContainer)||n.setEnd(t,t.childNodes.length),d.push([t,n])})};return a&&(h(a),a===l?e.collapse(!0):e.setStartAfter(a)),l&&l!==a&&(h(l),e.setEndBefore(l)),d.forEach(([e,t])=>{if(t.deleteContents(),o.Dom.isEmpty(e)){o.Dom.detach(e),o.Dom.append(e,n.element("br"));return}[c,u].filter(t=>o.Dom.isOrContains(e,t.startContainer)).forEach(e=>{let t=n.fake();e.insertNode(t),this.__keepSpacesVisible(t),e.setStartBefore(t),e.collapse(!0),o.Dom.safeRemove(t)})}),a?c:null}__moveContentInLeftSibling(e,t,n){if(t=this.__defineRightLeftBox(t),o.Dom.isTag(t,"table")){o.Dom.isBlock(n)&&o.Dom.isEmpty(n)&&o.Dom.safeRemove(n);return}if(!o.Dom.isList(n)&&!o.Dom.isTag(n,"table")&&o.Dom.isBlock(n)&&o.Dom.isBlock(t)&&(o.Dom.append(t,e),o.Dom.moveContent(n,t),o.Dom.safeRemove(n)),o.Dom.isList(n)&&o.Dom.isLeaf(n.firstElementChild)){let i=n.firstElementChild;if(!o.Dom.isEmpty(i)&&o.Dom.isBlock(t))for(o.Dom.append(t,e);i.firstChild&&!o.Dom.isBlock(i.firstChild);)o.Dom.append(t,i.firstChild);o.Dom.isEmpty(i)&&o.Dom.safeRemove(i),o.Dom.isEmpty(n)&&o.Dom.safeRemove(n)}}__keepSpacesVisible(e){var t;let{jodit:n}=this,i=null!=(t=o.Dom.closest(e,o.Dom.isBlock,n.editor))?t:n.editor;if(u.has(n.ew.getComputedStyle(i).whiteSpace))return;let r=this.__findNeighbor(e,!0,i),s=this.__findNeighbor(e,!1,i);o.Dom.isText(r)&&h(s,/^ /)&&(r.nodeValue=d(r.nodeValue,!0)),o.Dom.isText(s)&&h(r,/ $/)&&(s.nodeValue=d(s.nodeValue,!1))}__keepSpacesVisibleBesideTable(e){let t=o.Dom.findNotEmptySibling(e,!0),n=o.Dom.findNotEmptySibling(e,!1),i=o.Dom.isTag(n,"table")?t:o.Dom.isTag(t,"table")?n:null;if(!o.Dom.isBlock(i)||o.Dom.isTag(i,"table"))return;let r=this.jodit.createInside.fake();i===t?o.Dom.append(i,r):i.insertBefore(r,i.firstChild),this.__keepSpacesVisible(r),o.Dom.safeRemove(r)}__findNeighbor(e,t,n){return(0,s.call)(t?o.Dom.prev:o.Dom.next,e,e=>{var t;return o.Dom.isText(e)?(0,s.trimInv)(null!=(t=e.nodeValue)?t:"").length>0:!o.Dom.isComment(e)&&!(o.Dom.isInlineBlock(e)&&e.firstChild)},n)}__defineRightLeftBox(e){if(!o.Dom.isList(e))return e;let t=e.lastElementChild;return o.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),o.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t){let n=this.j;if(e.isConnected&&o.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let i=n.createInside.element("br");o.Dom.after(e,i),t.setStartBefore(i),t.collapse(!0)}}__moveCursorInEditableSibling(e,t,n,i){var r;if(!t||!o.Dom.isText(t)){let t=null!=(r=o.Dom.closest(n,o.Dom.isBlock,e.editor))?r:e.editor,s=o.Dom.prev(n,o.Dom.isText,t);s&&(i.setStartAfter(s),i.collapse(!0),o.Dom.safeRemove(n))}}}p.requires=["backspace"],r.pluginSystem.add("deleteCommand",p)},44586:function(e,t,n){n(6441).Config.prototype.draggableTags=["img","jodit-media","jodit"]},1255:function(e,t,n){var i,o,r=n(65478),s=n(22732),a=n(580),l=n(21537),c=n(50911);n(44586);var u=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};(i=o||(o={}))[i.IDLE=0]="IDLE",i[i.WAIT_DRAGGING=1]="WAIT_DRAGGING",i[i.DRAGGING=2]="DRAGGING";class d 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>o.IDLE||!e||this.startDragging(e,t)}onDragStart(e){var t;if("dragstart"===e.type&&this.draggable)return!1;if(this.state>o.IDLE)return;let n=e.target;if(!this.dragList.length||!n)return;let i=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),r=s.Dom.furthest(n,i,this.j.editor)||(i(n)?n: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=o.WAIT_DRAGGING,this.addDragListeners()}onDrag(e){var t,n;if(!this.draggable||this.state===o.IDLE)return;let i=e.clientX,r=e.clientY;if(this.state===o.WAIT_DRAGGING&&Math.sqrt(Math.pow(i-this.startX,2)+Math.pow(r-this.startY,2))<this.diffStep)return;this.state===o.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=o.DRAGGING),this.j.e.fire("hidePopup hideResizer");let c=this.__ghostOffset();if(!this.draggable.parentNode){let i=(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==i?void 0:i.offsetWidth)?t:100,height:null!=(n=null==i?void 0:i.offsetHeight)?n:100}),s.Dom.append((0,a.getContainer)(this.j,d),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=o.IDLE,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<o.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=o.IDLE}}u([r.autobind],d.prototype,"onStartDragElement",null),u([r.autobind],d.prototype,"onDragStart",null),u([(0,r.throttle)(e=>e.defaultTimeout/10)],d.prototype,"onDrag",null),u([r.autobind],d.prototype,"onDragEnd",null),u([r.autobind],d.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",d)},19271:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(50911),c=n(8172),u=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class d 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 n=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=r.Dom.isOrContains(this.j.editor,n,!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=n,r.Dom.isElement(t)&&t.classList.contains(c.FileBrowserFiles.prototype.getFullElName("item"))&&(n=r.Dom.first(n,e=>r.Dom.isTag(e,"img"))),r.Dom.isTag(n,"img")&&(this.draggable=n.cloneNode(!0),(0,a.dataBind)(this.draggable,"target",n)),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,n=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),i=this.__getWorkFragment(n,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),i&&this.__insertFragment.call(this,i,n),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let n=null;if(!this.draggable&&e)n=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"];n=this.j.createInside.element(e),(0,a.attr)(n,t,(0,a.attr)(this.draggable,"data-src")||(0,a.attr)(this.draggable,"src")||""),"a"===e&&(n.textContent=(0,a.attr)(n,t)||"")}else n=(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),n=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e}return n}__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(i.TEXT_HTML)||t.getData(i.TEXT_PLAIN):null}}}u([o.autobind],d.prototype,"onDragStart",null),u([(0,o.throttle)(e=>e.defaultTimeout/10)],d.prototype,"onDrag",null),u([o.autobind],d.prototype,"onDragEnd",null),u([o.autobind],d.prototype,"onDrop",null),s.pluginSystem.add("dragAndDrop",d)},46124:function(e,t,n){n.r(t),n.d(t,{removeExtraBr:function(){return i.removeExtraBr}});var i=n(94870)},94870:function(e,t,n){n.d(t,{removeExtraBr:function(){return r}});var i=n(2748);let o=new Set(["table","pre","blockquote","code"]);function r(e,t){if(!e.o.dtd.removeExtraBr||i.Dom.isTag(t,"br"))return;let n=i.Dom.furthest(t,i.Dom.isBlock,e.editor);if(n&&!i.Dom.isTag(n,o)){let n=i.Dom.isTag(t,"br")?t:i.Dom.findNotEmptySibling(t,!1);if(!i.Dom.isTag(n,"br")||i.Dom.findNotEmptySibling(n,!1))return;i.Dom.isOrContains(t,e.s.range.startContainer)||e.s.setCursorBefore(n),i.Dom.safeRemove(n)}}},78720:function(e,t,n){n.d(t,{checkBlockNesting:function(){return o}});var i=n(2748);function o(e,t){var n,o;if(i.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&i.Dom.isBlock(t)){let r=null,s=null!=(o=null==(n=e.s.current())?void 0:n.parentElement)?o:null;for(;s&&s!==e.editor;){if(i.Dom.isBlock(s)){let t=!r&&i.Dom.isTag(s,e.o.enter)&&i.Dom.isEmpty(s);if(e.o.dtd.blockLimits[s.nodeName.toLowerCase()]&&!t)break;r=s}s=s.parentElement}i.Dom.isLeaf(s)&&i.Dom.isList(t)&&i.Dom.isFragment(t.parentNode)&&!i.Dom.findNotEmptySibling(t,!1)&&(i.Dom.unwrap(t),r=s),r&&function(e,t){var n;let{s:o}=e;if(i.Dom.isEmpty(t)){o.setCursorAfter(t),i.Dom.safeRemove(t);return}o.cursorOnTheRight(t)?o.setCursorAfter(t):o.cursorOnTheLeft(t)?o.setCursorBefore(t):o.setCursorAfter(null!=(n=o.splitSelection(t))?n:t)}(e,r)}}},43267:function(e,t,n){n.r(t),n.d(t,{checkBlockNesting:function(){return i.checkBlockNesting}});var i=n(78720)},9045:function(e,t,n){n(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,n){var i=n(37133),o=n(580),r=n(50911);n(9045);var s=n(46124),a=n(43267),l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,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,i.watch)(":beforeInsertNode")],c.prototype,"__onBeforeInsertNode",null),l([(0,i.watch)(":afterInsertNode")],c.prototype,"__onAfterInsertNode",null),o.pluginSystem.add("dtd",c)},575:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(87612),l=n(20356),c=n(35399);class u extends l.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),n=t===i.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=n?i.PARAGRAPH:t),e.registerCommand("enter",(e,t,n={})=>this.onEnter(n))}onEnterKeyDown(e){if(e.key===i.KEY_ENTER){let t=this.j,n=t.e.fire("beforeEnter",e);return void 0!==n?n:(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,n=t.createInside.fake();try{r.Dom.safeInsertNode(t.s.range,n),(0,c.moveCursorOutFromSpecialTags)(t,n,["a"]);let i=(0,c.getBlockWrapper)(n,t),o=r.Dom.isLeaf(i);if((!o||(null==e?void 0:e.shiftKey))&&(0,c.checkBR)(n,t,null==e?void 0:e.shiftKey,i))return!1;if(i||(0,c.hasPreviousBlock)(n,t)||(i=(0,c.wrapText)(n,t)),!i)return(0,c.insertParagraph)(n,t,o?"li":t.o.enter),!1;if(!(0,c.checkUnsplittableBox)(n,t,i))return!1;if(o&&this.__isEmptyListLeaf(i))return(0,c.processEmptyLILeaf)(n,t,i),!1;(0,c.splitFragment)(n,t,i)}finally{n.isConnected&&t.s.setCursorBefore(n),r.Dom.safeRemove(n)}}__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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([(0,o.watch)(":keydown.enter")],u.prototype,"onEnterKeyDown",null),s.pluginSystem.add("enter",u)},41872:function(e,t,n){n.d(t,{checkBR:function(){return s}});var i=n(82758),o=n(2748),r=n(26395);function s(e,t,n,s){let l=!!o.Dom.closest(e,"pre",t.editor)||(s?o.Dom.isTag(s,"blockquote"):!!o.Dom.closest(e,"blockquote",t.editor)),c=!l&&(s?o.Dom.isCell(s):!!o.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===i.BR.toLowerCase()||c||n&&!l||!n&&l){var u;let n;if(l&&(n=a(a(u=e)))&&(o.Dom.safeRemove(a(u)),o.Dom.safeRemove(n),1))return!1;let i=t.createInside.element("br");if(o.Dom.before(e,i),!o.Dom.findNotEmptySibling(i,!1)){let t=i.cloneNode();o.Dom.after(i,t),o.Dom.before(t,e)}let s=i.cloneNode();return o.Dom.before(e,s),(0,r.scrollIntoViewIfNeeded)(s,t.editor,t.ed),o.Dom.safeRemove(s),!0}return!1}function a(e){if(!e)return!1;let t=o.Dom.findSibling(e,!0);return!!t&&!!o.Dom.isTag(t,"br")&&t}},61991:function(e,t,n){n.d(t,{checkUnsplittableBox:function(){return o}});var i=n(2748);function o(e,t,n){return!!i.Dom.canSplitBlock(n)||(i.Dom.before(e,t.createInside.element("br")),!1)}},54041:function(e,t,n){n.d(t,{getBlockWrapper:function(){return function e(t,n,r=i.IS_BLOCK){let s=t,a=n.editor;do{if(!s||s===a)break;if(r.test(s.nodeName)){if(o.Dom.isLeaf(s))return s;return e(s.parentNode,n,/^li$/i)||s}s=s.parentNode}while(s&&s!==a);return null}}});var i=n(82758),o=n(2748)},19057:function(e,t,n){n.d(t,{hasPreviousBlock:function(){return o}});var i=n(2748);function o(e,t){return!!i.Dom.prev(e,e=>i.Dom.isBlock(e)||i.Dom.isImage(e),t.editor)}},35399:function(e,t,n){n.d(t,{checkBR:function(){return i.checkBR},checkUnsplittableBox:function(){return o.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 u.splitFragment},wrapText:function(){return d.wrapText}});var i=n(41872),o=n(61991),r=n(54041),s=n(19057),a=n(44245),l=n(91388),c=n(65181),u=n(54600),d=n(5287)},44245:function(e,t,n){n.d(t,{insertParagraph:function(){return s}});var i=n(2748),o=n(29960),r=n(26395);function s(e,t,n,s){let a="br"===n.toLowerCase(),{createInside:l}=t,c=l.element(n),u=l.element("br");return a||i.Dom.append(c,u),s&&s.cssText&&(0,o.attr)(c,"style",s.cssText),i.Dom.after(e,c),i.Dom.before(a?c:u,e),(0,r.scrollIntoViewIfNeeded)(c,t.editor,t.ed),c}},91388:function(e,t,n){n.d(t,{moveCursorOutFromSpecialTags:function(){return o}});var i=n(2748);function o(e,t,n){let{s:o}=e,r=i.Dom.closest(t,n,e.editor);if(r){if(o.cursorOnTheRight(r,t))i.Dom.after(r,t);else{if(!o.cursorOnTheLeft(r,t))return;i.Dom.before(r,t)}let e=o.createRange();e.setStartBefore(t),o.selectRange(e)}}},65181:function(e,t,n){n.d(t,{processEmptyLILeaf:function(){return s}});var i=n(2748),o=n(76078),r=n(44245);function s(e,t,n){let s=i.Dom.closest(n,["ol","ul"],t.editor);if(!s)return;let a=s.parentElement,l=i.Dom.isLeaf(a),c=l?a:s,u=t.s.createRange();u.setStartAfter(n),u.setEndAfter(s);let d=u.extractContents();i.Dom.after(c,e),i.Dom.safeRemove(n),(0,o.$$)("li",s).length||i.Dom.safeRemove(s);let h=(0,r.insertParagraph)(e,t,l?"li":t.o.enter);i.Dom.first(d,e=>i.Dom.isTag(e,"li"))&&(l?i.Dom.append(h,d):i.Dom.after(h,d))}},54600:function(e,t,n){n.d(t,{splitFragment:function(){return s}});var i=n(2748),o=n(26395),r=n(44245);function s(e,t,n){let s=t.s,{enter:a}=t.o,l=a.toLowerCase(),c=i.Dom.isLeaf(n),u=n.tagName.toLowerCase()===l||c,d=s.cursorOnTheRight(n,e),h=s.cursorOnTheLeft(n,e);if(!u&&(d||h)){d?i.Dom.after(n,e):i.Dom.before(n,e),(0,r.insertParagraph)(e,t,l),h&&!d&&i.Dom.prepend(n,e);return}let{scrollTop:p}=t.editor;s.splitSelection(n,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,o.scrollIntoViewIfNeeded)(n,t.editor,t.ed)}},5287:function(e,t,n){n.d(t,{wrapText:function(){return o}});var i=n(2748);function o(e,t){let n=e;i.Dom.up(n,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(n=e)},t.editor);let o=i.Dom.wrapInline(n,t.o.enter,t);if(i.Dom.isEmpty(o)){let n=t.createInside.element("br");i.Dom.append(o,n),i.Dom.before(n,e)}return o}},11317:function(e,t,n){var i=n(2748),o=n(580),r=n(29960),s=n(6441),a=n(2073),l=n(92762);function c(e,t,n=""){if(e.s.isCollapsed())return!1;let i=e.s.wrapInTag("a");return!!i.length&&(i.forEach(e=>{(0,r.attr)(e,"href",t),n&&(0,r.attr)(e,"title",n)}),e.s.setCursorAfter(i[i.length-1]),!0)}function u(e){let{baseurl:t}=e;(0,a.getItems)(e).forEach(({file:e})=>{let n=t+e;if(c(this,n))return;let i=this.createInside.element("a",{href:n});i.textContent=this.o.uploader.getDisplayName.call(this.uploader,t,e),this.s.insertNode(i)})}s.Config.prototype.file={defaultHandlerSuccess:u},s.Config.prototype.controls.file={popup:(e,t,n)=>{let o=e.s.isCollapsed()?null:e.s.range,s=()=>{o&&e.s.selectRange(o)},d=(t,n="")=>{s(),c(e,t,n)||e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${n}">${n||t}</a>`))},h=null;return t&&(i.Dom.isTag(t,"a")||i.Dom.closest(t,"a",e.editor))&&(h=i.Dom.isTag(t,"a")?t:i.Dom.closest(t,"a",e.editor)),(0,l.FileSelectorWidget)(e,{filebrowser:e=>{(0,a.getItems)(e).forEach(({file:t})=>d(e.baseurl+t)),n()},upload:t=>{var n,i;s(),(null!=(i=null==(n=e.o.file)?void 0:n.defaultHandlerSuccess)?i:u).call(e,t)},url:(e,t)=>{h?((0,r.attr)(h,"href",e),(0,r.attr)(h,"title",t)):d(e,t),n()}},h,n,!1)},tags:["a"],tooltip:"Insert file"},o.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},36243:function(e,t,n){var i=n(82758),o=n(22732),r=n(580),s=n(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=o.Dom.first(e.editor,e=>o.Dom.isText(e));break;case"end":t=o.Dom.last(e.editor,e=>o.Dom.isText(e))}t&&e.s.setCursorIn(t,"start"===e.o.cursorAfterAutofocus)};e.e.on("afterInit",()=>{if(e.o.autofocus)if(e.defaultTimeout){let n="mousedown touchstart keydown",i=()=>{e.async.clearTimeout(o),e.e.off(n,i)},o=e.async.setTimeout(()=>{e.e.off(n,i),t()},300);e.e.on(n,i)}else t()}),e.e.on("afterInit afterAddPlace",()=>{e.e.off(e.editor,"mousedown.autofocus").on(e.editor,"mousedown.autofocus",t=>{e.isEditorMode()&&t.target&&o.Dom.isBlock(t.target)&&!o.Dom.isTag(t.target,i.INSEPARABLE_TAGS)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},28252:function(e,t,n){var i,o,r=n(22732),s=n(68345),a=n(49055),l=n(41180),c=n(12153),u=n(6441),d=n(4104),h=n(83709),p=n(40222);u.Config.prototype.defaultFontSizePoints="px",u.Config.prototype.font={googleFonts:{url:""}},c.Icon.set("font",d.default).set("fontsize",h.default);let f=new WeakSet;u.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,n)=>`${n}${e.o.defaultFontSizePoints}`,tooltip:"Font size",value:(e,t)=>{var n;let i=e.s.current(),o=i&&r.Dom.closest(i,r.Dom.isElement,e.editor),s=t.control;if(o)f.add(t);else if("select"!==s.component||f.has(t))return;let a=(null==(n=s.data)?void 0:n.cssRule)||"font-size",c=(0,l.css)(o||e.editor,a);if("font-size"===a){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 n,i;let o=t.state.value,r=null!=(i=null==(n=t.control.data)?void 0:n.normalize)?i:e=>e;return!!(o&&t.control.args&&r(t.control.args[0].toString())===r(o.toString()))},isActive:(e,t)=>{var n,i;let o=t.state.value;if(!o)return!1;let r=null!=(i=null==(n=t.control.data)?void 0:n.normalize)?i: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(o.toString()))}},u.Config.prototype.controls.font=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},u.Config.prototype.controls.fontsize),o=o={command:"fontname",textTemplate:(e,t)=>{let[n]=t.split(",");return(0,a.trimChars)(n,"\"'")},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,n)=>{let i=!1;try{i=-1===t.indexOf("dings")&&document.fonts.check(`16px ${t}`,n)}catch(e){}return`<span data-style="${t}" style="${i?`font-family: ${t}!important;`:""}">${n}</span>`},popup:(e,t,n,i)=>!!e.o.font.googleFonts.url&&new p.UIFontPicker(e,i,n),data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value:(e,t)=>{let n=e.s.current(),i=n&&r.Dom.closest(n,r.Dom.isElement,e.editor);if(i)f.add(t);else if(f.has(t))return;let o=(0,l.css)(i||e.editor,"font-family").toString(),{list:a}=t.control;return o===(0,l.css)(e.editor,"font-family").toString()&&((0,s.isArray)(a)?a.includes(""):""in(null!=a?a:{}))?"":o},tooltip:"Font family"},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}),i)},40222:function(e,t,n){n.d(t,{UIFontPicker:function(){return g}});var i=n(87325),o=n(37133),r=n(2748),s=n(580),a=n(68345),l=n(29960),c=n(41180),u=n(37790),d=n(48538),h=n(41870),p=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let f=["h1","h2","h3","h4","h5","h6"],m=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),g=class e extends d.UIElement{className(){return"UIFontPicker"}__render(){var e,t;let{control:n}=this.__button,{list:i={}}=n,o=(0,a.isArray)(i)?i.map(e=>({value:e.toString(),title:e.toString()})):(0,u.keys)(i,!1).map(e=>({value:e,title:i[e].toString()})),s=Array.from(this.__googleFonts.fonts.values(),e=>({value:this.__googleFonts.value(e),title:e.family,font:e})),l=new Map;[...s,...o].forEach(e=>l.set((0,h.firstFamily)(e.value),e));let c=new Map,d=new Map;this.__themeFonts().forEach(e=>{var t;let n=(0,h.firstFamily)(e),i=e.split(",")[0].replace(/["']/g,"").trim(),o=null!=(t=l.get(n))?t:!n||n.startsWith("-")||m.has(n)?void 0:{value:e,title:i};o&&!c.has(n)&&c.set(n,o)}),this.__usedFonts().forEach(e=>{let t=(0,h.firstFamily)(e),n=l.get(t);n&&!c.has(t)&&d.set(t,n)});let p=o.find(e=>""===e.value),f=(0,h.firstFamily)(null!=(t=null==(e=n.value)?void 0:e.call(n,this.j,this.__button))?t:"");r.Dom.detach(this.container),this.__fonts.clear(),p&&this.__append(f,[p]),this.__append(f,[...c.values()],"Theme fonts"),this.__append(f,[...d.values()],"Used fonts"),this.__append(f,o.filter(e=>e!==p),"System fonts"),this.__append(f,s,"Google Fonts"),this.__observeGoogleFonts()}__themeFonts(){let{editor:e}=this.j,t=[(0,c.css)(e,"font-family").toString()];return f.forEach(n=>{let i=this.j.createInside.element(n,{style:"display: none"});r.Dom.append(e,i),t.push((0,c.css)(i,"font-family").toString()),r.Dom.safeRemove(i)}),t}__usedFonts(){return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'),e=>e.style.fontFamily)}__append(e,t,n){if(!t.length)return;let{control:i}=this.__button,o=this.j.c.div(this.getFullElName("group"));if(n){let e=this.j.c.div(this.getFullElName("heading"),{id:`${this.getFullElName("heading")}-${(0,s.uniqueUid)()}`});e.textContent=this.i18n(n),(0,l.attr)(o,{role:"group","aria-labelledby":e.id}),r.Dom.append(o,e)}t.forEach(t=>{var n,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==(n=i.childTemplate)?void 0:n.call(i,this.j,t.value,t.title,this.__button))?s:t.title,r.Dom.append(o,a)}),r.Dom.append(this.container,o)}__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 n=[];e.forEach(({isIntersecting:e,target:i})=>{let o=this.__fonts.get(i);e&&o&&(n.push(o),(0,c.css)(i,{fontFamily:this.__googleFonts.value(o)}),t.unobserve(i))}),this.__googleFonts.preview(n)},{root:this.container.parentElement,rootMargin:"0px 0px 400px 0px"});this.__fonts.forEach((e,n)=>t.observe(n)),this.__observer=t})}onMouseDown(e){e.preventDefault()}onClick(e){var t;let n=r.Dom.up(e.target,e=>r.Dom.isHTMLElement(e)&&e.hasAttribute("data-value"),this.container);if(!n)return;let i=null!=(t=(0,l.attr)(n,"data-value"))?t:"",o=this.__googleFonts.find(i),s=(0,h.firstFamily)(i)===(0,h.firstFamily)(this.__blockFont());o&&!s&&this.__googleFonts.load(o),this.j.execCommand("fontname",!1,s?"":i),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,n){super(e),this.__button=t,this.__close=n,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,o.watch)("container:mousedown")],g.prototype,"onMouseDown",null),p([(0,o.watch)("container:click")],g.prototype,"onClick",null),g=p([i.component],g)},23399:function(e,t,n){var i=n(580),o=n(21537);n(28252);var r=n(41870);i.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),n=e.async.debounce(()=>t.loadUsed(),e.defaultTimeout);t.ready.then(n),e.e.on("afterInit afterSetMode change",n)}e.e.on("afterInit",()=>{e.iframe&&e.e.on(e.ed,"load",()=>e.e.fire("updateToolbar"),{capture:!0})});let t=(t,n,i)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,o.normalizeSize)(i,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:i}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},41870:function(e,t,n){n.d(t,{GoogleFonts:function(){return c},firstFamily:function(){return l}});var i=n(80480),o=n(2748),r=n(54079);let s={serif:"serif",monospace:"monospace"},a=new Map;function l(e){return e.split(",")[0].replace(/["']/g,"").trim().toLowerCase()}class c extends i.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 n=[["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@${n.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 n=e.map(e=>`family=${this.__family(e)}`),i=new Set(e.map(e=>e.family).join(""));this.__append(this.j.od,`${n.join("&")}&text=${encodeURIComponent([...i].join(""))}`)}__loadedInto(e){var t;let n=null!=(t=this.__loaded.get(e))?t:new Set;return this.__loaded.set(e,n),n}__family(e){return encodeURIComponent(e.family).replace(/%20/g,"+")}__append(e,t){let n=e.createElement("link");n.rel="stylesheet",n.href=`https://fonts.googleapis.com/css2?${t}&display=swap`,e.head.appendChild(n),this.__links.push(n)}destruct(){this.__links.forEach(e=>o.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 n=a.get(t);if(!n){let i=new r.Ajax({url:t,method:"GET"},e.o.defaultAjaxOptions);n=i.send().then(e=>e.json()).then(({items:e})=>e.filter(e=>e.variants.includes("regular"))).catch(()=>(a.delete(t),[])).finally(()=>i.destruct()),a.set(t,n)}return n})(e,e.o.font.googleFonts.url).then(e=>{e.forEach(e=>this.fonts.set(e.family.toLowerCase(),e))})}}},4104:function(e,t){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){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,n){var i=n(2748),o=n(72430),r=n(12153),s=n(6441),a=n(4932),l=n(89816);r.Icon.set("paragraph",l.default),s.Config.prototype.formatBlock={previewProperties:[]},s.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){var n,o;let r=t.control,s=e.s.current(),a=i.Dom.closest(s,i.Dom.isBlock,e.editor);return null!=(n=null==a?void 0:a.nodeName.toLowerCase())?n:null==(o=r.data)?void 0:o.currentValue},update(e,t){let n=t.control;if(!e.s.current())return!1;let i=t.state.value,r=n.list;return(0,o.isPlainObject)(r)&&r[i.toString()]&&e.o.textIcons&&(t.state.text=r[i.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 n,i;return t.state.value===(null==(i=null==(n=t.control)?void 0:n.args)?void 0:i[0])},isActive:(e,t)=>t.state.value!==e.o.enter&&(0,o.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,n)=>`<${t} style="margin:0;padding:0${function(e,t){let{previewProperties:n}=e.o.formatBlock;if(!n.length)return"";let o=e.createInside.element(t,{style:"display: none"});i.Dom.append(e.editor,o);let r=e.ew.getComputedStyle(o),s=parseFloat(r.fontSize)||16,l=n.map(t=>{let n=r.getPropertyValue(t);return n&&"font-family"===t&&(n=(0,a.withContentFonts)(e,n)),n?`;${t}:${n.replace(/(-?[\d.]+)px/g,(e,t)=>`${parseFloat(t)/s}em`).replace(/"/g,"'")}`:""}).join("");return i.Dom.safeRemove(o),l}(e,t)}"><span>${e.i18n(n)}</span></${t}>`,tooltip:"Insert format block"}},4932:function(e,t,n){n.d(t,{withContentFonts:function(){return s}});let i=new WeakMap,o=new Map,r=0;function s(e,t){let{ed:n,od:o}=e;if(n===o)return t;let s=function(e){let t=i.get(e);if(!t){let{od:n}=e,o={prefix:`jodit-preview-${++r}-`,faces:new Map,pending:!1};i.set(e,o),e.e.on("beforeDestruct",()=>o.faces.forEach(e=>n.fonts.delete(e))),t=o}return t}(e);!function(e,t){if(t.pending)return;t.pending=!0;let{ed:n,od:i}=e;Promise.all(Array.from(n.styleSheets,e=>a(e,n.baseURI))).then(n=>{t.pending=!1,e.isInDestruct||n.flat().forEach(e=>{let n=JSON.stringify(e);if(!t.faces.has(n)){let o=new FontFace(t.prefix+e.family,e.source,e.descriptors);i.fonts.add(o),t.faces.set(n,o)}})})}(e,s);let l=new Set;return n.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 n;let i;try{i=e.cssRules}catch(i){let{href:t}=e;if(!t)return Promise.resolve([]);let n=o.get(t);return n||(n=fetch(t).then(e=>e.text()).then(e=>{let n=document.implementation.createHTMLDocument(""),i=n.createElement("style");return i.textContent=e,n.head.appendChild(i),i.sheet?l(i.sheet.cssRules,t):[]}).catch(()=>[]),o.set(t,n)),n}return l(i,null!=(n=e.href)?n:t)}function l(e,t){return Promise.all(Array.from(e,e=>{var n;let i;if("styleSheet"in e){let{styleSheet:n}=e;return n?a(n,t):[]}return"cssRules"in e?l(e.cssRules,t):e.cssText.startsWith("@font-face")?[(i=t=>e.style.getPropertyValue(t)||void 0,{family:c(e.style.getPropertyValue("font-family")),source:(n=e.style.getPropertyValue("src"),n.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g,(e,n,i)=>{try{return`url("${new URL(i,t).href}")`}catch(t){return e}})),descriptors:{style:i("font-style"),weight:i("font-weight"),stretch:i("font-stretch"),unicodeRange:i("unicode-range")}})]:[]})).then(e=>e.flat())}function c(e){return e.replace(/["']/g,"").trim().toLowerCase()}},96111:function(e,t,n){var i=n(580);n(24630),i.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,n,i)=>(e.s.commitStyle({element:i}),e.synchronizeValues(),!1))})},89816:function(e,t){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,n){var i=n(82758),o=n(12153),r=n(6441),s=n(6950),a=n(28911);r.Config.prototype.fullsize=!1,r.Config.prototype.globalFullSize=!0,o.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 n=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=n:t.state.icon.name=n},tooltip:"Open in fullsize",mode:i.MODE_SOURCE+i.MODE_WYSIWYG}},2169:function(e,t,n){var i=n(2748),o=n(580),r=n(19306),s=n(41180);n(99823);let a=new Set;o.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,n=0,o=0,l=0,c=0,u=!1,d=()=>{let{container:i,events:r}=e;r&&(t?(u||(n=(0,s.css)(i,"height",!0),o=(0,s.css)(i,"width",!0),u=!0),(0,s.css)(i,{height:e.ow.innerHeight,width:e.ow.innerWidth})):u&&((0,s.css)(i,{height:n||"auto",width:o||"auto"}),u=!1))},h=n=>{let{container:o,events:u}=e;if(o){if(void 0===n&&(n=!o.classList.contains("jodit_fullsize")),e.setMod("fullsize",n),e.o.fullsize=n,t=n,o.classList.toggle("jodit_fullsize",n),e.toolbar&&((0,r.isJoditObject)(e)&&e.toolbarContainer&&i.Dom.append(e.toolbarContainer,e.toolbar.container),(0,s.css)(e.toolbar.container,"width","auto")),n?a.add(o):a.delete(o),e.o.globalFullSize&&(1===a.size&&n||0===a.size&&!n)){n&&(l=e.ow.scrollX,c=e.ow.scrollY);let t=o.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",n),t=t.parentNode;d(),n||e.ow.scrollTo(l,c)}u.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",d),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",d)})})},6950:function(e,t){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){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,n){n(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,n){var i=n(82758),o=n(580),r=n(21537),s=n(50911);n(78524);class a extends s.Plugin{afterInit(e){(0,r.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let n=e.o.commandToHotkeys[t];n&&((0,r.isArray)(n)||(0,r.isString)(n))&&e.registerHotkeyToCommand(n,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===i.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",n=>{let i=this.onKeyPress(n),o={shouldStop:!0};if(!1===this.j.e.fire(i+".hotkey",n.type,o))if(o.shouldStop)return t=!0,e.e.stopPropagation("keydown"),!1;else n.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],n=(e.key||String.fromCharCode(e.which)).toLowerCase(),i=[t||n];return["alt","ctrl","shift","meta"].forEach(n=>{e[n+"Key"]&&t!==n&&i.push(n)}),(0,r.normalizeKeyAliases)(i.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:"'"}}}o.pluginSystem.add("hotkeys",a)},16233:function(e,t,n){var i=n(22732),o=n(580),r=n(12153),s=n(6441),a=n(72337);r.Icon.set("hr",a.default),s.Config.prototype.controls.hr={command:"insertHorizontalRule",tooltip:"Insert Horizontal Line"},o.pluginSystem.add("hr",function(e){e.registerButton({name:"hr",group:"insert"}),e.registerCommand("insertHorizontalRule",()=>{var t;let n=e.createInside.element("hr");e.s.insertNode(n,!1,!1);let o=i.Dom.closest(n.parentElement,i.Dom.isBlock,e.editor);o&&i.Dom.isEmpty(o)&&o!==e.editor&&!(null==(t=e.o.dtd)?void 0:t.blockLimits[o.nodeName.toLowerCase()])&&(i.Dom.after(o,n),i.Dom.safeRemove(o));let r=i.Dom.findNotEmptySibling(n,!1);if(i.Dom.isBlock(r))return e.s.setCursorIn(r,!0),!1;if(r||n.parentNode!==e.editor&&!i.Dom.isBlock(i.Dom.findNotEmptySibling(n,!0)))return e.s.setCursorAfter(n),!1;let s=e.createInside.element(e.o.enter);return i.Dom.isTag(s,"br")||i.Dom.append(s,e.createInside.element("br")),i.Dom.after(n,s),e.s.setCursorIn(s),!1})})},72337:function(e,t){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,n){var i=n(6441);i.Config.prototype.iframeBaseUrl="",i.Config.prototype.iframeTitle="Jodit Editor",i.Config.prototype.iframeDoctype="<!DOCTYPE html>",i.Config.prototype.iframeDefaultSrc="about:blank",i.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}",i.Config.prototype.iframeCSSLinks=[],i.Config.prototype.iframeSandbox=null},77469:function(e,t,n){var i=n(82758),o=n(2748),r=n(580),s=n(21537),a=n(76241);n(50963),r.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,n)=>{let i=e||n.iframe.contentWindow.document;if(i.open(),i.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>'),i.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=i.createElement("link");(0,s.attr)(t,"rel","stylesheet"),(0,s.attr)(t,"href",e),i.head&&o.Dom.append(i.head,t),n.e.on(t,"load",()=>n.e.fire("resize"))}),t.iframeStyle){let e=i.createElement("style");e.innerHTML=t.iframeStyle,i.head&&o.Dom.append(i.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let n=e.c.element("iframe");(0,s.css)(n,"display","block"),n.src="about:blank",n.className="jodit-wysiwyg_iframe",(0,s.attr)(n,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,s.attr)(n,"sandbox",t.iframeSandbox),o.Dom.append(e.workplace,n),e.iframe=n;let r=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,s.callPromise)(r,()=>{if(!e.iframe)return!1;let n=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let r=t.editHTMLDocumentMode,l=()=>{(0,s.attr)(n.body,"contenteditable",e.getMode()!==i.MODE_SOURCE&&!e.getReadOnly()||null)},c=(e,t)=>{for(;t>0&&/\s/.test(e.charAt(t-1));)t-=1;return t},u=e=>{e=(0,a.removeBetween)(e,"<style",">","</style>","jodit-box");let t=(0,a.indexOfOpenTag)(e,"body"),n=-1;for(let i=(0,a.indexOfClosingTag)(e,"body",t+1);-1!==i;i=(0,a.indexOfClosingTag)(e,"body",i+1))n=i;if(-1!==t&&-1!==n){let i=n+7,o=e.indexOf(">",t),r=e.slice(t,i);for(let s of(-1!==o&&o<n&&(r=(e=>{e=e.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i,"");let t=(t,n)=>{for(;n.test(e.charAt(t));)t+=1;return t},n=e.indexOf("contenteditable");for(;-1!==n;){let i=t(n+15,/["'\s]/);if("="===e.charAt(i)&&(i=t(i+1,/[\s"']/),e.startsWith("true",i))){i=t(i+4,/["']/);let o=n;return/["']/.test(e.charAt(o-1))&&(o-=1),o=c(e,o),e.slice(0,o)+e.slice(i)}n=e.indexOf("contenteditable",n+1)}return e})(e.slice(t,o))+e.slice(o,i)),["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(i))).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",()=>u(e.o.iframeDoctype+n.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(u(n.documentElement.outerHTML)!==u(t)){var i;let r,a;i=u(t),r=new DOMParser().parseFromString(i,"text/html"),e.e.fire("safeHTML",r.documentElement),a=(0,s.$$)("style.jodit-box",n.head),n.replaceChild(n.adoptNode(r.documentElement),n.documentElement),a.forEach(e=>o.Dom.append(n.head,e)),e.editor=n.body,l(),e.e.fire("prepareWYSIWYGEditor"),e.e.stopPropagation("beforeSetNativeEditorValue")}return!0}return!1},{top:!0})}if(e.editor=n.body,e.e.on("afterSetMode afterInit afterAddPlace",l),"auto"===t.height){n.documentElement&&(0,s.css)(n.documentElement,"overflowY","hidden");let i=e.async.throttle((...n)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&"auto"===t.height){let t=e.ew.getComputedStyle(e.editor),n=parseInt(t.marginTop||"0",10)+parseInt(t.marginBottom||"0",10);(0,s.css)(e.iframe,"height",e.editor.offsetHeight+n)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",i).on([e.iframe,e.ew,n.documentElement],"load",i).on(n,"readystatechange DOMContentLoaded",i),"function"==typeof ResizeObserver){let t=new ResizeObserver(i);t.observe(n.body),e.e.on("beforeDestruct",()=>{t.disconnect()})}}return n.documentElement&&e.e.on(n.documentElement,"mousedown touchend",()=>{e.s.isFocused()||(e.s.focus(),e.editor===n.body&&e.s.setCursorIn(n.body))}).on(e.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",t=>{var n;null==(n=e.events)||n.fire(e.ow,t)}),!1})})})},43687:function(e,t,n){n(6441).Config.prototype.imageCaption={wrapper:{tag:"figure",className:""},inner:null,caption:{tag:"figcaption",className:""}}},84571:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(41180),c=n(20356),u=n(45124);n(43687);var d=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let h=["margin-top","margin-right","margin-bottom","margin-left"],p=new Set([i.KEY_UP,i.KEY_DOWN,i.KEY_LEFT,i.KEY_RIGHT]),f=/^(P|H[1-6]|PRE)$/i,m=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 n=(0,a.getCaptionWrapper)(this.j,e);if(n&&!0!==t){let t=this.__freshCaption(n);return t?this.__unrecorded(()=>this.__restore(t)):this.__uncaption(n,e),null}if(!n&&!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:n}=this,{snapshot:i}=n.history;n.setEditorValue(),n.e.fire("internalUpdate");let o=i.make();return i.transaction(()=>{var i,r;t=this.__fresh=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},this.__wrap(e)),r=r={before:o},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(r,e))}),i),n.setEditorValue()}),n.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,n;let{j:i}=this,{wrapper:o,inner:s,caption:c}=i.o.imageCaption,u=r.Dom.closest(e,"a",i.editor),d=!u||(null==(t=u.textContent)?void 0:t.trim())||1!==u.getElementsByTagName("img").length?e:u,h=[(0,a.attr)(e,"style"),(0,a.attr)(e,"class")],p=d.parentNode,f=(0,l.cssInline)(e,"width")||((n=(0,a.attr)(e,"width"))?(0,a.isNumeric)(n)?`${n}px`:n:"")||(e.offsetWidth?`${e.offsetWidth}px`:""),m=(0,a.getAlignClasses)(i,e),g=(0,a.getHAlign)(e,m);(0,a.clearHAlign)(e,m);let b=this.__create(o),v=s?this.__create(s):b,_=this.__create(c);_.appendChild(i.createInside.element("br"));let S=this.__insert(b,d);return v!==b&&r.Dom.append(b,v),r.Dom.append(v,[d,_]),w(e,b),f&&((0,a.css)(b,"width",f),(0,a.css)(e,"width","100%")),(0,a.hAlignElement)(b,g,(0,a.getAlignClasses)(i,b)),this.__mark(b),{caption:_,wrapper:b,image:e,target:d,place:p,split:S,attributes:h,parent:b.parentNode,previous:b.previousSibling,next:b.nextSibling,shape:y(b,e)}}__restore(e){var t,n;let{wrapper:i,image:o,target:s,place:l,split:c,attributes:u}=e;if(c)if(c.head||c.tail){let{sel:e}=this.j.s,i=(null==e?void 0:e.rangeCount)?e.getRangeAt(0).startContainer:null,{head:o,tail:l}=c;if(o&&!(l&&i&&r.Dom.isOrContains(l,i)))r.Dom.append(o,[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!=(n=null==o?void 0:o.childNodes)?n:[]),s].forEach(t=>l.insertBefore(t,e)),r.Dom.safeRemove(o)}}else r.Dom.append(l,s),r.Dom.before(i,c.block);else r.Dom.before(i,s);r.Dom.safeRemove(i),(0,a.attr)(o,{style:u[0],class:u[1]})}__uncaption(e,t){var n;let{j:o}=this,s=(0,a.getHAlign)(e,(0,a.getAlignClasses)(o,e)),c=(0,l.cssInline)(e,"width");r.Dom.safeRemove((0,a.getImageCaption)(o,e));let u=null!=(n=r.Dom.closest(t,"a",e))?n:t;if(w(e,t),c&&(0,a.css)(t,"width",c),(0,a.hAlignElement)(t,s,(0,a.getAlignClasses)(o,t)),r.Dom.isBlock(e)&&e.parentNode===o.editor&&o.o.enter.toLowerCase()!==i.BR){let t=o.createInside.element(o.o.enter);r.Dom.before(e,t),r.Dom.append(t,u)}else r.Dom.before(e,u);r.Dom.safeRemove(e)}__create({tag:e,className:t}){return this.j.createInside.element(e,t?{class:t}:{})}__insert(e,t){let{j:n}=this,i=r.Dom.isBlock(e)?r.Dom.closest(t,r.Dom.isBlock,n.editor):null;if(!i||!f.test(i.nodeName))return r.Dom.before(t,e),null;let o=n.ed.createRange();o.setStartBefore(i),o.setEndBefore(t);let s=o.extractContents();o.setStartAfter(t),o.setEndAfter(i);let[l,c]=[s,o.extractContents()].map((e,t)=>{let n=e.firstChild;return!n||r.Dom.isEmpty(n)?null:((0,a.call)(t?r.Dom.after:r.Dom.before,i,n),n)});return r.Dom.before(i,e),r.Dom.safeRemove(i),{block:i,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()===i.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,n=t.c.element("template");n.innerHTML=e.value;let i=e=>(0,a.toArray)(e.querySelectorAll(t.o.imageCaption.wrapper.tag)).filter(e=>(0,a.getCaptionedImage)(t,e)),o=i(n.content),s=this.__fresh&&this.__freshCaption(this.__fresh.wrapper),l=s&&o[i(t.editor).indexOf(s.wrapper)],c=s&&l&&function(e,t,n){var i;let o=(0,a.getCaptionedImage)(e,n),{split:s}=t;if(!o)return null;let l={wrapper:n,image:o,target:null!=(i=r.Dom.closest(o,"a",n))?i:o,place:t.place,split:null,attributes:t.attributes};if(s){let e=s.head?n.previousSibling:null,i=s.tail?n.nextSibling:null;if(s.head&&!r.Dom.isHTMLElement(e)||s.tail&&!r.Dom.isHTMLElement(i))return null;let o=s.block.cloneNode(!0);l.split={block:o,head:e,tail:i},l.place=function(e,t,n){let i=[];for(let n=t;n!==e&&n.parentNode;n=n.parentNode)i.unshift((0,a.toArray)(n.parentNode.childNodes).indexOf(n));return i.reduce((e,t)=>e.childNodes[t],n)}(s.block,t.place,o)}return l}(t,s,l),u=!1;c&&(this.__restore(c),u=!0),o.forEach(e=>{[e,(0,a.getImageCaption)(t,e)].forEach(e=>["contenteditable",g].forEach(t=>{(null==e?void 0:e.hasAttribute(t))&&(e.removeAttribute(t),u=!0)}))}),u&&(e.value=n.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:n}=this,i=(0,a.getCaptionWrapper)(n,e),o=(0,a.getCaptionedImage)(n,i);if(!i||!o||!r.Dom.isEmpty(e)||this.__keepsFocus(e))return;let s=!!(t&&r.Dom.isOrContains(i,t)),l=this.__freshCaption(i);this.__unrecorded(()=>l?this.__restore(l):this.__uncaption(i,o)),s&&n.e.fire("recalcPositionPopup")},1)}__keepsFocus(e){let{j:t}=this,n=e.ownerDocument;if(n.activeElement===e&&(n.hasFocus()||!t.od.hasFocus()))return!0;let i=t.od.activeElement;return!!(i&&i!==t.iframe&&!r.Dom.isOrContains(t.editor,i)&&(r.Dom.isOrContains(t.container,i)||r.Dom.closest(i,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,n=(0,a.getImageCaption)(this.j,(0,a.getCaptionWrapper)(this.j,t));return n&&r.Dom.isOrContains(n,t)?n:null}onBeforeEnter(e){let t=(null==e?void 0:e.shiftKey)?null:this.__caretCaption(),n=(0,a.getCaptionWrapper)(this.j,t);if(!n)return;let{j:i}=this;if(this.__focusEditor(),!r.Dom.isBlock(n))return void i.s.setCursorAfter(n);let o=this.__line();return r.Dom.after(n,o),i.s.setCursorIn(o),i.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)||i.NO_EMPTY_TAGS.has(e.nodeName.toLowerCase())))))return;let{j:n}=this;if(this.__focusEditor(),!r.Dom.isBlock(t))return void n.s.setCursorAfter(t);let o=this.__line();r.Dom.after(t,o),n.s.setCursorIn(o)}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:n,endContainer:i,endOffset:o}=e.range,r=t.childNodes[n];return t===i&&o===n+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 n=this.__caretCaption();n&&(this.__arrow={key:e.key,range:this.j.s.range.cloneRange(),caption:n})}onKeyUp(e){let t=this.__arrow;if(this.__arrow=null,!t||e.key!==t.key||(0,u.isMoved)(this.j,t.range))return;let n=(0,a.getCaptionWrapper)(this.j,t.caption);if(!n)return;let o=t.key===i.KEY_DOWN||t.key===i.KEY_RIGHT,{s}=this.j;if(this.__focusEditor(),!r.Dom.isBlock(n))return void(o?s.setCursorAfter(n):s.setCursorBefore(n));let l=r.Dom.findNotEmptySibling(n,!o);if(r.Dom.isHTMLElement(l))return void s.setCursorIn(l,o);if(r.Dom.isText(l))return void(o?s.setCursorBefore(l):s.setCursorAfter(l));let c=this.__line();(0,a.call)(o?r.Dom.after:r.Dom.before,n,c),s.setCursorIn(c),this.j.synchronizeValues()}onBeforeCommand(e){let t=e.toLowerCase();if(m.has(t)&&this.__caretCaption())return!1;let n="undo"===t&&this.__fresh?this.__freshCaption(this.__fresh.wrapper):null;if(n)return this.__unrecorded(()=>{this.__restore(n),this.j.history.snapshot.restore(n.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 n;h.forEach(n=>{let i=(0,l.cssInline)(e,n);i&&((0,a.css)(t,n,i),(0,a.css)(e,n,""))}),(null==(n=(0,a.attr)(e,"style"))?void 0:n.trim())||(0,a.attr)(e,"style",null)}d([(0,o.watch)(":toggleImageCaption")],v.prototype,"onToggleImageCaption",null),d([(0,o.watch)([":change",":afterInit",":afterSetMode",":changePlace"]),(0,o.debounce)()],v.prototype,"onChange",null),d([(0,o.watch)([":input",":keyup",":afterPaste"])],v.prototype,"onInput",null),d([(0,o.watch)(":afterGetValueFromEditor")],v.prototype,"onAfterGetValueFromEditor",null),d([(0,o.watch)(":changePlace")],v.prototype,"onChangePlace",null),d([o.autobind],v.prototype,"__onMouseDown",null),d([o.autobind],v.prototype,"__onFocusOut",null),d([o.autobind],v.prototype,"__onMouseUp",null),d([(0,o.watch)(":beforeEnter")],v.prototype,"onBeforeEnter",null),d([(0,o.watch)(":beforeInsertNode")],v.prototype,"onBeforeInsertNode",null),d([(0,o.watch)(":beforeCommandDelete")],v.prototype,"onBeforeCommandDelete",null),d([(0,o.watch)(":keydown")],v.prototype,"onKeyDown",null),d([(0,o.watch)(":keyup")],v.prototype,"onKeyUp",null),d([(0,o.watch)(":beforeCommand")],v.prototype,"onBeforeCommand",null),d([o.autobind],v.prototype,"__onSelectAll",null),s.pluginSystem.add("imageCaption",v)},85745:function(e,t,n){n(6441).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},80763:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(50911),c=n(74569);function u(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}n(85745);var d=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let h="__jodit_imageprocessor_binded",p=h+"blob-id",f="jodit-wysiwyg_image-selected",m=new Set(["img","jodit","jodit-media"]);class g extends l.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange),(0,s.getContainer)(e,"image-processor","style",!0).textContent=`.jodit-wysiwyg.${f}::selection,.jodit-wysiwyg.${f} *:not(img)::selection{background:transparent}`}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(f);let t=(0,o.cached)(e,"buffer"),n=null==t?void 0:t.get(p);if(t&&n){for(let e of Object.keys(n))URL.revokeObjectURL(e);t.delete(p)}}onAfterGetValueFromEditor(e,t){if(t!==i.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let n=t.buffer.get(p);if(n)for(let t of Object.keys(n))for(;e.value.includes(t);)e.value=e.value.replace(t,n[t])}onSelectionChange(){let{jodit:e}=this;e.editor.classList.toggle(f,function(e){var t;let{sel:n}=e.s;if(!n||!n.rangeCount)return!1;let{startContainer:i,startOffset:o,endContainer:s,endOffset:l}=n.getRangeAt(0),c=i.childNodes[o];return i===s&&l===o+1&&(r.Dom.isTag(c,m)||!!(null!=(t=(0,a.getWrappedMedia)(e,c))?t:(0,a.getCaptionedImage)(e,c)))&&r.Dom.isOrContains(e.editor,i)}(e))}afterChange(e){var t;return(t=function*(){let{jodit:e}=this;e.editor&&(0,a.$$)("img",e.editor).forEach(t=>{(0,a.dataBind)(t,h)||((0,a.dataBind)(t,h,!0),t.complete||e.e.on(t,"load",function n(){var i;e.isInDestruct||null==(i=e.e)||i.fire("resize"),e.e.off(t,"load",n)}),t.src&&/^data:/.test(t.src)&&function(e,t){let n;if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||"u"<typeof ArrayBuffer||"u"<typeof URL)return;let i=t.src;try{n=(0,c.dataURItoBlob)(i)}catch(e){return}t.src=URL.createObjectURL(n),e.e.fire("internalUpdate");let{buffer:o}=e,r=o.get(p)||{};r[t.src]=i,e.buffer.set(p,r)}(e,t),e.e.on(t,"mousedown touchstart",()=>{var n;(function(e){var t;for(let n of["previousSibling","nextSibling"]){let o=e[n];for(;r.Dom.isText(o)&&!(null==(t=o.nodeValue)?void 0:t.replace((0,i.INVISIBLE_SPACE_REG_EXP)(),""));){let e=o[n];r.Dom.safeRemove(o),o=e}}})(t),e.s.select(null!=(n=(0,a.getCaptionWrapper)(e,t))?n:t)}))})},function(){var e=this,n=arguments;return new Promise(function(i,o){var r=t.apply(e,n);function s(e){u(r,i,o,s,a,"next",e)}function a(e){u(r,i,o,s,a,"throw",e)}s(void 0)})}).call(this)}}d([(0,o.watch)(":afterGetValueFromEditor")],g.prototype,"onAfterGetValueFromEditor",null),d([(0,o.watch)(":beforeSetElementValue")],g.prototype,"onBeforeSetElementValue",null),d([o.autobind],g.prototype,"onSelectionChange",null),d([(0,o.watch)([":change",":afterInit",":changePlace"]),(0,o.debounce)()],g.prototype,"afterChange",null),s.pluginSystem.add("imageProcessor",g)},97536:function(e,t,n){n(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,n){var i=n(65478),o=n(2748),r=n(580),s=n(21537),a=n(20356),l=n(62843);n(97536);var c=n(59436),u=n(53636),d=n(10263),h=n(94575),p=n(34755);function f(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}var m=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class g extends a.Plugin{get form(){return new c.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,u.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,d.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"]}),n=this.__buttons;return n.check.onAction(()=>{(0,p.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),n.remove.onAction(()=>{var n;let{sourceImage:i}=this.state,o=null!=(n=(0,s.getCaptionWrapper)(e,i))?n:i,r=e.s.createRange();r.setStartBefore(o),r.collapse(!0),e.s.removeNode(o),t.close(),e.s.selectRange(r)}),n.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[n.cancel,n.remove],n.check]),t.e.on(t,"afterClose",()=>{let{sourceImage:t}=this.state;if(e.isInDestruct||!o.Dom.isOrContains(e.editor,t))return;let n=(0,s.getCaptionWrapper)(e,t),i=(0,s.getImageCaption)(e,n);if(i&&o.Dom.isEmpty(i))return void e.s.setCursorIn(i);let r=null!=n?n: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",n=>{let i=n.target;if(o.Dom.isTag(i,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",i))return;t.state.sourceImage=i,t.state.image=i.cloneNode(!0),e.o.readonly||(n.stopImmediatePropagation(),n.preventDefault(),t.open())}else n.stopImmediatePropagation(),e.s.select(i)})}).on("openImageProperties.imageproperties",e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}onStateValuesImageSrcChange(){var e;return(e=function*(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{yield 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()}},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function s(e){f(r,i,o,s,a,"next",e)}function a(e){f(r,i,o,s,a,"throw",e)}s(void 0)})}).call(this)}beforeDestruct(e){var t,n,o;Object.values(null!=(t=(0,i.cached)(this,"__buttons"))?t:{}).forEach(e=>e.destruct()),null==(n=(0,i.cached)(this,"dialog"))||n.destruct(),null==(o=(0,i.cached)(this,"form"))||o.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([i.cache],g.prototype,"form",null),m([i.cache],g.prototype,"dialog",null),m([i.cache],g.prototype,"__buttons",null),m([(0,i.watch)("state.image")],g.prototype,"onStateValuesImageSrcChange",null),r.pluginSystem.add("imageProperties",g)},51642:function(e,t,n){n.d(t,{readAlign:function(){return o}});var i=n(25726);function o(e,t,n){let o=(0,i.getHAlign)(e,n);t.align="normal"===o?"":o}},94575:function(e,t,n){n.d(t,{readValuesFromImage:function(){return h}});var i=n(25726),o=n(29960),r=n(41180),s=n(68645),a=n(51642),l=n(75595),c=n(47749),u=n(32566);function d(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function h(e,t){var n;return(n=function*(){let{sourceImage:n,values:d}=t,h=(0,s.getCaptionWrapper)(e,n),p=null!=h?h:n;return d.imageCaption=!!h,(0,a.readAlign)(p,d,(0,i.getAlignClasses)(e,p)),d.borderRadius=parseInt((0,r.cssInline)(n,"border-radius")||"0",10)||0,d.id=(0,o.attr)(n,"id")||"",d.imageTitle=(0,o.attr)(n,"title")||"",d.imageAlt=(0,o.attr)(n,"alt")||"",d.style=(0,o.attr)(n,"style")||"",d.classes=((0,o.attr)(n,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,c.readMargins)(p,d,t),(0,l.readLink)(t,e,d),d.imageSrc=(0,o.attr)(n,"src")||"",(0,u.readSizes)(n,d,t,h)},function(){var e=this,t=arguments;return new Promise(function(i,o){var r=n.apply(e,t);function s(e){d(r,i,o,s,a,"next",e)}function a(e){d(r,i,o,s,a,"throw",e)}s(void 0)})})()}},75595:function(e,t,n){n.d(t,{readLink:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n){let r=i.Dom.closest(e.sourceImage,"a",t.editor);r?(n.imageLink=(0,o.attr)(r,"href")||"",n.imageLinkOpenInNewTab="_blank"===(0,o.attr)(r,"target")):(n.imageLink="",n.imageLinkOpenInNewTab=!1)}},47749:function(e,t,n){n.d(t,{readMargins:function(){return o}});var i=n(12475);function o(e,t,n){let o=!0,r=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(n=>{let s=e.style.getPropertyValue((0,i.kebabCase)(n));if(!s){r=!0,t[n]=0;return}/^[0-9]+(px)?$/.test(s)&&(s=parseInt(s,10)),t[n]=s,(r&&t[n]||o&&"marginTop"!==n&&t[n]!==t.marginTop)&&(o=!1)}),n.marginIsLocked=o}},32566:function(e,t,n){n.d(t,{readSizes:function(){return l}});var i=n(29807),o=n(29960),r=n(41180),s=n(14415);function a(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function l(e,t,n,l){var c;return(c=function*(){try{yield e.decode()}catch(e){}let a=(0,r.css)(null!=l?l:e,"width",!0)||(0,o.attr)(e,"width")||!1,c=(0,r.css)(e,"height",!0)||(0,o.attr)(e,"height")||!1;t.imageWidth=!1!==a?(0,s.normalSizeFromString)(a):e.offsetWidth||e.naturalWidth,(0,i.isNumeric)(t.imageWidth)?t.imageHeight=!1!==c?(0,s.normalSizeFromString)(c):e.offsetHeight||e.naturalHeight:t.imageHeight=c||"";let{imageWidth:u,imageHeight:d}=t,h=parseFloat(u.toString());if(!(0,i.isNumeric)(u)||!(0,i.isNumeric)(d)){n.sizeIsLocked=!1;return}if(!1===c){t.imageHeight=Math.round(h/n.ratio),n.sizeIsLocked=!0;return}n.sizeIsLocked=1>Math.abs(h-parseFloat(d.toString())*n.ratio)},function(){var e=this,t=arguments;return new Promise(function(n,i){var o=c.apply(e,t);function r(e){a(o,n,i,r,s,"next",e)}function s(e){a(o,n,i,r,s,"throw",e)}r(void 0)})})()}},59436:function(e,t,n){n.d(t,{UIImagePropertiesForm:function(){return p}});var i=n(65478),o=n(87325),r=n(2748),s=n(21537),a=n(62405),l=n(12153),c=n(92762),u=n(35105),d=n(29827),h=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,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 n=t.getElm(e);if(n)return n}return null}render(){return`<form>
129
+ </div>`}setPrompt(e){if(e){let{jodit:t}=this,n=t.o.aiAssistant[e],{aiCommonPrefixPrompt:i,aiCommonSuffixPrompt:o}=t.o.aiAssistant;this.promptInput.value=[i,(0,s.isString)(n)?n:"",o].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:n}){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(()=>n(this.__aiResult));let i=()=>{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(i),this.__tryAgainButton=(0,a.Button)(e,{icon:{name:"update"},name:"update",tooltip:"Try Again",variant:"initial"}).onAction(i),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 o=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 n=this.getFullElName("","hide","true");this.__results.classList.remove(n),this.__buttons.classList.remove(n),r.Dom.detach(this.__results),r.Dom.append(this.__results,this.__spinner),this.__insertButton.focus()}),r.Dom.append(this.__buttons,o.container),r.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}};c([(0,o.watch)(":ai-assistant-response")],u.prototype,"onAiAssistentResponse",null),c([(0,o.watch)(":ai-assistant-error")],u.prototype,"onAiAssistentError",null),c([(0,o.watch)("promptInput:change")],u.prototype,"onChangePromptValue",null),u=c([i.component],u)},25187:function(e,t,n){n(73391),n(12391),n(93183),n(66707),n(41107),n(71255),n(82439),n(61323),n(93079),n(19063),n(19271),n(1255),n(575),n(11317),n(36243),n(23399),n(96111),n(2169),n(42263),n(16233),n(77469),n(23531),n(84571),n(80763),n(3215),n(70045),n(93401),n(76295),n(59483),n(91071),n(61019),n(65517),n(36911),n(20071),n(32309),n(64837),n(79799),n(31571),n(85407),n(59451),n(18363),n(8355),n(58519),n(6687),n(56113),n(9159),n(12019),n(36125),n(9881),n(28545),n(45927),n(52951),n(43809),n(7309),n(68687),n(59495),n(39627),n(767),n(43003),n(72439),n(94529),n(26551),n(96139),n(72253),n(65735),n(83671),n(3115)},36911:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(50911),c=n(62843),u=n(2525),d=n(12153);n(50712);var h=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let p="jodit-wysiwyg_anchors",f=' contenteditable="false"';class m extends l.Plugin{afterInit(e){var t;let n,i,o=e.ed===e.od;o&&e.editor.classList.add(p),(0,s.getContainer)(e,"anchor","style",!0).textContent=(t=o?"."+p:"",n=["id","name"].map(e=>`.jodit-wysiwyg${t} a[${e}]:not([href]):empty::before`).join(","),i=`url("data:image/svg+xml,${encodeURIComponent(d.Icon.get("anchor"))}") center/contain no-repeat`,`${n}{display:inline-block;width:.75em;height:1em;margin:0 .1em;vertical-align:-.15em;background-color:var(--jd-color-icon,#4c4c4c);-webkit-mask:${i};mask:${i};cursor:pointer;content:''}`),e.e.on("generateAnchorForm.anchor",this.__generateForm).on("clickA touchstartA",this.__onClickA,{top:!0})}__onClickA(e,t){var n;let{j:i}=this;if(!i.o.readonly&&(0,a.isAnchor)(e))return i.e.stopPropagation((0,a.camelCase)((null!=(n=null==t?void 0:t.type)?n:"click")+"_a")),i.e.fire("showPopup",e,()=>(0,a.position)(e,i),"anchor",!0),!1}onChange(){let{j:e}=this;e.isInDestruct||e.getMode()===i.MODE_SOURCE||(0,a.getAnchors)(e.editor).forEach(g)}onAfterGetValueFromEditor(e){e.value=function(e){if(!e.includes(f))return e;let t="",n=0,i=0;for(;;){let o=e.indexOf("<",i);if(-1===o)break;let r=e.indexOf(">",o);if(-1===r)break;if(e.startsWith("<a",o)&&/\s/.test(e.charAt(o+2))&&e.startsWith("</a>",r+1)){let i=e.slice(o,r),s=i.indexOf(f);-1===s||/\shref=/.test(i)||(t+=e.slice(n,o+s),n=o+s+f.length)}i=r+1}return 0===n?e:t+e.slice(n)}(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:n}=this,o=(0,a.isAnchor)(e)?e:null,s=new u.UIInput(n,{name:"name",ref:"name_input",label:"Anchor",required:!0}),l=[new c.UIButton(n,{name:"insert",type:"submit",variant:"primary",text:o?"Update":"Insert"})];o&&(s.value=(0,a.getAnchorName)(o),l.unshift(new c.UIButton(n,{name:"remove",variant:"default",text:"Remove"}).onAction(()=>{n.o.readonly||(n.s.restore(),r.Dom.safeRemove(o),n.synchronizeValues()),t()})));let d=new u.UIForm(n,[new u.UIBlock(n,[s]),new u.UIBlock(n,l,{align:"full"})]);return o&&(this.__dropForm(),this.__form=d,n.e.on(d.container,"keydown",e=>{e.key===i.KEY_ESC&&(t(),n.s.restore())})),d.onSubmit(()=>{if(n.o.readonly)return t(),!1;let e=s.value.trim().replace(/^#/,""),i=e?/\s/.test(e)?"The name cannot contain spaces":this.__isTaken(e,o)?"This name is already in use":"":"Please fill out this field";return i?(s.error=i,s.focus()):(n.s.restore(),o?this.__rename(o,e):this.__insert(e),n.synchronizeValues(),t()),!1}),n.async.requestIdleCallback(()=>s.focus()),d}__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(n=>n!==t&&(n.id===e||(0,a.isAnchor)(n)&&(0,a.attr)(n,"name")===e))}__insert(e){let{j:t}=this,n=t.createInside.element("a",{id:e}),i=t.s.range;g(n),i.collapsed||(i.collapse(!0),t.s.selectRange(i));let o=r.Dom.closest(i.startContainer,"a",t.editor);o?(r.Dom.before(o,n),t.s.setCursorAfter(n)):t.s.insertNode(n,!0,!1)}__rename(e,t){let n=(0,a.getAnchorName)(e),i=this.__isTaken(n,e);["id","name"].forEach(n=>{e.hasAttribute(n)&&(0,a.attr)(e,n,t)}),i||(0,a.toArray)(this.j.editor.querySelectorAll("a[href]")).forEach(e=>{(0,a.attr)(e,"href")==="#"+n&&(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"))),n=new Map;return((0,a.isAnchor)(e)?[e]:(0,a.getAnchors)(e)).forEach(e=>{let i=(0,a.getAnchorName)(e);if(!this.__isTaken(i,null))return;let o=i;for(let e=2;t.has(o)||this.__isTaken(o,null);e+=1)o=`${i}-${e}`;["id","name"].forEach(t=>{e.hasAttribute(t)&&(0,a.attr)(e,t,o)}),t.add(o),n.set(i,o)}),!!n.size&&((0,a.toArray)(e.querySelectorAll("a[href]")).forEach(e=>{var t;let i=null!=(t=(0,a.attr)(e,"href"))?t:"",o="#"===i[0]&&n.get(i.slice(1));o&&(0,a.attr)(e,"href","#"+o)}),!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([o.autobind],m.prototype,"__onClickA",null),h([(0,o.watch)([":change",":afterInit",":afterSetMode"]),(0,o.debounce)()],m.prototype,"onChange",null),h([(0,o.watch)(":afterGetValueFromEditor")],m.prototype,"onAfterGetValueFromEditor",null),h([(0,o.watch)(":beforePasteInsert")],m.prototype,"onBeforePasteInsert",null),h([o.autobind],m.prototype,"__generateForm",null),s.pluginSystem.add("anchor",m)},50712:function(e,t,n){var i=n(6441);n(24526),i.Config.prototype.controls.anchor={popup:(e,t,n)=>e.e.fire("generateAnchorForm.anchor",null,n),tooltip:"Insert anchor"},i.Config.prototype.popup.anchor=(e,t,n)=>e.e.fire("generateAnchorForm.anchor",t,n)},93183:function(e,t,n){var i=n(82758),o=n(22732),r=n(580),s=n(23282),a=n(50911),l=n(45124);n(32496);var c=n(11338),u=n(14630),d=n(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 n=this.j,r=n.selection;if(r.isFocused()||r.focus(),!r.isInsideArea)return;if((0,c.checkNotCollapsed)(n))return n.e.fire("backSpaceAfterDelete",e),!1;let a=r.range,d=n.createInside.text(i.INVISIBLE_SPACE);try{if(o.Dom.safeInsertNode(a,d),!o.Dom.isOrContains(n.editor,d))return;let c=o.Dom.closest(d,e=>o.Dom.isElement(e)&&e.hasAttribute("contenteditable")&&!o.Dom.isContentEditable(e.parentNode,n.editor),n.editor);if(c&&r.cursorInTheEdge(e,c,d)||n.e.fire("backSpaceBeforeCases",e,d))return!1;(0,l.moveNodeInsideStart)(n,d,e);let h=n.o.delete.disableCases;if(u.casesMap.some(([o,r])=>{if(!(h&&h.has(o))&&(0,s.isFunction)(r)&&r(n,d,e,t))return i.IS_PROD,!0}))return!1}catch(e){throw i.IS_PROD,e}finally{n.e.fire("backSpaceAfterDelete",e,d),this.moveCaretToTextBefore(d),this.safeRemoveEmptyNode(d)}return!1}moveCaretToTextBefore(e){var t,n;let{jodit:i}=this,{range:r}=i.s;if(!e.parentNode)return;let s=i.ed.createRange();if(s.selectNode(e),!r.collapsed||!s.isPointInRange(r.startContainer,r.startOffset))return;let a=e.previousSibling;for(;o.Dom.isText(a)&&!/\S|\u00A0/.test(a.data);)a=a.previousSibling;let l=o.Dom.isText(a)?a:(0,d.findMostNestedNeighbor)(e,!1,i.editor,!0),c=o.Dom.closest(l,"a",i.editor);o.Dom.isText(l)&&o.Dom.isContentEditable(l,i.editor)&&(!c||o.Dom.isOrContains(c,e))&&o.Dom.closest(l,o.Dom.isBlock,i.editor)===o.Dom.closest(e,o.Dom.isBlock,i.editor)&&(r.setStart(l,null!=(n=null==(t=l.nodeValue)?void 0:t.length)?n:0),r.collapse(!0),i.s.selectRange(r))}safeRemoveEmptyNode(e){var t,n,r;let{range:s}=this.j.s;o.Dom.isText(e)&&e.nodeValue!==i.INVISIBLE_SPACE&&(null==(t=e.nodeValue)?void 0:t.startsWith(i.INVISIBLE_SPACE))?e.deleteData(0,i.INVISIBLE_SPACE.length):(s.startContainer===e&&(e.previousSibling?o.Dom.isText(e.previousSibling)?s.setStart(e.previousSibling,null!=(r=null==(n=e.previousSibling.nodeValue)?void 0:n.length)?r:0):s.setStartAfter(e.previousSibling):e.nextSibling&&(o.Dom.isText(e.nextSibling)?s.setStart(e.nextSibling,0):s.setStartBefore(e.nextSibling)),s.collapse(!0),this.j.s.selectRange(s)),o.Dom.safeRemove(e))}}h.requires=["hotkeys"],r.pluginSystem.add("backspace",h)},62845:function(e,t,n){n.d(t,{checkJoinNeighbors:function(){return s}});var i=n(82758),o=n(2748),r=n(63785);function s(e,t,n){return function e(t,n,s,h){if(function(e,t,n){let i=o.Dom.findNotEmptySibling(t,n);if(!u(e,i))return!1;let s=(0,r.getMoveFilter)(e);if(n)for(let e=t;e&&!o.Dom.isBlock(e);){let t=e.nextSibling;if(o.Dom.isTag(e,"br")){o.Dom.safeRemove(e);break}s(e)?o.Dom.append(i,e):o.Dom.safeRemove(e),e=t}else{let t=o.Dom.findNotEmptySibling(i,!1);!t||o.Dom.isBlock(t)||o.Dom.isTag(t,"br")||o.Dom.after(i,e.createInside.element("br")),o.Dom.unwrap(i)}return e.s.setCursorBefore(t),!0}(t,n,s))return!0;let p=o.Dom.findNotEmptySibling(n,s);if(u(t,function(e,t){var n;let i=e;for(;o.Dom.isElement(i)&&!o.Dom.isBlock(i);){let e=Array.from(i.childNodes).filter(e=>!o.Dom.isEmptyTextNode(e));i=null!=(n=t?e[e.length-1]:e[0])?n:null}return i===e?null:i}(p,s))&&a(p,t.editor))return e(t,n,s,h);let f=n,m=f;for(;f&&!o.Dom.findNotEmptySibling(f,s)&&f.parentElement!==t.editor;)m=f=f.parentElement;if(o.Dom.isElement(m)&&o.Dom.isContentEditable(m,t.editor)){var g,b;let u,p,f,v;if(o.Dom.up(n,o.Dom.isCell,m,!0))return!1;let y=o.Dom.findNotEmptySibling(m,s);if(y&&(a(o.Dom.furthest(n,e=>o.Dom.isElement(e)&&!o.Dom.isBlock(e)&&!o.Dom.isOrContains(e,y),t.editor),t.editor)||a(y,t.editor)))return e(t,n,s,h);if(o.Dom.isTag(y,"br"))return o.Dom.safeRemove(y),t.s.setCursorBefore(n),!0;if(s&&o.Dom.isTag(y,"table"))return t.s.setCursorBefore(n),!0;if(o.Dom.isElement(y)&&!o.Dom.isContentEditable(y,t.editor))return!1;let w=(g=m,(u=o.Dom.up(n,o.Dom.isBlock,g))?o.Dom.isLeaf(u)&&u.parentElement?u.parentElement:u:g);if(!h&&y&&function(e,t,n,r,s){if(s||o.Dom.isTag(r,"table")||o.Dom.isTag(r,i.INSEPARABLE_TAGS)||!o.Dom.isContentEditable(r,e.editor))return!1;let a=o.Dom.up(t,o.Dom.isBlock,n,!0),u=l(r,!1,e.editor);if(!a||!u||!o.Dom.isContentEditable(u,e.editor)||!(o.Dom.isLeaf(a)||o.Dom.isLeaf(u))||o.Dom.isLeaf(a.parentElement)||o.Dom.isLeaf(u.parentElement)||c(a)===c(u))return!1;let d=a.parentElement;o.Dom.isLeaf(a)&&o.Dom.isLeaf(u)?o.Dom.before(u,a):o.Dom.isLeaf(a)?o.Dom.before(u,function(e){let t=e.parentElement,n=t.cloneNode(!1),i=Array.from(t.children).indexOf(e);if(i&&(n.removeAttribute("id"),o.Dom.isTag(t,"ol"))){let e=parseInt(t.getAttribute("start")||"1",10)||1;n.setAttribute("start",String(e+i))}return o.Dom.append(n,e),n}(a)):o.Dom.before(u.parentElement,a);let h=d;for(;h&&h!==e.editor&&o.Dom.isEmpty(h);){let e=h.parentElement;o.Dom.safeRemove(h),h=e}return!0}(t,n,w,y,s))return e(t,n,s,!0)||t.s.setCursorBefore(n),!0;if(y&&(function(e,t,n,s,a){if(a||!(o.Dom.isList(n)||o.Dom.isList(s)))return!1;let l=o.Dom.up(t,o.Dom.isBlock,n,!0),c=o.Dom.isList(s)?s.firstElementChild:s;if(!l||!c||o.Dom.isTag(c,i.INSEPARABLE_TAGS)||o.Dom.isTag(c,"table"))return!1;if(!o.Dom.isEmpty(c)){let t=[];for(let e=c.firstChild;e&&!o.Dom.isBlock(e);e=e.nextSibling)t.push(e);if(!t.length)return!1;let n=(0,r.getMoveFilter)(e);t.forEach(e=>n(e)?o.Dom.append(l,e):o.Dom.safeRemove(e))}let u=c;for(;u&&u!==e.editor&&o.Dom.isEmpty(u);){let e=u.parentElement;o.Dom.safeRemove(u),u=e}return!0}(t,n,w,y,s)||(b=y,p=o.Dom.isTag(b,i.LIST_TAGS),f=o.Dom.isTag(w,i.LIST_TAGS),v=(e,t)=>t?e.firstElementChild:e.lastElementChild,f?(b=t.createInside.element(t.o.enterBlock),o.Dom.before(w,b),d(t,v(w,s),b,s)):!!b&&!!p&&!f&&d(t,w,v(b,!s),s))||function(e,t,n,i){if(o.Dom.isBlock(n)||!o.Dom.isBlock(t)||o.Dom.isList(t)||t.parentNode!==n.parentNode||Array.from(t.childNodes).some(e=>o.Dom.isBlock(e)))return!1;if(i){let n=o.Dom.findNotEmptySibling(t,!1);return!n||o.Dom.isBlock(n)||o.Dom.isTag(n,"br")||o.Dom.after(t,e.createInside.element("br")),o.Dom.unwrap(t),!0}let s=(0,r.getMoveFilter)(e);for(let e=n;e&&!o.Dom.isBlock(e);){let n=e.nextSibling;if(o.Dom.isTag(e,"br")){o.Dom.safeRemove(e);break}s(e)?o.Dom.append(t,e):o.Dom.safeRemove(e),e=n}return!0}(t,w,y,s)||d(t,w,l(function(e,t){if(!o.Dom.isTag(e,"table"))return e;let n=[];return o.Dom.each(e,e=>{o.Dom.isCell(e)&&n.push(e)}),n.length?n[t?n.length-1:0]:null}(y,s),s,t.editor),s)))return t.s.setCursorBefore(n),!0}return!1}(e,t,n,!1)}function a(e,t){if(!o.Dom.isElement(e)||o.Dom.isBlock(e))return!1;let n=e=>o.Dom.isBlock(e)&&!o.Dom.isTag(e,i.NO_EMPTY_TAGS);Array.from(e.childNodes).forEach(e=>a(e,t));let r=Array.from(e.childNodes);if(!r.some(n))return!1;let s=null;for(let l of r){if(!n(l)){s||o.Dom.isEmptyTextNode(l)||(s=e.cloneNode(!1),o.Dom.before(l,s)),s&&o.Dom.append(s,l);continue}if(s=null,o.Dom.isTag(l,i.INSEPARABLE_TAGS)||!o.Dom.isContentEditable(l,t))continue;let r=e.cloneNode(!1);o.Dom.moveContent(l,r),o.Dom.append(l,r),a(r,t)}return o.Dom.unwrap(e),!0}function l(e,t,n){let r=e;for(;r;){let e=t?r.lastChild:r.firstChild,s=e&&o.Dom.isEmptyTextNode(e)?o.Dom.findNotEmptySibling(e,t):e;if(!o.Dom.isBlock(s)||o.Dom.isTag(s,i.INSEPARABLE_TAGS)||o.Dom.isTag(s,"table")||!o.Dom.isContentEditable(s,n))break;r=s}return r}function c(e){let t=e.parentElement;for(;o.Dom.isList(t)||o.Dom.isLeaf(t);)t=t.parentElement;return t}function u(e,t){return o.Dom.isElement(t)&&o.Dom.isBlock(t)&&!o.Dom.isList(t)&&!o.Dom.isTag(t,"table")&&!o.Dom.isCell(t)&&o.Dom.isContentEditable(t,e.editor)&&!Array.from(t.childNodes).some(e=>o.Dom.isBlock(e))}function d(e,t,n,i){if(t&&o.Dom.isElement(n)){o.Dom.moveContent(t,n,!i,(0,r.getMoveFilter)(e));let s=t;for(;s&&s!==e.editor&&o.Dom.isEmpty(s);){let e=s.parentElement;o.Dom.safeRemove(s),s=e}return!0}return!1}},91748:function(e,t,n){n.d(t,{checkJoinTwoLists:function(){return s}});var i=n(2748),o=n(37790),r=n(63785);function s(e,t,n){let s=i.Dom.findSibling(t,n),a=i.Dom.findSibling(t,!n);if(!i.Dom.closest(t,i.Dom.isElement,e.editor)&&i.Dom.isList(s)&&i.Dom.isList(a)&&i.Dom.isTag(s.lastElementChild,"li")&&i.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:c}=e.s,u=s.lastElementChild,d=a.firstElementChild;return(0,o.call)(n?i.Dom.prepend:i.Dom.append,d,t),i.Dom.moveContent(a,s,!n,(0,r.getMoveFilter)(e)),i.Dom.safeRemove(a),(0,o.call)(n?i.Dom.append:i.Dom.prepend,u,t),(0,o.call)(n?l:c,t),!0}return!1}},11338:function(e,t,n){n.d(t,{checkNotCollapsed:function(){return i}});function i(e){return!e.s.isCollapsed()&&(e.execCommand("delete",!1,!0),!0)}},73792:function(e,t,n){n.d(t,{checkRemoveChar:function(){return function e(t,n,c,u,d=!1){var h,p;let f,m=c?-1:1,g=o.Dom.sibling(n,!c),b=o.Dom.sibling(n,c),v=null,y=!1;for(b||(b=a(n,c,t.editor));b&&(o.Dom.isText(b)||o.Dom.isInlineBlock(b));){for(;o.Dom.isInlineBlock(b);)b=c?null==b?void 0:b.lastChild:null==b?void 0:b.firstChild;if(!b||o.Dom.isBlock(b))break;if(null==(h=b.nodeValue)?void 0:h.length){if(d&&l(function(e,t){let n=(0,r.toArray)(e),o=t?-1:1,s=t?n.length-1:0;for(;n[s]===i.INVISIBLE_SPACE;)s+=o;return n[s]}(b.nodeValue,c)))break;f=function(e,t,n,s){let a=(0,r.toArray)(e.nodeValue),l=a.length,c=t?l-1:0;if(a[c]===i.INVISIBLE_SPACE)for(;a[c]===i.INVISIBLE_SPACE;)c+=n;let u=a[c];if(a[c+n]===i.INVISIBLE_SPACE){for(c+=n;a[c]===i.INVISIBLE_SPACE;)c+=n;c+=t?1:-1}return a=t&&c<0?[]:a.slice(t?0:c+1,t?c:l),function(e,t,n){var s;if(!e||!o.Dom.isText(e)||(!t?/ $/:/^ /).test(null!=(s=e.nodeValue)?s:"")||!(0,r.trimInv)(e.nodeValue||"").length)for(let e=t?n.length-1:0;t?e>=0:e<n.length;e+=t?-1:1)if(" "===n[e])n[e]=i.NBSP_SPACE;else break}(s,t,a),e.nodeValue=a.join(""),u}(b,c,m,g),!b.nodeValue.length&&o.Dom.isInlineBlock(b.parentNode)&&(b.nodeValue=i.INVISIBLE_SPACE)}if((null==(p=b.nodeValue)?void 0:p.length)||(v=b),!(0,r.isVoid)(f)&&f!==i.INVISIBLE_SPACE){(function(t,n,i,s,a,c){(0,r.call)(t?o.Dom.after:o.Dom.before,n,i);let u="word"===s&&!l(a);("sentence"===s||u||"word"===s&&t)&&e(c,i,t,s,u&&t)})(c,b,n,u,f,t),y=!0;break}let s=a(b,c,t.editor);v&&(o.Dom.safeRemove(v),v=null),b=s}return v&&o.Dom.safeRemove(v),y&&(function(e){let t=e.parentElement;for(;t&&o.Dom.isInlineBlock(t)&&o.Dom.isTag(t,"a");){let n=t.parentElement;o.Dom.isEmpty(t)&&(o.Dom.after(t,e),o.Dom.safeRemove(t)),t=n}}(n),(0,s.addBRInsideEmptyBlock)(t,n),t.s.setCursorBefore(n),o.Dom.isTag(n.previousSibling,"br")&&!o.Dom.findNotEmptySibling(n,!1)&&o.Dom.after(n,t.createInside.element("br"))),y}}});var i=n(82758),o=n(22732),r=n(21537),s=n(63785);function a(e,t,n){let i=o.Dom.sibling(e,t);return!i&&e.parentNode&&e.parentNode!==n&&(i=(0,s.findMostNestedNeighbor)(e,!t,n,!0))&&o.Dom.closest(e,o.Dom.isBlock,n)!==o.Dom.closest(i,o.Dom.isBlock,n)?null:i}function l(e){return" "===e||e===i.NBSP_SPACE}},87536:function(e,t,n){n.d(t,{checkRemoveContentNotEditable:function(){return a}});var i=n(22732),o=n(21537),r=n(45124),s=n(62845);function a(e,t,n){let a=t,c=i.Dom.findSibling(a,n);for(;!c&&a.parentElement&&a.parentElement!==e.editor&&!i.Dom.isCell(a.parentElement);)if(a=a.parentElement,c=i.Dom.findSibling(a,n),n&&i.Dom.isLeaf(a)&&!(i.Dom.isLeaf(c)&&l(e,c)))return!1;if(l(e,c)){if(i.Dom.isBlock(c)){let o=!(n&&i.Dom.isLeaf(c));i.Dom.safeRemove(c),o&&(0,s.checkJoinNeighbors)(e,t,n)}else(0,o.call)(n?i.Dom.before:i.Dom.after,c,t),i.Dom.safeRemove(c),(0,r.moveNodeInsideStart)(e,t,n);return(0,o.call)(n?e.s.setCursorBefore:e.s.setCursorAfter,t),!0}return!1}function l(e,t){return i.Dom.isElement(t)&&!i.Dom.isContentEditable(t,e.editor)}},12474:function(e,t,n){n.d(t,{checkRemoveEmptyNeighbor:function(){return o}});var i=n(2748);function o(e,t,n){let o=i.Dom.closest(t,i.Dom.isElement,e.editor);if(!o)return!1;let r=i.Dom.findNotEmptySibling(o,n);return!!(r&&i.Dom.isEmpty(r))&&(i.Dom.safeRemove(r),e.s.setCursorBefore(t),!0)}},58940:function(e,t,n){n.d(t,{checkRemoveEmptyParent:function(){return s}});var i=n(82758),o=n(22732),r=n(91748);function s(e,t,n){let s=!1,{setCursorBefore:a,setCursorIn:l}=e.s,c=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!c||!o.Dom.isEmpty(c))return!1;do if(c&&o.Dom.isEmpty(c)&&!o.Dom.isCell(c)){o.Dom.after(c,t);let n=o.Dom.closest(c,e=>o.Dom.isElement(e)&&e!==c,e.editor);o.Dom.safeRemove(c),s=!0,c=n}else break;while(c);if(s&&(0,r.checkJoinTwoLists)(e,t,n))return!0;let u=o.Dom.findNotEmptyNeighbor(t,n,e.editor);return!u||o.Dom.isText(u)||o.Dom.isTag(u,i.INSEPARABLE_TAGS)?a(t):l(u,!n),s}},56825:function(e,t,n){n.d(t,{checkRemoveUnbreakableElement:function(){return s}});var i=n(82758),o=n(2748),r=n(58940);function s(e,t,n){let s=o.Dom.findSibling(t,n);return!!(o.Dom.isElement(s)&&(o.Dom.isTag(s,i.INSEPARABLE_TAGS)||o.Dom.isEmpty(s)))&&(o.Dom.safeRemove(s),o.Dom.isTag(s,"br")&&!o.Dom.findNotEmptySibling(t,!1)&&o.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),o.Dom.isTag(s,"br")&&(0,r.checkRemoveEmptyParent)(e,t,n),!0)}},90240:function(e,t,n){n.d(t,{checkTableCell:function(){return o}});var i=n(2748);function o(e,t){let n=t.parentElement;return!!i.Dom.isCell(n)}},68034:function(e,t,n){n.d(t,{checkUnwrapFirstListItem:function(){return r}});var i=n(2748),o=n(43555);function r(e,t,n){var r;let s=i.Dom.closest(t,i.Dom.isElement,e.editor),{s:a}=e;if(i.Dom.isLeaf(s)&&(null==(r=null==s?void 0:s.parentElement)?void 0:r[n?"firstElementChild":"lastElementChild"])===s&&a.cursorInTheEdge(n,s)){let r=s.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,o.call)(n?i.Dom.before:i.Dom.after,r,l),i.Dom.moveContent(s,l),i.Dom.safeRemove(s),i.Dom.isEmpty(r)&&i.Dom.safeRemove(r),(0,o.call)(n?a.setCursorBefore:a.setCursorAfter,t),!0}return!1}},70921:function(e,t,n){n.d(t,{checkUnwrapListItem:function(){return o}});var i=n(2748);function o(e,t,n){if(!n)return!1;let o=i.Dom.closest(t,"li",e.editor),r=o?o.parentElement:null;if(!o||!i.Dom.isList(r)||!o.previousElementSibling||i.Dom.isEmpty(o)||Array.from(o.childNodes).some(e=>i.Dom.isBlock(e))||!e.s.cursorInTheEdge(!0,o))return!1;let s=e.createInside.element(e.o.enterBlock);if(i.Dom.after(r,s),o.nextElementSibling){let e=r.cloneNode(!1);for(e.removeAttribute("id");o.nextSibling;)i.Dom.append(e,o.nextSibling);if(i.Dom.isTag(r,"ol")){let t=parseInt(r.getAttribute("start")||"1",10)||1;e.setAttribute("start",String(t+r.children.length-1))}i.Dom.after(s,e)}return i.Dom.moveContent(o,s),i.Dom.safeRemove(o),e.s.setCursorBefore(t),!0}},14630:function(e,t,n){var i=n(62845),o=n(91748),r=n(73792),s=n(87536),a=n(12474),l=n(58940),c=n(56825),u=n(90240),d=n(68034),h=n(70921);let p=[["remove-unbreakable",c.checkRemoveUnbreakableElement],["remove-not-editable",s.checkRemoveContentNotEditable],["remove-char",r.checkRemoveChar],["table-cell",u.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",o.checkJoinTwoLists],["unwrap-list-item",h.checkUnwrapListItem],["join-neighbors",i.checkJoinNeighbors],["unwrap-first-list-item",d.checkUnwrapFirstListItem]];p.map(([,e])=>e),n.d(t,["casesMap",0,p])},32496:function(e,t,n){var i=n(82758);n(6441).Config.prototype.delete={hotkeys:{delete:i.IS_MAC?["delete"]:["delete","cmd+backspace"],deleteWord:i.IS_MAC?["ctrl+delete"]:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:i.IS_MAC?[]:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},63785:function(e,t,n){n.d(t,{addBRInsideEmptyBlock:function(){return s},findMostNestedNeighbor:function(){return o},getMoveFilter:function(){return r}});var i=n(22732);function o(e,t,n,r=!1){let s=e=>t?e.firstChild:e.lastChild,a=i.Dom.findNotEmptyNeighbor(e,!t,n);if(r&&i.Dom.isElement(a)&&!i.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&&i.Dom.isBlock(t.parentElement)&&i.Dom.each(t.parentElement,i.Dom.isEmptyTextNode)&&i.Dom.after(t,e.createInside.element("br"))}},41107:function(e,t,n){var i=n(580),o=n(21537),r=n(12153),s=n(6441);n(73674);var a=n(820),l=n(53651),c=n(16020),u=n(89758),d=n(98527),h=n(51855);i.pluginSystem.add("bold",function(e){let t=t=>{let n,i=s.Config.defaultOptions.controls[t],r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},i.css);Object.keys(r).forEach(e=>{n||(n={}),n[e]=(0,o.isArray)(r[e])?r[e][0]:r[e]});let a=i.tags?i.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",u.default).set("superscript",d.default).set("underline",h.default)},73674:function(e,t,n){var i=n(6441);i.Config.prototype.controls.subscript={tags:["sub"],tooltip:"Subscript"},i.Config.prototype.controls.superscript={tags:["sup"],tooltip:"Superscript"},i.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},i.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},i.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},i.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration-line":"line-through"},tooltip:"Strike through"}},820:function(e,t){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){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){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){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){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){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,n){var i=n(2748),o=n(580),r=n(37790),s=n(50911),a=n(12153),l=n(6441),c=n(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 n=e.s.current();if(n){let o=i.Dom.closest(n,i.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&o.classList.contains(t.control.args[0].toString()))}return!1},isActive:(e,t)=>{let n=e.s.current();if(n){let o=i.Dom.closest(n,i.Dom.isElement,e.editor)||e.editor,r=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{o.classList.contains(e)&&(r=!0)}),!!(o&&o!==e.editor&&void 0!==t.control.list&&r)}return!1},childTemplate:(e,t,n)=>`<span class="${t}">${e.i18n(n)}</span>`,tooltip:"Insert className"};class u extends s.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,n,i)=>(e.s.commitStyle({attributes:{class:i}}),!1))}beforeDestruct(){}constructor(){super(...arguments),this.buttons=[{name:"classSpan",group:"script"}]}}o.pluginSystem.add("classSpan",u),a.Icon.set("class-span",c.default)},31151:function(e,t){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,n){var i=n(65478),o=n(2748),r=n(70071),s=n(580),a=n(86518),l=n(20356);n(46776);var c=n(80973),u=n(59498),d=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,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,u.removePlaceholderBr)(this.j)}startWalker(){let{jodit:e}=this,t=(0,u.getHash)(this.j.o.cleanHTML.allowTags),n=(0,u.getHash)(this.j.o.cleanHTML.denyTags);this.walker.on("visit",i=>(0,u.visitNodeWalker)(e,i,t,n,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,u.removeFormatForWord)(this.j):(0,u.removeFormatForSelection)(this.j),!1}onAfterSetNativeEditorValue(){(0,a.safeHTML)(this.j.editor,this.j.o.cleanHTML)}onBeforeSetNativeEditorValue(e){let[t,n]=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}),o.Dom.safeRemove(n),!1}__replaceOldTags(e){let{replaceOldTags:t,disableCleanFilter:n}=this.j.o.cleanHTML;!t||(null==n?void 0:n.has("replaceOldTags"))||o.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 n=e.lastChild;if(!o.Dom.isTag(n,"br"))return;let i=n.previousSibling;!i||o.Dom.isTag(i,"br")||(!o.Dom.isText(i)||(null==(t=i.nodeValue)?void 0:t.trim())||i.previousSibling)&&o.Dom.safeRemove(n)}),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 n=t.replace(/font-family\s*:(?:&quot;|[^;])*/gi,e=>e.includes("'")?e:e.replace(/&quot;/g,"'"));return e.replace(t,n)}))}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)}}d([(0,i.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],h.prototype,"onChangeCleanHTML",null),d([(0,i.watch)([":input","jodit.editor:compositionend"])],h.prototype,"onInputRemovePlaceholderBr",null),d([(0,i.hook)("ready")],h.prototype,"startWalker",null),d([(0,i.watch)(":beforeCommand")],h.prototype,"beforeCommand",null),d([i.autobind],h.prototype,"onAfterSetNativeEditorValue",null),d([i.autobind],h.prototype,"onBeforeSetNativeEditorValue",null),d([(0,i.watch)(":afterGetValueFromEditor")],h.prototype,"onAfterGetValueFromEditor",null),d([i.autobind],h.prototype,"onSafeHTML",null),s.pluginSystem.add("cleanHtml",h)},46776:function(e,t,n){var i=n(6441);i.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},i.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},83447:function(e,t,n){n.d(t,{getHash:function(){return r}});var i=n(70799),o=n(49055);function r(e){let t=/([^[]*)\[([^\]]+)]/,n=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,s={};return(0,i.isString)(e)?(e.split(n).map(e=>{e=(0,o.trim)(e);let i=t.exec(e),a={};if(i){let e=i[2].split(n);i[1]&&(e.forEach(e=>{e=(0,o.trim)(e);let t=r.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),s[i[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,n){n.d(t,{getHash:function(){return i.getHash},removeFormatForSelection:function(){return o.removeFormatForSelection},removeFormatForWord:function(){return r.removeFormatForWord},removePlaceholderBr:function(){return s.removePlaceholderBr},visitNodeWalker:function(){return a.visitNodeWalker}});var i=n(83447);n(84272);var o=n(42312),r=n(70464),s=n(56385),a=n(39516)},15908:function(e,t,n){n.d(t,{isAllowedMediaEmbed:function(){return r}});let i=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,o=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function r(e){return i.test(e)||o.test(e)}},84272:function(e,t,n){n.d(t,{isInlineBlock:function(){return s},removeFormatForCollapsedSelection:function(){return r}});var i=n(82758),o=n(2748);function r(e,t){let{s:n}=e,i=t;if(!i){i=e.createInside.fake();let{range:t}=n;o.Dom.safeInsertNode(t,i),t.collapse()}let r=o.Dom.furthest(i,s,e.editor);if(r)if(n.cursorOnTheLeft(r))o.Dom.before(r,i);else if(n.cursorOnTheRight(r))o.Dom.after(r,i);else{let e=n.splitSelection(r);e&&o.Dom.after(e,i)}t||(n.setCursorBefore(i),o.Dom.safeRemove(i))}function s(e){return o.Dom.isInlineBlock(e)&&!o.Dom.isTag(e,i.INSEPARABLE_TAGS)}},42312:function(e,t,n){n.d(t,{removeFormatForSelection:function(){return s}});var i=n(2748),o=n(43555),r=n(84272);function s(e){let{s:t,editor:n,createInside:s}=e,{range:a}=t,l=a.cloneRange(),c=a.cloneRange(),u=s.fake(),d=s.fake();l.collapse(!0),c.collapse(!1),i.Dom.safeInsertNode(l,u),i.Dom.safeInsertNode(c,d),a.setStartBefore(u),a.collapse(!0),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,u),a.setEndAfter(d),a.collapse(!1),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,d);let h=[];i.Dom.between(u,d,e=>{(0,r.isInlineBlock)(e)&&!i.Dom.isTag(e,"a")&&h.push(e),i.Dom.isElement(e)&&(0,o.attr)(e,"style")&&(0,o.attr)(e,"style",null)}),h.forEach(e=>i.Dom.unwrap(e));let p=(e,t)=>{if(!i.Dom.findNotEmptySibling(e,t)){let i=e.parentNode;if(i&&i!==n&&(0,o.attr)(i,"style"))return(0,o.attr)(i,"style",null),p(i,t),!0}};p(u,!0)&&p(d,!1),a.setStartAfter(u),a.setEndBefore(d),t.selectRange(a),i.Dom.safeRemove(u),i.Dom.safeRemove(d)}},70464:function(e,t,n){n.d(t,{removeFormatForWord:function(){return s}});var i=n(82758),o=n(2748),r=n(42312);function s(e){let{range:t}=e.s,n=o.Dom.closest(t.startContainer,o.Dom.isBlock,e.editor);if(!n)return;let i=l(n),s=i.map(e=>o.Dom.isText(e)?e.nodeValue:" ").join(""),d=function(e,t){let n=0;for(let i of e){if(i===t.startContainer)return n+t.startOffset;let e=c(i);if(t.comparePoint(i,o.Dom.isText(i)?e:0)>0)break;n+=e}return n}(i,t);if(!a(s[d-1])||!a(s[d]))return;let h=d,p=d;for(;a(s[h-1]);)h-=1;for(;a(s[p]);)p+=1;let f=e.s.createRange();f.setStart(...u(i,h,!0)),f.setEnd(...u(i,p,!1)),e.s.selectRange(f),(0,r.removeFormatForSelection)(e);let m=e.s.createRange();m.setStart(...u(l(n),d,!1)),e.s.selectRange(m)}function a(e){return!!(e&&e!==i.INVISIBLE_SPACE&&/\S/.test(e))}function l(e){let t=[];return o.Dom.each(e,n=>{!o.Dom.closest(n,o.Dom.isBlock,e)&&(o.Dom.isText(n)||o.Dom.isTag(n,i.INSEPARABLE_TAGS))&&t.push(n)}),t}function c(e){var t,n;return o.Dom.isText(e)?null!=(n=null==(t=e.nodeValue)?void 0:t.length)?n:0:1}function u(e,t,n){var i,r;let s=0,a=null;for(let i of e){let e=c(i);if(o.Dom.isText(i)&&(t<s+e||!n&&t===s+e))return[i,t-s];o.Dom.isText(i)&&(a=i),s+=e}return[a,null!=(r=null==(i=null==a?void 0:a.nodeValue)?void 0:i.length)?r:0]}},56385:function(e,t,n){n.d(t,{removePlaceholderBr:function(){return a}});var i=n(82758),o=n(2748),r=n(49055);function s(e){let t=e.lastChild;for(;o.Dom.isText(t)&&!t.nodeValue;)t=t.previousSibling;return t}function a(e){var t;let n=o.Dom.closest(e.s.current(),o.Dom.isBlock,e.editor);if(!n||!(0,r.trim)(null!=(t=n.textContent)?t:""))return;let a=s(n);for(;o.Dom.isElement(a)&&!o.Dom.isTag(a,i.INSEPARABLE_TAGS)&&!o.Dom.isBlock(a);)a=s(a);!o.Dom.isTag(a,"br")||o.Dom.each(n,e=>{if(e!==a&&o.Dom.isElement(e)&&(o.Dom.isTag(e,i.INSEPARABLE_TAGS)||o.Dom.isBlock(e)||o.Dom.isHTMLElement(e)&&!e.isContentEditable))return!1})&&o.Dom.safeRemove(a)}},82558:function(e,t,n){n.d(t,{allowAttributes:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n,r){let s=r&&i.Dom.isElement(t)&&r[t.nodeName];if(r&&i.Dom.isElement(t)&&!0!==s){if(!s)return n;let e=t.attributes;if(e&&e.length){let i=[];for(let t=0;t<e.length;t+=1){let n=s[e[t].name];n&&(!0===n||n===e[t].value)||i.push(e[t].name)}i.length&&(n=!0),i.forEach(e=>{(0,o.attrRaw)(t,e,null)})}}return n}},1962:function(e,t,n){n.d(t,{convertUnsafeEmbeds:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!i.Dom.isElement(t))return n;let s=t.nodeName.toLowerCase();if(!r.includes(s))return n;let a=(0,o.attr)(t,"data")||(0,o.attr)(t,"src")||(0,o.attr)(t,"movie")||"";if(!a)return i.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,o.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,o.attr)(t,"width"),height:(0,o.attr)(t,"height")}),i.Dom.replace(t,l,void 0,!1,!0),!0}},39433:function(e,t,n){n.d(t,{fillEmptyParagraph:function(){return s}});var i=n(82758),o=n(2748);let r=new Set(["table","tbody","thead","tfoot","tr"]);function s(e,t,n){if(e.o.cleanHTML.fillEmptyParagraph&&o.Dom.isBlock(t)&&o.Dom.isEmpty(t,i.INSEPARABLE_TAGS)&&!o.Dom.isTag(t,r)){let n=e.createInside.element("br");return o.Dom.append(t,n),!0}return n}},45235:function(e,t,n){n.r(t),n.d(t,{allowAttributes:function(){return i.allowAttributes},convertUnsafeEmbeds:function(){return o.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 u.sandboxIframesInContent},sanitizeAttributes:function(){return d.sanitizeAttributes},sanitizeStyles:function(){return h.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var i=n(82558),o=n(1962),r=n(39433),s=n(53392),a=n(25813),l=n(80973),c=n(95614),u=n(85978),d=n(384),h=n(15583),p=n(28800)},53392:function(e,t,n){n.d(t,{removeEmptyTextNode:function(){return o}});var i=n(2748);function o(e,t,n,o,r,s){return i.Dom.isText(t)&&!t.nodeValue?(t===s&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),i.Dom.safeRemove(t),!0):n}},25813:function(e,t,n){n.d(t,{removeInvTextNodes:function(){return r}});var i=n(82758),o=n(2748);function r(e,t,n,r,s,a){if(a===t||!o.Dom.isText(t)||null==t.nodeValue||!(0,i.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return n;let l=o.Dom.furthest(a,o.Dom.isBlock,e.editor);return!l||o.Dom.isOrContains(l,t)?n:(t.nodeValue=t.nodeValue.replace((0,i.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||o.Dom.safeRemove(t),!0)}},80973:function(e,t,n){n.d(t,{replaceOldTags:function(){return o}});var i=n(2748);function o(e,t,n){let o=function(e,t,n){if(!n||!i.Dom.isHTMLElement(t))return t;let o=n[t.nodeName.toLowerCase()]||n[t.nodeName];if(o){let n=function(e,t){let{sel:n}=e.s;if(!(null==n?void 0:n.anchorNode)||!n.focusNode||!e.s.isFocused())return null;let{anchorNode:o,anchorOffset:r,focusNode:s,focusOffset:a}=n;return i.Dom.isOrContains(t,o)||i.Dom.isOrContains(t,s)?e=>{n.setBaseAndExtent(o===t?e:o,r,s===t?e:s,a)}:null}(e,t),r=i.Dom.replace(t,o,e.createInside,!0,!1);return null==n||n(r),r}return t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==o||n}},95614:function(e,t,n){n.d(t,{safeLinksTarget:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n){if(!e.o.cleanHTML.safeLinksTarget||!i.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,o.attr)(t,"target"))return n;let r=((0,o.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,o.attr)(t,"rel",r.join(" ")),!0):n}},85978:function(e,t,n){n.d(t,{sandboxIframesInContent:function(){return s}});var i=n(2748),o=n(29960),r=n(15908);function s(e,t,n){return e.o.cleanHTML.sandboxIframesInContent&&i.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,r.isAllowedMediaEmbed)((0,o.attr)(t,"src")||"")||t.hasAttribute("sandbox")?n:((0,o.attr)(t,"sandbox",""),!0):n}},384:function(e,t,n){n.d(t,{sanitizeAttributes:function(){return r}});var i=n(2748),o=n(21537);function r(e,t,n){if(!i.Dom.isElement(t))return n;let r=e.options.cleanHTML;return!!(0,o.sanitizeHTMLElement)(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})||n}},15583:function(e,t,n){n.d(t,{sanitizeStyles:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n){let r=e.o.cleanHTML.allowedStyles;if(!r||!i.Dom.isElement(t))return n;let s=(0,o.attr)(t,"style");if(!s)return n;let a=function(e,t){let n=t[e],i=t["*"];if(!n&&!i)return null;let o=new Set;if(i)for(let e of i)o.add(e.toLowerCase());if(n)for(let e of n)o.add(e.toLowerCase());return o}(t.nodeName.toLowerCase(),r);if(!a)return n;let l=s.split(";").map(e=>e.trim()).filter(e=>{if(!e)return!1;let t=e.indexOf(":");if(-1===t)return!1;let n=e.substring(0,t).trim().toLowerCase();return a.has(n)}).join("; ").replace(/;\s*$/,"");return l!==s?((0,o.attr)(t,"style",l||null),!0):n}},28800:function(e,t,n){n.d(t,{tryRemoveNode:function(){return l}});var i=n(82758),o=n(2748),r=n(49055),s=n(29960),a=n(15908);function l(e,t,n,l,c,u){return!function(e,t,n,l,c){if(!o.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let n="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,s.attr)(t,"src")||"");if(!l&&c&&c[e]&&!n)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let u=e.s.isCollapsed()?e.s.range.startContainer:null;return o.Dom.isElement(t)&&null!=t.nodeName.match(i.IS_INLINE)&&!o.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,r.trimInv)(t.innerHTML).length&&(null==n||!o.Dom.isOrContains(t,n))&&(null==u||!o.Dom.isOrContains(t,u))}(e,t,u,l,c)?n:(o.Dom.safeRemove(t),!0)}},39516:function(e,t,n){n.d(t,{visitNodeWalker:function(){return s}});var i=n(82758),o=n(45235);let r=Object.keys(o);function s(e,t,n,s,a){let l=!1,c=e.o.cleanHTML.disableCleanFilter;for(let u of r)if(!(c&&c.has(u))&&(l=(0,o[u])(e,t,l,n,s,a),i.IS_PROD,!t.isConnected))return!0;return l}},61323:function(e,t,n){var i=n(82758),o=n(33433),r=n(2748),s=n(580),a=n(21537);n(79419);class l{init(e){var t;null==(t=this.buttons)||t.forEach(t=>e.registerButton(t)),e.e.off(`copy.${i.CLIPBOARD_ID} cut.${i.CLIPBOARD_ID}`).on(`copy.${i.CLIPBOARD_ID} cut.${i.CLIPBOARD_ID}`,t=>{var n;let o=function(e,t){if(!t||e.s.isCollapsed())return t;let n=e.s.range.commonAncestorContainer;r.Dom.isElement(n)||(n=n.parentElement);let i=t;for(;n&&n!==e.editor&&r.Dom.isElement(n)&&!r.Dom.isBlock(n);){let e=n.cloneNode(!1);e.innerHTML=i,i=e.outerHTML,n=n.parentElement}return i}(e,e.s.html),s=(0,a.getDataTransfer)(t)||(0,a.getDataTransfer)(e.ew)||(0,a.getDataTransfer)(t.originalEvent);s&&(s.setData(i.TEXT_PLAIN,(0,a.stripTags)(o)),s.setData(i.TEXT_HTML,o)),e.buffer.set(i.CLIPBOARD_ID,o),e.e.fire("pasteStack",{html:o,action:e.o.defaultActionOnPaste||i.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),null==(n=null==e?void 0:e.events)||n.fire("afterCopy",o)})}destruct(e){var t,n;null==(t=(0,o.cached)(e,"buffer"))||t.set(i.CLIPBOARD_ID,""),null==(n=null==e?void 0:e.events)||n.off("."+i.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,n){var i=n(12153),o=n(6441),r=n(94775),s=n(23140),a=n(92699),l=n(10052);o.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},o.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},o.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},i.Icon.set("copy",r.default).set("cut",s.default).set("paste",a.default).set("select-all",l.default)},94775:function(e,t){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){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){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){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){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,n){var i=n(580),o=n(21537);n(21988),i.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,n,i)=>{var r;let s=(0,o.normalizeColor)(i)||"",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,n){var i=n(2748),o=n(21537),r=n(12153),s=n(6441),a=n(92762),l=n(46104);function c(e,t,n){(0,o.css)(e,t,n),(0,o.attr)(e,"style")||(0,o.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,n)=>{if(!(0,o.isJoditObject)(e))return;let i=e.getInstance("Table",e.o).getAllSelectedCells();if(!i.length)return!1;let r=t=>(0,a.ColorPickerWidget)(e,o=>{i.forEach(e=>{c(e,t,o)}),e.lock(),e.synchronizeValues(),n(),e.unlock()},(0,o.css)(i[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 n=(0,o.dataBind)(t,"color"),r=(n,i)=>!!i&&i!==(0,o.css)(e.editor,n).toString()&&(t.state.icon.fill=i,!0);if(n){let e=(0,o.dataBind)(t,"color");r("color"===e?e:"background-color",n);return}let s=e.s.current();if(s&&!t.state.disabled){let t=i.Dom.closest(s,i.Dom.isElement,e.editor)||e.editor,n=r("color",(0,o.css)(t,"color").toString()),a=r("background-color",(0,o.css)(t,"background-color").toString());if(n||a)return}t.state.icon.fill="",t.state.activated=!1},popup:(e,t,n,r)=>{let s="",l="",u,d=null;return t&&t!==e.editor&&i.Dom.isNode(t)&&(i.Dom.isElement(t)&&e.s.isCollapsed()&&!i.Dom.isTag(t,new Set(["br","hr"]))&&(d=t),i.Dom.up(t,e=>{if(i.Dom.isHTMLElement(e)){let t=(0,o.css)(e,"color",!0),n=(0,o.css)(e,"background-color",!0);if(t)return s=t.toString(),!0;if(n)return l=n.toString(),!0}},e.editor)),u=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{d?c(d,"backgroundColor",t):e.execCommand("background",!1,t),(0,o.dataBind)(r,"color",t),(0,o.dataBind)(r,"color-mode","background"),n()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{d?c(d,"color",t):e.execCommand("forecolor",!1,t),(0,o.dataBind)(r,"color",t),(0,o.dataBind)(r,"color-mode","color"),n()},s)}],"background"!==e.o.colorPickerDefaultTab&&(u=u.reverse()),(0,a.TabsWidget)(e,u,d)},exec(e,t,{button:n}){let r=(0,o.dataBind)(n,"color-mode"),s=(0,o.dataBind)(n,"color");if(!r)return!1;if(t&&t!==e.editor&&i.Dom.isNode(t)&&i.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,n){var i=n(2748),o=n(580),r=n(41180),s=n(12153),a=n(6441),l=n(57487),c=n(23914);let u="copy-format",d=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],h=(e,t,n,i)=>{let o=(0,r.css)(n,t);return o===i[t]&&(o=n.parentNode&&n!==e.editor&&n.parentNode!==e.editor?h(e,t,n.parentNode,i):void 0),o};a.Config.prototype.controls.copyformat={exec:(e,t,{button:n})=>{if(t){if(e.buffer.exists(u))e.buffer.delete(u),e.e.off(e.editor,"mouseup."+u);else{let n,o={},s=i.Dom.up(t,e=>e&&!i.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();i.Dom.append(e.editor,a),d.forEach(e=>{o[e]=(0,r.css)(a,e)}),a!==e.editor&&i.Dom.safeRemove(a);let l=(n={},s&&d.forEach(t=>{n[t]=h(e,t,s,o),t.match(/border(Style|Color)/)&&!n.borderWidth&&(n[t]=void 0)}),n);e.e.on(e.editor,"mouseup."+u,()=>{e.buffer.delete(u);let t=e.s.current();t&&(i.Dom.isTag(t,"img")?(0,r.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+u)}),e.buffer.set(u,!0)}n.update()}},isActive:e=>e.buffer.exists(u),tooltip:"Paint format"},o.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,o.extendLang)(c)}),s.Icon.set("copyformat",l.default)},57487:function(e,t){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> '},63819:function(e){e.exports={"copy-format":"نسخ التنسيق"}},72392:function(e){e.exports={"copy-format":"Kop\xedrovat form\xe1t"}},74551:function(e){e.exports={"copy-format":"Format kopierenт"}},2536:function(e){e.exports={"copy-format":"Copiar formato"}},52285:function(e){e.exports={"copy-format":"کپی کردن قالب"}},12117:function(e){e.exports={"copy-format":"Kopioi muotoilu"}},35140:function(e){e.exports={"copy-format":"Format de copie"}},28435:function(e){e.exports={"copy-format":"העתק עיצוב"}},98019:function(e){e.exports={"copy-format":"Form\xe1tum m\xe1sol\xe1s"}},96457:function(e){e.exports={"copy-format":"salin format"}},23914:function(e,t,n){n.r(t),n.d(t,{ar:function(){return i},cs_cz:function(){return o},de:function(){return r},es:function(){return s},fa:function(){return a},fi:function(){return l},fr:function(){return c},he:function(){return u},hu:function(){return d},id:function(){return h},it:function(){return p},ja:function(){return f},ko:function(){return m},mn:function(){return g},nl:function(){return b},pl:function(){return v},pt_br:function(){return y},ru:function(){return w},tr:function(){return _},zh_cn:function(){return S},zh_tw:function(){return k}});var i=n(63819),o=n(72392),r=n(74551),s=n(2536),a=n(52285),l=n(12117),c=n(35140),u=n(28435),d=n(98019),h=n(96457),p=n(33561),f=n(96545),m=n(52230),g=n(33307),b=n(71042),v=n(32172),y=n(39179),w=n(60629),_=n(68278),S=n(1172),k=n(4164)},33561:function(e){e.exports={"copy-format":"Copia il formato"}},96545:function(e){e.exports={"copy-format":"copyformat"}},52230:function(e){e.exports={"copy-format":"복사 형식"}},33307:function(e){e.exports={"copy-format":"Формат хуулах"}},71042:function(e){e.exports={"copy-format":"opmaak kopi\xebren"}},32172:function(e){e.exports={"copy-format":"format kopii"}},39179:function(e){e.exports={"copy-format":"Copiar formato"}},60629:function(e){e.exports={"copy-format":"Копировать формат"}},68278:function(e){e.exports={"copy-format":"Kopyalama Bi\xe7imi"}},1172:function(e){e.exports={"copy-format":"复制格式"}},4164:function(e){e.exports={"copy-format":"複製格式"}},66707:function(e,t,n){var i=n(82758),o=n(22732),r=n(580),s=n(21537),a=n(49055),l=n(50911);let c=new Set(["img","table","jodit","iframe","hr"]),u=new Set(["pre","pre-wrap","break-spaces"]);function d(e,t){let n=0;for(;n<e.length&&" "===e.charAt(t?e.length-1-n:n);)n+=1;return 0===n?e:t?e.slice(0,e.length-n)+i.NBSP_SPACE.repeat(n):i.NBSP_SPACE.repeat(n)+e.slice(n)}function h(e,t){var n;return!e||o.Dom.isTag(e,"br")||o.Dom.isBlock(e)||o.Dom.isText(e)&&t.test(null!=(n=e.nodeValue)?n:"")}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&&o.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,a.trim)(e.editor.textContent||"")&&!o.Dom.first(e.editor,e=>o.Dom.isTag(e,c))&&(!t||!o.Dom.closest(t,"table",e.editor))){o.Dom.detach(e.editor);let t=e.s.setCursorIn(e.editor);e.s.removeNode(t)}}__onDeleteCommand(e,t,n){let{jodit:i}=this;if(i.s.isCollapsed())return;i.s.expandSelection();let r=i.s.range;this.__moveEdgesIntoCells(r);let s=!0===n?this.__formatTakenWhole(r):[],a=this.__clearSelectedCells(r);if(a&&r.collapsed)return i.s.selectRange(a),!1;r.deleteContents();let l=i.createInside.fake();r.insertNode(l);let c=o.Dom.findSibling(l,!0),u=o.Dom.findSibling(l,!1);return this.__moveContentInLeftSibling(l,c,u),this.__keepSpacesVisible(l),this.__keepSpacesVisibleBesideTable(l),r.setStartBefore(l),r.collapse(!0),s.length&&!a?this.__keepFormat(s,l,r):(this.__moveCursorInEditableSibling(i,c,l,r),this.__addBrInEmptyBlock(l,r)),o.Dom.safeRemove(l),i.s.selectRange(null!=a?a:r),!1}__moveEdgesIntoCells(e){let{startContainer:t,startOffset:n,endContainer:i,endOffset:r}=e,s=o.Dom.isTag(t,"tr")?t.childNodes[n]:null,a=o.Dom.isTag(i,"tr")?i.childNodes[r-1]:null;o.Dom.isCell(s)&&e.setStart(s,0),o.Dom.isCell(a)&&e.setEnd(a,a.childNodes.length)}__formatTakenWhole(e){let t=[],n=this.jodit.s.createRange(),{startContainer:i,startOffset:r}=e,a=o.Dom.isText(i)?null:i.childNodes[r];for(;o.Dom.isHTMLElement(a);){var l;if(n.selectNode(a),0>e.compareBoundaryPoints(Range.END_TO_END,n))break;if(l=a,o.Dom.isHTMLElement(l)&&!l.hasAttribute("contenteditable")&&!o.Dom.isTemporary(l)&&(/^(STRONG|B|EM|I|U|S|SUB|SUP)$/.test(l.nodeName)||o.Dom.isTag(l,"span")&&l.hasAttribute("style")))t.push(a);else if(t.length||!o.Dom.isBlock(a))break;a=(0,s.toArray)(a.childNodes).find(e=>{var t;return!o.Dom.isText(e)||(0,s.trimInv)(null!=(t=e.nodeValue)?t:"")})}return t}__keepFormat(e,t,n){let r=e.map(e=>e.cloneNode(!1));for(let e=1;e<r.length;e+=1)o.Dom.append(r[e-1],r[e]);let s=this.jodit.createInside.text(i.INVISIBLE_SPACE);o.Dom.append(r[r.length-1],s),o.Dom.before(t,r[0]),n.setStartAfter(s),n.collapse(!0)}__clearSelectedCells(e){let{editor:t,createInside:n}=this.j,i=o.Dom.closest(e.startContainer,o.Dom.isCell,t),r=o.Dom.closest(e.endContainer,o.Dom.isCell,t);if(i===r)return null;let a=o.Dom.closest(i,"table",t),l=o.Dom.closest(r,"table",t),c=e.cloneRange();c.collapse(!0);let u=e.cloneRange();u.collapse(!1);let d=[],h=t=>{(0,s.toArray)(t.rows).flatMap(e=>(0,s.toArray)(e.cells)).filter(t=>e.intersectsNode(t)).forEach(t=>{let n=e.cloneRange();o.Dom.isOrContains(t,e.startContainer)||n.setStart(t,0),o.Dom.isOrContains(t,e.endContainer)||n.setEnd(t,t.childNodes.length),d.push([t,n])})};return a&&(h(a),a===l?e.collapse(!0):e.setStartAfter(a)),l&&l!==a&&(h(l),e.setEndBefore(l)),d.forEach(([e,t])=>{if(t.deleteContents(),o.Dom.isEmpty(e)){o.Dom.detach(e),o.Dom.append(e,n.element("br"));return}[c,u].filter(t=>o.Dom.isOrContains(e,t.startContainer)).forEach(e=>{let t=n.fake();e.insertNode(t),this.__keepSpacesVisible(t),e.setStartBefore(t),e.collapse(!0),o.Dom.safeRemove(t)})}),a?c:null}__moveContentInLeftSibling(e,t,n){if(t=this.__defineRightLeftBox(t),o.Dom.isTag(t,"table")){o.Dom.isBlock(n)&&o.Dom.isEmpty(n)&&o.Dom.safeRemove(n);return}if(!o.Dom.isList(n)&&!o.Dom.isTag(n,"table")&&o.Dom.isBlock(n)&&o.Dom.isBlock(t)&&(o.Dom.append(t,e),o.Dom.moveContent(n,t),o.Dom.safeRemove(n)),o.Dom.isList(n)&&o.Dom.isLeaf(n.firstElementChild)){let i=n.firstElementChild;if(!o.Dom.isEmpty(i)&&o.Dom.isBlock(t))for(o.Dom.append(t,e);i.firstChild&&!o.Dom.isBlock(i.firstChild);)o.Dom.append(t,i.firstChild);o.Dom.isEmpty(i)&&o.Dom.safeRemove(i),o.Dom.isEmpty(n)&&o.Dom.safeRemove(n)}}__keepSpacesVisible(e){var t;let{jodit:n}=this,i=null!=(t=o.Dom.closest(e,o.Dom.isBlock,n.editor))?t:n.editor;if(u.has(n.ew.getComputedStyle(i).whiteSpace))return;let r=this.__findNeighbor(e,!0,i),s=this.__findNeighbor(e,!1,i);o.Dom.isText(r)&&h(s,/^ /)&&(r.nodeValue=d(r.nodeValue,!0)),o.Dom.isText(s)&&h(r,/ $/)&&(s.nodeValue=d(s.nodeValue,!1))}__keepSpacesVisibleBesideTable(e){let t=o.Dom.findNotEmptySibling(e,!0),n=o.Dom.findNotEmptySibling(e,!1),i=o.Dom.isTag(n,"table")?t:o.Dom.isTag(t,"table")?n:null;if(!o.Dom.isBlock(i)||o.Dom.isTag(i,"table"))return;let r=this.jodit.createInside.fake();i===t?o.Dom.append(i,r):i.insertBefore(r,i.firstChild),this.__keepSpacesVisible(r),o.Dom.safeRemove(r)}__findNeighbor(e,t,n){return(0,s.call)(t?o.Dom.prev:o.Dom.next,e,e=>{var t;return o.Dom.isText(e)?(0,s.trimInv)(null!=(t=e.nodeValue)?t:"").length>0:!o.Dom.isComment(e)&&!(o.Dom.isInlineBlock(e)&&e.firstChild)},n)}__defineRightLeftBox(e){if(!o.Dom.isList(e))return e;let t=e.lastElementChild;return o.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),o.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t){let n=this.j;if(e.isConnected&&o.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let i=n.createInside.element("br");o.Dom.after(e,i),t.setStartBefore(i),t.collapse(!0)}}__moveCursorInEditableSibling(e,t,n,i){var r;if(!t||!o.Dom.isText(t)){let t=null!=(r=o.Dom.closest(n,o.Dom.isBlock,e.editor))?r:e.editor,s=o.Dom.prev(n,o.Dom.isText,t);s&&(i.setStartAfter(s),i.collapse(!0),o.Dom.safeRemove(n))}}}p.requires=["backspace"],r.pluginSystem.add("deleteCommand",p)},44586:function(e,t,n){n(6441).Config.prototype.draggableTags=["img","jodit-media","jodit"]},1255:function(e,t,n){var i,o,r=n(65478),s=n(22732),a=n(580),l=n(21537),c=n(50911);n(44586);var u=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};(i=o||(o={}))[i.IDLE=0]="IDLE",i[i.WAIT_DRAGGING=1]="WAIT_DRAGGING",i[i.DRAGGING=2]="DRAGGING";class d 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>o.IDLE||!e||this.startDragging(e,t)}onDragStart(e){var t;if("dragstart"===e.type&&this.draggable)return!1;if(this.state>o.IDLE)return;let n=e.target;if(!this.dragList.length||!n)return;let i=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),r=s.Dom.furthest(n,i,this.j.editor)||(i(n)?n: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=o.WAIT_DRAGGING,this.addDragListeners()}onDrag(e){var t,n;if(!this.draggable||this.state===o.IDLE)return;let i=e.clientX,r=e.clientY;if(this.state===o.WAIT_DRAGGING&&Math.sqrt(Math.pow(i-this.startX,2)+Math.pow(r-this.startY,2))<this.diffStep)return;this.state===o.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=o.DRAGGING),this.j.e.fire("hidePopup hideResizer");let c=this.__ghostOffset();if(!this.draggable.parentNode){let i=(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==i?void 0:i.offsetWidth)?t:100,height:null!=(n=null==i?void 0:i.offsetHeight)?n:100}),s.Dom.append((0,a.getContainer)(this.j,d),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=o.IDLE,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<o.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=o.IDLE}}u([r.autobind],d.prototype,"onStartDragElement",null),u([r.autobind],d.prototype,"onDragStart",null),u([(0,r.throttle)(e=>e.defaultTimeout/10)],d.prototype,"onDrag",null),u([r.autobind],d.prototype,"onDragEnd",null),u([r.autobind],d.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",d)},19271:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(50911),c=n(8172),u=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class d 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 n=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=r.Dom.isOrContains(this.j.editor,n,!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=n,r.Dom.isElement(t)&&t.classList.contains(c.FileBrowserFiles.prototype.getFullElName("item"))&&(n=r.Dom.first(n,e=>r.Dom.isTag(e,"img"))),r.Dom.isTag(n,"img")&&(this.draggable=n.cloneNode(!0),(0,a.dataBind)(this.draggable,"target",n)),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,n=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),i=this.__getWorkFragment(n,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),i&&this.__insertFragment.call(this,i,n),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let n=null;if(!this.draggable&&e)n=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"];n=this.j.createInside.element(e),(0,a.attr)(n,t,(0,a.attr)(this.draggable,"data-src")||(0,a.attr)(this.draggable,"src")||""),"a"===e&&(n.textContent=(0,a.attr)(n,t)||"")}else n=(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),n=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e}return n}__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(i.TEXT_HTML)||t.getData(i.TEXT_PLAIN):null}}}u([o.autobind],d.prototype,"onDragStart",null),u([(0,o.throttle)(e=>e.defaultTimeout/10)],d.prototype,"onDrag",null),u([o.autobind],d.prototype,"onDragEnd",null),u([o.autobind],d.prototype,"onDrop",null),s.pluginSystem.add("dragAndDrop",d)},46124:function(e,t,n){n.r(t),n.d(t,{removeExtraBr:function(){return i.removeExtraBr}});var i=n(94870)},94870:function(e,t,n){n.d(t,{removeExtraBr:function(){return r}});var i=n(2748);let o=new Set(["table","pre","blockquote","code"]);function r(e,t){if(!e.o.dtd.removeExtraBr||i.Dom.isTag(t,"br"))return;let n=i.Dom.furthest(t,i.Dom.isBlock,e.editor);if(n&&!i.Dom.isTag(n,o)){let n=i.Dom.isTag(t,"br")?t:i.Dom.findNotEmptySibling(t,!1);if(!i.Dom.isTag(n,"br")||i.Dom.findNotEmptySibling(n,!1))return;if(!i.Dom.isOrContains(t,e.s.range.startContainer)){let t=e.s.createRange();t.setStartBefore(n),t.collapse(!0),e.s.selectRange(t)}i.Dom.safeRemove(n)}}},78720:function(e,t,n){n.d(t,{checkBlockNesting:function(){return o}});var i=n(2748);function o(e,t){var n,o;if(i.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&i.Dom.isBlock(t)){let r=null,s=null!=(o=null==(n=e.s.current())?void 0:n.parentElement)?o:null;for(;s&&s!==e.editor;){if(i.Dom.isBlock(s)){let t=!r&&i.Dom.isTag(s,e.o.enter)&&i.Dom.isEmpty(s);if(e.o.dtd.blockLimits[s.nodeName.toLowerCase()]&&!t)break;r=s}s=s.parentElement}i.Dom.isLeaf(s)&&i.Dom.isList(t)&&i.Dom.isFragment(t.parentNode)&&!i.Dom.findNotEmptySibling(t,!1)&&(i.Dom.unwrap(t),r=s),r&&function(e,t){var n;let{s:o}=e;if(i.Dom.isEmpty(t)){o.setCursorAfter(t),i.Dom.safeRemove(t);return}o.cursorOnTheRight(t)?o.setCursorAfter(t):o.cursorOnTheLeft(t)?o.setCursorBefore(t):o.setCursorAfter(null!=(n=o.splitSelection(t))?n:t)}(e,r)}}},43267:function(e,t,n){n.r(t),n.d(t,{checkBlockNesting:function(){return i.checkBlockNesting}});var i=n(78720)},9045:function(e,t,n){n(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,n){var i=n(37133),o=n(580),r=n(50911);n(9045);var s=n(46124),a=n(43267),l=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,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,i.watch)(":beforeInsertNode")],c.prototype,"__onBeforeInsertNode",null),l([(0,i.watch)(":afterInsertNode")],c.prototype,"__onAfterInsertNode",null),o.pluginSystem.add("dtd",c)},575:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(87612),l=n(20356),c=n(35399);class u extends l.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),n=t===i.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=n?i.PARAGRAPH:t),e.registerCommand("enter",(e,t,n={})=>this.onEnter(n))}onEnterKeyDown(e){if(e.key===i.KEY_ENTER){let t=this.j,n=t.e.fire("beforeEnter",e);return void 0!==n?n:(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,n=t.createInside.fake();try{r.Dom.safeInsertNode(t.s.range,n),(0,c.moveCursorOutFromSpecialTags)(t,n,["a"]);let i=(0,c.getBlockWrapper)(n,t),o=r.Dom.isLeaf(i);if((!o||(null==e?void 0:e.shiftKey))&&(0,c.checkBR)(n,t,null==e?void 0:e.shiftKey,i))return!1;if(i||(0,c.hasPreviousBlock)(n,t)||(i=(0,c.wrapText)(n,t)),!i)return(0,c.insertParagraph)(n,t,o?"li":t.o.enter),!1;if(!(0,c.checkUnsplittableBox)(n,t,i))return!1;if(o&&this.__isEmptyListLeaf(i))return(0,c.processEmptyLILeaf)(n,t,i),!1;(0,c.splitFragment)(n,t,i)}finally{n.isConnected&&t.s.setCursorBefore(n),r.Dom.safeRemove(n)}}__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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([(0,o.watch)(":keydown.enter")],u.prototype,"onEnterKeyDown",null),s.pluginSystem.add("enter",u)},41872:function(e,t,n){n.d(t,{checkBR:function(){return s}});var i=n(82758),o=n(2748),r=n(26395);function s(e,t,n,s){let l=!!o.Dom.closest(e,"pre",t.editor)||(s?o.Dom.isTag(s,"blockquote"):!!o.Dom.closest(e,"blockquote",t.editor)),c=!l&&(s?o.Dom.isCell(s):!!o.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===i.BR.toLowerCase()||c||n&&!l||!n&&l){var u;let n;if(l&&(n=a(a(u=e)))&&(o.Dom.safeRemove(a(u)),o.Dom.safeRemove(n),1))return!1;let i=t.createInside.element("br");if(o.Dom.before(e,i),!o.Dom.findNotEmptySibling(i,!1)){let t=i.cloneNode();o.Dom.after(i,t),o.Dom.before(t,e)}let s=i.cloneNode();return o.Dom.before(e,s),(0,r.scrollIntoViewIfNeeded)(s,t.editor,t.ed),o.Dom.safeRemove(s),!0}return!1}function a(e){if(!e)return!1;let t=o.Dom.findSibling(e,!0);return!!t&&!!o.Dom.isTag(t,"br")&&t}},61991:function(e,t,n){n.d(t,{checkUnsplittableBox:function(){return o}});var i=n(2748);function o(e,t,n){return!!i.Dom.canSplitBlock(n)||(i.Dom.before(e,t.createInside.element("br")),!1)}},54041:function(e,t,n){n.d(t,{getBlockWrapper:function(){return function e(t,n,r=i.IS_BLOCK){let s=t,a=n.editor;do{if(!s||s===a)break;if(r.test(s.nodeName)){if(o.Dom.isLeaf(s))return s;return e(s.parentNode,n,/^li$/i)||s}s=s.parentNode}while(s&&s!==a);return null}}});var i=n(82758),o=n(2748)},19057:function(e,t,n){n.d(t,{hasPreviousBlock:function(){return o}});var i=n(2748);function o(e,t){return!!i.Dom.prev(e,e=>i.Dom.isBlock(e)||i.Dom.isImage(e),t.editor)}},35399:function(e,t,n){n.d(t,{checkBR:function(){return i.checkBR},checkUnsplittableBox:function(){return o.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 u.splitFragment},wrapText:function(){return d.wrapText}});var i=n(41872),o=n(61991),r=n(54041),s=n(19057),a=n(44245),l=n(91388),c=n(65181),u=n(54600),d=n(5287)},44245:function(e,t,n){n.d(t,{insertParagraph:function(){return s}});var i=n(2748),o=n(29960),r=n(26395);function s(e,t,n,s){let a="br"===n.toLowerCase(),{createInside:l}=t,c=l.element(n),u=l.element("br");return a||i.Dom.append(c,u),s&&s.cssText&&(0,o.attr)(c,"style",s.cssText),i.Dom.after(e,c),i.Dom.before(a?c:u,e),(0,r.scrollIntoViewIfNeeded)(c,t.editor,t.ed),c}},91388:function(e,t,n){n.d(t,{moveCursorOutFromSpecialTags:function(){return o}});var i=n(2748);function o(e,t,n){let{s:o}=e,r=i.Dom.closest(t,n,e.editor);if(r){if(o.cursorOnTheRight(r,t))i.Dom.after(r,t);else{if(!o.cursorOnTheLeft(r,t))return;i.Dom.before(r,t)}let e=o.createRange();e.setStartBefore(t),o.selectRange(e)}}},65181:function(e,t,n){n.d(t,{processEmptyLILeaf:function(){return s}});var i=n(2748),o=n(76078),r=n(44245);function s(e,t,n){let s=i.Dom.closest(n,["ol","ul"],t.editor);if(!s)return;let a=s.parentElement,l=i.Dom.isLeaf(a),c=l?a:s,u=t.s.createRange();u.setStartAfter(n),u.setEndAfter(s);let d=u.extractContents();i.Dom.after(c,e),i.Dom.safeRemove(n),(0,o.$$)("li",s).length||i.Dom.safeRemove(s);let h=(0,r.insertParagraph)(e,t,l?"li":t.o.enter);i.Dom.first(d,e=>i.Dom.isTag(e,"li"))&&(l?i.Dom.append(h,d):i.Dom.after(h,d))}},54600:function(e,t,n){n.d(t,{splitFragment:function(){return s}});var i=n(2748),o=n(26395),r=n(44245);function s(e,t,n){let s=t.s,{enter:a}=t.o,l=a.toLowerCase(),c=i.Dom.isLeaf(n),u=n.tagName.toLowerCase()===l||c,d=s.cursorOnTheRight(n,e),h=s.cursorOnTheLeft(n,e);if(!u&&(d||h)){d?i.Dom.after(n,e):i.Dom.before(n,e),(0,r.insertParagraph)(e,t,l),h&&!d&&i.Dom.prepend(n,e);return}let{scrollTop:p}=t.editor;s.splitSelection(n,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,o.scrollIntoViewIfNeeded)(n,t.editor,t.ed)}},5287:function(e,t,n){n.d(t,{wrapText:function(){return o}});var i=n(2748);function o(e,t){let n=e;i.Dom.up(n,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(n=e)},t.editor);let o=i.Dom.wrapInline(n,t.o.enter,t);if(i.Dom.isEmpty(o)){let n=t.createInside.element("br");i.Dom.append(o,n),i.Dom.before(n,e)}return o}},11317:function(e,t,n){var i=n(2748),o=n(580),r=n(29960),s=n(6441),a=n(2073),l=n(92762);function c(e,t,n=""){if(e.s.isCollapsed())return!1;let i=e.s.wrapInTag("a");return!!i.length&&(i.forEach(e=>{(0,r.attr)(e,"href",t),n&&(0,r.attr)(e,"title",n)}),e.s.setCursorAfter(i[i.length-1]),!0)}function u(e){let{baseurl:t}=e;(0,a.getItems)(e).forEach(({file:e})=>{let n=t+e;if(c(this,n))return;let i=this.createInside.element("a",{href:n});i.textContent=this.o.uploader.getDisplayName.call(this.uploader,t,e),this.s.insertNode(i)})}s.Config.prototype.file={defaultHandlerSuccess:u},s.Config.prototype.controls.file={popup:(e,t,n)=>{let o=e.s.isCollapsed()?null:e.s.range,s=()=>{o&&e.s.selectRange(o)},d=(t,n="")=>{s(),c(e,t,n)||e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${n}">${n||t}</a>`))},h=null;return t&&(i.Dom.isTag(t,"a")||i.Dom.closest(t,"a",e.editor))&&(h=i.Dom.isTag(t,"a")?t:i.Dom.closest(t,"a",e.editor)),(0,l.FileSelectorWidget)(e,{filebrowser:e=>{(0,a.getItems)(e).forEach(({file:t})=>d(e.baseurl+t)),n()},upload:t=>{var n,i;s(),(null!=(i=null==(n=e.o.file)?void 0:n.defaultHandlerSuccess)?i:u).call(e,t)},url:(e,t)=>{h?((0,r.attr)(h,"href",e),(0,r.attr)(h,"title",t)):d(e,t),n()}},h,n,!1)},tags:["a"],tooltip:"Insert file"},o.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},36243:function(e,t,n){var i=n(82758),o=n(22732),r=n(580),s=n(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=o.Dom.first(e.editor,e=>o.Dom.isText(e));break;case"end":t=o.Dom.last(e.editor,e=>o.Dom.isText(e))}t&&e.s.setCursorIn(t,"start"===e.o.cursorAfterAutofocus)};e.e.on("afterInit",()=>{if(e.o.autofocus)if(e.defaultTimeout){let n="mousedown touchstart keydown",i=()=>{e.async.clearTimeout(o),e.e.off(n,i)},o=e.async.setTimeout(()=>{e.e.off(n,i),t()},300);e.e.on(n,i)}else t()}),e.e.on("afterInit afterAddPlace",()=>{e.e.off(e.editor,"mousedown.autofocus").on(e.editor,"mousedown.autofocus",t=>{e.isEditorMode()&&t.target&&o.Dom.isBlock(t.target)&&!o.Dom.isTag(t.target,i.INSEPARABLE_TAGS)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},28252:function(e,t,n){var i,o,r=n(22732),s=n(68345),a=n(49055),l=n(41180),c=n(12153),u=n(6441),d=n(4104),h=n(83709),p=n(40222);u.Config.prototype.defaultFontSizePoints="px",u.Config.prototype.font={googleFonts:{url:""}},c.Icon.set("font",d.default).set("fontsize",h.default);let f=new WeakSet;u.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,n)=>`${n}${e.o.defaultFontSizePoints}`,tooltip:"Font size",value:(e,t)=>{var n;let i=e.s.current(),o=i&&r.Dom.closest(i,r.Dom.isElement,e.editor),s=t.control;if(o)f.add(t);else if("select"!==s.component||f.has(t))return;let a=(null==(n=s.data)?void 0:n.cssRule)||"font-size",c=(0,l.css)(o||e.editor,a);if("font-size"===a){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 n,i;let o=t.state.value,r=null!=(i=null==(n=t.control.data)?void 0:n.normalize)?i:e=>e;return!!(o&&t.control.args&&r(t.control.args[0].toString())===r(o.toString()))},isActive:(e,t)=>{var n,i;let o=t.state.value;if(!o)return!1;let r=null!=(i=null==(n=t.control.data)?void 0:n.normalize)?i: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(o.toString()))}},u.Config.prototype.controls.font=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},u.Config.prototype.controls.fontsize),o=o={command:"fontname",textTemplate:(e,t)=>{let[n]=t.split(",");return(0,a.trimChars)(n,"\"'")},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,n)=>{let i=!1;try{i=-1===t.indexOf("dings")&&document.fonts.check(`16px ${t}`,n)}catch(e){}return`<span data-style="${t}" style="${i?`font-family: ${t}!important;`:""}">${n}</span>`},popup:(e,t,n,i)=>!!e.o.font.googleFonts.url&&new p.UIFontPicker(e,i,n),data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value:(e,t)=>{let n=e.s.current(),i=n&&r.Dom.closest(n,r.Dom.isElement,e.editor);if(i)f.add(t);else if(f.has(t))return;let o=(0,l.css)(i||e.editor,"font-family").toString(),{list:a}=t.control;return o===(0,l.css)(e.editor,"font-family").toString()&&((0,s.isArray)(a)?a.includes(""):""in(null!=a?a:{}))?"":o},tooltip:"Font family"},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}),i)},40222:function(e,t,n){n.d(t,{UIFontPicker:function(){return g}});var i=n(87325),o=n(37133),r=n(2748),s=n(580),a=n(68345),l=n(29960),c=n(41180),u=n(37790),d=n(48538),h=n(41870),p=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let f=["h1","h2","h3","h4","h5","h6"],m=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),g=class e extends d.UIElement{className(){return"UIFontPicker"}__render(){var e,t;let{control:n}=this.__button,{list:i={}}=n,o=(0,a.isArray)(i)?i.map(e=>({value:e.toString(),title:e.toString()})):(0,u.keys)(i,!1).map(e=>({value:e,title:i[e].toString()})),s=Array.from(this.__googleFonts.fonts.values(),e=>({value:this.__googleFonts.value(e),title:e.family,font:e})),l=new Map;[...s,...o].forEach(e=>l.set((0,h.firstFamily)(e.value),e));let c=new Map,d=new Map;this.__themeFonts().forEach(e=>{var t;let n=(0,h.firstFamily)(e),i=e.split(",")[0].replace(/["']/g,"").trim(),o=null!=(t=l.get(n))?t:!n||n.startsWith("-")||m.has(n)?void 0:{value:e,title:i};o&&!c.has(n)&&c.set(n,o)}),this.__usedFonts().forEach(e=>{let t=(0,h.firstFamily)(e),n=l.get(t);n&&!c.has(t)&&d.set(t,n)});let p=o.find(e=>""===e.value),f=(0,h.firstFamily)(null!=(t=null==(e=n.value)?void 0:e.call(n,this.j,this.__button))?t:"");r.Dom.detach(this.container),this.__fonts.clear(),p&&this.__append(f,[p]),this.__append(f,[...c.values()],"Theme fonts"),this.__append(f,[...d.values()],"Used fonts"),this.__append(f,o.filter(e=>e!==p),"System fonts"),this.__append(f,s,"Google Fonts"),this.__observeGoogleFonts()}__themeFonts(){let{editor:e}=this.j,t=[(0,c.css)(e,"font-family").toString()];return f.forEach(n=>{let i=this.j.createInside.element(n,{style:"display: none"});r.Dom.append(e,i),t.push((0,c.css)(i,"font-family").toString()),r.Dom.safeRemove(i)}),t}__usedFonts(){return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'),e=>e.style.fontFamily)}__append(e,t,n){if(!t.length)return;let{control:i}=this.__button,o=this.j.c.div(this.getFullElName("group"));if(n){let e=this.j.c.div(this.getFullElName("heading"),{id:`${this.getFullElName("heading")}-${(0,s.uniqueUid)()}`});e.textContent=this.i18n(n),(0,l.attr)(o,{role:"group","aria-labelledby":e.id}),r.Dom.append(o,e)}t.forEach(t=>{var n,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==(n=i.childTemplate)?void 0:n.call(i,this.j,t.value,t.title,this.__button))?s:t.title,r.Dom.append(o,a)}),r.Dom.append(this.container,o)}__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 n=[];e.forEach(({isIntersecting:e,target:i})=>{let o=this.__fonts.get(i);e&&o&&(n.push(o),(0,c.css)(i,{fontFamily:this.__googleFonts.value(o)}),t.unobserve(i))}),this.__googleFonts.preview(n)},{root:this.container.parentElement,rootMargin:"0px 0px 400px 0px"});this.__fonts.forEach((e,n)=>t.observe(n)),this.__observer=t})}onMouseDown(e){e.preventDefault()}onClick(e){var t;let n=r.Dom.up(e.target,e=>r.Dom.isHTMLElement(e)&&e.hasAttribute("data-value"),this.container);if(!n)return;let i=null!=(t=(0,l.attr)(n,"data-value"))?t:"",o=this.__googleFonts.find(i),s=(0,h.firstFamily)(i)===(0,h.firstFamily)(this.__blockFont());o&&!s&&this.__googleFonts.load(o),this.j.execCommand("fontname",!1,s?"":i),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,n){super(e),this.__button=t,this.__close=n,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,o.watch)("container:mousedown")],g.prototype,"onMouseDown",null),p([(0,o.watch)("container:click")],g.prototype,"onClick",null),g=p([i.component],g)},23399:function(e,t,n){var i=n(580),o=n(21537);n(28252);var r=n(41870);i.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),n=e.async.debounce(()=>t.loadUsed(),e.defaultTimeout);t.ready.then(n),e.e.on("afterInit afterSetMode change",n)}e.e.on("afterInit",()=>{e.iframe&&e.e.on(e.ed,"load",()=>e.e.fire("updateToolbar"),{capture:!0})});let t=(t,n,i)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,o.normalizeSize)(i,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:i}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},41870:function(e,t,n){n.d(t,{GoogleFonts:function(){return c},firstFamily:function(){return l}});var i=n(80480),o=n(2748),r=n(54079);let s={serif:"serif",monospace:"monospace"},a=new Map;function l(e){return e.split(",")[0].replace(/["']/g,"").trim().toLowerCase()}class c extends i.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 n=[["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@${n.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 n=e.map(e=>`family=${this.__family(e)}`),i=new Set(e.map(e=>e.family).join(""));this.__append(this.j.od,`${n.join("&")}&text=${encodeURIComponent([...i].join(""))}`)}__loadedInto(e){var t;let n=null!=(t=this.__loaded.get(e))?t:new Set;return this.__loaded.set(e,n),n}__family(e){return encodeURIComponent(e.family).replace(/%20/g,"+")}__append(e,t){let n=e.createElement("link");n.rel="stylesheet",n.href=`https://fonts.googleapis.com/css2?${t}&display=swap`,e.head.appendChild(n),this.__links.push(n)}destruct(){this.__links.forEach(e=>o.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 n=a.get(t);if(!n){let i=new r.Ajax({url:t,method:"GET"},e.o.defaultAjaxOptions);n=i.send().then(e=>e.json()).then(({items:e})=>e.filter(e=>e.variants.includes("regular"))).catch(()=>(a.delete(t),[])).finally(()=>i.destruct()),a.set(t,n)}return n})(e,e.o.font.googleFonts.url).then(e=>{e.forEach(e=>this.fonts.set(e.family.toLowerCase(),e))})}}},4104:function(e,t){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){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,n){var i=n(2748),o=n(72430),r=n(12153),s=n(6441),a=n(4932),l=n(89816);r.Icon.set("paragraph",l.default),s.Config.prototype.formatBlock={previewProperties:[]},s.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){var n,o;let r=t.control,s=e.s.current(),a=i.Dom.closest(s,i.Dom.isBlock,e.editor);return null!=(n=null==a?void 0:a.nodeName.toLowerCase())?n:null==(o=r.data)?void 0:o.currentValue},update(e,t){let n=t.control;if(!e.s.current())return!1;let i=t.state.value,r=n.list;return(0,o.isPlainObject)(r)&&r[i.toString()]&&e.o.textIcons&&(t.state.text=r[i.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 n,i;return t.state.value===(null==(i=null==(n=t.control)?void 0:n.args)?void 0:i[0])},isActive:(e,t)=>t.state.value!==e.o.enter&&(0,o.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,n)=>`<${t} style="margin:0;padding:0${function(e,t){let{previewProperties:n}=e.o.formatBlock;if(!n.length)return"";let o=e.createInside.element(t,{style:"display: none"});i.Dom.append(e.editor,o);let r=e.ew.getComputedStyle(o),s=parseFloat(r.fontSize)||16,l=n.map(t=>{let n=r.getPropertyValue(t);return n&&"font-family"===t&&(n=(0,a.withContentFonts)(e,n)),n?`;${t}:${n.replace(/(-?[\d.]+)px/g,(e,t)=>`${parseFloat(t)/s}em`).replace(/"/g,"'")}`:""}).join("");return i.Dom.safeRemove(o),l}(e,t)}"><span>${e.i18n(n)}</span></${t}>`,tooltip:"Insert format block"}},4932:function(e,t,n){n.d(t,{withContentFonts:function(){return s}});let i=new WeakMap,o=new Map,r=0;function s(e,t){let{ed:n,od:o}=e;if(n===o)return t;let s=function(e){let t=i.get(e);if(!t){let{od:n}=e,o={prefix:`jodit-preview-${++r}-`,faces:new Map,pending:!1};i.set(e,o),e.e.on("beforeDestruct",()=>o.faces.forEach(e=>n.fonts.delete(e))),t=o}return t}(e);!function(e,t){if(t.pending)return;t.pending=!0;let{ed:n,od:i}=e;Promise.all(Array.from(n.styleSheets,e=>a(e,n.baseURI))).then(n=>{t.pending=!1,e.isInDestruct||n.flat().forEach(e=>{let n=JSON.stringify(e);if(!t.faces.has(n)){let o=new FontFace(t.prefix+e.family,e.source,e.descriptors);i.fonts.add(o),t.faces.set(n,o)}})})}(e,s);let l=new Set;return n.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 n;let i;try{i=e.cssRules}catch(i){let{href:t}=e;if(!t)return Promise.resolve([]);let n=o.get(t);return n||(n=fetch(t).then(e=>e.text()).then(e=>{let n=document.implementation.createHTMLDocument(""),i=n.createElement("style");return i.textContent=e,n.head.appendChild(i),i.sheet?l(i.sheet.cssRules,t):[]}).catch(()=>[]),o.set(t,n)),n}return l(i,null!=(n=e.href)?n:t)}function l(e,t){return Promise.all(Array.from(e,e=>{var n;let i;if("styleSheet"in e){let{styleSheet:n}=e;return n?a(n,t):[]}return"cssRules"in e?l(e.cssRules,t):e.cssText.startsWith("@font-face")?[(i=t=>e.style.getPropertyValue(t)||void 0,{family:c(e.style.getPropertyValue("font-family")),source:(n=e.style.getPropertyValue("src"),n.replace(/url\(\s*(["']?)(.*?)\1\s*\)/g,(e,n,i)=>{try{return`url("${new URL(i,t).href}")`}catch(t){return e}})),descriptors:{style:i("font-style"),weight:i("font-weight"),stretch:i("font-stretch"),unicodeRange:i("unicode-range")}})]:[]})).then(e=>e.flat())}function c(e){return e.replace(/["']/g,"").trim().toLowerCase()}},96111:function(e,t,n){var i=n(580);n(24630),i.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,n,i)=>(e.s.commitStyle({element:i}),e.synchronizeValues(),!1))})},89816:function(e,t){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,n){var i=n(82758),o=n(12153),r=n(6441),s=n(6950),a=n(28911);r.Config.prototype.fullsize=!1,r.Config.prototype.globalFullSize=!0,o.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 n=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=n:t.state.icon.name=n},tooltip:"Open in fullsize",mode:i.MODE_SOURCE+i.MODE_WYSIWYG}},2169:function(e,t,n){var i=n(2748),o=n(580),r=n(19306),s=n(41180);n(99823);let a=new Set;o.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,n=0,o=0,l=0,c=0,u=!1,d=()=>{let{container:i,events:r}=e;r&&(t?(u||(n=(0,s.css)(i,"height",!0),o=(0,s.css)(i,"width",!0),u=!0),(0,s.css)(i,{height:e.ow.innerHeight,width:e.ow.innerWidth})):u&&((0,s.css)(i,{height:n||"auto",width:o||"auto"}),u=!1))},h=n=>{let{container:o,events:u}=e;if(o){if(void 0===n&&(n=!o.classList.contains("jodit_fullsize")),e.setMod("fullsize",n),e.o.fullsize=n,t=n,o.classList.toggle("jodit_fullsize",n),e.toolbar&&((0,r.isJoditObject)(e)&&e.toolbarContainer&&i.Dom.append(e.toolbarContainer,e.toolbar.container),(0,s.css)(e.toolbar.container,"width","auto")),n?a.add(o):a.delete(o),e.o.globalFullSize&&(1===a.size&&n||0===a.size&&!n)){n&&(l=e.ow.scrollX,c=e.ow.scrollY);let t=o.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",n),t=t.parentNode;d(),n||e.ow.scrollTo(l,c)}u.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",d),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",d)})})},6950:function(e,t){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){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,n){n(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,n){var i=n(82758),o=n(580),r=n(21537),s=n(50911);n(78524);class a extends s.Plugin{afterInit(e){(0,r.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let n=e.o.commandToHotkeys[t];n&&((0,r.isArray)(n)||(0,r.isString)(n))&&e.registerHotkeyToCommand(n,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===i.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",n=>{let i=this.onKeyPress(n),o={shouldStop:!0};if(!1===this.j.e.fire(i+".hotkey",n.type,o))if(o.shouldStop)return t=!0,e.e.stopPropagation("keydown"),!1;else n.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],n=(e.key||String.fromCharCode(e.which)).toLowerCase(),i=[t||n];return["alt","ctrl","shift","meta"].forEach(n=>{e[n+"Key"]&&t!==n&&i.push(n)}),(0,r.normalizeKeyAliases)(i.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:"'"}}}o.pluginSystem.add("hotkeys",a)},16233:function(e,t,n){var i=n(22732),o=n(580),r=n(12153),s=n(6441),a=n(72337);r.Icon.set("hr",a.default),s.Config.prototype.controls.hr={command:"insertHorizontalRule",tooltip:"Insert Horizontal Line"},o.pluginSystem.add("hr",function(e){e.registerButton({name:"hr",group:"insert"}),e.registerCommand("insertHorizontalRule",()=>{var t;let n=e.createInside.element("hr");e.s.insertNode(n,!1,!1);let o=i.Dom.closest(n.parentElement,i.Dom.isBlock,e.editor);o&&i.Dom.isEmpty(o)&&o!==e.editor&&!(null==(t=e.o.dtd)?void 0:t.blockLimits[o.nodeName.toLowerCase()])&&(i.Dom.after(o,n),i.Dom.safeRemove(o));let r=i.Dom.findNotEmptySibling(n,!1);if(i.Dom.isBlock(r))return e.s.setCursorIn(r,!0),!1;if(r||n.parentNode!==e.editor&&!i.Dom.isBlock(i.Dom.findNotEmptySibling(n,!0)))return e.s.setCursorAfter(n),!1;let s=e.createInside.element(e.o.enter);return i.Dom.isTag(s,"br")||i.Dom.append(s,e.createInside.element("br")),i.Dom.after(n,s),e.s.setCursorIn(s),!1})})},72337:function(e,t){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,n){var i=n(6441);i.Config.prototype.iframeBaseUrl="",i.Config.prototype.iframeTitle="Jodit Editor",i.Config.prototype.iframeDoctype="<!DOCTYPE html>",i.Config.prototype.iframeDefaultSrc="about:blank",i.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}",i.Config.prototype.iframeCSSLinks=[],i.Config.prototype.iframeSandbox=null},77469:function(e,t,n){var i=n(82758),o=n(2748),r=n(580),s=n(21537),a=n(76241);n(50963),r.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,n)=>{let i=e||n.iframe.contentWindow.document;if(i.open(),i.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>'),i.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=i.createElement("link");(0,s.attr)(t,"rel","stylesheet"),(0,s.attr)(t,"href",e),i.head&&o.Dom.append(i.head,t),n.e.on(t,"load",()=>n.e.fire("resize"))}),t.iframeStyle){let e=i.createElement("style");e.innerHTML=t.iframeStyle,i.head&&o.Dom.append(i.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let n=e.c.element("iframe");(0,s.css)(n,"display","block"),n.src="about:blank",n.className="jodit-wysiwyg_iframe",(0,s.attr)(n,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,s.attr)(n,"sandbox",t.iframeSandbox),o.Dom.append(e.workplace,n),e.iframe=n;let r=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,s.callPromise)(r,()=>{if(!e.iframe)return!1;let n=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let r=t.editHTMLDocumentMode,l=()=>{(0,s.attr)(n.body,"contenteditable",e.getMode()!==i.MODE_SOURCE&&!e.getReadOnly()||null)},c=(e,t)=>{for(;t>0&&/\s/.test(e.charAt(t-1));)t-=1;return t},u=e=>{e=(0,a.removeBetween)(e,"<style",">","</style>","jodit-box");let t=(0,a.indexOfOpenTag)(e,"body"),n=-1;for(let i=(0,a.indexOfClosingTag)(e,"body",t+1);-1!==i;i=(0,a.indexOfClosingTag)(e,"body",i+1))n=i;if(-1!==t&&-1!==n){let i=n+7,o=e.indexOf(">",t),r=e.slice(t,i);for(let s of(-1!==o&&o<n&&(r=(e=>{e=e.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i,"");let t=(t,n)=>{for(;n.test(e.charAt(t));)t+=1;return t},n=e.indexOf("contenteditable");for(;-1!==n;){let i=t(n+15,/["'\s]/);if("="===e.charAt(i)&&(i=t(i+1,/[\s"']/),e.startsWith("true",i))){i=t(i+4,/["']/);let o=n;return/["']/.test(e.charAt(o-1))&&(o-=1),o=c(e,o),e.slice(0,o)+e.slice(i)}n=e.indexOf("contenteditable",n+1)}return e})(e.slice(t,o))+e.slice(o,i)),["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(i))).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",()=>u(e.o.iframeDoctype+n.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(u(n.documentElement.outerHTML)!==u(t)){var i;let r,a;i=u(t),r=new DOMParser().parseFromString(i,"text/html"),e.e.fire("safeHTML",r.documentElement),a=(0,s.$$)("style.jodit-box",n.head),n.replaceChild(n.adoptNode(r.documentElement),n.documentElement),a.forEach(e=>o.Dom.append(n.head,e)),e.editor=n.body,l(),e.e.fire("prepareWYSIWYGEditor"),e.e.stopPropagation("beforeSetNativeEditorValue")}return!0}return!1},{top:!0})}if(e.editor=n.body,e.e.on("afterSetMode afterInit afterAddPlace",l),"auto"===t.height){n.documentElement&&(0,s.css)(n.documentElement,"overflowY","hidden");let i=e.async.throttle((...n)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&"auto"===t.height){let t=e.ew.getComputedStyle(e.editor),n=parseInt(t.marginTop||"0",10)+parseInt(t.marginBottom||"0",10);(0,s.css)(e.iframe,"height",e.editor.offsetHeight+n)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",i).on([e.iframe,e.ew,n.documentElement],"load",i).on(n,"readystatechange DOMContentLoaded",i),"function"==typeof ResizeObserver){let t=new ResizeObserver(i);t.observe(n.body),e.e.on("beforeDestruct",()=>{t.disconnect()})}}return n.documentElement&&e.e.on(n.documentElement,"mousedown touchend",()=>{e.s.isFocused()||(e.s.focus(),e.editor===n.body&&e.s.setCursorIn(n.body))}).on(e.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",t=>{var n;null==(n=e.events)||n.fire(e.ow,t)}),!1})})})},43687:function(e,t,n){n(6441).Config.prototype.imageCaption={wrapper:{tag:"figure",className:""},inner:null,caption:{tag:"figcaption",className:""}}},84571:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(41180),c=n(20356),u=n(45124);n(43687);var d=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let h=["margin-top","margin-right","margin-bottom","margin-left"],p=new Set([i.KEY_UP,i.KEY_DOWN,i.KEY_LEFT,i.KEY_RIGHT]),f=/^(P|H[1-6]|PRE)$/i,m=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 n=(0,a.getCaptionWrapper)(this.j,e);if(n&&!0!==t){let t=this.__freshCaption(n);return t?this.__unrecorded(()=>this.__restore(t)):this.__uncaption(n,e),null}if(!n&&!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:n}=this,{snapshot:i}=n.history;n.setEditorValue(),n.e.fire("internalUpdate");let o=i.make();return i.transaction(()=>{var i,r;t=this.__fresh=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){var i;i=n[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({},this.__wrap(e)),r=r={before:o},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(r,e))}),i),n.setEditorValue()}),n.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,n;let{j:i}=this,{wrapper:o,inner:s,caption:c}=i.o.imageCaption,u=r.Dom.closest(e,"a",i.editor),d=!u||(null==(t=u.textContent)?void 0:t.trim())||1!==u.getElementsByTagName("img").length?e:u,h=[(0,a.attr)(e,"style"),(0,a.attr)(e,"class")],p=d.parentNode,f=(0,l.cssInline)(e,"width")||((n=(0,a.attr)(e,"width"))?(0,a.isNumeric)(n)?`${n}px`:n:"")||(e.offsetWidth?`${e.offsetWidth}px`:""),m=(0,a.getAlignClasses)(i,e),g=(0,a.getHAlign)(e,m);(0,a.clearHAlign)(e,m);let b=this.__create(o),v=s?this.__create(s):b,_=this.__create(c);_.appendChild(i.createInside.element("br"));let S=this.__insert(b,d);return v!==b&&r.Dom.append(b,v),r.Dom.append(v,[d,_]),w(e,b),f&&((0,a.css)(b,"width",f),(0,a.css)(e,"width","100%")),(0,a.hAlignElement)(b,g,(0,a.getAlignClasses)(i,b)),this.__mark(b),{caption:_,wrapper:b,image:e,target:d,place:p,split:S,attributes:h,parent:b.parentNode,previous:b.previousSibling,next:b.nextSibling,shape:y(b,e)}}__restore(e){var t,n;let{wrapper:i,image:o,target:s,place:l,split:c,attributes:u}=e;if(c)if(c.head||c.tail){let{sel:e}=this.j.s,i=(null==e?void 0:e.rangeCount)?e.getRangeAt(0).startContainer:null,{head:o,tail:l}=c;if(o&&!(l&&i&&r.Dom.isOrContains(l,i)))r.Dom.append(o,[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!=(n=null==o?void 0:o.childNodes)?n:[]),s].forEach(t=>l.insertBefore(t,e)),r.Dom.safeRemove(o)}}else r.Dom.append(l,s),r.Dom.before(i,c.block);else r.Dom.before(i,s);r.Dom.safeRemove(i),(0,a.attr)(o,{style:u[0],class:u[1]})}__uncaption(e,t){var n;let{j:o}=this,s=(0,a.getHAlign)(e,(0,a.getAlignClasses)(o,e)),c=(0,l.cssInline)(e,"width");r.Dom.safeRemove((0,a.getImageCaption)(o,e));let u=null!=(n=r.Dom.closest(t,"a",e))?n:t;if(w(e,t),c&&(0,a.css)(t,"width",c),(0,a.hAlignElement)(t,s,(0,a.getAlignClasses)(o,t)),r.Dom.isBlock(e)&&e.parentNode===o.editor&&o.o.enter.toLowerCase()!==i.BR){let t=o.createInside.element(o.o.enter);r.Dom.before(e,t),r.Dom.append(t,u)}else r.Dom.before(e,u);r.Dom.safeRemove(e)}__create({tag:e,className:t}){return this.j.createInside.element(e,t?{class:t}:{})}__insert(e,t){let{j:n}=this,i=r.Dom.isBlock(e)?r.Dom.closest(t,r.Dom.isBlock,n.editor):null;if(!i||!f.test(i.nodeName))return r.Dom.before(t,e),null;let o=n.ed.createRange();o.setStartBefore(i),o.setEndBefore(t);let s=o.extractContents();o.setStartAfter(t),o.setEndAfter(i);let[l,c]=[s,o.extractContents()].map((e,t)=>{let n=e.firstChild;return!n||r.Dom.isEmpty(n)?null:((0,a.call)(t?r.Dom.after:r.Dom.before,i,n),n)});return r.Dom.before(i,e),r.Dom.safeRemove(i),{block:i,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()===i.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,n=t.c.element("template");n.innerHTML=e.value;let i=e=>(0,a.toArray)(e.querySelectorAll(t.o.imageCaption.wrapper.tag)).filter(e=>(0,a.getCaptionedImage)(t,e)),o=i(n.content),s=this.__fresh&&this.__freshCaption(this.__fresh.wrapper),l=s&&o[i(t.editor).indexOf(s.wrapper)],c=s&&l&&function(e,t,n){var i;let o=(0,a.getCaptionedImage)(e,n),{split:s}=t;if(!o)return null;let l={wrapper:n,image:o,target:null!=(i=r.Dom.closest(o,"a",n))?i:o,place:t.place,split:null,attributes:t.attributes};if(s){let e=s.head?n.previousSibling:null,i=s.tail?n.nextSibling:null;if(s.head&&!r.Dom.isHTMLElement(e)||s.tail&&!r.Dom.isHTMLElement(i))return null;let o=s.block.cloneNode(!0);l.split={block:o,head:e,tail:i},l.place=function(e,t,n){let i=[];for(let n=t;n!==e&&n.parentNode;n=n.parentNode)i.unshift((0,a.toArray)(n.parentNode.childNodes).indexOf(n));return i.reduce((e,t)=>e.childNodes[t],n)}(s.block,t.place,o)}return l}(t,s,l),u=!1;c&&(this.__restore(c),u=!0),o.forEach(e=>{[e,(0,a.getImageCaption)(t,e)].forEach(e=>["contenteditable",g].forEach(t=>{(null==e?void 0:e.hasAttribute(t))&&(e.removeAttribute(t),u=!0)}))}),u&&(e.value=n.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:n}=this,i=(0,a.getCaptionWrapper)(n,e),o=(0,a.getCaptionedImage)(n,i);if(!i||!o||!r.Dom.isEmpty(e)||this.__keepsFocus(e))return;let s=!!(t&&r.Dom.isOrContains(i,t)),l=this.__freshCaption(i);this.__unrecorded(()=>l?this.__restore(l):this.__uncaption(i,o)),s&&n.e.fire("recalcPositionPopup")},1)}__keepsFocus(e){let{j:t}=this,n=e.ownerDocument;if(n.activeElement===e&&(n.hasFocus()||!t.od.hasFocus()))return!0;let i=t.od.activeElement;return!!(i&&i!==t.iframe&&!r.Dom.isOrContains(t.editor,i)&&(r.Dom.isOrContains(t.container,i)||r.Dom.closest(i,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,n=(0,a.getImageCaption)(this.j,(0,a.getCaptionWrapper)(this.j,t));return n&&r.Dom.isOrContains(n,t)?n:null}onBeforeEnter(e){let t=(null==e?void 0:e.shiftKey)?null:this.__caretCaption(),n=(0,a.getCaptionWrapper)(this.j,t);if(!n)return;let{j:i}=this;if(this.__focusEditor(),!r.Dom.isBlock(n))return void i.s.setCursorAfter(n);let o=this.__line();return r.Dom.after(n,o),i.s.setCursorIn(o),i.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)||i.NO_EMPTY_TAGS.has(e.nodeName.toLowerCase())))))return;let{j:n}=this;if(this.__focusEditor(),!r.Dom.isBlock(t))return void n.s.setCursorAfter(t);let o=this.__line();r.Dom.after(t,o),n.s.setCursorIn(o)}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:n,endContainer:i,endOffset:o}=e.range,r=t.childNodes[n];return t===i&&o===n+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 n=this.__caretCaption();n&&(this.__arrow={key:e.key,range:this.j.s.range.cloneRange(),caption:n})}onKeyUp(e){let t=this.__arrow;if(this.__arrow=null,!t||e.key!==t.key||(0,u.isMoved)(this.j,t.range))return;let n=(0,a.getCaptionWrapper)(this.j,t.caption);if(!n)return;let o=t.key===i.KEY_DOWN||t.key===i.KEY_RIGHT,{s}=this.j;if(this.__focusEditor(),!r.Dom.isBlock(n))return void(o?s.setCursorAfter(n):s.setCursorBefore(n));let l=r.Dom.findNotEmptySibling(n,!o);if(r.Dom.isHTMLElement(l))return void s.setCursorIn(l,o);if(r.Dom.isText(l))return void(o?s.setCursorBefore(l):s.setCursorAfter(l));let c=this.__line();(0,a.call)(o?r.Dom.after:r.Dom.before,n,c),s.setCursorIn(c),this.j.synchronizeValues()}onBeforeCommand(e){let t=e.toLowerCase();if(m.has(t)&&this.__caretCaption())return!1;let n="undo"===t&&this.__fresh?this.__freshCaption(this.__fresh.wrapper):null;if(n)return this.__unrecorded(()=>{this.__restore(n),this.j.history.snapshot.restore(n.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 n;h.forEach(n=>{let i=(0,l.cssInline)(e,n);i&&((0,a.css)(t,n,i),(0,a.css)(e,n,""))}),(null==(n=(0,a.attr)(e,"style"))?void 0:n.trim())||(0,a.attr)(e,"style",null)}d([(0,o.watch)(":toggleImageCaption")],v.prototype,"onToggleImageCaption",null),d([(0,o.watch)([":change",":afterInit",":afterSetMode",":changePlace"]),(0,o.debounce)()],v.prototype,"onChange",null),d([(0,o.watch)([":input",":keyup",":afterPaste"])],v.prototype,"onInput",null),d([(0,o.watch)(":afterGetValueFromEditor")],v.prototype,"onAfterGetValueFromEditor",null),d([(0,o.watch)(":changePlace")],v.prototype,"onChangePlace",null),d([o.autobind],v.prototype,"__onMouseDown",null),d([o.autobind],v.prototype,"__onFocusOut",null),d([o.autobind],v.prototype,"__onMouseUp",null),d([(0,o.watch)(":beforeEnter")],v.prototype,"onBeforeEnter",null),d([(0,o.watch)(":beforeInsertNode")],v.prototype,"onBeforeInsertNode",null),d([(0,o.watch)(":beforeCommandDelete")],v.prototype,"onBeforeCommandDelete",null),d([(0,o.watch)(":keydown")],v.prototype,"onKeyDown",null),d([(0,o.watch)(":keyup")],v.prototype,"onKeyUp",null),d([(0,o.watch)(":beforeCommand")],v.prototype,"onBeforeCommand",null),d([o.autobind],v.prototype,"__onSelectAll",null),s.pluginSystem.add("imageCaption",v)},85745:function(e,t,n){n(6441).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},80763:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(50911),c=n(74569);function u(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}n(85745);var d=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};let h="__jodit_imageprocessor_binded",p=h+"blob-id",f="jodit-wysiwyg_image-selected",m=new Set(["img","jodit","jodit-media"]);class g extends l.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange),(0,s.getContainer)(e,"image-processor","style",!0).textContent=`.jodit-wysiwyg.${f}::selection,.jodit-wysiwyg.${f} *:not(img)::selection{background:transparent}`}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(f);let t=(0,o.cached)(e,"buffer"),n=null==t?void 0:t.get(p);if(t&&n){for(let e of Object.keys(n))URL.revokeObjectURL(e);t.delete(p)}}onAfterGetValueFromEditor(e,t){if(t!==i.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let n=t.buffer.get(p);if(n)for(let t of Object.keys(n))for(;e.value.includes(t);)e.value=e.value.replace(t,n[t])}onSelectionChange(){let{jodit:e}=this;e.editor.classList.toggle(f,function(e){var t;let{sel:n}=e.s;if(!n||!n.rangeCount)return!1;let{startContainer:i,startOffset:o,endContainer:s,endOffset:l}=n.getRangeAt(0),c=i.childNodes[o];return i===s&&l===o+1&&(r.Dom.isTag(c,m)||!!(null!=(t=(0,a.getWrappedMedia)(e,c))?t:(0,a.getCaptionedImage)(e,c)))&&r.Dom.isOrContains(e.editor,i)}(e))}afterChange(e){var t;return(t=function*(){let{jodit:e}=this;e.editor&&(0,a.$$)("img",e.editor).forEach(t=>{(0,a.dataBind)(t,h)||((0,a.dataBind)(t,h,!0),t.complete||e.e.on(t,"load",function n(){var i;e.isInDestruct||null==(i=e.e)||i.fire("resize"),e.e.off(t,"load",n)}),t.src&&/^data:/.test(t.src)&&function(e,t){let n;if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||"u"<typeof ArrayBuffer||"u"<typeof URL)return;let i=t.src;try{n=(0,c.dataURItoBlob)(i)}catch(e){return}t.src=URL.createObjectURL(n),e.e.fire("internalUpdate");let{buffer:o}=e,r=o.get(p)||{};r[t.src]=i,e.buffer.set(p,r)}(e,t),e.e.on(t,"mousedown touchstart",()=>{var n;(function(e){var t;for(let n of["previousSibling","nextSibling"]){let o=e[n];for(;r.Dom.isText(o)&&!(null==(t=o.nodeValue)?void 0:t.replace((0,i.INVISIBLE_SPACE_REG_EXP)(),""));){let e=o[n];r.Dom.safeRemove(o),o=e}}})(t),e.s.select(null!=(n=(0,a.getCaptionWrapper)(e,t))?n:t)}))})},function(){var e=this,n=arguments;return new Promise(function(i,o){var r=t.apply(e,n);function s(e){u(r,i,o,s,a,"next",e)}function a(e){u(r,i,o,s,a,"throw",e)}s(void 0)})}).call(this)}}d([(0,o.watch)(":afterGetValueFromEditor")],g.prototype,"onAfterGetValueFromEditor",null),d([(0,o.watch)(":beforeSetElementValue")],g.prototype,"onBeforeSetElementValue",null),d([o.autobind],g.prototype,"onSelectionChange",null),d([(0,o.watch)([":change",":afterInit",":changePlace"]),(0,o.debounce)()],g.prototype,"afterChange",null),s.pluginSystem.add("imageProcessor",g)},97536:function(e,t,n){n(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,n){var i=n(65478),o=n(2748),r=n(580),s=n(21537),a=n(20356),l=n(62843);n(97536);var c=n(59436),u=n(53636),d=n(10263),h=n(94575),p=n(34755);function f(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}var m=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class g extends a.Plugin{get form(){return new c.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,u.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,d.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"]}),n=this.__buttons;return n.check.onAction(()=>{(0,p.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),n.remove.onAction(()=>{var n;let{sourceImage:i}=this.state,o=null!=(n=(0,s.getCaptionWrapper)(e,i))?n:i,r=e.s.createRange();r.setStartBefore(o),r.collapse(!0),e.s.removeNode(o),t.close(),e.s.selectRange(r)}),n.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[n.cancel,n.remove],n.check]),t.e.on(t,"afterClose",()=>{let{sourceImage:t}=this.state;if(e.isInDestruct||!o.Dom.isOrContains(e.editor,t))return;let n=(0,s.getCaptionWrapper)(e,t),i=(0,s.getImageCaption)(e,n);if(i&&o.Dom.isEmpty(i))return void e.s.setCursorIn(i);let r=null!=n?n: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",n=>{let i=n.target;if(o.Dom.isTag(i,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",i))return;t.state.sourceImage=i,t.state.image=i.cloneNode(!0),e.o.readonly||(n.stopImmediatePropagation(),n.preventDefault(),t.open())}else n.stopImmediatePropagation(),e.s.select(i)})}).on("openImageProperties.imageproperties",e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}onStateValuesImageSrcChange(){var e;return(e=function*(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{yield 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()}},function(){var t=this,n=arguments;return new Promise(function(i,o){var r=e.apply(t,n);function s(e){f(r,i,o,s,a,"next",e)}function a(e){f(r,i,o,s,a,"throw",e)}s(void 0)})}).call(this)}beforeDestruct(e){var t,n,o;Object.values(null!=(t=(0,i.cached)(this,"__buttons"))?t:{}).forEach(e=>e.destruct()),null==(n=(0,i.cached)(this,"dialog"))||n.destruct(),null==(o=(0,i.cached)(this,"form"))||o.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([i.cache],g.prototype,"form",null),m([i.cache],g.prototype,"dialog",null),m([i.cache],g.prototype,"__buttons",null),m([(0,i.watch)("state.image")],g.prototype,"onStateValuesImageSrcChange",null),r.pluginSystem.add("imageProperties",g)},51642:function(e,t,n){n.d(t,{readAlign:function(){return o}});var i=n(25726);function o(e,t,n){let o=(0,i.getHAlign)(e,n);t.align="normal"===o?"":o}},94575:function(e,t,n){n.d(t,{readValuesFromImage:function(){return h}});var i=n(25726),o=n(29960),r=n(41180),s=n(68645),a=n(51642),l=n(75595),c=n(47749),u=n(32566);function d(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function h(e,t){var n;return(n=function*(){let{sourceImage:n,values:d}=t,h=(0,s.getCaptionWrapper)(e,n),p=null!=h?h:n;return d.imageCaption=!!h,(0,a.readAlign)(p,d,(0,i.getAlignClasses)(e,p)),d.borderRadius=parseInt((0,r.cssInline)(n,"border-radius")||"0",10)||0,d.id=(0,o.attr)(n,"id")||"",d.imageTitle=(0,o.attr)(n,"title")||"",d.imageAlt=(0,o.attr)(n,"alt")||"",d.style=(0,o.attr)(n,"style")||"",d.classes=((0,o.attr)(n,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,c.readMargins)(p,d,t),(0,l.readLink)(t,e,d),d.imageSrc=(0,o.attr)(n,"src")||"",(0,u.readSizes)(n,d,t,h)},function(){var e=this,t=arguments;return new Promise(function(i,o){var r=n.apply(e,t);function s(e){d(r,i,o,s,a,"next",e)}function a(e){d(r,i,o,s,a,"throw",e)}s(void 0)})})()}},75595:function(e,t,n){n.d(t,{readLink:function(){return r}});var i=n(2748),o=n(29960);function r(e,t,n){let r=i.Dom.closest(e.sourceImage,"a",t.editor);r?(n.imageLink=(0,o.attr)(r,"href")||"",n.imageLinkOpenInNewTab="_blank"===(0,o.attr)(r,"target")):(n.imageLink="",n.imageLinkOpenInNewTab=!1)}},47749:function(e,t,n){n.d(t,{readMargins:function(){return o}});var i=n(12475);function o(e,t,n){let o=!0,r=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(n=>{let s=e.style.getPropertyValue((0,i.kebabCase)(n));if(!s){r=!0,t[n]=0;return}/^[0-9]+(px)?$/.test(s)&&(s=parseInt(s,10)),t[n]=s,(r&&t[n]||o&&"marginTop"!==n&&t[n]!==t.marginTop)&&(o=!1)}),n.marginIsLocked=o}},32566:function(e,t,n){n.d(t,{readSizes:function(){return l}});var i=n(29807),o=n(29960),r=n(41180),s=n(14415);function a(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}function l(e,t,n,l){var c;return(c=function*(){try{yield e.decode()}catch(e){}let a=(0,r.css)(null!=l?l:e,"width",!0)||(0,o.attr)(e,"width")||!1,c=(0,r.css)(e,"height",!0)||(0,o.attr)(e,"height")||!1;t.imageWidth=!1!==a?(0,s.normalSizeFromString)(a):e.offsetWidth||e.naturalWidth,(0,i.isNumeric)(t.imageWidth)?t.imageHeight=!1!==c?(0,s.normalSizeFromString)(c):e.offsetHeight||e.naturalHeight:t.imageHeight=c||"";let{imageWidth:u,imageHeight:d}=t,h=parseFloat(u.toString());if(!(0,i.isNumeric)(u)||!(0,i.isNumeric)(d)){n.sizeIsLocked=!1;return}if(!1===c){t.imageHeight=Math.round(h/n.ratio),n.sizeIsLocked=!0;return}n.sizeIsLocked=1>Math.abs(h-parseFloat(d.toString())*n.ratio)},function(){var e=this,t=arguments;return new Promise(function(n,i){var o=c.apply(e,t);function r(e){a(o,n,i,r,s,"next",e)}function s(e){a(o,n,i,r,s,"throw",e)}r(void 0)})})()}},59436:function(e,t,n){n.d(t,{UIImagePropertiesForm:function(){return p}});var i=n(65478),o=n(87325),r=n(2748),s=n(21537),a=n(62405),l=n(12153),c=n(92762),u=n(35105),d=n(29827),h=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,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 n=t.getElm(e);if(n)return n}return null}render(){return`<form>
130
130
  <div class="jodit-grid jodit-grid_xs-column">
131
131
  <div class="jodit_col-lg-2-5 jodit_col-xs-5-5">
132
132
  <div class="&__view-box">
@@ -224,7 +224,7 @@
224
224
  pk pl pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sj sk
225
225
  sl sm sn so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt
226
226
  tv tw tz ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw
227
- `.trim().split(/\s+/));n.d(t,["TLDS",0,i])},58970:function(e,t,n){n.d(t,{findTypedLink:function(){return u}});var i=n(26049),o=n(67272);let r=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,s=new Set(["(","[",'"',"'","“","‘","<"]),a=new Set([".",",",";",":","!","?",'"',"'","”","’",">"]),l={")":"(","]":"["},c=/^[a-z\d][a-z\d-]{0,62}$/i;function u(e,t,n,u){var d;let h,p,f,m,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 n=e[t-1],i=l[n];if(a.has(n)||i&&!e.slice(g,t-1).includes(i))t-=1;else break}let b=(d=e.slice(g,t),h=d.replace(/^mailto:/i,""),r.test(h)?`mailto:${h}`:/^www\.[^\s.]+\.\S+$/i.test(d)||(m=(f=((p=d.search(/[/?#]/))<0?d:d.slice(0,p)).split("."))[f.length-1],f.length>1&&f.every(e=>c.test(e)&&!e.endsWith("-"))&&(o.TLDS.has(m)||n.includes(m))&&!u.includes(m)&&/[a-z]/i.test(f[0]))?`https://${d}`:/^[a-z][a-z\d+.-]*:\/\//i.test(d)&&(0,i.isURL)(d)?d:"");return b?[g,t,b]:null}n.d(t,["EMAIL",0,r])},757:function(e,t,n){var i=n(6441);i.Config.prototype.mediaFakeTag="jodit-media",i.Config.prototype.mediaInFakeBlock=!0,i.Config.prototype.mediaBlocks=["video","audio"],i.Config.prototype.mediaWrappers={}},20071:function(e,t,n){var i=n(82758),o=n(2748),r=n(580),s=n(76241),a=n(43555),l=n(41180);n(757),r.pluginSystem.add("media",function(e){let t="jodit_fake_wrapper",{mediaFakeTag:n,mediaBlocks:c,mediaInFakeBlock:u,mediaWrappers:d}=e.options,h=Object.values(d);h.length&&e.e.on("afterInit",()=>{let t=e=>[...new Set(e)].join(","),n=({tag:e,className:t})=>`.jodit-wysiwyg ${e}.${t}`,o=t(h.filter(({tag:e})=>i.IS_INLINE.test(e)).map(n)),s=t(h.flatMap(e=>c.map(t=>`${n(e)}>${t}`)));(0,r.getContainer)(e,"media-wrappers","style",!0).innerHTML=(o?`:where(${o}){display:inline-block}`:"")+`${s}{pointer-events:none}`}),(u||Object.keys(d).length)&&e.e.on("afterGetValueFromEditor",e=>{e.value=(0,s.unwrapMarkedTags)(e.value,n,`data-${t}`)}).on("change afterInit afterSetMode changePlace",e.async.debounce(()=>{e.isDestructed||e.getMode()===i.MODE_SOURCE||(0,a.$$)(c.join(","),e.editor).forEach(i=>{(0,a.dataBind)(i,t)||((0,a.dataBind)(i,t,!0),(i=>{var r;if(i.parentNode&&(0,a.attr)(i.parentNode,"data-jodit_iframe_wrapper"))i=i.parentNode;else if(d[i.nodeName.toLowerCase()])i=null!=(r=(0,a.getMediaWrapper)(e,i))?r:(0,a.wrapMedia)(e,i);else{if(!u)return;let r=i,s=e.createInside.element(n,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,[`data-${t}`]:1});(0,a.attr)(s,"style",(0,a.attr)(i,"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),i.parentNode&&o.Dom.before(i,s),o.Dom.append(s,i),i=s}e.e.off(i,"mousedown.select touchstart.select").on(i,"mousedown.select touchstart.select",()=>{e.s.select(i)})})(i))})},e.defaultTimeout))})},37585:function(e,t,n){var i=n(82758),o=n(21537),r=n(41180),s=n(6441),a=n(11676),l=n(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:[]},"\n",{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:[]},"\n",{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:i.MODE_SOURCE+i.MODE_WYSIWYG,popup:(e,t,n,i)=>{let s=i.control.data;return void 0===s&&(s={toolbar:(0,l.makeCollection)(e),rebuild:()=>{var t,n;if(i){let l=e.e.fire("getDiffButtons.mobile",i.closest(a.ToolbarCollection));if(l&&s){s.toolbar.build((0,o.splitArray)(l));let i=(null==(n=null==(t=e.toolbar)?void 0:t.firstButton)?void 0:n.container.offsetWidth)||36;(0,r.css)(s.toolbar.container,"width",(i+4)*3)}}}},i.control.data=s),s.rebuild(),s.toolbar},tooltip:"Show all"}},32309:function(e,t,n){var i=n(2748),o=n(580),r=n(21537),s=n(70799),a=n(43649);n(37585);let l=e=>"|"===e||"---"===e||"\n"===e;function c(e,t){var n;let i=(0,a.flatButtonsSet)((0,r.splitArray)(t.o.buttons),t),o=t.getRegisteredButtonGroups(),s=!1,c=!1,u=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...null!=(n=o[t.group])?n:[]],r=e.filter(e=>i.has(e));r.length!==e.length&&(s=!0),u.push(...r)}else l(t)?u.push(t):"dots"===t?c=!0:i.has(t)?u.push(t):s=!0;if(!s)return e;let d=[];for(let e of u)l(e)&&(0===d.length||l(d[d.length-1]))||d.push(e);for(;d.length&&l(d[d.length-1]);)d.pop();if(c){let e=(0,a.flatButtonsSet)(d,t);(0,r.toArray)(i).some(t=>!e.has(t))&&d.push("dots")}return d}o.pluginSystem.add("mobile",function(e){let t=0,n=(0,r.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",n=>{if(n.changedTouches&&n.changedTouches.length){let i=new Date().getTime(),o=i-t;o>e.o.mobileTapTimeout&&(t=i,o<1.5*e.o.mobileTapTimeout&&e.s.insertCursorAtPoint(n.clientX,n.clientY))}}),e.e.on("getDiffButtons.mobile",t=>{if(t===e.toolbar){let t=(0,a.flatButtonsSet)((0,r.splitArray)(e.o.buttons),e),i=(0,a.flatButtonsSet)(n,e);return(0,r.toArray)(t).reduce((e,t)=>(i.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 o=(()=>{if(e.isFullSize)return(0,r.splitArray)(e.o.buttons);let t=function(e){var t;let{toolbar:n}=e.o;if((0,s.isString)(n)||i.Dom.isHTMLElement(n)){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)})();o.toString()!==n.toString()&&(n=o,e.e.fire("closeAllPopups"),null==(t=e.toolbar)||t.setRemoveButtons(e.o.removeButtons).build(n.concat(e.o.extraButtons)))}).on(e.ow,"load resize",()=>e.e.fire("recalcAdaptive"))})},57951:function(e,t,n){var i=n(86583),o=n(12153),r=n(6441),s=n(13465),a=n(50267),l=n(83086);let c="start",u=(e,t,{control:n})=>{var o;let r=`button${n.command}`,s=null!=(o=n.args&&n.args[0])?o:(0,i.dataBind)(e,r);s===c?(0,l.openStartDialog)(e):((0,i.dataBind)(e,r,s),e.execCommand(n.command,!1,"default"===s?null:s))};o.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:u},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:u,isChildDisabled:(e,t)=>{var n;return(null==(n=t.control.args)?void 0:n[0])===c&&!(0,l.closestOrderedList)(e)}}},13465:function(e,t){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){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,n){var i=n(65478),o=n(580),r=n(50911);n(57951);class s extends r.Plugin{afterInit(e){e.registerCommand("insertUnorderedList",this.onCommand).registerCommand("insertOrderedList",this.onCommand)}onCommand(e,t,n){return this.jodit.s.commitStyle({element:"insertunorderedlist"===e?"ul":"ol",attributes:{style:{listStyleType:null!=n?n:null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}constructor(){super(...arguments),this.buttons=[{name:"ul",group:"list"},{name:"ol",group:"list"}]}}!function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([i.autobind],s.prototype,"onCommand",null),o.pluginSystem.add("orderedList",s)},83086:function(e,t,n){n.d(t,{closestOrderedList:function(){return a},openStartDialog:function(){return l}});var i=n(2748),o=n(29960),r=n(62843),s=n(2525);function a(e){let t=e.s.current();return t?i.Dom.closest(t,"ol",e.editor):null}function l(e){let t=a(e);if(!t)return;let n=e.dlg({resizable:!1,closeOnClickOverlay:!0}),i=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,[i])]);l.container.classList.add("jodit-dialog_alert"),l.onSubmit(({start:r})=>{let s=""===r?1:parseInt(r,10);if(isNaN(s))return i.focus(),!1;n.close(),(0,o.attr)(t,"start",1===s?null:s),e.synchronizeValues()}),e.s.save(),n.e.on(n,"afterClose",()=>{e.s.focus(),e.s.restore()}),n.setFooter([(0,r.Button)(e,"cancel","Cancel").onAction(()=>n.close()),(0,r.Button)(e,"ok","Apply","primary").onAction(()=>l.submit())]),n.open(l,e.i18n("Start numbering at"),!0,!0),i.focus(),i.nativeInput.select()}},71842:function(e,t,n){var i=n(82758),o=n(6441);o.Config.prototype.askBeforePasteFromWord=!0,o.Config.prototype.processPasteFromWord=!0,o.Config.prototype.defaultActionOnPasteFromWord=null,o.Config.prototype.pasteFromWordActionList=[{value:i.INSERT_AS_HTML,text:"Keep"},{value:i.INSERT_AS_TEXT,text:"Clean"},{value:i.INSERT_ONLY_TEXT,text:"Insert only Text"}]},31571:function(e,t,n){n.d(t,{pasteFromWord:function(){return c}});var i=n(82758),o=n(65478),r=n(580),s=n(21537),a=n(50911);n(71842);var l=n(117);class c extends a.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,n){let{j:i}=this,{processPasteFromWord:o,askBeforePasteFromWord:r,defaultActionOnPasteFromWord:a,defaultActionOnPaste:c,pasteFromWordActionList:u}=i.o;return!!(o&&(0,s.isHtmlFromWord)(t))&&(r?(0,l.askInsertTypeDialog)(i,"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",i=>{this.insertFromWordByType(e,t,i,n)},u):this.insertFromWordByType(e,t,a||c,n),!0)}insertFromWordByType(e,t,n,o){var r;switch(n){case i.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 i.INSERT_AS_TEXT:t=(0,s.cleanFromWord)(t);break;case i.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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([(0,o.watch)(":processHTML")],c.prototype,"processWordHTML",null),r.pluginSystem.add("pasteFromWord",c)},85407:function(e,t,n){var i=n(82758),o=n(2748),r=n(580),s=n(21537),a=n(20356),l=n(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(),o.Dom.append(this.container,this.listBox),o.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 o.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"),o.Dom.safeRemove(this.previewBox),o.Dom.safeRemove(this.listBox),o.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!==[i.KEY_UP,i.KEY_DOWN,i.KEY_ENTER].indexOf(e.key)){if(e.key===i.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===i.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===i.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,n)=>{t.classList.remove("jodit_active"),e===n&&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&&o.Dom.detach(this.listBox),this.previewBox&&o.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let n=this.j.c.element("a");n.textContent=t+1+". "+e.replace((0,i.SPACE_REG_EXP)(),""),this.j.e.on(n,"keydown",this.onKeyDown),(0,s.attr)(n,"href","#"),(0,s.attr)(n,"data-index",t.toString()),(0,s.attr)(n,"tab-index","-1"),this.listBox&&o.Dom.append(this.listBox,n)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))}}}r.pluginSystem.add("pasteStorage",c)},84380:function(e,t,n){var i=n(82758),o=n(6441),r=n(117);function s(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}o.Config.prototype.askBeforePasteHTML=!0,o.Config.prototype.processPasteHTML=!0,o.Config.prototype.scrollToPastedContent=!0,o.Config.prototype.pasteExcludeStripTags=["br","hr"],o.Config.prototype.pasteHTMLActionList=[{value:i.INSERT_AS_HTML,text:"Keep"},{value:i.INSERT_AS_TEXT,text:"Insert as Text"},{value:i.INSERT_ONLY_TEXT,text:"Insert only Text"}],o.Config.prototype.memorizeChoiceWhenPasteFragment=!1,o.Config.prototype.nl2brInPlainText=!0;let a="pasteStorage";o.Config.prototype.controls.paste={tooltip:"Paste from clipboard",exec(e,t,n){var o;return(o=function*(e,t,{control:n}){var o;if(n.name===a)return void e.execCommand("showPasteStorage");e.s.focus();let s="",l=!0;if(navigator.clipboard){try{let e=yield navigator.clipboard.read();if(e&&e.length){let t=e[0],n=(null==(o=t.types)?void 0:o.includes(i.TEXT_HTML))?i.TEXT_HTML:i.TEXT_PLAIN,r=yield t.getType(n);s=yield new Response(r).text()}l=!1}catch(e){i.IS_PROD}if(l)try{s=yield navigator.clipboard.readText(),l=!1}catch(e){i.IS_PROD}}l&&(l=0===(s=e.buffer.get(i.CLIPBOARD_ID)||"").length);let c=e.value;l?(e.ed.execCommand("paste"),(l=c===e.value)||e.e.fire("afterPaste")):s.length?((0,r.pasteInsertHtml)(null,e,s),e.e.fire("afterPaste")):l&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},function(){var e=this,t=arguments;return new Promise(function(n,i){var r=o.apply(e,t);function a(e){s(r,n,i,a,l,"next",e)}function l(e){s(r,n,i,a,l,"throw",e)}a(void 0)})}).apply(this,arguments)},list:{[a]:"Paste Storage"},isChildDisabled(e){return 2>e.e.fire("pasteStorageList")}}},117:function(e,t,n){n.d(t,{askInsertTypeDialog:function(){return h},getAllTypes:function(){return d},pasteInsertHtml:function(){return u},removeGoogleDocsWrapper:function(){return c}});var i=n(82758),o=n(2748),r=n(4510),s=n(27613),a=n(76241),l=n(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(o.Dom.unwrap),t.innerHTML}function u(e,t,n){var i;let r,l;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let u=t.e.fire("beforePasteInsert",n);!(0,s.isVoid)(u)&&((0,s.isString)(u)||(0,s.isNumber)(u)||o.Dom.isNode(u))&&(n=u),(0,s.isString)(n)&&(i=c(n),-1!==(r=(i=(0,a.removeTagsByPrefix)(i,["<meta"])).search(/<!--StartFragment-->/i))&&(i=i.substring(r+20)),-1!==(l=i.search(/<!--EndFragment-->/i))&&(i=i.substring(0,l)),n=i),t.s.insertHTML(n)}function d(e){let t=e.types,n="";if((0,s.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(let e=0;e<t.length;e+=1)n+=t[e]+";";else n=(t||i.TEXT_PLAIN).toString()+";";return n}function h(e,t,n,i,o){if(!1===e.e.fire("beforeOpenPasteDialog",t,n,i,o))return;let r=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(n)),s=o.map(({text:t,value:n})=>(0,l.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{r.close(),i(n)}));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,n,i,o),r}},79799:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(20356);n(84380);var c=n(117),u=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class d 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),n=[null==t?void 0:t.getData(i.TEXT_PLAIN),null==t?void 0:t.getData(i.TEXT_HTML),null==t?void 0:t.getData(i.TEXT_RTF)];for(let t of n)if((0,a.isHTML)(t)&&(this.j.e.fire("processHTML",e,t,{plain:n[0],html:n[1],rtf:n[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=(0,a.getDataTransfer)(e),n=(null==t?void 0:t.getData(i.TEXT_HTML))||(null==t?void 0:t.getData(i.TEXT_PLAIN));if(t&&n&&""!==(0,a.trim)(n)){let i=this.j.e.fire("processPaste",e,n,(0,c.getAllTypes)(t));void 0!==i&&(n=i),((0,a.isString)(n)||r.Dom.isNode(n))&&this.__insertByType(e,n,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let n=this.pasteStack.find(e=>e.html===t);if(n)return this.__insertByType(e,t,n.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let n=(0,c.askInsertTypeDialog)(this.j,"Your code is similar to HTML. Keep as HTML?","Paste as HTML",n=>{this._isDialogOpened=!1,this.__insertByType(e,t,n)},this.j.o.pasteHTMLActionList);return n&&(this._isDialogOpened=!0,n.e.on("beforeClose",()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,n){if(this.pasteStack.push({html:t,action:n}),(0,a.isString)(t))switch(this.j.buffer.set(i.CLIPBOARD_ID,t),n){case i.INSERT_CLEAR_HTML:t=(0,a.cleanFromWord)((0,c.removeGoogleDocsWrapper)(t));break;case i.INSERT_ONLY_TEXT:t=(0,a.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case i.INSERT_AS_TEXT:t=(0,a.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,a.nl2br)(t));break;default:{let i=this.j.e.fire("onCustomPasteHTMLOption",n,t,e);"string"==typeof i&&(t=i)}}(0,c.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,n){if(n===i.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}}u([o.autobind],d.prototype,"onPaste",null),u([o.autobind],d.prototype,"onProcessPasteReplaceNl2Br",null),s.pluginSystem.add("paste",d)},61926:function(e,t,n){var i=n(6441);i.Config.prototype.showPlaceholder=!0,i.Config.prototype.placeholder="Type something",i.Config.prototype.useInputsPlaceholder=!0},59451:function(e,t,n){n.d(t,{isEditorEmpty:function(){return d}});var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(78116),l=n(29960),c=n(41180),u=n(20356);function d(e){var t;return function(e){var t;if(!e.firstChild)return!0;let n=e.firstChild;if(r.Dom.isTag(n,"br")&&!r.Dom.next(n,Boolean,e))return!0;if(i.INSEPARABLE_TAGS.has(null==(t=n.nodeName)?void 0:t.toLowerCase())||/^(TABLE)$/i.test(n.nodeName))return!1;let o=r.Dom.next(n,e=>e&&!r.Dom.isEmptyTextNode(e),e);return r.Dom.isText(n)&&!o?r.Dom.isEmptyTextNode(n):!o&&r.Dom.each(n,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(i.NBSP_SPACE))}n(61926);class h 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,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,n=0,i=e.s.current(),o=i&&r.Dom.closest(i,r.Dom.isBlock,e.editor)||e.editor,s=e.ew.getComputedStyle(o),l=e.ew.getComputedStyle(e.editor);r.Dom.append(e.workplace,this.placeholderElm);let{firstChild:u}=e.editor;if(r.Dom.isElement(u)&&!(0,a.isMarker)(u)){let i=e.ew.getComputedStyle(u);t=parseInt(i.getPropertyValue("margin-top"),10),n=parseInt(i.getPropertyValue("margin-left"),10),(0,c.css)(this.placeholderElm,{fontFamily:i.getPropertyValue("font-family"),fontSize:parseInt(i.getPropertyValue("font-size"),10),lineHeight:i.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),n)})}hide(){r.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){if(e.getRealMode()!==i.MODE_WYSIWYG)return void this.hide();d(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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([(0,o.debounce)(e=>e.defaultTimeout/10,!0)],h.prototype,"toggle",null),s.pluginSystem.add("placeholder",h)},18363:function(e,t,n){n(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
227
+ `.trim().split(/\s+/));n.d(t,["TLDS",0,i])},58970:function(e,t,n){n.d(t,{findTypedLink:function(){return u}});var i=n(26049),o=n(67272);let r=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,s=new Set(["(","[",'"',"'","“","‘","<"]),a=new Set([".",",",";",":","!","?",'"',"'","”","’",">"]),l={")":"(","]":"["},c=/^[a-z\d][a-z\d-]{0,62}$/i;function u(e,t,n,u){var d;let h,p,f,m,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 n=e[t-1],i=l[n];if(a.has(n)||i&&!e.slice(g,t-1).includes(i))t-=1;else break}let b=(d=e.slice(g,t),h=d.replace(/^mailto:/i,""),r.test(h)?`mailto:${h}`:/^www\.[^\s.]+\.\S+$/i.test(d)||(m=(f=((p=d.search(/[/?#]/))<0?d:d.slice(0,p)).split("."))[f.length-1],f.length>1&&f.every(e=>c.test(e)&&!e.endsWith("-"))&&(o.TLDS.has(m)||n.includes(m))&&!u.includes(m)&&/[a-z]/i.test(f[0]))?`https://${d}`:/^[a-z][a-z\d+.-]*:\/\//i.test(d)&&(0,i.isURL)(d)?d:"");return b?[g,t,b]:null}n.d(t,["EMAIL",0,r])},757:function(e,t,n){var i=n(6441);i.Config.prototype.mediaFakeTag="jodit-media",i.Config.prototype.mediaInFakeBlock=!0,i.Config.prototype.mediaBlocks=["video","audio"],i.Config.prototype.mediaWrappers={}},20071:function(e,t,n){var i=n(82758),o=n(2748),r=n(580),s=n(76241),a=n(43555),l=n(41180);n(757),r.pluginSystem.add("media",function(e){let t="jodit_fake_wrapper",{mediaFakeTag:n,mediaBlocks:c,mediaInFakeBlock:u,mediaWrappers:d}=e.options,h=Object.values(d);h.length&&e.e.on("afterInit",()=>{let t=e=>[...new Set(e)].join(","),n=({tag:e,className:t})=>`.jodit-wysiwyg ${e}.${t}`,o=t(h.filter(({tag:e})=>i.IS_INLINE.test(e)).map(n)),s=t(h.flatMap(e=>c.map(t=>`${n(e)}>${t}`)));(0,r.getContainer)(e,"media-wrappers","style",!0).innerHTML=(o?`:where(${o}){display:inline-block}`:"")+`${s}{pointer-events:none}`}),(u||Object.keys(d).length)&&e.e.on("afterGetValueFromEditor",e=>{e.value=(0,s.unwrapMarkedTags)(e.value,n,`data-${t}`)}).on("change afterInit afterSetMode changePlace",e.async.debounce(()=>{e.isDestructed||e.getMode()===i.MODE_SOURCE||(0,a.$$)(c.join(","),e.editor).forEach(i=>{(0,a.dataBind)(i,t)||((0,a.dataBind)(i,t,!0),(i=>{var r;if(i.parentNode&&(0,a.attr)(i.parentNode,"data-jodit_iframe_wrapper"))i=i.parentNode;else if(d[i.nodeName.toLowerCase()])i=null!=(r=(0,a.getMediaWrapper)(e,i))?r:(0,a.wrapMedia)(e,i);else{if(!u)return;let r=i,s=e.createInside.element(n,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,[`data-${t}`]:1});(0,a.attr)(s,"style",(0,a.attr)(i,"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),i.parentNode&&o.Dom.before(i,s),o.Dom.append(s,i),i=s}e.e.off(i,"mousedown.select touchstart.select").on(i,"mousedown.select touchstart.select",()=>{e.s.select(i)})})(i))})},e.defaultTimeout))})},37585:function(e,t,n){var i=n(82758),o=n(21537),r=n(41180),s=n(6441),a=n(11676),l=n(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:[]},"\n",{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:[]},"\n",{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:i.MODE_SOURCE+i.MODE_WYSIWYG,popup:(e,t,n,i)=>{let s=i.control.data;return void 0===s&&(s={toolbar:(0,l.makeCollection)(e),rebuild:()=>{var t,n;if(i){let l=e.e.fire("getDiffButtons.mobile",i.closest(a.ToolbarCollection));if(l&&s){s.toolbar.build((0,o.splitArray)(l));let i=(null==(n=null==(t=e.toolbar)?void 0:t.firstButton)?void 0:n.container.offsetWidth)||36;(0,r.css)(s.toolbar.container,"width",(i+4)*3)}}}},i.control.data=s),s.rebuild(),s.toolbar},tooltip:"Show all"}},32309:function(e,t,n){var i=n(2748),o=n(580),r=n(21537),s=n(70799),a=n(43649);n(37585);let l=e=>"|"===e||"---"===e||"\n"===e;function c(e,t){var n;let i=(0,a.flatButtonsSet)((0,r.splitArray)(t.o.buttons),t),o=t.getRegisteredButtonGroups(),s=!1,c=!1,u=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...null!=(n=o[t.group])?n:[]],r=e.filter(e=>i.has(e));r.length!==e.length&&(s=!0),u.push(...r)}else l(t)?u.push(t):"dots"===t?c=!0:i.has(t)?u.push(t):s=!0;if(!s)return e;let d=[];for(let e of u)l(e)&&(0===d.length||l(d[d.length-1]))||d.push(e);for(;d.length&&l(d[d.length-1]);)d.pop();if(c){let e=(0,a.flatButtonsSet)(d,t);(0,r.toArray)(i).some(t=>!e.has(t))&&d.push("dots")}return d}o.pluginSystem.add("mobile",function(e){let t=0,n=(0,r.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",n=>{if(n.changedTouches&&n.changedTouches.length){let i=new Date().getTime(),o=i-t;o>e.o.mobileTapTimeout&&(t=i,o<1.5*e.o.mobileTapTimeout&&e.s.insertCursorAtPoint(n.clientX,n.clientY))}}),e.e.on("getDiffButtons.mobile",t=>{if(t===e.toolbar){let t=(0,a.flatButtonsSet)((0,r.splitArray)(e.o.buttons),e),i=(0,a.flatButtonsSet)(n,e);return(0,r.toArray)(t).reduce((e,t)=>(i.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 o=(()=>{if(e.isFullSize)return(0,r.splitArray)(e.o.buttons);let t=function(e){var t;let{toolbar:n}=e.o;if((0,s.isString)(n)||i.Dom.isHTMLElement(n)){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)})();o.toString()!==n.toString()&&(n=o,e.e.fire("closeAllPopups"),null==(t=e.toolbar)||t.setRemoveButtons(e.o.removeButtons).build(n.concat(e.o.extraButtons)))}).on(e.ow,"load resize",()=>e.e.fire("recalcAdaptive"))})},57951:function(e,t,n){var i=n(86583),o=n(12153),r=n(6441),s=n(13465),a=n(50267),l=n(83086);let c="start",u=(e,t,{control:n})=>{var o;let r=`button${n.command}`,s=null!=(o=n.args&&n.args[0])?o:(0,i.dataBind)(e,r);s===c?(0,l.openStartDialog)(e):((0,i.dataBind)(e,r,s),e.execCommand(n.command,!1,"default"===s?null:s))};o.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:u},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:u,isChildDisabled:(e,t)=>{var n;return(null==(n=t.control.args)?void 0:n[0])===c&&!(0,l.closestOrderedList)(e)}}},13465:function(e,t){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){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,n){var i=n(65478),o=n(580),r=n(50911);n(57951);class s extends r.Plugin{afterInit(e){e.registerCommand("insertUnorderedList",this.onCommand).registerCommand("insertOrderedList",this.onCommand)}onCommand(e,t,n){return this.jodit.s.commitStyle({element:"insertunorderedlist"===e?"ul":"ol",attributes:{style:{listStyleType:null!=n?n:null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}constructor(){super(...arguments),this.buttons=[{name:"ul",group:"list"},{name:"ol",group:"list"}]}}!function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([i.autobind],s.prototype,"onCommand",null),o.pluginSystem.add("orderedList",s)},83086:function(e,t,n){n.d(t,{closestOrderedList:function(){return a},openStartDialog:function(){return l}});var i=n(2748),o=n(29960),r=n(62843),s=n(2525);function a(e){let t=e.s.current();return t?i.Dom.closest(t,"ol",e.editor):null}function l(e){let t=a(e);if(!t)return;let n=e.dlg({resizable:!1,closeOnClickOverlay:!0}),i=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,[i])]);l.container.classList.add("jodit-dialog_alert"),l.onSubmit(({start:r})=>{let s=""===r?1:parseInt(r,10);if(isNaN(s))return i.focus(),!1;n.close(),(0,o.attr)(t,"start",1===s?null:s),e.synchronizeValues()}),e.s.save(),n.e.on(n,"afterClose",()=>{e.s.focus(),e.s.restore()}),n.setFooter([(0,r.Button)(e,"cancel","Cancel").onAction(()=>n.close()),(0,r.Button)(e,"ok","Apply","primary").onAction(()=>l.submit())]),n.open(l,e.i18n("Start numbering at"),!0,!0),i.focus(),i.nativeInput.select()}},71842:function(e,t,n){var i=n(82758),o=n(6441);o.Config.prototype.askBeforePasteFromWord=!0,o.Config.prototype.processPasteFromWord=!0,o.Config.prototype.defaultActionOnPasteFromWord=null,o.Config.prototype.pasteFromWordActionList=[{value:i.INSERT_AS_HTML,text:"Keep"},{value:i.INSERT_AS_TEXT,text:"Clean"},{value:i.INSERT_ONLY_TEXT,text:"Insert only Text"}]},31571:function(e,t,n){n.d(t,{pasteFromWord:function(){return c}});var i=n(82758),o=n(65478),r=n(580),s=n(21537),a=n(50911);n(71842);var l=n(117);class c extends a.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,n){let{j:i}=this,{processPasteFromWord:o,askBeforePasteFromWord:r,defaultActionOnPasteFromWord:a,defaultActionOnPaste:c,pasteFromWordActionList:u}=i.o;return!!(o&&(0,s.isHtmlFromWord)(t))&&(r?(0,l.askInsertTypeDialog)(i,"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",i=>{this.insertFromWordByType(e,t,i,n)},u):this.insertFromWordByType(e,t,a||c,n),!0)}insertFromWordByType(e,t,n,o){var r;switch(n){case i.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 i.INSERT_AS_TEXT:t=(0,s.cleanFromWord)(t);break;case i.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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([(0,o.watch)(":processHTML")],c.prototype,"processWordHTML",null),r.pluginSystem.add("pasteFromWord",c)},85407:function(e,t,n){var i=n(82758),o=n(2748),r=n(580),s=n(21537),a=n(20356),l=n(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(),o.Dom.append(this.container,this.listBox),o.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 o.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"),o.Dom.safeRemove(this.previewBox),o.Dom.safeRemove(this.listBox),o.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!==[i.KEY_UP,i.KEY_DOWN,i.KEY_ENTER].indexOf(e.key)){if(e.key===i.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===i.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===i.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,n)=>{t.classList.remove("jodit_active"),e===n&&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&&o.Dom.detach(this.listBox),this.previewBox&&o.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let n=this.j.c.element("a");n.textContent=t+1+". "+e.replace((0,i.SPACE_REG_EXP)(),""),this.j.e.on(n,"keydown",this.onKeyDown),(0,s.attr)(n,"href","#"),(0,s.attr)(n,"data-index",t.toString()),(0,s.attr)(n,"tab-index","-1"),this.listBox&&o.Dom.append(this.listBox,n)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))}}}r.pluginSystem.add("pasteStorage",c)},84380:function(e,t,n){var i=n(82758),o=n(6441),r=n(117);function s(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){n(e);return}a.done?t(l):Promise.resolve(l).then(i,o)}o.Config.prototype.askBeforePasteHTML=!0,o.Config.prototype.processPasteHTML=!0,o.Config.prototype.scrollToPastedContent=!0,o.Config.prototype.pasteExcludeStripTags=["br","hr"],o.Config.prototype.pasteHTMLActionList=[{value:i.INSERT_AS_HTML,text:"Keep"},{value:i.INSERT_AS_TEXT,text:"Insert as Text"},{value:i.INSERT_ONLY_TEXT,text:"Insert only Text"}],o.Config.prototype.memorizeChoiceWhenPasteFragment=!1,o.Config.prototype.nl2brInPlainText=!0;let a="pasteStorage";o.Config.prototype.controls.paste={tooltip:"Paste from clipboard",exec(e,t,n){var o;return(o=function*(e,t,{control:n}){var o;if(n.name===a)return void e.execCommand("showPasteStorage");e.s.focus();let s="",l=!0;if(navigator.clipboard){try{let e=yield navigator.clipboard.read();if(e&&e.length){let t=e[0],n=(null==(o=t.types)?void 0:o.includes(i.TEXT_HTML))?i.TEXT_HTML:i.TEXT_PLAIN,r=yield t.getType(n);s=yield new Response(r).text()}l=!1}catch(e){i.IS_PROD}if(l)try{s=yield navigator.clipboard.readText(),l=!1}catch(e){i.IS_PROD}}l&&(l=0===(s=e.buffer.get(i.CLIPBOARD_ID)||"").length);let c=e.value;l?(e.ed.execCommand("paste"),(l=c===e.value)||e.e.fire("afterPaste")):s.length?((0,r.pasteInsertHtml)(null,e,s),e.e.fire("afterPaste")):l&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},function(){var e=this,t=arguments;return new Promise(function(n,i){var r=o.apply(e,t);function a(e){s(r,n,i,a,l,"next",e)}function l(e){s(r,n,i,a,l,"throw",e)}a(void 0)})}).apply(this,arguments)},list:{[a]:"Paste Storage"},isChildDisabled(e){return 2>e.e.fire("pasteStorageList")}}},117:function(e,t,n){n.d(t,{askInsertTypeDialog:function(){return h},getAllTypes:function(){return d},pasteInsertHtml:function(){return u},removeGoogleDocsWrapper:function(){return c}});var i=n(82758),o=n(2748),r=n(4510),s=n(27613),a=n(76241),l=n(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(o.Dom.unwrap),t.innerHTML}function u(e,t,n){var i;let r,l;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let u=t.e.fire("beforePasteInsert",n);!(0,s.isVoid)(u)&&((0,s.isString)(u)||(0,s.isNumber)(u)||o.Dom.isNode(u))&&(n=u),(0,s.isString)(n)&&(i=c(n),-1!==(r=(i=(0,a.removeTagsByPrefix)(i,["<meta"])).search(/<!--StartFragment-->/i))&&(i=i.substring(r+20)),-1!==(l=i.search(/<!--EndFragment-->/i))&&(i=i.substring(0,l)),n=i),t.s.insertHTML(n)}function d(e){let t=e.types,n="";if((0,s.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(let e=0;e<t.length;e+=1)n+=t[e]+";";else n=(t||i.TEXT_PLAIN).toString()+";";return n}function h(e,t,n,i,o){if(!1===e.e.fire("beforeOpenPasteDialog",t,n,i,o))return;let r=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(n)),s=o.map(({text:t,value:n})=>(0,l.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{r.close(),i(n)}));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,n,i,o),r}},79799:function(e,t,n){var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(21537),l=n(20356);n(84380);var c=n(117),u=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class d 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),n=[null==t?void 0:t.getData(i.TEXT_PLAIN),null==t?void 0:t.getData(i.TEXT_HTML),null==t?void 0:t.getData(i.TEXT_RTF)];for(let t of n)if((0,a.isHTML)(t)&&(this.j.e.fire("processHTML",e,t,{plain:n[0],html:n[1],rtf:n[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=(0,a.getDataTransfer)(e),n=(null==t?void 0:t.getData(i.TEXT_HTML))||(null==t?void 0:t.getData(i.TEXT_PLAIN));if(t&&n&&""!==(0,a.trim)(n)){let i=this.j.e.fire("processPaste",e,n,(0,c.getAllTypes)(t));void 0!==i&&(n=i),((0,a.isString)(n)||r.Dom.isNode(n))&&this.__insertByType(e,n,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let n=this.pasteStack.find(e=>e.html===t);if(n)return this.__insertByType(e,t,n.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let n=(0,c.askInsertTypeDialog)(this.j,"Your code is similar to HTML. Keep as HTML?","Paste as HTML",n=>{this._isDialogOpened=!1,this.__insertByType(e,t,n)},this.j.o.pasteHTMLActionList);return n&&(this._isDialogOpened=!0,n.e.on("beforeClose",()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,n){if(this.pasteStack.push({html:t,action:n}),(0,a.isString)(t))switch(this.j.buffer.set(i.CLIPBOARD_ID,t),n){case i.INSERT_CLEAR_HTML:t=(0,a.cleanFromWord)((0,c.removeGoogleDocsWrapper)(t));break;case i.INSERT_ONLY_TEXT:t=(0,a.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case i.INSERT_AS_TEXT:t=(0,a.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,a.nl2br)(t));break;default:{let i=this.j.e.fire("onCustomPasteHTMLOption",n,t,e);"string"==typeof i&&(t=i)}}(0,c.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,n){if(n===i.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}}u([o.autobind],d.prototype,"onPaste",null),u([o.autobind],d.prototype,"onProcessPasteReplaceNl2Br",null),s.pluginSystem.add("paste",d)},61926:function(e,t,n){var i=n(6441);i.Config.prototype.showPlaceholder=!0,i.Config.prototype.placeholder="Type something",i.Config.prototype.useInputsPlaceholder=!0},59451:function(e,t,n){n.d(t,{isEditorEmpty:function(){return h}});var i=n(82758),o=n(65478),r=n(2748),s=n(580),a=n(78116),l=n(70442),c=n(29960),u=n(41180),d=n(20356);function h(e){var t;return function(e){var t;if(!e.firstChild)return!0;let n=e.firstChild;if(r.Dom.isTag(n,"br")&&!r.Dom.next(n,Boolean,e))return!0;if(i.INSEPARABLE_TAGS.has(null==(t=n.nodeName)?void 0:t.toLowerCase())||/^(TABLE)$/i.test(n.nodeName))return!1;let o=r.Dom.next(n,e=>e&&!r.Dom.isEmptyTextNode(e),e);return r.Dom.isText(n)&&!o?r.Dom.isEmptyTextNode(n):!o&&r.Dom.each(n,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(i.NBSP_SPACE))}n(61926);class p 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,u.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,n=0,i=e.s.current(),o=i&&r.Dom.closest(i,r.Dom.isBlock,e.editor)||e.editor,s=e.ew.getComputedStyle(o),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 i=e.ew.getComputedStyle(c);t=parseInt(i.getPropertyValue("margin-top"),10),n=parseInt(i.getPropertyValue("margin-left"),10),(0,u.css)(this.placeholderElm,{fontFamily:i.getPropertyValue("font-family"),fontSize:parseInt(i.getPropertyValue("font-size"),10),lineHeight:i.getPropertyValue("line-height")})}else(0,u.css)(this.placeholderElm,{fontFamily:s.getPropertyValue("font-family"),fontSize:parseInt(s.getPropertyValue("font-size"),10),lineHeight:s.getPropertyValue("line-height")});(0,u.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),n)})}hide(){r.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){if(e.getRealMode()!==i.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,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);r>3&&s&&Object.defineProperty(t,n,s)}([(0,o.debounce)(e=>e.defaultTimeout/10,!0)],p.prototype,"toggle",null),s.pluginSystem.add("placeholder",p)},18363:function(e,t,n){n(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
228
228
  tabindex="-1"
229
229
  style="text-transform: uppercase"
230
230
  class="jodit-status-bar-link"