jodit-pro 4.18.3 → 4.18.6

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 (380) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +2 -0
  3. package/config.js +1 -0
  4. package/es2015/jodit.css +1 -1
  5. package/es2015/jodit.fat.min.css +1 -1
  6. package/es2015/jodit.fat.min.js +21 -9
  7. package/es2015/jodit.js +2 -2
  8. package/es2015/jodit.min.js +2 -2
  9. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  10. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  11. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  12. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  13. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  14. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  15. package/es2015/plugins/backup/backup.css +1 -1
  16. package/es2015/plugins/backup/backup.js +1 -1
  17. package/es2015/plugins/backup/backup.min.js +1 -1
  18. package/es2015/plugins/button-generator/button-generator.css +1 -1
  19. package/es2015/plugins/button-generator/button-generator.js +1 -1
  20. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  21. package/es2015/plugins/change-case/change-case.js +1 -1
  22. package/es2015/plugins/change-case/change-case.min.js +1 -1
  23. package/es2015/plugins/chart/chart.css +173 -0
  24. package/es2015/plugins/chart/chart.js +1479 -0
  25. package/es2015/plugins/chart/chart.min.css +1 -0
  26. package/es2015/plugins/chart/chart.min.js +20 -0
  27. package/es2015/plugins/color-picker/color-picker.css +1 -1
  28. package/es2015/plugins/color-picker/color-picker.js +1 -1
  29. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  30. package/es2015/plugins/emoji/emoji.css +1 -1
  31. package/es2015/plugins/emoji/emoji.js +1 -1
  32. package/es2015/plugins/emoji/emoji.min.js +1 -1
  33. package/es2015/plugins/export-docs/export-docs.js +1 -1
  34. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  35. package/es2015/plugins/finder/finder.css +1 -1
  36. package/es2015/plugins/finder/finder.js +1 -1
  37. package/es2015/plugins/finder/finder.min.js +1 -1
  38. package/es2015/plugins/google-maps/google-maps.css +1 -1
  39. package/es2015/plugins/google-maps/google-maps.js +1 -1
  40. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  41. package/es2015/plugins/google-search/google-search.js +1 -1
  42. package/es2015/plugins/google-search/google-search.min.js +1 -1
  43. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  44. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  45. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  46. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  47. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  48. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  49. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  50. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  51. package/es2015/plugins/keyboard/keyboard.css +1 -1
  52. package/es2015/plugins/keyboard/keyboard.js +1 -1
  53. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  54. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  55. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  56. package/es2015/plugins/page-break/page-break.js +1 -1
  57. package/es2015/plugins/page-break/page-break.min.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.css +1 -1
  59. package/es2015/plugins/paste-code/paste-code.js +1 -1
  60. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  61. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  62. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  63. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  64. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  65. package/es2015/plugins/style/style.css +1 -1
  66. package/es2015/plugins/style/style.js +1 -1
  67. package/es2015/plugins/style/style.min.js +1 -1
  68. package/es2015/plugins/templates/templates.css +1 -1
  69. package/es2015/plugins/templates/templates.js +1 -1
  70. package/es2015/plugins/templates/templates.min.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.css +1 -1
  72. package/es2015/plugins/todo-list/todo-list.js +1 -1
  73. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  74. package/es2015/plugins/translate/translate.css +1 -1
  75. package/es2015/plugins/translate/translate.js +1 -1
  76. package/es2015/plugins/translate/translate.min.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.css +1 -1
  78. package/es2015/plugins/tune-block/tune-block.js +2 -1
  79. package/es2015/plugins/tune-block/tune-block.min.js +2 -2
  80. package/es2018/jodit.fat.min.css +1 -1
  81. package/es2018/jodit.fat.min.js +75 -63
  82. package/es2018/jodit.min.js +2 -2
  83. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  84. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  85. package/es2018/plugins/backup/backup.min.js +1 -1
  86. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  87. package/es2018/plugins/change-case/change-case.min.js +1 -1
  88. package/es2018/plugins/chart/chart.min.css +1 -0
  89. package/es2018/plugins/chart/chart.min.js +20 -0
  90. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  91. package/es2018/plugins/emoji/emoji.min.js +1 -1
  92. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  93. package/es2018/plugins/finder/finder.min.js +1 -1
  94. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  95. package/es2018/plugins/google-search/google-search.min.js +1 -1
  96. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  97. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  98. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  99. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  100. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  101. package/es2018/plugins/page-break/page-break.min.js +1 -1
  102. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  103. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  104. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  105. package/es2018/plugins/style/style.min.js +1 -1
  106. package/es2018/plugins/templates/templates.min.js +1 -1
  107. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  108. package/es2018/plugins/translate/translate.min.js +1 -1
  109. package/es2018/plugins/tune-block/tune-block.min.js +2 -2
  110. package/es2021/jodit.css +1 -1
  111. package/es2021/jodit.fat.min.css +1 -1
  112. package/es2021/jodit.fat.min.js +18 -6
  113. package/es2021/jodit.js +2 -2
  114. package/es2021/jodit.min.js +2 -2
  115. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  116. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  117. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  118. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  119. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  120. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  121. package/es2021/plugins/backup/backup.css +1 -1
  122. package/es2021/plugins/backup/backup.js +1 -1
  123. package/es2021/plugins/backup/backup.min.js +1 -1
  124. package/es2021/plugins/button-generator/button-generator.css +1 -1
  125. package/es2021/plugins/button-generator/button-generator.js +1 -1
  126. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  127. package/es2021/plugins/change-case/change-case.js +1 -1
  128. package/es2021/plugins/change-case/change-case.min.js +1 -1
  129. package/es2021/plugins/chart/chart.css +173 -0
  130. package/es2021/plugins/chart/chart.js +1424 -0
  131. package/es2021/plugins/chart/chart.min.css +1 -0
  132. package/es2021/plugins/chart/chart.min.js +20 -0
  133. package/es2021/plugins/color-picker/color-picker.css +1 -1
  134. package/es2021/plugins/color-picker/color-picker.js +1 -1
  135. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  136. package/es2021/plugins/emoji/emoji.css +1 -1
  137. package/es2021/plugins/emoji/emoji.js +1 -1
  138. package/es2021/plugins/emoji/emoji.min.js +1 -1
  139. package/es2021/plugins/export-docs/export-docs.js +1 -1
  140. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  141. package/es2021/plugins/finder/finder.css +1 -1
  142. package/es2021/plugins/finder/finder.js +1 -1
  143. package/es2021/plugins/finder/finder.min.js +1 -1
  144. package/es2021/plugins/google-maps/google-maps.css +1 -1
  145. package/es2021/plugins/google-maps/google-maps.js +1 -1
  146. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  147. package/es2021/plugins/google-search/google-search.js +1 -1
  148. package/es2021/plugins/google-search/google-search.min.js +1 -1
  149. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  150. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  151. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  152. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  153. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  154. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  155. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  156. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  157. package/es2021/plugins/keyboard/keyboard.css +1 -1
  158. package/es2021/plugins/keyboard/keyboard.js +1 -1
  159. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  160. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  161. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  162. package/es2021/plugins/page-break/page-break.js +1 -1
  163. package/es2021/plugins/page-break/page-break.min.js +1 -1
  164. package/es2021/plugins/paste-code/paste-code.css +1 -1
  165. package/es2021/plugins/paste-code/paste-code.js +1 -1
  166. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  167. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  168. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  169. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  170. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  171. package/es2021/plugins/style/style.css +1 -1
  172. package/es2021/plugins/style/style.js +1 -1
  173. package/es2021/plugins/style/style.min.js +1 -1
  174. package/es2021/plugins/templates/templates.css +1 -1
  175. package/es2021/plugins/templates/templates.js +1 -1
  176. package/es2021/plugins/templates/templates.min.js +1 -1
  177. package/es2021/plugins/todo-list/todo-list.css +1 -1
  178. package/es2021/plugins/todo-list/todo-list.js +1 -1
  179. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  180. package/es2021/plugins/translate/translate.css +1 -1
  181. package/es2021/plugins/translate/translate.js +1 -1
  182. package/es2021/plugins/translate/translate.min.js +1 -1
  183. package/es2021/plugins/tune-block/tune-block.css +1 -1
  184. package/es2021/plugins/tune-block/tune-block.js +2 -1
  185. package/es2021/plugins/tune-block/tune-block.min.js +2 -2
  186. package/es2021.en/jodit.css +1 -1
  187. package/es2021.en/jodit.fat.min.css +1 -1
  188. package/es2021.en/jodit.fat.min.js +21 -9
  189. package/es2021.en/jodit.js +2 -2
  190. package/es2021.en/jodit.min.js +2 -2
  191. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  192. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  193. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  194. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  195. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  196. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  197. package/es2021.en/plugins/backup/backup.css +1 -1
  198. package/es2021.en/plugins/backup/backup.js +1 -1
  199. package/es2021.en/plugins/backup/backup.min.js +1 -1
  200. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  201. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  202. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  203. package/es2021.en/plugins/change-case/change-case.js +1 -1
  204. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  205. package/es2021.en/plugins/chart/chart.css +173 -0
  206. package/es2021.en/plugins/chart/chart.js +1424 -0
  207. package/es2021.en/plugins/chart/chart.min.css +1 -0
  208. package/es2021.en/plugins/chart/chart.min.js +20 -0
  209. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  210. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  211. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  212. package/es2021.en/plugins/emoji/emoji.css +1 -1
  213. package/es2021.en/plugins/emoji/emoji.js +1 -1
  214. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  215. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  216. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  217. package/es2021.en/plugins/finder/finder.css +1 -1
  218. package/es2021.en/plugins/finder/finder.js +1 -1
  219. package/es2021.en/plugins/finder/finder.min.js +1 -1
  220. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  221. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  222. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  223. package/es2021.en/plugins/google-search/google-search.js +1 -1
  224. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  225. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  226. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  227. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  228. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  229. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  230. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  231. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  232. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  233. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  234. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  235. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  236. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  237. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  238. package/es2021.en/plugins/page-break/page-break.js +1 -1
  239. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  240. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  241. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  242. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  243. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  244. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  245. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  246. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  247. package/es2021.en/plugins/style/style.css +1 -1
  248. package/es2021.en/plugins/style/style.js +1 -1
  249. package/es2021.en/plugins/style/style.min.js +1 -1
  250. package/es2021.en/plugins/templates/templates.css +1 -1
  251. package/es2021.en/plugins/templates/templates.js +1 -1
  252. package/es2021.en/plugins/templates/templates.min.js +1 -1
  253. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  254. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  255. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  256. package/es2021.en/plugins/translate/translate.css +1 -1
  257. package/es2021.en/plugins/translate/translate.js +1 -1
  258. package/es2021.en/plugins/translate/translate.min.js +1 -1
  259. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  260. package/es2021.en/plugins/tune-block/tune-block.js +2 -1
  261. package/es2021.en/plugins/tune-block/tune-block.min.js +2 -2
  262. package/es5/jodit.css +2 -2
  263. package/es5/jodit.fat.min.css +1 -1
  264. package/es5/jodit.fat.min.js +2 -2
  265. package/es5/jodit.js +2 -2
  266. package/es5/jodit.min.css +2 -2
  267. package/es5/jodit.min.js +2 -2
  268. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  269. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  270. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  271. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  272. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  273. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  274. package/es5/plugins/backup/backup.css +1 -1
  275. package/es5/plugins/backup/backup.js +1 -1
  276. package/es5/plugins/backup/backup.min.js +1 -1
  277. package/es5/plugins/button-generator/button-generator.css +1 -1
  278. package/es5/plugins/button-generator/button-generator.js +1 -1
  279. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  280. package/es5/plugins/change-case/change-case.js +1 -1
  281. package/es5/plugins/change-case/change-case.min.js +1 -1
  282. package/es5/plugins/chart/chart.css +173 -0
  283. package/es5/plugins/chart/chart.js +1661 -0
  284. package/es5/plugins/chart/chart.min.css +1 -0
  285. package/es5/plugins/chart/chart.min.js +8 -0
  286. package/es5/plugins/color-picker/color-picker.css +1 -1
  287. package/es5/plugins/color-picker/color-picker.js +1 -1
  288. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  289. package/es5/plugins/emoji/emoji.css +1 -1
  290. package/es5/plugins/emoji/emoji.js +1 -1
  291. package/es5/plugins/emoji/emoji.min.js +1 -1
  292. package/es5/plugins/export-docs/export-docs.js +1 -1
  293. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  294. package/es5/plugins/finder/finder.css +1 -1
  295. package/es5/plugins/finder/finder.js +1 -1
  296. package/es5/plugins/finder/finder.min.js +1 -1
  297. package/es5/plugins/google-maps/google-maps.css +1 -1
  298. package/es5/plugins/google-maps/google-maps.js +1 -1
  299. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  300. package/es5/plugins/google-search/google-search.js +1 -1
  301. package/es5/plugins/google-search/google-search.min.js +1 -1
  302. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  303. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  304. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  305. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  306. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  307. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  308. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  309. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  310. package/es5/plugins/keyboard/keyboard.css +1 -1
  311. package/es5/plugins/keyboard/keyboard.js +1 -1
  312. package/es5/plugins/keyboard/keyboard.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 +2 -1
  338. package/es5/plugins/tune-block/tune-block.min.js +2 -2
  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/esm/config.d.ts +27 -1
  343. package/esm/plugins/all.js +1 -1
  344. package/esm/plugins/chart/assets/chart.svg.js +1 -0
  345. package/esm/plugins/chart/chart.d.ts +56 -0
  346. package/esm/plugins/chart/chart.js +1 -0
  347. package/esm/plugins/chart/config.d.ts +33 -0
  348. package/esm/plugins/chart/config.js +1 -0
  349. package/esm/plugins/chart/helpers.d.ts +22 -0
  350. package/esm/plugins/chart/helpers.js +1 -0
  351. package/esm/plugins/chart/interface.d.ts +34 -0
  352. package/esm/plugins/chart/interface.js +0 -0
  353. package/esm/plugins/chart/render/bar.d.ts +8 -0
  354. package/esm/plugins/chart/render/bar.js +1 -0
  355. package/esm/plugins/chart/render/common.d.ts +40 -0
  356. package/esm/plugins/chart/render/common.js +1 -0
  357. package/esm/plugins/chart/render/index.d.ts +7 -0
  358. package/esm/plugins/chart/render/index.js +1 -0
  359. package/esm/plugins/chart/render/line.d.ts +7 -0
  360. package/esm/plugins/chart/render/line.js +1 -0
  361. package/esm/plugins/chart/render/pie.d.ts +7 -0
  362. package/esm/plugins/chart/render/pie.js +1 -0
  363. package/esm/plugins/chart/render/radar.d.ts +7 -0
  364. package/esm/plugins/chart/render/radar.js +1 -0
  365. package/esm/plugins/chart/ui/editor/editor.d.ts +52 -0
  366. package/esm/plugins/chart/ui/editor/editor.js +13 -0
  367. package/esm/plugins/tune-block/config.js +1 -1
  368. package/package.json +1 -1
  369. package/types/config.d.ts +27 -1
  370. package/types/plugins/chart/chart.d.ts +56 -0
  371. package/types/plugins/chart/config.d.ts +33 -0
  372. package/types/plugins/chart/helpers.d.ts +22 -0
  373. package/types/plugins/chart/interface.d.ts +34 -0
  374. package/types/plugins/chart/render/bar.d.ts +8 -0
  375. package/types/plugins/chart/render/common.d.ts +40 -0
  376. package/types/plugins/chart/render/index.d.ts +7 -0
  377. package/types/plugins/chart/render/line.d.ts +7 -0
  378. package/types/plugins/chart/render/pie.d.ts +7 -0
  379. package/types/plugins/chart/render/radar.d.ts +7 -0
  380. package/types/plugins/chart/ui/editor/editor.d.ts +52 -0
@@ -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.18.3
4
+ * Version: v4.18.6
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(require("{}"));else if("function"==typeof define&&define.amd)define(["{}"],t);else{var i="object"==typeof exports?t(require("{}")):t(e["{}"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,function(e){return function(){var t,i,o={94668:function(e){e.exports='<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="M13 3H5v18h14V9l-6-6Zm0 0v6h6M12 12v6m-3-3h6"/> </g> </svg>'},86428:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> \x3c!-- Background rounded rect --\x3e <rect x="1" y="1" width="22" height="22" rx="3"/> \x3c!-- Letter A - outer shape --\x3e <polygon points="8,5 2,19 5,19 6.5,16 11.5,16 13,19 16,19 10,5" fill="white"/> \x3c!-- Letter A - inner triangle (hole) --\x3e <polygon points="9,9 7.5,13 10.5,13" fill="currentColor"/> \x3c!-- Letter I --\x3e <rect x="17" y="5" width="3" height="14" fill="white"/> </svg>'},75966:function(e){e.exports='<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 17 11-11 4 4L7 21Zm8-8 4 4M5 3v4M3 5h4M19 2v4m-2-2h4m-1 12v4m-2-2h4"/> </g> </svg>'},83207:function(e){e.exports='<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 6 6 6-6 6"/> </g> </svg>'},99219:function(e){e.exports='<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 10 18-7-7 18-3-8-8-3Zm8 3L21 3"/> </g> </svg>'},63674:function(e){e.exports='<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 2 4 5v7c0 5 8 10 8 10s8-5 8-10V5l-8-3Z"/> </g> </svg>'},4133:function(e){e.exports='<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="m13 2-9 12h6l-1 8 11-13h-7V2Z"/> </g> </svg>'},68583:function(e){e.exports='<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 4v6h6M3 10l4-4a8 8 0 1 1-1 12M12 8v5l3 2"/> </g> </svg>'},34586:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="20" height="13" rx="3"/><path d="m11 11 2 11 2-4 4-1-8-6"/> </g> </svg>'},91729:function(e){e.exports='<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 19 8 5l6 14M4.5 13h7M21 12v7m0-5a3 3 0 1 0 0 3"/> </g> </svg>'},46995:function(e){e.exports='<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="12" cy="12" r="9"/><path d="M8 9h0m8 0h0M8 15a5 5 0 0 0 8 0"/> </g> </svg>'},83556:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M2 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> <path d="M17 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0" fill="none" /> <path d="M9.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5" fill="none" /> <path d="M19.5 15l3 6" fill="none" /> <path d="M19.5 21l3 -6" fill="none" /> </svg>'},4872:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6" fill="none" /> <path d="M17 18h2" fill="none" /> <path d="M20 15h-3v6" fill="none" /> <path d="M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> </svg>'},53121:function(e){e.exports='<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 3H5v18h14v-7M12 12l9-9m-6 0h6v6"/> </g> </svg>'},7307:function(e){e.exports='<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 21 3.5 12.5a5 5 0 0 1 7-7L12 7l1.5-1.5a5 5 0 0 1 7 7L12 21Z"/> </g> </svg>'},24928:function(e){e.exports='<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 11 10-8 10 8M5 9v12h5v-7h4v7h5V9"/> </g> </svg>'},96910:function(e){e.exports='<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 7V4h6l3 3h9v14H3V7ZM12 11v7m-3.5-3.5h7"/> </g> </svg>'},81122:function(e){e.exports='<svg viewBox="0 0 83 84" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="40" cy="44" r="37" stroke="black" stroke-width="6"/> <path d="M40 4V44H79" stroke="black" stroke-width="5"/> <circle cx="40" cy="6" r="6" fill="#C8C8C8"/> <circle cx="40" cy="43" r="6" fill="#C8C8C8"/> <circle cx="77" cy="44" r="6" fill="#C8C8C8"/> </svg>'},49377:function(e){e.exports='<svg viewBox="0 0 76 76" xmlns="http://www.w3.org/2000/svg"> <path d="M38 6.90909C36.2517 6.90909 34.7591 7.58381 33.5221 8.93324C32.2852 10.2827 31.6667 11.911 31.6667 13.8182V20.7273H30.0833V15.7074C30.0833 13.9801 29.5556 12.5137 28.5 11.3082C27.4444 10.1027 26.125 9.5 24.5417 9.5C23.0243 9.5 21.7214 10.0938 20.6328 11.2813C19.5443 12.4688 19 13.8902 19 15.5455V38.7017L17.4167 37.0824V27.7983C17.4167 26.071 16.8889 24.6046 15.8333 23.3991C14.7778 22.1937 13.4583 21.5909 11.875 21.5909C10.3576 21.5909 9.05469 22.1847 7.96615 23.3722C6.8776 24.5597 6.33333 25.9811 6.33333 27.6364V39.7273C6.33333 41.4186 6.91059 42.8939 8.0651 44.1534L23.4036 60.1307C24.6901 61.5341 25.3333 63.3693 25.3333 65.6364C25.3333 66.572 25.6467 67.3816 26.2734 68.0653C26.9002 68.7491 27.6424 69.0909 28.5 69.0909H60.1667C61.0243 69.0909 61.7665 68.7491 62.3932 68.0653C63.02 67.3816 63.3333 66.572 63.3333 65.6364V64.2869C63.3333 62.8116 63.4983 61.4261 63.8281 60.1307L69.1719 36.5966C69.5017 35.3011 69.6667 33.9157 69.6667 32.4403V19.1619C69.6667 17.4347 69.1389 15.9683 68.0833 14.7628C67.0278 13.5573 65.7083 12.9545 64.125 12.9545C62.6076 12.9545 61.3047 13.5483 60.2161 14.7358C59.1276 15.9233 58.5833 17.3447 58.5833 19V20.7273H57V13.9801C57 12.5407 56.5877 11.2363 55.763 10.0668C54.9384 8.89725 53.8828 8.16856 52.5964 7.88068C52.1345 7.80871 51.7552 7.77273 51.4583 7.77273C49.941 7.77273 48.638 8.36648 47.5495 9.55398C46.4609 10.7415 45.9167 12.1629 45.9167 13.8182V20.7273H44.3333V14.142C44.3333 12.3068 43.7973 10.6965 42.7253 9.31108C41.6532 7.92566 40.2925 7.14299 38.6432 6.96307C38.4783 6.92708 38.2639 6.90909 38 6.90909ZM38 0C40.7708 0 43.2283 0.899621 45.3724 2.69886C47.2526 1.47538 49.2813 0.863636 51.4583 0.863636C53.4045 0.863636 55.2352 1.34943 56.9505 2.32102C58.6658 3.29261 60.0842 4.66004 61.2057 6.4233C62.0964 6.1714 63.0694 6.04545 64.125 6.04545C67.4236 6.04545 70.2274 7.33191 72.5365 9.90483C74.8455 12.4777 76 15.5634 76 19.1619V32.4403C76 34.2756 75.7856 36.2188 75.3568 38.2699L69.9635 61.804C69.7656 62.6676 69.6667 63.9451 69.6667 65.6364C69.6667 68.5152 68.7431 70.9621 66.8958 72.9773C65.0486 74.9924 62.8056 76 60.1667 76H28.5C25.7292 76 23.4531 74.9474 21.6719 72.8423C19.8906 70.7372 19 68.1733 19 65.1506L3.76042 49.1733C1.25347 46.5464 0 43.3977 0 39.7273V27.6364C0 24.0739 1.16276 21.0241 3.48828 18.4872C5.8138 15.9503 8.60938 14.6818 11.875 14.6818C12.2378 14.6818 12.5017 14.6998 12.6667 14.7358C12.8646 11.3172 14.1098 8.43845 16.4023 6.09943C18.6949 3.76042 21.408 2.59091 24.5417 2.59091C26.2569 2.59091 27.8733 2.96875 29.3906 3.72443C31.7656 1.24148 34.6354 0 38 0Z"/> </svg>'},46425:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M23,13.6l5,5V4c0-0.6-0.4-1-1-1h-4V13.6z"/> <polygon points="12.4,3 16.7,7.3 19.7,10.3 21,11.6 21,3"/> <path d="M14.6,8l-5-5H5C4.4,3,4,3.4,4,4v14.6L14.6,8z"/> </g> <path d="M28.8,29.2L26,26.4c0.7-1,1-2.1,1-3.4c0-3.3-2.7-6-6-6s-6,2.7-6,6s2.7,6,6,6c1.2,0,2.4-0.4,3.4-1l2.8,2.8 c0.4,0.4,1.2,0.4,1.6,0C29.2,30.4,29.2,29.6,28.8,29.2z"/> <path d="M13,23c0-4.4,3.6-8,8-8c0.2,0,0.4,0,0.6,0l-0.3-0.3c0,0,0,0,0,0l-3-3L16,9.4l-12,12V26c0,0.6,0.4,1,1,1h9.1 C13.4,25.8,13,24.5,13,23z"/> </svg>'},86820:function(e){e.exports='<svg viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M44 0.513519C27.2931 0.513519 13.75 13.8981 13.75 30.4095C13.75 46.9208 44 87.4835 44 87.4835C44 87.4835 74.25 46.9208 74.25 30.4095C74.25 13.8981 60.7069 0.513519 44 0.513519ZM19.25 30.4095C19.25 16.921 30.3518 5.94914 44 5.94914C57.6482 5.94914 68.75 16.921 68.75 30.4095C68.75 39.8049 54.9945 62.4871 44 78.1329C33.0055 62.4871 19.25 39.8049 19.25 30.4095ZM44 16.8204C36.4052 16.8204 30.25 22.9035 30.25 30.4095C30.25 37.9154 36.4052 43.9985 44 43.9985C51.5948 43.9985 57.75 37.9154 57.75 30.4095C57.75 22.9035 51.5948 16.8204 44 16.8204ZM44 38.5629C39.4508 38.5629 35.75 34.9054 35.75 30.4095C35.75 25.9135 39.4508 22.256 44 22.256C48.5492 22.256 52.25 25.9135 52.25 30.4095C52.25 34.9054 48.5492 38.5629 44 38.5629Z" fill="#404040"/> </g> <defs> <rect width="88" height="86.97" fill="white" transform="translate(0 0.513519)"/> </defs> </svg>'},36576:function(e){e.exports='<svg viewBox="0 0 77 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 38.6056L33.1367 7.96263L69.5477 45.7058L36.2444 72.166L7 76.9673V38.6056Z" stroke="black" stroke-width="6"/> <circle cx="71" cy="45" r="6" fill="#C8C8C8"/> <circle cx="35" cy="73" r="6" fill="#C8C8C8"/> <circle cx="6" cy="79" r="6" fill="#C8C8C8"/> <circle cx="6" cy="39" r="6" fill="#C8C8C8"/> <circle cx="33" cy="6" r="6" fill="#C8C8C8"/> </svg>'},27622:function(e){e.exports='<svg width="72" height="86" viewBox="0 0 72 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17.1832 79.1351L13.6833 45.0811L49.6832 58.4595L47.6832 5.35135" stroke="black" stroke-width="6"/> <circle cx="13" cy="44" r="6" fill="#C8C8C8"/> <circle cx="17" cy="77" r="6" fill="#C8C8C8"/> <circle cx="51" cy="59" r="6" fill="#C8C8C8"/> <circle cx="48" cy="6" r="6" fill="#C8C8C8"/> </svg>'},89687:function(e){e.exports='<svg viewBox="0 0 47 61" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M46.7671 7.12793H27.3433V61H19.416V7.12793H0.0336914V0.570312H46.7671V7.12793Z" fill="black"/> </svg>'},25088:function(e){e.exports='<svg width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z" fill="black"/> </svg>'},67008:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="3" width="20" height="18" rx="2"/><path d="M2 8h20m-13 4-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},63643:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 9h0m4 0h0m4 0h0m4 0h0M6 13h0m4 0h0m4 0h0m4 0h0M8 16h8"/> </g> </svg>'},27926:function(e){e.exports='<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 5h12v14H9l-7-7 7-7Zm3 4 6 6m0-6-6 6"/> </g> </svg>'},10690:function(e){e.exports='<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 11 8-8 8 8h-5v6H9v-6H4ZM8 21h8"/> </g> </svg>'},91997:function(e){e.exports='<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 12h0m7 0h0m7 0h0"/> </g> </svg>'},11699:function(e){e.exports='<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 11 8-8 8 8h-5v10H9V11H4Z"/> </g> </svg>'},98126:function(e){e.exports='<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 12h14m-4-4 4 4-4 4M21 5v14"/> </g> </svg>'},27222:function(e){e.exports='<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="6" y="2" width="12" height="20" rx="3"/><path d="M10 5h4M12 18h0"/> </g> </svg>'},17405:function(e){e.exports='<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 8V3h14v5M5 16v5h14v-5M2 12h3m4 0h3m4 0h3m3 0h0"/> </g> </svg>'},75689:function(e){e.exports='<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"/><path d="m9 11-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},78879:function(e){e.exports='<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 7V3h4m4 0h3m4 0h3v4m0 4v3m0 4v3h-4m-4 0h-3m-4 0H3v-4m0-4v-3M7 8h10M7 12h10M7 16h6"/> </g> </svg>'},78955:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><path d="M14 6h7m-7 4h4m-4 7h7m-7 4h4"/> </g> </svg>'},18993:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M10 9v12M14 13h3m-3 4h3"/> </g> </svg>'},11373:function(e){e.exports='<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 6 2 2 3-4M12 6h9m-18 7 2 2 3-4m4 2h9M3 20h4m5 0h9"/> </g> </svg>'},74922:function(e){e.exports='<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 7h18m-4-4 4 4-4 4M21 17H3m4-4-4 4 4 4"/> </g> </svg>'},34575:function(e){e.exports='<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 5h11M8 3v2m4 0c-1 6-4 10-9 12M5 8c1 3 3 5 6 7m2 7 4-11 4 11m-6-4h4"/> </g> </svg>'},46146:function(e){"u">typeof self&&self,e.exports=function(){var e=[function(e,t,i){"use strict";var o=i(3);function n(e){return!0===o(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,i;return!1!==n(e)&&"function"==typeof(t=e.constructor)&&!1!==n(i=t.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,r=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=i(2),s=l(i(0)),a=l(i(4));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var u="u">typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,h="u">typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",m="RGBA_USER",g="HSLA_USER";function b(e,t,i){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):i?t:null:t}function v(e){var t=e.getContext("2d"),i=+e.width,o=+e.height,s=t.createLinearGradient(1,1,1,o-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(e){var n=t.createLinearGradient(1,0,i-1,0);n.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),n.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=s,t.fillRect(0,0,i,o),t.fillStyle=n,t.globalCompositeOperation="multiply",t.fillRect(0,0,i,o),t.globalCompositeOperation="source-over"},grabColor:function(e,i){return t.getImageData(e,i,1,1).data},findColor:function(e,t,s){var a=n((0,r.rgbToHsv)(e,t,s),3);return[a[1]*i,o-a[2]*o]}}}function y(e,t,i){return null===e?t:/^\s*$/.test(e)?i:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}function w(e,t,i){if(null===e)return t;if(/^\s*$/.test(e))return i;var o=e.split(",").map(Number);return 2===o.length&&o[0]&&o[1]?o:t}var _=function(){function e(t,i){if(c(this,e),i?(t=b(t),this.options=Object.assign({},p,i)):t&&(0,s.default)(t)?(this.options=Object.assign({},p,t),t=b(this.options.attachTo)):(this.options=Object.assign({},p),t=b((0,r.nvl)(t,this.options.attachTo))),!t)throw Error("Container not found: "+this.options.attachTo);!function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(i+"show-hsl")&&(e.showHSL=y(t.getAttribute(i+"show-hsl"),p.showHSL,!0)),t.hasAttribute(i+"show-rgb")&&(e.showRGB=y(t.getAttribute(i+"show-rgb"),p.showRGB,!0)),t.hasAttribute(i+"show-hex")&&(e.showHEX=y(t.getAttribute(i+"show-hex"),p.showHEX,!0)),t.hasAttribute(i+"show-alpha")&&(e.showAlpha=y(t.getAttribute(i+"show-alpha"),p.showAlpha,!0)),t.hasAttribute(i+"palette-editable")&&(e.paletteEditable=y(t.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),t.hasAttribute(i+"sl-bar-size")&&(e.slBarSize=w(t.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),t.hasAttribute(i+"hue-bar-size")&&(e.hueBarSize=w(t.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),e.alphaBarSize=e.hueBarSize),t.hasAttribute(i+"palette")){var o=t.getAttribute(i+"palette");switch(o){case"PALETTE_MATERIAL_500":e.palette=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=r.PALETTE_MATERIAL_CHROME;break;default:e.palette=o.split(/[;|]/)}}t.hasAttribute(i+"color")&&(e.color=t.getAttribute(i+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,t.appendChild(this.element);var o=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(o),this.hueBarHelper=v(o),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var n=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(n),this.slBarHelper=v(n),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return o(e,[{key:"setupHueCanvas",value:function(e){var t=this;e.width=this.options.hueBarSize[0],e.height=this.options.hueBarSize[1];for(var i=e.getContext("2d"),o=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),n=0;n<=1;n+=1/360)o.addColorStop(n,"hsl("+360*n+", 100%, 50%)");i.fillStyle=o,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.hueBarSize[0]),n=Math.round(360*o/t.options.hueBarSize[0]);t.huePointer.style.left=o-7+"px",t.onValueChanged("H",n)},a=function e(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){s(e),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)})}},{key:"setupSlCanvas",value:function(e){var t=this;e.width=this.options.slBarSize[0],e.height=this.options.slBarSize[1];var i=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.slBarSize[0]-1),n=(0,r.limit)(i.clientY-e.getBoundingClientRect().top,0,t.options.slBarSize[1]-1),s=t.slBarHelper.grabColor(o,n);t.slPointer.style.left=o-7+"px",t.slPointer.style.top=n-7+"px",t.onValueChanged("RGB",s)},o=function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){i(e),document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)})}},{key:"setupAlphaCanvas",value:function(e){var t=this;e.width=this.options.alphaBarSize[0],e.height=this.options.alphaBarSize[1];var i=e.getContext("2d"),o=i.createLinearGradient(0,0,e.width-1,0);o.addColorStop(0,"hsla(0, 0%, 50%, 0)"),o.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=o,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var n=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.alphaBarSize[0]),n=+(o/t.options.alphaBarSize[0]).toFixed(2);t.alphaPointer.style.left=o-7+"px",t.onValueChanged("ALPHA",n)},s=function e(){document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){n(e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)})}},{key:"setupInput",value:function(e){var t=this,i=+e.min,o=+e.max,n=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",function(){e.select()}),"text"===e.type?e.addEventListener("change",function(){t.onValueChanged(n,e.value)}):((u||h)&&e.addEventListener("keydown",function(s){"Up"===s.key?(e.value=(0,r.limit)(+e.value+1,i,o),t.onValueChanged(n,e.value),s.returnValue=!1):"Down"===s.key&&(e.value=(0,r.limit)(e.value-1,i,o),t.onValueChanged(n,e.value),s.returnValue=!1)}),e.addEventListener("change",function(){var s=+e.value;t.onValueChanged(n,(0,r.limit)(s,i,o))}))}},{key:"setupClipboard",value:function(e){var t=this;e.title="click to copy",e.addEventListener("click",function(){e.value=(0,r.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")})}},{key:"setPalette",value:function(e){var t=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,o=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":o=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":o=r.PALETTE_MATERIAL_CHROME;break;default:o=(0,r.ensureArray)(this.options.palette)}if(this.options.paletteEditable||o.length>0){var n=function(i,o,n){var r=e.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");r.className="a-color-picker-palette-color",r.style.backgroundColor=i,r.setAttribute("data-color",i),r.title=i,e.insertBefore(r,o),t.palette[i]=!0,n&&t.onPaletteColorAdd(i)},s=function(i,o){i?(e.removeChild(i),t.palette[i.getAttribute("data-color")]=!1,o&&t.onPaletteColorRemove(i.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach(function(t){e.removeChild(t)}),Object.keys(t.palette).forEach(function(e){t.palette[e]=!1}),o&&t.onPaletteColorRemove())};if(o.map(function(e){return(0,r.parseColor)(e,i?"rgbcss4":"hex")}).filter(function(e){return!!e}).forEach(function(e){return n(e)}),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",e.appendChild(a),e.addEventListener("click",function(e){/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?s(null,!0):n(i?(0,r.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,r.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?s(e.target,!0):t.onValueChanged(f,e.target.getAttribute("data-color")))})}else e.addEventListener("click",function(e){/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(f,e.target.getAttribute("data-color"))})}else e.style.display="none"}},{key:"updatePalette",value:function(e){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=e,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(e){case"H":this.H=t;var o=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=o[0],this.G=o[1],this.B=o[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var s=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=s[0],this.G=s[1],this.B=s[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var a=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=a[0],this.G=a[1],this.B=a[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var l=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=l[0],this.S=l[1],this.L=l[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var c=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=c[0],this.S=c[1],this.L=c[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var d=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var u=n(t,3);this.R=u[0],this.G=u[1],this.B=u[2];var h=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=h[0],this.S=h[1],this.L=h[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case m:var p=n(t,4);this.R=p[0],this.G=p[1],this.B=p[2],this.A=p[3];var b=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case g:var v=n(t,4);this.H=v[0],this.S=v[1],this.L=v[2],this.A=v[3];var y=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=y[0],this.G=y[1],this.B=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var w=n((0,r.cssColorToRgb)(t)||[this.R,this.G,this.B],3);this.R=w[0],this.G=w[1],this.B=w[2];var _=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=_[0],this.S=_[1],this.L=_[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var k=n((0,r.parseColor)(t,"rgba")||[0,0,0,1],4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var C=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=C[0],this.S=C[1],this.L=C[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value:function(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value:function(e,t,i){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=i)}},{key:"updateInputRGB",value:function(e,t,i){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(e,t,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,r.rgbToHex)(e,t,i))}},{key:"updatePointerH",value:function(e){var t=this.options.hueBarSize[0]*e/360;this.huePointer.style.left=t-7+"px"}},{key:"updatePointerSL",value:function(e,t,i){var o=n((0,r.hslToRgb)(e,t,i),3),s=o[0],a=o[1],l=o[2],c=n(this.slBarHelper.findColor(s,a,l),2),d=c[0],u=c[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=u-7+"px")}},{key:"updatePointerA",value:function(e){if(this.options.showAlpha){var t=this.options.alphaBarSize[0]*e;this.alphaPointer.style.left=t-7+"px"}}}]),e}(),k=function(){function e(t){c(this,e),this.name=t,this.listeners=[]}return o(e,[{key:"on",value:function(e){e&&this.listeners.push(e)}},{key:"off",value:function(e){this.listeners=e?this.listeners.filter(function(t){return t!==e}):[]}},{key:"emit",value:function(e,t){for(var i=this.listeners.slice(0),o=0;o<i.length;o++)i[o].apply(t,e)}}]),e}();function C(e,t){var i=new _(e,t),o={change:new k("change"),coloradd:new k("coloradd"),colorremove:new k("colorremove")},s=!0,a={},l={get element(){return i.element},get rgb(){return[i.R,i.G,i.B]},set rgb(e){var t=n(e,3),o=t[0],s=t[1],a=t[2],l=[(0,r.limit)(o,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255)];o=l[0],s=l[1],a=l[2],i.onValueChanged(m,[o,s,a,1])},get hsl(){return[i.H,i.S,i.L]},set hsl(e){var t=n(e,3),o=t[0],s=t[1],a=t[2],l=[(0,r.limit)(o,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100)];o=l[0],s=l[1],a=l[2],i.onValueChanged(g,[o,s,a,1])},get rgbhex(){return this.all.hex},get rgba(){return[i.R,i.G,i.B,i.A]},set rgba(e){var t=n(e,4),o=t[0],s=t[1],a=t[2],l=t[3],c=[(0,r.limit)(o,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255),(0,r.limit)(l,0,1)];o=c[0],s=c[1],a=c[2],l=c[3],i.onValueChanged(m,[o,s,a,l])},get hsla(){return[i.H,i.S,i.L,i.A]},set hsla(e){var t=n(e,4),o=t[0],s=t[1],a=t[2],l=t[3],c=[(0,r.limit)(o,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100),(0,r.limit)(l,0,1)];o=c[0],s=c[1],a=c[2],l=c[3],i.onValueChanged(g,[o,s,a,l])},get color(){return this.all.toString()},set color(e){i.onValueChanged(f,e)},setColor:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,e,{silent:t})},get all(){if(s){var e=[i.R,i.G,i.B,i.A],t=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":r.rgbToHex.apply(void 0,e);(a=(0,r.parseColor)(e,a)).toString=function(){return t},s=!1}return Object.assign({},a)},get onchange(){return o.change&&o.change.listeners[0]},set onchange(e){this.off("change").on("change",e)},get oncoloradd(){return o.coloradd&&o.coloradd.listeners[0]},set oncoloradd(e){this.off("coloradd").on("coloradd",e)},get oncolorremove(){return o.colorremove&&o.colorremove.listeners[0]},set oncolorremove(e){this.off("colorremove").on("colorremove",e)},get palette(){return Object.keys(i.palette).filter(function(e){return i.palette[e]})},set palette(e){i.updatePalette(e)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(e,t){return e&&o[e]&&o[e].on(t),this},off:function(e,t){return e&&o[e]&&o[e].off(t),this},destroy:function(){o.change.off(),o.coloradd.off(),o.colorremove.off(),i.element.remove(),o=null,i=null}};return i.onchange=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s=!0,o.change.emit([l].concat(t),l)},i.oncoloradd=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];o.coloradd.emit([l].concat(t),l)},i.oncolorremove=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];o.colorremove.emit([l].concat(t),l)},i.element.ctrl=l,l}if("u">typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var S=i(5).toString(),x=document.createElement("style");x.setAttribute("type","text/css"),x.setAttribute("data-source","a-color-picker"),x.innerHTML=S,document.querySelector("head").appendChild(x)}t.createPicker=C,t.from=function(e,t){var i=(e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(d(e)):"string"==typeof e?[].concat(d(document.querySelectorAll(e))):e.jquery?e.get():[]:[]).map(function(e,i){var o=C(e,t);return o.index=i,o});return i.on=function(e,t){return i.forEach(function(i){return i.on(e,t)}),this},i.off=function(e){return i.forEach(function(t){return t.off(e)}),this},i},t.parseColorToRgb=r.parseColorToRgb,t.parseColorToRgba=r.parseColorToRgba,t.parseColorToHsl=r.parseColorToHsl,t.parseColorToHsla=r.parseColorToHsla,t.parseColor=r.parseColor,t.rgbToHex=r.rgbToHex,t.hslToRgb=r.hslToRgb,t.rgbToHsl=r.rgbToHsl,t.rgbToHsv=r.rgbToHsv,t.rgbToInt=r.rgbToInt,t.intToRgb=r.intToRgb,t.getLuminance=r.getLuminance,t.COLOR_NAMES=r.COLOR_NAMES,t.PALETTE_MATERIAL_500=r.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=r.PALETTE_MATERIAL_CHROME,t.VERSION="1.2.1"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var o,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,r=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=(o=i(0))&&o.__esModule?o:{default:o};function s(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4","indianred ":"#CD5C5C","indigo ":"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function l(e,t,i){return isNaN(e*=1)||t>e?t:e>i?i:e}function c(e,t){return null==e?t:e}function d(e,t,i){var o=[l(e,0,255),l(t,0,255),l(i,0,255)];return"#"+("000000"+((e=o[0])<<16|(t=o[1])<<8|(i=o[2])).toString(16)).slice(-6)}function u(e,t,i){var o=void 0,n=void 0,r=void 0,s=[l(e,0,360)/360,l(t,0,100)/100,l(i,0,100)/100];if(e=s[0],i=s[2],0==(t=s[1]))o=n=r=i;else{var a=function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},c=i<.5?i*(1+t):i+t-i*t,d=2*i-c;o=a(d,c,e+1/3),n=a(d,c,e),r=a(d,c,e-1/3)}return[255*o,255*n,255*r].map(Math.round)}function h(e,t,i){var o=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],n=Math.max(e=o[0],t=o[1],i=o[2]),r=Math.min(e,t,i),s=void 0,a=void 0,c=(n+r)/2;if(n==r)s=a=0;else{var d=n-r;switch(a=c>.5?d/(2-n-r):d/(n+r),n){case e:s=(t-i)/d+6*(t<i);break;case t:s=(i-e)/d+2;break;case i:s=(e-t)/d+4}s/=6}return[360*s,100*a,100*c].map(Math.round)}function p(e,t,i){return e<<16|t<<8|i}function f(e){if(e){var t=a[e.toString().toLowerCase()],i=n(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(t||e)||[],10),o=i[3],r=i[4],s=i[5],l=i[7],c=i[8],d=i[9];if(void 0!==o)return[parseInt(o+o,16),parseInt(r+r,16),parseInt(s+s,16)];if(void 0!==l)return[parseInt(l,16),parseInt(c,16),parseInt(d,16)]}}function m(e){if(e){var t=a[e.toString().toLowerCase()],i=n(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(t||e)||[],12),o=i[3],r=i[4],s=i[5],l=i[6],c=i[8],d=i[9],u=i[10],h=i[11];if(void 0!==o)return[parseInt(o+o,16),parseInt(r+r,16),parseInt(s+s,16),l?+(parseInt(l+l,16)/255).toFixed(2):1];if(void 0!==c)return[parseInt(c,16),parseInt(d,16),parseInt(u,16),h?+(parseInt(h,16)/255).toFixed(2):1]}}function g(e){if(e){var t=n(/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],o=t[1],r=t[2],s=t[3];return i?[l(o,0,255),l(r,0,255),l(s,0,255)]:void 0}}function b(e){if(e){var t=n(/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],o=t[1],r=t[2],s=t[3],a=t[5];return i?[l(o,0,255),l(r,0,255),l(s,0,255),l(c(a,1),0,1)]:void 0}}function v(e){if(Array.isArray(e))return[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255),l(c(e[3],1),0,1)];var t=m(e)||b(e);return t&&3===t.length&&t.push(1),t}function y(e){if(e){var t=n(/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],o=t[1],r=t[2],s=t[3];return i?[l(o,0,360),l(r,0,100),l(s,0,100)]:void 0}}function w(e){if(e){var t=n(/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],o=t[1],r=t[2],s=t[3],a=t[5];return i?[l(o,0,255),l(r,0,255),l(s,0,255),l(c(a,1),0,1)]:void 0}}function _(e){if(Array.isArray(e))return[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100),l(c(e[3],1),0,1)];var t=w(e);return t&&3===t.length&&t.push(1),t}function k(e,t){switch(t){case"rgb":default:return e.slice(0,3);case"rgbcss":return"rgb("+e[0]+", "+e[1]+", "+e[2]+")";case"rgbcss4":return"rgb("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"rgba":return e;case"rgbacss":return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"hsl":return h.apply(void 0,s(e));case"hslcss":return"hsl("+(e=h.apply(void 0,s(e)))[0]+", "+e[1]+", "+e[2]+")";case"hslcss4":var i=h.apply(void 0,s(e));return"hsl("+i[0]+", "+i[1]+", "+i[2]+", "+e[3]+")";case"hsla":return[].concat(s(h.apply(void 0,s(e))),[e[3]]);case"hslacss":var o=h.apply(void 0,s(e));return"hsla("+o[0]+", "+o[1]+", "+o[2]+", "+e[3]+")";case"hex":return d.apply(void 0,s(e));case"hexcss4":return d.apply(void 0,s(e))+("00"+parseInt(255*e[3]).toString(16)).slice(-2);case"int":return p.apply(void 0,s(e))}}t.COLOR_NAMES=a,t.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],t.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],t.rgbToHex=d,t.hslToRgb=u,t.rgbToHsl=h,t.rgbToHsv=function(e,t,i){var o=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],n,r=Math.max(e=o[0],t=o[1],i=o[2]),s=Math.min(e,t,i),a=void 0,c=r-s;if(n=0===r?0:c/r,r==s)a=0;else{switch(r){case e:a=(t-i)/c+6*(t<i);break;case t:a=(i-e)/c+2;break;case i:a=(e-t)/c+4}a/=6}return[a,n,r]},t.rgbToInt=p,t.intToRgb=function(e){return[e>>16&255,e>>8&255,255&e]},t.cssColorToRgb=f,t.cssColorToRgba=m,t.cssRgbToRgb=g,t.cssRgbaToRgba=b,t.parseColorToRgb=function(e){return Array.isArray(e)?e=[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255)]:f(e)||g(e)},t.parseColorToRgba=v,t.cssHslToHsl=y,t.cssHslaToHsla=w,t.parseColorToHsl=function(e){return Array.isArray(e)?e=[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100)]:y(e)},t.parseColorToHsla=_,t.parseColor=function(e,t){if(t=t||"rgb",null!=e){var i=void 0;if((i=v(e))||(i=_(e))&&(i=[].concat(s(u.apply(void 0,s(i))),[i[3]])))return(0,r.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(function(e,t){return e[t]=k(i,t),e},t||{}):k(i,t.toString().toLowerCase())}},t.getLuminance=function(e,t,i){return .2126*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},t.limit=l,t.ensureArray=function(e){return e?Array.from(e):[]},t.nvl=c},function(e,t,i){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t){e.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},function(e,t,i){var o=i(6);e.exports="string"==typeof o?o:o.toString()},function(e,t,i){(e.exports=i(7)(!1)).push([e.i,`/*!
8
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("{}"));else if("function"==typeof define&&define.amd)define(["{}"],t);else{var i="object"==typeof exports?t(require("{}")):t(e["{}"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,function(e){return function(){var t,i,o={94668:function(e){e.exports='<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="M13 3H5v18h14V9l-6-6Zm0 0v6h6M12 12v6m-3-3h6"/> </g> </svg>'},86428:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> \x3c!-- Background rounded rect --\x3e <rect x="1" y="1" width="22" height="22" rx="3"/> \x3c!-- Letter A - outer shape --\x3e <polygon points="8,5 2,19 5,19 6.5,16 11.5,16 13,19 16,19 10,5" fill="white"/> \x3c!-- Letter A - inner triangle (hole) --\x3e <polygon points="9,9 7.5,13 10.5,13" fill="currentColor"/> \x3c!-- Letter I --\x3e <rect x="17" y="5" width="3" height="14" fill="white"/> </svg>'},75966:function(e){e.exports='<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 17 11-11 4 4L7 21Zm8-8 4 4M5 3v4M3 5h4M19 2v4m-2-2h4m-1 12v4m-2-2h4"/> </g> </svg>'},83207:function(e){e.exports='<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 6 6 6-6 6"/> </g> </svg>'},99219:function(e){e.exports='<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 10 18-7-7 18-3-8-8-3Zm8 3L21 3"/> </g> </svg>'},63674:function(e){e.exports='<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 2 4 5v7c0 5 8 10 8 10s8-5 8-10V5l-8-3Z"/> </g> </svg>'},4133:function(e){e.exports='<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="m13 2-9 12h6l-1 8 11-13h-7V2Z"/> </g> </svg>'},68583:function(e){e.exports='<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 4v6h6M3 10l4-4a8 8 0 1 1-1 12M12 8v5l3 2"/> </g> </svg>'},34586:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="20" height="13" rx="3"/><path d="m11 11 2 11 2-4 4-1-8-6"/> </g> </svg>'},91729:function(e){e.exports='<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 19 8 5l6 14M4.5 13h7M21 12v7m0-5a3 3 0 1 0 0 3"/> </g> </svg>'},97467:function(e){e.exports='<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 20v-7M12 20V4M19 20v-5M3 20h18"/> </g> </svg>'},46995:function(e){e.exports='<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="12" cy="12" r="9"/><path d="M8 9h0m8 0h0M8 15a5 5 0 0 0 8 0"/> </g> </svg>'},83556:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M2 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> <path d="M17 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0" fill="none" /> <path d="M9.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5" fill="none" /> <path d="M19.5 15l3 6" fill="none" /> <path d="M19.5 21l3 -6" fill="none" /> </svg>'},4872:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6" fill="none" /> <path d="M17 18h2" fill="none" /> <path d="M20 15h-3v6" fill="none" /> <path d="M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> </svg>'},53121:function(e){e.exports='<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 3H5v18h14v-7M12 12l9-9m-6 0h6v6"/> </g> </svg>'},7307:function(e){e.exports='<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 21 3.5 12.5a5 5 0 0 1 7-7L12 7l1.5-1.5a5 5 0 0 1 7 7L12 21Z"/> </g> </svg>'},24928:function(e){e.exports='<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 11 10-8 10 8M5 9v12h5v-7h4v7h5V9"/> </g> </svg>'},96910:function(e){e.exports='<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 7V4h6l3 3h9v14H3V7ZM12 11v7m-3.5-3.5h7"/> </g> </svg>'},81122:function(e){e.exports='<svg viewBox="0 0 83 84" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="40" cy="44" r="37" stroke="black" stroke-width="6"/> <path d="M40 4V44H79" stroke="black" stroke-width="5"/> <circle cx="40" cy="6" r="6" fill="#C8C8C8"/> <circle cx="40" cy="43" r="6" fill="#C8C8C8"/> <circle cx="77" cy="44" r="6" fill="#C8C8C8"/> </svg>'},49377:function(e){e.exports='<svg viewBox="0 0 76 76" xmlns="http://www.w3.org/2000/svg"> <path d="M38 6.90909C36.2517 6.90909 34.7591 7.58381 33.5221 8.93324C32.2852 10.2827 31.6667 11.911 31.6667 13.8182V20.7273H30.0833V15.7074C30.0833 13.9801 29.5556 12.5137 28.5 11.3082C27.4444 10.1027 26.125 9.5 24.5417 9.5C23.0243 9.5 21.7214 10.0938 20.6328 11.2813C19.5443 12.4688 19 13.8902 19 15.5455V38.7017L17.4167 37.0824V27.7983C17.4167 26.071 16.8889 24.6046 15.8333 23.3991C14.7778 22.1937 13.4583 21.5909 11.875 21.5909C10.3576 21.5909 9.05469 22.1847 7.96615 23.3722C6.8776 24.5597 6.33333 25.9811 6.33333 27.6364V39.7273C6.33333 41.4186 6.91059 42.8939 8.0651 44.1534L23.4036 60.1307C24.6901 61.5341 25.3333 63.3693 25.3333 65.6364C25.3333 66.572 25.6467 67.3816 26.2734 68.0653C26.9002 68.7491 27.6424 69.0909 28.5 69.0909H60.1667C61.0243 69.0909 61.7665 68.7491 62.3932 68.0653C63.02 67.3816 63.3333 66.572 63.3333 65.6364V64.2869C63.3333 62.8116 63.4983 61.4261 63.8281 60.1307L69.1719 36.5966C69.5017 35.3011 69.6667 33.9157 69.6667 32.4403V19.1619C69.6667 17.4347 69.1389 15.9683 68.0833 14.7628C67.0278 13.5573 65.7083 12.9545 64.125 12.9545C62.6076 12.9545 61.3047 13.5483 60.2161 14.7358C59.1276 15.9233 58.5833 17.3447 58.5833 19V20.7273H57V13.9801C57 12.5407 56.5877 11.2363 55.763 10.0668C54.9384 8.89725 53.8828 8.16856 52.5964 7.88068C52.1345 7.80871 51.7552 7.77273 51.4583 7.77273C49.941 7.77273 48.638 8.36648 47.5495 9.55398C46.4609 10.7415 45.9167 12.1629 45.9167 13.8182V20.7273H44.3333V14.142C44.3333 12.3068 43.7973 10.6965 42.7253 9.31108C41.6532 7.92566 40.2925 7.14299 38.6432 6.96307C38.4783 6.92708 38.2639 6.90909 38 6.90909ZM38 0C40.7708 0 43.2283 0.899621 45.3724 2.69886C47.2526 1.47538 49.2813 0.863636 51.4583 0.863636C53.4045 0.863636 55.2352 1.34943 56.9505 2.32102C58.6658 3.29261 60.0842 4.66004 61.2057 6.4233C62.0964 6.1714 63.0694 6.04545 64.125 6.04545C67.4236 6.04545 70.2274 7.33191 72.5365 9.90483C74.8455 12.4777 76 15.5634 76 19.1619V32.4403C76 34.2756 75.7856 36.2188 75.3568 38.2699L69.9635 61.804C69.7656 62.6676 69.6667 63.9451 69.6667 65.6364C69.6667 68.5152 68.7431 70.9621 66.8958 72.9773C65.0486 74.9924 62.8056 76 60.1667 76H28.5C25.7292 76 23.4531 74.9474 21.6719 72.8423C19.8906 70.7372 19 68.1733 19 65.1506L3.76042 49.1733C1.25347 46.5464 0 43.3977 0 39.7273V27.6364C0 24.0739 1.16276 21.0241 3.48828 18.4872C5.8138 15.9503 8.60938 14.6818 11.875 14.6818C12.2378 14.6818 12.5017 14.6998 12.6667 14.7358C12.8646 11.3172 14.1098 8.43845 16.4023 6.09943C18.6949 3.76042 21.408 2.59091 24.5417 2.59091C26.2569 2.59091 27.8733 2.96875 29.3906 3.72443C31.7656 1.24148 34.6354 0 38 0Z"/> </svg>'},46425:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M23,13.6l5,5V4c0-0.6-0.4-1-1-1h-4V13.6z"/> <polygon points="12.4,3 16.7,7.3 19.7,10.3 21,11.6 21,3"/> <path d="M14.6,8l-5-5H5C4.4,3,4,3.4,4,4v14.6L14.6,8z"/> </g> <path d="M28.8,29.2L26,26.4c0.7-1,1-2.1,1-3.4c0-3.3-2.7-6-6-6s-6,2.7-6,6s2.7,6,6,6c1.2,0,2.4-0.4,3.4-1l2.8,2.8 c0.4,0.4,1.2,0.4,1.6,0C29.2,30.4,29.2,29.6,28.8,29.2z"/> <path d="M13,23c0-4.4,3.6-8,8-8c0.2,0,0.4,0,0.6,0l-0.3-0.3c0,0,0,0,0,0l-3-3L16,9.4l-12,12V26c0,0.6,0.4,1,1,1h9.1 C13.4,25.8,13,24.5,13,23z"/> </svg>'},86820:function(e){e.exports='<svg viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M44 0.513519C27.2931 0.513519 13.75 13.8981 13.75 30.4095C13.75 46.9208 44 87.4835 44 87.4835C44 87.4835 74.25 46.9208 74.25 30.4095C74.25 13.8981 60.7069 0.513519 44 0.513519ZM19.25 30.4095C19.25 16.921 30.3518 5.94914 44 5.94914C57.6482 5.94914 68.75 16.921 68.75 30.4095C68.75 39.8049 54.9945 62.4871 44 78.1329C33.0055 62.4871 19.25 39.8049 19.25 30.4095ZM44 16.8204C36.4052 16.8204 30.25 22.9035 30.25 30.4095C30.25 37.9154 36.4052 43.9985 44 43.9985C51.5948 43.9985 57.75 37.9154 57.75 30.4095C57.75 22.9035 51.5948 16.8204 44 16.8204ZM44 38.5629C39.4508 38.5629 35.75 34.9054 35.75 30.4095C35.75 25.9135 39.4508 22.256 44 22.256C48.5492 22.256 52.25 25.9135 52.25 30.4095C52.25 34.9054 48.5492 38.5629 44 38.5629Z" fill="#404040"/> </g> <defs> <rect width="88" height="86.97" fill="white" transform="translate(0 0.513519)"/> </defs> </svg>'},36576:function(e){e.exports='<svg viewBox="0 0 77 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 38.6056L33.1367 7.96263L69.5477 45.7058L36.2444 72.166L7 76.9673V38.6056Z" stroke="black" stroke-width="6"/> <circle cx="71" cy="45" r="6" fill="#C8C8C8"/> <circle cx="35" cy="73" r="6" fill="#C8C8C8"/> <circle cx="6" cy="79" r="6" fill="#C8C8C8"/> <circle cx="6" cy="39" r="6" fill="#C8C8C8"/> <circle cx="33" cy="6" r="6" fill="#C8C8C8"/> </svg>'},27622:function(e){e.exports='<svg width="72" height="86" viewBox="0 0 72 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17.1832 79.1351L13.6833 45.0811L49.6832 58.4595L47.6832 5.35135" stroke="black" stroke-width="6"/> <circle cx="13" cy="44" r="6" fill="#C8C8C8"/> <circle cx="17" cy="77" r="6" fill="#C8C8C8"/> <circle cx="51" cy="59" r="6" fill="#C8C8C8"/> <circle cx="48" cy="6" r="6" fill="#C8C8C8"/> </svg>'},89687:function(e){e.exports='<svg viewBox="0 0 47 61" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M46.7671 7.12793H27.3433V61H19.416V7.12793H0.0336914V0.570312H46.7671V7.12793Z" fill="black"/> </svg>'},25088:function(e){e.exports='<svg width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z" fill="black"/> </svg>'},67008:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="3" width="20" height="18" rx="2"/><path d="M2 8h20m-13 4-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},63643:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 9h0m4 0h0m4 0h0m4 0h0M6 13h0m4 0h0m4 0h0m4 0h0M8 16h8"/> </g> </svg>'},27926:function(e){e.exports='<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 5h12v14H9l-7-7 7-7Zm3 4 6 6m0-6-6 6"/> </g> </svg>'},10690:function(e){e.exports='<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 11 8-8 8 8h-5v6H9v-6H4ZM8 21h8"/> </g> </svg>'},91997:function(e){e.exports='<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 12h0m7 0h0m7 0h0"/> </g> </svg>'},11699:function(e){e.exports='<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 11 8-8 8 8h-5v10H9V11H4Z"/> </g> </svg>'},98126:function(e){e.exports='<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 12h14m-4-4 4 4-4 4M21 5v14"/> </g> </svg>'},27222:function(e){e.exports='<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="6" y="2" width="12" height="20" rx="3"/><path d="M10 5h4M12 18h0"/> </g> </svg>'},17405:function(e){e.exports='<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 8V3h14v5M5 16v5h14v-5M2 12h3m4 0h3m4 0h3m3 0h0"/> </g> </svg>'},75689:function(e){e.exports='<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"/><path d="m9 11-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},78879:function(e){e.exports='<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 7V3h4m4 0h3m4 0h3v4m0 4v3m0 4v3h-4m-4 0h-3m-4 0H3v-4m0-4v-3M7 8h10M7 12h10M7 16h6"/> </g> </svg>'},78955:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><path d="M14 6h7m-7 4h4m-4 7h7m-7 4h4"/> </g> </svg>'},18993:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M10 9v12M14 13h3m-3 4h3"/> </g> </svg>'},11373:function(e){e.exports='<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 6 2 2 3-4M12 6h9m-18 7 2 2 3-4m4 2h9M3 20h4m5 0h9"/> </g> </svg>'},74922:function(e){e.exports='<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 7h18m-4-4 4 4-4 4M21 17H3m4-4-4 4 4 4"/> </g> </svg>'},34575:function(e){e.exports='<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 5h11M8 3v2m4 0c-1 6-4 10-9 12M5 8c1 3 3 5 6 7m2 7 4-11 4 11m-6-4h4"/> </g> </svg>'},46146:function(e){"u">typeof self&&self,e.exports=function(){var e=[function(e,t,i){"use strict";var o=i(3);function n(e){return!0===o(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,i;return!1!==n(e)&&"function"==typeof(t=e.constructor)&&!1!==n(i=t.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,r=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=i(2),s=l(i(0)),a=l(i(4));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var u="u">typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,h="u">typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",m="RGBA_USER",g="HSLA_USER";function b(e,t,i){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):i?t:null:t}function v(e){var t=e.getContext("2d"),i=+e.width,o=+e.height,s=t.createLinearGradient(1,1,1,o-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(e){var n=t.createLinearGradient(1,0,i-1,0);n.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),n.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=s,t.fillRect(0,0,i,o),t.fillStyle=n,t.globalCompositeOperation="multiply",t.fillRect(0,0,i,o),t.globalCompositeOperation="source-over"},grabColor:function(e,i){return t.getImageData(e,i,1,1).data},findColor:function(e,t,s){var a=n((0,r.rgbToHsv)(e,t,s),3);return[a[1]*i,o-a[2]*o]}}}function y(e,t,i){return null===e?t:/^\s*$/.test(e)?i:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}function w(e,t,i){if(null===e)return t;if(/^\s*$/.test(e))return i;var o=e.split(",").map(Number);return 2===o.length&&o[0]&&o[1]?o:t}var _=function(){function e(t,i){if(c(this,e),i?(t=b(t),this.options=Object.assign({},p,i)):t&&(0,s.default)(t)?(this.options=Object.assign({},p,t),t=b(this.options.attachTo)):(this.options=Object.assign({},p),t=b((0,r.nvl)(t,this.options.attachTo))),!t)throw Error("Container not found: "+this.options.attachTo);!function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(i+"show-hsl")&&(e.showHSL=y(t.getAttribute(i+"show-hsl"),p.showHSL,!0)),t.hasAttribute(i+"show-rgb")&&(e.showRGB=y(t.getAttribute(i+"show-rgb"),p.showRGB,!0)),t.hasAttribute(i+"show-hex")&&(e.showHEX=y(t.getAttribute(i+"show-hex"),p.showHEX,!0)),t.hasAttribute(i+"show-alpha")&&(e.showAlpha=y(t.getAttribute(i+"show-alpha"),p.showAlpha,!0)),t.hasAttribute(i+"palette-editable")&&(e.paletteEditable=y(t.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),t.hasAttribute(i+"sl-bar-size")&&(e.slBarSize=w(t.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),t.hasAttribute(i+"hue-bar-size")&&(e.hueBarSize=w(t.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),e.alphaBarSize=e.hueBarSize),t.hasAttribute(i+"palette")){var o=t.getAttribute(i+"palette");switch(o){case"PALETTE_MATERIAL_500":e.palette=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=r.PALETTE_MATERIAL_CHROME;break;default:e.palette=o.split(/[;|]/)}}t.hasAttribute(i+"color")&&(e.color=t.getAttribute(i+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,t.appendChild(this.element);var o=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(o),this.hueBarHelper=v(o),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var n=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(n),this.slBarHelper=v(n),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return o(e,[{key:"setupHueCanvas",value:function(e){var t=this;e.width=this.options.hueBarSize[0],e.height=this.options.hueBarSize[1];for(var i=e.getContext("2d"),o=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),n=0;n<=1;n+=1/360)o.addColorStop(n,"hsl("+360*n+", 100%, 50%)");i.fillStyle=o,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.hueBarSize[0]),n=Math.round(360*o/t.options.hueBarSize[0]);t.huePointer.style.left=o-7+"px",t.onValueChanged("H",n)},a=function e(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){s(e),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)})}},{key:"setupSlCanvas",value:function(e){var t=this;e.width=this.options.slBarSize[0],e.height=this.options.slBarSize[1];var i=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.slBarSize[0]-1),n=(0,r.limit)(i.clientY-e.getBoundingClientRect().top,0,t.options.slBarSize[1]-1),s=t.slBarHelper.grabColor(o,n);t.slPointer.style.left=o-7+"px",t.slPointer.style.top=n-7+"px",t.onValueChanged("RGB",s)},o=function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){i(e),document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)})}},{key:"setupAlphaCanvas",value:function(e){var t=this;e.width=this.options.alphaBarSize[0],e.height=this.options.alphaBarSize[1];var i=e.getContext("2d"),o=i.createLinearGradient(0,0,e.width-1,0);o.addColorStop(0,"hsla(0, 0%, 50%, 0)"),o.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=o,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var n=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.alphaBarSize[0]),n=+(o/t.options.alphaBarSize[0]).toFixed(2);t.alphaPointer.style.left=o-7+"px",t.onValueChanged("ALPHA",n)},s=function e(){document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){n(e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)})}},{key:"setupInput",value:function(e){var t=this,i=+e.min,o=+e.max,n=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",function(){e.select()}),"text"===e.type?e.addEventListener("change",function(){t.onValueChanged(n,e.value)}):((u||h)&&e.addEventListener("keydown",function(s){"Up"===s.key?(e.value=(0,r.limit)(+e.value+1,i,o),t.onValueChanged(n,e.value),s.returnValue=!1):"Down"===s.key&&(e.value=(0,r.limit)(e.value-1,i,o),t.onValueChanged(n,e.value),s.returnValue=!1)}),e.addEventListener("change",function(){var s=+e.value;t.onValueChanged(n,(0,r.limit)(s,i,o))}))}},{key:"setupClipboard",value:function(e){var t=this;e.title="click to copy",e.addEventListener("click",function(){e.value=(0,r.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")})}},{key:"setPalette",value:function(e){var t=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,o=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":o=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":o=r.PALETTE_MATERIAL_CHROME;break;default:o=(0,r.ensureArray)(this.options.palette)}if(this.options.paletteEditable||o.length>0){var n=function(i,o,n){var r=e.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");r.className="a-color-picker-palette-color",r.style.backgroundColor=i,r.setAttribute("data-color",i),r.title=i,e.insertBefore(r,o),t.palette[i]=!0,n&&t.onPaletteColorAdd(i)},s=function(i,o){i?(e.removeChild(i),t.palette[i.getAttribute("data-color")]=!1,o&&t.onPaletteColorRemove(i.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach(function(t){e.removeChild(t)}),Object.keys(t.palette).forEach(function(e){t.palette[e]=!1}),o&&t.onPaletteColorRemove())};if(o.map(function(e){return(0,r.parseColor)(e,i?"rgbcss4":"hex")}).filter(function(e){return!!e}).forEach(function(e){return n(e)}),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",e.appendChild(a),e.addEventListener("click",function(e){/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?s(null,!0):n(i?(0,r.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,r.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?s(e.target,!0):t.onValueChanged(f,e.target.getAttribute("data-color")))})}else e.addEventListener("click",function(e){/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(f,e.target.getAttribute("data-color"))})}else e.style.display="none"}},{key:"updatePalette",value:function(e){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=e,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(e){case"H":this.H=t;var o=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=o[0],this.G=o[1],this.B=o[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var s=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=s[0],this.G=s[1],this.B=s[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var a=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=a[0],this.G=a[1],this.B=a[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var l=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=l[0],this.S=l[1],this.L=l[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var c=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=c[0],this.S=c[1],this.L=c[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var d=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var u=n(t,3);this.R=u[0],this.G=u[1],this.B=u[2];var h=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=h[0],this.S=h[1],this.L=h[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case m:var p=n(t,4);this.R=p[0],this.G=p[1],this.B=p[2],this.A=p[3];var b=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case g:var v=n(t,4);this.H=v[0],this.S=v[1],this.L=v[2],this.A=v[3];var y=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=y[0],this.G=y[1],this.B=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var w=n((0,r.cssColorToRgb)(t)||[this.R,this.G,this.B],3);this.R=w[0],this.G=w[1],this.B=w[2];var _=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=_[0],this.S=_[1],this.L=_[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var k=n((0,r.parseColor)(t,"rgba")||[0,0,0,1],4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var C=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=C[0],this.S=C[1],this.L=C[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value:function(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value:function(e,t,i){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=i)}},{key:"updateInputRGB",value:function(e,t,i){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(e,t,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,r.rgbToHex)(e,t,i))}},{key:"updatePointerH",value:function(e){var t=this.options.hueBarSize[0]*e/360;this.huePointer.style.left=t-7+"px"}},{key:"updatePointerSL",value:function(e,t,i){var o=n((0,r.hslToRgb)(e,t,i),3),s=o[0],a=o[1],l=o[2],c=n(this.slBarHelper.findColor(s,a,l),2),d=c[0],u=c[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=u-7+"px")}},{key:"updatePointerA",value:function(e){if(this.options.showAlpha){var t=this.options.alphaBarSize[0]*e;this.alphaPointer.style.left=t-7+"px"}}}]),e}(),k=function(){function e(t){c(this,e),this.name=t,this.listeners=[]}return o(e,[{key:"on",value:function(e){e&&this.listeners.push(e)}},{key:"off",value:function(e){this.listeners=e?this.listeners.filter(function(t){return t!==e}):[]}},{key:"emit",value:function(e,t){for(var i=this.listeners.slice(0),o=0;o<i.length;o++)i[o].apply(t,e)}}]),e}();function C(e,t){var i=new _(e,t),o={change:new k("change"),coloradd:new k("coloradd"),colorremove:new k("colorremove")},s=!0,a={},l={get element(){return i.element},get rgb(){return[i.R,i.G,i.B]},set rgb(e){var t=n(e,3),o=t[0],s=t[1],a=t[2],l=[(0,r.limit)(o,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255)];o=l[0],s=l[1],a=l[2],i.onValueChanged(m,[o,s,a,1])},get hsl(){return[i.H,i.S,i.L]},set hsl(e){var t=n(e,3),o=t[0],s=t[1],a=t[2],l=[(0,r.limit)(o,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100)];o=l[0],s=l[1],a=l[2],i.onValueChanged(g,[o,s,a,1])},get rgbhex(){return this.all.hex},get rgba(){return[i.R,i.G,i.B,i.A]},set rgba(e){var t=n(e,4),o=t[0],s=t[1],a=t[2],l=t[3],c=[(0,r.limit)(o,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255),(0,r.limit)(l,0,1)];o=c[0],s=c[1],a=c[2],l=c[3],i.onValueChanged(m,[o,s,a,l])},get hsla(){return[i.H,i.S,i.L,i.A]},set hsla(e){var t=n(e,4),o=t[0],s=t[1],a=t[2],l=t[3],c=[(0,r.limit)(o,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100),(0,r.limit)(l,0,1)];o=c[0],s=c[1],a=c[2],l=c[3],i.onValueChanged(g,[o,s,a,l])},get color(){return this.all.toString()},set color(e){i.onValueChanged(f,e)},setColor:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,e,{silent:t})},get all(){if(s){var e=[i.R,i.G,i.B,i.A],t=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":r.rgbToHex.apply(void 0,e);(a=(0,r.parseColor)(e,a)).toString=function(){return t},s=!1}return Object.assign({},a)},get onchange(){return o.change&&o.change.listeners[0]},set onchange(e){this.off("change").on("change",e)},get oncoloradd(){return o.coloradd&&o.coloradd.listeners[0]},set oncoloradd(e){this.off("coloradd").on("coloradd",e)},get oncolorremove(){return o.colorremove&&o.colorremove.listeners[0]},set oncolorremove(e){this.off("colorremove").on("colorremove",e)},get palette(){return Object.keys(i.palette).filter(function(e){return i.palette[e]})},set palette(e){i.updatePalette(e)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(e,t){return e&&o[e]&&o[e].on(t),this},off:function(e,t){return e&&o[e]&&o[e].off(t),this},destroy:function(){o.change.off(),o.coloradd.off(),o.colorremove.off(),i.element.remove(),o=null,i=null}};return i.onchange=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s=!0,o.change.emit([l].concat(t),l)},i.oncoloradd=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];o.coloradd.emit([l].concat(t),l)},i.oncolorremove=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];o.colorremove.emit([l].concat(t),l)},i.element.ctrl=l,l}if("u">typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var S=i(5).toString(),x=document.createElement("style");x.setAttribute("type","text/css"),x.setAttribute("data-source","a-color-picker"),x.innerHTML=S,document.querySelector("head").appendChild(x)}t.createPicker=C,t.from=function(e,t){var i=(e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(d(e)):"string"==typeof e?[].concat(d(document.querySelectorAll(e))):e.jquery?e.get():[]:[]).map(function(e,i){var o=C(e,t);return o.index=i,o});return i.on=function(e,t){return i.forEach(function(i){return i.on(e,t)}),this},i.off=function(e){return i.forEach(function(t){return t.off(e)}),this},i},t.parseColorToRgb=r.parseColorToRgb,t.parseColorToRgba=r.parseColorToRgba,t.parseColorToHsl=r.parseColorToHsl,t.parseColorToHsla=r.parseColorToHsla,t.parseColor=r.parseColor,t.rgbToHex=r.rgbToHex,t.hslToRgb=r.hslToRgb,t.rgbToHsl=r.rgbToHsl,t.rgbToHsv=r.rgbToHsv,t.rgbToInt=r.rgbToInt,t.intToRgb=r.intToRgb,t.getLuminance=r.getLuminance,t.COLOR_NAMES=r.COLOR_NAMES,t.PALETTE_MATERIAL_500=r.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=r.PALETTE_MATERIAL_CHROME,t.VERSION="1.2.1"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var o,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,r=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=(o=i(0))&&o.__esModule?o:{default:o};function s(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4","indianred ":"#CD5C5C","indigo ":"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function l(e,t,i){return isNaN(e*=1)||t>e?t:e>i?i:e}function c(e,t){return null==e?t:e}function d(e,t,i){var o=[l(e,0,255),l(t,0,255),l(i,0,255)];return"#"+("000000"+((e=o[0])<<16|(t=o[1])<<8|(i=o[2])).toString(16)).slice(-6)}function u(e,t,i){var o=void 0,n=void 0,r=void 0,s=[l(e,0,360)/360,l(t,0,100)/100,l(i,0,100)/100];if(e=s[0],i=s[2],0==(t=s[1]))o=n=r=i;else{var a=function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},c=i<.5?i*(1+t):i+t-i*t,d=2*i-c;o=a(d,c,e+1/3),n=a(d,c,e),r=a(d,c,e-1/3)}return[255*o,255*n,255*r].map(Math.round)}function h(e,t,i){var o=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],n=Math.max(e=o[0],t=o[1],i=o[2]),r=Math.min(e,t,i),s=void 0,a=void 0,c=(n+r)/2;if(n==r)s=a=0;else{var d=n-r;switch(a=c>.5?d/(2-n-r):d/(n+r),n){case e:s=(t-i)/d+6*(t<i);break;case t:s=(i-e)/d+2;break;case i:s=(e-t)/d+4}s/=6}return[360*s,100*a,100*c].map(Math.round)}function p(e,t,i){return e<<16|t<<8|i}function f(e){if(e){var t=a[e.toString().toLowerCase()],i=n(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(t||e)||[],10),o=i[3],r=i[4],s=i[5],l=i[7],c=i[8],d=i[9];if(void 0!==o)return[parseInt(o+o,16),parseInt(r+r,16),parseInt(s+s,16)];if(void 0!==l)return[parseInt(l,16),parseInt(c,16),parseInt(d,16)]}}function m(e){if(e){var t=a[e.toString().toLowerCase()],i=n(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(t||e)||[],12),o=i[3],r=i[4],s=i[5],l=i[6],c=i[8],d=i[9],u=i[10],h=i[11];if(void 0!==o)return[parseInt(o+o,16),parseInt(r+r,16),parseInt(s+s,16),l?+(parseInt(l+l,16)/255).toFixed(2):1];if(void 0!==c)return[parseInt(c,16),parseInt(d,16),parseInt(u,16),h?+(parseInt(h,16)/255).toFixed(2):1]}}function g(e){if(e){var t=n(/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],o=t[1],r=t[2],s=t[3];return i?[l(o,0,255),l(r,0,255),l(s,0,255)]:void 0}}function b(e){if(e){var t=n(/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],o=t[1],r=t[2],s=t[3],a=t[5];return i?[l(o,0,255),l(r,0,255),l(s,0,255),l(c(a,1),0,1)]:void 0}}function v(e){if(Array.isArray(e))return[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255),l(c(e[3],1),0,1)];var t=m(e)||b(e);return t&&3===t.length&&t.push(1),t}function y(e){if(e){var t=n(/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],o=t[1],r=t[2],s=t[3];return i?[l(o,0,360),l(r,0,100),l(s,0,100)]:void 0}}function w(e){if(e){var t=n(/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],o=t[1],r=t[2],s=t[3],a=t[5];return i?[l(o,0,255),l(r,0,255),l(s,0,255),l(c(a,1),0,1)]:void 0}}function _(e){if(Array.isArray(e))return[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100),l(c(e[3],1),0,1)];var t=w(e);return t&&3===t.length&&t.push(1),t}function k(e,t){switch(t){case"rgb":default:return e.slice(0,3);case"rgbcss":return"rgb("+e[0]+", "+e[1]+", "+e[2]+")";case"rgbcss4":return"rgb("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"rgba":return e;case"rgbacss":return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"hsl":return h.apply(void 0,s(e));case"hslcss":return"hsl("+(e=h.apply(void 0,s(e)))[0]+", "+e[1]+", "+e[2]+")";case"hslcss4":var i=h.apply(void 0,s(e));return"hsl("+i[0]+", "+i[1]+", "+i[2]+", "+e[3]+")";case"hsla":return[].concat(s(h.apply(void 0,s(e))),[e[3]]);case"hslacss":var o=h.apply(void 0,s(e));return"hsla("+o[0]+", "+o[1]+", "+o[2]+", "+e[3]+")";case"hex":return d.apply(void 0,s(e));case"hexcss4":return d.apply(void 0,s(e))+("00"+parseInt(255*e[3]).toString(16)).slice(-2);case"int":return p.apply(void 0,s(e))}}t.COLOR_NAMES=a,t.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],t.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],t.rgbToHex=d,t.hslToRgb=u,t.rgbToHsl=h,t.rgbToHsv=function(e,t,i){var o=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],n,r=Math.max(e=o[0],t=o[1],i=o[2]),s=Math.min(e,t,i),a=void 0,c=r-s;if(n=0===r?0:c/r,r==s)a=0;else{switch(r){case e:a=(t-i)/c+6*(t<i);break;case t:a=(i-e)/c+2;break;case i:a=(e-t)/c+4}a/=6}return[a,n,r]},t.rgbToInt=p,t.intToRgb=function(e){return[e>>16&255,e>>8&255,255&e]},t.cssColorToRgb=f,t.cssColorToRgba=m,t.cssRgbToRgb=g,t.cssRgbaToRgba=b,t.parseColorToRgb=function(e){return Array.isArray(e)?e=[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255)]:f(e)||g(e)},t.parseColorToRgba=v,t.cssHslToHsl=y,t.cssHslaToHsla=w,t.parseColorToHsl=function(e){return Array.isArray(e)?e=[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100)]:y(e)},t.parseColorToHsla=_,t.parseColor=function(e,t){if(t=t||"rgb",null!=e){var i=void 0;if((i=v(e))||(i=_(e))&&(i=[].concat(s(u.apply(void 0,s(i))),[i[3]])))return(0,r.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(function(e,t){return e[t]=k(i,t),e},t||{}):k(i,t.toString().toLowerCase())}},t.getLuminance=function(e,t,i){return .2126*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},t.limit=l,t.ensureArray=function(e){return e?Array.from(e):[]},t.nvl=c},function(e,t,i){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t){e.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},function(e,t,i){var o=i(6);e.exports="string"==typeof o?o:o.toString()},function(e,t,i){(e.exports=i(7)(!1)).push([e.i,`/*!
9
9
  * a-color-picker
10
10
  * https://github.com/narsenico/a-color-picker
11
11
  *
@@ -14,7 +14,7 @@
14
14
  */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}`,""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=function(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var n="/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */";return[i].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([n]).join(`
15
15
  `)}return[i].join(`
16
16
  `)}(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},n=0;n<this.length;n++){var r=this[n][0];"number"==typeof r&&(o[r]=!0)}for(n=0;n<e.length;n++){var s=e[n];"number"==typeof s[0]&&o[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),t.push(s))}},t}}],t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,(function(t){return e[t]}).bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}()},6441:function(e,t,i){"use strict";i.d(t,{Config:function(){return r}});var o=i(82758);let n={};class r{static get defaultOptions(){return r.__defaultOptions||(r.__defaultOptions=new r),r.__defaultOptions}constructor(){this.cache=!0,this.defaultTimeout=100,this.namespace="",this.safeMode=!1,this.width="auto",this.height="auto",this.safePluginsList=["about","enter","backspace","size","bold","hotkeys"],this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument=o.globalDocument,this.ownerWindow=o.globalWindow,this.shadowRoot=null,this.nonce="",this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.allowCommandsInReadOnly=["selectall","preview","print"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.asyncStorage={},this.editorClassName=!1,this.className=!1,this.style=!1,this.containerStyle=!1,this.styleValues={},this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=200,this.useNativeTooltip=!1,this.defaultActionOnPaste=o.INSERT_AS_HTML,this.enter=o.PARAGRAPH,this.iframe=!1,this.editHTMLDocumentMode=!1,this.enterBlock="br"!==this.enter?this.enter:o.PARAGRAPH,this.defaultMode=o.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.imageDefaultAlign="normal",this.imageAlignClasses=null,this.alignClasses={},this.mediaDefaultAlign="normal",this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={table:{style:"border-collapse:collapse;width: 100%;"}},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},`
17
- `,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,n)}}n=r.prototype,r.prototype.controls={}},26992:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var o=i(82758),n=i(91898),r=i(12045),s=i(23282),a=i(84767),l=i(72430),c=i(14773),d=i(70799),u=i(86068),h=i(38837),p=i(93661);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let o={};(0,u.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(o=t).timeout||0),o.label&&this.clearLabel(o.label);let r=(0,n.setTimeout)(e,t,...i),s=o.label||r;return this.timers.set(s,r),this.__callbacks.set(s,e),r}updateTimeout(e,t){if((0,h.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,n.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,n.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let o=0,a=!1,d=[],u=(...t)=>{if(!a){o=0;let i=e(...t);if(a=!0,d.length){let e=()=>{d.forEach(e=>e()),d.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...r)=>{a=!1,t?(!o&&i&&u(...r),(0,n.clearTimeout)(o),o=this.setTimeout(()=>u(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,o)):u(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{d.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,o=!1,n=!0;return(...r)=>{if(i=r,o){n=!0;return}n=!0,t&&(n=!1,e(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&e(...i)})}}throttle(e,t,i=!1){let o=null,n,r,a;return(...i)=>{(n=!0,a=i,t)?o||(r=()=>{n?(e(...a),n=!1,o=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,o)):o=null})():e(...a)}}promise(e){let t=()=>{},i=new Promise((i,o)=>{t=()=>o((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,o)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let o=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let r=this.setTimeout(()=>{try{o(e())}catch(e){n(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),n((0,p.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,n.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,n;this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=null!=(e=null==queueMicrotask?void 0:queueMicrotask.bind(window))?e:Promise.resolve().then.bind(Promise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=null!=(i=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?i:(e,t)=>{var i;let o=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},null!=(i=null==t?void 0:t.timeout)?i:1)},this.__cancelIdleCallbackNative=null!=(n=null==(o=window.cancelIdleCallback)?void 0:o.bind(window))?n:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,i){"use strict";i.d(t,{Async:function(){return o.Async}});var o=i(26992)},4012:function(e,t,i){"use strict";i.d(t,{Component:function(){return l}});var o=i(8884),n=i(78213),r=i(580),s=i(21537);let a=new Map;class l{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,s.kebabCase)(((0,s.isFunction)(this.className)?this.className():"")||(0,s.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let o=[this.componentName];return e&&o.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(o.push("_",t),o.push("_",(0,s.isVoid)(i)?"true":i.toString())),o.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,s.get)(e,t||this)}get isReady(){return this.componentStatus===n.STATUSES.ready}get isDestructed(){return this.componentStatus===n.STATUSES.destructed}get isInDestruct(){return n.STATUSES.beforeDestruct===this.componentStatus||n.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(n.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(n.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),a.get(this)&&a.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,s.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let o=a.get(this),n=null==o?void 0:o[e];n&&n.length&&n.forEach(e=>e(t))}hookStatus(e,t){let i=a.get(this);i||(i={},a.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new o.Async,this.ownerWindow=window,this.__componentStatus=n.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=n.STATUSES},91907:function(e,t,i){"use strict";i.d(t,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return r.ViewComponent}});var o=i(4012),n=i(78213),r=i(80480)},78213:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return n}});var o=i(4012);class n extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),this.setParentView(e)}}},82758:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return o}});let o=!1,n="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),c=new Set(a),d="Meta",u="Backspace",h="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[d,u,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!==n&&/Mac|iPod|iPhone|iPad/.test(n.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:C,isMin:S}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(n.location.href)})(),x=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.18.3","BASE_PATH",0,C,"BASE_PATH_IS_MIN",0,S,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2021","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/pro/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!0,"IS_IE",0,w,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,_,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:_?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,u,"KEY_DELETE",0,v,"KEY_DOWN",0,b,"KEY_END",0,"End","KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,f,"KEY_META",0,d,"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," ","NEARBY",0,5,"NO_EMPTY_TAGS",0,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,x,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>o=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,w?"html":"text/html","TEXT_PLAIN",0,w?"text":"text/plain","TEXT_RTF",0,w?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,n,"lang",0,{}])},20218:function(e,t,i){"use strict";i.d(t,{Create:function(){return a}});var o=i(82758),n=i(2748),r=i(21537),s=i(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,r.isPlainObject)(t)?(0,r.attr)(o,t):i=t),i&&(0,r.asArray)(i).forEach(e=>n.Dom.append(o,(0,r.isString)(e)?this.fromHTML(e):e)),o}div(e,t,i){let o=this.element("div",t,i);return e&&(o.className=e),o}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});n.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let o=this.element("span",t,i);return e&&(o.className=e),o}a(e,t,i){let o=this.element("a",t,i);return e&&(o.className=e),o}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(n.Dom.safeRemove(o),t){let e=(0,r.refs)(o);Object.keys(t).forEach(i=>{let o=e[i];o&&!1===t[i]&&n.Dom.hide(o)})}return o}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,i){"use strict";i.d(t,{Create:function(){return o.Create}});var o=i(20218)},45219:function(e,t,i){"use strict";i.d(t,{autobind:function(){return n}});var o=i(23282);function n(e,t,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let n=i.value;return{configurable:!0,get(){let e=n.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var o=i(78213),n=i(2748),r=i(27613),s=i(82760);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let o=i.get;if(!o)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){var t;let i,o=null!=(i=this.od)?i:document,r=c.get(o);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&n.Dom.isElement(s)&&(r?r.set(this.constructor,s):c.set(o,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(o.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var o=i(82758),n=i(80568);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,n.getClassName)(e.prototype);if(r.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},81577:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var o=i(91907),n=i(27613),r=i(38837),s=i(89890);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:s}=o;(0,r.assert)(null!=s,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(e)?e(o):e,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:s[i](o[l].bind(o),c,t)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,i){"use strict";i.d(t,{derive:function(){return n}});var o=i(23282);function n(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let n=e[t],r=Object.getOwnPropertyNames(n.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(n.prototype,t);null!=s&&(0,o.isFunction)(s.value)&&!(0,o.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var o=i(23282),n=i(89890);function r(e){return(t,i)=>{if(!(0,o.isFunction)(t[i]))throw(0,n.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},78927:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var o=i(91907),n=i(23282),r=i(89890);function s(){return(e,t)=>{if(!(0,n.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:i}=e,o=e[t];e[t]=(...t)=>i.requestIdleCallback(o.bind(e,...t))})}}},65478:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return d.nonenumerable},persistent:function(){return u.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var o=i(45219),n=i(33433),r=i(87325),s=i(81577),a=i(55153),l=i(97357),c=i(78927),d=i(31589),u=i(53213),h=i(13525),p=i(37133)},31589:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},53213:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var o=i(78213),n=i(39955);function r(e,t){e.hookStatus(o.STATUSES.ready,e=>{let i=(0,n.isViewObject)(e)?e:e.jodit,o=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(o))?e:r},set(e){i.storage.set(o,e)}})})}},13525:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var o=i(78213),n=i(23282),r=i(89890);function s(e){return(t,i)=>{let s=t[i];if(!(0,n.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:o}=t,n=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){o.clearTimeout(r),e(t)?n.apply(t,s):r=o.setTimeout(()=>i(...s),10)}})})}}},37133:function(e,t,i){"use strict";i.d(t,{watch:function(){return u}});var o=i(78213),n=i(73026),r=i(46559),s=i(23282),a=i(72430),l=i(39955),c=i(89890),d=i(37790);function u(e,t){return(i,u)=>{var h;if(!(0,s.isFunction)(i[u]))throw(0,c.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let o=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[u](e,...i)};p||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,n]=e.split(":"),r=f;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),o.events.on(r||t,n,c),r||o.events.on(n,c),t.hookStatus("beforeDestruct",()=>{o.events.off(r||t,n,c).off(n,c)});return}let r=e.split("."),[l]=r,u=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,n.observable)(h).on("change."+u.join("."),c);let p=(0,d.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,n.observable)(h)).on("change."+u.join("."),c),c(l,i,h))},get:()=>p&&p.get?p.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,m):m(i)}}},2748:function(e,t,i){"use strict";i.d(t,{Dom:function(){return y}});var o=i(82758),n=i(4510),r=i(68345),s=i(23282),a=i(58487),l=i(42320),c=i(70799),d=i(86068),u=i(49055),h=i(38837),p=i(29960),f=i(41180),m=i(86583),g=i(89890),b=i(37790);let v=RegExp(`<([a-z]+)[^>]+${o.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let o,n,r=e;i.s.save();do n=!1,(o=r.nextSibling)&&!y.isBlock(o)&&!y.isTag(o,"br")&&(n=!0,r=o);while(n)return y.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,o){let n=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(n,i);let r=i;for(;r&&(r=i.nextSibling,n.appendChild(i),i!==o&&r);)i=r;return t.s.restore(),n}static wrapInline(e,t,i){let o,n,r=e,s=e;i.s.save();do n=!1,(o=r.previousSibling)&&!y.isBlock(o)&&(n=!0,r=o);while(n)do n=!1,(o=s.nextSibling)&&!y.isBlock(o)&&(n=!0,s=o);while(n)return y.__wrapElements(t,i,r,s)}static wrap(e,t,i){let o=(0,c.isString)(t)?i.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(o,e),o.appendChild(e)}else{let t=e.extractContents();e.insertNode(o),o.appendChild(t)}return o}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,i){let o=e;for(;o&&o!==t&&!(e!==o&&i(o));){let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling;)if((o=o.parentNode)===t)return;e=null==o?void 0:o.nextSibling}o=e}}static replace(e,t,i,o=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return o&&y.isElement(e)&&y.isElement(s)&&(0,n.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return y.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){return y.isNode(e)&&!y.closest(e,e=>y.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=o.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let n=e=>null==e.nodeValue||0===(0,u.trim)(e.nodeValue).length;return y.isText(e)?n(e):!(y.isElement(e)&&i(e))&&y.each(e,e=>{if(y.isText(e)&&!n(e)||y.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return y.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return y.isTag(e,o.LIST_TAGS)}static isLeaf(e){return y.isTag(e,"li")}static isImage(e){return y.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,d.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&o.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!y.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!y.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!y.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,d.isVoid)(e)&&y.isHTMLElement(e)&&y.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return y.__deepMost(e,t,!1)}static last(e,t){return y.__deepMost(e,t,!0)}static __deepMost(e,t,i){let o=i?"lastChild":"firstChild",n=i?"previousSibling":"nextSibling",r=null==e?void 0:e[o];if(!r)return null;do{if(t(r))return r;let i=r[o]||r[n];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[n]&&r.parentNode!==e)i=null==r?void 0:r[n]}r=i}while(r)return null}static prev(e,t,i,o=!0){return y.find(e,t,i,!1,o)}static next(e,t,i,o=!0){return y.find(e,t,i,!0,o)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let o=e=>y.isElement(e)&&e.classList.contains(t),n=e.parentNode;return i?y.prev(e,o,n):y.next(e,o,n)}static find(e,t,i,o=!0,n=!0){let r=this.nextGen(e,i,o,n),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,o=!0){let n=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)n.push(t),t=i?t.nextSibling:t.previousSibling;n.reverse(),yield*this.runInStack(e,n,i,o),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let o=this.eachGen(e,i),n=o.next();for(;!n.done;){if(!1===t(n.value))return!1;n=o.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,o=!0){for(;t.length;){let n=t.pop();if(o){let e=i?n.lastChild:n.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==n&&(yield n)}}static findWithCurrent(e,t,i,o="nextSibling",n="firstChild"){let r=e;do{if(t(r))return r||null;if(n&&r&&r[n]){let e=y.findWithCurrent(r[n],t,r,o,n);if(e)return e}for(;r&&!r[o]&&r!==i;)r=r.parentNode;r&&r[o]&&r!==i&&(r=r[o])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!y.isEmptyTextNode(e)){let o=y.sibling(e,t);for(;o&&!i(o);)o=y.sibling(o,t);return o&&i(o)?o:null}static findNotEmptySibling(e,t){return y.findSibling(e,t,e=>{var t;return!y.isEmptyTextNode(e)&&!!(!y.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,u.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,b.call)(t?y.prev:y.next,e,e=>!!(e&&(!(y.isText(e)||y.isComment(e))||(0,u.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,o=!1){let n=e;if(!n)return null;do{if(t(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&t(n)?n:null}static closest(e,t,i){let o,n=e=>e.toLowerCase();if((0,s.isFunction)(t))o=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(n));o=t=>!!(t&&e.has(n(t.nodeName)))}else o=e=>!!(e&&n(t)===n(e.nodeName));return y.up(e,o,i)}static furthest(e,t,i){let o=null,n=null==e?void 0:e.parentElement;for(;n&&n!==i;)t(n)&&(o=n),n=null==n?void 0:n.parentElement;return o}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>y.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,o.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>y.isText(e)&&!e.nodeValue&&y.safeRemove(e))}static hide(e){e&&((0,m.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,m.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,o.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,p.attr)(e,o.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(o.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,i){"use strict";i.d(t,{Dom:function(){return o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(2748),n=i(70071)},70071:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return s}});var o=i(45219),n=i(2748),r=i(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=n.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){var e;if(this.workNodes){this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var o=i(82758),n=i(46559),r=i(68345),s=i(23282),a=i(70799),l=i(89890),c=i(15738);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,n.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),o=i[1]||c.defaultNameSpace;t.call(this,i[0],o)})}__getStore(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let c,d,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(c=this,d=e,h=t,p=i):(c=e,d=t,h=i,p=n),!((0,a.isString)(d)||(0,a.isStringArray)(d))||0===d.length)throw(0,l.error)("Need events names");if(!(0,s.isFunction)(h))throw(0,l.error)("Need event handler");if((0,r.isArray)(c))return c.forEach(e=>{this.on(e,d,h,p)}),this;let f=c,m=this.__getStore(f),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return u(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(d,(e,t)=>{var i,n;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),u(f)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;b.options=t,f.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(f,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,o=i.get(e)||new Set;o.delete(t),o.size?i.set(e,o):i.delete(e)}one(e,t,i,o){let n,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(n=this,r=e,s=t,l=i):(n=e,r=t,s=i,l=o);let c=(...e)=>(this.off(n,r,c),s(...e));return this.on(n,r,c,l),this}off(e,t,i){let o,n,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,n=e,l=t):(o=e,n=t,l=i),(0,r.isArray)(o))return o.forEach(e=>{this.off(e,n,l)}),this;let d=o,h=this.__getStore(d);if(!((0,a.isString)(n)||(0,a.isStringArray)(n))||0===n.length)return h.namespaces().forEach(e=>{this.off(d,"."+e)}),this.__removeStoreFromSubject(d),this;let p=e=>{var t;u(d)&&(d.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(d,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,s.isFunction)(l)){let o=h.indexOf(e,t,l);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(n,(e,t)=>{t===c.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(d),this}stopPropagation(e,t){let i=(0,a.isString)(e)?this:e,o=(0,a.isString)(e)?e:t;if("string"!=typeof o)throw(0,l.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(e,t)=>{let o=n.get(e,t);o&&this.__stopped.push(o),t===c.defaultNameSpace&&n.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let o,n,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,d=(0,a.isString)(e)?[t,...i]:i;if(!u(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&u(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(u(r))this.__triggerNativeEvent(r,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),n=t.syntheticCallback.call(r,e,...d),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||u(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...d]);void 0!==i&&(o=i)})}}),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.__doc=o.globalDocument,this.__prepareEvent=e=>{!e.cancelBubble&&(e.composed&&(0,s.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}}function u(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){var i;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var i;let o;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.forEach(e=>{o=e(...t)})),o}constructor(){this.__map=new Map}}},57012:function(e,t,i){"use strict";let o=new(i(98220)).EventEmitter;i.d(t,["eventEmitter",0,o])},3827:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var o=i(98220),n=i(72757),r=i(73026),s=i(15738)},73026:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var o=i(68345),n=i(59292),r=i(72430),s=i(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,n)=>((0,o.isArray)(t)?t.map(e=>c(e,n)):(i[t]||(i[t]=[]),i[t].push(n)),e),d=(n,...r)=>{if((0,o.isArray)(n))return void n.map(e=>d(e,...r));try{!t[n]&&i[n]&&(t[n]=!0,i[n].forEach(t=>t.call(e,...r)))}finally{t[n]=!1}},u=(t,i=[])=>{let o={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);o[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=o[a];if(!(0,n.isFastEqual)(o[a],t)){d(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&u(t,l),c&&c.set?c.set.call(e,t):o[a]=t;let n=[];d(["change",...l.reduce((e,t)=>(n.push(t),e.push("change."+n.join(".")),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):o[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(o[a])&&u(o[a],l)}),Object.defineProperty(e,"on",{value:c}))};return u(e),e}},15738:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return s}});var o=i(4510),n=i(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,n.assert)(i,"-"),i[e]}}indexOf(e,t,i){let o=this.get(e,t);if(o){for(let e=0;e<o.length;e+=1)if(o[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,o=!1){let n=this.__store.get(t);n||(n={},this.__store.set(t,n)),void 0===n[e]&&(n[e]=[]),o?n[e].unshift(i):n[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}i.d(t,["defaultNameSpace",0,r])},580:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return y},getPopupViewRoot:function(){return w},uniqueUid:function(){return g}});var o=i(19306),n=i(70799),r=i(39955),s=i(12475),a=i(29960),l=i(41180),c=i(80568),d=i(41876),u=i(57012),h=i(82758),p=i(22732);let f=1,m=new Set;function g(){function e(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let b=new d.PluginSystem({getContainer:y}),v=new WeakMap;function y(e,t,i="div",l=!1){let d,u=(0,n.isString)(t)?t:t?(0,c.getClassName)(t.prototype):"jodit-utils",h=v.get(e)||{},f=u+i,m=(0,r.isViewObject)(e)?e:e.j;if(!h[f]){let t=m.c;if(d=w(m.o,m.container,e.od.body),l&&(0,o.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let n="style"===i?e.ed.head:e.ed.body;d=(0,o.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:n}let n=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(u)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(n,"nonce",m.o.nonce),n.classList.add("jodit_theme_"+(m.o.theme||"default")),p.Dom.append(d,n),h[f]=n,e.hookStatus("beforeDestruct",()=>{m.events.off(n),p.Dom.safeRemove(n),delete h[f],Object.keys(h).length&&v.delete(e)}),v.set(e,h),m.events.fire("getContainer",n)}return h[f].classList.remove("jodit_theme_default","jodit_theme_dark"),h[f].classList.add("jodit_theme_"+(m.o.theme||"default")),h[f]}function w(e,t,i){var o,n,r;return null!=(r=null!=(n=null!=(o=e.popupRoot)?o:e.shadowRoot)?n:p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i))?r:i}let _=u.eventEmitter;i.d(t,["eventEmitter",0,_,"extendLang",0,e=>{Object.keys(e).forEach(t=>{h.lang[t]?Object.assign(h.lang[t],e[t]):h.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,b])},29999:function(e,t,i){"use strict";var o=i(68345);i.d(t,["asArray",0,e=>(0,o.isArray)(e)?e:[e]])},76855:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return r.toArray}});var o=i(29999),n=i(46559),r=i(4510)},46559:function(e,t,i){"use strict";function o(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return o}})},4510:function(e,t,i){"use strict";var o=i(70722),n=i(58844);i.d(t,["toArray",0,function(...e){var t;return((0,o.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,n.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(13252)},13252:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return n}});var o=i(82758);function n(e,t,...i){return t?o.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){o.globalWindow.clearTimeout(e)}},54765:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n}});var o=i(82758);function n(){let e;try{let t=o.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o.hasBrowserColorPicker},hasContainer:function(){return u.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return u.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return d.isHtmlFromWord},isInitable:function(){return u.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return 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 k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return S.isValidName},isViewObject:function(){return x.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return E.isWindow}});var o=i(54765),n=i(12045),r=i(68345),s=i(87612),a=i(59292),l=i(23282),c=i(58487),d=i(29673),u=i(60132),h=i(72913),p=i(19306),f=i(45603),m=i(78116),g=i(70722),b=i(84767),v=i(29807),y=i(72430),w=i(14773),_=i(42320),k=i(70799),C=i(26049),S=i(37508),x=i(39955),I=i(86068),E=i(52742)},12045:function(e,t,i){"use strict";function o(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return o}})},68345:function(e,t,i){"use strict";function o(e){return Array.isArray(e)}i.d(t,{isArray:function(){return o}})},87612:function(e,t,i){"use strict";function o(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return o}})},59292:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return n},isFastEqual:function(){return r}});var o=i(67462);function n(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,i){"use strict";function o(e){return"function"==typeof e}i.d(t,{isFunction:function(){return o}})},29673:function(e,t,i){"use strict";function o(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return o}})},58487:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isHTML",0,e=>(0,o.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},60132:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var o=i(2748),n=i(23282),r=i(86068);function s(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&o.Dom.isElement(e.container)}},72913:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var o=i(29807),n=i(70799);function r(e){return(0,n.isString)(e)&&(0,o.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isLicense",0,e=>(0,o.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},78116:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return n}});var o=i(2748);function n(e){return o.Dom.isMarker(e)}},70722:function(e,t,i){"use strict";function o(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return o}})},84767:function(e,t,i){"use strict";function o(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return o}})},29807:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return n}});var o=i(70799);function n(e){if((0,o.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},72430:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return n}});var o=i(52742);function n(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,i){"use strict";function o(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return o}})},42320:function(e,t,i){"use strict";i.d(t,{isSet:function(){return n}});var o=i(23282);function n(e){return!!e&&(0,o.isFunction)(e.has)&&(0,o.isFunction)(e.add)&&(0,o.isFunction)(e.delete)}},70799:function(e,t,i){"use strict";i.d(t,{isString:function(){return n},isStringArray:function(){return r}});var o=i(68345);function n(e){return"string"==typeof e}function r(e){return(0,o.isArray)(e)&&n(e[0])}},26049:function(e,t,i){"use strict";i.d(t,{isURL:function(){return n}});var o=i(82758);function n(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=o.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,i){"use strict";function o(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return o}})},39955:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,i){"use strict";function o(e){return null==e}i.d(t,{isVoid:function(){return o}})},52742:function(e,t,i){"use strict";function o(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return o}})},35278:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),o=parseInt(t[3],10),n=(parseInt(t[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return t[1]+"#"+n}])},32574:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return d}});var o=i(82758),n=i(2748),r=i(49055),s=i(29960),a=i(41180),l=i(76078);function c(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function d(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let d=o.globalDocument.createElement("iframe");(0,a.css)(d,"display","none"),n.Dom.append(o.globalDocument.body,d);let u="";try{let t=d.contentDocument||(d.contentWindow?d.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),n.Dom.each(t.body,e=>{n.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,s.attr)(e,"style")||"")&&n.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=c(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!o.IS_PROD)throw e}n.Dom.each(t.body,e=>{if(n.Dom.isElement(e)){let t=(0,s.attr)(e,"style");t&&(e.style.cssText=c(t)),(0,s.attr)(e,"style")||(0,s.attr)(e,"style",null)}}),u=t.firstChild?(0,r.trim)(t.body.innerHTML):""}}catch(e){}finally{n.Dom.safeRemove(d)}return u&&(e=u),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},53212:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var o=i(82758),n=i(2748),r=i(4510),s=i(49055),a=i(29960);function l(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=o.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&n.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),n.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.trim).join(`
17
+ `,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,n)}}n=r.prototype,r.prototype.controls={}},26992:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var o=i(82758),n=i(91898),r=i(12045),s=i(23282),a=i(84767),l=i(72430),c=i(14773),d=i(70799),u=i(86068),h=i(38837),p=i(93661);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let o={};(0,u.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(o=t).timeout||0),o.label&&this.clearLabel(o.label);let r=(0,n.setTimeout)(e,t,...i),s=o.label||r;return this.timers.set(s,r),this.__callbacks.set(s,e),r}updateTimeout(e,t){if((0,h.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,n.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,n.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let o=0,a=!1,d=[],u=(...t)=>{if(!a){o=0;let i=e(...t);if(a=!0,d.length){let e=()=>{d.forEach(e=>e()),d.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...r)=>{a=!1,t?(!o&&i&&u(...r),(0,n.clearTimeout)(o),o=this.setTimeout(()=>u(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,o)):u(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{d.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,o=!1,n=!0;return(...r)=>{if(i=r,o){n=!0;return}n=!0,t&&(n=!1,e(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&e(...i)})}}throttle(e,t,i=!1){let o=null,n,r,a;return(...i)=>{(n=!0,a=i,t)?o||(r=()=>{n?(e(...a),n=!1,o=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,o)):o=null})():e(...a)}}promise(e){let t=()=>{},i=new Promise((i,o)=>{t=()=>o((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,o)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let o=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let r=this.setTimeout(()=>{try{o(e())}catch(e){n(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),n((0,p.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,n.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,n;this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=null!=(e=null==queueMicrotask?void 0:queueMicrotask.bind(window))?e:Promise.resolve().then.bind(Promise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=null!=(i=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?i:(e,t)=>{var i;let o=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},null!=(i=null==t?void 0:t.timeout)?i:1)},this.__cancelIdleCallbackNative=null!=(n=null==(o=window.cancelIdleCallback)?void 0:o.bind(window))?n:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,i){"use strict";i.d(t,{Async:function(){return o.Async}});var o=i(26992)},4012:function(e,t,i){"use strict";i.d(t,{Component:function(){return l}});var o=i(8884),n=i(78213),r=i(580),s=i(21537);let a=new Map;class l{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,s.kebabCase)(((0,s.isFunction)(this.className)?this.className():"")||(0,s.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let o=[this.componentName];return e&&o.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(o.push("_",t),o.push("_",(0,s.isVoid)(i)?"true":i.toString())),o.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,s.get)(e,t||this)}get isReady(){return this.componentStatus===n.STATUSES.ready}get isDestructed(){return this.componentStatus===n.STATUSES.destructed}get isInDestruct(){return n.STATUSES.beforeDestruct===this.componentStatus||n.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(n.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(n.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),a.get(this)&&a.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,s.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let o=a.get(this),n=null==o?void 0:o[e];n&&n.length&&n.forEach(e=>e(t))}hookStatus(e,t){let i=a.get(this);i||(i={},a.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new o.Async,this.ownerWindow=window,this.__componentStatus=n.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=n.STATUSES},91907:function(e,t,i){"use strict";i.d(t,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return r.ViewComponent}});var o=i(4012),n=i(78213),r=i(80480)},78213:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return n}});var o=i(4012);class n extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),this.setParentView(e)}}},82758:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return o}});let o=!1,n="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),c=new Set(a),d="Meta",u="Backspace",h="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[d,u,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!==n&&/Mac|iPod|iPhone|iPad/.test(n.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:C,isMin:S}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(n.location.href)})(),x=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.18.6","BASE_PATH",0,C,"BASE_PATH_IS_MIN",0,S,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2021","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/pro/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!0,"IS_IE",0,w,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,_,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:_?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,u,"KEY_DELETE",0,v,"KEY_DOWN",0,b,"KEY_END",0,"End","KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,f,"KEY_META",0,d,"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," ","NEARBY",0,5,"NO_EMPTY_TAGS",0,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,x,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>o=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,w?"html":"text/html","TEXT_PLAIN",0,w?"text":"text/plain","TEXT_RTF",0,w?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,n,"lang",0,{}])},20218:function(e,t,i){"use strict";i.d(t,{Create:function(){return a}});var o=i(82758),n=i(2748),r=i(21537),s=i(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,r.isPlainObject)(t)?(0,r.attr)(o,t):i=t),i&&(0,r.asArray)(i).forEach(e=>n.Dom.append(o,(0,r.isString)(e)?this.fromHTML(e):e)),o}div(e,t,i){let o=this.element("div",t,i);return e&&(o.className=e),o}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});n.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let o=this.element("span",t,i);return e&&(o.className=e),o}a(e,t,i){let o=this.element("a",t,i);return e&&(o.className=e),o}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(n.Dom.safeRemove(o),t){let e=(0,r.refs)(o);Object.keys(t).forEach(i=>{let o=e[i];o&&!1===t[i]&&n.Dom.hide(o)})}return o}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,i){"use strict";i.d(t,{Create:function(){return o.Create}});var o=i(20218)},45219:function(e,t,i){"use strict";i.d(t,{autobind:function(){return n}});var o=i(23282);function n(e,t,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let n=i.value;return{configurable:!0,get(){let e=n.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var o=i(78213),n=i(2748),r=i(27613),s=i(82760);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let o=i.get;if(!o)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){var t;let i,o=null!=(i=this.od)?i:document,r=c.get(o);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&n.Dom.isElement(s)&&(r?r.set(this.constructor,s):c.set(o,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(o.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var o=i(82758),n=i(80568);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,n.getClassName)(e.prototype);if(r.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},81577:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var o=i(91907),n=i(27613),r=i(38837),s=i(89890);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:s}=o;(0,r.assert)(null!=s,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(e)?e(o):e,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:s[i](o[l].bind(o),c,t)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,i){"use strict";i.d(t,{derive:function(){return n}});var o=i(23282);function n(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let n=e[t],r=Object.getOwnPropertyNames(n.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(n.prototype,t);null!=s&&(0,o.isFunction)(s.value)&&!(0,o.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var o=i(23282),n=i(89890);function r(e){return(t,i)=>{if(!(0,o.isFunction)(t[i]))throw(0,n.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},78927:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var o=i(91907),n=i(23282),r=i(89890);function s(){return(e,t)=>{if(!(0,n.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:i}=e,o=e[t];e[t]=(...t)=>i.requestIdleCallback(o.bind(e,...t))})}}},65478:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return d.nonenumerable},persistent:function(){return u.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var o=i(45219),n=i(33433),r=i(87325),s=i(81577),a=i(55153),l=i(97357),c=i(78927),d=i(31589),u=i(53213),h=i(13525),p=i(37133)},31589:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},53213:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var o=i(78213),n=i(39955);function r(e,t){e.hookStatus(o.STATUSES.ready,e=>{let i=(0,n.isViewObject)(e)?e:e.jodit,o=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(o))?e:r},set(e){i.storage.set(o,e)}})})}},13525:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var o=i(78213),n=i(23282),r=i(89890);function s(e){return(t,i)=>{let s=t[i];if(!(0,n.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:o}=t,n=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){o.clearTimeout(r),e(t)?n.apply(t,s):r=o.setTimeout(()=>i(...s),10)}})})}}},37133:function(e,t,i){"use strict";i.d(t,{watch:function(){return u}});var o=i(78213),n=i(73026),r=i(46559),s=i(23282),a=i(72430),l=i(39955),c=i(89890),d=i(37790);function u(e,t){return(i,u)=>{var h;if(!(0,s.isFunction)(i[u]))throw(0,c.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let o=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[u](e,...i)};p||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,n]=e.split(":"),r=f;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),o.events.on(r||t,n,c),r||o.events.on(n,c),t.hookStatus("beforeDestruct",()=>{o.events.off(r||t,n,c).off(n,c)});return}let r=e.split("."),[l]=r,u=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,n.observable)(h).on("change."+u.join("."),c);let p=(0,d.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,n.observable)(h)).on("change."+u.join("."),c),c(l,i,h))},get:()=>p&&p.get?p.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,m):m(i)}}},2748:function(e,t,i){"use strict";i.d(t,{Dom:function(){return y}});var o=i(82758),n=i(4510),r=i(68345),s=i(23282),a=i(58487),l=i(42320),c=i(70799),d=i(86068),u=i(49055),h=i(38837),p=i(29960),f=i(41180),m=i(86583),g=i(89890),b=i(37790);let v=RegExp(`<([a-z]+)[^>]+${o.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let o,n,r=e;i.s.save();do n=!1,(o=r.nextSibling)&&!y.isBlock(o)&&!y.isTag(o,"br")&&(n=!0,r=o);while(n)return y.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,o){let n=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(n,i);let r=i;for(;r&&(r=i.nextSibling,n.appendChild(i),i!==o&&r);)i=r;return t.s.restore(),n}static wrapInline(e,t,i){let o,n,r=e,s=e;i.s.save();do n=!1,(o=r.previousSibling)&&!y.isBlock(o)&&(n=!0,r=o);while(n)do n=!1,(o=s.nextSibling)&&!y.isBlock(o)&&(n=!0,s=o);while(n)return y.__wrapElements(t,i,r,s)}static wrap(e,t,i){let o=(0,c.isString)(t)?i.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(o,e),o.appendChild(e)}else{let t=e.extractContents();e.insertNode(o),o.appendChild(t)}return o}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,i){let o=e;for(;o&&o!==t&&!(e!==o&&i(o));){let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling;)if((o=o.parentNode)===t)return;e=null==o?void 0:o.nextSibling}o=e}}static replace(e,t,i,o=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return o&&y.isElement(e)&&y.isElement(s)&&(0,n.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return y.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){return y.isNode(e)&&!y.closest(e,e=>y.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=o.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let n=e=>null==e.nodeValue||0===(0,u.trim)(e.nodeValue).length;return y.isText(e)?n(e):!(y.isElement(e)&&i(e))&&y.each(e,e=>{if(y.isText(e)&&!n(e)||y.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return y.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return y.isTag(e,o.LIST_TAGS)}static isLeaf(e){return y.isTag(e,"li")}static isImage(e){return y.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,d.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&o.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!y.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!y.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!y.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,d.isVoid)(e)&&y.isHTMLElement(e)&&y.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return y.__deepMost(e,t,!1)}static last(e,t){return y.__deepMost(e,t,!0)}static __deepMost(e,t,i){let o=i?"lastChild":"firstChild",n=i?"previousSibling":"nextSibling",r=null==e?void 0:e[o];if(!r)return null;do{if(t(r))return r;let i=r[o]||r[n];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[n]&&r.parentNode!==e)i=null==r?void 0:r[n]}r=i}while(r)return null}static prev(e,t,i,o=!0){return y.find(e,t,i,!1,o)}static next(e,t,i,o=!0){return y.find(e,t,i,!0,o)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let o=e=>y.isElement(e)&&e.classList.contains(t),n=e.parentNode;return i?y.prev(e,o,n):y.next(e,o,n)}static find(e,t,i,o=!0,n=!0){let r=this.nextGen(e,i,o,n),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,o=!0){let n=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)n.push(t),t=i?t.nextSibling:t.previousSibling;n.reverse(),yield*this.runInStack(e,n,i,o),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let o=this.eachGen(e,i),n=o.next();for(;!n.done;){if(!1===t(n.value))return!1;n=o.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,o=!0){for(;t.length;){let n=t.pop();if(o){let e=i?n.lastChild:n.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==n&&(yield n)}}static findWithCurrent(e,t,i,o="nextSibling",n="firstChild"){let r=e;do{if(t(r))return r||null;if(n&&r&&r[n]){let e=y.findWithCurrent(r[n],t,r,o,n);if(e)return e}for(;r&&!r[o]&&r!==i;)r=r.parentNode;r&&r[o]&&r!==i&&(r=r[o])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!y.isEmptyTextNode(e)){let o=y.sibling(e,t);for(;o&&!i(o);)o=y.sibling(o,t);return o&&i(o)?o:null}static findNotEmptySibling(e,t){return y.findSibling(e,t,e=>{var t;return!y.isEmptyTextNode(e)&&!!(!y.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,u.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,b.call)(t?y.prev:y.next,e,e=>!!(e&&(!(y.isText(e)||y.isComment(e))||(0,u.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,o=!1){let n=e;if(!n)return null;do{if(t(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&t(n)?n:null}static closest(e,t,i){let o,n=e=>e.toLowerCase();if((0,s.isFunction)(t))o=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(n));o=t=>!!(t&&e.has(n(t.nodeName)))}else o=e=>!!(e&&n(t)===n(e.nodeName));return y.up(e,o,i)}static furthest(e,t,i){let o=null,n=null==e?void 0:e.parentElement;for(;n&&n!==i;)t(n)&&(o=n),n=null==n?void 0:n.parentElement;return o}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>y.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,o.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>y.isText(e)&&!e.nodeValue&&y.safeRemove(e))}static hide(e){e&&((0,m.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,m.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,o.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,p.attr)(e,o.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(o.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,i){"use strict";i.d(t,{Dom:function(){return o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(2748),n=i(70071)},70071:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return s}});var o=i(45219),n=i(2748),r=i(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=n.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){var e;if(this.workNodes){this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var o=i(82758),n=i(46559),r=i(68345),s=i(23282),a=i(70799),l=i(89890),c=i(15738);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,n.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),o=i[1]||c.defaultNameSpace;t.call(this,i[0],o)})}__getStore(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let c,d,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(c=this,d=e,h=t,p=i):(c=e,d=t,h=i,p=n),!((0,a.isString)(d)||(0,a.isStringArray)(d))||0===d.length)throw(0,l.error)("Need events names");if(!(0,s.isFunction)(h))throw(0,l.error)("Need event handler");if((0,r.isArray)(c))return c.forEach(e=>{this.on(e,d,h,p)}),this;let f=c,m=this.__getStore(f),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return u(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(d,(e,t)=>{var i,n;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),u(f)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;b.options=t,f.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(f,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,o=i.get(e)||new Set;o.delete(t),o.size?i.set(e,o):i.delete(e)}one(e,t,i,o){let n,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(n=this,r=e,s=t,l=i):(n=e,r=t,s=i,l=o);let c=(...e)=>(this.off(n,r,c),s(...e));return this.on(n,r,c,l),this}off(e,t,i){let o,n,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,n=e,l=t):(o=e,n=t,l=i),(0,r.isArray)(o))return o.forEach(e=>{this.off(e,n,l)}),this;let d=o,h=this.__getStore(d);if(!((0,a.isString)(n)||(0,a.isStringArray)(n))||0===n.length)return h.namespaces().forEach(e=>{this.off(d,"."+e)}),this.__removeStoreFromSubject(d),this;let p=e=>{var t;u(d)&&(d.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(d,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,s.isFunction)(l)){let o=h.indexOf(e,t,l);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(n,(e,t)=>{t===c.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(d),this}stopPropagation(e,t){let i=(0,a.isString)(e)?this:e,o=(0,a.isString)(e)?e:t;if("string"!=typeof o)throw(0,l.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(e,t)=>{let o=n.get(e,t);o&&this.__stopped.push(o),t===c.defaultNameSpace&&n.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let o,n,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,d=(0,a.isString)(e)?[t,...i]:i;if(!u(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&u(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(u(r))this.__triggerNativeEvent(r,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),n=t.syntheticCallback.call(r,e,...d),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||u(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...d]);void 0!==i&&(o=i)})}}),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.__doc=o.globalDocument,this.__prepareEvent=e=>{!e.cancelBubble&&(e.composed&&(0,s.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}}function u(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){var i;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var i;let o;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.forEach(e=>{o=e(...t)})),o}constructor(){this.__map=new Map}}},57012:function(e,t,i){"use strict";let o=new(i(98220)).EventEmitter;i.d(t,["eventEmitter",0,o])},3827:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var o=i(98220),n=i(72757),r=i(73026),s=i(15738)},73026:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var o=i(68345),n=i(59292),r=i(72430),s=i(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,n)=>((0,o.isArray)(t)?t.map(e=>c(e,n)):(i[t]||(i[t]=[]),i[t].push(n)),e),d=(n,...r)=>{if((0,o.isArray)(n))return void n.map(e=>d(e,...r));try{!t[n]&&i[n]&&(t[n]=!0,i[n].forEach(t=>t.call(e,...r)))}finally{t[n]=!1}},u=(t,i=[])=>{let o={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);o[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=o[a];if(!(0,n.isFastEqual)(o[a],t)){d(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&u(t,l),c&&c.set?c.set.call(e,t):o[a]=t;let n=[];d(["change",...l.reduce((e,t)=>(n.push(t),e.push("change."+n.join(".")),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):o[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(o[a])&&u(o[a],l)}),Object.defineProperty(e,"on",{value:c}))};return u(e),e}},15738:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return s}});var o=i(4510),n=i(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,n.assert)(i,"-"),i[e]}}indexOf(e,t,i){let o=this.get(e,t);if(o){for(let e=0;e<o.length;e+=1)if(o[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,o=!1){let n=this.__store.get(t);n||(n={},this.__store.set(t,n)),void 0===n[e]&&(n[e]=[]),o?n[e].unshift(i):n[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}i.d(t,["defaultNameSpace",0,r])},580:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return y},getPopupViewRoot:function(){return w},uniqueUid:function(){return g}});var o=i(19306),n=i(70799),r=i(39955),s=i(12475),a=i(29960),l=i(41180),c=i(80568),d=i(41876),u=i(57012),h=i(82758),p=i(22732);let f=1,m=new Set;function g(){function e(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let b=new d.PluginSystem({getContainer:y}),v=new WeakMap;function y(e,t,i="div",l=!1){let d,u=(0,n.isString)(t)?t:t?(0,c.getClassName)(t.prototype):"jodit-utils",h=v.get(e)||{},f=u+i,m=(0,r.isViewObject)(e)?e:e.j;if(!h[f]){let t=m.c;if(d=w(m.o,m.container,e.od.body),l&&(0,o.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let n="style"===i?e.ed.head:e.ed.body;d=(0,o.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:n}let n=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(u)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(n,"nonce",m.o.nonce),n.classList.add("jodit_theme_"+(m.o.theme||"default")),p.Dom.append(d,n),h[f]=n,e.hookStatus("beforeDestruct",()=>{m.events.off(n),p.Dom.safeRemove(n),delete h[f],Object.keys(h).length&&v.delete(e)}),v.set(e,h),m.events.fire("getContainer",n)}return h[f].classList.remove("jodit_theme_default","jodit_theme_dark"),h[f].classList.add("jodit_theme_"+(m.o.theme||"default")),h[f]}function w(e,t,i){var o,n,r;return null!=(r=null!=(n=null!=(o=e.popupRoot)?o:e.shadowRoot)?n:p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i))?r:i}let _=u.eventEmitter;i.d(t,["eventEmitter",0,_,"extendLang",0,e=>{Object.keys(e).forEach(t=>{h.lang[t]?Object.assign(h.lang[t],e[t]):h.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,b])},29999:function(e,t,i){"use strict";var o=i(68345);i.d(t,["asArray",0,e=>(0,o.isArray)(e)?e:[e]])},76855:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return r.toArray}});var o=i(29999),n=i(46559),r=i(4510)},46559:function(e,t,i){"use strict";function o(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return o}})},4510:function(e,t,i){"use strict";var o=i(70722),n=i(58844);i.d(t,["toArray",0,function(...e){var t;return((0,o.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,n.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(13252)},13252:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return n}});var o=i(82758);function n(e,t,...i){return t?o.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){o.globalWindow.clearTimeout(e)}},54765:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n}});var o=i(82758);function n(){let e;try{let t=o.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o.hasBrowserColorPicker},hasContainer:function(){return u.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return u.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return d.isHtmlFromWord},isInitable:function(){return u.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return 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 k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return S.isValidName},isViewObject:function(){return x.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return E.isWindow}});var o=i(54765),n=i(12045),r=i(68345),s=i(87612),a=i(59292),l=i(23282),c=i(58487),d=i(29673),u=i(60132),h=i(72913),p=i(19306),f=i(45603),m=i(78116),g=i(70722),b=i(84767),v=i(29807),y=i(72430),w=i(14773),_=i(42320),k=i(70799),C=i(26049),S=i(37508),x=i(39955),I=i(86068),E=i(52742)},12045:function(e,t,i){"use strict";function o(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return o}})},68345:function(e,t,i){"use strict";function o(e){return Array.isArray(e)}i.d(t,{isArray:function(){return o}})},87612:function(e,t,i){"use strict";function o(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return o}})},59292:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return n},isFastEqual:function(){return r}});var o=i(67462);function n(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,i){"use strict";function o(e){return"function"==typeof e}i.d(t,{isFunction:function(){return o}})},29673:function(e,t,i){"use strict";function o(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return o}})},58487:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isHTML",0,e=>(0,o.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},60132:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var o=i(2748),n=i(23282),r=i(86068);function s(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&o.Dom.isElement(e.container)}},72913:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var o=i(29807),n=i(70799);function r(e){return(0,n.isString)(e)&&(0,o.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isLicense",0,e=>(0,o.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},78116:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return n}});var o=i(2748);function n(e){return o.Dom.isMarker(e)}},70722:function(e,t,i){"use strict";function o(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return o}})},84767:function(e,t,i){"use strict";function o(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return o}})},29807:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return n}});var o=i(70799);function n(e){if((0,o.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},72430:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return n}});var o=i(52742);function n(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,i){"use strict";function o(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return o}})},42320:function(e,t,i){"use strict";i.d(t,{isSet:function(){return n}});var o=i(23282);function n(e){return!!e&&(0,o.isFunction)(e.has)&&(0,o.isFunction)(e.add)&&(0,o.isFunction)(e.delete)}},70799:function(e,t,i){"use strict";i.d(t,{isString:function(){return n},isStringArray:function(){return r}});var o=i(68345);function n(e){return"string"==typeof e}function r(e){return(0,o.isArray)(e)&&n(e[0])}},26049:function(e,t,i){"use strict";i.d(t,{isURL:function(){return n}});var o=i(82758);function n(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=o.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,i){"use strict";function o(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return o}})},39955:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,i){"use strict";function o(e){return null==e}i.d(t,{isVoid:function(){return o}})},52742:function(e,t,i){"use strict";function o(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return o}})},35278:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),o=parseInt(t[3],10),n=(parseInt(t[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return t[1]+"#"+n}])},32574:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return d}});var o=i(82758),n=i(2748),r=i(49055),s=i(29960),a=i(41180),l=i(76078);function c(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function d(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let d=o.globalDocument.createElement("iframe");(0,a.css)(d,"display","none"),n.Dom.append(o.globalDocument.body,d);let u="";try{let t=d.contentDocument||(d.contentWindow?d.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),n.Dom.each(t.body,e=>{n.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,s.attr)(e,"style")||"")&&n.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=c(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!o.IS_PROD)throw e}n.Dom.each(t.body,e=>{if(n.Dom.isElement(e)){let t=(0,s.attr)(e,"style");t&&(e.style.cssText=c(t)),(0,s.attr)(e,"style")||(0,s.attr)(e,"style",null)}}),u=t.firstChild?(0,r.trim)(t.body.innerHTML):""}}catch(e){}finally{n.Dom.safeRemove(d)}return u&&(e=u),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},53212:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var o=i(82758),n=i(2748),r=i(4510),s=i(49055),a=i(29960);function l(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=o.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&n.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),n.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.trim).join(`
18
18
  `)).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},53326:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return n}});var o=i(82758);function n(e){let t=o.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},75275:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return o.applyStyles},cleanFromWord:function(){return n.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var o=i(32574),n=i(53212),r=i(53326),s=i(45971),a=i(86518),l=i(91003)},45971:function(e,t,i){"use strict";function o(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return o}})},86518:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return p}});var o=i(2748),n=i(43555),r=i(29960);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var i;if(!o.Dom.isElement(e)&&!o.Dom.isFragment(e))return;let r=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&o.Dom.up(e.parentNode,a)&&r.push(e)}),r))o.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==o.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&o.Dom.safeRemove(t);let l=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&"NOSCRIPT"===e.nodeName&&l.push(e)}),l))o.Dom.safeRemove(t);let d=null!=(i=t.removeEventAttributes)?i:t.removeOnError,u=e=>{if(o.Dom.isElement(e)&&(d&&c(e),p(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,n.attr)(e,"target"))){let t=((0,n.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,n.attr)(e,"rel",t.join(" "))}};u(e),o.Dom.each(e,u)}function c(e){if(!o.Dom.isElement(e))return!1;let t=!1,i=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&i.push(e.attributes[t].name);for(let o of i)(0,r.attrRaw)(e,o,null),t=!0;return t}let d=["src","data","action","formaction","poster","background","xlink:href"],u=new Set(["iframe","frame","object","embed"]);function h(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&u.has(t)}function p(e,{safeJavaScriptLink:t,removeOnError:i,removeEventAttributes:s}={safeJavaScriptLink:!0,removeOnError:!0}){if(!o.Dom.isElement(e))return!1;let a=!1;s&&c(e)&&(a=!0),i&&e.hasAttribute("onerror")&&((0,n.attr)(e,"onerror",null),a=!0);let l=e.nodeName.toLowerCase(),u=(0,n.attr)(e,"href");if(t&&u&&h(u,l)){let t="u">typeof location?location.protocol:"http:";(0,n.attr)(e,"href",t+"//"+u),a=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,n.attr)(e,"srcdoc",null),a=!0),d)){let i=(0,r.attrRaw)(e,t);i&&h(i,l)&&((0,n.attr)(e,t,null),a=!0)}return a}},91003:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,c=null,d=!1){let u=i.createElement("div");(0,n.isString)(t)?u.innerHTML=t:o.Dom.append(u,t);let h=[];return o.Dom.each(u,e=>{o.Dom.isElement(e)&&h.push(e)}),h.forEach(t=>{if(!t.parentNode)return;if(c&&o.Dom.isTag(t,c)){let n=t.nodeName.toLowerCase(),r=o.Dom.isTag(t,l)?`%%%jodit-single-${n}%%%`:`%%%jodit-${n}%%%${e(t.innerHTML,i,c,d)}%%%/jodit-${n}%%%`;o.Dom.before(t,i.createTextNode(r)),o.Dom.safeRemove(t);return}if(o.Dom.isTag(t,a))return void o.Dom.safeRemove(t);if(!o.Dom.isTag(t,s))return;let n=t.nextSibling;!(o.Dom.isText(n)&&/^\s/.test(n.nodeValue||""))&&n&&o.Dom.before(n,i.createTextNode(d?"%%%jodit-single-br%%%":" "))}),(0,r.trim)(u.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,o)=>`<${t?"/":""}${o}>`)}}});var o=i(2748),n=i(70799),r=i(49055);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},21537:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return u.$$},CamelCaseToKebabCase:function(){return d.CamelCaseToKebabCase},ConfigDeepFlatten:function(){return u.ConfigDeepFlatten},ConfigFlatten:function(){return u.ConfigFlatten},ConfigMerge:function(){return u.ConfigMerge},ConfigProto:function(){return u.ConfigProto},ConnectionError:function(){return u.ConnectionError},LimitedStack:function(){return u.LimitedStack},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},OptionsError:function(){return u.OptionsError},UNSAFE_PROTO_KEYS:function(){return u.UNSAFE_PROTO_KEYS},abort:function(){return u.abort},alignElement:function(){return u.alignElement},alreadyLoadedList:function(){return u.alreadyLoadedList},appendScriptAsync:function(){return u.appendScriptAsync},appendStyleAsync:function(){return u.appendStyleAsync},applyStyles:function(){return a.applyStyles},asArray:function(){return o.asArray},assert:function(){return u.assert},attr:function(){return u.attr},attrRaw:function(){return u.attrRaw},browser:function(){return u.browser},buildQuery:function(){return u.buildQuery},call:function(){return u.call},callPromise:function(){return u.callPromise},callThis:function(){return u.callThis},camelCase:function(){return d.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearAlign:function(){return u.clearAlign},clearCenterAlign:function(){return u.clearCenterAlign},clearTimeout:function(){return n.clearTimeout},cns:function(){return u.cns},colorToHex:function(){return s.colorToHex},completeUrl:function(){return u.completeUrl},connection:function(){return u.connection},convertMediaUrlToVideoEmbed:function(){return u.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return u.createMediaWrapper},css:function(){return u.css},cssInline:function(){return u.cssInline},cssPath:function(){return u.cssPath},ctrlKey:function(){return u.ctrlKey},dataBind:function(){return u.dataBind},defaultLanguage:function(){return u.defaultLanguage},error:function(){return u.error},fastClone:function(){return u.fastClone},fuzzySearchIndex:function(){return d.fuzzySearchIndex},get:function(){return u.get},getAlignClasses:function(){return u.getAlignClasses},getClassName:function(){return u.getClassName},getContentWidth:function(){return c.getContentWidth},getDataTransfer:function(){return u.getDataTransfer},getFixedPositionOffset:function(){return c.getFixedPositionOffset},getHAlign:function(){return u.getHAlign},getMediaWrapper:function(){return u.getMediaWrapper},getPropertyDescriptor:function(){return u.getPropertyDescriptor},getScrollParent:function(){return c.getScrollParent},getWrappedMedia:function(){return u.getWrappedMedia},getXPathByElement:function(){return u.getXPathByElement},hAlignElement:function(){return u.hAlignElement},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},humanSizeToBytes:function(){return u.humanSizeToBytes},i18n:function(){return d.i18n},inView:function(){return u.inView},innerWidth:function(){return c.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isAtom:function(){return u.isAtom},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isUnsafeProtoKey:function(){return u.isUnsafeProtoKey},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return d.kebabCase},keepNames:function(){return u.keepNames},keys:function(){return u.keys},loadImage:function(){return u.loadImage},loadNext:function(){return u.loadNext},loadNextStyle:function(){return u.loadNextStyle},markAsAtomic:function(){return u.markAsAtomic},markDeprecated:function(){return u.markDeprecated},markOwner:function(){return u.markOwner},memorizeExec:function(){return u.memorizeExec},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return c.offset},options:function(){return u.options},parseQuery:function(){return u.parseQuery},position:function(){return c.position},prepareEmbedCode:function(){return u.prepareEmbedCode},prepareMedia:function(){return u.prepareMedia},previewBox:function(){return u.previewBox},refs:function(){return u.refs},reset:function(){return u.reset},resolveElement:function(){return u.resolveElement},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},scrollIntoViewIfNeeded:function(){return u.scrollIntoViewIfNeeded},set:function(){return u.set},setTimeout:function(){return n.setTimeout},size:function(){return c.size},splitArray:function(){return o.splitArray},sprintf:function(){return d.sprintf},stringify:function(){return d.stringify},stripTags:function(){return a.stripTags},toArray:function(){return o.toArray},trim:function(){return d.trim},trimChars:function(){return d.trimChars},trimInv:function(){return d.trimInv},ucfirst:function(){return d.ucfirst},wrapMedia:function(){return u.wrapMedia}});var o=i(76855),n=i(91898),r=i(27613),s=i(35278),a=i(75275),l=i(71521),c=i(56175),d=i(59007),u=i(43555)},71521:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return n.NUMBER_FIELDS_REG},normalizeColor:function(){return o.normalizeColor},normalizeCssNumericValue:function(){return n.normalizeCssNumericValue},normalizeCssValue:function(){return n.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return d.normalizeUrl}});var o=i(21224),n=i(3760),r=i(49033),s=i(12972),a=i(9992),l=i(70091),c=i(46334),d=i(37406)},21224:function(e,t,i){"use strict";var o=i(35278),n=i(49055);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,o.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,n.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},3760:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var o=i(29807),n=i(86068),r=i(35278),s=i(12475);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,n.isVoid)(t)&&a.test(e)&&(0,o.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function c(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,o.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},49033:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var o=i(82758),n=i(49055);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,n.trim)(e.toLowerCase())).map(e=>o.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},12972:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},9992:function(e,t,i){"use strict";var o=i(49055);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,o.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},70091:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},46334:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},37406:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},44506:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},35224:function(e,t,i){"use strict";function o(e){var t,i;let o=null==(t=e.ownerDocument)?void 0:t.defaultView,n=e.parentElement;for(;o&&n;){if(""!==(i=o.getComputedStyle(n)).transform&&"none"!==i.transform||""!==i.perspective&&"none"!==i.perspective||""!==i.filter&&"none"!==i.filter||"transform"===i.willChange||"perspective"===i.willChange||"filter"===i.willChange||"paint"===i.contain||"layout"===i.contain||"strict"===i.contain||"content"===i.contain){let e=n.getBoundingClientRect();return{x:e.left,y:e.top}}n=n.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return o}})},16442:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=n.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||o.globalDocument.scrollingElement||o.globalDocument.body}}});var o=i(82758),n=i(2748),r=i(43555)},56175:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return o.getContentWidth},getFixedPositionOffset:function(){return n.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return c.position},size:function(){return a.size}});var o=i(44506),n=i(35224),r=i(16442),s=i(81630),a=i(21496),l=i(81284),c=i(5700)},81630:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},21496:function(e,t,i){"use strict";i.d(t,{size:function(){return n}});var o=i(27613);function n(e){return(0,o.isString)(e)||(0,o.isArray)(e)?e.length:(0,o.isPlainObject)(e)?Object.keys(e).length:0}},81284:function(e,t,i){"use strict";let o=(e,t,i,n=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},d=i.defaultView||i.parentWindow,u=d.pageYOffset||c.scrollTop||l.scrollTop,h=d.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,f=c.clientLeft||l.clientLeft||0,m=t.iframe;if(!n&&t&&t.options&&t.o.iframe&&m){let{top:e,left:i}=o(m,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+u-p,a=r.left+h-f;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,o])},5700:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,n=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,c=a.top;if((0,o.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!n){let{left:t,top:o}=e(i.iframe,i,!0);l+=t,c+=o}return{left:Math.round(l),top:Math.round(c),width:Math.round(null!=(r=t.offsetWidth)?r:a.width),height:Math.round(null!=(s=t.offsetHeight)?s:a.height)}}}});var o=i(19306)},87058:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},67477:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return n}});var o=i(82758);function n(e,t,i=0,r=1){let s=0,a,l=-1,c=0,d=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,c++,d=0,-1===l&&(l=a)):s>0&&(d>=r&&t[a]!==o.INVISIBLE_SPACE?(s=0,l=-1,c=0,d=0,a--):(d++,c++)),a++;return s===e.length?[l,c]:[-1,0]}},56967:function(e,t,i){"use strict";i.d(t,{i18n:function(){return c}});var o=i(82758),n=i(70799),r=i(36409),s=i(43555),a=i(6441);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,o=i.exec(e),n=e,r=0;for(;o&&void 0!==t[r];)n=n.replace(o[0],t[r].toString()),r+=1,o=i.exec(e);return n};function c(e,t,i){if(!(0,n.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!(null==i?void 0:i.debugLanguage),d={},u=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(null==i?void 0:i.language,h),f=t=>{if(!t)return;if((0,n.isString)(t[e]))return u(t[e]);let i=e.toLowerCase();if((0,n.isString)(t[i]))return u(t[i]);let o=(0,r.ucfirst)(e);if((0,n.isString)(t[o]))return u(t[o])};void 0!==o.lang[p]?d=o.lang[p]:c||(d=void 0!==o.lang[h]?o.lang[h]:o.lang.en);let m=null==i?void 0:i.i18n;if(m&&m[p]){let e=f(m[p]);if(e)return e}return f(d)||(!c&&o.lang.en&&(0,n.isString)(o.lang.en[e])&&o.lang.en[e]?u(o.lang.en[e]):c?"{"+e+"}":(o.IS_PROD,u(e)))}i.d(t,["sprintf",0,l])},59007:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return o.camelCase},fuzzySearchIndex:function(){return n.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var o=i(87058),n=i(67477),r=i(56967),s=i(12475),a=i(67462),l=i(49055),c=i(36409)},12475:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},67462:function(e,t,i){"use strict";function o(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),n=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(n.get(t))return"[refObject]";n.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return o}})},49055:function(e,t,i){"use strict";i.d(t,{trim:function(){return n},trimChars:function(){return r},trimInv:function(){return s}});var o=i(82758);function n(e){return e.replace((0,o.SPACE_REG_EXP_END)(),"").replace((0,o.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,o.INVISIBLE_SPACE_REG_EXP_START)(),"")}},36409:function(e,t,i){"use strict";function o(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return o}})},25726:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return p},clearAlign:function(){return u},getAlignClasses:function(){return c},getHAlign:function(){return d},hAlignElement:function(){return function e(t,i,o){var n;if(o){e(t,"normal"),Object.values(o).forEach(e=>l(e).forEach(e=>t.classList.remove(...e))),t.classList.add(...null!=(n=l(o[i||"normal"])[0])?n:[]),["class","style"].forEach(e=>{var i;(null==(i=(0,r.attr)(t,e))?void 0:i.trim())||(0,r.attr)(t,e,null)});return}i&&"normal"!==i?"center"!==i?((0,s.css)(t,"float",i),(0,s.clearCenterAlign)(t)):(0,s.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,s.css)(t,"float")&&-1!==["right","left"].indexOf((0,s.css)(t,"float").toString().toLowerCase())&&(0,s.css)(t,"float",""),(0,s.clearCenterAlign)(t))}}});var o=i(22732),n=i(68345),r=i(29960),s=i(41180),a=i(61477);let l=e=>((0,n.isArray)(e)?e:[null!=e?e:""]).map(e=>e.split(/\s+/).filter(Boolean)).filter(e=>e.length);function c(e,t){var i,n;if(!t)return null;let r=o.Dom.isTag(t,new Set(["jodit","jodit-media"]))?t.firstElementChild:(0,a.getWrappedMedia)(e,t),s=(null!=r?r:t).nodeName.toLowerCase();return null!=(n=null==(i=e.o.alignClasses)?void 0:i[s])?n:"img"===s?e.o.imageAlignClasses:null}function d(e,t){if(t){for(let i of["left","right","center","normal"])if(l(t[i]).some(t=>t.every(t=>e.classList.contains(t))))return i}let i=(0,s.cssInline)(e,"float").toLowerCase();return"left"===i||"right"===i?i:"block"===(0,s.css)(e,"display")&&"auto"===(0,s.cssInline)(e,"margin-left")&&"auto"===(0,s.cssInline)(e,"margin-right")?"center":"normal"}function u(e){o.Dom.each(e,e=>{o.Dom.isHTMLElement(e)&&(0,s.cssInline)(e,"textAlign")&&((0,s.css)(e,"textAlign",""),((0,r.attr)(e,"style")||"").trim().length||(0,r.attr)(e,"style",null))})}let h=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function p(e,t){if(o.Dom.isNode(t)&&o.Dom.isElement(t)){u(t);let i=h.get(e.toLowerCase());i&&(0,s.css)(t,"textAlign",i)}}},63799:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?c(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?d(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}}});var o=i(2748),n=i(70799),r=i(29960),s=i(66292);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let o=e(t,i);return a.set(i,o),o},c=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",n).one(a,"load",i),o.Dom.append(e.od.body,a)})),d=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",n),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?o.Dom.append(e.o.shadowRoot,a):o.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,c,"appendStyleAsync",0,d])},38837:function(e,t,i){"use strict";i.d(t,{assert:function(){return n}});class o extends Error{constructor(e){super(e),this.name="AssertionError"}}function n(e,t){if(!e)throw new o("Assertion failed: "+t)}},29960:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,o.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(o=>{let r=i[o];(0,n.isPlainObject)(r)&&"style"===o?(0,a.css)(t,r):("className"===o&&(o="class"),e(t,o,r))}),null;let c=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(c)){let i=e(t,"data"+c);if(i)return i;c=c.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(c)&&t.removeAttribute(c);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===c||"height"===c)&&(e=e.replace("px","")),t.setAttribute(c,e),e}return t.getAttribute(c)}},attrRaw:function(){return l}});var o=i(23282),n=i(72430),r=i(70799),s=i(12475),a=i(41180);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},97639:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},44710:function(e,t,i){"use strict";var o=i(72430);let n=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,o.isPlainObject)(l)?n(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,n])},66292:function(e,t,i){"use strict";var o=i(82758);i.d(t,["completeUrl",0,e=>("file:"===o.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},68934:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,d.keys)(t,!1).reduce((i,o)=>(i[o]=(0,n.isPlainObject)(t[o])?e(t[o]):t[o],i),{})}},ConfigFlatten:function(){return u},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(o=>{if((0,c.isUnsafeProtoKey)(o))return;let r=i[o],s=t[o];(0,n.isPlainObject)(r)&&(0,n.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[o]=r})}},ConfigProto:function(){return function e(t,i,d=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let u=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==u.presets[t.preset]){let e=u.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,c.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,n.isPlainObject)(s)&&(0,n.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,d+1);return}if(0!==d&&(0,o.isArray)(s)&&!(0,l.isAtom)(s)&&(0,o.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var o=i(68345),n=i(72430),r=i(70799),s=i(86068),a=i(6441),l=i(97735),c=i(69175),d=i(37790);function u(e){return(0,d.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},55877:function(e,t,i){"use strict";var o=i(82758),n=i(26049),r=i(82501);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,n.isURL)(e))return e;let s=o.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let o=s.pathname.split("/").filter(Boolean),n=o.findIndex(e=>/^\d+$/.test(e));if(-1===n)return e;let r=o[n],l=o[n+1];return l&&0===n&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let o=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(o=o.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+o+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},41180:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return c}});var o=i(87612),n=i(72430),r=i(3760),s=i(87058),a=i(12475);function l(e,t,i,c=!1){if((0,o.isBoolean)(i)&&(c=i,i=void 0),(0,n.isPlainObject)(t)||void 0!==i){let o=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,n.isPlainObject)(t)){let i=Object.keys(t);for(let n=0;n<i.length;n+=1)o(e,(0,s.camelCase)(i[n]),t[i[n]])}else o(e,(0,s.camelCase)(t),i);return""}let d=(0,a.kebabCase)(t),u=e.ownerDocument||document,h=!!u&&(u.defaultView||u.parentWindow),p=e.style[t],f="";return void 0!==p&&""!==p?f=p:h&&!c&&(f=h.getComputedStyle(e).getPropertyValue(d)),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))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},15456:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}])},86583:function(e,t,i){"use strict";var o=i(39955);let n=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=n.get(e);if(!r){r={},n.set(e,r);let t=null;(0,o.isViewObject)(e.j)&&(t=e.j.e),(0,o.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{n.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},96325:function(e,t,i){"use strict";var o=i(82758),n=i(70799);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,n.isString)(e)?e:o.globalDocument.documentElement&&o.globalDocument.documentElement.lang?o.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},82760:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return n},options:function(){return s}});var o=i(32880);function n(e){return TypeError(e)}function r(e){return new o.ConnectionError(e)}function s(e){return new o.OptionsError(e)}},93661:function(e,t,i){"use strict";function o(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return o}})},86397:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o}});class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},32880:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return o.abort}});var o=i(93661),n=i(86397),r=i(57865)},57865:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return o}});class o extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},89890:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return n.OptionsError},abort:function(){return n.abort},connection:function(){return o.connection},error:function(){return o.error},options:function(){return o.options}});var o=i(82760),n=i(32880)},97735:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return n},markAsAtomic:function(){return r}});var o=i(67462);function n(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,o.stringify)(e))}},80568:function(e,t,i){"use strict";var o=i(23282);let n=new Map;i.d(t,["getClassName",0,e=>{var t;if((0,o.isFunction)(e.className))return e.className();let i=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(n.has(i))return n.get(i);if(i.name)return i.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=i.toString().match(r);return s?s[1]:""},"keepNames",0,n])},94643:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var o=i(70799),n=i(86068);function r(e,t){if(!(0,o.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,n.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,n.isVoid)(r)?null:r}},38420:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],o=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?o*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},43555:function(e,t,i){"use strict";i.d(t,{$$:function(){return j.$$},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return g.ConnectionError},LimitedStack:function(){return A.LimitedStack},OptionsError:function(){return g.OptionsError},UNSAFE_PROTO_KEYS:function(){return _.UNSAFE_PROTO_KEYS},abort:function(){return g.abort},alignElement:function(){return o.alignElement},alreadyLoadedList:function(){return n.alreadyLoadedList},appendScriptAsync:function(){return n.appendScriptAsync},appendStyleAsync:function(){return n.appendStyleAsync},assert:function(){return r.assert},attr:function(){return s.attr},attrRaw:function(){return s.attrRaw},browser:function(){return a.browser},buildQuery:function(){return l.buildQuery},call:function(){return P.call},callPromise:function(){return P.callPromise},callThis:function(){return P.callThis},clearAlign:function(){return o.clearAlign},clearCenterAlign:function(){return h.clearCenterAlign},cns:function(){return k.cns},completeUrl:function(){return c.completeUrl},connection:function(){return g.connection},convertMediaUrlToVideoEmbed:function(){return u.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return C.createMediaWrapper},css:function(){return h.css},cssInline:function(){return h.cssInline},cssPath:function(){return j.cssPath},ctrlKey:function(){return p.ctrlKey},dataBind:function(){return f.dataBind},defaultLanguage:function(){return m.defaultLanguage},error:function(){return g.error},fastClone:function(){return b.fastClone},get:function(){return v.get},getAlignClasses:function(){return o.getAlignClasses},getClassName:function(){return y.getClassName},getDataTransfer:function(){return P.getDataTransfer},getHAlign:function(){return o.getHAlign},getMediaWrapper:function(){return C.getMediaWrapper},getPropertyDescriptor:function(){return P.getPropertyDescriptor},getWrappedMedia:function(){return C.getWrappedMedia},getXPathByElement:function(){return j.getXPathByElement},hAlignElement:function(){return o.hAlignElement},humanSizeToBytes:function(){return w.humanSizeToBytes},inView:function(){return T.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return _.isUnsafeProtoKey},keepNames:function(){return y.keepNames},keys:function(){return P.keys},loadImage:function(){return P.loadImage},loadNext:function(){return n.loadNext},loadNextStyle:function(){return n.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return k.markDeprecated},markOwner:function(){return P.markOwner},memorizeExec:function(){return P.memorizeExec},options:function(){return g.options},parseQuery:function(){return S.parseQuery},prepareEmbedCode:function(){return x.prepareEmbedCode},prepareMedia:function(){return x.prepareMedia},previewBox:function(){return I.previewBox},refs:function(){return j.refs},reset:function(){return E.reset},resolveElement:function(){return j.resolveElement},scrollIntoViewIfNeeded:function(){return T.scrollIntoViewIfNeeded},set:function(){return D.set},wrapMedia:function(){return C.wrapMedia}});var o=i(25726),n=i(63799),r=i(38837),s=i(29960),a=i(97639),l=i(44710),c=i(66292),d=i(68934),u=i(55877),h=i(41180),p=i(15456),f=i(86583),m=i(96325),g=i(89890),b=i(97735),v=i(94643),y=i(80568),w=i(38420),_=i(69175),k=i(95942),C=i(61477),S=i(82501),x=i(96437),I=i(11628),E=i(58844),T=i(26395),j=i(76078),D=i(3703),A=i(50535),P=i(37790)},69175:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return n}});let o=["__proto__","constructor","prototype"];function n(e){return -1!==o.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,o])},95942:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return n}});let o=console;function n(e,t=[""],i=null){return(...n)=>(o.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...n))}i.d(t,["cns",0,o])},61477:function(e,t,i){"use strict";i.d(t,{createMediaWrapper:function(){return a},getMediaWrapper:function(){return s},getWrappedMedia:function(){return r},wrapMedia:function(){return l}});var o=i(2748);let n=(e,t)=>o.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&e.classList.contains(t.className);function r(e,t){var i;for(let[o,r]of Object.entries(null!=(i=e.o.mediaWrappers)?i:{}))if(n(t,r)){let e=t.querySelector(o);if(e)return e}return null}function s(e,t){return o.Dom.closest(t,t=>!!r(e,t),e.editor)}function a(e,t){var i;let o=null==(i=e.o.mediaWrappers)?void 0:i[t.toLowerCase()];return o?e.createInside.element(o.tag,{class:o.className,contenteditable:!1,draggable:!0}):null}function l(e,t){let i=a(e,t.nodeName);return i?(t.parentNode&&o.Dom.before(t,i),o.Dom.append(i,t),i):t}},82501:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let o=i[e].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return t}])},96437:function(e,t,i){"use strict";i.d(t,{prepareEmbedCode:function(){return s},prepareMedia:function(){return r}});var o=i(25726),n=i(61477);function r(e,t){let i=(0,n.wrapMedia)(e,t),{mediaDefaultAlign:r}=e.o;return r&&"normal"!==r&&(0,o.hAlignElement)(i,r,(0,o.getAlignClasses)(e,i)),i}function s(e,t){let i=e.createInside.div();i.innerHTML=t.trim();let o=i.firstElementChild;return o&&1===i.childNodes.length?r(e,o):t}},11628:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var o=i(2748),n=i(70799),r=i(29960),s=i(41180);function a(e,t,i="px",l=null){let c=[],d=function(e,t){let i=[],n=[];o.Dom.each(e.editor,e=>{o.Dom.isTag(e,"img")&&n.push(e)});try{n.forEach(n=>{let s=[(0,r.attr)(n,"width"),(0,r.attr)(n,"height"),(0,r.attr)(n,"src")];(0,r.attr)(n,{width:n.offsetWidth+t,height:n.offsetHeight+t});let a=e.createInside.a();o.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(n,"src")||""),(0,r.attr)(n,"src",a.href),o.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(n,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let d=e.c.div("jodit__preview-box jodit-context");l&&o.Dom.append(l,d),(0,s.css)(d,{position:"relative",padding:16});let u=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),o.Dom.append(d,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),d=i.document.body,"function"==typeof ResizeObserver)){let o=!1,n=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(n),(0,s.css)(t,"height",n.offsetHeight+20),e.async.requestAnimationFrame(()=>{o||r.observe(n)})},100)),a=()=>{o=!0,r.unobserve(n),r.disconnect(),e.e.off("beforeDestruct",a)};c.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(d,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,n.isString)(i)?e.c.div():i;(0,n.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(o.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||o.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{o.Dom.append(t,e)}catch(e){}}else try{o.Dom.append(t,i.cloneNode(!0))}catch(e){}}};return h(d,u),e.e.fire("afterPreviewBox",d),[d,()=>{c.forEach(e=>e())}]}finally{d.forEach(e=>e())}}},58844:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var o=i(82758),n=i(23282),r=i(94643);let s={};function a(e){var t,i;if(!(e in s)){let i=o.globalDocument.createElement("iframe");try{if(i.src="about:blank",o.globalDocument.body.appendChild(i),!i.contentWindow)return null;let t=(0,r.get)(e,i.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),i.contentWindow);(0,n.isFunction)(t)&&(s[e]=t.bind(a))}catch(e){if(!o.IS_PROD)throw e}finally{null==(t=i.parentNode)||t.removeChild(i)}}return null!=(i=s[e])?i:null}},26395:function(e,t,i){"use strict";i.d(t,{inView:function(){return n},scrollIntoViewIfNeeded:function(){return r}});var o=i(2748);function n(e,t,i){let o=e.getBoundingClientRect(),n=e,r=o.top,s=o.height;for(;n&&n!==t&&n.parentNode;)if(r+s>(o=(n=n.parentNode).getBoundingClientRect()).bottom+1&&r>o.top||r+s<=o.top)return!1;return(r+s<=(i.documentElement&&i.documentElement.clientHeight||0)+1||r<=0)&&r+s>=0}function r(e,t,i){if(o.Dom.isHTMLElement(e)&&!n(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}n(e,t,i)||e.scrollIntoView({block:"nearest"})}}},76078:function(e,t,i){"use strict";i.d(t,{$$:function(){return u},resolveElement:function(){return p}});var o=i(82758),n=i(2748),r=i(4510),s=i(70799),a=i(87058),l=i(29960),c=i(89890);let d=1;function u(e,t){let i;if(!o.IS_ES_NEXT&&/:scope/.test(e)&&o.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let o=t.id,n=o||"_selector_id_"+(Math.random()+"").slice(2)+ ++d;e=e.replace(/:scope/g,"#"+n),o||t.setAttribute("id",n),i=t.parentNode.querySelectorAll(e),o||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch(t){throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!n.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!n.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,o=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&o++;while(t)e+=":nth-of-type("+o+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return n.Dom.each(e,e=>{if(n.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},3703:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var o=i(68345),n=i(29807),r=i(72430),s=i(70799),a=i(69175);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let c=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,o.isArray)(c[t])||(0,r.isPlainObject)(c[t])||(c[t]=(0,n.isNumeric)(l[e+1])?[]:{}),c=c[t]}c&&(c[l[l.length-1]]=t)}},50535:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){this.limit=e,this.stack=[]}}},37790:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return d},callThis:function(){return l},getPropertyDescriptor:function(){return u},markOwner:function(){return c}});var o=i(14773),n=i(86068),r=i(29960),s=i(86583);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function c(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function d(e,t){return(0,o.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function u(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e)return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch(e){return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,o)=>{let n=new Image,r=()=>{t.e.off(n),null==o||o()},s=()=>{t.e.off(n),i(n)};t.e.one(n,"load",s).one(n,"error",r).one(n,"abort",r),n.src=e,n.complete&&s()}),"memorizeExec",0,(e,t,{control:i},o)=>{var r;let a="button"+i.command,l=null!=(r=i.args&&i.args[0])?r:(0,s.dataBind)(e,a);if((0,n.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),o&&(l=o(l)),e.execCommand(i.command,!1,null!=l?l:void 0)}])},31359:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var o=i(82758),n=i(60132),r=i(14041);function s(e,t,i,s,a,l,c){if((0,n.isInitable)(s))try{s.init(e)}catch(e){if(!o.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{o.IS_PROD}),s.styles&&(c(e,t,"style").innerHTML=s.styles)}},14041:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return d},loadStyle:function(){return l}});var o=i(82758),n=i(12475),r=i(63799),s=i(89672);let a=new Set;async function l(e,t){let i=c(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function c(e,t,i){t=(0,n.kebabCase)(t);let o=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+o+"."+(i?"js":"css")}function d(e,t,i,n){try{let o=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));o.length&&o.map(e=>{let i=e.url||c(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(n).catch(()=>null)})}catch(e){if(!o.IS_PROD)throw e}}},48591:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var o=i(82758),n=i(23282);function r(e,t){try{try{return(0,n.isFunction)(t)?new t(e):t}catch(i){if((0,n.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!o.IS_PROD)throw e}return null}},89672:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return n}});var o=i(12475);function n(e){return(0,o.kebabCase)(e).toLowerCase()}},50911:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return o.Plugin}});var o=i(20356);i(41876)},41876:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return p}});var o=i(82758),n=i(57012),r=i(46559),s=i(68345),a=i(60132),l=i(70799),c=i(31359),d=i(14041),u=i(48591),h=i(89672);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,h.normalizeName)(e),t),n.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,h.normalizeName)(e))}remove(e){this.__items.delete((0,h.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,o)=>{(!e||e.has(o))&&t.push([o,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,l.isString)(e)?{name:e}:e),disableList:new Set((0,r.splitArray)(e.o.disablePlugins).map(h.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},p=new Map,f={},m=new Set;e.__plugins=f;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([o,n])=>{if(i.has(o)||p.has(o))return;let r=null==n?void 0:n.requires;if(r&&(0,s.isArray)(r)&&r.length){if(r.some(e=>i.has(e)))return;if(!r.every(e=>p.has(e)))return void m.add(o)}t=!0;let a=(0,u.makeInstance)(e,n);if(!a){p.set(o,null),m.delete(o);return}(0,c.init)(e,o,n,a,p,m,this.opts.getContainer),f[o]=a}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(f).forEach(t=>{let i=f[t];(0,a.isDestructable)(i)&&i.destruct(e),delete f[t]}),delete e.__plugins}),o.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),n.eventEmitter.off(`plugin:${e}:ready`,i)};n.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){this.opts=e,this.__items=new Map}}},20356:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return a}});var o=i(91907),n=i(65478),r=i(19306),s=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class a extends o.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,r.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(o.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){var e;if(this.isInDestruct)return;let{j:t}=this;if(t.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(o.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,r.isJoditObject)(t)&&(null==(e=this.buttons)||e.forEach(e=>{null==t||t.unregisterButton(e)})),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),this.buttons=[],this.hasStyle=!1,this.__inited=!1,e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}a.requires=[],s([n.autobind],a.prototype,"__afterPluginSystemInit",null),s([n.autobind],a.prototype,"__afterInit",null),s([n.autobind],a.prototype,"__beforeDestruct",null)},54079:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return d}});var o=i(8884),n=i(82758),r=i(45219),s=i(21537),a=i(89890),l=i(6441);i(57459);var c=i(98582);class d{className(){return"Ajax"}__buildParams(e,t){return(0,s.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,s.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,s.isString)(e)||e instanceof n.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,s.isFunction)(e.append)?e:(0,s.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch(e){}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(o,n)=>{var r;let l=()=>{this.__isFulfilled=!0,n(a.connection("Connection error"))},d=()=>{this.__isFulfilled=!0,o(new c.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=d,e.onabort=()=>{this.__isFulfilled=!0,n(a.abort("Abort connection"))},e.onerror=l,e.ontimeout=l,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,i;let o=0;e.lengthComputable&&(o=e.loaded/e.total*100),null==(i=(t=this.options).onProgress)||i.call(t,o)},e.onreadystatechange=()=>{var i,o;null==(o=(i=this.options).onProgress)||o.call(i,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?d():e.statusText&&(this.__isFulfilled=!0,n(a.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:u,data:h,method:p}=i;e.open(p,u,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:f}=t;(0,s.isFunction)(f)&&(f=await 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)})}async *stream(){var e;this.__activated=!0;let{xhr:t,o:i}=this,o=this.prepareRequest(),n=0,r="",l=[],c=null,d=!1,u=null,h=()=>{if(c){let e=c;c=null,e()}},p=e=>{var i;let o=t.responseText;r+=o.substring(n),n=o.length;let s=r.split(`
19
19
 
20
20
  `);for(let t of(r=e?"":null!=(i=s.pop())?i:"",s)){let e=t.trim();if(!e)continue;let i=[];for(let t of e.split(`
@@ -424,7 +424,19 @@ ${r}`.trim();i?await this.__executeQuickCommandSilent(l,r):await this.__executeQ
424
424
  </div>`}generateLibrary(){let e=new l.UIGroup(this.j);c.map(e=>p.mapKey(e,this.j)).forEach(t=>{let i=new d.UIGButton(this.j,t);i.setMod("mode","library"),e.append(i),this.j.e.on(i.container,"click",()=>{let{text:e}=this.state;Object.assign(this.state,t),Object.assign(this.state,{className:"",text:e}),this.update()})});let t=this.getElm("library");(0,a.assert)(null!=t,"library element does not exists"),t.appendChild(e.container)}static mapKey(e,t){return{bgEnd:e.be,bgStart:e.bs,borderColor:e.bc,borderRadius:e.br,borderSize:e.bse,boxShadow:e.bsh,boxShadowBlurRadius:e.bsbr,boxShadowColor:e.bsc,boxShadowInset:e.bsi,boxShadowOffsetX:e.bsox,boxShadowOffsetY:e.bsoy,boxShadowSpreadRadius:e.bssr,fontColor:e.fc,fontFamily:e.ff,fontSize:e.fs,fontStyle:e.fse,fontWeight:e.fw,paddingX:e.px,paddingY:e.py,previewBgColor:e.pbc,solid:e.s,text:(0,s.isString)(e.t)?t.i18n(e.t):e.t,textShadow:e.ts,textShadowBlurRadius:e.tsbr,textShadowColor:e.tsc,textShadowOffsetX:e.tsox,textShadowOffsetY:e.tsoy}}updateState(e,t){this.state[e]=t,this.update()}update(){this.isReady&&(this.form.update(),this.preview.update())}constructor(e){super(e),(0,o._)(this,"state",{text:"",className:"",href:"",bgEnd:"#5cbf2a",bgStart:"#44c767",borderColor:"#18ab29",borderRadius:28,borderSize:1,boxShadow:!1,boxShadowBlurRadius:0,boxShadowColor:"#3dc21b",boxShadowInset:!1,boxShadowOffsetX:0,boxShadowOffsetY:0,boxShadowSpreadRadius:0,fontColor:"#fff",fontFamily:"Arial",fontSize:17,fontStyle:!1,fontWeight:!1,fontItalic:!1,paddingX:31,paddingY:16,previewBgColor:"#f5f5f5",solid:!0,textShadow:!0,textShadowBlurRadius:0,textShadowColor:"#2f6627",textShadowOffsetX:0,textShadowOffsetY:1}),(0,o._)(this,"preview",new h.UIPreviewButtonGenerator(this.j,this.state,this.updateState)),(0,o._)(this,"form",new u.UIFormButtonGenerator(this.j,this.state,this.updateState)),(0,o._)(this,"target",void 0),this.generateLibrary();let t=this.getElm("preview");(0,a.assert)(null!=t,"preview element does not exists"),t.appendChild(this.preview.container);let i=this.getElm("form");(0,a.assert)(null!=i,"form element does not exists"),i.appendChild(this.form.container)}}(0,n.__decorate)([r.autobind],p.prototype,"updateState",null),p=(0,n.__decorate)([r.component],p)},26638:function(e,t,i){"use strict";i.d(t,{UIPreviewButtonGenerator:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(38837),a=i(67510),l=i(82520),c=i(45128);class d extends a.UIElement{className(){return"UIPreviewButtonGenerator"}render(){return`<div>
425
425
  <div class='&__button'></div>
426
426
  <div class='&__colors'></div>
427
- </div>`}update(){this.button.update(),this.lockUpdate=!0,this.colors.forEach(e=>{e.value!==this.state[e.state.name]&&(e.value=this.state[e.state.name])}),this.lockUpdate=!1}constructor(e,t,i){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"updateState",void 0),(0,o._)(this,"button",void 0),(0,o._)(this,"lockUpdate",void 0),(0,o._)(this,"colors",void 0),this.state=t,this.updateState=i,this.button=new l.UIGButton(this.j,this.state),this.lockUpdate=!1,this.colors=["bgStart","bgEnd","fontColor","borderColor","boxShadowColor","textShadowColor","previewBgColor"].map(e=>new c.ColorInput(this.j,{name:e,onChange:t=>{this.lockUpdate||("bgEnd"===e&&t!==this.state.bgStart&&this.updateState("solid",!1),this.updateState(e,t))}}).setMod("slim",!0)),this.setMod("mode","default");let n=this.getElm("button");(0,s.assert)(null!=n,"button element does not exists"),n.appendChild(this.button.container);let r=this.getElm("colors");(0,s.assert)(null!=r,"colors element does not exists"),this.colors.forEach(e=>{r.appendChild(e.container)}),this.update()}}d=(0,n.__decorate)([r.component],d)},8390:function(e,t,i){"use strict";var o=i(82749);i(89683);var n=i(2748),r=i(36409),s=i(50911),a=i(2692);class l extends s.Plugin{afterInit(e){e.registerCommand("changeCase",{exec:(t,i,o)=>{o=o.toLowerCase();let r=e.s.range,{startContainer:s,startOffset:a}=r;if(e.s.isCollapsed()){let t=e.s.current(!0);t&&t.parentElement&&this.applyCase(o,t.parentElement),r.setStart(s,a),e.s.selectRange(r)}else{let t=r.cloneRange(),i=r.cloneRange(),s=e.createInside.fake(),a=e.createInside.fake();t.collapse(!0),i.collapse(!1),t.insertNode(s),i.insertNode(a),n.Dom.between(s,a,e=>{this.applyCase(o,e)}),r.setStartAfter(s),r.setEndBefore(a),e.s.selectRange(r),n.Dom.safeRemove(s),n.Dom.safeRemove(a)}}})}applyCase(e,t){if(n.Dom.isText(t)){let i=t.nodeValue;i&&(t.nodeValue=(t=>{switch(e){case"lowercase":return t.toLowerCase();case"uppercase":return t.toUpperCase();default:return t.split(" ").map(r.ucfirst).join(" ")}})(i))}else n.Dom.each(t,t=>{this.applyCase(e,t)})}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"changeCase",group:"font-style"}])}}(0,o._)(l,"requires",["license"]),a.JoditPro.plugins.add("change-case",l)},89683:function(e,t,i){"use strict";var o=i(91729),n=i.n(o),r=i(6441),s=i(86583);r.Config.prototype.controls.changeCase={tooltip:"Change case",icon:n(),list:["lowercase","UPPERCASE","Title Case"],isDisabled:e=>!e.s.current(),exec(e,t,{control:i}){let o=i.command+"Selected",n=i.args&&i.args[0]||(0,s.dataBind)(e,o);if(!n||!i.command)return!1;(0,s.dataBind)(e,o,n),e.execCommand(i.command,null,n)},command:"changeCase"}},29528:function(e,t,i){"use strict";var o=i(82749),n=i(31635),r=i(45128),s=i(65478),a=i(2748),l=i(50911),c=i(2692);class d extends l.Plugin{afterInit(e){e.e.on("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}onAfterGenerateColorPicker(e,t,i,o){a.Dom.detach(t);let n=new r.ColorInput(this.j,{value:o||"#000",onChange:i});t.appendChild(n.container)}beforeDestruct(e){e.e.off("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!c.JoditPro.fatMode)}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([s.autobind],d.prototype,"onAfterGenerateColorPicker",null),c.JoditPro.plugins.add("color-picker",d)},45128:function(e,t,i){"use strict";i.d(t,{ColorInput:function(){return h}});var o=i(82749),n=i(31635),r=i(46146),s=i(82758),a=i(65478),l=i(21537),c=i(38837),d=i(67510),u=i(41409);class h extends d.UIInput{className(){return"ColorInput"}afterSetMode(e,t){"slim"===e&&t&&this.nativeInput.setAttribute("readonly","true")}onChangeSelfValue(){this.nativeInput.style.backgroundColor=this.value}onEscKeyDown(e){e.key===s.KEY_ESC&&this.popup?.close()}constructor(e,t){super(e,t),(0,o._)(this,"trigger",void 0),(0,o._)(this,"popup",void 0);let i=new d.Popup(e);this.popup=i,this.trigger=(0,d.Button)(this.j,"ok");let n=this.getElm("wrapper");(0,c.assert)(null!=n,"wrapper element does not exist"),n.appendChild(this.trigger.container),this.trigger.container.classList.add(this.getFullElName("trigger")),this.trigger.onAction(()=>{this.state.onChange?.(this.value),i.close()}),i.setMod("padding",!1).setMod("max-height",!1);let s=this.j.create.div(this.getFullElName("picker")),a=r.createPicker(s,{paletteEditable:!0,showAlpha:!0,palette:"PALETTE_MATERIAL_CHROME"}).on("change",(e,t)=>{this.isFocused||(this.value=r.parseColor(t||"","hex"))});this.j.e.on(this,"change",()=>{let e;e=this.value,r.parseColor(e,"hex")!==a.color&&(a.color=this.value)}),i.setContent(s),this.j.e.on(this.nativeInput,"click",()=>{i.parentElement=this,this.jodit instanceof u.Dialog&&i.setZIndex(this.jodit.getZIndex()+1),i.open(()=>(0,l.position)(this.container))}),this.onChangeValue(),this.onChangeSelfValue()}}(0,n.__decorate)([(0,a.watch)(":change")],h.prototype,"onChangeSelfValue",null),(0,n.__decorate)([(0,a.watch)("nativeInput:keydown")],h.prototype,"onEscKeyDown",null),h=(0,n.__decorate)([a.component],h)},3536:function(e,t,i){"use strict";var o=i(4941),n=i(41943),r=i(46995),s=i.n(r),a=i(6441);a.Config.prototype.emoji={data:()=>n,enableAutoComplete:!0,recentCountLimit:10},a.Config.prototype.controls.emoji={tooltip:"Insert Emoji",icon:s(),popup(e,t,i){e.s.save();let n=e.getInstance(o.Emoji);return e.e.off(n,"insert").on(n,"insert",t=>{e.s.restore(),e.s.insertNode(e.createInside.text(t),!0),i()}),e.e.one("beforePopupClose",()=>{e.s.restore()}),n.reset(),n.container}}},85174:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(3536);var r=i(4941),s=i(65478),a=i(49055),l=i(20356),c=i(2692);class d extends l.Plugin{async afterInit(e){let t=await e.o.emoji.data();!e.isInDestruct&&(this.data={...t,emoji:t.emoji.map(r.Emoji.normalizeEmoji)},e.o.emoji.enableAutoComplete&&e.e.fire("registerAutocompleteSource",this.onAutoComplete))}onAutoComplete(e){return e.length>2&&":"===e[0]&&(e=e.substr(1).toLowerCase(),(0,a.trim)(e).length)?this.data.emoji.filter(t=>t.description?.indexOf(e)===0).sort((t,i)=>t.description.indexOf(e)-i.description.indexOf(e)).map(e=>({title:`${e.emoji} ${e.description}`,value:e.emoji})):[]}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!c.JoditPro.fatMode),(0,o._)(this,"buttons",[{name:"emoji",group:"insert"}]),(0,o._)(this,"data",void 0)}}(0,o._)(d,"requires",["autocomplete","license"]),(0,n.__decorate)([s.autobind],d.prototype,"onAutoComplete",null),c.JoditPro.plugins.add("emoji",d)},4941:function(e,t,i){"use strict";i.d(t,{Emoji:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(2748),a=i(21537),l=i(67510);let c="Recently";class d extends l.UIElement{className(){return"Emoji"}get defaultList(){return this.recent.concat(this.data?this.data.emoji:[])}reset(){this.data&&(this.input.nativeInput.value="",this.setItems(this.defaultList),this.setActiveCategory(0))}setItems(e){this.items=e.map(d.normalizeEmoji),this.list.scrollTo(0,0),this.columns=0,this.renderWindow()}createContainer(e){let t=this.j.c.div("jodit-emoji");this.input=new l.UIInput(this.j,{name:"search",icon:"search",autocomplete:!1,clearButton:!0,placeholder:"Search emoji"}),this.input.container.classList.add(this.getFullElName("input")),this.categories=this.j.c.div(this.getFullElName("categories")),this.list=this.j.c.div(this.getFullElName("emojis"));let i=this.j.c.div(this.getFullElName("navigate"));return s.Dom.append(i,[this.categories,this.input.container]),s.Dom.append(t,[i,this.list]),t}setActiveCategory(e,t=!1){let i=this.getElms("category"),o=i[this.activeIndex];i[e]||(e=i.length-1);let n=i[e],r=this.getFullElName("category","active",!0);if(o&&o.classList.remove(r),n&&n.classList.add(r),t){let t=this.data?.categories[e],i=this.rows.find(e=>e.title===t);if(i){this.list.scrollTop=i.top+this.paddingTop,this.renderWindow();let e=this.cache[i.title??""];e&&e.parentNode===this.list&&(this.list.scrollTop=e.offsetTop-this.list.offsetTop)}}this.activeIndex=e}generateCategoriesList(e){return e.map((t,i)=>this.j.c.div(this.getFullElName("category"),{"data-index":i,title:this.j.i18n(t),style:{width:100/e.length+"%"}}))}measure(){let{list:e}=this,t=e.querySelector("."+this.getFullElName("emoji")),i=e.querySelector("."+this.getFullElName("category-title"));if(t?.offsetWidth){let e=parseFloat(this.j.ow.getComputedStyle(t).marginBottom);return{cellWidth:t.offsetWidth,rowHeight:t.offsetHeight+(e||0),titleHeight:i?.offsetHeight||t.offsetHeight}}if(this.cellWidth)return{cellWidth:this.cellWidth,rowHeight:this.rowHeight,titleHeight:this.titleHeight};let o=this.j.ow.getComputedStyle(e),n=parseFloat(o.getPropertyValue("--jd-jodit-emoji-item-size"))||parseFloat(o.getPropertyValue("--jodit-emoji-item-size"))||28;return{cellWidth:n,rowHeight:n+n/7,titleHeight:n}}buildRows(){let{list:e}=this,t=parseFloat(this.j.ow.getComputedStyle(e).paddingTop);isNaN(t)||(this.paddingTop=t);let{cellWidth:i,rowHeight:o,titleHeight:n}=this.measure(),r=Math.max(1,Math.floor((e.clientWidth||308)/i));if(r===this.columns&&i===this.cellWidth&&o===this.rowHeight&&n===this.titleHeight)return;this.columns=r,this.cellWidth=i,this.rowHeight=o,this.titleHeight=n,this.window=[-1,-1];let s=this.data?.categories??[],a=[],l="",d=0,u=e=>(e.top=d,d+=e.height,a.push(e),e);this.items.forEach(e=>{let t=-1===e.category?c:s[e.category]??"";t!==l&&u({title:l=t,items:[],top:0,height:n});let i=a[a.length-1];(void 0!==i.title||i.items.length>=r)&&u({items:[],top:0,height:o}),a[a.length-1].items.push(e)}),this.rows=a}renderWindow(){this.renderRows(!1)}renderRows(e){if(this.isDestructed)return;this.buildRows();let{rows:t,list:i}=this,o=0,n=t.length;if(this.virtual){let e=i.scrollTop-300,r=i.scrollTop+(i.clientHeight||300)+300;for(-1===(o=t.findIndex(t=>t.top+t.height>e))&&(o=t.length),n=o;n<t.length&&t[n].top<r;)n+=1}if(o===this.window[0]&&n===this.window[1])return;this.window=[o,n];let r=t.length?t[t.length-1].top+t[t.length-1].height:0,a=o<t.length?t[o].top:r,l=n>o?r-t[n-1].top-t[n-1].height:0,c=[];a>0&&c.push(this.spacer(this.spacerTop,a));for(let e=o;n>e;e+=1)c.push(...this.renderRow(t[e]));if(l>0&&c.push(this.spacer(this.spacerBottom,l)),s.Dom.detach(i),s.Dom.append(i,c),this.virtual&&i.clientWidth&&!(o>=n)){if(Math.max(1,Math.floor(i.clientWidth/this.cellWidth))!==this.columns&&!e){this.columns=0,this.renderRows(!0);return}this.verifyLayout(o,n)}}verifyLayout(e,t){let{rows:i,list:o}=this,n=e=>this.rowElement(e).offsetTop-o.offsetTop,r=e=>1>=Math.abs(n(e)-(this.paddingTop+e.top)),s=r(i[e]),a=i.findIndex((i,o)=>o>=e&&t>o&&void 0===i.title);if(s&&-1!==a){let e=i[a],o=this.rowElement(e),n=this.cache[this.cellKey(e.items[e.items.length-1])],l=i[a+1];s=r(e)&&n.offsetTop===o.offsetTop&&(!l||a+1>=t||r(l))}s||(this.virtual=!1,this.window=[-1,-1],this.renderRows(!0))}rowElement(e){return void 0!==e.title?this.cache[e.title]:this.cache[this.cellKey(e.items[0])]}cellKey(e){return e.emoji+e.category}spacer(e,t){return e.style.height=t+"px",e}renderRow(e){if(void 0!==e.title){let t=e.title;return this.cache[t]??=this.j.c.div(this.getFullElName("category-title"),{"data-index":t===c?-1:this.data?.categories.indexOf(t)??-1},t?this.j.i18n(t):""),[this.cache[t]]}return e.items.map(e=>{let t=this.cellKey(e);return this.cache[t]??=this.j.c.div(this.getFullElName("emoji"),{"data-value":e.emoji},e.emoji),this.cache[t]})}updateActiveCategory(){let e=this.list.scrollTop,t=this.data?.categories??[],i=0;this.rows.forEach(o=>{void 0!==o.title&&o.title!==c&&e>o.top+this.paddingTop-20&&(i=Math.max(0,t.indexOf(o.title)))}),this.setActiveCategory(i)}static isShortCat(e){return e&&(0,a.isString)(e.e)}static normalizeEmoji(e){return d.isShortCat(e)?{emoji:e.e,description:e.d,category:e.c,aliases:e.a,tags:e.t}:e}onInsertCode(e){this.jodit.e.fire(this,"insert",e);let t=this.map[e];if(t){let i=[...this.recent],o=i.findIndex(t=>t.emoji===e);-1!==o&&i.splice(o,1),i.unshift({...t,category:-1}),this.recent=i}}onScrollList(){this.j.async.requestAnimationFrame(()=>{this.renderWindow(),this.updateActiveCategory()})}onAfterOpenPopup(){this.renderWindow()}onClickCategory(e){this.clearFilter();let t=e.target;t.classList.contains(this.getFullElName("category"))&&this.setActiveCategory(parseInt((0,a.attr)(t,"-index")||"0",10)||0,!0)}onClickItem(e){let t=e.target;if(t.classList.contains(this.getFullElName("emoji"))){let e=(0,a.attr)(t,"-value")||"";e&&this.onInsertCode(e)}e.preventDefault(),e.stopPropagation()}onInputFilter(){let e=this.input.value.toLowerCase();if(!e.length)return this.setItems(this.defaultList);this.setItems(this.defaultList.filter(t=>{let i=d.normalizeEmoji(t);return i.description?.toLowerCase().includes(e)||i.tags?.join(" ").toLowerCase().includes(e)||i.aliases?.join(" ").toLowerCase().includes(e)}))}clearFilter(){this.input.nativeInput.value.length&&this.reset()}onReady(){this.j.e.on(this.input.nativeInput,"input",this.onInputFilter).on(this.categories,"click",this.onClickCategory).on(this.list,"scroll",this.onScrollList).on(this.list,"mousedown touchstart",this.onClickItem)}destruct(){return this.input.destruct(),super.destruct()}constructor(e){super(e),(0,o._)(this,"data",null),(0,o._)(this,"recent",[]),(0,o._)(this,"map",{}),(0,o._)(this,"activeIndex",0),(0,o._)(this,"cache",{}),(0,o._)(this,"items",[]),(0,o._)(this,"rows",[]),(0,o._)(this,"columns",0),(0,o._)(this,"cellWidth",0),(0,o._)(this,"rowHeight",0),(0,o._)(this,"titleHeight",0),(0,o._)(this,"paddingTop",0),(0,o._)(this,"window",[-1,-1]),(0,o._)(this,"virtual",!0),(0,o._)(this,"spacerTop",this.j.c.div(this.getFullElName("spacer"))),(0,o._)(this,"spacerBottom",this.j.c.div(this.getFullElName("spacer"))),this.setMod("loading",!0),(async()=>{this.data=await e.o.emoji.data(),this.isInDestruct||(this.setMod("loading",!1),this.data.emoji.forEach(e=>{let t=d.normalizeEmoji(e);this.map[t.emoji]=t}),this.setItems(this.defaultList),s.Dom.append(this.categories,this.generateCategoriesList(this.data.categories)),this.setActiveCategory(0))})()}}(0,n.__decorate)([r.persistent],d.prototype,"recent",void 0),(0,n.__decorate)([r.autobind],d.prototype,"renderWindow",null),(0,n.__decorate)([r.autobind],d.prototype,"onScrollList",null),(0,n.__decorate)([(0,r.watch)(":afterEmojiOpenPopup")],d.prototype,"onAfterOpenPopup",null),(0,n.__decorate)([r.autobind],d.prototype,"onClickCategory",null),(0,n.__decorate)([r.autobind],d.prototype,"onClickItem",null),(0,n.__decorate)([(0,r.debounce)()],d.prototype,"onInputFilter",null),(0,n.__decorate)([(0,r.hook)("ready")],d.prototype,"onReady",null),d=(0,n.__decorate)([r.component],d)},90832:function(e,t,i){"use strict";var o=i(53121),n=i.n(o),r=i(83556),s=i.n(r),a=i(4872),l=i.n(a),c=i(6441),d=i(2748);c.Config.prototype.exportDocs={css:"",pdf:{externalFonts:[],allow:!0,converter:null,options:{defaultFont:"courier",format:"A4",page_orientation:"portrait"}},docx:{allow:!0,filename:"document.docx",converter:null}},c.Config.prototype.controls.exportDocs={tooltip:"Export",isDisabled:e=>d.Dom.isEmptyContent(e.editor),icon:n(),list:{exportToPDF:"Export to PDF",exportToDOCX:"Export to DOCX"},childExec(e,t,{control:i}){let o=i.name??"exportToPDF";e.execCommand(o)}},c.Config.prototype.controls.exportToPDF={tooltip:"Export to PDF",isDisabled:e=>d.Dom.isEmptyContent(e.editor),icon:{name:l(),scale:1.3}},c.Config.prototype.controls.exportToDOCX={...c.Config.prototype.controls.exportToPDF,tooltip:"Export to DOCX",icon:{name:s(),scale:1.3}}},90882:function(e,t,i){"use strict";var o=i(82749);i(90832);var n=i(22732),r=i(68934),s=i(11628),a=i(50911),l=i(54079),c=i(14625),d=i(2692);class u extends a.Plugin{afterInit(e){e.registerCommand("exportToPDF",async()=>{let{converter:t}=(0,r.ConfigDeepFlatten)(e.o.exportDocs.pdf);t?await this.clientExport(e,t,"document.pdf"):await this.sendExportRequest(e,{action:"generatePdf",filename:"document.pdf",data:{options:(0,r.ConfigDeepFlatten)(e.o.exportDocs.pdf).options}})}),e.registerCommand("exportToDOCX",async()=>{let t=(0,r.ConfigDeepFlatten)(e.o.exportDocs.docx),i=t.filename||"document.docx";t.converter?await this.clientExport(e,t.converter,i):await this.sendExportRequest(e,{action:"generateDocx",filename:i})})}async clientExport(e,t,i){e.progressbar.show().progress(50),await this.downloadBlob(e,i,async()=>t(u.getValue(e)))}async sendExportRequest(e,t){let i=new l.Ajax({...e.o.exportDocs.ajax??e.o.filebrowser.ajax,method:"POST",responseType:"blob",onProgress(t){e.progressbar.show().progress(t)},data:{action:t.action,html:u.getValue(e),...t.data}});e.e.on("beforeDestruct",i.destruct),await this.downloadBlob(e,t.filename,async()=>(await i.send()).blob())}async downloadBlob(e,t,i){try{let e=await i(),o=this.j.create.a();o.href=URL.createObjectURL(e),o.download=t,o.click(),this.j.progressbar.showFileUploadAnimation(),n.Dom.safeRemove(o),URL.revokeObjectURL(o.href)}catch(t){t.message&&e.alert(t.message)}finally{e.progressbar.progress(100),await e.async.delay(200),e.progressbar.hide()}}static getValue(e){let[t]=(0,s.previewBox)(e),i=[];return e.o.exportDocs.pdf.externalFonts.forEach(e=>{/^</.test(e)?i.push(e):i.push(`<link rel="stylesheet" href="${e}">`)}),i.push(`<style>${(0,c.generateCriticalCSS)(e)}</style>`),i.push(`<style>${e.o.exportDocs.css}</style>`),i.push(t.innerHTML),i.join(`
427
+ </div>`}update(){this.button.update(),this.lockUpdate=!0,this.colors.forEach(e=>{e.value!==this.state[e.state.name]&&(e.value=this.state[e.state.name])}),this.lockUpdate=!1}constructor(e,t,i){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"updateState",void 0),(0,o._)(this,"button",void 0),(0,o._)(this,"lockUpdate",void 0),(0,o._)(this,"colors",void 0),this.state=t,this.updateState=i,this.button=new l.UIGButton(this.j,this.state),this.lockUpdate=!1,this.colors=["bgStart","bgEnd","fontColor","borderColor","boxShadowColor","textShadowColor","previewBgColor"].map(e=>new c.ColorInput(this.j,{name:e,onChange:t=>{this.lockUpdate||("bgEnd"===e&&t!==this.state.bgStart&&this.updateState("solid",!1),this.updateState(e,t))}}).setMod("slim",!0)),this.setMod("mode","default");let n=this.getElm("button");(0,s.assert)(null!=n,"button element does not exists"),n.appendChild(this.button.container);let r=this.getElm("colors");(0,s.assert)(null!=r,"colors element does not exists"),this.colors.forEach(e=>{r.appendChild(e.container)}),this.update()}}d=(0,n.__decorate)([r.component],d)},8390:function(e,t,i){"use strict";var o=i(82749);i(89683);var n=i(2748),r=i(36409),s=i(50911),a=i(2692);class l extends s.Plugin{afterInit(e){e.registerCommand("changeCase",{exec:(t,i,o)=>{o=o.toLowerCase();let r=e.s.range,{startContainer:s,startOffset:a}=r;if(e.s.isCollapsed()){let t=e.s.current(!0);t&&t.parentElement&&this.applyCase(o,t.parentElement),r.setStart(s,a),e.s.selectRange(r)}else{let t=r.cloneRange(),i=r.cloneRange(),s=e.createInside.fake(),a=e.createInside.fake();t.collapse(!0),i.collapse(!1),t.insertNode(s),i.insertNode(a),n.Dom.between(s,a,e=>{this.applyCase(o,e)}),r.setStartAfter(s),r.setEndBefore(a),e.s.selectRange(r),n.Dom.safeRemove(s),n.Dom.safeRemove(a)}}})}applyCase(e,t){if(n.Dom.isText(t)){let i=t.nodeValue;i&&(t.nodeValue=(t=>{switch(e){case"lowercase":return t.toLowerCase();case"uppercase":return t.toUpperCase();default:return t.split(" ").map(r.ucfirst).join(" ")}})(i))}else n.Dom.each(t,t=>{this.applyCase(e,t)})}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"changeCase",group:"font-style"}])}}(0,o._)(l,"requires",["license"]),a.JoditPro.plugins.add("change-case",l)},89683:function(e,t,i){"use strict";var o=i(91729),n=i.n(o),r=i(6441),s=i(86583);r.Config.prototype.controls.changeCase={tooltip:"Change case",icon:n(),list:["lowercase","UPPERCASE","Title Case"],isDisabled:e=>!e.s.current(),exec(e,t,{control:i}){let o=i.command+"Selected",n=i.args&&i.args[0]||(0,s.dataBind)(e,o);if(!n||!i.command)return!1;(0,s.dataBind)(e,o,n),e.execCommand(i.command,null,n)},command:"changeCase"}},57722:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(88902);var r=i(90142),s=i(99131),a=i(65478),l=i(2748),c=i(4510),d=i(5700),u=i(50911),h=i(10830),p=i(56917),f=i(78584),m=i(21491),g=i(2692);class b extends u.Plugin{afterInit(e){e.e.on("openChartEditor",this.openEditor).on("removeChart",this.removeChart).on("isChartEditorOpened",()=>!!this.__dialog?.isOpened),e.registerCommand("insertChart",()=>(this.openEditor(),!1)),this.__decorateAll()}beforeDestruct(){this.closePopup(),this.__popup?.destruct(),this.__dialog?.destruct()}openEditor(e){let t=(0,s.findChart)(this.j,e??null),i=t&&(0,s.readChartData)(this.j,t)||(0,s.defaultChartData)(this.j);this.closePopup(),this.j.s.save();let o=this.__getDialog(),n=this.__editor;n&&(n.setData(i),o.setHeader(this.j.i18n(t?"Edit chart":"Insert chart")).setFooter([(0,h.Button)(o,"cancel","Cancel","default").onAction(()=>{o.close()}),(0,h.Button)(o,"ok",t?"Save":"Insert","primary").onAction(()=>{this.__save(t,n.getData()),o.close()})]).open())}removeChart(e){let t=(0,s.findChart)(this.j,e??this.__target);this.closePopup(),t&&(this.j.s.setCursorAfter(t),l.Dom.safeRemove(t),this.j.synchronizeValues())}__save(e,t){e?(0,s.applyChartData)(this.j,e,t):(e=(0,s.createChart)(this.j,t),this.j.s.restore(),this.j.s.insertNode(e,!1,!1)),this.j.s.setCursorAfter(e),this.j.synchronizeValues()}__getDialog(){if(!this.__dialog){let{dialog:e}=this.j.o.chart;this.__dialog=new f.Dialog({language:this.j.o.language,theme:this.j.o.theme,shadowRoot:this.j.o.shadowRoot,events:this.j.o.events}),this.__editor=new r.UIChartEditor(this.j),this.__dialog.setContent(this.__editor).setSize(e.width,e.height),this.__dialog.e.on("beforeClose",()=>{this.j.s.restore()})}return this.__dialog}onClick(e){let t=(0,s.findChart)(this.j,e.target);t?this.openPopup(t):this.closePopup()}onDblClick(e){let t=(0,s.findChart)(this.j,e.target);t&&this.openEditor(t)}onOutsideClick(){this.closePopup()}openPopup(e){if(this.j.o.readonly||!this.j.o.chart.popup.length)return;this.__popup||(this.__popup=new p.Popup(this.j,!1),this.__toolbar=(0,m.makeCollection)(this.j,this.__popup));let t=this.__popup,i=this.__toolbar;i&&(this.__target=e,i.build(this.j.o.chart.popup,e),t.setContent(i.container),t.isOpened?t.updatePosition():t.open(()=>(0,d.position)(e,this.j)))}closePopup(){this.__target=null,this.__popup?.close()}onChange(){this.__decorateAll(),this.__target&&!this.j.editor.contains(this.__target)&&this.closePopup()}__decorateAll(){let e=!1;(0,c.toArray)(this.j.editor.querySelectorAll(`figure[${s.CHART_ATTR}]`)).forEach(t=>{(0,s.isChartElement)(t,this.j.o.chart.className)&&((0,s.decorateChart)(this.j,t),e=this.__syncResized(t)||e,e=this.__renderMissing(t)||e)}),e&&this.j.synchronizeValues()}__renderMissing(e){if(e.querySelector("svg"))return!1;let t=(0,s.readChartData)(this.j,e);return!!t&&((0,s.applyChartData)(this.j,e,t),!0)}__syncResized(e){let t=(0,s.readChartData)(this.j,e);if(!t)return!1;let i=(0,s.pixels)(e.style.width)||t.width,o=(0,s.pixels)(e.style.height)||t.height;return(i!==t.width||o!==t.height)&&((0,s.applyChartData)(this.j,e,{...t,width:i,height:o}),!0)}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"chart",group:"insert"}]),(0,o._)(this,"__dialog",null),(0,o._)(this,"__editor",null),(0,o._)(this,"__popup",null),(0,o._)(this,"__toolbar",null),(0,o._)(this,"__target",null)}}(0,o._)(b,"requires",["license"]),(0,n.__decorate)([a.autobind],b.prototype,"openEditor",null),(0,n.__decorate)([a.autobind],b.prototype,"removeChart",null),(0,n.__decorate)([(0,a.watch)(":click")],b.prototype,"onClick",null),(0,n.__decorate)([(0,a.watch)(":dblclick")],b.prototype,"onDblClick",null),(0,n.__decorate)([(0,a.watch)(":outsideClick")],b.prototype,"onOutsideClick",null),(0,n.__decorate)([(0,a.watch)([":change",":afterSetMode"]),(0,a.debounce)()],b.prototype,"onChange",null),g.JoditPro.plugins.add("chart",b)},88902:function(e,t,i){"use strict";var o=i(97467),n=i.n(o),r=i(6441),s=i(12153);r.Config.prototype.chart={className:"jodit-chart",types:["bar","horizontalBar","line","area","pie","donut","radar"],defaultType:"bar",defaultTitle:"Sample chart",defaultPoints:[{label:"Item 1",value:10},{label:"Item 2",value:20},{label:"Item 3",value:15},{label:"Item 4",value:25},{label:"Item 5",value:30}],colors:["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],defaultBackground:"#ffffff",defaultTextColor:"#111827",defaultBorderColor:"#e5e7eb",allowChangeBackground:!0,allowChangeTextColor:!0,allowChangeBorderColor:!0,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",width:600,height:400,popup:["chartEdit","chartRemove"],dialog:{width:620,height:720}},r.Config.prototype.controls.chart={tooltip:"Insert chart",icon:"chart",isActive:e=>!!e.e.fire("isChartEditorOpened"),exec(e){e.e.fire("openChartEditor")}},r.Config.prototype.controls.chartEdit={tooltip:"Edit chart",icon:"pencil",exec(e,t){e.e.fire("openChartEditor",t)}},r.Config.prototype.controls.chartRemove={tooltip:"Delete chart",icon:"bin",exec(e,t){e.e.fire("removeChart",t)}},r.Config.prototype.allowResizeTags=new Set([...r.Config.prototype.allowResizeTags,"figure"]),s.Icon.set("chart",n())},99131:function(e,t,i){"use strict";i.d(t,{applyChartData:function(){return g},cloneChartData:function(){return d},createChart:function(){return b},decorateChart:function(){return m},defaultChartData:function(){return f},findChart:function(){return h},isChartElement:function(){return u},normalizePoint:function(){return c},pixels:function(){return v},readChartData:function(){return p}});var o=i(75787),n=i(2748),r=i(70799),s=i(29960);let a="data-jodit-chart",l=["bar","horizontalBar","line","area","pie","donut","radar"];function c(e){let t=Number(e.value),i={label:(e.label??"")+"",value:isFinite(t)?t:0};return e.color&&(i.color=e.color+""),i}function d(e){return{...e,points:e.points.map(e=>({...e}))}}function u(e,t){return n.Dom.isTag(e,"figure")&&(e.hasAttribute(a)||e.classList.contains(t))}function h(e,t){return n.Dom.closest(t,t=>u(t,e.o.chart.className),e.editor)}function p(e,t){let i=(0,s.attr)(t,a);if(!i)return null;try{var o,n,d;let t,s;return o=JSON.parse(i),n=f(e),t=Number(o.width),s=Number(o.height),{type:(d=o.type,l.includes(d))?o.type:n.type,title:(o.title??n.title)+"",points:Array.isArray(o.points)?o.points.map(c):n.points.map(c),width:t>0?Math.round(t):n.width,height:s>0?Math.round(s):n.height,background:(0,r.isString)(o.background)?o.background:n.background,textColor:(0,r.isString)(o.textColor)?o.textColor:n.textColor,borderColor:(0,r.isString)(o.borderColor)?o.borderColor:n.borderColor}}catch{return null}}function f(e){let{chart:t}=e.o;return{type:t.defaultType,title:t.defaultTitle,points:t.defaultPoints.map(c),width:t.width,height:t.height,background:t.defaultBackground,textColor:t.defaultTextColor,borderColor:t.defaultBorderColor}}function m(e,t){(0,s.attr)(t,{class:e.o.chart.className,contenteditable:!1})}function g(e,t,i){let{chart:n}=e.o;m(e,t),(0,s.attr)(t,a,JSON.stringify(i)),t.style.width=i.width+"px",t.style.maxWidth="100%",t.style.height="",t.innerHTML=(0,o.renderChart)(i,{colors:n.colors,fontFamily:n.fontFamily})}function b(e,t){let i=e.createInside.element("figure");return g(e,i,t),i}function v(e){return/^\d+(\.\d+)?px$/.test(e)?Math.round(parseFloat(e)):0}i.d(t,["CHART_ATTR",0,a,"CHART_TYPE_TITLES",0,{bar:"Bar chart",horizontalBar:"Horizontal bar",line:"Line chart",area:"Area chart",pie:"Pie chart",donut:"Donut chart",radar:"Radar chart"}])},93054:function(e,t,i){"use strict";i.d(t,{renderBar:function(){return n},renderHorizontalBar:function(){return r}});var o=i(36838);function n(e,t){let i=(0,o.ticks)(e.points),n=i[i.length-1],r=Math.max(...i.map(e=>(0,o.textWidth)((0,o.formatValue)(e),12))),s=(0,o.plotBox)(e,{x:r+12,y:28,width:0,height:28}),a=(0,o.chartTheme)(e),l=[(0,o.svgOpen)(e,t)];i.forEach(e=>{let t=s.y+s.height-e/n*s.height;l.push(`<line x1="${(0,o.num)(s.x)}" y1="${(0,o.num)(t)}" x2="${(0,o.num)(s.x+s.width)}" y2="${(0,o.num)(t)}" stroke="${a.grid}" stroke-dasharray="3 3"/>`,`<text x="${(0,o.num)(s.x-8)}" y="${(0,o.num)(t+4)}" font-size="12" fill="${a.inkMuted}" text-anchor="end">${(0,o.esc)((0,o.formatValue)(e))}</text>`)});let c=e.points.length||1,d=s.width/c,u=Math.max(2,.6*d),h=s.y+s.height;return e.points.forEach((e,i)=>{let r=(0,o.pointColor)(e,i,t),c=(e.value>0?e.value:0)/n*s.height,p=s.x+i*d+(d-u)/2,f=p+u/2;l.push(`<path d="${(0,o.roundedBarPath)(p,h-c,u,c,4,"top")}" fill="${r}"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))}</title></path>`,(0,o.valuePill)(f,h-c-18,e.value,r,a),`<text x="${(0,o.num)(f)}" y="${(0,o.num)(h+20)}" font-size="13" fill="${a.inkMuted}" text-anchor="middle">${(0,o.esc)((0,o.truncate)(e.label))}</text>`)}),l.push(`<line x1="${(0,o.num)(s.x)}" y1="${(0,o.num)(h)}" x2="${(0,o.num)(s.x+s.width)}" y2="${(0,o.num)(h)}" stroke="${a.border}"/>`,(0,o.svgClose)()),l.join("")}function r(e,t){let i=(0,o.ticks)(e.points),n=i[i.length-1],r=Math.min(160,Math.max(...e.points.map(e=>(0,o.textWidth)((0,o.truncate)(e.label),13)))),s=(0,o.plotBox)(e,{x:r+12,y:8,width:56,height:28}),a=(0,o.chartTheme)(e),l=[(0,o.svgOpen)(e,t)],c=s.y+s.height;i.forEach(e=>{let t=s.x+e/n*s.width;l.push(`<line x1="${(0,o.num)(t)}" y1="${(0,o.num)(s.y)}" x2="${(0,o.num)(t)}" y2="${(0,o.num)(c)}" stroke="${a.grid}" stroke-dasharray="3 3"/>`,`<text x="${(0,o.num)(t)}" y="${(0,o.num)(c+18)}" font-size="12" fill="${a.inkMuted}" text-anchor="middle">${(0,o.esc)((0,o.formatValue)(e))}</text>`)});let d=e.points.length||1,u=s.height/d,h=Math.max(2,.6*u);return e.points.forEach((e,i)=>{let r=(0,o.pointColor)(e,i,t),c=(e.value>0?e.value:0)/n*s.width,d=s.y+i*u+(u-h)/2,p=d+h/2;l.push(`<path d="${(0,o.roundedBarPath)(s.x,d,c,h,4,"right")}" fill="${r}"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))}</title></path>`,(0,o.valuePill)(s.x+c+12+(0,o.textWidth)((0,o.formatValue)(e.value),13)/2+8,p,e.value,r,a),`<text x="${(0,o.num)(s.x-12)}" y="${(0,o.num)(p+4.5)}" font-size="13" fill="${a.inkMuted}" text-anchor="end">${(0,o.esc)((0,o.truncate)(e.label))}</text>`)}),l.push(`<line x1="${(0,o.num)(s.x)}" y1="${(0,o.num)(s.y)}" x2="${(0,o.num)(s.x)}" y2="${(0,o.num)(c)}" stroke="${a.border}"/>`,(0,o.svgClose)()),l.join("")}},36838:function(e,t,i){"use strict";i.d(t,{chartTheme:function(){return s},esc:function(){return a},formatValue:function(){return c},num:function(){return l},plotBox:function(){return f},pointColor:function(){return u},roundedBarPath:function(){return b},svgClose:function(){return g},svgOpen:function(){return m},textWidth:function(){return p},ticks:function(){return h},truncate:function(){return d},valuePill:function(){return v}});let o="#ffffff",n="#111827";function r(e,t){let i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!i)return e;let[o,n,r]=[i[1],i[2],i[3]].map(e=>parseInt(e,16));return`rgba(${o}, ${n}, ${r}, ${t})`}function s(e){let t=e.textColor||n,i=e.background??o;return{surface:i||o,transparent:!i,border:e.borderColor||r(t,.12),grid:r(t,.12),ink:t,inkSecondary:r(t,.8),inkMuted:r(t,.6)}}function a(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function l(e){return Math.round(100*e)/100+""}function c(e){return l(e).replace(/\B(?=(\d{3})+(?!\d))/g," ")}function d(e,t=14){return e.length>t?e.slice(0,t-1)+"…":e}function u(e,t,i){let{colors:o}=i;return e.color||o[t%o.length]||"#2a78d6"}function h(e){let t=Math.max(0,...e.map(e=>e.value>0?e.value:0)),i=function(e){if(e<=0)return 1;let t=Math.pow(10,Math.floor(Math.log10(e))),i=e/t;return([1,2,2.5,5,10].find(e=>e>=i)??10)*t}((t||1)/4),o=Math.max(i,Math.ceil(t/i)*i),n=[];for(let e=0;e<=o+i/2;e+=i)n.push(Math.round(1e3*e)/1e3);return n}function p(e,t){return e.length*t*.58}function f(e,t){let i=24+40*!!e.title+t.y;return{x:24+t.x,y:i,width:Math.max(10,e.width-48-t.x-t.width),height:Math.max(10,e.height-i-24-t.height)}}function m(e,t){let i=s(e),o=e.title?` aria-label="${a(e.title)}"`:"",n=i.transparent?"":`<rect x="0.5" y="0.5" width="${e.width-1}" height="${e.height-1}" rx="12" fill="${i.surface}" stroke="${i.border}"/>`;return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e.width} ${e.height}" width="100%" role="img"${o} font-family="${a(t.fontFamily)}">`+n+(e.title?`<text x="24" y="44" font-size="20" font-weight="600" fill="${i.ink}">${a(e.title)}</text>`:"")}function g(){return"</svg>"}function b(e,t,i,o,n,r){if(o<=0||i<=0)return"";let s=Math.min(n,i/2,o/2);return"top"===r?`M${l(e)},${l(t+o)}V`+l(t+s)+`a${l(s)},${l(s)} 0 0 1 ${l(s)},${l(-s)}`+"h"+l(i-2*s)+`a${l(s)},${l(s)} 0 0 1 ${l(s)},${l(s)}`+"V"+l(t+o)+"Z":`M${l(e)},${l(t)}H`+l(e+i-s)+`a${l(s)},${l(s)} 0 0 1 ${l(s)},${l(s)}`+"v"+l(o-2*s)+`a${l(s)},${l(s)} 0 0 1 ${l(-s)},${l(s)}`+"H"+l(e)+"Z"}function v(e,t,i,o,n){let r=c(i),s=p(r,13)+16;return`<rect x="${l(e-s/2)}" y="${l(t-11)}" width="${l(s)}" height="22" rx="6" fill="${o}" fill-opacity="0.14"/><text x="${l(e)}" y="${l(t+4.5)}" font-size="13" font-weight="600" fill="${n.inkSecondary}" text-anchor="middle">${a(r)}</text>`}i.d(t,["DEFAULT_BACKGROUND",0,o,"DEFAULT_TEXT_COLOR",0,n])},75787:function(e,t,i){"use strict";i.d(t,{renderChart:function(){return a}});var o=i(93054),n=i(73077),r=i(83349),s=i(67407);function a(e,t){switch(e.type){case"horizontalBar":return(0,o.renderHorizontalBar)(e,t);case"line":return(0,n.renderLine)(e,t,!1);case"area":return(0,n.renderLine)(e,t,!0);case"radar":return(0,s.renderRadar)(e,t);case"pie":return(0,r.renderPie)(e,t,!1);case"donut":return(0,r.renderPie)(e,t,!0);default:return(0,o.renderBar)(e,t)}}},73077:function(e,t,i){"use strict";i.d(t,{renderLine:function(){return n}});var o=i(36838);function n(e,t,i){let n=(0,o.ticks)(e.points),r=n[n.length-1],s=Math.max(...n.map(e=>(0,o.textWidth)((0,o.formatValue)(e),12))),a=(0,o.plotBox)(e,{x:s+12,y:28,width:0,height:28}),l=(0,o.chartTheme)(e),c=[(0,o.svgOpen)(e,t)],d=a.y+a.height;n.forEach(e=>{let t=d-e/r*a.height;c.push(`<line x1="${(0,o.num)(a.x)}" y1="${(0,o.num)(t)}" x2="${(0,o.num)(a.x+a.width)}" y2="${(0,o.num)(t)}" stroke="${l.grid}" stroke-dasharray="3 3"/>`,`<text x="${(0,o.num)(a.x-8)}" y="${(0,o.num)(t+4)}" font-size="12" fill="${l.inkMuted}" text-anchor="end">${(0,o.esc)((0,o.formatValue)(e))}</text>`)});let u=e.points.length||1,h=a.width/u,p=e.points.length?(0,o.pointColor)(e.points[0],0,t):t.colors[0],f=e.points.map((e,t)=>({x:a.x+t*h+h/2,y:d-(e.value>0?e.value:0)/r*a.height}));if(f.length>1){let e=f.map((e,t)=>`${t?"L":"M"}${(0,o.num)(e.x)},${(0,o.num)(e.y)}`).join("");i&&c.push(`<path d="${e}L${(0,o.num)(f[f.length-1].x)},${(0,o.num)(d)}L${(0,o.num)(f[0].x)},${(0,o.num)(d)}Z" fill="${p}" fill-opacity="0.18"/>`),c.push(`<path d="${e}" fill="none" stroke="${p}" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"/>`)}return e.points.forEach((e,t)=>{let{x:i,y:n}=f[t];c.push(`<circle cx="${(0,o.num)(i)}" cy="${(0,o.num)(n)}" r="5" fill="${p}" stroke="${l.surface}" stroke-width="2"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))}</title></circle>`,(0,o.valuePill)(i,n-20,e.value,p,l),`<text x="${(0,o.num)(i)}" y="${(0,o.num)(d+20)}" font-size="13" fill="${l.inkMuted}" text-anchor="middle">${(0,o.esc)((0,o.truncate)(e.label))}</text>`)}),c.push(`<line x1="${(0,o.num)(a.x)}" y1="${(0,o.num)(d)}" x2="${(0,o.num)(a.x+a.width)}" y2="${(0,o.num)(d)}" stroke="${l.border}"/>`,(0,o.svgClose)()),c.join("")}},83349:function(e,t,i){"use strict";i.d(t,{renderPie:function(){return r}});var o=i(36838);function n(e,t,i,n){return`${(0,o.num)(e+i*Math.cos(n))},${(0,o.num)(t+i*Math.sin(n))}`}function r(e,t,i){let r=e.points.filter(e=>e.value>0),s=r.reduce((e,t)=>e+t.value,0),a=e.width<420,l=a?e.width-48:Math.min(180,Math.max(120,.3*e.width)),c=26*r.length;if(a){let t=48+40*!!e.title+160+c+12;e={...e,height:Math.max(e.height,t)}}let d=(0,o.plotBox)(e,{x:0,y:0,width:a?0:l+24,height:a?c+12:0}),u=Math.max(10,Math.min(d.width,d.height)/2-4),h=i?.58*u:0,p=d.x+d.width/2,f=d.y+d.height/2,m=(0,o.chartTheme)(e),g=[(0,o.svgOpen)(e,t)],b=-Math.PI/2;r.forEach((e,i)=>{let r=(0,o.pointColor)(e,i,t),a=s?e.value/s*Math.PI*2:0,l=s?Math.round(e.value/s*1e3)/10:0;g.push(`<path d="${function(e,t,i,r,s,a){if(a-s>=2*Math.PI-1e-4){let n=r?` M${(0,o.num)(e-r)},${(0,o.num)(t)} a${(0,o.num)(r)},${(0,o.num)(r)} 0 1 0 ${(0,o.num)(2*r)},0 a${(0,o.num)(r)},${(0,o.num)(r)} 0 1 0 ${(0,o.num)(-(2*r))},0`:"";return`M${(0,o.num)(e-i)},${(0,o.num)(t)} a${(0,o.num)(i)},${(0,o.num)(i)} 0 1 0 ${(0,o.num)(2*i)},0 a${(0,o.num)(i)},${(0,o.num)(i)} 0 1 0 ${(0,o.num)(-(2*i))},0${n}`}let l=+(a-s>Math.PI),c=["M"+n(e,t,i,s),`A${(0,o.num)(i)},${(0,o.num)(i)} 0 ${l} 1 ${n(e,t,i,a)}`];return r?c.push("L"+n(e,t,r,a),`A${(0,o.num)(r)},${(0,o.num)(r)} 0 ${l} 0 ${n(e,t,r,s)}`):c.push(`L${(0,o.num)(e)},${(0,o.num)(t)}`),c.join("")+"Z"}(p,f,u,h,b,b+a)}" fill="${r}" stroke="${m.surface}" stroke-width="2" fill-rule="evenodd"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))} (${(0,o.num)(l)}%)</title></path>`),b+=a}),i&&s&&g.push(`<text x="${(0,o.num)(p)}" y="${(0,o.num)(f+7)}" font-size="20" font-weight="600" fill="${m.ink}" text-anchor="middle">${(0,o.esc)((0,o.formatValue)(s))}</text>`);let v=a?24:e.width-24-l,y=Math.max(6,Math.floor((l-22-48)/(13*.58))),w=a?d.y+d.height+12+13:f-c/2+13;return r.forEach((e,i)=>{let n=(0,o.pointColor)(e,i,t),r=w+26*i,a=s?Math.round(e.value/s*1e3)/10:0;g.push(`<rect x="${(0,o.num)(v)}" y="${(0,o.num)(r-7)}" width="14" height="14" rx="4" fill="${n}"/>`,`<text x="${(0,o.num)(v+22)}" y="${(0,o.num)(r+4.5)}" font-size="13" fill="${m.inkSecondary}">${(0,o.esc)((0,o.truncate)(e.label,y))}</text>`,`<text x="${(0,o.num)(v+l)}" y="${(0,o.num)(r+4.5)}" font-size="13" fill="${m.inkMuted}" text-anchor="end">${(0,o.num)(a)}%</text>`)}),g.push((0,o.svgClose)()),g.join("")}},67407:function(e,t,i){"use strict";i.d(t,{renderRadar:function(){return r}});var o=i(36838);function n(e,t,i,o,n){let r=-Math.PI/2+o/n*Math.PI*2;return{x:e+i*Math.cos(r),y:t+i*Math.sin(r),angle:r}}function r(e,t){let i=(0,o.ticks)(e.points),r=i[i.length-1],s=(0,o.plotBox)(e,{x:60,y:24,width:60,height:24}),a=s.x+s.width/2,l=s.y+s.height/2,c=Math.max(10,Math.min(s.width,s.height)/2-4),d=Math.max(1,e.points.length),u=(0,o.chartTheme)(e),h=[(0,o.svgOpen)(e,t)],p=e.points.length?(0,o.pointColor)(e.points[0],0,t):t.colors[0];i.forEach((t,s)=>{if(!t)return;let p=t/r*c,f=e.points.map((e,t)=>n(a,l,p,t,d)).map((e,t)=>`${t?"L":"M"}${(0,o.num)(e.x)},${(0,o.num)(e.y)}`).join("");h.push(d>2?`<path d="${f}Z" fill="none" stroke="${u.grid}" stroke-dasharray="3 3"/>`:`<circle cx="${(0,o.num)(a)}" cy="${(0,o.num)(l)}" r="${(0,o.num)(p)}" fill="none" stroke="${u.grid}" stroke-dasharray="3 3"/>`,s===i.length-1?`<text x="${(0,o.num)(a+6)}" y="${(0,o.num)(l-p+12)}" font-size="12" fill="${u.inkMuted}">${(0,o.esc)((0,o.formatValue)(t))}</text>`:"")}),e.points.forEach((e,t)=>{let i,r=n(a,l,c,t,d),s=n(a,l,c+18,t,d);h.push(`<line x1="${(0,o.num)(a)}" y1="${(0,o.num)(l)}" x2="${(0,o.num)(r.x)}" y2="${(0,o.num)(r.y)}" stroke="${u.grid}"/>`,`<text x="${(0,o.num)(s.x)}" y="${(0,o.num)(s.y+4.5)}" font-size="13" fill="${u.inkMuted}" text-anchor="${.2>Math.abs(i=Math.cos(s.angle))?"middle":i>0?"start":"end"}">${(0,o.esc)((0,o.truncate)(e.label))}</text>`)});let f=e.points.map((e,t)=>n(a,l,(e.value>0?e.value:0)/r*c,t,d));if(f.length>1){let e=f.map((e,t)=>`${t?"L":"M"}${(0,o.num)(e.x)},${(0,o.num)(e.y)}`).join("");h.push(`<path d="${e}Z" fill="${p}" fill-opacity="0.18" stroke="${p}" stroke-width="2" stroke-linejoin="round"/>`)}return e.points.forEach((e,t)=>{let{x:i,y:n}=f[t];h.push(`<circle cx="${(0,o.num)(i)}" cy="${(0,o.num)(n)}" r="5" fill="${p}" stroke="${u.surface}" stroke-width="2"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))}</title></circle>`)}),h.push((0,o.svgClose)()),h.join("")}},90142:function(e,t,i){"use strict";i.d(t,{UIChartEditor:function(){return p}});var o=i(82749),n=i(31635),r=i(99131),s=i(75787),a=i(36838),l=i(65478),c=i(2748),d=i(38837),u=i(29960),h=i(67510);class p extends h.UIElement{className(){return"UIChartEditor"}render(){return`<div>
428
+ <div class="&__preview">
429
+ <div class="&__colors"></div>
430
+ <div class="&__canvas"></div>
431
+ </div>
432
+ <div class="&__fields"></div>
433
+ <div class="&__points-header">
434
+ <span class="&__points-title">~Data points~</span>
435
+ <span class="&__summary"></span>
436
+ <span class="&__add"></span>
437
+ </div>
438
+ <div class="&__points"></div>
439
+ </div>`}syncTransparent(){let e=!this.state.background;this.transparentButton.classList.toggle(this.getFullElName("transparent","active"),e),(0,u.attr)(this.transparentButton,"aria-pressed",e)}createColorInput(e,t){let i=this.j.c.element("input",{type:"color",name:e,title:this.j.i18n("background"===e?"Background":"Text color"),class:this.getFullElName("color-input")});return this.j.e.on(i,"input",()=>{t(i.value),this.refresh()}),i}colorField(e,t){return this.j.c.element("label",{class:this.getFullElName("color-field")},[t,this.j.c.span(this.getFullElName("color-label"),this.j.i18n(e))])}setData(e){this.state=(0,r.cloneChartData)(e),this.typeSelect.value=this.state.type,this.titleInput.value=this.state.title,this.backgroundInput.value=this.state.background||a.DEFAULT_BACKGROUND,this.textColorInput.value=this.state.textColor||a.DEFAULT_TEXT_COLOR,this.borderColorInput.value=this.state.borderColor||this.j.o.chart.defaultBorderColor,this.syncTransparent(),this.rebuildPoints(),this.__render()}getData(){return{...this.state,title:this.state.title.trim(),points:this.state.points.map(r.normalizePoint)}}addPoint(){let{points:e}=this.state;e.push({label:this.j.i18n("Item")+" "+(e.length+1),value:0}),this.rebuildPoints(),this.refresh();let t=this.getElms("point-label"),i=t[t.length-1]?.querySelector("input");i?.focus()}removePoint(e){this.state.points.splice(e,1),this.rebuildPoints(),this.refresh()}rebuildPoints(){let e=this.getElm("points");(0,d.assert)(null!=e,"points element does not exist"),c.Dom.detach(e),this.state.points.forEach((t,i)=>{e.appendChild(this.createPointRow(t,i))})}createPointRow(e,t){let{j:i}=this,o=new h.UIInput(i,{name:"label",label:"Label",value:e.label,className:this.getFullElName("point-label"),onChange:t=>{e.label=t,this.refresh()}}),n=new h.UIInput(i,{name:"value",label:"Value",type:"number",value:e.value,className:this.getFullElName("point-value"),onChange:t=>{let i=Number(t);e.value=isFinite(i)?i:0,this.refresh()}}),r=i.c.element("input",{type:"color",title:i.i18n("Color"),class:this.getFullElName("point-color"),value:(0,a.pointColor)(e,t,{colors:i.o.chart.colors,fontFamily:""})});i.e.on(r,"input",()=>{e.color=r.value,this.refresh()});let s=(0,h.Button)(i,"bin","","default").setMod("variant","remove").onAction(()=>this.removePoint(t));(0,u.attr)(s.container,"title",i.i18n("Remove point"));let l=i.c.element("span",{class:this.getFullElName("point-grip"),title:i.i18n("Drag to reorder")}),c=i.c.div(this.getFullElName("point"),[l,o.container,n.container,r,s.container]);return this.bindDragAndDrop(c,l,t),c}bindDragAndDrop(e,t,i){let{j:o}=this,n=t=>{e.classList.toggle(this.getFullElName("point","drop","before"),"before"===t),e.classList.toggle(this.getFullElName("point","drop","after"),"after"===t)},r=t=>{let i=e.getBoundingClientRect();return t.clientY>i.top+i.height/2};(0,u.attr)(t,"draggable",!0),o.e.on(t,"dragstart",t=>{this.__dragIndex=i,e.classList.add(this.getFullElName("point","dragging")),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",i+""),t.dataTransfer.setDragImage(e,10,10))}).on(t,"dragend",()=>{this.__dragIndex=-1,e.classList.remove(this.getFullElName("point","dragging")),this.getElms("point").forEach(e=>{e.classList.remove(this.getFullElName("point","drop","before"),this.getFullElName("point","drop","after"))})}),o.e.on(e,"dragover",e=>{this.__dragIndex<0||this.__dragIndex===i||(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),n(r(e)?"after":"before"))}).on(e,"dragleave",()=>n(null)).on(e,"drop",e=>{this.__dragIndex<0||this.__dragIndex===i||(e.preventDefault(),this.movePoint(this.__dragIndex,i,r(e)),this.__dragIndex=-1)})}movePoint(e,t,i){let{points:o}=this.state;if(e===t||!o[e]||!o[t])return;let[n]=o.splice(e,1),r=t>e?t-1:t;i&&r++,o.splice(r,0,n),this.rebuildPoints(),this.refresh()}refresh(){this.__render()}__render(){let{chart:e}=this.j.o,t=this.getElm("canvas"),i=this.getElm("summary");if(t&&(t.innerHTML=(0,s.renderChart)(this.state,{colors:e.colors,fontFamily:e.fontFamily})),i){let e=this.state.points.reduce((e,t)=>e+t.value,0);i.textContent=this.state.points.length+" "+this.j.i18n("points")+" · "+this.j.i18n("Total")+": "+(0,a.formatValue)(e)}}constructor(e){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"typeSelect",void 0),(0,o._)(this,"titleInput",void 0),(0,o._)(this,"addButton",void 0),(0,o._)(this,"backgroundInput",void 0),(0,o._)(this,"textColorInput",void 0),(0,o._)(this,"borderColorInput",void 0),(0,o._)(this,"transparentButton",void 0),(0,o._)(this,"__dragIndex",-1),this.typeSelect=new h.UISelect(e,{name:"type",label:"Chart type",options:e.o.chart.types.map(t=>({value:t,text:e.i18n(r.CHART_TYPE_TITLES[t])})),onChange:e=>{this.state.type=e,this.refresh()}}),this.titleInput=new h.UIInput(e,{name:"title",label:"Chart title",placeholder:"Optional",onChange:e=>{this.state.title=e,this.refresh()}}),this.addButton=(0,h.Button)(e,"plus","Add point").onAction(this.addPoint.bind(this));let t=this.getElm("fields");(0,d.assert)(null!=t,"fields element does not exist"),t.appendChild(this.typeSelect.container),t.appendChild(this.titleInput.container);let i=this.getElm("add");(0,d.assert)(null!=i,"add element does not exist"),i.appendChild(this.addButton.container),this.backgroundInput=this.createColorInput("background",e=>{this.state.background=e,this.syncTransparent()}),this.textColorInput=this.createColorInput("textColor",e=>{this.state.textColor=e}),this.borderColorInput=this.createColorInput("borderColor",e=>{this.state.borderColor=e}),this.transparentButton=e.c.element("button",{type:"button",name:"transparent",class:this.getFullElName("transparent")}),e.e.on(this.transparentButton,"click",()=>{this.state.background=this.state.background?"":this.backgroundInput.value,this.syncTransparent(),this.refresh()});let n=this.getElm("colors");(0,d.assert)(null!=n,"colors element does not exist");let{chart:s}=e.o;s.allowChangeBackground&&n.appendChild(this.colorField("Background",this.backgroundInput)),s.allowChangeTextColor&&n.appendChild(this.colorField("Text",this.textColorInput)),s.allowChangeBorderColor&&n.appendChild(this.colorField("Border",this.borderColorInput)),s.allowChangeBackground&&n.appendChild(this.colorField("Transparent",this.transparentButton)),n.childNodes.length||c.Dom.safeRemove(n)}}(0,n.__decorate)([(0,l.debounce)(50)],p.prototype,"refresh",null),p=(0,n.__decorate)([l.component],p)},29528:function(e,t,i){"use strict";var o=i(82749),n=i(31635),r=i(45128),s=i(65478),a=i(2748),l=i(50911),c=i(2692);class d extends l.Plugin{afterInit(e){e.e.on("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}onAfterGenerateColorPicker(e,t,i,o){a.Dom.detach(t);let n=new r.ColorInput(this.j,{value:o||"#000",onChange:i});t.appendChild(n.container)}beforeDestruct(e){e.e.off("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!c.JoditPro.fatMode)}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([s.autobind],d.prototype,"onAfterGenerateColorPicker",null),c.JoditPro.plugins.add("color-picker",d)},45128:function(e,t,i){"use strict";i.d(t,{ColorInput:function(){return h}});var o=i(82749),n=i(31635),r=i(46146),s=i(82758),a=i(65478),l=i(21537),c=i(38837),d=i(67510),u=i(41409);class h extends d.UIInput{className(){return"ColorInput"}afterSetMode(e,t){"slim"===e&&t&&this.nativeInput.setAttribute("readonly","true")}onChangeSelfValue(){this.nativeInput.style.backgroundColor=this.value}onEscKeyDown(e){e.key===s.KEY_ESC&&this.popup?.close()}constructor(e,t){super(e,t),(0,o._)(this,"trigger",void 0),(0,o._)(this,"popup",void 0);let i=new d.Popup(e);this.popup=i,this.trigger=(0,d.Button)(this.j,"ok");let n=this.getElm("wrapper");(0,c.assert)(null!=n,"wrapper element does not exist"),n.appendChild(this.trigger.container),this.trigger.container.classList.add(this.getFullElName("trigger")),this.trigger.onAction(()=>{this.state.onChange?.(this.value),i.close()}),i.setMod("padding",!1).setMod("max-height",!1);let s=this.j.create.div(this.getFullElName("picker")),a=r.createPicker(s,{paletteEditable:!0,showAlpha:!0,palette:"PALETTE_MATERIAL_CHROME"}).on("change",(e,t)=>{this.isFocused||(this.value=r.parseColor(t||"","hex"))});this.j.e.on(this,"change",()=>{let e;e=this.value,r.parseColor(e,"hex")!==a.color&&(a.color=this.value)}),i.setContent(s),this.j.e.on(this.nativeInput,"click",()=>{i.parentElement=this,this.jodit instanceof u.Dialog&&i.setZIndex(this.jodit.getZIndex()+1),i.open(()=>(0,l.position)(this.container))}),this.onChangeValue(),this.onChangeSelfValue()}}(0,n.__decorate)([(0,a.watch)(":change")],h.prototype,"onChangeSelfValue",null),(0,n.__decorate)([(0,a.watch)("nativeInput:keydown")],h.prototype,"onEscKeyDown",null),h=(0,n.__decorate)([a.component],h)},3536:function(e,t,i){"use strict";var o=i(4941),n=i(41943),r=i(46995),s=i.n(r),a=i(6441);a.Config.prototype.emoji={data:()=>n,enableAutoComplete:!0,recentCountLimit:10},a.Config.prototype.controls.emoji={tooltip:"Insert Emoji",icon:s(),popup(e,t,i){e.s.save();let n=e.getInstance(o.Emoji);return e.e.off(n,"insert").on(n,"insert",t=>{e.s.restore(),e.s.insertNode(e.createInside.text(t),!0),i()}),e.e.one("beforePopupClose",()=>{e.s.restore()}),n.reset(),n.container}}},85174:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(3536);var r=i(4941),s=i(65478),a=i(49055),l=i(20356),c=i(2692);class d extends l.Plugin{async afterInit(e){let t=await e.o.emoji.data();!e.isInDestruct&&(this.data={...t,emoji:t.emoji.map(r.Emoji.normalizeEmoji)},e.o.emoji.enableAutoComplete&&e.e.fire("registerAutocompleteSource",this.onAutoComplete))}onAutoComplete(e){return e.length>2&&":"===e[0]&&(e=e.substr(1).toLowerCase(),(0,a.trim)(e).length)?this.data.emoji.filter(t=>t.description?.indexOf(e)===0).sort((t,i)=>t.description.indexOf(e)-i.description.indexOf(e)).map(e=>({title:`${e.emoji} ${e.description}`,value:e.emoji})):[]}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!c.JoditPro.fatMode),(0,o._)(this,"buttons",[{name:"emoji",group:"insert"}]),(0,o._)(this,"data",void 0)}}(0,o._)(d,"requires",["autocomplete","license"]),(0,n.__decorate)([s.autobind],d.prototype,"onAutoComplete",null),c.JoditPro.plugins.add("emoji",d)},4941:function(e,t,i){"use strict";i.d(t,{Emoji:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(2748),a=i(21537),l=i(67510);let c="Recently";class d extends l.UIElement{className(){return"Emoji"}get defaultList(){return this.recent.concat(this.data?this.data.emoji:[])}reset(){this.data&&(this.input.nativeInput.value="",this.setItems(this.defaultList),this.setActiveCategory(0))}setItems(e){this.items=e.map(d.normalizeEmoji),this.list.scrollTo(0,0),this.columns=0,this.renderWindow()}createContainer(e){let t=this.j.c.div("jodit-emoji");this.input=new l.UIInput(this.j,{name:"search",icon:"search",autocomplete:!1,clearButton:!0,placeholder:"Search emoji"}),this.input.container.classList.add(this.getFullElName("input")),this.categories=this.j.c.div(this.getFullElName("categories")),this.list=this.j.c.div(this.getFullElName("emojis"));let i=this.j.c.div(this.getFullElName("navigate"));return s.Dom.append(i,[this.categories,this.input.container]),s.Dom.append(t,[i,this.list]),t}setActiveCategory(e,t=!1){let i=this.getElms("category"),o=i[this.activeIndex];i[e]||(e=i.length-1);let n=i[e],r=this.getFullElName("category","active",!0);if(o&&o.classList.remove(r),n&&n.classList.add(r),t){let t=this.data?.categories[e],i=this.rows.find(e=>e.title===t);if(i){this.list.scrollTop=i.top+this.paddingTop,this.renderWindow();let e=this.cache[i.title??""];e&&e.parentNode===this.list&&(this.list.scrollTop=e.offsetTop-this.list.offsetTop)}}this.activeIndex=e}generateCategoriesList(e){return e.map((t,i)=>this.j.c.div(this.getFullElName("category"),{"data-index":i,title:this.j.i18n(t),style:{width:100/e.length+"%"}}))}measure(){let{list:e}=this,t=e.querySelector("."+this.getFullElName("emoji")),i=e.querySelector("."+this.getFullElName("category-title"));if(t?.offsetWidth){let e=parseFloat(this.j.ow.getComputedStyle(t).marginBottom);return{cellWidth:t.offsetWidth,rowHeight:t.offsetHeight+(e||0),titleHeight:i?.offsetHeight||t.offsetHeight}}if(this.cellWidth)return{cellWidth:this.cellWidth,rowHeight:this.rowHeight,titleHeight:this.titleHeight};let o=this.j.ow.getComputedStyle(e),n=parseFloat(o.getPropertyValue("--jd-jodit-emoji-item-size"))||parseFloat(o.getPropertyValue("--jodit-emoji-item-size"))||28;return{cellWidth:n,rowHeight:n+n/7,titleHeight:n}}buildRows(){let{list:e}=this,t=parseFloat(this.j.ow.getComputedStyle(e).paddingTop);isNaN(t)||(this.paddingTop=t);let{cellWidth:i,rowHeight:o,titleHeight:n}=this.measure(),r=Math.max(1,Math.floor((e.clientWidth||308)/i));if(r===this.columns&&i===this.cellWidth&&o===this.rowHeight&&n===this.titleHeight)return;this.columns=r,this.cellWidth=i,this.rowHeight=o,this.titleHeight=n,this.window=[-1,-1];let s=this.data?.categories??[],a=[],l="",d=0,u=e=>(e.top=d,d+=e.height,a.push(e),e);this.items.forEach(e=>{let t=-1===e.category?c:s[e.category]??"";t!==l&&u({title:l=t,items:[],top:0,height:n});let i=a[a.length-1];(void 0!==i.title||i.items.length>=r)&&u({items:[],top:0,height:o}),a[a.length-1].items.push(e)}),this.rows=a}renderWindow(){this.renderRows(!1)}renderRows(e){if(this.isDestructed)return;this.buildRows();let{rows:t,list:i}=this,o=0,n=t.length;if(this.virtual){let e=i.scrollTop-300,r=i.scrollTop+(i.clientHeight||300)+300;for(-1===(o=t.findIndex(t=>t.top+t.height>e))&&(o=t.length),n=o;n<t.length&&t[n].top<r;)n+=1}if(o===this.window[0]&&n===this.window[1])return;this.window=[o,n];let r=t.length?t[t.length-1].top+t[t.length-1].height:0,a=o<t.length?t[o].top:r,l=n>o?r-t[n-1].top-t[n-1].height:0,c=[];a>0&&c.push(this.spacer(this.spacerTop,a));for(let e=o;n>e;e+=1)c.push(...this.renderRow(t[e]));if(l>0&&c.push(this.spacer(this.spacerBottom,l)),s.Dom.detach(i),s.Dom.append(i,c),this.virtual&&i.clientWidth&&!(o>=n)){if(Math.max(1,Math.floor(i.clientWidth/this.cellWidth))!==this.columns&&!e){this.columns=0,this.renderRows(!0);return}this.verifyLayout(o,n)}}verifyLayout(e,t){let{rows:i,list:o}=this,n=e=>this.rowElement(e).offsetTop-o.offsetTop,r=e=>1>=Math.abs(n(e)-(this.paddingTop+e.top)),s=r(i[e]),a=i.findIndex((i,o)=>o>=e&&t>o&&void 0===i.title);if(s&&-1!==a){let e=i[a],o=this.rowElement(e),n=this.cache[this.cellKey(e.items[e.items.length-1])],l=i[a+1];s=r(e)&&n.offsetTop===o.offsetTop&&(!l||a+1>=t||r(l))}s||(this.virtual=!1,this.window=[-1,-1],this.renderRows(!0))}rowElement(e){return void 0!==e.title?this.cache[e.title]:this.cache[this.cellKey(e.items[0])]}cellKey(e){return e.emoji+e.category}spacer(e,t){return e.style.height=t+"px",e}renderRow(e){if(void 0!==e.title){let t=e.title;return this.cache[t]??=this.j.c.div(this.getFullElName("category-title"),{"data-index":t===c?-1:this.data?.categories.indexOf(t)??-1},t?this.j.i18n(t):""),[this.cache[t]]}return e.items.map(e=>{let t=this.cellKey(e);return this.cache[t]??=this.j.c.div(this.getFullElName("emoji"),{"data-value":e.emoji},e.emoji),this.cache[t]})}updateActiveCategory(){let e=this.list.scrollTop,t=this.data?.categories??[],i=0;this.rows.forEach(o=>{void 0!==o.title&&o.title!==c&&e>o.top+this.paddingTop-20&&(i=Math.max(0,t.indexOf(o.title)))}),this.setActiveCategory(i)}static isShortCat(e){return e&&(0,a.isString)(e.e)}static normalizeEmoji(e){return d.isShortCat(e)?{emoji:e.e,description:e.d,category:e.c,aliases:e.a,tags:e.t}:e}onInsertCode(e){this.jodit.e.fire(this,"insert",e);let t=this.map[e];if(t){let i=[...this.recent],o=i.findIndex(t=>t.emoji===e);-1!==o&&i.splice(o,1),i.unshift({...t,category:-1}),this.recent=i}}onScrollList(){this.j.async.requestAnimationFrame(()=>{this.renderWindow(),this.updateActiveCategory()})}onAfterOpenPopup(){this.renderWindow()}onClickCategory(e){this.clearFilter();let t=e.target;t.classList.contains(this.getFullElName("category"))&&this.setActiveCategory(parseInt((0,a.attr)(t,"-index")||"0",10)||0,!0)}onClickItem(e){let t=e.target;if(t.classList.contains(this.getFullElName("emoji"))){let e=(0,a.attr)(t,"-value")||"";e&&this.onInsertCode(e)}e.preventDefault(),e.stopPropagation()}onInputFilter(){let e=this.input.value.toLowerCase();if(!e.length)return this.setItems(this.defaultList);this.setItems(this.defaultList.filter(t=>{let i=d.normalizeEmoji(t);return i.description?.toLowerCase().includes(e)||i.tags?.join(" ").toLowerCase().includes(e)||i.aliases?.join(" ").toLowerCase().includes(e)}))}clearFilter(){this.input.nativeInput.value.length&&this.reset()}onReady(){this.j.e.on(this.input.nativeInput,"input",this.onInputFilter).on(this.categories,"click",this.onClickCategory).on(this.list,"scroll",this.onScrollList).on(this.list,"mousedown touchstart",this.onClickItem)}destruct(){return this.input.destruct(),super.destruct()}constructor(e){super(e),(0,o._)(this,"data",null),(0,o._)(this,"recent",[]),(0,o._)(this,"map",{}),(0,o._)(this,"activeIndex",0),(0,o._)(this,"cache",{}),(0,o._)(this,"items",[]),(0,o._)(this,"rows",[]),(0,o._)(this,"columns",0),(0,o._)(this,"cellWidth",0),(0,o._)(this,"rowHeight",0),(0,o._)(this,"titleHeight",0),(0,o._)(this,"paddingTop",0),(0,o._)(this,"window",[-1,-1]),(0,o._)(this,"virtual",!0),(0,o._)(this,"spacerTop",this.j.c.div(this.getFullElName("spacer"))),(0,o._)(this,"spacerBottom",this.j.c.div(this.getFullElName("spacer"))),this.setMod("loading",!0),(async()=>{this.data=await e.o.emoji.data(),this.isInDestruct||(this.setMod("loading",!1),this.data.emoji.forEach(e=>{let t=d.normalizeEmoji(e);this.map[t.emoji]=t}),this.setItems(this.defaultList),s.Dom.append(this.categories,this.generateCategoriesList(this.data.categories)),this.setActiveCategory(0))})()}}(0,n.__decorate)([r.persistent],d.prototype,"recent",void 0),(0,n.__decorate)([r.autobind],d.prototype,"renderWindow",null),(0,n.__decorate)([r.autobind],d.prototype,"onScrollList",null),(0,n.__decorate)([(0,r.watch)(":afterEmojiOpenPopup")],d.prototype,"onAfterOpenPopup",null),(0,n.__decorate)([r.autobind],d.prototype,"onClickCategory",null),(0,n.__decorate)([r.autobind],d.prototype,"onClickItem",null),(0,n.__decorate)([(0,r.debounce)()],d.prototype,"onInputFilter",null),(0,n.__decorate)([(0,r.hook)("ready")],d.prototype,"onReady",null),d=(0,n.__decorate)([r.component],d)},90832:function(e,t,i){"use strict";var o=i(53121),n=i.n(o),r=i(83556),s=i.n(r),a=i(4872),l=i.n(a),c=i(6441),d=i(2748);c.Config.prototype.exportDocs={css:"",pdf:{externalFonts:[],allow:!0,converter:null,options:{defaultFont:"courier",format:"A4",page_orientation:"portrait"}},docx:{allow:!0,filename:"document.docx",converter:null}},c.Config.prototype.controls.exportDocs={tooltip:"Export",isDisabled:e=>d.Dom.isEmptyContent(e.editor),icon:n(),list:{exportToPDF:"Export to PDF",exportToDOCX:"Export to DOCX"},childExec(e,t,{control:i}){let o=i.name??"exportToPDF";e.execCommand(o)}},c.Config.prototype.controls.exportToPDF={tooltip:"Export to PDF",isDisabled:e=>d.Dom.isEmptyContent(e.editor),icon:{name:l(),scale:1.3}},c.Config.prototype.controls.exportToDOCX={...c.Config.prototype.controls.exportToPDF,tooltip:"Export to DOCX",icon:{name:s(),scale:1.3}}},90882:function(e,t,i){"use strict";var o=i(82749);i(90832);var n=i(22732),r=i(68934),s=i(11628),a=i(50911),l=i(54079),c=i(14625),d=i(2692);class u extends a.Plugin{afterInit(e){e.registerCommand("exportToPDF",async()=>{let{converter:t}=(0,r.ConfigDeepFlatten)(e.o.exportDocs.pdf);t?await this.clientExport(e,t,"document.pdf"):await this.sendExportRequest(e,{action:"generatePdf",filename:"document.pdf",data:{options:(0,r.ConfigDeepFlatten)(e.o.exportDocs.pdf).options}})}),e.registerCommand("exportToDOCX",async()=>{let t=(0,r.ConfigDeepFlatten)(e.o.exportDocs.docx),i=t.filename||"document.docx";t.converter?await this.clientExport(e,t.converter,i):await this.sendExportRequest(e,{action:"generateDocx",filename:i})})}async clientExport(e,t,i){e.progressbar.show().progress(50),await this.downloadBlob(e,i,async()=>t(u.getValue(e)))}async sendExportRequest(e,t){let i=new l.Ajax({...e.o.exportDocs.ajax??e.o.filebrowser.ajax,method:"POST",responseType:"blob",onProgress(t){e.progressbar.show().progress(t)},data:{action:t.action,html:u.getValue(e),...t.data}});e.e.on("beforeDestruct",i.destruct),await this.downloadBlob(e,t.filename,async()=>(await i.send()).blob())}async downloadBlob(e,t,i){try{let e=await i(),o=this.j.create.a();o.href=URL.createObjectURL(e),o.download=t,o.click(),this.j.progressbar.showFileUploadAnimation(),n.Dom.safeRemove(o),URL.revokeObjectURL(o.href)}catch(t){t.message&&e.alert(t.message)}finally{e.progressbar.progress(100),await e.async.delay(200),e.progressbar.hide()}}static getValue(e){let[t]=(0,s.previewBox)(e),i=[];return e.o.exportDocs.pdf.externalFonts.forEach(e=>{/^</.test(e)?i.push(e):i.push(`<link rel="stylesheet" href="${e}">`)}),i.push(`<style>${(0,c.generateCriticalCSS)(e)}</style>`),i.push(`<style>${e.o.exportDocs.css}</style>`),i.push(t.innerHTML),i.join(`
428
440
  `)}beforeDestruct(){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"exportDocs",group:"media"},{name:"exportToPDF",group:"media"},{name:"exportToDOCX",group:"media"}])}}(0,o._)(u,"requires",["license"]),d.JoditPro.plugins.add("exportDocs",u)},5422:function(e,t,i){"use strict";i.d(t,{FileBrowserPro:function(){return E}});var o=i(82749),n=i(31635);i(34042);var r=i(8087),s=i(34698),a=i(77841),l=i(17578),c=i(97770),d=i(42663),u=i(55535),h=i(18250),p=i(69277),f=i(4278),m=i(95002),g=i(6441),b=i(82758),v=i(65478),y=i(21537),w=i(70231),_=i(41409),k=i(638),C=i(11787),S=i(50050),x=i(2692),I=i(21246);class E extends k.Dialog{className(){return"FileBrowserPro"}lock(e="any"){return this.container.classList.add("jodit_disabled"),super.lock(e)}unlock(){return this.container.classList.remove("jodit_disabled"),super.unlock()}status(e,t=!(e instanceof Error)){(0,y.isAbortError)(e)||(b.IS_PROD||(0,y.isString)(e),this.message.message((0,y.isString)(e)?e:e.message,t?"success":"error",this.options.howLongShowMsg))}errorHandler(e){(0,y.isAbortError)(e)||this.status(e instanceof Error?this.i18n(e.message):this.dataProvider.getMessage(e),!1)}get progressbar(){return new m.UIProgress(this,this.stateManager.state)}addDisclaimer(e){this.dialog.appendChild(e)}getMessageModule(){return super.getMessageModule(this.dialog)}async open(e=this.o.defaultCallback,t){return this.state.onlyImages=!!t,this.prepareOpening(e),super.open(this.panel.container),this.e.fire("update.filebrowser")}onResizeWindow(){(0,y.css)(this.dialog,{maxWidth:screen.width,minHeight:Math.min(this.options.height,screen.height),minWidth:Math.min(this.options.width,screen.width)})}onChangePath(){let{currentPath:e,currentSource:t}=this.state;this.state.activeElements=[],this.state.lastSelectedIndex=0,this.uploader.setPath(e),this.uploader.setSource(t)}onChangeTheme(){this.setMod("theme",this.state.theme),this.header.setMod("theme",this.state.theme),this.panel.setMod("theme",this.state.theme),this.options.theme=this.state.theme}onToggleSettings(){this.state.showSettings=!this.state.showSettings}prepareOpening(e){this.registerGlobalListeners(),e&&(this.state.onSelectCallBack=t=>{this.close(),e(t)}),this.persistent.syncWithState()}registerGlobalListeners(){this.e.on(this.ow,"keydown",this.onKeyPress)}onKeyPress(e){let{activeElement:t}=this.od;if(!this.state.activeElements.length||!t||!_.Dom.isOrContains(this.panel.items.container,t))return;let i=this.state.elements;switch(e.key){case b.KEY_ENTER:return this.onChooseItems();case b.KEY_DELETE:return this.onFileRemove();case b.KEY_RIGHT:case b.KEY_LEFT:case b.KEY_DOWN:case b.KEY_UP:{let t,o=e.key===b.KEY_RIGHT||e.key===b.KEY_DOWN,n=this.state.lastSelectedIndex;if([b.KEY_RIGHT,b.KEY_LEFT].includes(e.key))t=o?i[n+1]?n+1:0:i[n-1]?n-1:i.length-1;else{let{countInRow:e}=this.panel;t=Math.round(((n+1)/e+(o?1:-1))*e-1)}return i[t]&&this.stateManager.addActive(i[t],e.shiftKey),!1}}}removeGlobalListeners(){this.e.off(this.ow,"keydown",this.onKeyPress)}onCut(e){this.__fillClipboard("cut",e)}onCopy(e){this.__fillClipboard("copy",e)}__fillClipboard(e,t){this.state.clipboard=t?[{mode:e,type:"folder",from:(0,a.folderFullPath)(t),name:t.name,sourceName:t.sourceName}]:this.state.activeElements.filter(e=>e.file||e.name).map(t=>({mode:e,type:"folder"===t.type?"folder":"file",from:(0,a.normalizeItemPath)(t.path+(t.file||t.name||"")),name:t.file||t.name||"",sourceName:t.sourceName}))}getPasteTarget(){let{currentPath:e,currentSource:t,sources:i}=this.state;return{path:e||"/",sourceName:t||i[0]?.name||C.DEFAULT_SOURCE_NAME}}canPaste(e){let t=this.state.clipboard;if(!t.length||t.some(t=>t.sourceName!==e.sourceName))return!1;let i=this.dataProvider;if(!t.every(e=>"copy"===e.mode?i.canCopy("file"===e.type):i.canI("file"===e.type?"FileMove":"FolderMove")))return!1;let o=(0,a.normalizeItemPath)(e.path);return!t.some(e=>"folder"===e.type&&(o===e.from||o.startsWith(e.from+"/")))}onPaste(e){if(!this.canPaste(e))return;let t=this.state.clipboard;t.some(e=>"cut"===e.mode)&&(this.state.clipboard=[]);let i=(0,a.normalizeItemPath)(e.path),o=async()=>{let o=0;for(let n of t){let t="file"===n.type;if("cut"===n.mode){if((0,a.parentPath)(n.from)===i)continue;await this.dataProvider.move(n.from,i,e.sourceName,t)}else await this.dataProvider.copy(n.from,i,e.sourceName,t);o+=1}return o},n=t.every(e=>"copy"===e.mode);o().then(e=>{e>0&&this.status(this.i18n(n?"%s item(s) were copied":"%s item(s) were moved",e+""),!0)}).catch(this.status).finally(()=>(this.state.activeElements=[],Promise.allSettled([this.loadingManager.loadItems(),this.loadingManager.loadFolders()])))}onFileRemove(){this.state.activeElements.length&&this.confirm("Are you sure?","Delete",e=>{e&&this.__itemsRemove(this.state.activeElements)}).bindDestruct(this)}async __itemsRemove(e){if(e.length){for(let t of(this.state.activeElements.forEach(e=>{this.stateManager.isFavorite(e)&&this.stateManager.toggleFavorite(e)}),this.state.activeElements=[],e))await ("folder"===t.type?this.__folderRemove((0,a.parentPath)(t.path),t.name??"",t.sourceName):this.__removeFile(t.file||t.name||"",t.sourceName));return Promise.allSettled([this.loadingManager.loadItems(),this.loadingManager.loadFolders()])}}__removeFile(e,t){return this.dataProvider.fileRemove(this.state.currentPath,e,t).then(t=>{this.status(t||this.i18n('File "%s" was deleted',e),!0)}).catch(this.status)}__folderRemove(e,t,i){return this.dataProvider.folderRemove(e,t,i).then(o=>{this.status(o||this.i18n('Folder "%s" was deleted',t),!0),this.state.currentPath===e&&(this.state.currentPath=(0,a.parentPath)(e),this.state.currentSource=i)}).catch(this.status)}onFileEdit(){if(1===this.state.activeElements.length){let[e]=this.state.activeElements;S.openImageEditor.call(this,e.fileURL,e.file||"",e.path,e.sourceName,void 0,this.status)}}onFolderRename(e){this.prompt("Enter new name","Rename",t=>{if(!(0,y.isValidName)(t)||t===e.name)return this.status(this.i18n("Enter new name")),!1;this.dataProvider.folderRename((0,a.parentPath)(e.path),e.name,t,e.sourceName).then(i=>{this.state.activeElements=[],this.status(i,!0),this.state.currentPath=(0,a.parentPath)(e.path)+"/"+t,this.state.currentSource=e.sourceName,this.historyManager.updateCurrent(),this.loadingManager.loadFolders()}).catch(this.status)},this.i18n("type name"),e.name).bindDestruct(this)}onFolderRemove(e){this.confirm("Are you sure?","Delete",t=>{t&&this.__itemsRemove([{type:"folder",name:e.name,path:e.path,sourceName:e.sourceName}])}).bindDestruct(this)}onFolderCreate(e){this.prompt("Enter Directory name","Create directory",t=>{let i=e.path||"/";this.dataProvider.createFolder(t,e.path||"/",e.sourceName).then(()=>{this.state.currentSource===e.sourceName&&this.state.currentPath===i?this.e.fire("update.filebrowser"):(this.state.currentSource=e.sourceName,this.state.currentPath=i),this.historyManager.updateCurrent()},this.status)},this.i18n("type name")).bindDestruct(this)}onFileRename(e){let t=e.file||e.name||"";1===this.state.activeElements.length&&t&&this.prompt("Enter new name","Rename",e=>{if(!(0,y.isValidName)(e))return this.status(this.i18n("Enter new name")),!1;this.dataProvider.fileRename(this.state.currentPath,t,e,this.state.currentSource).then(e=>{this.state.activeElements=[],this.status(e,!0),this.loadingManager.loadItems()}).catch(this.status)},this.i18n("type name"),t).bindDestruct(this)}onChooseItems(){let e=this.stateManager.state.activeElements;if(e.length){if("folder"===e[0].type){this.state.currentPath=this.state.currentPath+"/"+e[0].name,this.state.currentSource=e[0].sourceName,this.e.fire("afterOpenFolder.filebrowser");return}this.state.onSelectCallBack?this.stateManager.callSelectHandler():this.onOpenLightBox(e[0])}}onOpenLightBox(e){p.UILightBox.open(this,e,this.state.elements)}initUploader(){let e=this,t=(0,y.ConfigProto)(e.o.uploader||{},g.Config.defaultOptions.uploader),i=()=>this.loadingManager.loadItems();e.uploader=e.getInstance("Uploader",t),e.uploader.bind(e.panel.container,i,e.errorHandler),e.e.on("bindUploader.filebrowser",t=>{e.uploader.bind(t,i,e.errorHandler)})}destruct(){this.removeGlobalListeners(),this.header.destruct(),this.panel.destruct(),super.destruct()}fullFillOptions(){["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileCopy","folderCopy","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach(e=>{null!=this.options[e]&&(this.options[e]=(0,y.ConfigProto)(this.options[e],this.o.ajax))})}constructor(e){super((0,y.ConfigProto)(Object.assign(e||{},{resizable:!0,draggable:!0,toolbarButtons:e?.toolbarButtons||g.Config.defaultOptions.filebrowser.buttons,buttons:x.JoditPro.atom(["filebrowser.settings","fullsize","dialog.close"])}),g.Config.defaultOptions.filebrowser)),(0,o._)(this,"dataProvider",new s.DataProviderPro(this,this.options)),(0,o._)(this,"state",(0,_.observable)({onSelectCallBack:null,theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,showPreview:!1,withFolders:!0,foldersPosition:"bottom",info:"",metaInfo:null,currentPath:"",currentSource:"",currentBaseUrl:"",tree:[],activeElements:[],favorites:[],clipboard:[],progress:0,lastSelectedIndex:0,elements:[],messages:[],sources:[],view:"tiles",tileSize:"default",sortBy:"name-asc",filterWord:"",onlyImages:!1})),(0,o._)(this,"persistent",new d.PersistentStore(this,this.state)),(0,o._)(this,"loadingManager",new c.LoadingManager(this,this.state)),(0,o._)(this,"stateManager",new u.StateManager(this.state)),(0,o._)(this,"historyManager",new l.HistoryManager(this,this.state)),(0,o._)(this,"contextMenuManager",new r.ContextMenuManager(this)),(0,o._)(this,"header",new h.UIBrowserHeader(this,this.options,this.stateManager)),(0,o._)(this,"panel",new f.UIBrowserPanel(this,this.stateManager)),(0,o._)(this,"files",this.panel),(0,o._)(this,"tree",this.panel),(0,o._)(this,"uploader",void 0),I.license.make(this),!this.persistent.theme&&this.options.theme&&(this.persistent.theme=this.options.theme),this.panel.append(this.progressbar),this.toolbar.setMod("mode","header"),this.setSize(Math.min(this.options.width,screen.width),Math.min(this.options.height,screen.height)).setHeader(this.header),(0,y.attr)(this.container,"aria-label",this.i18n("File Browser")),this.onResizeWindow(),this.initUploader(),this.onChangeTheme(),this.fullFillOptions(),this.dataProvider.onProgress(e=>{0===e&&(e=30),this.state.progress=e}),this.e.on("beforeClose",this.removeGlobalListeners),this.e.fire("afterInit"),x.JoditPro.prototype.afterInitHook.call(this)}}(0,n.__decorate)([v.autobind],E.prototype,"status",null),(0,n.__decorate)([v.autobind],E.prototype,"errorHandler",null),(0,n.__decorate)([v.cache],E.prototype,"progressbar",null),(0,n.__decorate)([(0,v.watch)(":resize",{context:window})],E.prototype,"onResizeWindow",null),(0,n.__decorate)([(0,v.watch)(["state.currentPath","state.currentSource"])],E.prototype,"onChangePath",null),(0,n.__decorate)([(0,v.watch)("state.theme")],E.prototype,"onChangeTheme",null),(0,n.__decorate)([(0,v.watch)(":toggleSettings.filebrowser")],E.prototype,"onToggleSettings",null),(0,n.__decorate)([v.autobind],E.prototype,"onKeyPress",null),(0,n.__decorate)([v.autobind],E.prototype,"removeGlobalListeners",null),(0,n.__decorate)([(0,v.watch)(":cut.filebrowser")],E.prototype,"onCut",null),(0,n.__decorate)([(0,v.watch)(":copy.filebrowser")],E.prototype,"onCopy",null),(0,n.__decorate)([(0,v.watch)(":paste.filebrowser")],E.prototype,"onPaste",null),(0,n.__decorate)([(0,v.watch)(":fileRemove.filebrowser")],E.prototype,"onFileRemove",null),(0,n.__decorate)([(0,v.watch)(":edit.filebrowser")],E.prototype,"onFileEdit",null),(0,n.__decorate)([(0,v.watch)(":folderRename.filebrowser")],E.prototype,"onFolderRename",null),(0,n.__decorate)([(0,v.watch)(":folderRemove.filebrowser")],E.prototype,"onFolderRemove",null),(0,n.__decorate)([(0,v.watch)(":folderCreate.filebrowser")],E.prototype,"onFolderCreate",null),(0,n.__decorate)([(0,v.watch)(":fileRename.filebrowser")],E.prototype,"onFileRename",null),(0,n.__decorate)([(0,v.watch)(":select.filebrowser")],E.prototype,"onChooseItems",null),(0,n.__decorate)([(0,v.watch)(":openLightBox.filebrowser")],E.prototype,"onOpenLightBox",null),E=(0,n.__decorate)([v.component,(0,v.derive)(w.Dlgs)],E),Object.defineProperty(x.JoditPro.modules,"FileBrowserPro",{value:E,writable:!1,enumerable:!0,configurable:!0})},77894:function(e,t,i){"use strict";var o=i(76636),n=i(6441),r=i(580);let s=n.Config.prototype.controls.filebrowser;s.settings={icon:"settings",tooltip:"Settings",exec(e){(e.parent??e).e.fire("toggleSettings.filebrowser")}},s.home={icon:"home",tooltip:"Home",exec(e){e.e.fire("goHome.filebrowser")}},s.preview={icon:"eye",tooltip:"Preview",isDisabled:e=>0===e.state.activeElements.length,exec(e){e.e.fire("togglePreview.filebrowser")}},s.next={icon:"angle-right",tooltip:"History next",isDisabled:e=>!e.historyManager.canNext(),exec(e){e.historyManager.next()}},s.previous={icon:"angle-left",tooltip:"History previous",isDisabled:e=>!e.historyManager.canPrevious(),exec(e){e.historyManager.previous()}},s["new-folder"]={icon:"new-folder",exec(e){e.e.fire("folderCreate.filebrowser",{path:e.state.currentPath,sourceName:e.state.currentSource})},tooltip:"New folder"},s.paste={icon:"paste",tooltip:"Paste",isDisabled:e=>!e.canPaste(e.getPasteTarget()),exec(e){e.e.fire("paste.filebrowser",e.getPasteTarget())}},Object.assign(n.Config.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.new-folder","filebrowser.paste","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.preview","about"],sort:!1,pixelOffsetLoadNewChunk:300,width:900,height:400,previewOfficeURL:"https://view.officeapps.live.com/op/view.aspx?src=",fileCopy:{data:{action:"fileCopy"}},folderCopy:{data:{action:"folderCopy"}}}),(0,r.extendLang)(o)},97068:function(e,t,i){"use strict";var o=i(82749);i(77894);var n=i(5422),r=i(50911),s=i(2692);class a extends r.Plugin{afterInit(e){e.e.on("getInstanceFileBrowser",e=>(this.__instance||(this.__instance=new n.FileBrowserPro(e)),this.__instance))}beforeDestruct(e){e.e.off("getInstanceFileBrowser"),this.__instance?.destruct()}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!s.JoditPro.fatMode),(0,o._)(this,"__instance",void 0)}}(0,o._)(a,"requires",["license"]),s.JoditPro.plugins.add("finder",a)},8087:function(e,t,i){"use strict";i.d(t,{ContextMenuManager:function(){return l}});var o=i(31635),n=i(77841),r=i(80480),s=i(65478),a=i(63399);class l extends r.ViewComponent{className(){return"ContextMenuManager"}onFolderContext(e,t){return this.buildContextItemMenu(this.getFolderContextActions(e),t),!1}onItemContext(e,t,i){return this.buildContextItemMenu(this.getItemContextActions(e),i),!1}onSourceContext(e,t){return this.buildContextItemMenu(this.getSourceContextActions(e),t),!1}onAreaContext(e){return this.buildContextItemMenu(this.getAreaContextActions(),e),!1}buildContextItemMenu(e,t){if(!this.j.o.contextMenu)return;let i=(0,a.makeContextMenu)(this.j).setMod("theme",this.j.state.theme);i.show(t.clientX,t.clientY,e.filter(e=>e&&!1!==e.enabled)),this.j.e.on(this.j,"afterClose",()=>{i.isOpened&&i.close()})}getItemContextActions(e){if(this.j.stateManager.isActive(e)||this.j.stateManager.addActive(e,this.j.state.activeElements.length>1),"folder"===e.type)return this.getFolderContextActions({type:"directory",children:[],name:e.name||"",path:e.path,sourceName:e.sourceName});let t=this.j.options,i=this.j.dataProvider,o=1===this.j.state.activeElements.length;return[{icon:"pencil",title:"Edit",enabled:!!e.isImage&&t.editImage&&o&&(i.canI("ImageResize")||i.canI("ImageCrop")),exec:()=>{this.j.e.fire("edit.filebrowser")}},{icon:"italic",title:"Rename",enabled:i.canI("FileRename")&&o,exec:()=>this.j.e.fire("fileRename.filebrowser",e)},{icon:"cut",title:"Cut",enabled:i.canI("FileMove"),exec:()=>this.j.e.fire("cut.filebrowser")},{icon:"copy",title:"Copy",enabled:i.canCopy(!0),exec:()=>this.j.e.fire("copy.filebrowser")},{icon:"bin",title:"Delete",enabled:i.canI("FileRemove"),exec:()=>this.j.e.fire("fileRemove.filebrowser",e)},{icon:"eye",title:"Preview",enabled:!!(e.isImage||"file"===e.type)&&t.preview&&o,exec:()=>this.j.e.fire("openLightBox.filebrowser",e)},{icon:"download",title:"Download",exec:()=>{e.fileURL&&this.j.ow.open(e.fileURL)}}]}getFolderContextActions(e){let t=this.j.dataProvider,i={path:(0,n.folderFullPath)(e),sourceName:e.sourceName};return[{icon:"pencil",title:"Rename",exec:()=>{this.j.e.fire("folderRename.filebrowser",e)},enabled:t.canI("FolderRename")},{icon:"cut",title:"Cut",enabled:t.canI("FolderMove"),exec:()=>{this.j.e.fire("cut.filebrowser",e)}},{icon:"copy",title:"Copy",enabled:t.canCopy(!1),exec:()=>{this.j.e.fire("copy.filebrowser",e)}},{icon:"paste",title:"Paste",enabled:this.j.canPaste(i),exec:()=>{this.j.e.fire("paste.filebrowser",i)}},{icon:"bin",title:"Delete",exec:()=>{this.j.e.fire("folderRemove.filebrowser",e)},enabled:t.canI("FolderRemove")},{icon:"plus",title:"Add folder",exec:()=>{this.j.e.fire("folderCreate.filebrowser",e)},enabled:t.canI("FolderCreate")}]}getSourceContextActions(e){let t={path:"/",sourceName:e.sourceName};return[{icon:"plus",title:"Create folder",exec:()=>{this.j.e.fire("folderCreate.filebrowser",e)}},{icon:"paste",title:"Paste",enabled:this.j.canPaste(t),exec:()=>{this.j.e.fire("paste.filebrowser",t)}}]}getAreaContextActions(){let e=this.j.getPasteTarget();return[{icon:"paste",title:"Paste",enabled:this.j.canPaste(e),exec:()=>{this.j.e.fire("paste.filebrowser",e)}},{icon:"plus",title:"Add folder",enabled:this.j.dataProvider.canI("FolderCreate"),exec:()=>{this.j.e.fire("folderCreate.filebrowser",{path:e.path,sourceName:e.sourceName})}}]}}(0,o.__decorate)([(0,s.watch)(":contextmenuFolder.filebrowser")],l.prototype,"onFolderContext",null),(0,o.__decorate)([(0,s.watch)(":contextmenuItem.filebrowser")],l.prototype,"onItemContext",null),(0,o.__decorate)([(0,s.watch)(":contextmenuSource.filebrowser")],l.prototype,"onSourceContext",null),(0,o.__decorate)([(0,s.watch)(":contextmenuArea.filebrowser")],l.prototype,"onAreaContext",null),l=(0,o.__decorate)([s.component],l)},34698:function(e,t,i){"use strict";i.d(t,{DataProviderPro:function(){return r}});var o=i(21537),n=i(11787);class r extends n.default{copy(e,t,i,n){let r=n?"fileCopy":"folderCopy",s=this.o[r];if(!s)throw(0,o.error)("Set Copy api options");return s.data.from=e,s.data.path=t,s.data.source=i,this.get(r).then(e=>{if(this.isSuccess(e))return!0;throw(0,o.error)(this.getMessage(e))})}canCopy(e){let t=e?"allowFileCopy":"allowFolderCopy",i=this.o.permissionsPresets[t];if(void 0!==i)return i;let{__currentPermissions:o}=this;return null==o||void 0===o[t]||!!o[t]}}},77841:function(e,t,i){"use strict";let o=e=>e.split("/").filter(e=>e.length).join("/")||"/";i.d(t,["folderFullPath",0,e=>e.path.endsWith("/")?o(e.path+e.name):e.path,"isCutItem",0,(e,t)=>{if(!e.length)return!1;let i=o(t.path+(t.file||t.name||""));return e.some(e=>"cut"===e.mode&&e.from===i&&e.sourceName===t.sourceName)},"normalizeItemPath",0,o,"parentPath",0,e=>{let t=e.split("/").filter(e=>e.length);return t.pop(),t.join("/")||"/"}])},17578:function(e,t,i){"use strict";i.d(t,{HistoryManager:function(){return l}});var o=i(82749),n=i(31635),r=i(80480),s=i(65478),a=i(97735);class l extends r.ViewComponent{className(){return"HistoryManager"}canNext(){return this.historyIndex<this.history.length-1}canPrevious(){return this.historyIndex>0}push(e){let{historyIndex:t}=this,i=this.history[t];if(i&&i.currentSource===e.currentSource&&i.currentPath===e.currentPath)return;let o=[...this.history];o.length-1!==t&&(o=o.slice(0,t+1)),o.push(e),i&&(t+=1),this.history=o,this.historyIndex=t}next(){this.canNext()&&(this.historyIndex+=1,this.updateState())}previous(){this.canPrevious()&&(this.historyIndex-=1,this.updateState())}updateCurrent(){this.history[this.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:(0,a.fastClone)(this.state.tree),elements:[...this.state.elements]}}onHome(){this.state.currentPath="",this.state.currentSource="",this.j.e.fire("afterOpenFolder.filebrowser update.filebrowser")}onOpenFolder(){this.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),this.j.e.fire("changeSelection")}updateState(){let{tree:e,elements:t,currentSource:i,currentPath:o}=this.history[this.historyIndex];this.state.activeElements=[],this.state.elements=[...t],this.state.tree=[...e],this.state.currentSource=i,this.state.currentPath=o,this.j.e.fire("changeSelection")}constructor(e,t){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"history",void 0),(0,o._)(this,"historyIndex",void 0),this.state=t,this.history=[],this.historyIndex=0}}(0,n.__decorate)([(0,s.watch)(["state.elements","state.tree"])],l.prototype,"updateCurrent",null),(0,n.__decorate)([(0,s.watch)(":goHome.filebrowser")],l.prototype,"onHome",null),(0,n.__decorate)([(0,s.watch)(":afterOpenFolder.filebrowser")],l.prototype,"onOpenFolder",null),l=(0,n.__decorate)([s.component],l)},97770:function(e,t,i){"use strict";i.d(t,{LoadingManager:function(){return a}});var o=i(82749),n=i(31635),r=i(91907),s=i(65478);class a extends r.ViewComponent{className(){return"LoadingManager"}async onUpdateFileBrowser(){this.state.activeElements=[],this.j.panel.setMod("loading",!0),await Promise.all([this.loadFolders(),this.loadItems()]),this.j.panel.setMod("loading",!1)}async loadFolders(){if(!this.j.isOpened)return;let{currentPath:e,currentSource:t,onlyImages:i}=this.state;try{let o=this.j.dataProvider;o.o?.folder&&(o.o.folder.data.onlyImages=i);let n=await o.tree(e,t);this.j.stateManager.fillTreeForPath(n,e),this.state.sources=n}catch(e){this.j.status(e)}}async loadItems(){if(this.j.isOpened)try{this.__tick+=1;let{__tick:e}=this;this.offset=0,this.stopLoadingParts=!1,this.__callQueueCount=0;let{items:t,loadedTotal:i}=await l(this.state,this.j.dataProvider,this.offset,this.countInOneChunk);if(this.state.elements=t,this.stopLoadingParts=i<this.countInOneChunk,await this.loadItemsChunk(e),await this.async.requestIdlePromise(),this.__tick!==e)return;for(;!this.stopLoadingParts&&this.j.panel.countInColumn*this.j.panel.countInRow>=this.state.elements.length;)if(await this.loadItemsChunk(e),this.__tick!==e)return}catch(e){this.j.status(e)}}async __loadItemsChunk(e){if(this.__isLoadingPart){this.__callQueueCount+=1;return}if(this.stopLoadingParts){this.__callQueueCount=0;return}this.__isLoadingPart=!0,this.j.panel.items.setMod("chunk-loading",!0);try{this.offset+=this.countInOneChunk;let{items:t,loadedTotal:i}=await l(this.state,this.j.dataProvider,this.offset,this.countInOneChunk);if(this.__tick!==e)return;this.stopLoadingParts=i<this.countInOneChunk,t.length&&(this.state.elements=this.state.elements.concat(t))}catch(e){this.j.status(e)}if(this.j.panel.items.setMod("chunk-loading",!1),this.__isLoadingPart=!1,this.__callQueueCount>0)return this.__callQueueCount-=1,this.__loadItemsChunk(e)}loadItemsChunk(e=this.__tick){return e!==this.__tick?Promise.resolve():this.__loadItemsChunk(e)}constructor(e,t){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"__tick",void 0),(0,o._)(this,"offset",void 0),(0,o._)(this,"countInOneChunk",void 0),(0,o._)(this,"stopLoadingParts",void 0),(0,o._)(this,"__isLoadingPart",void 0),(0,o._)(this,"__callQueueCount",void 0),this.state=t,this.__tick=0,this.offset=0,this.countInOneChunk=20,this.stopLoadingParts=!1,this.__isLoadingPart=!1,this.__callQueueCount=0}}function l(e,t,i,o){let{currentPath:n,currentSource:r,sortBy:s,withFolders:a,foldersPosition:l,onlyImages:c,filterWord:d}=e;return t.itemsEx(n,r,{offset:i,limit:o,sortBy:s,withFolders:a,foldersPosition:l,onlyImages:c,filterWord:d})}(0,n.__decorate)([(0,s.watch)(":update.filebrowser")],a.prototype,"onUpdateFileBrowser",null),(0,n.__decorate)([(0,s.watch)(["state.currentPath","state.currentSource","state.onlyImages"]),(0,s.debounce)(e=>({timeout:e.defaultTimeout,promisify:!0}))],a.prototype,"loadFolders",null),(0,n.__decorate)([(0,s.watch)(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),(0,s.debounce)(e=>({timeout:e.defaultTimeout,promisify:!0}))],a.prototype,"loadItems",null),(0,n.__decorate)([(0,s.debounce)(e=>({timeout:e.defaultTimeout,promisify:!0}))],a.prototype,"loadItemsChunk",null),a=(0,n.__decorate)([s.component],a)},42663:function(e,t,i){"use strict";i.d(t,{PersistentStore:function(){return l}});var o=i(82749),n=i(31635),r=i(91907),s=i(65478),a=i(159);class l extends r.ViewComponent{className(){return"PersistentStore"}onChangeThemeSetField(){this.theme=this.state.theme}onChangeView(){this.__viewPersistenceEnabled()&&(this.view=this.state.view)}onChangeSortBy(){this.sortBy=this.state.sortBy}onChangeTileSize(){this.tileSize=this.state.tileSize}onChangeFavorites(){this.favorites=this.state.favorites}onChangeShowSideBar(){this.showSideBar=this.state.showSideBar}onChangeShowPreview(){this.showPreview=this.state.showPreview}onChangeShowFavorites(){this.showFavorites=this.state.showFavorites}onChangeFoldersPosition(){this.foldersPosition=this.state.foldersPosition}syncWithState(){this.state.tileSize=this.tileSize,this.state.favorites=this.favorites.map(e=>e instanceof a.FileBrowserItem?e:a.FileBrowserItem.create(e)),this.state.view=this.__resolveView(),this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showPreview=this.showPreview,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition}__resolveView(){return this.__viewPersistenceEnabled()&&this.__hasStoredView()?this.view:this.__configView()??"tiles"}__configView(){let{view:e}=this.j.o;return"tiles"===e||"list"===e||"compact"===e?e:null}__viewPersistenceEnabled(){let{saveStateInStorage:e}=this.j.o;return!1!==e&&(!e||!1!==e.storeView)}__hasStoredView(){return null!=this.j.storage.get(`${this.j.o.namespace}${this.componentName}_prop_view`)}constructor(e,t){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"theme",void 0),(0,o._)(this,"sortBy",void 0),(0,o._)(this,"view",void 0),(0,o._)(this,"foldersPosition",void 0),(0,o._)(this,"tileSize",void 0),(0,o._)(this,"favorites",void 0),(0,o._)(this,"showSideBar",void 0),(0,o._)(this,"showPreview",void 0),(0,o._)(this,"showFavorites",void 0),this.state=t,this.sortBy="changed-desc",this.view="tiles",this.foldersPosition="top",this.tileSize="default",this.favorites=[],this.showSideBar=!0,this.showPreview=!1,this.showFavorites=!0}}(0,n.__decorate)([s.persistent],l.prototype,"theme",void 0),(0,n.__decorate)([s.persistent],l.prototype,"sortBy",void 0),(0,n.__decorate)([s.persistent],l.prototype,"view",void 0),(0,n.__decorate)([s.persistent],l.prototype,"foldersPosition",void 0),(0,n.__decorate)([s.persistent],l.prototype,"tileSize",void 0),(0,n.__decorate)([s.persistent],l.prototype,"favorites",void 0),(0,n.__decorate)([s.persistent],l.prototype,"showSideBar",void 0),(0,n.__decorate)([s.persistent],l.prototype,"showPreview",void 0),(0,n.__decorate)([s.persistent],l.prototype,"showFavorites",void 0),(0,n.__decorate)([(0,s.watch)("state.theme")],l.prototype,"onChangeThemeSetField",null),(0,n.__decorate)([(0,s.watch)("state.view")],l.prototype,"onChangeView",null),(0,n.__decorate)([(0,s.watch)("state.sortBy")],l.prototype,"onChangeSortBy",null),(0,n.__decorate)([(0,s.watch)("state.tileSize")],l.prototype,"onChangeTileSize",null),(0,n.__decorate)([(0,s.watch)("state.favorites")],l.prototype,"onChangeFavorites",null),(0,n.__decorate)([(0,s.watch)("state.showSideBar")],l.prototype,"onChangeShowSideBar",null),(0,n.__decorate)([(0,s.watch)("state.showPreview")],l.prototype,"onChangeShowPreview",null),(0,n.__decorate)([(0,s.watch)("state.showFavorites")],l.prototype,"onChangeShowFavorites",null),(0,n.__decorate)([(0,s.watch)("state.foldersPosition")],l.prototype,"onChangeFoldersPosition",null),l=(0,n.__decorate)([s.component],l)},55535:function(e,t,i){"use strict";i.d(t,{StateManager:function(){return s}});var o=i(82749),n=i(31635),r=i(65478);class s{getIndex(e,t=this.state.elements){return t.findIndex(t=>t.uniqueHashKey===e.uniqueHashKey)}isActive(e){return!!this.state.activeElements.find(t=>t.uniqueHashKey===e.uniqueHashKey)}isFavorite(e){return!!this.state.favorites.find(t=>t.uniqueHashKey===e.uniqueHashKey)}addActive(e,t){this.state.metaInfo=e,this.state.info=e.file??"",this.state.lastSelectedIndex=this.getIndex(e),this.state.activeElements=t?[...this.state.activeElements,e]:[e]}callSelectHandler(){let e=this.state.activeElements;this.state.onSelectCallBack?.call(this,{baseurl:"",files:e.map(e=>e.fileURL),isImages:e.map(e=>!!e.isImage)})}setFilter(e){this.state.filterWord=e}toggleFavorite(e){let t=this.getIndex(e,this.state.favorites),i=[...this.state.favorites];-1===t?i.push(e):i.splice(t,1),this.state.favorites=i}fillTreeForPath(e,t){if(!this.state.tree.length||!t||"/"===t){this.state.tree=e.map(c);return}this.removeActive(this.state.tree),e.forEach(e=>{var i;let o=a(this.state.tree,e.name);o||(o=c(e),this.state.tree.push(o)),o.isActive=!0;let n=(i=o,t.split("/").reduce((e,t)=>e&&a(e.children,t),i));n&&(n.isActive=!0,n.children=l(e.folders).map(i=>d(i,t+"/"+i,e.name)))}),this.state.tree=[...this.state.tree]}removeActive(e){e.forEach(e=>{e.isActive=!1,this.removeActive(e.children)})}get isFavoriteItems(){return this.state.favorites===this.state.elements}constructor(e){(0,o._)(this,"state",void 0),this.state=e}}function a(e,t){return e.find(e=>e.name===t)??null}function l(e){return e.filter(e=>"."!==e&&".."!==e)}function c(e){return{type:"source",name:e.name,title:e.title,sourceName:e.name,path:"/",children:l(e.folders).map(t=>d(t,t,e.name))}}function d(e,t,i){return{type:"directory",name:e,path:t,sourceName:i,children:[]}}(0,n.__decorate)([r.autobind],s.prototype,"getIndex",null),(0,n.__decorate)([r.autobind],s.prototype,"isActive",null),(0,n.__decorate)([r.autobind],s.prototype,"isFavorite",null)},76636:function(e,t,i){"use strict";i.r(t),i.d(t,{de:function(){return n.a},ru:function(){return n.a}});var o=i(41324),n=i.n(o)},34042:function(e,t,i){"use strict";var o=i(7307),n=i(24928),r=i(96910),s=i(67510);s.Icon.set("heart",o+""),s.Icon.set("home",n+""),s.Icon.set("new-folder",r+"")},43692:function(e,t,i){"use strict";i.d(t,{UIBrowserFolder:function(){return l}});var o=i(82749),n=i(31635),r=i(87325),s=i(38837),a=i(67510);class l extends a.UIElement{className(){return"UIBrowserFolder"}render(){return`<div>
429
441
  <div class="&__icon">
430
442
  <div class='&__loader'></div>
@@ -602,7 +614,7 @@ ${r}`.trim();i?await this.__executeQuickCommandSilent(l,r):await this.__executeQ
602
614
  </div>`}appendChildToContainer(){}constructor(e,t,i){super(e),(0,o._)(this,"options",void 0),(0,o._)(this,"drawing",void 0),(0,o._)(this,"toolbar",void 0),(0,o._)(this,"state",void 0),(0,o._)(this,"mapElements",void 0),(0,o._)(this,"apiLoaded",void 0),(0,o._)(this,"mapInitialized",void 0),(0,o._)(this,"failed",void 0),(0,o._)(this,"map",void 0),(0,o._)(this,"layers",void 0),this.options=i,this.toolbar=new g.ToolbarCollection(this.jodit),this.state={uid:"jd"+(0,h.uniqueUid)()+new Date().toString().replace(/[^0-9]/g,""),layer:this.options.googleMaps.map.layer,center:this.options.googleMaps.map.defaultCenter,zoom:this.options.googleMaps.map.defaultZoom,size:this.options.googleMaps.map.size,type:this.options.googleMaps.map.type,controls:{zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,rotateControl:!0,fullscreenControl:!0},mode:"hand",elements:[]},this.mapElements=[],this.apiLoaded=null,this.mapInitialized=!1,this.failed=!1,this.layers=[],Object.assign(this.state,t),this.toolbar.build(["gm.hand","gm.marker","gm.polyline","gm.polygon","gm.circle"]);let n=this.getElm("map-palette");(0,p.assert)(null!=n,"palette element does not exists"),n.appendChild(this.toolbar.container)}}(0,n.__decorate)([(0,c.hook)("ready")],y.prototype,"onReady",null),(0,n.__decorate)([(0,u.watch)("?:changeCreateMode.gm")],y.prototype,"changeCreateMode",null),(0,n.__decorate)([(0,u.watch)("state.mode")],y.prototype,"onChangeMode",null),(0,n.__decorate)([(0,u.watch)("state.elements")],y.prototype,"onChangeElementsList",null),(0,n.__decorate)([(0,u.watch)("state.center"),(0,d.wait)(e=>e.mapInitialized),(0,l.debounce)()],y.prototype,"onChangeCenter",null),(0,n.__decorate)([(0,u.watch)("state.zoom"),(0,l.debounce)()],y.prototype,"onChangeZoom",null),(0,n.__decorate)([(0,u.watch)("state.controls")],y.prototype,"onChangeControls",null),(0,n.__decorate)([(0,u.watch)(["state.center","state.zoom","state.controls","state.size","state.type","state.layer"]),(0,d.wait)(e=>e.mapInitialized),(0,l.debounce)()],y.prototype,"onChangeBound",null),(0,n.__decorate)([(0,u.watch)("state.size"),(0,l.debounce)()],y.prototype,"onChangeSize",null),(0,n.__decorate)([(0,u.watch)("state.type")],y.prototype,"onChangeMapType",null),(0,n.__decorate)([(0,u.watch)("state.layer")],y.prototype,"onChangeLayer",null)},22125:function(e,t,i){"use strict";i.d(t,{addNewInState:function(){return n}});var o=i(67912);function n(e){switch(this.state.mode){case"polyline":case"polygon":{let{mode:t}=this.state;this.state.elements=[...this.state.elements,{type:t,coordinates:(0,o.pathToArray)(e.getPath()),...this.options.googleMaps.map.defaultStates[t]}];break}case"circle":this.state.elements=[...this.state.elements,{type:this.state.mode,coordinates:[e.getCenter()?.lat()??0,e.getCenter()?.lng()??0],radius:e.getRadius(),...this.options.googleMaps.map.defaultStates.circle}];break;case"marker":this.state.elements=[...this.state.elements,{type:this.state.mode,coordinates:[e.getPosition()?.lat()??0,e.getPosition()?.lng()??0],...this.options.googleMaps.map.defaultStates.marker}]}}},76864:function(e,t,i){"use strict";i.d(t,{DrawingController:function(){return r}});var o=i(82749);let n=["marker","polyline","polygon","circle"];class r{setMode(e){let t=n.includes(e)?e:null;t!==this.mode&&(this.cancel(),this.unbind(),this.mode=t,t?(this.bind(),this.map.setOptions({draggableCursor:"crosshair",disableDoubleClickZoom:!0})):this.map.setOptions({draggableCursor:null,disableDoubleClickZoom:!1}))}destruct(){this.cancel(),this.unbind(),this.mode=null}bind(){this.listeners=[this.map.addListener("click",e=>this.onClick(e)),this.map.addListener("mousemove",e=>this.onMove(e)),this.map.addListener("dblclick",()=>this.onDblClick())].filter(Boolean)}unbind(){this.listeners.forEach(e=>e?.remove()),this.listeners=[]}onClick(e){let t=e.latLng;if(t)switch(this.mode){case"marker":this.onComplete(new google.maps.Marker({position:t}));break;case"circle":this.previewCircle?this.finishCircle():this.previewCircle=new google.maps.Circle({...this.defaultStates.circle,center:t,radius:0,clickable:!1,map:this.map});break;case"polyline":case"polygon":this.vertices.push(t),this.updatePolyPreview(t)}}onMove(e){let t=e.latLng;if(t){if(this.previewCircle){let e=this.previewCircle.getCenter();e&&this.previewCircle.setRadius(google.maps.geometry.spherical.computeDistanceBetween(e,t));return}this.vertices.length&&this.updatePolyPreview(t)}}onDblClick(){if("polyline"!==this.mode&&"polygon"!==this.mode)return;let e=this.vertices.filter((e,t,i)=>0===t||!e.equals(i[t-1])),t="polygon"===this.mode?3:2;if(e.length>=t&&this.preview){let t=this.preview;t.setPath(e),this.onComplete(t)}this.cancel()}finishCircle(){let e=this.previewCircle;e&&(this.previewCircle=null,this.onComplete(e),e.setMap(null))}updatePolyPreview(e){let t=[...this.vertices,e];if(!this.preview){let e={...this.defaultStates["polygon"===this.mode?"polygon":"polyline"],clickable:!1,map:this.map};this.preview="polygon"===this.mode?new google.maps.Polygon(e):new google.maps.Polyline(e)}this.preview.setPath(t)}cancel(){this.preview?.setMap(null),this.preview=null,this.previewCircle?.setMap(null),this.previewCircle=null,this.vertices=[]}constructor(e,t,i){(0,o._)(this,"map",void 0),(0,o._)(this,"defaultStates",void 0),(0,o._)(this,"onComplete",void 0),(0,o._)(this,"mode",void 0),(0,o._)(this,"listeners",void 0),(0,o._)(this,"preview",void 0),(0,o._)(this,"previewCircle",void 0),(0,o._)(this,"vertices",void 0),this.map=e,this.defaultStates=t,this.onComplete=i,this.mode=null,this.listeners=[],this.preview=null,this.previewCircle=null,this.vertices=[]}}},1475:function(e,t,i){"use strict";i.d(t,{initOrUpdateElementFromState:function(){return c}});var o=i(53454),n=i(11079),r=i(72690),s=i(580),a=i(12153),l=i(67912);function c(e,t){let i,c=this.mapElements[t];if(c){if(c.state.type===e.type)return r.updateStateAndGme.call(this,e,t);c.gme.setMap(null)}switch(e.type){case"text":i=new google.maps.Marker({position:new google.maps.LatLng(e.coordinates[0],e.coordinates[1]),draggable:!0,title:e.text,map:this.map});break;case"marker":i=new google.maps.Marker({position:new google.maps.LatLng(e.coordinates[0],e.coordinates[1]),draggable:!0,label:e.showCaption?e.title:"",title:e.title,icon:e.icon?a.Icon.get(e.icon):void 0,map:this.map});break;case"polyline":case"polygon":{let t=(0,l.arrayToPath)(e.coordinates);i=new google.maps["polygon"===e.type?"Polygon":"Polyline"]({path:t,strokeColor:e.strokeColor,fillColor:e.fillColor,strokeWeight:e.strokeWeight,editable:!0,draggable:!0,map:this.map,fillOpacity:"polygon"===e.type?e.fillOpacity:1})}break;case"circle":i=new google.maps.Circle({center:new google.maps.LatLng(e.coordinates[0],e.coordinates[1]),radius:e.radius,strokeColor:e.strokeColor,fillColor:e.fillColor,strokeWeight:e.strokeWeight,editable:!0,draggable:!0,map:this.map,fillOpacity:e.fillOpacity??1})}let d={type:e.type,uid:(0,s.uniqueUid)(),state:e,gme:i};"dragend radius_changed center_changed".split(" ").forEach(e=>i.addListener(e,()=>o.onChangeGeometries.call(this,d,t))),("polygon"===d.type||"polyline"===d.type)&&"insert_at set_at remove_at".split(" ").forEach(e=>d.gme.getPath().addListener(e,()=>o.onChangeGeometries.call(this,d,t))),i.addListener("click",()=>n.openPropsDialog.call(this,d,t)),this.mapElements[t]=d}},53454:function(e,t,i){"use strict";i.d(t,{onChangeGeometries:function(){return r}});var o=i(72690),n=i(67912);function r(e,t){switch(e.type){case"polyline":case"polygon":{let i=(0,n.pathToArray)(e.gme.getPath()),r={...e.state,coordinates:i};o.updateStateAndGme.call(this,r,t,!0);break}case"marker":{let i=e.gme.getPosition(),n={...e.state,coordinates:[i?.lat()??0,i?.lng()??0]};o.updateStateAndGme.call(this,n,t,!0);break}case"circle":{let i=e.gme.getCenter(),n={...e.state,radius:e.gme.getRadius(),coordinates:[i?.lat()??0,i?.lng()??0]};o.updateStateAndGme.call(this,n,t,!0)}}}},11079:function(e,t,i){"use strict";i.d(t,{openPropsDialog:function(){return a}});var o=i(47660),n=i(72690),r=i(90835);function s(){let e=new google.maps.InfoWindow({content:"<div>test</div>"});return e.addListener("domready",()=>{this.setMod("info-opened",!0)}),e.addListener("closeclick",()=>{this.setMod("info-opened",!1)}),e}function a(e,t){let i;switch(this.state.mode="hand",e.type){case"polyline":i=new r.UIPolylineEditor(this.jodit,e.state,this.options);break;case"marker":i=new r.UIMarkerEditor(this.jodit,e.state,this.options);break;case"circle":case"polygon":i=new r.UIPolygonEditor(this.jodit,e.state,this.options)}if(!i)return;this.append(i),this.j.e.on(i,"bin",()=>{o.removeElement.call(this,e)}).on(i,"change",(i,o)=>{n.updateStateAndGme.call(this,{...e.state,[i]:o},t)});let a=s.call(this);if("polygon"===e.type||"polyline"===e.type){let t=e.gme.getPath().getAt(0);a.setPosition(t)}"circle"===e.type&&a.setPosition(e.gme.getCenter()),a.setContent(i.container),a.open(this.map,e.gme),a.addListener("closeclick",()=>{i&&(this.remove(i),i.destruct())})}},47660:function(e,t,i){"use strict";function o(e){let t=this.mapElements.indexOf(e);-1!==t&&(this.mapElements[t].gme.setMap(null),this.mapElements.splice(t,1),this.state.elements.splice(t,1),this.state.elements=[...this.state.elements])}i.d(t,{removeElement:function(){return o}})},72690:function(e,t,i){"use strict";i.d(t,{updateStateAndGme:function(){return n}});var o=i(67912);function n(e,t,i=!1){let r=this.mapElements[t];if(r.state===e||r.state.type!==e.type)return;let s=r.state;if(!i){let t;for(t in e){let i=e[t],n=s[t];if(null!=i&&(null==n||i.toString()!==n.toString()))switch(t){case"strokeWeight":case"strokeColor":case"fillColor":case"fillOpacity":switch(r.type){case"polyline":case"circle":case"polygon":r.gme.setOptions({[t]:i})}break;case"coordinates":switch(r.type){case"polygon":case"polyline":r.gme.setPath((0,o.arrayToPath)(i))}}}}r.state=e,this.state.elements[t]=e}},8073:function(e,t,i){"use strict";i.d(t,{UIMapsControlsForm:function(){return a}});var o=i(82749),n=i(31635),r=i(87325),s=i(67510);class a extends s.UIForm{className(){return"UIMapsControlsForm"}onChangeSize(e,t){this.state.controls={...this.state.controls,[e]:"true"===t}}constructor(e,t){super(e),(0,o._)(this,"state",void 0),this.state=t;let i={zoomControl:"Zoom control",mapTypeControl:"Map Type control",scaleControl:"Scale control",streetViewControl:"Street View control ",rotateControl:"Rotate control",fullscreenControl:"Fullscreen control"},n=Object.keys(i);this.append(n.map(t=>new s.UICheckbox(e,{label:i[t],name:t,checked:this.state.controls[t],switch:!0,type:"checkbox",onChange:this.onChangeSize.bind(this,t)})))}}a=(0,n.__decorate)([r.component],a)},83039:function(e,t,i){"use strict";i.d(t,{UIMapsPropsForm:function(){return l}});var o=i(82749),n=i(31635),r=i(65478),s=i(76078),a=i(67510);class l extends a.UIForm{className(){return"UIMapsPropsForm"}onChangeSize(){let{width:e,height:t}=(0,s.refs)(this.container);this.state.size=[parseInt(e?.value,10)||0,parseInt(t?.value,10)||0]}onExternalChangeSize(){let{width:e,height:t}=(0,s.refs)(this.container),[i,o]=this.state.size;i.toString()!==e.value&&(e.value=i.toString()),o.toString()!==t.value&&(t.value=o.toString())}onChangeCenter(){let{lat:e,lng:t}=(0,s.refs)(this.container);this.state.center=[parseFloat(e?.value)||0,parseFloat(t?.value)||0]}onExternalChangeCenter(){let{lat:e,lng:t}=(0,s.refs)(this.container),[i,o]=this.state.center;i.toString()!==e.value&&(e.value=i.toString()),o.toString()!==t.value&&(t.value=o.toString())}onExternalChangeType(){let{mapType:e}=(0,s.refs)(this.container);this.state.type!==e.value&&(e.value=this.state.type)}onExternalChangeLayer(){let{layer:e}=(0,s.refs)(this.container);this.state.layer!==e.value&&(e.value=this.state.layer)}constructor(e,t){super(e),(0,o._)(this,"state",void 0),this.state=t;let[i,n]=t.size,[r,s]=t.center;this.append([new a.UIInput(e,{label:"Width",name:"width",value:i,type:"number",onChange:this.onChangeSize}),new a.UIInput(e,{label:"Height",name:"height",value:n,type:"number",onChange:this.onChangeSize}),new a.UIInput(e,{label:"Latitude",name:"lat",value:r,onChange:this.onChangeCenter}),new a.UIInput(e,{label:"Longitude",name:"lng",value:s,onChange:this.onChangeCenter}),new a.UISelect(e,{label:"Map type",value:t.type,name:"mapType",options:[{value:"hybrid",text:"Hybrid"},{value:"roadmap",text:"Roadmap"},{value:"satellite",text:"Satellite"},{value:"terrain",text:"Terrain"}],onChange(e){t.type=e}}),new a.UISelect(e,{label:"Layer",value:t.layer??"default",name:"layer",options:[{value:"default",text:"Default"},{value:"traffic",text:"Traffic"},{value:"transit",text:"Transit"},{value:"bicycling",text:"Bicycling"}],onChange(e){t.layer=e}})])}}(0,n.__decorate)([r.autobind],l.prototype,"onChangeSize",null),(0,n.__decorate)([(0,r.watch)("state.size")],l.prototype,"onExternalChangeSize",null),(0,n.__decorate)([r.autobind],l.prototype,"onChangeCenter",null),(0,n.__decorate)([(0,r.watch)(["state.center"])],l.prototype,"onExternalChangeCenter",null),(0,n.__decorate)([(0,r.watch)(["state.type"])],l.prototype,"onExternalChangeType",null),(0,n.__decorate)([(0,r.watch)(["state.layer"])],l.prototype,"onExternalChangeLayer",null),l=(0,n.__decorate)([r.component],l)},11093:function(e,t,i){"use strict";i.d(t,{UIWysiwyg:function(){return l}});var o=i(31635),n=i(87325),r=i(38837),s=i(48538),a=i(2692);class l extends s.UIElement{className(){return"UIWysiwyg"}render(){return`<div>
603
615
  <div class='&__label'>~Info~</div>
604
616
  <div class='&__editor'></div>
605
- </div>`}constructor(e,t,i,o){super(e);let n=this.getElm("editor");(0,r.assert)(null!=n,"editor element does not exist");let s=a.JoditPro.make(n,{buttons:["bold","italic","image"],height:100,minHeight:100,allowResizeY:!1,allowResizeX:!1,disablePlugins:["mobile","backup","highlight-signature","tune-block","show-blocks"],toolbarButtonSize:"small",language:e.o.language,direction:e.o.direction,theme:e.o.theme,statusbar:!1,...t});s.value=i,s.e.on("change",()=>o(s.value))}}l=(0,o.__decorate)([n.component],l)},40650:function(e,t,i){"use strict";var o=i(82749),n=i(25088),r=i.n(n),s=i(6441),a=i(21537),l=i(50911),c=i(59451),d=i(2692);s.Config.prototype.controls.google={tooltip:"Google search",icon:r(),isDisabled:e=>(0,c.isEditorEmpty)(e.editor),command:"startSearch"};class u extends l.Plugin{afterInit(e){e.registerCommand("startSearch",{exec(){let t,{s:i}=e;if(t=i.isCollapsed()?i.current()?.parentElement?.innerText:i.sel?.toString()){let e="https://www.google.com/search?q="+encodeURIComponent((0,a.trim)(t));window.open(e,"_blank")}}})}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"google",group:"search"}])}}(0,o._)(u,"requires",["license"]),d.JoditPro.plugins.add("google-search",u)},36347:function(e,t,i){"use strict";i(6441).Config.prototype.highlightSignature={processDelay:0,processInChunkCount:300,schema:{},excludeTags:["pre"]}},46958:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(36347);var r=i(65478),s=i(2748),a=i(29960),l=i(20356),c=i(2692);class d extends l.Plugin{afterInit(e){Object.keys(e.o.highlightSignature.schema).length&&(e.e.on("change afterSetMode",this.walkNodes).on("afterGetValueFromEditor",d.removeUtilWrappers),this.walkNodes())}beforeDestruct(e){e.e.off("change afterSetMode",this.walkNodes).off("afterGetValueFromEditor",d.removeUtilWrappers)}walkNodes(){if(!this.j.isEditorMode())return;this.checkUtilsBoxToSchema();let{j:e}=this,t=e.ed.createNodeIterator(e.editor,NodeFilter.SHOW_TEXT);this.abortController?.abort(),this.workLoop(t)}runWorker(e){let t;this.j.e.mute();let i=0,{processInChunkCount:o}=this.j.o.highlightSignature;try{do{if(i+=1,!(t=e.nextNode())||this.checkNormalizing(t))return;this.checkReplaceSchemas(t)}while(t&&o>i)}finally{this.j.e.unmute()}this.workLoop(e)}workLoop(e){this.abortController=new AbortController,this.j.async.schedulerPostTask(()=>this.runWorker(e),{delay:this.j.o.highlightSignature.processDelay}).catch(()=>null)}checkNormalizing(e){return!!s.Dom.isText(e.nextSibling)&&(this.j.editor.normalize(),this.walkNodes(),!0)}checkReplaceSchemas(e){if(d.hasUtilWrapper(e))return;let t=e.nodeValue;if(null==t)return;let{j:i}=this,o=i.o.highlightSignature;for(let i in o.schema){let n=RegExp(i);if(n.test(t)){let r=t.match(n);if(!r||void 0===r.index)continue;let a=o.schema[i](this.j,r);if(a){s.Dom.markTemporary(a,{dataHighlightSchema:i}),this.replaceMatchedTextToElm(e,t,r,a);return}}}}replaceMatchedTextToElm(e,t,i,o){let{j:n}=this,{range:r}=n.s,a=r.startContainer===e,l=r.startOffset,c=i.index??0;e.nodeValue=t.substring(0,c);let d=t.substring(c+i[0].length);if(d.length){let t=n.createInside.text(d);s.Dom.after(e,t)}o.innerText=i[0],s.Dom.after(e,o),a&&this.restoreCursorPosition(l,e,o.firstChild,o.nextSibling)}static hasUtilWrapper(e){return s.Dom.isTemporary(e.parentElement)}static removeUtilWrappers(e){e.value=s.Dom.replaceTemporaryFromString(e.value)}restoreCursorPosition(e,...t){for(let i of t)if(i&&i.nodeValue){let t=i.nodeValue;if(t.length>=e){let t=this.j.s.createRange();t.setStart(i,e),this.j.s.selectRange(t,!1);break}e-=t.length}}checkUtilsBoxToSchema(){s.Dom.temporaryList(this.j.editor).forEach(e=>{let t=(0,a.attr)(e,"dataHighlightSchema");if(!t)return;let i=RegExp(t),o=e.innerText??"";(!i.test(o)||o.replace(i,"").length)&&(this.j.s.save(),s.Dom.unwrap(e),this.j.s.restore())})}constructor(...e){super(...e),(0,o._)(this,"abortController",null)}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([(0,r.debounce)()],d.prototype,"walkNodes",null),(0,n.__decorate)([r.autobind],d.prototype,"runWorker",null),c.JoditPro.plugins.add("highlight-signature",d)},88092:function(e,t,i){"use strict";var o=i(67008),n=i.n(o),r=i(6441),s=i(2748),a=i(68345);r.Config.prototype.controls.iframeEditor={icon:n(),tooltip:"Iframe Editor",exec(e,t){s.Dom.isTag(t,"jodit")&&s.Dom.isTag(t.firstElementChild,"iframe")&&(t=t.firstElementChild),e.e.fire("toggleIframeEditor",s.Dom.isTag(t,"iframe")?t:null)}},(0,a.isArray)(r.Config.prototype.popup.iframe)&&r.Config.prototype.popup.iframe.push("iframeEditor")},1050:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(88092);var r=i(29744),s=i(65478),a=i(22732),l=i(21537),c=i(50911),d=i(62843),u=i(41409),h=i(2692);class p extends c.Plugin{afterInit(e){e.e.on("toggleIframeEditor",this.toggleEditor)}toggleEditor(e){this.__dialog||(this.__dialog=new u.Dialog({language:this.j.o.language,theme:this.j.o.theme}),this.__dialog.setHeader("Iframe Properties").setSize(470,400)),e&&!a.Dom.isTag(e,"iframe")&&(e=void 0);let t=new r.UIIframeEditor(this.__dialog,{src:e?.src??"",name:e?.name??"",title:e?.title??"",frameBorder:e?.frameBorder==="1"||e?.frameBorder==="yes",width:e?.offsetWidth??700,height:e?.offsetHeight??400});this.__dialog.setContent(t);let i=this.__dialog;i.isOpened?i.close():(i.setFooter([(0,d.Button)(i,"cancel","Cancel","default").onAction(()=>i.close()),(0,d.Button)(i,"ok",e?"Update":"Insert","primary").onAction(()=>{if(!t.srcField.value){t.srcField.validate(),t.srcField.focus();return}e||(e=this.j.createInside.element("iframe"),this.j.s.insertNode(e,!0,!1)),e.className=t.state.className||"",(0,l.attr)(e,{src:t.state.src,title:t.state.title,name:t.state.name,frameborder:t.state.frameBorder?"1":"0",width:t.state.width,height:t.state.height}),a.Dom.isTag(e.parentElement,"jodit")&&(0,l.css)(e.parentElement,{width:t.state.width,height:t.state.height}),this.jodit.e.fire("synchro"),i.close()})]).open(),this.jodit.async.requestIdleCallback(()=>{t.srcField.focus()}))}onDblClick(e){a.Dom.isTag(e.target,"iframe")&&this.toggleEditor(e.target)}beforeDestruct(e){this.__dialog?.destruct()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{group:"form",name:"iframeEditor"}]),(0,o._)(this,"__dialog",void 0)}}(0,o._)(p,"requires",["license","color-picker"]),(0,n.__decorate)([s.autobind],p.prototype,"toggleEditor",null),(0,n.__decorate)([(0,s.watch)(":dblclick")],p.prototype,"onDblClick",null),h.JoditPro.plugins.add("iframe-editor",p)},29744:function(e,t,i){"use strict";i.d(t,{UIIframeEditor:function(){return a}});var o=i(82749),n=i(31635),r=i(87325),s=i(67510);class a extends s.UIGroup{className(){return"UIIframeEditor"}constructor(e,t){super(e),(0,o._)(this,"state",{src:"",className:"",width:400,height:200,frameBorder:!1,enableScrollbars:!1,name:"",title:""}),(0,o._)(this,"srcField",void 0),Object.assign(this.state,t),this.srcField=new s.UIInput(e,{label:"URL",type:"url",required:!0,value:this.state.src,onChange:e=>{this.state.src=e}}),this.append([this.srcField,new s.UIBlock(e,[new s.UIInput(e,{label:"Width",type:"number",value:this.state.width,onChange:e=>{this.state.width=parseInt(e,10)||0}}),new s.UIInput(e,{label:"Height",type:"number",value:this.state.height,onChange:e=>{this.state.height=parseInt(e,10)||0}})],{className:this.getFullElName("block"),align:"center"}),new s.UIBlock(e,[new s.UICheckbox(e,{label:"Show frame border",checked:!!t.frameBorder,onChange:e=>{this.state.frameBorder="true"===e}})]),new s.UIInput(e,{label:"Name",value:this.state.name,type:"text",onChange:e=>{this.state.name=e}}),new s.UIInput(e,{label:"Title",value:this.state.title,type:"text",onChange:e=>{this.state.title=e}})])}}a=(0,n.__decorate)([r.component],a)},76542:function(e,t,i){"use strict";i.d(t,{ProImageEditor:function(){return l}});var o=i(82749),n=i(85013),r=i(6441),s=i(91907),a=i(10830);class l extends s.ViewComponent{className(){return"ImageEditorPro"}async open(e,t){let i=this.j,o=r.Config.defaultOptions.imageEditorPro,s=i.c.div("jodit-image-editor-pro");s.style.width="100%",s.style.height="100%";let a=i.dlg();a.setSize(o.dialog.width,o.dialog.height),a.setContent(s),a.open();let l=null,c=null,d=()=>{c?.(),c=null,l?.destroy(),l=null,a.close()};a.e.on("beforeClose",()=>{c?.(),c=null,l?.destroy(),l=null}),l=new n.ImageEditor({container:s,state:{showToolbar:!1,status:"loading"},onSave:i=>{this.persist(l,e,void 0,i,t,d)},onSaveAs:i=>{this.saveAs(l,e,i,t,d)}}),c=this.mountToolbar(a,l);try{let t=await this.loadImage(e);await l.fromBlob(t),i.e.fire("afterImageEditor")}catch(e){l?.update({status:"error",error:e instanceof Error?e.message:e+""}),this.error(e)}}mountToolbar(e,t){let i=this.j,o=(0,a.Button)(i,{icon:{name:"save"},text:i.i18n("Save")},"primary"),r=(0,a.Button)(i,{icon:{name:"save"},name:"save-as",text:i.i18n("Save as")}),s=i.c.span("jodit-image-editor-pro__size"),l=(0,a.Button)(i,n.ICONS.minus),c=i.c.span("jodit-image-editor-pro__zoom"),d=(0,a.Button)(i,n.ICONS.plus),u=(0,a.Button)(i,"update",i.i18n("Reset")),h=(0,a.Button)(i,"undo",i.i18n("Undo")),p=(0,a.Button)(i,"redo",i.i18n("Redo"));l.setState({tooltip:"Zoom out"}),d.setState({tooltip:"Zoom in"});let f=null;o.onAction(()=>{f=o,t.save()}),r.onAction(()=>{f=r,t.saveAs()}),l.onAction(()=>t.update({zoom:t.state.zoom/1.2})),d.onAction(()=>t.update({zoom:1.2*t.state.zoom})),u.onAction(()=>t.reset()),h.onAction(()=>t.update({history:{step:-1}})),p.onAction(()=>t.update({history:{step:1}}));let m=(...e)=>{let t=i.c.div("jodit-image-editor-pro__group");return t.style.display="flex",t.style.alignItems="center",t.style.gap="4px",e.forEach(e=>t.appendChild(e)),t},g=i.c.div("jodit-image-editor-pro__toolbar");g.style.display="flex",g.style.alignItems="center",g.style.gap="12px",g.style.width="100%",s.style.opacity="0.75",c.style.minWidth="3.5em",c.style.textAlign="center",g.appendChild(m(o.container,r.container)),g.appendChild(m(s,l.container,c,d.container));let b=m(u.container,h.container,p.container);b.style.marginLeft="auto",g.appendChild(b),e.setHeader(g);let v="jodit-image-editor-pro__button_busy",y=e=>{let t=n.selectors.selectOutputSize(e),i="exporting"===e.status,a=i||"loading"===e.status,l=e.busyVisible,d=i&&(l??!0);i||(f=null),o.setState({disabled:!e.source||a}),r.setState({disabled:!e.source||a}),o.container.classList.toggle(v,d&&f!==r),r.container.classList.toggle(v,d&&f===r),u.setState({disabled:!n.selectors.selectIsDirty(e)}),h.setState({disabled:!n.selectors.selectCanUndo(e)}),p.setState({disabled:!n.selectors.selectCanRedo(e)}),s.textContent=t?`${t.width} \xd7 ${t.height}`:"";let m=n.selectors.selectViewportFit(e),g=m?Math.round(100*m.scale):Math.round(100*e.zoom);c.textContent=`${g}%`};y(t.state);let w=t.store.subscribe(y);return()=>{w(),[o,r,l,d,u,h,p].forEach(e=>e.destruct())}}saveAs(e,t,i,o,n){this.j.prompt("Enter new name","Save in new file",r=>{let s=(r||"").trim();if(!s)return this.j.alert("The name should not be empty"),!1;this.persist(e,t,s,i,o,n)})}async persist(e,t,i,o,n,r){e?.update({status:"exporting"});try{let e=await this.blobSize(o),s={action:this.coreSupportsSaved()?"saved":"resize",box:e};void 0!==i?this.j.e.fire("afterImageEditorSave",s,i):this.j.e.fire("afterImageEditorSave",s);let a=await this.uploadEdited(t,o,i),l=()=>{r(),this.j.e.fire("update.filebrowser")};n(i,this.coreSupportsSaved()?{action:"saved",box:e,newPath:a||void 0}:{action:"resize",box:e},l,e=>{r(),this.error(e)})}catch(e){r(),this.error(e)}}async uploadEdited(e,t,i){let{source:o,path:n,name:r}=await this.j.dataProvider.getPathByUrl(e),s=this.connectorUrl();if(!s)throw Error("No connector configured for imageSave");let a=(i||r||"image.png")+"",l=new FormData;l.append("action","imageSave"),l.append("source",(o??"")+""),l.append("path",(n??"")+""),l.append("name",a),l.append("files[0]",t,a);let c=s.includes("?")?"&":"?",d=await fetch(`${s}${c}action=imageSave`,{method:"POST",body:l,credentials:"include"}),u=await d.json();if(!u.success)throw Error(u.message||"Failed to save the edited image");return u.data?.newPath??""}coreSupportsSaved(){let[e=0,t=0,i=0]=(this.j.getVersion?this.j.getVersion():"").split(".").map(e=>parseInt(e,10)||0);return e>4||4===e&&(t>12||12===t&&i>=34)}connectorUrl(){let e=this.j.o.ajax?.url,t=this.j.o.uploader?.url;return"string"==typeof e&&e?e:"string"==typeof t&&t?t:""}async loadImage(e){let t=this.connectorUrl();if(t)try{return await this.loadViaConnector(t,e)}catch{}let i=e.includes("?")?"&":"?",o=await fetch(`${e}${i}_tst=${Date.now()}`,{credentials:"include"});if(!o.ok)throw Error(`Failed to load image (${o.status})`);return o.blob()}async loadViaConnector(e,t){let{source:i,path:o,name:n}=await this.j.dataProvider.getPathByUrl(t),r=new FormData;r.append("action","imageLoad"),r.append("source",(i??"")+""),r.append("path",(o??"")+""),r.append("name",(n??"")+"");let s=e.includes("?")?"&":"?",a=await fetch(`${e}${s}action=imageLoad`,{method:"POST",body:r,credentials:"include"}),l=await a.json();if(!l.success||!l.data?.content)throw Error(l.message||"Failed to load the image");return(await fetch(l.data.content)).blob()}async blobSize(e){let t=await createImageBitmap(e),i={w:t.width,h:t.height};return t.close(),i}error(e){this.j.e.fire("errorMessage",e.message)}constructor(...e){super(...e),(0,o._)(this,"isProImageEditor",!0)}}},45719:function(e,t,i){"use strict";i(6441).Config.prototype.imageEditorPro={dialog:{width:"90%",height:"90%"}}},98270:function(e,t,i){"use strict";var o=i(82749);i(45719);var n=i(76542),r=i(50911),s=i(2692);class a extends r.Plugin{afterInit(e){let t=n.ProImageEditor,i=s.JoditPro.modules;i.ImageEditorCore||i.ImageEditor===t||(i.ImageEditorCore=i.ImageEditor),i.ImageEditor=t}beforeDestruct(e){}}(0,o._)(a,"requires",["license"]),s.JoditPro.plugins.add("imageEditorPro",a)},12373:function(e,t,i){"use strict";i(25187),i(58858),i(21246),i(49934),i(3115),i(41810),i(61328),i(45632),i(8390),i(29528),i(85174),i(90882),i(97068),i(482),i(40650),i(46958),i(98270),i(1050),i(95618),i(74398),i(79850),i(41406),i(47682),i(75554),i(61886),i(19374),i(73098),i(13152)},41113:function(e,t,i){"use strict";var o=i(63643),n=i.n(o),r=i(6441);r.Config.prototype.keyboard={defaultLayoutSet:"en",showLayoutSwitcher:!0,extraKeyGroup:"other",extraKeyButtons:[],delayKeyRepeat:350,periodKeyRepeat:100,layoutList:{en:{title:"English",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},es:{title:"Español",keys:[["º ` ~","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _ |","¡ = +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","ç Ç \\"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ñ Ñ ; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},de:{title:"Deutsch",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 * :","9 ( {","0 ) }","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","z Z","u U","i I","o O","p P","ü Ü [","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ö Ö ;","ä Ä ' \"","Enter"],["Shift","y Y","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},ru:{title:"Русский",keys:[["` ~ ±","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","й Й","ц Ц","у У","к К","е Е","н Н","г Г","ш Ш","щ Щ","з З","х Х [","ъ ] {","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ж Ж ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","ь Ь","б Б ,","ю Ю .","/ ?","Shift"],["Options","Space","Options"]]},tr:{title:"Türkçe",keys:[['" é` ~',"1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 ) }","- _ [","= + ]","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","ı I","o O","p P","ğ Ğ","ü Ü",", \\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ş Ş","i̇ İ","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M","ö Ö <","ç Ç >",". / ?","Shift"],["Options","Space","Options"]]},iw:{title:"Hebrew",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","/ q Q","' w W","ק e E","ר r R","א t T","ט y Y","ו u U","ן i I","ם o O","פ p P","[ {","] }","\\ |"],["Caps","ש a A","ד s S","ג d D","כ f F","ע g G","י h H","ח j J","ל k K","ך l L","ף ; :","' \"","Enter"],["Shift","ז z Z","ס x X","ב c C","ה v V","נ b B","מ n N","צ m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},tata:{title:"Tata",keys:[["һ Һ` ~","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 )","- _","= +","Backspace"],["Tab","й Й","ө Ө","у У","к К","е Е","н Н","г Г","ш Ш","ә Ә","з З","х Х [","ү Ү ]","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ң Ң ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","җ Җ","б Б ,","ю Ю .","ґ Ґ /","Shift"],["Options","Space","Options"]]}},layoutSwitchList:["en","es","de","ru","tr","iw","tata"],keySize:32,layout:[[1,1,1,1,1,1,1,1,1,1,1,1,1,2],[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],[1.8,1,1,1,1,1,1,1,1,1,1,1,2.2],[2.5,1,1,1,1,1,1,1,1,1,1,2.5],[3.5,9,3.5]]},r.Config.prototype.controls.keyboard={tooltip:"Keyboard",icon:n(),isActive:e=>!!e.e.fire("isKeyboardOpened"),command:"toggleKeyboard"},r.Config.prototype.controls.extraKeyboardButtons={}},95618:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(41113);var r=i(25241),s=i(6441),a=i(65478),l=i(27613),c=i(50911),d=i(67510),u=i(41409),h=i(2692);class p extends c.Plugin{afterInit(e){e.registerCommand("toggleKeyboard",this.toggleKeyboard).registerCommand("insertChar",this.insertChar),e.e.on("isKeyboardOpened",()=>this.__keyboard?.isOpened)}insertChar(e,t,i){this.j.s.insertNode(this.j.createInside.text(i))}toggleKeyboard(){if(!this.__keyboard){this.__keyboard=new u.Dialog({toolbarButtonSize:"tiny"});let e=new r.UIKeyboard(this.j);this.__keyboard.setMod("slim",!0).setMod("adaptive",!1).setContent(e);let{showLayoutSwitcher:t,layoutSwitchList:i,layoutList:o}=this.j.o.keyboard;if(t){let t=new d.UISelect(this.__keyboard,{value:e.state.currentLayout,options:i.map(e=>({text:o[e]?.title??e,value:e})),onChange(t){e.state.currentLayout=t}});t.setMod("size","tiny").setMod("width","auto").setMod("variant","outline"),this.__keyboard.setHeader(t)}}this.__keyboard.isOpened?this.__keyboard.close():this.__keyboard.open()}beforeDestruct(e){this.__keyboard?.destruct()}constructor(e){super(e),(0,o._)(this,"hasStyle",!h.JoditPro.fatMode),(0,o._)(this,"buttons",[{group:"insert",name:"keyboard"}]),(0,o._)(this,"__keyboard",void 0);let{extraKeyButtons:t,extraKeyGroup:i}=e.o.keyboard;t.length&&t.forEach((t,o)=>{let n=(0,l.isString)(t)?t:t.key,r=(0,l.isString)(t)||!t.hotkeys?["ctrl+"+(o+1)]:t.hotkeys;e.registerButton({name:"extraKeyboardButtons."+n,group:i});let{extraKeyboardButtons:a}=s.Config.defaultOptions.controls;a[n]={name:n,tooltip:n,args:[n],hotkeys:r,command:"insertChar"}})}}(0,o._)(p,"requires",["license"]),(0,n.__decorate)([a.autobind],p.prototype,"insertChar",null),(0,n.__decorate)([a.autobind],p.prototype,"toggleKeyboard",null),h.JoditPro.plugins.add("keyboard",p)},25241:function(e,t,i){"use strict";i.d(t,{UIKeyboard:function(){return y}});var o=i(82749),n=i(31635),r=i(82758),s=i(65478),a=i(43555),l=i(67510),c=i(27926),d=i.n(c),u=i(10690),h=i.n(u),p=i(91997),f=i.n(p),m=i(11699),g=i.n(m),b=i(98126),v=i.n(b);class y extends l.UIElement{className(){return"UIKeyboard"}render(){let{layout:e,keySize:t}=this.j.options.keyboard,i=e.length;return`<div>${(()=>{let o=[];for(let n=0;i>n;n+=1){let i=[];for(let o=0;o<e[n].length;o+=1)i.push(`<div style="width:${t*e[n][o]}px;height:${t}px;" class="&__key"></div>`);o.push(`<div class='&__row'>${i.join(`
617
+ </div>`}constructor(e,t,i,o){super(e);let n=this.getElm("editor");(0,r.assert)(null!=n,"editor element does not exist");let s=a.JoditPro.make(n,{buttons:["bold","italic","image"],height:100,minHeight:100,allowResizeY:!1,allowResizeX:!1,disablePlugins:["mobile","backup","highlight-signature","tune-block","show-blocks"],toolbarButtonSize:"small",language:e.o.language,direction:e.o.direction,theme:e.o.theme,statusbar:!1,...t});s.value=i,s.e.on("change",()=>o(s.value))}}l=(0,o.__decorate)([n.component],l)},40650:function(e,t,i){"use strict";var o=i(82749),n=i(25088),r=i.n(n),s=i(6441),a=i(21537),l=i(50911),c=i(59451),d=i(2692);s.Config.prototype.controls.google={tooltip:"Google search",icon:r(),isDisabled:e=>(0,c.isEditorEmpty)(e.editor),command:"startSearch"};class u extends l.Plugin{afterInit(e){e.registerCommand("startSearch",{exec(){let t,{s:i}=e;if(t=i.isCollapsed()?i.current()?.parentElement?.innerText:i.sel?.toString()){let e="https://www.google.com/search?q="+encodeURIComponent((0,a.trim)(t));window.open(e,"_blank")}}})}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"google",group:"search"}])}}(0,o._)(u,"requires",["license"]),d.JoditPro.plugins.add("google-search",u)},36347:function(e,t,i){"use strict";i(6441).Config.prototype.highlightSignature={processDelay:0,processInChunkCount:300,schema:{},excludeTags:["pre"]}},46958:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(36347);var r=i(65478),s=i(2748),a=i(29960),l=i(20356),c=i(2692);class d extends l.Plugin{afterInit(e){Object.keys(e.o.highlightSignature.schema).length&&(e.e.on("change afterSetMode",this.walkNodes).on("afterGetValueFromEditor",d.removeUtilWrappers),this.walkNodes())}beforeDestruct(e){e.e.off("change afterSetMode",this.walkNodes).off("afterGetValueFromEditor",d.removeUtilWrappers)}walkNodes(){if(!this.j.isEditorMode())return;this.checkUtilsBoxToSchema();let{j:e}=this,t=e.ed.createNodeIterator(e.editor,NodeFilter.SHOW_TEXT);this.abortController?.abort(),this.workLoop(t)}runWorker(e){let t;this.j.e.mute();let i=0,{processInChunkCount:o}=this.j.o.highlightSignature;try{do{if(i+=1,!(t=e.nextNode())||this.checkNormalizing(t))return;this.checkReplaceSchemas(t)}while(t&&o>i)}finally{this.j.e.unmute()}this.workLoop(e)}workLoop(e){this.abortController=new AbortController,this.j.async.schedulerPostTask(()=>this.runWorker(e),{delay:this.j.o.highlightSignature.processDelay}).catch(()=>null)}checkNormalizing(e){return!!s.Dom.isText(e.nextSibling)&&(this.j.editor.normalize(),this.walkNodes(),!0)}checkReplaceSchemas(e){if(d.hasUtilWrapper(e))return;let t=e.nodeValue;if(null==t)return;let{j:i}=this,o=i.o.highlightSignature;for(let i in o.schema){let n=RegExp(i);if(n.test(t)){let r=t.match(n);if(!r||void 0===r.index)continue;let a=o.schema[i](this.j,r);if(a){s.Dom.markTemporary(a,{dataHighlightSchema:i}),this.replaceMatchedTextToElm(e,t,r,a);return}}}}replaceMatchedTextToElm(e,t,i,o){let{j:n}=this,{range:r}=n.s,a=r.startContainer===e,l=r.startOffset,c=i.index??0;e.nodeValue=t.substring(0,c);let d=t.substring(c+i[0].length);if(d.length){let t=n.createInside.text(d);s.Dom.after(e,t)}o.innerText=i[0],s.Dom.after(e,o),a&&this.restoreCursorPosition(l,e,o.firstChild,o.nextSibling)}static hasUtilWrapper(e){return s.Dom.isTemporary(e.parentElement)}static removeUtilWrappers(e){e.value=s.Dom.replaceTemporaryFromString(e.value)}restoreCursorPosition(e,...t){for(let i of t)if(i&&i.nodeValue){let t=i.nodeValue;if(t.length>=e){let t=this.j.s.createRange();t.setStart(i,e),this.j.s.selectRange(t,!1);break}e-=t.length}}checkUtilsBoxToSchema(){s.Dom.temporaryList(this.j.editor).forEach(e=>{let t=(0,a.attr)(e,"dataHighlightSchema");if(!t)return;let i=RegExp(t),o=e.innerText??"";(!i.test(o)||o.replace(i,"").length)&&(this.j.s.save(),s.Dom.unwrap(e),this.j.s.restore())})}constructor(...e){super(...e),(0,o._)(this,"abortController",null)}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([(0,r.debounce)()],d.prototype,"walkNodes",null),(0,n.__decorate)([r.autobind],d.prototype,"runWorker",null),c.JoditPro.plugins.add("highlight-signature",d)},88092:function(e,t,i){"use strict";var o=i(67008),n=i.n(o),r=i(6441),s=i(2748),a=i(68345);r.Config.prototype.controls.iframeEditor={icon:n(),tooltip:"Iframe Editor",exec(e,t){s.Dom.isTag(t,"jodit")&&s.Dom.isTag(t.firstElementChild,"iframe")&&(t=t.firstElementChild),e.e.fire("toggleIframeEditor",s.Dom.isTag(t,"iframe")?t:null)}},(0,a.isArray)(r.Config.prototype.popup.iframe)&&r.Config.prototype.popup.iframe.push("iframeEditor")},1050:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(88092);var r=i(29744),s=i(65478),a=i(22732),l=i(21537),c=i(50911),d=i(62843),u=i(41409),h=i(2692);class p extends c.Plugin{afterInit(e){e.e.on("toggleIframeEditor",this.toggleEditor)}toggleEditor(e){this.__dialog||(this.__dialog=new u.Dialog({language:this.j.o.language,theme:this.j.o.theme}),this.__dialog.setHeader("Iframe Properties").setSize(470,400)),e&&!a.Dom.isTag(e,"iframe")&&(e=void 0);let t=new r.UIIframeEditor(this.__dialog,{src:e?.src??"",name:e?.name??"",title:e?.title??"",frameBorder:e?.frameBorder==="1"||e?.frameBorder==="yes",width:e?.offsetWidth??700,height:e?.offsetHeight??400});this.__dialog.setContent(t);let i=this.__dialog;i.isOpened?i.close():(i.setFooter([(0,d.Button)(i,"cancel","Cancel","default").onAction(()=>i.close()),(0,d.Button)(i,"ok",e?"Update":"Insert","primary").onAction(()=>{if(!t.srcField.value){t.srcField.validate(),t.srcField.focus();return}e||(e=this.j.createInside.element("iframe"),this.j.s.insertNode(e,!0,!1)),e.className=t.state.className||"",(0,l.attr)(e,{src:t.state.src,title:t.state.title,name:t.state.name,frameborder:t.state.frameBorder?"1":"0",width:t.state.width,height:t.state.height}),a.Dom.isTag(e.parentElement,"jodit")&&(0,l.css)(e.parentElement,{width:t.state.width,height:t.state.height}),this.jodit.e.fire("synchro"),i.close()})]).open(),this.jodit.async.requestIdleCallback(()=>{t.srcField.focus()}))}onDblClick(e){a.Dom.isTag(e.target,"iframe")&&this.toggleEditor(e.target)}beforeDestruct(e){this.__dialog?.destruct()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{group:"form",name:"iframeEditor"}]),(0,o._)(this,"__dialog",void 0)}}(0,o._)(p,"requires",["license","color-picker"]),(0,n.__decorate)([s.autobind],p.prototype,"toggleEditor",null),(0,n.__decorate)([(0,s.watch)(":dblclick")],p.prototype,"onDblClick",null),h.JoditPro.plugins.add("iframe-editor",p)},29744:function(e,t,i){"use strict";i.d(t,{UIIframeEditor:function(){return a}});var o=i(82749),n=i(31635),r=i(87325),s=i(67510);class a extends s.UIGroup{className(){return"UIIframeEditor"}constructor(e,t){super(e),(0,o._)(this,"state",{src:"",className:"",width:400,height:200,frameBorder:!1,enableScrollbars:!1,name:"",title:""}),(0,o._)(this,"srcField",void 0),Object.assign(this.state,t),this.srcField=new s.UIInput(e,{label:"URL",type:"url",required:!0,value:this.state.src,onChange:e=>{this.state.src=e}}),this.append([this.srcField,new s.UIBlock(e,[new s.UIInput(e,{label:"Width",type:"number",value:this.state.width,onChange:e=>{this.state.width=parseInt(e,10)||0}}),new s.UIInput(e,{label:"Height",type:"number",value:this.state.height,onChange:e=>{this.state.height=parseInt(e,10)||0}})],{className:this.getFullElName("block"),align:"center"}),new s.UIBlock(e,[new s.UICheckbox(e,{label:"Show frame border",checked:!!t.frameBorder,onChange:e=>{this.state.frameBorder="true"===e}})]),new s.UIInput(e,{label:"Name",value:this.state.name,type:"text",onChange:e=>{this.state.name=e}}),new s.UIInput(e,{label:"Title",value:this.state.title,type:"text",onChange:e=>{this.state.title=e}})])}}a=(0,n.__decorate)([r.component],a)},76542:function(e,t,i){"use strict";i.d(t,{ProImageEditor:function(){return l}});var o=i(82749),n=i(85013),r=i(6441),s=i(91907),a=i(10830);class l extends s.ViewComponent{className(){return"ImageEditorPro"}async open(e,t){let i=this.j,o=r.Config.defaultOptions.imageEditorPro,s=i.c.div("jodit-image-editor-pro");s.style.width="100%",s.style.height="100%";let a=i.dlg();a.setSize(o.dialog.width,o.dialog.height),a.setContent(s),a.open();let l=null,c=null,d=()=>{c?.(),c=null,l?.destroy(),l=null,a.close()};a.e.on("beforeClose",()=>{c?.(),c=null,l?.destroy(),l=null}),l=new n.ImageEditor({container:s,state:{showToolbar:!1,status:"loading"},onSave:i=>{this.persist(l,e,void 0,i,t,d)},onSaveAs:i=>{this.saveAs(l,e,i,t,d)}}),c=this.mountToolbar(a,l);try{let t=await this.loadImage(e);await l.fromBlob(t),i.e.fire("afterImageEditor")}catch(e){l?.update({status:"error",error:e instanceof Error?e.message:e+""}),this.error(e)}}mountToolbar(e,t){let i=this.j,o=(0,a.Button)(i,{icon:{name:"save"},text:i.i18n("Save")},"primary"),r=(0,a.Button)(i,{icon:{name:"save"},name:"save-as",text:i.i18n("Save as")}),s=i.c.span("jodit-image-editor-pro__size"),l=(0,a.Button)(i,n.ICONS.minus),c=i.c.span("jodit-image-editor-pro__zoom"),d=(0,a.Button)(i,n.ICONS.plus),u=(0,a.Button)(i,"update",i.i18n("Reset")),h=(0,a.Button)(i,"undo",i.i18n("Undo")),p=(0,a.Button)(i,"redo",i.i18n("Redo"));l.setState({tooltip:"Zoom out"}),d.setState({tooltip:"Zoom in"});let f=null;o.onAction(()=>{f=o,t.save()}),r.onAction(()=>{f=r,t.saveAs()}),l.onAction(()=>t.update({zoom:t.state.zoom/1.2})),d.onAction(()=>t.update({zoom:1.2*t.state.zoom})),u.onAction(()=>t.reset()),h.onAction(()=>t.update({history:{step:-1}})),p.onAction(()=>t.update({history:{step:1}}));let m=(...e)=>{let t=i.c.div("jodit-image-editor-pro__group");return t.style.display="flex",t.style.alignItems="center",t.style.gap="4px",e.forEach(e=>t.appendChild(e)),t},g=i.c.div("jodit-image-editor-pro__toolbar");g.style.display="flex",g.style.alignItems="center",g.style.gap="12px",g.style.width="100%",s.style.opacity="0.75",c.style.minWidth="3.5em",c.style.textAlign="center",g.appendChild(m(o.container,r.container)),g.appendChild(m(s,l.container,c,d.container));let b=m(u.container,h.container,p.container);b.style.marginLeft="auto",g.appendChild(b),e.setHeader(g);let v="jodit-image-editor-pro__button_busy",y=e=>{let t=n.selectors.selectOutputSize(e),i="exporting"===e.status,a=i||"loading"===e.status,l=e.busyVisible,d=i&&(l??!0);i||(f=null),o.setState({disabled:!e.source||a}),r.setState({disabled:!e.source||a}),o.container.classList.toggle(v,d&&f!==r),r.container.classList.toggle(v,d&&f===r),u.setState({disabled:!n.selectors.selectIsDirty(e)}),h.setState({disabled:!n.selectors.selectCanUndo(e)}),p.setState({disabled:!n.selectors.selectCanRedo(e)}),s.textContent=t?`${t.width} \xd7 ${t.height}`:"";let m=n.selectors.selectViewportFit(e),g=m?Math.round(100*m.scale):Math.round(100*e.zoom);c.textContent=`${g}%`};y(t.state);let w=t.store.subscribe(y);return()=>{w(),[o,r,l,d,u,h,p].forEach(e=>e.destruct())}}saveAs(e,t,i,o,n){this.j.prompt("Enter new name","Save in new file",r=>{let s=(r||"").trim();if(!s)return this.j.alert("The name should not be empty"),!1;this.persist(e,t,s,i,o,n)})}async persist(e,t,i,o,n,r){e?.update({status:"exporting"});try{let e=await this.blobSize(o),s={action:this.coreSupportsSaved()?"saved":"resize",box:e};void 0!==i?this.j.e.fire("afterImageEditorSave",s,i):this.j.e.fire("afterImageEditorSave",s);let a=await this.uploadEdited(t,o,i),l=()=>{r(),this.j.e.fire("update.filebrowser")};n(i,this.coreSupportsSaved()?{action:"saved",box:e,newPath:a||void 0}:{action:"resize",box:e},l,e=>{r(),this.error(e)})}catch(e){r(),this.error(e)}}async uploadEdited(e,t,i){let{source:o,path:n,name:r}=await this.j.dataProvider.getPathByUrl(e),s=this.connectorUrl();if(!s)throw Error("No connector configured for imageSave");let a=(i||r||"image.png")+"",l=new FormData;l.append("action","imageSave"),l.append("source",(o??"")+""),l.append("path",(n??"")+""),l.append("name",a),l.append("files[0]",t,a);let c=s.includes("?")?"&":"?",d=await fetch(`${s}${c}action=imageSave`,{method:"POST",body:l,credentials:"include"}),u=await d.json();if(!u.success)throw Error(u.message||"Failed to save the edited image");return u.data?.newPath??""}coreSupportsSaved(){let[e=0,t=0,i=0]=(this.j.getVersion?this.j.getVersion():"").split(".").map(e=>parseInt(e,10)||0);return e>4||4===e&&(t>12||12===t&&i>=34)}connectorUrl(){let e=this.j.o.ajax?.url,t=this.j.o.uploader?.url;return"string"==typeof e&&e?e:"string"==typeof t&&t?t:""}async loadImage(e){let t=this.connectorUrl();if(t)try{return await this.loadViaConnector(t,e)}catch{}let i=e.includes("?")?"&":"?",o=await fetch(`${e}${i}_tst=${Date.now()}`,{credentials:"include"});if(!o.ok)throw Error(`Failed to load image (${o.status})`);return o.blob()}async loadViaConnector(e,t){let{source:i,path:o,name:n}=await this.j.dataProvider.getPathByUrl(t),r=new FormData;r.append("action","imageLoad"),r.append("source",(i??"")+""),r.append("path",(o??"")+""),r.append("name",(n??"")+"");let s=e.includes("?")?"&":"?",a=await fetch(`${e}${s}action=imageLoad`,{method:"POST",body:r,credentials:"include"}),l=await a.json();if(!l.success||!l.data?.content)throw Error(l.message||"Failed to load the image");return(await fetch(l.data.content)).blob()}async blobSize(e){let t=await createImageBitmap(e),i={w:t.width,h:t.height};return t.close(),i}error(e){this.j.e.fire("errorMessage",e.message)}constructor(...e){super(...e),(0,o._)(this,"isProImageEditor",!0)}}},45719:function(e,t,i){"use strict";i(6441).Config.prototype.imageEditorPro={dialog:{width:"90%",height:"90%"}}},98270:function(e,t,i){"use strict";var o=i(82749);i(45719);var n=i(76542),r=i(50911),s=i(2692);class a extends r.Plugin{afterInit(e){let t=n.ProImageEditor,i=s.JoditPro.modules;i.ImageEditorCore||i.ImageEditor===t||(i.ImageEditorCore=i.ImageEditor),i.ImageEditor=t}beforeDestruct(e){}}(0,o._)(a,"requires",["license"]),s.JoditPro.plugins.add("imageEditorPro",a)},12373:function(e,t,i){"use strict";i(25187),i(58858),i(21246),i(49934),i(3115),i(41810),i(61328),i(45632),i(8390),i(57722),i(29528),i(85174),i(90882),i(97068),i(482),i(40650),i(46958),i(98270),i(1050),i(95618),i(74398),i(79850),i(41406),i(47682),i(75554),i(61886),i(19374),i(73098),i(13152)},41113:function(e,t,i){"use strict";var o=i(63643),n=i.n(o),r=i(6441);r.Config.prototype.keyboard={defaultLayoutSet:"en",showLayoutSwitcher:!0,extraKeyGroup:"other",extraKeyButtons:[],delayKeyRepeat:350,periodKeyRepeat:100,layoutList:{en:{title:"English",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},es:{title:"Español",keys:[["º ` ~","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _ |","¡ = +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","ç Ç \\"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ñ Ñ ; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},de:{title:"Deutsch",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 * :","9 ( {","0 ) }","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","z Z","u U","i I","o O","p P","ü Ü [","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ö Ö ;","ä Ä ' \"","Enter"],["Shift","y Y","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},ru:{title:"Русский",keys:[["` ~ ±","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","й Й","ц Ц","у У","к К","е Е","н Н","г Г","ш Ш","щ Щ","з З","х Х [","ъ ] {","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ж Ж ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","ь Ь","б Б ,","ю Ю .","/ ?","Shift"],["Options","Space","Options"]]},tr:{title:"Türkçe",keys:[['" é` ~',"1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 ) }","- _ [","= + ]","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","ı I","o O","p P","ğ Ğ","ü Ü",", \\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ş Ş","i̇ İ","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M","ö Ö <","ç Ç >",". / ?","Shift"],["Options","Space","Options"]]},iw:{title:"Hebrew",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","/ q Q","' w W","ק e E","ר r R","א t T","ט y Y","ו u U","ן i I","ם o O","פ p P","[ {","] }","\\ |"],["Caps","ש a A","ד s S","ג d D","כ f F","ע g G","י h H","ח j J","ל k K","ך l L","ף ; :","' \"","Enter"],["Shift","ז z Z","ס x X","ב c C","ה v V","נ b B","מ n N","צ m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},tata:{title:"Tata",keys:[["һ Һ` ~","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 )","- _","= +","Backspace"],["Tab","й Й","ө Ө","у У","к К","е Е","н Н","г Г","ш Ш","ә Ә","з З","х Х [","ү Ү ]","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ң Ң ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","җ Җ","б Б ,","ю Ю .","ґ Ґ /","Shift"],["Options","Space","Options"]]}},layoutSwitchList:["en","es","de","ru","tr","iw","tata"],keySize:32,layout:[[1,1,1,1,1,1,1,1,1,1,1,1,1,2],[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],[1.8,1,1,1,1,1,1,1,1,1,1,1,2.2],[2.5,1,1,1,1,1,1,1,1,1,1,2.5],[3.5,9,3.5]]},r.Config.prototype.controls.keyboard={tooltip:"Keyboard",icon:n(),isActive:e=>!!e.e.fire("isKeyboardOpened"),command:"toggleKeyboard"},r.Config.prototype.controls.extraKeyboardButtons={}},95618:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(41113);var r=i(25241),s=i(6441),a=i(65478),l=i(27613),c=i(50911),d=i(67510),u=i(41409),h=i(2692);class p extends c.Plugin{afterInit(e){e.registerCommand("toggleKeyboard",this.toggleKeyboard).registerCommand("insertChar",this.insertChar),e.e.on("isKeyboardOpened",()=>this.__keyboard?.isOpened)}insertChar(e,t,i){this.j.s.insertNode(this.j.createInside.text(i))}toggleKeyboard(){if(!this.__keyboard){this.__keyboard=new u.Dialog({toolbarButtonSize:"tiny"});let e=new r.UIKeyboard(this.j);this.__keyboard.setMod("slim",!0).setMod("adaptive",!1).setContent(e);let{showLayoutSwitcher:t,layoutSwitchList:i,layoutList:o}=this.j.o.keyboard;if(t){let t=new d.UISelect(this.__keyboard,{value:e.state.currentLayout,options:i.map(e=>({text:o[e]?.title??e,value:e})),onChange(t){e.state.currentLayout=t}});t.setMod("size","tiny").setMod("width","auto").setMod("variant","outline"),this.__keyboard.setHeader(t)}}this.__keyboard.isOpened?this.__keyboard.close():this.__keyboard.open()}beforeDestruct(e){this.__keyboard?.destruct()}constructor(e){super(e),(0,o._)(this,"hasStyle",!h.JoditPro.fatMode),(0,o._)(this,"buttons",[{group:"insert",name:"keyboard"}]),(0,o._)(this,"__keyboard",void 0);let{extraKeyButtons:t,extraKeyGroup:i}=e.o.keyboard;t.length&&t.forEach((t,o)=>{let n=(0,l.isString)(t)?t:t.key,r=(0,l.isString)(t)||!t.hotkeys?["ctrl+"+(o+1)]:t.hotkeys;e.registerButton({name:"extraKeyboardButtons."+n,group:i});let{extraKeyboardButtons:a}=s.Config.defaultOptions.controls;a[n]={name:n,tooltip:n,args:[n],hotkeys:r,command:"insertChar"}})}}(0,o._)(p,"requires",["license"]),(0,n.__decorate)([a.autobind],p.prototype,"insertChar",null),(0,n.__decorate)([a.autobind],p.prototype,"toggleKeyboard",null),h.JoditPro.plugins.add("keyboard",p)},25241:function(e,t,i){"use strict";i.d(t,{UIKeyboard:function(){return y}});var o=i(82749),n=i(31635),r=i(82758),s=i(65478),a=i(43555),l=i(67510),c=i(27926),d=i.n(c),u=i(10690),h=i.n(u),p=i(91997),f=i.n(p),m=i(11699),g=i.n(m),b=i(98126),v=i.n(b);class y extends l.UIElement{className(){return"UIKeyboard"}render(){let{layout:e,keySize:t}=this.j.options.keyboard,i=e.length;return`<div>${(()=>{let o=[];for(let n=0;i>n;n+=1){let i=[];for(let o=0;o<e[n].length;o+=1)i.push(`<div style="width:${t*e[n][o]}px;height:${t}px;" class="&__key"></div>`);o.push(`<div class='&__row'>${i.join(`
606
618
  `)}</div>`)}return o.join(`
607
619
  `)})()}</div>`}onStateChange(){let{currentLayout:e,options:t,shift:i,caps:o}=this.state,{keys:n}=this.j.o.keyboard.layoutList[e],r=0;for(let e=0;e<n.length;e+=1)for(let s=0;s<n[e].length;s+=1){let a=n[e][s].split(" "),l=a[0];i&&(l=a[1]),!i&&o&&a[1]&&y.isLetter(a[0])&&(l=a[1]),t&&(l=a[2]),this.setKeyValue(r,l??a[0]),r+=1}}static isLetter(e){return e.toLowerCase()!==e.toUpperCase()}setKeyValue(e,t){let i=this._keys[e];if(!i)return;let o=!1,{options:n,shift:r,caps:s}=this.state;switch(t){case"Caps":o=s;break;case"Options":o=n;break;case"Shift":o=r}i.innerHTML=y.decorate(t),i.classList.toggle(this.getFullElName("key","active",!0),o),(0,a.attr)(i,"-key",t)}onKeyUp(){this.pressed&&this.stopPress()}onReady(){this.j.e.on(this.getElms("key"),"mouseenter",this.stopPress)}stopPress(){this.pressed&&(this.pressed=!1,this.j.async.clearTimeout(this.reKeyDownTimeout),this._keys.forEach(e=>{e.classList.remove(this.getFullElName("key","pressed",!0))}))}onKeyDown(e,t=0){let i=e.target;if(!i||!i.classList.contains(this.getFullElName("key")))return!1;this.pressed=!0,i.classList.add(this.getFullElName("key","pressed",!0));let o=(0,a.attr)(i,"-key");switch(o){case"Caps":this.state.caps=!this.state.caps;break;case"Shift":this.state.shift=!this.state.shift;break;case"Options":this.state.options=!this.state.options;break;case"Enter":case"Backspace":this.j.e.fire("keydown",{key:o,preventDefault(){}});break;case"Space":case"Tab":this.j.s.insertNode(this.j.createInside.text(r.NBSP_SPACE));break;default:this.state.shift&&(this.state.shift=!1),o&&this.j.s.insertNode(this.j.createInside.text(o))}let{periodKeyRepeat:n,delayKeyRepeat:s}=this.j.o.keyboard;return this.reKeyDownTimeout=this.j.async.setTimeout(()=>this.onKeyDown(e,n),t||s),!1}static decorate(e){switch(e){case"Space":return"";case"Enter":return l.Icon.get("enter");case"Backspace":return d();case"Shift":return g();case"Caps":return h();case"Options":return f();case"Tab":return v();default:return e}}constructor(e){super(e),(0,o._)(this,"state",{caps:!1,shift:!1,options:!1,currentLayout:this.j.o.keyboard.defaultLayoutSet}),(0,o._)(this,"_keys",this.getElms("key")),(0,o._)(this,"pressed",!1),(0,o._)(this,"reKeyDownTimeout",0),this.onStateChange()}}(0,n.__decorate)([(0,s.watch)(["state.currentLayout","state.options","state.shift","state.caps"])],y.prototype,"onStateChange",null),(0,n.__decorate)([(0,s.watch)(["ow:mouseup"])],y.prototype,"onKeyUp",null),(0,n.__decorate)([(0,s.hook)("ready")],y.prototype,"onReady",null),(0,n.__decorate)([s.autobind],y.prototype,"stopPress",null),(0,n.__decorate)([(0,s.watch)(["container:mousedown","container:touchstart"])],y.prototype,"onKeyDown",null),y=(0,n.__decorate)([s.component],y)},38882:function(e,t,i){"use strict";i.d(t,{isAllowedSubdomain:function(){return n},validateLicense:function(){return function e(t,i){var o;let r;if(o=t=(t+"").toUpperCase().replace(/[‐-―−]/g,"-").replace(/\s+/g,"").replace(/[^A-Z0-9-]/g,"R"),/[A-Z0-9][013456][A-P0-9]{2}[ABC]-([0-3])[ELPDF][E-L4-8]{2}\1-[A-D][R0][J-P5-6]{3}-[DPGHYE][GFPOD]{3}[A-SX-Z]/.test(o)||n(i))return!0;let s=(r=i.split(".")).map(e=>{let t=e[0];return"string"==typeof t&&t.charCodeAt(0)?String.fromCharCode(t.charCodeAt(0)+1):t}).concat(r.map(e=>{let t=e[e.length-1];return"string"==typeof t&&t.charCodeAt(0)?String.fromCharCode(t.charCodeAt(0)-1):t})).map(e=>null!=e&&/\w/.test(e)?e:"r"),a=["[A-F013456][A-F0-9]{3}{part}","([0-3]){part}[E-L4-8]{2}\\1","[A-D]{part}[J-P5-6]{3}","{part}[A-R0-9]{3}[X-Z]"].map((e,t)=>e.replace("{part}",s[t]||"[R-T]"));if(RegExp(`^${a.join("-")}$`,"i").test(t))return!0;if(t.substring(12,13)!==(typeof!i).toUpperCase()[5])return!1;let l=i.split(".");return l.shift(),l.length>1&&e(t,l.join("."))}}});let o=["*127.0.0.*","*localhost*","*simple*","staging.","*.dev.","*.test.","*.stg.","stg.*","test.*","beta.*","*demo.*","*test.*","acceptatie.*"];function n(e){return o.some(t=>new RegExp(t.replace(/\*/g,"%ANY%").replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&").replace(/%ANY%/g,".*")).test(e))}},21246:function(e,t,i){"use strict";i.d(t,{license:function(){return d}});var o=i(38882),n=i(82758),r=i(2748),s=i(87612),a=i(70799),l=i(20356),c=i(2692);class d extends l.Plugin{static make(e){return new d(e)}afterInit(e){this.j.e.on("checkReserve",async e=>{let t=this.j.o.license;if((0,o.isAllowedSubdomain)(e))return"normal";if(!t||!(0,a.isString)(t))return"";let i=(0,o.validateLicense)(t,e);return i||n.IS_TEST||(i=await this.validateLicenseRemote(t,e)),i?"normal":""})}beforeDestruct(e){}async validateLicenseRemote(e,t){let i="validateJoditLicenseRemote",n=this.j.storage.get(i);if(n&&(0,o.validateLicense)(n,t))return!0;let a=document.createElement("script");return a.src=`https://xdsoft.net/jodit/pro/api/licenses/validate/?code=${encodeURIComponent(e)}&host=${encodeURIComponent(t)}`,this.j.async.promise(e=>{let n=!1,l=t=>{n||(n=!0,r.Dom.safeRemove(a),e(t))};window.onJoditResolveKeyCode=e=>{if((0,s.isBoolean)(e))return l(e);(0,o.validateLicense)(e,t)?(this.j.storage.set(i,e),l(!0)):l(!1)},a.onerror=()=>l(!0),document.body.appendChild(a),this.j.async.setTimeout(()=>l(!0),5e3)})}}c.JoditPro.plugins.add("license",d)},29606:function(e,t,i){"use strict";var o=i(27222),n=i.n(o),r=i(6441),s=i(29807),a=i(86583);r.Config.prototype.mobileView={mode:"default"};let l="buttonmobileSView",c="buttonmobileCView";r.Config.prototype.controls.mobileView={tooltip:"Mobile View",icon:n(),command:"mobileView",isActive:e=>(0,a.dataBind)(e,c)&&"default"!==(0,a.dataBind)(e,c),isChildActive(e,t){let i=t.control?.args?.[0];return(0,s.isNumeric)(i)&&(i=Number(i)),((0,a.dataBind)(e,c)||"default")===i},exec:e=>!!(0,a.dataBind)(e,l)&&void e.execCommand("mobileView",!1,(0,a.dataBind)(e,l)),childExec(e,t,{button:i}){let o=i.control?.args?.[0];e.execCommand("mobileView",!1,(0,s.isNumeric)(o)?Number(o):o)},list:{default:"Default",375:"iPhone SE",414:"iPhone XR",390:"iPhone 12 Pro",393:"Pixel 5",820:"iPad Air"}},i.d(t,["dataBindCurrentKey",0,c,"dataBindStoredKey",0,l])},74398:function(e,t,i){"use strict";var o=i(82749),n=i(31635),r=i(29606),s=i(65478),a=i(43555),l=i(50911),c=i(2692);class d extends l.Plugin{className(){return"MobileView"}afterInit(e){e.registerCommand("mobileView",{exec:(t,i,o)=>{this.__currentMode===o&&(o="default"),this.__currentMode=o,(0,a.dataBind)(e,r.dataBindCurrentKey,o),"default"!==this.__currentMode&&(0,a.dataBind)(e,r.dataBindStoredKey,o),"default"===o?(0,a.css)(this.jodit.currentPlace.slots.center,{width:null,margin:null}):(0,a.css)(this.j.currentPlace.slots.center,{width:o,margin:"0 auto"})}}),e.events.on("beforeSetMode",()=>{})}__beforeSetMode(){"default"!==this.__currentMode&&this.j.execCommand("mobileView",!1,"default")}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"mobileView",group:"state"}]),(0,o._)(this,"__currentMode","default")}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([(0,s.watch)(":beforeSetMode.mobileView")],d.prototype,"__beforeSetMode",null),d=(0,n.__decorate)([s.component],d),c.JoditPro.plugins.add("mobileView",d)},13109:function(e,t,i){"use strict";var o=i(17405),n=i.n(o),r=i(64889),s=i(6441);s.Config.prototype.pageBreak={separator:'<div style="page-break-before: always"></div>'},s.Config.prototype.controls.pageBreak={tooltip:"Insert page break",icon:n(),command:"insertPageBreak"},s.Config.prototype.iframeStyle=`${s.Config.prototype.iframeStyle};${r.default.replace(/[\n\t]/g,"")}`},64889:function(e,t){"use strict";t.default=`[data-jodit-page-break] {
608
620
  display: flex;
@@ -643,7 +655,7 @@ ${r}`.trim();i?await this.__executeQuickCommandSilent(l,r):await this.__executeQ
643
655
  <div class='&__list &__target-list'></div>
644
656
  </div>`}__onSwap(){let e=this.state.sourceLang;this.state.sourceLang=this.state.targetLang,this.state.targetLang=e,this.__sourceList.state.active=this.state.sourceLang,this.__targetList.state.active=this.state.targetLang,this.options.onChange({...this.state})}constructor(e,t,i){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__sourceList",void 0),(0,o._)(this,"__targetList",void 0),this.state=t,this.options=i,this.__sourceList=new a.UITranslateList(e,{list:i.sourceList,active:t.sourceLang,onChange:e=>{this.state.sourceLang=e,this.options.onChange({...this.state})}}),this.getElm("source-list")?.appendChild(this.__sourceList.container),this.__targetList=new a.UITranslateList(e,{list:i.targetList,active:t.targetLang,onChange:e=>{this.state.targetLang=e,this.options.onChange({...this.state})}}),this.getElm("target-list")?.appendChild(this.__targetList.container)}}(0,n.__decorate)([(0,r.watch)("arrow-swap:click")],l.prototype,"__onSwap",null),l=(0,n.__decorate)([r.component],l)},8256:function(e,t,i){"use strict";var o=i(6441),n=i(22732),r=i(21537);let s=["tune.up","tune.remove","tune.down"],a=["tune.h1","tune.h2","tune.h3",`
645
657
  `,"tune.h4","tune.h5","tune.h6",`
646
- `,...s];function l(e){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><text dominant-baseline="text-before-edge" style="font: 45px sans-serif" x="0" y="0">'+e.toUpperCase()+"</text></svg>",isActive:(t,i)=>i?.target?.tagName.toLowerCase()===e,exec(t,i){if(i){t.selection.save();let o=n.Dom.replace(i,e,t.createInside);t.selection.restore(),t.e.fire("synchro"),t.e.fire("afterExecTune.tune",o)}return!0}}}function c(e){let t=e?"previousSibling":"nextSibling";return{icon:e?"angle-up":"angle-down",isDisabled:(e,i)=>!i?.target?.[t],exec(i,o){let s=o?.[t];return o&&s&&(i.selection.save(),(0,r.call)(e?n.Dom.before:n.Dom.after,s,o),i.selection.restore()),i.e.fire("synchro"),i.e.fire("afterExecTune.tune"),!0}}}o.Config.prototype.tuneBlock={popup:{p:s,table:s,img:s,blockquote:s,div:s,pre:["tune.editPre",...s],h1:a,h2:a,h3:a,h4:a,h5:a,h6:a}},o.Config.prototype.controls.tune={h1:l("h1"),h2:l("h2"),h3:l("h3"),h4:l("h4"),h5:l("h5"),h6:l("h6"),up:c(!0),down:c(!1),editPre:{icon:"pencil",exec(e,t){e.e.fire("editPreInPasteCode",t)}},remove:{icon:"bin",exec(e,t){n.Dom.safeRemove(t),e.e.fire("synchro"),e.e.fire("closeTuner.tune"),e.e.fire("hideTuner.tune")}}}},13152:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(8256);var r=i(40104),s=i(65478),a=i(50911),l=i(2692);class c extends a.Plugin{afterInit(e){this.tuner=new r.UITuner(e)}hideTuner(){this.tuner.hide()}onChangeSelection(){this.j.s.isCollapsed()||this.hideTuner()}onClickInBlock(e){this.j.s.isCollapsed()&&this.tuner.show()}beforeDestruct(e){this.tuner.destruct()}constructor(...e){super(...e),(0,o._)(this,"tuner",void 0)}}(0,o._)(c,"requires",["license"]),(0,n.__decorate)([(0,s.watch)(":outsideClick :keydown")],c.prototype,"hideTuner",null),(0,n.__decorate)([(0,s.watch)("j.ed:selectionchange"),(0,s.debounce)()],c.prototype,"onChangeSelection",null),(0,n.__decorate)([(0,s.watch)(":click")],c.prototype,"onClickInBlock",null),l.JoditPro.plugins.add("tune-block",c)},40104:function(e,t,i){"use strict";i.d(t,{UITuner:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(22732),a=i(21537),l=i(67510),c=i(21491);class d extends l.UIElement{className(){return"UITuner"}render(){return`<div>
658
+ `,...s];function l(e){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><text dominant-baseline="text-before-edge" style="font: 45px sans-serif" x="0" y="0">'+e.toUpperCase()+"</text></svg>",isActive:(t,i)=>i?.target?.tagName.toLowerCase()===e,exec(t,i){if(i){t.selection.save();let o=n.Dom.replace(i,e,t.createInside);t.selection.restore(),t.e.fire("synchro"),t.e.fire("afterExecTune.tune",o)}return!0}}}function c(e){let t=e?"previousSibling":"nextSibling";return{icon:e?"angle-up":"angle-down",isDisabled:(e,i)=>!i?.target?.[t],exec(i,o){let s=o?.[t];return o&&s&&(i.selection.save(),(0,r.call)(e?n.Dom.before:n.Dom.after,s,o),i.selection.restore()),i.e.fire("synchro"),i.e.fire("afterExecTune.tune"),!0}}}o.Config.prototype.tuneBlock={popup:{p:s,table:s,img:s,blockquote:s,div:s,figure:s,pre:["tune.editPre",...s],h1:a,h2:a,h3:a,h4:a,h5:a,h6:a}},o.Config.prototype.controls.tune={h1:l("h1"),h2:l("h2"),h3:l("h3"),h4:l("h4"),h5:l("h5"),h6:l("h6"),up:c(!0),down:c(!1),editPre:{icon:"pencil",exec(e,t){e.e.fire("editPreInPasteCode",t)}},remove:{icon:"bin",exec(e,t){n.Dom.safeRemove(t),e.e.fire("synchro"),e.e.fire("closeTuner.tune"),e.e.fire("hideTuner.tune")}}}},13152:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(8256);var r=i(40104),s=i(65478),a=i(50911),l=i(2692);class c extends a.Plugin{afterInit(e){this.tuner=new r.UITuner(e)}hideTuner(){this.tuner.hide()}onChangeSelection(){this.j.s.isCollapsed()||this.hideTuner()}onClickInBlock(e){this.j.s.isCollapsed()&&this.tuner.show()}beforeDestruct(e){this.tuner.destruct()}constructor(...e){super(...e),(0,o._)(this,"tuner",void 0)}}(0,o._)(c,"requires",["license"]),(0,n.__decorate)([(0,s.watch)(":outsideClick :keydown")],c.prototype,"hideTuner",null),(0,n.__decorate)([(0,s.watch)("j.ed:selectionchange"),(0,s.debounce)()],c.prototype,"onChangeSelection",null),(0,n.__decorate)([(0,s.watch)(":click")],c.prototype,"onClickInBlock",null),l.JoditPro.plugins.add("tune-block",c)},40104:function(e,t,i){"use strict";i.d(t,{UITuner:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(22732),a=i(21537),l=i(67510),c=i(21491);class d extends l.UIElement{className(){return"UITuner"}render(){return`<div>
647
659
  <div class='&__handle' title='~Click to tune~'/>
648
660
  </div>`}show(){let e=this.j.s.current();if(!e)return this.hide();let t=s.Dom.isBlock(e)?e:s.Dom.closest(e,e=>!!(e&&this.j.o.tuneBlock.popup[e.nodeName.toLowerCase()]),this.j.editor);if(!t||t===this.j.editor||!this.j.o.tuneBlock.popup[t.tagName.toLowerCase()])return this.hide();this.currentBlock=t,this.isShown=!0,this.closeToolbar(),this.calcPosition(),this.container.parentNode||this.j.workplace.append(this.container)}hide(){this.isShown&&(this.isShown=!1,s.Dom.safeRemove(this.container),this.closeToolbar())}onEditorScroll(){this.isShown&&this.calcPosition()}calcPosition(){let e=(0,a.css)(this.j.editor,"marginLeft"),t=(0,a.css)(this.j.editor,"paddingLeft"),i=(0,a.css)(this.j.editor,"marginTop"),o=this.currentBlock.offsetWidth-15+e+t,n=this.currentBlock.offsetTop-this.j.editor.scrollTop+i;(0,a.css)(this.container,{transform:`translate3d(${o}px, ${n}px, 0)`}),this.popup.isOpened&&this.popup.updatePosition()}onAfterExecTune(e){e&&(this.currentBlock=e),this.calcPosition(),this.openToolbar()}onClickPrevent(e){e.preventDefault(),e.stopPropagation()}onTargetClick(){this.toggleToolbar()}openToolbar(){if(this.setMod("opened",!0),this.toolbar.build(this.j.o.tuneBlock.popup[this.currentBlock.tagName.toLowerCase()],this.currentBlock),this.popup.setContent(this.toolbar.container),!this.popup.isOpened){let e=this.getElm("handle");(0,a.assert)(null!=e,"Handle element does not exist"),this.popup.open(()=>(0,a.position)(e))}}closeToolbar(){this.setMod("opened",!1),this.popup.close()}toggleToolbar(){this.getMod("opened")?this.closeToolbar():this.openToolbar()}constructor(...e){super(...e),(0,o._)(this,"isShown",!1),(0,o._)(this,"toolbar",(0,c.makeCollection)(this.j,this)),(0,o._)(this,"popup",new l.Popup(this.j,!1)),(0,o._)(this,"currentBlock",void 0)}}(0,n.__decorate)([(0,r.watch)(":hideTuner.tune")],d.prototype,"hide",null),(0,n.__decorate)([(0,r.watch)("j.editor:scroll"),(0,r.throttle)(10)],d.prototype,"onEditorScroll",null),(0,n.__decorate)([(0,r.watch)(":afterExecTune.tune"),(0,r.idle)()],d.prototype,"onAfterExecTune",null),(0,n.__decorate)([(0,r.watch)("container:click container:mousedown")],d.prototype,"onClickPrevent",null),(0,n.__decorate)([(0,r.watch)("handle:click")],d.prototype,"onTargetClick",null),(0,n.__decorate)([(0,r.watch)(":closeTuner.tune")],d.prototype,"closeToolbar",null),d=(0,n.__decorate)([r.component],d)},18549:function(e,t,i){"use strict";i.d(t,{UIFlightPosition:function(){return r}});var o=i(2748);let n=new WeakMap;class r{static install(e,t,i={}){this.remove(e);let{panelHeight:o=250,containerClassName:r,toolbarSelector:s=".jodit-toolbar__box",gap:a=16}=i,l=e.j.c.div("jodit-flight-position");r&&l.classList.add(r),l.style.setProperty("--flight-panel-height",`${o}px`),l.appendChild(e.container),document.body.appendChild(l);let c={toolbarSelector:s,gap:a},d=()=>{this.updatePosition(l,t,c)},u=new ResizeObserver(d);u.observe(t),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d,{passive:!0}),n.set(e,{container:l,anchor:t,onScroll:d,resizeObserver:u,options:c}),this.updatePosition(l,t,c)}static updatePosition(e,t,i){let{toolbarSelector:o,gap:n}=i,r=t.getBoundingClientRect(),s=window.innerHeight,a=e.offsetHeight||250;e.style.left=`${r.left}px`,e.style.width=`${r.width}px`;let l=t.querySelector(o),c=l?l.getBoundingClientRect().bottom:r.top,d=r.bottom-c,u=r.bottom<=s;a<=d?u?(e.style.top="auto",e.style.bottom=`${s-r.bottom+n}px`):(e.style.top="auto",e.style.bottom=`${n}px`):(e.style.bottom="auto",e.style.top=`${c}px`)}static remove(e){let t=n.get(e);t&&(window.removeEventListener("scroll",t.onScroll),window.removeEventListener("resize",t.onScroll),t.resizeObserver.disconnect(),e.container.parentNode===t.container&&t.container.parentNode?.insertBefore(e.container,t.container),o.Dom.safeRemove(t.container),n.delete(e))}static isInstalled(e){return n.has(e)}static setPanelHeight(e,t){let i=n.get(e);i&&i.container.style.setProperty("--flight-panel-height",`${t}px`)}static refresh(e){let t=n.get(e);t&&this.updatePosition(t.container,t.anchor,t.options)}}},54747:function(e,t,i){"use strict";i.d(t,{UIResize:function(){return r}});var o=i(2748),n=i(41180);class r{static remove(e){e.container.classList.remove("jodit-ui-resize"),o.Dom.safeRemove(e.container.querySelector(".jodit-ui-resize__handle"))}static install(e,t,i={}){e.container.classList.add("jodit-ui-resize"),"static"===(0,n.css)(e.container,"position")&&(0,n.css)(e.container,"position","relative");let o=e.j.c.div("jodit-ui-resize__handle");o.classList.add("jodit-ui-resize__handle_type_"+t),i.handleClassName&&o.classList.add(i.handleClassName),e.container.appendChild(o),e.j.e.on(o,"mousedown touchstart",this.onStartResize.bind(this,e,t,i.onResize??(()=>void 0)))}static onStartResize(e,t,i,o){let n={x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight,direction:t},r=e.j.async.throttle(this.onResize.bind(this,e,n,i),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",r).one(e.j.ow,"mouseup touchend",this.onEndResize.bind(this,e,r))}static onResize(e,t,i,o){let r,s=["left","right"].includes(t.direction),a=e.container.parentElement;a&&(r=s?t.w+(o.clientX-t.x)*("right"===t.direction?1:-1):t.h+(o.clientY-t.y)*("top"===t.direction?-1:1),!0!==i?.({newSize:r})&&(0,n.css)(e.container,s?"width":"height",r/(s?a.offsetWidth:a.offsetHeight)*100+"%"))}static onEndResize(e,t,i){e.j.e.off(e.j.ow,"mousemove touchmove",t),e.j.unlock()}}},36469:function(e,t,i){"use strict";i.d(t,{UISelectItems:function(){return r}});var o=i(2748),n=i(41180);class r{static remove(e){o.Dom.safeRemove(e.container.querySelector(".jodit-ui-select-items")),e.j.e.off(e.container,"mousedown.uiselectitems touchstart.uiselectitems")}static install(e){let t=e.j.c.div("jodit-ui-select-items");e.j.e.on(e.container,"mousedown.uiselectitems touchstart.uiselectitems",this.onStartSelect.bind(this,e,t))}static onStartSelect(e,t,i){if(i.target!==e.container)return;(0,n.css)(t,{width:0,height:0}),e.container.appendChild(t);let o={x:i.clientX,y:i.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight},r=e.j.async.throttle(this.onSelect.bind(this,e,t,o),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",r).one(e.j.ow,"mouseup touchend",this.onEndSelect.bind(this,e,t,r)),e.onSelectItems({left:o.x,top:o.y,width:0,height:0})}static onSelect(e,t,i,o){let r={left:i.x>o.clientX?o.clientX:i.x,top:i.y>o.clientY?o.clientY:i.y,width:Math.abs(i.x-o.clientX),height:Math.abs(i.y-o.clientY)};(0,n.css)(t,r),e.onSelectItems(r)}static onEndSelect(e,t,i,n){o.Dom.safeRemove(t),e.j.e.off(e.j.ow,"mousemove touchmove",i),e.j.unlock()}}},41324:function(t){"use strict";t.exports=e},85013:function(e,t,i){"use strict";function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{ImageEditor:function(){return eV}});try{if("u">typeof document){var n=document.createElement("style");n.appendChild(document.createTextNode(`/*
649
661
  * Jodit Image Editor — design system & layout.
@@ -1428,9 +1440,9 @@ ${r}`.trim();i?await this.__executeQuickCommandSilent(l,r):await this.__executeQ
1428
1440
  width: 22px;
1429
1441
  height: 22px;
1430
1442
  }
1431
- }`)),document.head.appendChild(n)}}catch(e){}let r=Object.freeze([{label:"Arial",value:"Arial, Helvetica, sans-serif"},{label:"Helvetica",value:"Helvetica, Arial, sans-serif"},{label:"Verdana",value:"Verdana, Geneva, sans-serif"},{label:"Tahoma",value:"Tahoma, Geneva, sans-serif"},{label:"Trebuchet MS",value:'"Trebuchet MS", Helvetica, sans-serif'},{label:"Times New Roman",value:'"Times New Roman", Times, serif'},{label:"Georgia",value:'Georgia, "Times New Roman", serif'},{label:"Courier New",value:'"Courier New", Courier, monospace'},{label:"Impact",value:"Impact, Haettenschweiler, sans-serif"}]),s=Object.freeze({brightness:0,contrast:0,saturation:0,warmth:0,blur:0}),a=Object.freeze(["#ffffff","#1a1a1a","#9e9689","#4a90e2","#54b98a","#f2c94c","#eb5757","#a29bfe","#8b5cf6","#f178b6","#f2994a","#b8e454","#7ec8f0","#5b6470","#d8d2c8","#eeeeee"]);function l(){return{flip:{horizontal:!1,vertical:!1},rotate:0,angle:0,crop:null,resize:null,finetune:{...s},filter:"original",annotations:[],focus:null}}function c(){return{source:null,status:"idle",busyVisible:!1,error:null,activeTab:"adjust",activeTool:"crop",zoom:1,history:{entries:[l()],index:0},selectedAnnotationId:null,theme:"light",showToolbar:!0,locale:"en",minCropSize:8,minResizeSize:1,palette:[...a],fonts:r.map(e=>({...e})),activePopover:null,viewport:null}}function d(e){let t=e.entries[e.index];if(void 0===t)throw RangeError(`history index ${e.index} is out of bounds`);return t}function u(e,t){let i=e.entries.slice(0,e.index+1);i.push(t);let o=Math.max(0,i.length-100),n=o>0?i.slice(o):i;return{entries:n,index:n.length-1}}function h(e,t){let i=Math.min(Math.max(t,0),e.entries.length-1);return i===e.index?e:{...e,index:i}}function p(e,t){var i,o,n,r,s,a;let c=e;if(void 0!==t.activeTab&&(c=f(c,{activeTab:t.activeTab})),void 0!==t.activeTool&&(c=f(c,{activeTool:t.activeTool})),void 0!==t.zoom&&(c=f(c,{zoom:!Number.isFinite(r=t.zoom)||r<=0?1:Math.min(Math.max(r,.01),64)})),void 0!==t.theme&&(c=f(c,{theme:t.theme})),void 0!==t.showToolbar&&(c=f(c,{showToolbar:t.showToolbar})),void 0!==t.locale&&(c=f(c,{locale:t.locale})),void 0!==t.minCropSize&&(c=f(c,{minCropSize:Math.max(1,t.minCropSize)})),void 0!==t.minResizeSize&&(c=f(c,{minResizeSize:Math.max(1,t.minResizeSize)})),void 0!==t.palette&&(c=f(c,{palette:t.palette})),void 0!==t.fonts&&(c=f(c,{fonts:t.fonts})),void 0!==t.activePopover&&(c=f(c,{activePopover:t.activePopover})),void 0!==t.status&&(c=f(c,{status:t.status}),"exporting"!==t.status&&c.busyVisible&&(c=f(c,{busyVisible:!1}))),void 0!==t.busyVisible&&(c=f(c,{busyVisible:t.busyVisible})),void 0!==t.error&&(c=f(c,{error:t.error})),void 0!==t.source&&(c=f(c,{source:t.source})),void 0!==t.viewport&&(c=f(c,{viewport:t.viewport})),void 0!==t.selectedAnnotationId&&(c=f(c,{selectedAnnotationId:t.selectedAnnotationId})),t.resetHistory&&(c=f(c,{history:{entries:[l()],index:0}})),t.resetDesign&&(c=f(c,{history:u(c.history,l())})),void 0!==t.design){let e,o=(s=d(c.history),a=t.design,{...s,...a,flip:a.flip?{...s.flip,...a.flip}:s.flip,finetune:a.finetune?{...s.finetune,...a.finetune}:s.finetune,rotate:void 0!==a.rotate?(90*Math.round(a.rotate/90)%360+360)%360:s.rotate}),n=!1===t.commit?((e=(i=c.history).entries.slice())[i.index]=o,{entries:e,index:i.index}):u(c.history,o);c=f(c,{history:n})}if(void 0!==t.history){let e=t.history,i="step"in e?(o=c.history,n=e.step,h(o,o.index+n)):h(c.history,e.index);c=f(c,{history:i})}return c}function f(e,t){for(let i of Object.keys(t))if(e[i]!==t[i])return{...e,...t};return e}class m{request(e){this.pending=e,null===this.handle&&(this.handle=this.schedule(()=>this.flush()))}flush(){null!==this.handle&&(this.clear(this.handle),this.handle=null);let e=this.pending;this.pending=null,e&&e()}cancel(){null!==this.handle&&(this.clear(this.handle),this.handle=null),this.pending=null}constructor(e,t){o(this,"pending",null),o(this,"handle",null),this.schedule=e,this.clear=t}}class g{request(e){this.pending=e,this.flush()}flush(){let e=this.pending;this.pending=null,e&&e()}cancel(){this.pending=null}constructor(){o(this,"pending",null)}}class b{getState(){return this.state}update(e){let t=this.reducer(this.state,e);return t!==this.state&&(this.state=t,this.scheduler.request(()=>this.notify())),this.state}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}flush(){this.scheduler.flush()}destroy(){this.scheduler.cancel(),this.listeners.clear()}notify(){if(!this.notifying){this.notifying=!0;try{for(let e of this.listeners)e(this.state)}finally{this.notifying=!1}}}constructor(e={}){o(this,"state",void 0),o(this,"reducer",void 0),o(this,"scheduler",void 0),o(this,"listeners",new Set),o(this,"notifying",!1),this.state=e.initialState??c(),this.reducer=e.reducer??p,this.scheduler=e.scheduler??new g}}function v(e,t,i){return Math.min(Math.max(e,t),i)}function y(e,t){let i=v(e.width,1,t.width),o=v(e.height,1,t.height);return{x:v(e.x,0,t.width-i),y:v(e.y,0,t.height-o),width:i,height:o}}function w(e){return d(e.history)}function _(e){return"adjust"===e.activeTab&&"crop"===e.activeTool}function k(e){let t=w(e);return _(e)?{...t,crop:null,angle:0}:t}function C(e){return e.history.index>0}function S(e){var t;return(t=e.history).index<t.entries.length-1}function x(e){return e.history.index>0||e.history.entries.length>1}function I(e){if(!e.source)return null;let t=w(e),{width:i,height:o}=e.source;return 90===t.rotate||270===t.rotate?{width:o,height:i}:{width:i,height:o}}function E(e){let t=w(e);return t.resize?t.resize:t.crop?{width:Math.round(t.crop.width),height:Math.round(t.crop.height)}:I(e)}function T(e){return _(e)?I(e):E(e)}function j(e){let t,i,o,n=T(e);if(!n||!e.viewport)return null;let r={width:Math.max(1,e.viewport.width-88),height:Math.max(1,e.viewport.height-88)},s=(t=Math.min(r.width/n.width,r.height/n.height)||0,i=n.width*t,o=n.height*t,{scale:t,width:i,height:o,offsetX:(r.width-i)/2,offsetY:(r.height-o)/2}).scale*e.zoom,a=n.width*s,l=n.height*s;return{scale:s,width:a,height:l,offsetX:(e.viewport.width-a)/2,offsetY:(e.viewport.height-l)/2,content:n}}function D(e){return w(e).angle}function A(e){let t=w(e);if(t.crop)return t.crop;let i=I(e);return i?{x:0,y:0,width:i.width,height:i.height}:null}let P=Object.freeze(Object.defineProperty({__proto__:null,VIEWPORT_PADDING:44,selectCanRedo:S,selectCanUndo:C,selectCropAngle:D,selectDesign:w,selectEffectiveCrop:A,selectIsCropping:_,selectIsDirty:x,selectOrientedSize:I,selectOutputSize:E,selectPreviewContentSize:T,selectPreviewDesign:k,selectViewportFit:j},Symbol.toStringTag,{value:"Module"})),M=Math.PI/180,L={nw:[-1,-1],ne:[1,-1],sw:[-1,1],se:[1,1]};function R(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function z(e,t,i,o){let n=R(e),r=t*M,s=Math.cos(r),a=Math.sin(r),l=i*e.width/2,c=o*e.height/2;return{x:n.x+l*s-c*a,y:n.y+l*a+c*s}}function B(e,t,i,o){return Math.atan2(o-t,i-e)/M}function N(e,t,i){F(e,"width"),F(t,"height");let o=e*t*4;if(i&&i.length!==o)throw RangeError(`data length ${i.length} does not match ${e}x${t} (${o})`);return{width:e,height:t,data:i??new Uint8ClampedArray(o)}}function O(e,t,i){return(i*e.width+t)*4}function F(e,t){if(!Number.isInteger(e)||e<=0)throw RangeError(`${t} must be a positive integer, got ${e}`)}function H(e,t){let i=N(e.width,e.height),{width:o,height:n}=e;for(let r=0;r<n;r++)for(let s=0;s<o;s++)V(e,O(e,"horizontal"===t?o-1-s:s,"vertical"===t?n-1-r:r),i,O(i,s,r));return i}function U(e,t){let i=Math.max(1,Math.round(t.width)),o=Math.max(1,Math.round(t.height));if(i===e.width&&o===e.height)return N(i,o,new Uint8ClampedArray(e.data));let n=e;for(;n.width>=2*i;)n=function(e){let t=Math.ceil(e.width/2),i=N(t,e.height);for(let o=0;o<e.height;o++)for(let n=0;n<t;n++){let t=O(e,2*n,o),r=O(e,Math.min(2*n+1,e.width-1),o),s=O(i,n,o);for(let o=0;o<4;o++)i.data[s+o]=(e.data[t+o]+e.data[r+o])/2}return i}(n);for(;n.height>=2*o;)n=function(e){let t=Math.ceil(e.height/2),i=N(e.width,t);for(let o=0;o<t;o++)for(let t=0;t<e.width;t++){let n=O(e,t,2*o),r=O(e,t,Math.min(2*o+1,e.height-1)),s=O(i,t,o);for(let t=0;t<4;t++)i.data[s+t]=(e.data[n+t]+e.data[r+t])/2}return i}(n);return n.width===i&&n.height===o?N(i,o,new Uint8ClampedArray(n.data)):function(e,t,i){let o=N(t,i),n=e.width/t,r=e.height/i;for(let u=0;u<i;u++){let i=(u+.5)*r-.5,h=Math.floor(i),p=i-h,f=W(h,e.height),m=W(h+1,e.height);for(let i=0;i<t;i++){let t=(i+.5)*n-.5,r=Math.floor(t),h=t-r,g=W(r,e.width),b=W(r+1,e.width),v=O(e,g,f),y=O(e,b,f),w=O(e,g,m),_=O(e,b,m),k=O(o,i,u);for(let t=0;t<4;t++){var s,a,l,c,d;let i=(s=e.data[v+t],a=e.data[y+t],s+(a-s)*h),n=(l=e.data[w+t],c=e.data[_+t],l+(c-l)*h);o.data[k+t]=(d=i)+(n-d)*p}}}return o}(n,i,o)}function V(e,t,i,o){i.data[o]=e.data[t],i.data[o+1]=e.data[t+1],i.data[o+2]=e.data[t+2],i.data[o+3]=e.data[t+3]}function W(e,t){return e<0?0:e>=t?t-1:e}function $(e,t){let i=N(e.width,e.height,new Uint8ClampedArray(e.data));for(let e=0;e<i.data.length;e+=4)i.data[e]=t(i.data[e],0),i.data[e+1]=t(i.data[e+1],1),i.data[e+2]=t(i.data[e+2],2);return i}function K(e,t){if(0===t)return ee(e);let i=t/100*255;return $(e,e=>e+i)}function G(e,t){if(0===t)return ee(e);let i=t/100*255,o=259*(i+255)/(255*(259-i));return $(e,e=>o*(e-128)+128)}function Y(e,t){if(0===t)return ee(e);let i=1+t/100,o=N(e.width,e.height,new Uint8ClampedArray(e.data));for(let e=0;e<o.data.length;e+=4){let t=o.data[e],n=o.data[e+1],r=o.data[e+2],s=.299*t+.587*n+.114*r;o.data[e]=s+(t-s)*i,o.data[e+1]=s+(n-s)*i,o.data[e+2]=s+(r-s)*i}return o}function q(e,t){if(0===t)return ee(e);let i=t/100*40;return $(e,(e,t)=>0===t?e+i:2===t?e-i:e)}function J(e,t,i=20){let o=Math.round(Math.max(0,Math.min(100,t))/100*i);return o<=0?ee(e):Z(Z(e,o,"horizontal"),o,"vertical")}function X(e,t){let i=e;return J(i=q(i=Y(i=G(i=K(i,t.brightness),t.contrast),t.saturation),t.warmth),t.blur)}function Z(e,t,i){let o=N(e.width,e.height),{width:n,height:r,data:s}=e,a="horizontal"===i,l=a?r:n,c=a?n:r,d=2*t+1;for(let e=0;l>e;e++)for(let i=0;i<4;i++){let l=0;for(let o=-t;t>=o;o++)l+=Q(s,n,r,a,e,o,i);for(let u=0;c>u;u++){let c=(a?e*n+u:u*n+e)*4+i;o.data[c]=l/d;let h=Q(s,n,r,a,e,u-t,i);l+=Q(s,n,r,a,e,u+t+1,i)-h}}return o}function Q(e,t,i,o,n,r,s){let a=(o?t:i)-1,l=r<0?0:r>a?a:r;return e[(o?n*t+l:l*t+n)*4+s]}function ee(e){return N(e.width,e.height,new Uint8ClampedArray(e.data))}function et(e,t){let i=N(e.width,e.height,new Uint8ClampedArray(e.data));for(let e=0;e<i.data.length;e+=4){let[o,n,r]=t(i.data[e],i.data[e+1],i.data[e+2]);i.data[e]=o,i.data[e+1]=n,i.data[e+2]=r}return i}Object.freeze(Object.defineProperty({__proto__:null,applyFinetune:X,blur:J,brightness:K,contrast:G,saturation:Y,warmth:q},Symbol.toStringTag,{value:"Module"}));let ei=e=>N(e.width,e.height,new Uint8ClampedArray(e.data)),eo=new Map;function en(e){return eo.set(e.id,e),()=>{eo.get(e.id)===e&&eo.delete(e.id)}}function er(e,t){let i=eo.get(t);return i?i.apply(e):ei(e)}function es(e){return new ImageData(e.data,e.width,e.height)}[{id:"original",label:"Original",apply:ei},{id:"invert",label:"Invert",apply:e=>et(e,(e,t,i)=>[255-e,255-t,255-i])},{id:"grayscale",label:"Black & White",apply:e=>et(e,(e,t,i)=>{let o=.299*e+.587*t+.114*i;return[o,o,o]})},{id:"sepia",label:"Sepia",apply:e=>et(e,(e,t,i)=>[.393*e+.769*t+.189*i,.349*e+.686*t+.168*i,.272*e+.534*t+.131*i])},{id:"solarize",label:"Solarize",apply:e=>et(e,(e,t,i)=>[e<128?e:255-e,t<128?t:255-t,i<128?i:255-i])},{id:"clarendon",label:"Clarendon",apply:e=>q(Y(G(e,20),25),-10)},{id:"gingham",label:"Gingham",apply:e=>q(Y(G(e,-10),-15),12)}].forEach(en);class ea{register(e){let t=this.locales.get(e.id);return this.locales.set(e.id,{...t??{},...e.messages}),()=>{t?this.locales.set(e.id,t):this.locales.delete(e.id)}}has(e){return this.locales.has(e)}get(e){return this.locales.get(e)}list(){return[...this.locales.keys()]}translator(e){return function(e={},t={}){return(i,o)=>{let n=e[i]??t[i]??i;return o?n.replace(/\{(\w+)\}/g,(e,t)=>t in o?o[t]+"":e):n}}(this.locales.get(e)??{})}constructor(){o(this,"locales",new Map)}}let el=new Set(["value","checked","disabled","selected","innerHTML"]);function ec(e,t={},i=[]){return{kind:"element",tag:e,key:t.key,props:t,children:function(e){let t=Array.isArray(e)?e:[e],i=[];for(let e of t)null!=e&&!1!==e&&!0!==e&&i.push("object"==typeof e?e:{kind:"text",text:e+""});return i}(i)}}function ed(e){return"element"===e.kind}let eu={};class eh{render(e){if(null===this.prev){let t=this.mount(e);this.host.insert(this.container,t,null)}else if(ep(this.prev,e))this.patch(this.prev,e);else{let t=this.mount(e),i=this.prev.node;this.host.insert(this.container,t,this.host.nextSibling(i)),this.host.remove(this.container,i)}this.prev=e}unmount(){this.prev&&(this.host.remove(this.container,this.prev.node),this.prev=null)}mount(e){if(!ed(e)){let t=this.host.createText(e.text);return e.node=t,t}let t=this.host.createElement(e.tag);for(let i of(e.node=t,this.applyProps(t,eu,e.props),e.children))this.host.insert(t,this.mount(i),null);return t}patch(e,t){let i=e.node;return(t.node=i,ed(t)&&ed(e))?(this.applyProps(i,e.props,t.props),this.patchChildren(i,e.children,t.children)):ed(t)||t.text===e.text||this.host.setText(i,t.text),i}applyProps(e,t,i){for(let o of(this.applyClass(e,t.class,i.class),this.applyStyle(e,t.style??{},i.style??{}),this.applyEvents(e,t.on??{},i.on??{}),Object.keys(i))){if(ef(o))continue;let n=i[o];n!==t[o]&&this.applyAttr(e,o,n)}for(let o of Object.keys(t))ef(o)||o in i||(el.has(o)?this.host.setProperty(e,o,""):this.host.removeAttribute(e,o))}applyAttr(e,t,i){el.has(t)?this.host.setProperty(e,t,i):!1===i||null==i?this.host.removeAttribute(e,t):this.host.setAttribute(e,t,!0===i?"":"string"==typeof i?i:"number"==typeof i||"boolean"==typeof i||"bigint"==typeof i?i+"":JSON.stringify(i)??"")}applyClass(e,t,i){t!==i&&(i?this.host.setAttribute(e,"class",i):this.host.removeAttribute(e,"class"))}applyStyle(e,t,i){for(let o of Object.keys(i))i[o]!==t[o]&&this.host.setStyle(e,o,i[o]+"");for(let o of Object.keys(t))o in i||this.host.removeStyle(e,o)}applyEvents(e,t,i){let o=this.events.get(e);for(let n of Object.keys(t))!(n in i)&&o?.has(n)&&(this.host.removeEventListener(e,n,o.get(n).wrapper),o.delete(n));for(let t of Object.keys(i)){let n=i[t],r=o?.get(t);if(r){r.handler=n;continue}o||(o=new Map,this.events.set(e,o));let s={handler:n,wrapper:e=>s.handler(e)};o.set(t,s),this.host.addEventListener(e,t,s.wrapper)}}patchChildren(e,t,i){let o=0,n=t.length-1,r=0,s=i.length-1,a=null;for(;o<=n&&r<=s;){let l=t[o],c=t[n],d=i[r],u=i[s];if(ep(l,d)){this.patch(l,d),o++,r++;continue}if(ep(c,u)){this.patch(c,u),n--,s--;continue}if(ep(l,u)){this.patch(l,u),this.host.insert(e,l.node,this.host.nextSibling(c.node)),o++,s--;continue}if(ep(c,d)){this.patch(c,d),this.host.insert(e,c.node,l.node),n--,r++;continue}a??=function(e,t,i){let o=new Map;for(let n=t;n<=i;n++){let t=e[n].key;void 0!==t&&o.set(t,n)}return o}(t,o,n);let h=void 0!==d.key?a.get(d.key):void 0;if(void 0===h)this.host.insert(e,this.mount(d),l.node);else{let i=t[h];this.patch(i,d),i.node=void 0,this.host.insert(e,d.node,l.node)}r++}if(o>n){let t=i[s+1]?.node??null;for(let o=r;s>=o;o++)this.host.insert(e,this.mount(i[o]),t)}else if(r>s)for(let i=o;n>=i;i++){let o=t[i].node;o&&this.host.remove(e,o)}}constructor(e,t){o(this,"events",new WeakMap),o(this,"prev",null),this.host=e,this.container=t}}function ep(e,t){return e.kind===t.kind&&("text"===e.kind||e.tag===t.tag&&e.key===t.key)}function ef(e){return"key"===e||"class"===e||"style"===e||"on"===e}class em{createElement(e){return this.doc.createElement(e)}createText(e){return this.doc.createTextNode(e)}setText(e,t){e.textContent=t}insert(e,t,i){e.insertBefore(t,i)}remove(e,t){t.parentNode===e&&e.removeChild(t)}parent(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i){e.setAttribute(t,i)}removeAttribute(e,t){e.removeAttribute(t)}setProperty(e,t,i){e[t]=i}setStyle(e,t,i){e.style.setProperty(t,i)}removeStyle(e,t){e.style.removeProperty(t)}addEventListener(e,t,i){e.addEventListener(t,i)}removeEventListener(e,t,i){e.removeEventListener(t,i)}constructor(e=document){this.doc=e}}class eg{register(e){return this.tools.set(e.id,e),this.order.set(e.id,e.order??eg.UNORDERED_BASE+this.seq++),()=>{this.tools.get(e.id)===e&&(this.tools.delete(e.id),this.order.delete(e.id))}}get(e){return this.tools.get(e)}has(e){return this.tools.has(e)}list(){return[...this.tools.values()].sort((e,t)=>(this.order.get(e.id)??0)-(this.order.get(t.id)??0))}first(){return this.list()[0]}constructor(){o(this,"tools",new Map),o(this,"seq",0),o(this,"order",new Map)}}function eb(e){return ec("span",{class:"jie-icon",innerHTML:e})}function ev(){return ec("span",{class:"jie-spinner"})}function ey(e){let t=["jie-btn"];"primary"===e.variant&&t.push("jie-btn--primary"),"icon"===e.variant&&t.push("jie-btn--icon"),e.active&&t.push("jie-btn--active"),e.busy&&t.push("jie-btn--busy"),e.className&&t.push(e.className);let i=[];return e.busy?i.push(ev()):e.icon&&i.push(eb(e.icon)),e.label&&i.push(ec("span",{},e.label)),ec("button",{key:e.key,class:t.join(" "),type:"button",disabled:e.disabled??!1,title:e.title??e.label??"",on:{click:e.onClick}},i)}function ew(e){let t=e.onStart,i={input:t=>e.onInput(Number(t.target.value))};t&&(i.pointerdown=()=>t());let o=e.max-e.min||1,n=Math.min(100,Math.max(0,(e.value-e.min)/o*100));return ec("div",{class:"jie-slider"},[ec("span",{class:"jie-slider__label"},e.label),ec("input",{class:"jie-range",type:"range",min:e.min+"",max:e.max+"",step:(e.step??1)+"",value:e.value+"",style:{"--jie-range-fill":`${n}%`},on:i}),ec("span",{class:"jie-slider__value"},Math.round(e.value)+"")])}function e_(e){return ec("label",{class:"jie-field"},[ec("span",{},e.label),ec("span",{style:{display:"flex","align-items":"center",gap:"6px"}},[ec("input",{class:"jie-input",type:"number",value:e.value+"",on:{change(t){let i=Number(t.target.value);Number.isFinite(i)&&e.onChange(i)}}}),e.suffix?ec("span",{},e.suffix):null])])}function ek(e,t,i){return ec("div",{class:"jie-toolrow"},e.map(e=>ey({key:e.id,label:e.label,icon:e.icon,active:e.id===t,onClick:()=>i(e.id)})))}o(eg,"UNORDERED_BASE",1e6);let eC=e=>`<svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e}</svg>`,eS={adjust:eC('<path d="M4 8h2M9 8h11M4 16h11M18 16h2"/><circle cx="7.5" cy="8" r="1.6"/><circle cx="16.5" cy="16" r="1.6"/>'),finetune:eC('<path d="M4 7h12M4 12h16M4 17h8"/><circle cx="18" cy="7" r="1.6"/><circle cx="12" cy="17" r="1.6"/>'),filters:eC('<circle cx="9" cy="9" r="5"/><circle cx="15" cy="9" r="5"/><circle cx="12" cy="15" r="5"/>'),watermark:eC('<rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 15l5-4 4 3 3-2 6 4"/><circle cx="8.5" cy="9.5" r="1.4"/>'),annotate:eC('<path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"/>'),resize:eC('<path d="M9 3H5a2 2 0 0 0-2 2v4M21 15v4a2 2 0 0 1-2 2h-4"/><path d="M8 16l8-8M16 8h-4M16 8v4"/>'),crop:eC('<path d="M6 2v14a2 2 0 0 0 2 2h14"/><path d="M2 6h14a2 2 0 0 1 2 2v14"/>'),rotate:eC('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),flipX:eC('<path d="M12 3v18"/><path d="M8 7 4 12l4 5Z"/><path d="M16 7l4 5-4 5Z"/>'),flipY:eC('<path d="M3 12h18"/><path d="M7 8 12 4l5 4Z"/><path d="M7 16l5 4 5-4Z"/>'),undo:eC('<path d="M9 7 4 12l5 5"/><path d="M4 12h11a5 5 0 0 1 0 10h-1"/>'),redo:eC('<path d="m15 7 5 5-5 5"/><path d="M20 12H9a5 5 0 0 0 0 10h1"/>'),reset:eC('<path d="M3 12a9 9 0 1 1 2.6 6.3"/><path d="M3 21v-5h5"/>'),trash:eC('<path d="M4 7h16M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M6 7l1 13a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1l1-13M10 11v6M14 11v6"/>'),plus:eC('<path d="M12 5v14M5 12h14"/>'),minus:eC('<path d="M5 12h14"/>'),zoomIn:eC('<circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2M10.5 7.5v6M7.5 10.5h6"/>'),zoomOut:eC('<circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2M7.5 10.5h6"/>'),posTopLeft:eC('<path d="M17 17 7 7M7 13V7h6"/>'),posTop:eC('<path d="M12 19V6M7 11l5-5 5 5"/>'),posTopRight:eC('<path d="M7 17 17 7M11 7h6v6"/>'),posLeft:eC('<path d="M19 12H6M11 7l-5 5 5 5"/>'),posCenter:eC('<circle cx="12" cy="12" r="6.5"/><circle cx="12" cy="12" r="2" fill="currentColor" stroke="none"/>'),posRight:eC('<path d="M5 12h13M13 7l5 5-5 5"/>'),posBottomLeft:eC('<path d="M17 7 7 17M7 11v6h6"/>'),posBottom:eC('<path d="M12 5v13M7 13l5 5 5-5"/>'),posBottomRight:eC('<path d="M7 7l10 10M17 11v6h-6"/>'),font:eC('<path d="M4 20 9.5 6h1L16 20M6 15h8M17 20l3-9h.5l3 9M18 17h4"/>'),focus:eC('<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="3.5"/>'),lock:eC('<rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/>'),unlock:eC('<rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 0 1 7.5-2"/>'),text:eC('<path d="M5 5h14M12 5v14M9 19h6"/>'),brightness:eC('<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M5 5l1.5 1.5M17.5 17.5 19 19M19 5l-1.5 1.5M6.5 17.5 5 19"/>'),contrast:eC('<circle cx="12" cy="12" r="9"/><path d="M12 3a9 9 0 0 0 0 18Z" fill="currentColor" stroke="none"/>'),blur:eC('<path d="M12 3s6 6.5 6 11a6 6 0 0 1-12 0c0-4.5 6-11 6-11Z"/>'),book:eC('<path d="M4 5a2 2 0 0 1 2-2h5v18H6a2 2 0 0 1-2-2Z"/><path d="M20 5a2 2 0 0 0-2-2h-5v18h5a2 2 0 0 0 2-2Z"/>')},ex={id:"adjust",label:"Adjust",icon:eS.adjust,order:0,defaultTool:"crop",renderPanel({state:e,update:t,t:i}){let o=w(e),n=_(e);return ec("div",{class:"jie-toolrow"},[ey({label:i("Crop"),icon:eS.crop,active:n,onClick:()=>t({activeTab:"adjust",activeTool:n?null:"crop"})}),ey({label:i("Rotate"),icon:eS.rotate,onClick:()=>t({design:{rotate:o.rotate+90}})}),ey({label:i("Flip X"),icon:eS.flipX,onClick:()=>t({design:{flip:{horizontal:!o.flip.horizontal}}})}),ey({label:i("Flip Y"),icon:eS.flipY,onClick:()=>t({design:{flip:{vertical:!o.flip.vertical}}})})])}},eI=[{id:"brightness",label:"Brightness",icon:eS.brightness,min:-100,max:100},{id:"contrast",label:"Contrast",icon:eS.contrast,min:-100,max:100},{id:"saturation",label:"Saturation",icon:eS.filters,min:-100,max:100},{id:"blur",label:"Blur",icon:eS.blur,min:0,max:100},{id:"warmth",label:"Warmth",icon:eS.brightness,min:-100,max:100}],eE={id:"finetune",label:"Finetune",icon:eS.finetune,order:1,defaultTool:"brightness",renderPanel({state:e,update:t,t:i}){var o;let n=(o=e.activeTool,eI.find(e=>e.id===o)??eI[0]),r=w(e).finetune[n.id],s=(e,i)=>{t({design:{finetune:{[n.id]:e}},commit:i})};return ec("div",{class:"jie-panel-stack",style:{display:"contents"}},[ew({label:i(n.label),value:r,min:n.min,max:n.max,onStart:()=>s(r,!0),onInput:e=>s(e,!1)}),ek(eI.map(e=>({id:e.id,label:i(e.label),icon:e.icon})),n.id,e=>t({activeTab:"finetune",activeTool:e}))])}},eT={id:"filters",label:"Filters",icon:eS.filters,order:2,renderPanel({state:e,update:t,t:i}){let o=w(e).filter;return ec("div",{class:"jie-thumbs"},[...eo.values()].map(e=>ec("button",{key:e.id,class:"jie-thumb",type:"button","aria-pressed":(e.id===o)+"",on:{click:()=>t({design:{filter:e.id}})}},[ec("canvas",{class:"jie-thumb__swatch","data-jie-filter-thumb":e.id}),ec("span",{},i(e.label))])))}},ej={id:"focus",label:"Focus",icon:eS.focus,order:3,defaultTool:"radial",renderPanel({state:e,update:t,t:i}){let o=w(e).focus??{shape:"radial",x:.5,y:.5,radius:.28,angle:0,amount:60},n=null!==w(e).focus,r=(e,i)=>t({design:{focus:{...o,...e}},commit:i});return ec("div",{class:"jie-panel-stack",style:{display:"contents"}},[ec("div",{class:"jie-toolrow"},[ew({label:i("Intensity"),value:o.amount,min:0,max:100,onStart:()=>r({amount:o.amount},!0),onInput:e=>r({amount:e},!1)}),ew({label:i("Radius"),value:Math.round(100*o.radius),min:5,max:90,onStart:()=>r({radius:o.radius},!0),onInput:e=>r({radius:e/100},!1)}),n?ey({variant:"icon",icon:eS.trash,title:i("Reset"),onClick:()=>t({design:{focus:null}})}):null]),ek([{id:"radial",label:i("Radial")},{id:"linear",label:i("Linear")}],o.shape,e=>r({shape:e},!0))])}},eD=[{align:"left",valign:"top",icon:eS.posTopLeft},{align:"center",valign:"top",icon:eS.posTop},{align:"right",valign:"top",icon:eS.posTopRight},{align:"left",valign:"middle",icon:eS.posLeft},{align:"center",valign:"middle",icon:eS.posCenter},{align:"right",valign:"middle",icon:eS.posRight},{align:"left",valign:"bottom",icon:eS.posBottomLeft},{align:"center",valign:"bottom",icon:eS.posBottom},{align:"right",valign:"bottom",icon:eS.posBottomRight}],eA=function(e="id"){let t=0;return()=>`${e}-${++t}`}("jie"),eP="text-color",eM="text-font",eL={id:"annotate",label:"Text",icon:eS.text,order:4,defaultTool:"text",renderPanel({state:e,update:t,t:i}){var o,n,s;let a,l,c,d=w(e),u=d.annotations[0];if(!u)return ec("div",{class:"jie-toolrow"},[ey({label:i("Add text"),icon:eS.text,variant:"primary",onClick(){let e=function(e,t={}){return{id:e,type:"text",text:"Text",x:.5,y:.5,fontSize:.06,fontFamily:r[0].value,color:"#eb5757",bold:!1,italic:!1,align:"center",valign:"middle",...t}}(eA());t({design:{annotations:[e]},selectedAnnotationId:e.id})}})]);let h=e=>{var i,o;return t({design:{annotations:(i=d.annotations,o=u.id,i.map(t=>t.id===o?{...t,...e}:t))}})};return ec("div",{class:"jie-toolrow"},[ec("input",{class:"jie-input",type:"text",value:u.text,on:{input:e=>h({text:e.target.value})}}),(a=(o={value:u.fontFamily,fonts:e.fonts,title:i("Font"),open:e.activePopover===eM,onToggle:()=>t({activePopover:e.activePopover===eM?null:eM}),onPick(e){h({fontFamily:e}),t({activePopover:null})}}).fonts.find(e=>e.value===o.value),l=[ec("button",{class:"jie-fontselect__trigger",type:"button",title:o.title??"Font","aria-haspopup":"listbox","aria-expanded":o.open+"",on:{click:()=>o.onToggle()}},[eb(eS.font),ec("span",{style:{"font-family":o.value}},a?.label??"Font"),eb(eS.book)])],o.open&&l.push(ec("div",{class:"jie-popover__backdrop",on:{click:()=>o.onToggle()}}),ec("div",{class:"jie-popover jie-fontlist",role:"listbox"},o.fonts.map(e=>ec("button",{key:e.value,class:"jie-fontlist__item",type:"button","aria-pressed":(e.value===o.value)+"",style:{"font-family":e.value},on:{click:()=>o.onPick(e.value)}},e.label)))),ec("div",{class:"jie-fontselect"},l)),(c=[ec("button",{class:"jie-color",type:"button",title:(n={value:u.color,palette:e.palette,title:i("Colour"),open:e.activePopover===eP,onToggle:()=>t({activePopover:e.activePopover===eP?null:eP}),onPick(e){h({color:e}),t({activePopover:null})}}).title??"Colour",style:{background:n.value},"aria-haspopup":"true","aria-expanded":n.open+"",on:{click:()=>n.onToggle()}})],n.open&&c.push(ec("div",{class:"jie-popover__backdrop",on:{click:()=>n.onToggle()}}),ec("div",{class:"jie-popover jie-swatches",role:"listbox"},n.palette.map(e=>ec("button",{key:e,class:"jie-swatch",type:"button",title:e,style:{background:e},"aria-pressed":(e.toLowerCase()===n.value.toLowerCase())+"",on:{click:()=>n.onPick(e)}})))),ec("div",{class:"jie-colorpicker"},c)),ey({label:"B",className:"jie-btn--bold",active:u.bold,onClick:()=>h({bold:!u.bold})}),ey({label:"I",className:"jie-btn--italic",active:u.italic,onClick:()=>h({italic:!u.italic})}),ew({label:i("Size"),value:Math.round(100*u.fontSize),min:1,max:40,onInput:e=>h({fontSize:e/100})}),(s={align:u.align,valign:u.valign,onPick:(e,t)=>h({align:e,valign:t,x:"left"===e?.04:"right"===e?.96:.5,y:"top"===t?.04:"bottom"===t?.96:.5})},ec("div",{class:"jie-posgrid",role:"group"},eD.map(e=>ec("button",{key:`${e.valign}-${e.align}`,class:"jie-posgrid__cell",type:"button","data-pos":`${e.valign}-${e.align}`,"aria-pressed":(e.align===s.align&&e.valign===s.valign)+"",on:{click:()=>s.onPick(e.align,e.valign)}},[eb(e.icon)])))),ey({variant:"icon",icon:eS.trash,title:i("Delete"),onClick(){var e,i;return t({design:{annotations:(e=d.annotations,i=u.id,e.filter(e=>e.id!==i))},selectedAnnotationId:null})}})])}},eR={id:"resize",label:"Resize",icon:eS.resize,order:5,renderPanel({state:e,update:t,t:i}){let o=E(e);if(!o)return null;let n="unlocked"!==e.activeTool,r=i=>t({design:{resize:function(e,t,i,o=1){let n=e.width/e.height;if(!i)return{width:Math.max(o,Math.round(t.width??e.width)),height:Math.max(o,Math.round(t.height??e.height))};if(void 0!==t.width){let e=Math.max(o,Math.round(t.width));return{width:e,height:Math.max(o,Math.round(e/n))}}if(void 0!==t.height){let e=Math.max(o,Math.round(t.height));return{width:Math.max(o,Math.round(e*n)),height:e}}return{...e}}(o,i,n,e.minResizeSize)}});return ec("div",{class:"jie-fieldrow"},[e_({label:i("Width"),value:o.width,suffix:i("px"),onChange:e=>r({width:e})}),ey({variant:"icon",icon:n?eS.lock:eS.unlock,title:n?i("Aspect ratio locked"):i("Aspect ratio unlocked"),onClick:()=>t({activeTab:"resize",activeTool:n?"unlocked":"locked"})}),e_({label:i("Height"),value:o.height,suffix:i("px"),onChange:e=>r({height:e})}),ey({variant:"icon",icon:eS.reset,title:i("Reset size"),onClick:()=>t({design:{resize:null}})})])}};function ez(e){return parseInt(e+e,16)}function eB(e,t){return parseInt(e.slice(t,t+2),16)}let eN=/image\/(jpe?g|bmp)/i;function eO(e,t){if("u"<typeof document)throw Error("No DOM available: provide a CanvasFactory to the codec");let i=document.createElement("canvas");return i.width=e,i.height=t,{get width(){return i.width},set width(e){i.width=e},get height(){return i.height},set height(e){i.height=e},getContext:e=>i.getContext(e),toBlobAsync:(e,t)=>new Promise((o,n)=>{i.toBlob(e=>e?o(e):n(Error("canvas.toBlob returned null")),e,t)})}}class eF{async decode(e){var t,i,o;let n,r=await this.toBitmap(e),s=(t=r.width,i=r.height,o={maxSize:this.maxSize,maxPixels:this.maxPixels},n=1,o.maxSize&&o.maxSize>0&&(n=Math.min(n,o.maxSize/Math.max(t,i))),o.maxPixels&&o.maxPixels>0&&(n=Math.min(n,Math.sqrt(o.maxPixels/(t*i)))),Math.min(1,n)),a=Math.max(1,Math.round(r.width*s)),l=Math.max(1,Math.round(r.height*s)),c=this.createCanvas(a,l),d=this.context(c);d.imageSmoothingEnabled=!0,d.imageSmoothingQuality="high",d.drawImage(r,0,0,a,l),"close"in r&&"function"==typeof r.close&&r.close();let u=d.getImageData(0,0,a,l);return N(u.width,u.height,u.data)}async encode(e,t={}){let i,{type:o="image/png",quality:n=.92,background:r}=t,s=void 0!==r||eN.test(o)?function(e,[t,i,o]){let n=N(e.width,e.height);for(let r=0;r<e.data.length;r+=4){let s=e.data[r+3]/255,a=1-s;n.data[r]=e.data[r]*s+t*a,n.data[r+1]=e.data[r+1]*s+i*a,n.data[r+2]=e.data[r+2]*s+o*a,n.data[r+3]=255}return n}(e,(i=(r??"#ffffff").trim().replace(/^#/,""),/^[0-9a-f]{3}$/i.test(i)?[ez(i[0]),ez(i[1]),ez(i[2])]:/^[0-9a-f]{6}$/i.test(i)?[eB(i,0),eB(i,2),eB(i,4)]:[255,255,255])):e,a=this.createCanvas(s.width,s.height);return this.context(a).putImageData(es(s),0,0),a.toBlobAsync(o,n)}context(e){let t=e.getContext("2d");if(!t)throw Error("Unable to acquire a 2D canvas context");return t}async toBitmap(e){return"function"==typeof createImageBitmap?createImageBitmap(e,{imageOrientation:"from-image"}):new Promise((t,i)=>{let o=URL.createObjectURL(e),n=new Image;n.style.imageOrientation="from-image",n.onload=()=>{URL.revokeObjectURL(o),t(n)},n.onerror=()=>{URL.revokeObjectURL(o),i(Error("Failed to decode image blob"))},n.src=o})}constructor(e=eO,t={}){o(this,"maxPixels",void 0),o(this,"maxSize",void 0),this.createCanvas=e,this.maxPixels=t.maxPixels??0x1000000,this.maxSize=t.maxSize}}class eH{decode(e){return this.codec.decode(e)}render(e,t){let i=function(e,t){let i=e;if(t.flip.horizontal&&(i=H(i,"horizontal")),t.flip.vertical&&(i=H(i,"vertical")),0!==t.rotate&&(i=function(e,t){let i=(Math.round(t/90)%4+4)%4;if(0===i)return N(e.width,e.height,new Uint8ClampedArray(e.data));let{width:o,height:n}=e,r=1===i||3===i,s=N(r?n:o,r?o:n);for(let t=0;t<n;t++)for(let r=0;r<o;r++){let a,l;1===i?(a=n-1-t,l=r):2===i?(a=o-1-r,l=n-1-t):(a=t,l=o-1-r),V(e,O(e,r,t),s,O(s,a,l))}return s}(i,t.rotate)),0!==t.angle){let e=t.crop??{x:0,y:0,width:i.width,height:i.height};i=function(e,t,i){let o=Math.max(1,Math.round(t.width)),n=Math.max(1,Math.round(t.height)),r=N(o,n),s=t.x+t.width/2,a=t.y+t.height/2,l=i*Math.PI/180,c=Math.cos(l),d=Math.sin(l);for(let t=0;t<n;t++){let i=t+.5-n/2;for(let n=0;o>n;n++){let l=n+.5-o/2;!function(e,t,i,o,n){if(t<=-1||i<=-1||t>=e.width||i>=e.height){o.data[n]=0,o.data[n+1]=0,o.data[n+2]=0,o.data[n+3]=0;return}let r=Math.floor(t),s=Math.floor(i),a=t-r,l=i-s,c=W(r,e.width),d=W(r+1,e.width),u=W(s,e.height),h=W(s+1,e.height),p=O(e,c,u),f=O(e,d,u),m=O(e,c,h),g=O(e,d,h);for(let t=0;t<4;t++){var b,v;let i=(b=e.data[p+t],b+(e.data[f+t]-b)*a),r=(v=e.data[m+t],v+(e.data[g+t]-v)*a);o.data[n+t]=i+(r-i)*l}}(e,s+l*c-i*d-.5,a+l*d+i*c-.5,r,O(r,n,t))}}return r}(i,e,t.angle)}else t.crop&&(i=function(e,t){let i,o,n=y({x:i=Math.round(t.x),y:o=Math.round(t.y),width:Math.round(t.x+t.width)-i,height:Math.round(t.y+t.height)-o},e),r=N(n.width,n.height);for(let t=0;t<n.height;t++){let i=O(e,n.x,n.y+t),o=O(r,0,t);r.data.set(e.data.subarray(i,i+4*n.width),o)}return r}(i,t.crop));return t.resize&&(i=U(i,t.resize)),i=er(i=X(i,t.finetune),t.filter),t.focus&&(i=function(e,t){if(t.amount<=0)return N(e.width,e.height,new Uint8ClampedArray(e.data));let i=J(e,t.amount,32),{width:o,height:n}=e,r=N(o,n),s=Math.min(o,n),a=t.x*o,l=t.y*n,c=t.radius*s,d=Math.max(.06*s,.9*c),u=t.angle*Math.PI/180,h=-Math.sin(u),p=Math.cos(u);for(let s=0;s<n;s++)for(let n=0;n<o;n++){let o=n-a,u=s-l,f=function(e,t,i){if(t<=e)return+(i>=t);let o=Math.min(1,Math.max(0,(i-e)/(t-e)));return o*o*(3-2*o)}(c,c+d,"radial"===t.shape?Math.hypot(o,u):Math.abs(o*h+u*p)),m=O(r,n,s);for(let t=0;t<4;t++)r.data[m+t]=e.data[m+t]+(i.data[m+t]-e.data[m+t])*f}return r}(i,t.focus)),i}(e,t);return function(e,t,i){if(0===i.length)return t;let o=e(t.width,t.height).getContext("2d");if(!o)throw Error("Unable to acquire a 2D canvas context");for(let e of(o.putImageData(es(t),0,0),i)){if("text"!==e.type)continue;let i=function(e,t){let i=Math.max(1,Math.round(e.fontSize*t.height)),o=e.bold?"bold":"normal",n=e.italic?"italic":"normal";return{text:e.text,x:Math.round(e.x*t.width),y:Math.round(e.y*t.height),fontPx:i,font:`${n} ${o} ${i}px ${e.fontFamily}`,color:e.color,align:e.align,baseline:e.valign}}(e,t);o.font=i.font,o.fillStyle=i.color,o.textAlign=i.align,o.textBaseline=i.baseline,function(e,t){let i=t.text.split(`
1432
- `),o=1.2*t.fontPx,n=(i.length-1)*o,r="middle"===t.baseline?t.y-n/2:"bottom"===t.baseline?t.y-n:t.y;i.forEach((i,n)=>e.fillText(i,t.x,r+n*o))}(o,i)}let n=o.getImageData(0,0,t.width,t.height);return N(n.width,n.height,n.data)}(this.createCanvas,i,t.annotations)}async toBlob(e,t,i){return this.codec.encode(this.render(e,t),i)}constructor(e){o(this,"codec",void 0),o(this,"createCanvas",void 0),this.codec=e.codec,this.createCanvas=e.createCanvas}}function eU(e,t,i){e.update({zoom:t.zoom*i})}class eV{get state(){return this.store.getState()}update(e){return this.store.update(e),this}async save(){return this.handleSave()}async saveAs(){return this.handleSaveAs()}reset(){return this.handleReset(),this}use(e){let t=e.setup(this.api());return"function"==typeof t&&this.disposers.push(t),this}async fromBlob(e){this.store.update({status:"loading",error:null});try{let t=await this.processor.decode(e);if(this.destroyed)return this;this.source=t,this.previewSource=eW(t,this.previewMaxSize),this.thumbSource=eW(t,160),this.thumbVersion++,this.store.update({source:{width:t.width,height:t.height,name:e instanceof File?e.name:null,mimeType:e.type||"image/png"},resetHistory:!0,status:"ready"})}catch(e){this.store.update({status:"error",error:e instanceof Error?e.message:e+""})}return this}async toBlob(e){if(!this.source)throw Error("No image loaded — call fromBlob() first");let t=w(this.store.getState());this.store.update({status:"exporting"});try{return t.annotations.length>0&&"u">typeof document&&document.fonts&&await document.fonts.ready,await this.processor.toBlob(this.source,t,e)}finally{this.store.update({status:"ready"})}}destroy(){if(!this.destroyed){for(let e of(this.destroyed=!0,this.clearBusyTimer(),this.dragCleanup?.(),this.resizeObserver?.disconnect(),this.disposers.splice(0)))e();this.renderer.unmount(),this.store.destroy()}}api(){return{registerTool:e=>this.registry.register(e),registerFilter:e=>en(e),registerLocale:e=>this.locales.register(e),getState:()=>this.store.getState(),update:e=>this.store.update(e)}}translator(){return this.locales.translator(this.store.getState().locale)}appContext(){return{update:e=>this.store.update(e),tools:this.registry.list(),t:this.translator(),onSave:()=>void this.handleSave(),onSaveAs:()=>void this.handleSaveAs(),onReset:()=>this.handleReset(),beginCropDrag:(e,t)=>this.beginCropDrag(e,t),beginCropRotate:e=>this.beginCropRotate(e)}}handleReset(){x(this.store.getState())&&this.confirm(this.translator()("Reset all changes? You can still undo afterwards."))&&this.store.update({resetDesign:!0})}render(){if(!this.destroyed){var e,t;let i,o,n,r,s,a,l,c;this.renderer.render((e=this.store.getState(),t=this.appContext(),ec("div",{class:"jie","data-theme":e.theme},[e.showToolbar?(i=E(e),n=(o=j(e))?Math.round(100*o.scale):Math.round(100*e.zoom),r=t.t,s="loading"===e.status||"exporting"===e.status,a="exporting"===e.status&&e.busyVisible,ec("header",{class:"jie-topbar"},[ec("div",{class:"jie-topbar__save"},[ey({label:r("Save"),variant:"primary",onClick:()=>t.onSave(),disabled:!e.source||s,busy:a}),ey({label:r("Save as"),onClick:()=>t.onSaveAs(),disabled:!e.source||s,busy:a})]),ec("div",{class:"jie-topbar__meta"},[i?ec("span",{},`${i.width} x ${i.height} px`):null,eb(eS.book),ec("div",{class:"jie-zoom"},[ey({variant:"icon",icon:eS.zoomOut,title:r("Zoom out"),onClick:()=>eU(t,e,1/1.2)}),ec("span",{},`${n}%`),ey({variant:"icon",icon:eS.zoomIn,title:r("Zoom in"),onClick:()=>eU(t,e,1.2)})])]),ec("div",{class:"jie-topbar__actions"},[ey({variant:"icon",icon:eS.reset,title:r("Reset"),disabled:!x(e),onClick:()=>t.onReset()}),ey({variant:"icon",icon:eS.undo,title:r("Undo"),disabled:!C(e),onClick:()=>t.update({history:{step:-1}})}),ey({variant:"icon",icon:eS.redo,title:r("Redo"),disabled:!S(e),onClick:()=>t.update({history:{step:1}})})])])):null,ec("div",{class:"jie-body"},[ec("nav",{class:"jie-rail"},t.tools.map(i=>ec("button",{key:i.id,class:"jie-tab",type:"button","aria-selected":(e.activeTab===i.id)+"",on:{click:()=>t.update({activeTab:i.id,activeTool:i.defaultTool??null})}},[eb(i.icon),ec("span",{},t.t(i.label))]))),(l=t.tools.find(t=>t.id===e.activeTab)??t.tools[0],c=l?.renderPanel({state:e,update:t.update,t:t.t})??null,ec("div",{class:"jie-stage"},[ec("div",{class:"jie-canvas-wrap","data-jie-canvas-wrap":""},[ec("canvas",{class:"jie-canvas","data-jie-canvas":""}),function(e,t){if(!_(e))return null;let i=j(e),o=A(e);if(!i||!o)return null;let n=D(e);return ec("div",{class:"jie-crop",style:{left:`${i.offsetX+o.x*i.scale}px`,top:`${i.offsetY+o.y*i.scale}px`,width:`${o.width*i.scale}px`,height:`${o.height*i.scale}px`,transform:`rotate(${n}deg)`},on:{pointerdown:e=>t.beginCropDrag("move",e)}},[ec("div",{key:"rotate",class:"jie-crop__rotate",title:"Rotate",on:{pointerdown(e){e.stopPropagation(),t.beginCropRotate(e)}}}),...["nw","ne","sw","se"].map(e=>ec("div",{key:e,class:"jie-crop__handle","data-h":e,on:{pointerdown(i){i.stopPropagation(),t.beginCropDrag(e,i)}}}))])}(e,t),"loading"===e.status?ec("div",{class:"jie-overlay","data-jie-loading":""},[ev()]):"error"===e.status&&e.error?ec("div",{class:"jie-overlay jie-overlay--error","data-jie-error":""},[ec("span",{},t.t("Failed to load the image")),ec("span",{class:"jie-overlay__detail"},e.error)]):null]),c?ec("div",{class:"jie-panel"},[c]):null]))])]))),this.ensureViewportObserver(),this.paint(),this.paintFilterThumbs()}}async handleSave(){if(!this.canExport())return;let e=await this.toBlob();this.onSaveCb?.(e,this),this.container.dispatchEvent(new CustomEvent("jie:save",{detail:{blob:e},bubbles:!0}))}async handleSaveAs(){if(!this.canExport())return;let e=await this.toBlob();this.onSaveAsCb?.(e,this),this.container.dispatchEvent(new CustomEvent("jie:saveas",{detail:{blob:e},bubbles:!0}))}canExport(){let{status:e}=this.store.getState();return null!==this.source&&"exporting"!==e&&"loading"!==e}syncBusyTimer(e){"exporting"!==e.status?this.clearBusyTimer():e.busyVisible||null!==this.busyTimer||(this.busyTimer=setTimeout(()=>{this.busyTimer=null,this.destroyed||"exporting"!==this.store.getState().status||this.store.update({busyVisible:!0})},this.spinnerDelay))}clearBusyTimer(){null!==this.busyTimer&&(clearTimeout(this.busyTimer),this.busyTimer=null)}ensureViewportObserver(){let e=this.container.querySelector("[data-jie-canvas-wrap]");if(e&&e!==this.observedWrap){if(this.resizeObserver?.disconnect(),this.observedWrap=e,"u"<typeof ResizeObserver)return void this.measureViewport(e);this.resizeObserver=new ResizeObserver(()=>this.measureViewport(e)),this.resizeObserver.observe(e),this.measureViewport(e)}}measureViewport(e){let{clientWidth:t,clientHeight:i}=e,o=this.store.getState().viewport;t<=0||i<=0||o&&o.width===t&&o.height===i||this.store.update({viewport:{width:t,height:i}})}paint(){let e=this.store.getState(),t=this.container.querySelector("[data-jie-canvas]");if(!t||!this.previewSource||!e.viewport)return;let i=j(e);if(!i)return;let o=k(e),n=`${this.thumbVersion}:${JSON.stringify(o)}`;n===this.cachedRasterKey&&this.cachedRaster||(this.cachedRaster=this.processor.render(this.previewSource,o),this.cachedRasterKey=n);let r=`${n}@${e.viewport.width}x${e.viewport.height}:${i.scale}:${i.offsetX},${i.offsetY}`;r!==this.lastPaintKey&&(this.lastPaintKey=r,function(e,t,i,o){let n="u">typeof window&&window.devicePixelRatio||1;e.width=Math.max(1,Math.round(i.width*n)),e.height=Math.max(1,Math.round(i.height*n));let r=e.getContext("2d");if(!r)return;r.setTransform(n,0,0,n,0,0),r.clearRect(0,0,i.width,i.height);let s=document.createElement("canvas");s.width=t.width,s.height=t.height;let a=s.getContext("2d");a&&(a.putImageData(es(t),0,0),r.imageSmoothingEnabled=!0,r.imageSmoothingQuality="high",r.drawImage(s,o.offsetX,o.offsetY,o.width,o.height))}(t,this.cachedRaster,e.viewport,i))}paintFilterThumbs(){let e=this.thumbSource;if(e)for(let t of this.container.querySelectorAll("canvas[data-jie-filter-thumb]")){let i=t.dataset.jieFilterThumb;if(!i)continue;let o=`${this.thumbVersion}:${i}`;if(t.dataset.key===o)continue;let n=er(e,i);t.width=n.width,t.height=n.height;let r=t.getContext("2d");r&&(r.putImageData(es(n),0,0),t.dataset.key=o)}}beginCropDrag(e,t){let i=this.store.getState(),o=j(i),n=A(i),r=I(i);if(!o||!n||!r)return;let s=D(i),a=i.minCropSize,l=t.clientX,c=t.clientY;this.runPointerGesture(t,t=>{let i=(t.clientX-l)/o.scale,d=(t.clientY-c)/o.scale;return{crop:0!==s?function(e,t,i,o,n,r=8){if("move"===i)return{...e,x:e.x+o,y:e.y+n};let[s,a]=L[i],l=z(e,t,s,a),c=z(e,t,-s,-a),d={x:l.x+o,y:l.y+n},u=(d.x+c.x)/2,h=(d.y+c.y)/2,p=t*M,f=Math.cos(p),m=Math.sin(p),g=d.x-c.x,b=d.y-c.y,v=Math.max(r,Math.abs(g*f+b*m)),y=Math.max(r,Math.abs(-(g*m)+b*f));return{x:u-v/2,y:h-y/2,width:v,height:y}}(n,s,e,i,d,a):function(e,t,i,o,n,r=null,s=8){var a;let l,c;if("move"===t)return y({...e,x:e.x+i,y:e.y+o},n);let{x:d,y:u,width:h,height:p}=e;if("nw"===t||"sw"===t){let e=v(d+i,0,d+h-s);h+=d-e,d=e}else h=v(h+i,s,n.width-d);if("nw"===t||"ne"===t){let e=v(u+o,0,u+p-s);p+=u-e,u=e}else p=v(p+o,s,n.height-u);let f={x:d,y:u,width:h,height:p};return null!==r&&r>0&&(l=(a=f).width/r,c="sw"===t||"se"===t?a.y:a.y+a.height-l,f={...a,height:l,y:c}),y(f,n)}(n,e,i,d,r,null,a)}})}beginCropRotate(e){let t=this.store.getState(),i=j(t),o=A(t),n=this.observedWrap??this.container.querySelector("[data-jie-canvas-wrap]");if(!i||!o||!n)return;let r=n.getBoundingClientRect(),s=R(o),a=r.left+i.offsetX+s.x*i.scale,l=r.top+i.offsetY+s.y*i.scale,c=D(t),d=B(a,l,e.clientX,e.clientY);this.runPointerGesture(e,e=>{let t=c+(B(a,l,e.clientX,e.clientY)-d);return 2>Math.abs(t)&&(t=0),{angle:Math.round(10*t)/10}})}runPointerGesture(e,t){e.preventDefault();let i=!1,o=e=>{this.store.update({design:t(e),commit:!i}),i=!0},n=()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",n),this.dragCleanup=null};window.addEventListener("pointermove",o),window.addEventListener("pointerup",n),this.dragCleanup=n}constructor(e){for(let t of(o(this,"store",void 0),o(this,"container",void 0),o(this,"renderer",void 0),o(this,"registry",new eg),o(this,"locales",new ea),o(this,"processor",void 0),o(this,"previewMaxSize",void 0),o(this,"spinnerDelay",void 0),o(this,"busyTimer",null),o(this,"onSaveCb",void 0),o(this,"onSaveAsCb",void 0),o(this,"confirm",void 0),o(this,"source",null),o(this,"previewSource",null),o(this,"thumbSource",null),o(this,"thumbVersion",0),o(this,"cachedRaster",null),o(this,"cachedRasterKey",""),o(this,"lastPaintKey",""),o(this,"disposers",[]),o(this,"resizeObserver",null),o(this,"observedWrap",null),o(this,"dragCleanup",null),o(this,"destroyed",!1),this.container=function(e){if("string"!=typeof e)return e;let t=document.querySelector(e);if(!t)throw Error("Container not found: "+e);return t}(e.container),this.processor=e.processor??function(e=eO,t){return new eH({codec:new eF(e,t),createCanvas:e})}(void 0,{maxPixels:e.maxSourcePixels,maxSize:e.maxSourceSize}),this.previewMaxSize=e.previewMaxSize??1600,this.spinnerDelay=Math.max(0,e.spinnerDelay??250),this.onSaveCb=e.onSave,this.onSaveAsCb=e.onSaveAs,this.confirm=e.confirm??(e=>"u"<typeof window||window.confirm(e)),e.locales??[]))this.locales.register(t);for(let t of(this.store=new b({scheduler:e.scheduler??function(){if("function"!=typeof requestAnimationFrame)return new m(e=>setTimeout(e,16),e=>clearTimeout(e));let e=e=>{cancelAnimationFrame(e.raf),null!==e.timer&&(clearTimeout(e.timer),e.timer=null)};return new m(t=>{let i={raf:0,timer:null},o=()=>{e(i),t()};return i.raf=requestAnimationFrame(o),i.timer=setTimeout(o,100),i},e)}(),initialState:{...c(),...e.state,...e.locale?{locale:e.locale}:{},...void 0!==e.minCropSize?{minCropSize:Math.max(1,e.minCropSize)}:{},...void 0!==e.minResizeSize?{minResizeSize:Math.max(1,e.minResizeSize)}:{},...e.palette?{palette:e.palette}:{},...e.fonts?{fonts:e.fonts}:{}}}),e.tools??[ex,eE,eT,ej,eL,eR]))this.registry.register(t);for(let t of e.plugins??[])this.use(t);this.renderer=new eh(new em(document),this.container),this.disposers.push(this.store.subscribe(()=>this.render())),this.disposers.push(this.store.subscribe(e=>this.syncBusyTimer(e))),this.render(),e.image&&this.fromBlob(e.image)}}function eW(e,t){let i=Math.max(e.width,e.height);if(t>=i)return e;let o=t/i;return U(e,{width:Math.round(e.width*o),height:Math.round(e.height*o)})}i.d(t,["ICONS",0,eS,"selectors",0,P])},82749:function(e,t,i){"use strict";function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{_:function(){return o}})},72573:function(e,t,i){"use strict";function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function n(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}i.d(t,{marked:function(){return ew}});var r,s=n(),a={exec:()=>null};function l(e,t=""){let i="string"==typeof e?e:e.source,o={replace(e,t){let n="string"==typeof t?t:t.source;return n=n.replace(d.caret,"$1"),i=i.replace(e,n),o},getRegex:()=>new RegExp(i,t)};return o}var c=(()=>{try{return!!RegExp("(?<=1)(?<!1)")}catch{return!1}})(),d={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,h=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,f=l(p).replace(/bull/g,h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),m=l(p).replace(/bull/g,h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),g=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v=l(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",b).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),y=l(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,h).getRegex(),w="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k=l("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",_).replace("tag",w).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C=l(g).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),S={blockquote:l(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:v,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:k,lheading:f,list:y,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:C,table:a,text:/^[^\n]+/},x=l("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),I={...S,lheading:m,table:x,paragraph:l(g).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex()},E={...S,html:l("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:l(g).replace("hr",u).replace("heading",` *#{1,6} *[^
1433
- ]`).replace("lheading",f).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},T=/^( {2,}|\\)\n(?!\s*$)/,j=/[\p{P}\p{S}]/u,D=/[\s\p{P}\p{S}]/u,A=/[^\s\p{P}\p{S}]/u,P=l(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,D).getRegex(),M=/(?!~)[\p{P}\p{S}]/u,L=l(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",c?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),R=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,z=l(R,"u").replace(/punct/g,j).getRegex(),B=l(R,"u").replace(/punct/g,M).getRegex(),N="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",O=l(N,"gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,D).replace(/punct/g,j).getRegex(),F=l(N,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,M).getRegex(),H=l("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,D).replace(/punct/g,j).getRegex(),U=l(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,j).getRegex(),V=l("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,D).replace(/punct/g,j).getRegex(),W=l(/\\(punct)/,"gu").replace(/punct/g,j).getRegex(),$=l(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),K=l(_).replace("(?:--\x3e|$)","--\x3e").getRegex(),G=l("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",K).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Y=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,q=l(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Y).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J=l(/^!?\[(label)\]\[(ref)\]/).replace("label",Y).replace("ref",b).getRegex(),X=l(/^!?\[(ref)\](?:\[\])?/).replace("ref",b).getRegex(),Z=l("reflink|nolink(?!\\()","g").replace("reflink",J).replace("nolink",X).getRegex(),Q=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ee={_backpedal:a,anyPunctuation:W,autolink:$,blockSkip:L,br:T,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:a,delLDelim:a,delRDelim:a,emStrongLDelim:z,emStrongRDelimAst:O,emStrongRDelimUnd:H,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:q,nolink:X,punctuation:P,reflink:J,reflinkSearch:Z,tag:G,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:a},et={...ee,link:l(/^!?\[(label)\]\((.*?)\)/).replace("label",Y).getRegex(),reflink:l(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y).getRegex()},ei={...ee,emStrongRDelimAst:F,emStrongLDelim:B,delLDelim:U,delRDelim:V,url:l(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Q).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:l(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Q).getRegex()},eo={...ei,br:l(T).replace("{2,}","*").getRegex(),text:l(ei.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},en={normal:S,gfm:I,pedantic:E},er={normal:ee,gfm:ei,breaks:eo,pedantic:et},es={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ea=e=>es[e];function el(e,t){if(t){if(d.escapeTest.test(e))return e.replace(d.escapeReplace,ea)}else if(d.escapeTestNoEncode.test(e))return e.replace(d.escapeReplaceNoEncode,ea);return e}function ec(e){try{e=encodeURI(e).replace(d.percentDecode,"%")}catch{return null}return e}function ed(e,t){let i=e.replace(d.findPipe,(e,t,i)=>{let o=!1,n=t;for(;--n>=0&&"\\"===i[n];)o=!o;return o?"|":" |"}).split(d.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(d.slashPipe,"|");return i}function eu(e,t,i){let o=e.length;if(0===o)return"";let n=0;for(;n<o;){let r=e.charAt(o-n-1);if(r!==t||i)if(r!==t&&i)n++;else break;else n++}return e.slice(0,o-n)}function eh(e,t,i,o,n){let r=t.href,s=t.title||null,a=e[1].replace(n.other.outputLinkReplace,"$1");o.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:i,href:r,title:s,text:a,tokens:o.inlineTokens(a)};return o.state.inLink=!1,l}var ep=class{space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:eu(e,`
1443
+ }`)),document.head.appendChild(n)}}catch(e){}let r=Object.freeze([{label:"Arial",value:"Arial, Helvetica, sans-serif"},{label:"Helvetica",value:"Helvetica, Arial, sans-serif"},{label:"Verdana",value:"Verdana, Geneva, sans-serif"},{label:"Tahoma",value:"Tahoma, Geneva, sans-serif"},{label:"Trebuchet MS",value:'"Trebuchet MS", Helvetica, sans-serif'},{label:"Times New Roman",value:'"Times New Roman", Times, serif'},{label:"Georgia",value:'Georgia, "Times New Roman", serif'},{label:"Courier New",value:'"Courier New", Courier, monospace'},{label:"Impact",value:"Impact, Haettenschweiler, sans-serif"}]),s=Object.freeze({brightness:0,contrast:0,saturation:0,warmth:0,blur:0}),a=Object.freeze(["#ffffff","#1a1a1a","#9e9689","#4a90e2","#54b98a","#f2c94c","#eb5757","#a29bfe","#8b5cf6","#f178b6","#f2994a","#b8e454","#7ec8f0","#5b6470","#d8d2c8","#eeeeee"]);function l(){return{flip:{horizontal:!1,vertical:!1},rotate:0,angle:0,crop:null,resize:null,finetune:{...s},filter:"original",annotations:[],focus:null}}function c(){return{source:null,status:"idle",busyVisible:!1,error:null,activeTab:"adjust",activeTool:"crop",zoom:1,history:{entries:[l()],index:0},selectedAnnotationId:null,theme:"light",showToolbar:!0,locale:"en",minCropSize:8,minResizeSize:1,palette:[...a],fonts:r.map(e=>({...e})),activePopover:null,viewport:null}}function d(e){let t=e.entries[e.index];if(void 0===t)throw RangeError(`history index ${e.index} is out of bounds`);return t}function u(e,t){let i=e.entries.slice(0,e.index+1);i.push(t);let o=Math.max(0,i.length-100),n=o>0?i.slice(o):i;return{entries:n,index:n.length-1}}function h(e,t){let i=Math.min(Math.max(t,0),e.entries.length-1);return i===e.index?e:{...e,index:i}}function p(e,t){var i,o,n,r,s,a;let c=e;if(void 0!==t.activeTab&&(c=f(c,{activeTab:t.activeTab})),void 0!==t.activeTool&&(c=f(c,{activeTool:t.activeTool})),void 0!==t.zoom&&(c=f(c,{zoom:!Number.isFinite(r=t.zoom)||r<=0?1:Math.min(Math.max(r,.01),64)})),void 0!==t.theme&&(c=f(c,{theme:t.theme})),void 0!==t.showToolbar&&(c=f(c,{showToolbar:t.showToolbar})),void 0!==t.locale&&(c=f(c,{locale:t.locale})),void 0!==t.minCropSize&&(c=f(c,{minCropSize:Math.max(1,t.minCropSize)})),void 0!==t.minResizeSize&&(c=f(c,{minResizeSize:Math.max(1,t.minResizeSize)})),void 0!==t.palette&&(c=f(c,{palette:t.palette})),void 0!==t.fonts&&(c=f(c,{fonts:t.fonts})),void 0!==t.activePopover&&(c=f(c,{activePopover:t.activePopover})),void 0!==t.status&&(c=f(c,{status:t.status}),"exporting"!==t.status&&c.busyVisible&&(c=f(c,{busyVisible:!1}))),void 0!==t.busyVisible&&(c=f(c,{busyVisible:t.busyVisible})),void 0!==t.error&&(c=f(c,{error:t.error})),void 0!==t.source&&(c=f(c,{source:t.source})),void 0!==t.viewport&&(c=f(c,{viewport:t.viewport})),void 0!==t.selectedAnnotationId&&(c=f(c,{selectedAnnotationId:t.selectedAnnotationId})),t.resetHistory&&(c=f(c,{history:{entries:[l()],index:0}})),t.resetDesign&&(c=f(c,{history:u(c.history,l())})),void 0!==t.design){let e,o=(s=d(c.history),a=t.design,{...s,...a,flip:a.flip?{...s.flip,...a.flip}:s.flip,finetune:a.finetune?{...s.finetune,...a.finetune}:s.finetune,rotate:void 0!==a.rotate?(90*Math.round(a.rotate/90)%360+360)%360:s.rotate}),n=!1===t.commit?((e=(i=c.history).entries.slice())[i.index]=o,{entries:e,index:i.index}):u(c.history,o);c=f(c,{history:n})}if(void 0!==t.history){let e=t.history,i="step"in e?(o=c.history,n=e.step,h(o,o.index+n)):h(c.history,e.index);c=f(c,{history:i})}return c}function f(e,t){for(let i of Object.keys(t))if(e[i]!==t[i])return{...e,...t};return e}class m{request(e){this.pending=e,null===this.handle&&(this.handle=this.schedule(()=>this.flush()))}flush(){null!==this.handle&&(this.clear(this.handle),this.handle=null);let e=this.pending;this.pending=null,e&&e()}cancel(){null!==this.handle&&(this.clear(this.handle),this.handle=null),this.pending=null}constructor(e,t){o(this,"pending",null),o(this,"handle",null),this.schedule=e,this.clear=t}}class g{request(e){this.pending=e,this.flush()}flush(){let e=this.pending;this.pending=null,e&&e()}cancel(){this.pending=null}constructor(){o(this,"pending",null)}}class b{getState(){return this.state}update(e){let t=this.reducer(this.state,e);return t!==this.state&&(this.state=t,this.scheduler.request(()=>this.notify())),this.state}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}flush(){this.scheduler.flush()}destroy(){this.scheduler.cancel(),this.listeners.clear()}notify(){if(!this.notifying){this.notifying=!0;try{for(let e of this.listeners)e(this.state)}finally{this.notifying=!1}}}constructor(e={}){o(this,"state",void 0),o(this,"reducer",void 0),o(this,"scheduler",void 0),o(this,"listeners",new Set),o(this,"notifying",!1),this.state=e.initialState??c(),this.reducer=e.reducer??p,this.scheduler=e.scheduler??new g}}function v(e,t,i){return Math.min(Math.max(e,t),i)}function y(e,t){let i=v(e.width,1,t.width),o=v(e.height,1,t.height);return{x:v(e.x,0,t.width-i),y:v(e.y,0,t.height-o),width:i,height:o}}function w(e){return d(e.history)}function _(e){return"adjust"===e.activeTab&&"crop"===e.activeTool}function k(e){let t=w(e);return _(e)?{...t,crop:null,angle:0}:t}function C(e){return e.history.index>0}function S(e){var t;return(t=e.history).index<t.entries.length-1}function x(e){return e.history.index>0||e.history.entries.length>1}function I(e){if(!e.source)return null;let t=w(e),{width:i,height:o}=e.source;return 90===t.rotate||270===t.rotate?{width:o,height:i}:{width:i,height:o}}function E(e){let t=w(e);return t.resize?t.resize:t.crop?{width:Math.round(t.crop.width),height:Math.round(t.crop.height)}:I(e)}function T(e){return _(e)?I(e):E(e)}function j(e){let t,i,o,n=T(e);if(!n||!e.viewport)return null;let r={width:Math.max(1,e.viewport.width-88),height:Math.max(1,e.viewport.height-88)},s=(t=Math.min(r.width/n.width,r.height/n.height)||0,i=n.width*t,o=n.height*t,{scale:t,width:i,height:o,offsetX:(r.width-i)/2,offsetY:(r.height-o)/2}).scale*e.zoom,a=n.width*s,l=n.height*s;return{scale:s,width:a,height:l,offsetX:(e.viewport.width-a)/2,offsetY:(e.viewport.height-l)/2,content:n}}function D(e){return w(e).angle}function A(e){let t=w(e);if(t.crop)return t.crop;let i=I(e);return i?{x:0,y:0,width:i.width,height:i.height}:null}let P=Object.freeze(Object.defineProperty({__proto__:null,VIEWPORT_PADDING:44,selectCanRedo:S,selectCanUndo:C,selectCropAngle:D,selectDesign:w,selectEffectiveCrop:A,selectIsCropping:_,selectIsDirty:x,selectOrientedSize:I,selectOutputSize:E,selectPreviewContentSize:T,selectPreviewDesign:k,selectViewportFit:j},Symbol.toStringTag,{value:"Module"})),M=Math.PI/180,L={nw:[-1,-1],ne:[1,-1],sw:[-1,1],se:[1,1]};function R(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function z(e,t,i,o){let n=R(e),r=t*M,s=Math.cos(r),a=Math.sin(r),l=i*e.width/2,c=o*e.height/2;return{x:n.x+l*s-c*a,y:n.y+l*a+c*s}}function B(e,t,i,o){return Math.atan2(o-t,i-e)/M}function N(e,t,i){O(e,"width"),O(t,"height");let o=e*t*4;if(i&&i.length!==o)throw RangeError(`data length ${i.length} does not match ${e}x${t} (${o})`);return{width:e,height:t,data:i??new Uint8ClampedArray(o)}}function F(e,t,i){return(i*e.width+t)*4}function O(e,t){if(!Number.isInteger(e)||e<=0)throw RangeError(`${t} must be a positive integer, got ${e}`)}function H(e,t){let i=N(e.width,e.height),{width:o,height:n}=e;for(let r=0;r<n;r++)for(let s=0;s<o;s++)V(e,F(e,"horizontal"===t?o-1-s:s,"vertical"===t?n-1-r:r),i,F(i,s,r));return i}function U(e,t){let i=Math.max(1,Math.round(t.width)),o=Math.max(1,Math.round(t.height));if(i===e.width&&o===e.height)return N(i,o,new Uint8ClampedArray(e.data));let n=e;for(;n.width>=2*i;)n=function(e){let t=Math.ceil(e.width/2),i=N(t,e.height);for(let o=0;o<e.height;o++)for(let n=0;n<t;n++){let t=F(e,2*n,o),r=F(e,Math.min(2*n+1,e.width-1),o),s=F(i,n,o);for(let o=0;o<4;o++)i.data[s+o]=(e.data[t+o]+e.data[r+o])/2}return i}(n);for(;n.height>=2*o;)n=function(e){let t=Math.ceil(e.height/2),i=N(e.width,t);for(let o=0;o<t;o++)for(let t=0;t<e.width;t++){let n=F(e,t,2*o),r=F(e,t,Math.min(2*o+1,e.height-1)),s=F(i,t,o);for(let t=0;t<4;t++)i.data[s+t]=(e.data[n+t]+e.data[r+t])/2}return i}(n);return n.width===i&&n.height===o?N(i,o,new Uint8ClampedArray(n.data)):function(e,t,i){let o=N(t,i),n=e.width/t,r=e.height/i;for(let u=0;u<i;u++){let i=(u+.5)*r-.5,h=Math.floor(i),p=i-h,f=W(h,e.height),m=W(h+1,e.height);for(let i=0;i<t;i++){let t=(i+.5)*n-.5,r=Math.floor(t),h=t-r,g=W(r,e.width),b=W(r+1,e.width),v=F(e,g,f),y=F(e,b,f),w=F(e,g,m),_=F(e,b,m),k=F(o,i,u);for(let t=0;t<4;t++){var s,a,l,c,d;let i=(s=e.data[v+t],a=e.data[y+t],s+(a-s)*h),n=(l=e.data[w+t],c=e.data[_+t],l+(c-l)*h);o.data[k+t]=(d=i)+(n-d)*p}}}return o}(n,i,o)}function V(e,t,i,o){i.data[o]=e.data[t],i.data[o+1]=e.data[t+1],i.data[o+2]=e.data[t+2],i.data[o+3]=e.data[t+3]}function W(e,t){return e<0?0:e>=t?t-1:e}function $(e,t){let i=N(e.width,e.height,new Uint8ClampedArray(e.data));for(let e=0;e<i.data.length;e+=4)i.data[e]=t(i.data[e],0),i.data[e+1]=t(i.data[e+1],1),i.data[e+2]=t(i.data[e+2],2);return i}function K(e,t){if(0===t)return ee(e);let i=t/100*255;return $(e,e=>e+i)}function G(e,t){if(0===t)return ee(e);let i=t/100*255,o=259*(i+255)/(255*(259-i));return $(e,e=>o*(e-128)+128)}function Y(e,t){if(0===t)return ee(e);let i=1+t/100,o=N(e.width,e.height,new Uint8ClampedArray(e.data));for(let e=0;e<o.data.length;e+=4){let t=o.data[e],n=o.data[e+1],r=o.data[e+2],s=.299*t+.587*n+.114*r;o.data[e]=s+(t-s)*i,o.data[e+1]=s+(n-s)*i,o.data[e+2]=s+(r-s)*i}return o}function q(e,t){if(0===t)return ee(e);let i=t/100*40;return $(e,(e,t)=>0===t?e+i:2===t?e-i:e)}function J(e,t,i=20){let o=Math.round(Math.max(0,Math.min(100,t))/100*i);return o<=0?ee(e):Z(Z(e,o,"horizontal"),o,"vertical")}function X(e,t){let i=e;return J(i=q(i=Y(i=G(i=K(i,t.brightness),t.contrast),t.saturation),t.warmth),t.blur)}function Z(e,t,i){let o=N(e.width,e.height),{width:n,height:r,data:s}=e,a="horizontal"===i,l=a?r:n,c=a?n:r,d=2*t+1;for(let e=0;l>e;e++)for(let i=0;i<4;i++){let l=0;for(let o=-t;t>=o;o++)l+=Q(s,n,r,a,e,o,i);for(let u=0;c>u;u++){let c=(a?e*n+u:u*n+e)*4+i;o.data[c]=l/d;let h=Q(s,n,r,a,e,u-t,i);l+=Q(s,n,r,a,e,u+t+1,i)-h}}return o}function Q(e,t,i,o,n,r,s){let a=(o?t:i)-1,l=r<0?0:r>a?a:r;return e[(o?n*t+l:l*t+n)*4+s]}function ee(e){return N(e.width,e.height,new Uint8ClampedArray(e.data))}function et(e,t){let i=N(e.width,e.height,new Uint8ClampedArray(e.data));for(let e=0;e<i.data.length;e+=4){let[o,n,r]=t(i.data[e],i.data[e+1],i.data[e+2]);i.data[e]=o,i.data[e+1]=n,i.data[e+2]=r}return i}Object.freeze(Object.defineProperty({__proto__:null,applyFinetune:X,blur:J,brightness:K,contrast:G,saturation:Y,warmth:q},Symbol.toStringTag,{value:"Module"}));let ei=e=>N(e.width,e.height,new Uint8ClampedArray(e.data)),eo=new Map;function en(e){return eo.set(e.id,e),()=>{eo.get(e.id)===e&&eo.delete(e.id)}}function er(e,t){let i=eo.get(t);return i?i.apply(e):ei(e)}function es(e){return new ImageData(e.data,e.width,e.height)}[{id:"original",label:"Original",apply:ei},{id:"invert",label:"Invert",apply:e=>et(e,(e,t,i)=>[255-e,255-t,255-i])},{id:"grayscale",label:"Black & White",apply:e=>et(e,(e,t,i)=>{let o=.299*e+.587*t+.114*i;return[o,o,o]})},{id:"sepia",label:"Sepia",apply:e=>et(e,(e,t,i)=>[.393*e+.769*t+.189*i,.349*e+.686*t+.168*i,.272*e+.534*t+.131*i])},{id:"solarize",label:"Solarize",apply:e=>et(e,(e,t,i)=>[e<128?e:255-e,t<128?t:255-t,i<128?i:255-i])},{id:"clarendon",label:"Clarendon",apply:e=>q(Y(G(e,20),25),-10)},{id:"gingham",label:"Gingham",apply:e=>q(Y(G(e,-10),-15),12)}].forEach(en);class ea{register(e){let t=this.locales.get(e.id);return this.locales.set(e.id,{...t??{},...e.messages}),()=>{t?this.locales.set(e.id,t):this.locales.delete(e.id)}}has(e){return this.locales.has(e)}get(e){return this.locales.get(e)}list(){return[...this.locales.keys()]}translator(e){return function(e={},t={}){return(i,o)=>{let n=e[i]??t[i]??i;return o?n.replace(/\{(\w+)\}/g,(e,t)=>t in o?o[t]+"":e):n}}(this.locales.get(e)??{})}constructor(){o(this,"locales",new Map)}}let el=new Set(["value","checked","disabled","selected","innerHTML"]);function ec(e,t={},i=[]){return{kind:"element",tag:e,key:t.key,props:t,children:function(e){let t=Array.isArray(e)?e:[e],i=[];for(let e of t)null!=e&&!1!==e&&!0!==e&&i.push("object"==typeof e?e:{kind:"text",text:e+""});return i}(i)}}function ed(e){return"element"===e.kind}let eu={};class eh{render(e){if(null===this.prev){let t=this.mount(e);this.host.insert(this.container,t,null)}else if(ep(this.prev,e))this.patch(this.prev,e);else{let t=this.mount(e),i=this.prev.node;this.host.insert(this.container,t,this.host.nextSibling(i)),this.host.remove(this.container,i)}this.prev=e}unmount(){this.prev&&(this.host.remove(this.container,this.prev.node),this.prev=null)}mount(e){if(!ed(e)){let t=this.host.createText(e.text);return e.node=t,t}let t=this.host.createElement(e.tag);for(let i of(e.node=t,this.applyProps(t,eu,e.props),e.children))this.host.insert(t,this.mount(i),null);return t}patch(e,t){let i=e.node;return(t.node=i,ed(t)&&ed(e))?(this.applyProps(i,e.props,t.props),this.patchChildren(i,e.children,t.children)):ed(t)||t.text===e.text||this.host.setText(i,t.text),i}applyProps(e,t,i){for(let o of(this.applyClass(e,t.class,i.class),this.applyStyle(e,t.style??{},i.style??{}),this.applyEvents(e,t.on??{},i.on??{}),Object.keys(i))){if(ef(o))continue;let n=i[o];n!==t[o]&&this.applyAttr(e,o,n)}for(let o of Object.keys(t))ef(o)||o in i||(el.has(o)?this.host.setProperty(e,o,""):this.host.removeAttribute(e,o))}applyAttr(e,t,i){el.has(t)?this.host.setProperty(e,t,i):!1===i||null==i?this.host.removeAttribute(e,t):this.host.setAttribute(e,t,!0===i?"":"string"==typeof i?i:"number"==typeof i||"boolean"==typeof i||"bigint"==typeof i?i+"":JSON.stringify(i)??"")}applyClass(e,t,i){t!==i&&(i?this.host.setAttribute(e,"class",i):this.host.removeAttribute(e,"class"))}applyStyle(e,t,i){for(let o of Object.keys(i))i[o]!==t[o]&&this.host.setStyle(e,o,i[o]+"");for(let o of Object.keys(t))o in i||this.host.removeStyle(e,o)}applyEvents(e,t,i){let o=this.events.get(e);for(let n of Object.keys(t))!(n in i)&&o?.has(n)&&(this.host.removeEventListener(e,n,o.get(n).wrapper),o.delete(n));for(let t of Object.keys(i)){let n=i[t],r=o?.get(t);if(r){r.handler=n;continue}o||(o=new Map,this.events.set(e,o));let s={handler:n,wrapper:e=>s.handler(e)};o.set(t,s),this.host.addEventListener(e,t,s.wrapper)}}patchChildren(e,t,i){let o=0,n=t.length-1,r=0,s=i.length-1,a=null;for(;o<=n&&r<=s;){let l=t[o],c=t[n],d=i[r],u=i[s];if(ep(l,d)){this.patch(l,d),o++,r++;continue}if(ep(c,u)){this.patch(c,u),n--,s--;continue}if(ep(l,u)){this.patch(l,u),this.host.insert(e,l.node,this.host.nextSibling(c.node)),o++,s--;continue}if(ep(c,d)){this.patch(c,d),this.host.insert(e,c.node,l.node),n--,r++;continue}a??=function(e,t,i){let o=new Map;for(let n=t;n<=i;n++){let t=e[n].key;void 0!==t&&o.set(t,n)}return o}(t,o,n);let h=void 0!==d.key?a.get(d.key):void 0;if(void 0===h)this.host.insert(e,this.mount(d),l.node);else{let i=t[h];this.patch(i,d),i.node=void 0,this.host.insert(e,d.node,l.node)}r++}if(o>n){let t=i[s+1]?.node??null;for(let o=r;s>=o;o++)this.host.insert(e,this.mount(i[o]),t)}else if(r>s)for(let i=o;n>=i;i++){let o=t[i].node;o&&this.host.remove(e,o)}}constructor(e,t){o(this,"events",new WeakMap),o(this,"prev",null),this.host=e,this.container=t}}function ep(e,t){return e.kind===t.kind&&("text"===e.kind||e.tag===t.tag&&e.key===t.key)}function ef(e){return"key"===e||"class"===e||"style"===e||"on"===e}class em{createElement(e){return this.doc.createElement(e)}createText(e){return this.doc.createTextNode(e)}setText(e,t){e.textContent=t}insert(e,t,i){e.insertBefore(t,i)}remove(e,t){t.parentNode===e&&e.removeChild(t)}parent(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i){e.setAttribute(t,i)}removeAttribute(e,t){e.removeAttribute(t)}setProperty(e,t,i){e[t]=i}setStyle(e,t,i){e.style.setProperty(t,i)}removeStyle(e,t){e.style.removeProperty(t)}addEventListener(e,t,i){e.addEventListener(t,i)}removeEventListener(e,t,i){e.removeEventListener(t,i)}constructor(e=document){this.doc=e}}class eg{register(e){return this.tools.set(e.id,e),this.order.set(e.id,e.order??eg.UNORDERED_BASE+this.seq++),()=>{this.tools.get(e.id)===e&&(this.tools.delete(e.id),this.order.delete(e.id))}}get(e){return this.tools.get(e)}has(e){return this.tools.has(e)}list(){return[...this.tools.values()].sort((e,t)=>(this.order.get(e.id)??0)-(this.order.get(t.id)??0))}first(){return this.list()[0]}constructor(){o(this,"tools",new Map),o(this,"seq",0),o(this,"order",new Map)}}function eb(e){return ec("span",{class:"jie-icon",innerHTML:e})}function ev(){return ec("span",{class:"jie-spinner"})}function ey(e){let t=["jie-btn"];"primary"===e.variant&&t.push("jie-btn--primary"),"icon"===e.variant&&t.push("jie-btn--icon"),e.active&&t.push("jie-btn--active"),e.busy&&t.push("jie-btn--busy"),e.className&&t.push(e.className);let i=[];return e.busy?i.push(ev()):e.icon&&i.push(eb(e.icon)),e.label&&i.push(ec("span",{},e.label)),ec("button",{key:e.key,class:t.join(" "),type:"button",disabled:e.disabled??!1,title:e.title??e.label??"",on:{click:e.onClick}},i)}function ew(e){let t=e.onStart,i={input:t=>e.onInput(Number(t.target.value))};t&&(i.pointerdown=()=>t());let o=e.max-e.min||1,n=Math.min(100,Math.max(0,(e.value-e.min)/o*100));return ec("div",{class:"jie-slider"},[ec("span",{class:"jie-slider__label"},e.label),ec("input",{class:"jie-range",type:"range",min:e.min+"",max:e.max+"",step:(e.step??1)+"",value:e.value+"",style:{"--jie-range-fill":`${n}%`},on:i}),ec("span",{class:"jie-slider__value"},Math.round(e.value)+"")])}function e_(e){return ec("label",{class:"jie-field"},[ec("span",{},e.label),ec("span",{style:{display:"flex","align-items":"center",gap:"6px"}},[ec("input",{class:"jie-input",type:"number",value:e.value+"",on:{change(t){let i=Number(t.target.value);Number.isFinite(i)&&e.onChange(i)}}}),e.suffix?ec("span",{},e.suffix):null])])}function ek(e,t,i){return ec("div",{class:"jie-toolrow"},e.map(e=>ey({key:e.id,label:e.label,icon:e.icon,active:e.id===t,onClick:()=>i(e.id)})))}o(eg,"UNORDERED_BASE",1e6);let eC=e=>`<svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e}</svg>`,eS={adjust:eC('<path d="M4 8h2M9 8h11M4 16h11M18 16h2"/><circle cx="7.5" cy="8" r="1.6"/><circle cx="16.5" cy="16" r="1.6"/>'),finetune:eC('<path d="M4 7h12M4 12h16M4 17h8"/><circle cx="18" cy="7" r="1.6"/><circle cx="12" cy="17" r="1.6"/>'),filters:eC('<circle cx="9" cy="9" r="5"/><circle cx="15" cy="9" r="5"/><circle cx="12" cy="15" r="5"/>'),watermark:eC('<rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 15l5-4 4 3 3-2 6 4"/><circle cx="8.5" cy="9.5" r="1.4"/>'),annotate:eC('<path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"/>'),resize:eC('<path d="M9 3H5a2 2 0 0 0-2 2v4M21 15v4a2 2 0 0 1-2 2h-4"/><path d="M8 16l8-8M16 8h-4M16 8v4"/>'),crop:eC('<path d="M6 2v14a2 2 0 0 0 2 2h14"/><path d="M2 6h14a2 2 0 0 1 2 2v14"/>'),rotate:eC('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),flipX:eC('<path d="M12 3v18"/><path d="M8 7 4 12l4 5Z"/><path d="M16 7l4 5-4 5Z"/>'),flipY:eC('<path d="M3 12h18"/><path d="M7 8 12 4l5 4Z"/><path d="M7 16l5 4 5-4Z"/>'),undo:eC('<path d="M9 7 4 12l5 5"/><path d="M4 12h11a5 5 0 0 1 0 10h-1"/>'),redo:eC('<path d="m15 7 5 5-5 5"/><path d="M20 12H9a5 5 0 0 0 0 10h1"/>'),reset:eC('<path d="M3 12a9 9 0 1 1 2.6 6.3"/><path d="M3 21v-5h5"/>'),trash:eC('<path d="M4 7h16M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M6 7l1 13a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1l1-13M10 11v6M14 11v6"/>'),plus:eC('<path d="M12 5v14M5 12h14"/>'),minus:eC('<path d="M5 12h14"/>'),zoomIn:eC('<circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2M10.5 7.5v6M7.5 10.5h6"/>'),zoomOut:eC('<circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2M7.5 10.5h6"/>'),posTopLeft:eC('<path d="M17 17 7 7M7 13V7h6"/>'),posTop:eC('<path d="M12 19V6M7 11l5-5 5 5"/>'),posTopRight:eC('<path d="M7 17 17 7M11 7h6v6"/>'),posLeft:eC('<path d="M19 12H6M11 7l-5 5 5 5"/>'),posCenter:eC('<circle cx="12" cy="12" r="6.5"/><circle cx="12" cy="12" r="2" fill="currentColor" stroke="none"/>'),posRight:eC('<path d="M5 12h13M13 7l5 5-5 5"/>'),posBottomLeft:eC('<path d="M17 7 7 17M7 11v6h6"/>'),posBottom:eC('<path d="M12 5v13M7 13l5 5 5-5"/>'),posBottomRight:eC('<path d="M7 7l10 10M17 11v6h-6"/>'),font:eC('<path d="M4 20 9.5 6h1L16 20M6 15h8M17 20l3-9h.5l3 9M18 17h4"/>'),focus:eC('<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="3.5"/>'),lock:eC('<rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/>'),unlock:eC('<rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 0 1 7.5-2"/>'),text:eC('<path d="M5 5h14M12 5v14M9 19h6"/>'),brightness:eC('<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M5 5l1.5 1.5M17.5 17.5 19 19M19 5l-1.5 1.5M6.5 17.5 5 19"/>'),contrast:eC('<circle cx="12" cy="12" r="9"/><path d="M12 3a9 9 0 0 0 0 18Z" fill="currentColor" stroke="none"/>'),blur:eC('<path d="M12 3s6 6.5 6 11a6 6 0 0 1-12 0c0-4.5 6-11 6-11Z"/>'),book:eC('<path d="M4 5a2 2 0 0 1 2-2h5v18H6a2 2 0 0 1-2-2Z"/><path d="M20 5a2 2 0 0 0-2-2h-5v18h5a2 2 0 0 0 2-2Z"/>')},ex={id:"adjust",label:"Adjust",icon:eS.adjust,order:0,defaultTool:"crop",renderPanel({state:e,update:t,t:i}){let o=w(e),n=_(e);return ec("div",{class:"jie-toolrow"},[ey({label:i("Crop"),icon:eS.crop,active:n,onClick:()=>t({activeTab:"adjust",activeTool:n?null:"crop"})}),ey({label:i("Rotate"),icon:eS.rotate,onClick:()=>t({design:{rotate:o.rotate+90}})}),ey({label:i("Flip X"),icon:eS.flipX,onClick:()=>t({design:{flip:{horizontal:!o.flip.horizontal}}})}),ey({label:i("Flip Y"),icon:eS.flipY,onClick:()=>t({design:{flip:{vertical:!o.flip.vertical}}})})])}},eI=[{id:"brightness",label:"Brightness",icon:eS.brightness,min:-100,max:100},{id:"contrast",label:"Contrast",icon:eS.contrast,min:-100,max:100},{id:"saturation",label:"Saturation",icon:eS.filters,min:-100,max:100},{id:"blur",label:"Blur",icon:eS.blur,min:0,max:100},{id:"warmth",label:"Warmth",icon:eS.brightness,min:-100,max:100}],eE={id:"finetune",label:"Finetune",icon:eS.finetune,order:1,defaultTool:"brightness",renderPanel({state:e,update:t,t:i}){var o;let n=(o=e.activeTool,eI.find(e=>e.id===o)??eI[0]),r=w(e).finetune[n.id],s=(e,i)=>{t({design:{finetune:{[n.id]:e}},commit:i})};return ec("div",{class:"jie-panel-stack",style:{display:"contents"}},[ew({label:i(n.label),value:r,min:n.min,max:n.max,onStart:()=>s(r,!0),onInput:e=>s(e,!1)}),ek(eI.map(e=>({id:e.id,label:i(e.label),icon:e.icon})),n.id,e=>t({activeTab:"finetune",activeTool:e}))])}},eT={id:"filters",label:"Filters",icon:eS.filters,order:2,renderPanel({state:e,update:t,t:i}){let o=w(e).filter;return ec("div",{class:"jie-thumbs"},[...eo.values()].map(e=>ec("button",{key:e.id,class:"jie-thumb",type:"button","aria-pressed":(e.id===o)+"",on:{click:()=>t({design:{filter:e.id}})}},[ec("canvas",{class:"jie-thumb__swatch","data-jie-filter-thumb":e.id}),ec("span",{},i(e.label))])))}},ej={id:"focus",label:"Focus",icon:eS.focus,order:3,defaultTool:"radial",renderPanel({state:e,update:t,t:i}){let o=w(e).focus??{shape:"radial",x:.5,y:.5,radius:.28,angle:0,amount:60},n=null!==w(e).focus,r=(e,i)=>t({design:{focus:{...o,...e}},commit:i});return ec("div",{class:"jie-panel-stack",style:{display:"contents"}},[ec("div",{class:"jie-toolrow"},[ew({label:i("Intensity"),value:o.amount,min:0,max:100,onStart:()=>r({amount:o.amount},!0),onInput:e=>r({amount:e},!1)}),ew({label:i("Radius"),value:Math.round(100*o.radius),min:5,max:90,onStart:()=>r({radius:o.radius},!0),onInput:e=>r({radius:e/100},!1)}),n?ey({variant:"icon",icon:eS.trash,title:i("Reset"),onClick:()=>t({design:{focus:null}})}):null]),ek([{id:"radial",label:i("Radial")},{id:"linear",label:i("Linear")}],o.shape,e=>r({shape:e},!0))])}},eD=[{align:"left",valign:"top",icon:eS.posTopLeft},{align:"center",valign:"top",icon:eS.posTop},{align:"right",valign:"top",icon:eS.posTopRight},{align:"left",valign:"middle",icon:eS.posLeft},{align:"center",valign:"middle",icon:eS.posCenter},{align:"right",valign:"middle",icon:eS.posRight},{align:"left",valign:"bottom",icon:eS.posBottomLeft},{align:"center",valign:"bottom",icon:eS.posBottom},{align:"right",valign:"bottom",icon:eS.posBottomRight}],eA=function(e="id"){let t=0;return()=>`${e}-${++t}`}("jie"),eP="text-color",eM="text-font",eL={id:"annotate",label:"Text",icon:eS.text,order:4,defaultTool:"text",renderPanel({state:e,update:t,t:i}){var o,n,s;let a,l,c,d=w(e),u=d.annotations[0];if(!u)return ec("div",{class:"jie-toolrow"},[ey({label:i("Add text"),icon:eS.text,variant:"primary",onClick(){let e=function(e,t={}){return{id:e,type:"text",text:"Text",x:.5,y:.5,fontSize:.06,fontFamily:r[0].value,color:"#eb5757",bold:!1,italic:!1,align:"center",valign:"middle",...t}}(eA());t({design:{annotations:[e]},selectedAnnotationId:e.id})}})]);let h=e=>{var i,o;return t({design:{annotations:(i=d.annotations,o=u.id,i.map(t=>t.id===o?{...t,...e}:t))}})};return ec("div",{class:"jie-toolrow"},[ec("input",{class:"jie-input",type:"text",value:u.text,on:{input:e=>h({text:e.target.value})}}),(a=(o={value:u.fontFamily,fonts:e.fonts,title:i("Font"),open:e.activePopover===eM,onToggle:()=>t({activePopover:e.activePopover===eM?null:eM}),onPick(e){h({fontFamily:e}),t({activePopover:null})}}).fonts.find(e=>e.value===o.value),l=[ec("button",{class:"jie-fontselect__trigger",type:"button",title:o.title??"Font","aria-haspopup":"listbox","aria-expanded":o.open+"",on:{click:()=>o.onToggle()}},[eb(eS.font),ec("span",{style:{"font-family":o.value}},a?.label??"Font"),eb(eS.book)])],o.open&&l.push(ec("div",{class:"jie-popover__backdrop",on:{click:()=>o.onToggle()}}),ec("div",{class:"jie-popover jie-fontlist",role:"listbox"},o.fonts.map(e=>ec("button",{key:e.value,class:"jie-fontlist__item",type:"button","aria-pressed":(e.value===o.value)+"",style:{"font-family":e.value},on:{click:()=>o.onPick(e.value)}},e.label)))),ec("div",{class:"jie-fontselect"},l)),(c=[ec("button",{class:"jie-color",type:"button",title:(n={value:u.color,palette:e.palette,title:i("Colour"),open:e.activePopover===eP,onToggle:()=>t({activePopover:e.activePopover===eP?null:eP}),onPick(e){h({color:e}),t({activePopover:null})}}).title??"Colour",style:{background:n.value},"aria-haspopup":"true","aria-expanded":n.open+"",on:{click:()=>n.onToggle()}})],n.open&&c.push(ec("div",{class:"jie-popover__backdrop",on:{click:()=>n.onToggle()}}),ec("div",{class:"jie-popover jie-swatches",role:"listbox"},n.palette.map(e=>ec("button",{key:e,class:"jie-swatch",type:"button",title:e,style:{background:e},"aria-pressed":(e.toLowerCase()===n.value.toLowerCase())+"",on:{click:()=>n.onPick(e)}})))),ec("div",{class:"jie-colorpicker"},c)),ey({label:"B",className:"jie-btn--bold",active:u.bold,onClick:()=>h({bold:!u.bold})}),ey({label:"I",className:"jie-btn--italic",active:u.italic,onClick:()=>h({italic:!u.italic})}),ew({label:i("Size"),value:Math.round(100*u.fontSize),min:1,max:40,onInput:e=>h({fontSize:e/100})}),(s={align:u.align,valign:u.valign,onPick:(e,t)=>h({align:e,valign:t,x:"left"===e?.04:"right"===e?.96:.5,y:"top"===t?.04:"bottom"===t?.96:.5})},ec("div",{class:"jie-posgrid",role:"group"},eD.map(e=>ec("button",{key:`${e.valign}-${e.align}`,class:"jie-posgrid__cell",type:"button","data-pos":`${e.valign}-${e.align}`,"aria-pressed":(e.align===s.align&&e.valign===s.valign)+"",on:{click:()=>s.onPick(e.align,e.valign)}},[eb(e.icon)])))),ey({variant:"icon",icon:eS.trash,title:i("Delete"),onClick(){var e,i;return t({design:{annotations:(e=d.annotations,i=u.id,e.filter(e=>e.id!==i))},selectedAnnotationId:null})}})])}},eR={id:"resize",label:"Resize",icon:eS.resize,order:5,renderPanel({state:e,update:t,t:i}){let o=E(e);if(!o)return null;let n="unlocked"!==e.activeTool,r=i=>t({design:{resize:function(e,t,i,o=1){let n=e.width/e.height;if(!i)return{width:Math.max(o,Math.round(t.width??e.width)),height:Math.max(o,Math.round(t.height??e.height))};if(void 0!==t.width){let e=Math.max(o,Math.round(t.width));return{width:e,height:Math.max(o,Math.round(e/n))}}if(void 0!==t.height){let e=Math.max(o,Math.round(t.height));return{width:Math.max(o,Math.round(e*n)),height:e}}return{...e}}(o,i,n,e.minResizeSize)}});return ec("div",{class:"jie-fieldrow"},[e_({label:i("Width"),value:o.width,suffix:i("px"),onChange:e=>r({width:e})}),ey({variant:"icon",icon:n?eS.lock:eS.unlock,title:n?i("Aspect ratio locked"):i("Aspect ratio unlocked"),onClick:()=>t({activeTab:"resize",activeTool:n?"unlocked":"locked"})}),e_({label:i("Height"),value:o.height,suffix:i("px"),onChange:e=>r({height:e})}),ey({variant:"icon",icon:eS.reset,title:i("Reset size"),onClick:()=>t({design:{resize:null}})})])}};function ez(e){return parseInt(e+e,16)}function eB(e,t){return parseInt(e.slice(t,t+2),16)}let eN=/image\/(jpe?g|bmp)/i;function eF(e,t){if("u"<typeof document)throw Error("No DOM available: provide a CanvasFactory to the codec");let i=document.createElement("canvas");return i.width=e,i.height=t,{get width(){return i.width},set width(e){i.width=e},get height(){return i.height},set height(e){i.height=e},getContext:e=>i.getContext(e),toBlobAsync:(e,t)=>new Promise((o,n)=>{i.toBlob(e=>e?o(e):n(Error("canvas.toBlob returned null")),e,t)})}}class eO{async decode(e){var t,i,o;let n,r=await this.toBitmap(e),s=(t=r.width,i=r.height,o={maxSize:this.maxSize,maxPixels:this.maxPixels},n=1,o.maxSize&&o.maxSize>0&&(n=Math.min(n,o.maxSize/Math.max(t,i))),o.maxPixels&&o.maxPixels>0&&(n=Math.min(n,Math.sqrt(o.maxPixels/(t*i)))),Math.min(1,n)),a=Math.max(1,Math.round(r.width*s)),l=Math.max(1,Math.round(r.height*s)),c=this.createCanvas(a,l),d=this.context(c);d.imageSmoothingEnabled=!0,d.imageSmoothingQuality="high",d.drawImage(r,0,0,a,l),"close"in r&&"function"==typeof r.close&&r.close();let u=d.getImageData(0,0,a,l);return N(u.width,u.height,u.data)}async encode(e,t={}){let i,{type:o="image/png",quality:n=.92,background:r}=t,s=void 0!==r||eN.test(o)?function(e,[t,i,o]){let n=N(e.width,e.height);for(let r=0;r<e.data.length;r+=4){let s=e.data[r+3]/255,a=1-s;n.data[r]=e.data[r]*s+t*a,n.data[r+1]=e.data[r+1]*s+i*a,n.data[r+2]=e.data[r+2]*s+o*a,n.data[r+3]=255}return n}(e,(i=(r??"#ffffff").trim().replace(/^#/,""),/^[0-9a-f]{3}$/i.test(i)?[ez(i[0]),ez(i[1]),ez(i[2])]:/^[0-9a-f]{6}$/i.test(i)?[eB(i,0),eB(i,2),eB(i,4)]:[255,255,255])):e,a=this.createCanvas(s.width,s.height);return this.context(a).putImageData(es(s),0,0),a.toBlobAsync(o,n)}context(e){let t=e.getContext("2d");if(!t)throw Error("Unable to acquire a 2D canvas context");return t}async toBitmap(e){return"function"==typeof createImageBitmap?createImageBitmap(e,{imageOrientation:"from-image"}):new Promise((t,i)=>{let o=URL.createObjectURL(e),n=new Image;n.style.imageOrientation="from-image",n.onload=()=>{URL.revokeObjectURL(o),t(n)},n.onerror=()=>{URL.revokeObjectURL(o),i(Error("Failed to decode image blob"))},n.src=o})}constructor(e=eF,t={}){o(this,"maxPixels",void 0),o(this,"maxSize",void 0),this.createCanvas=e,this.maxPixels=t.maxPixels??0x1000000,this.maxSize=t.maxSize}}class eH{decode(e){return this.codec.decode(e)}render(e,t){let i=function(e,t){let i=e;if(t.flip.horizontal&&(i=H(i,"horizontal")),t.flip.vertical&&(i=H(i,"vertical")),0!==t.rotate&&(i=function(e,t){let i=(Math.round(t/90)%4+4)%4;if(0===i)return N(e.width,e.height,new Uint8ClampedArray(e.data));let{width:o,height:n}=e,r=1===i||3===i,s=N(r?n:o,r?o:n);for(let t=0;t<n;t++)for(let r=0;r<o;r++){let a,l;1===i?(a=n-1-t,l=r):2===i?(a=o-1-r,l=n-1-t):(a=t,l=o-1-r),V(e,F(e,r,t),s,F(s,a,l))}return s}(i,t.rotate)),0!==t.angle){let e=t.crop??{x:0,y:0,width:i.width,height:i.height};i=function(e,t,i){let o=Math.max(1,Math.round(t.width)),n=Math.max(1,Math.round(t.height)),r=N(o,n),s=t.x+t.width/2,a=t.y+t.height/2,l=i*Math.PI/180,c=Math.cos(l),d=Math.sin(l);for(let t=0;t<n;t++){let i=t+.5-n/2;for(let n=0;o>n;n++){let l=n+.5-o/2;!function(e,t,i,o,n){if(t<=-1||i<=-1||t>=e.width||i>=e.height){o.data[n]=0,o.data[n+1]=0,o.data[n+2]=0,o.data[n+3]=0;return}let r=Math.floor(t),s=Math.floor(i),a=t-r,l=i-s,c=W(r,e.width),d=W(r+1,e.width),u=W(s,e.height),h=W(s+1,e.height),p=F(e,c,u),f=F(e,d,u),m=F(e,c,h),g=F(e,d,h);for(let t=0;t<4;t++){var b,v;let i=(b=e.data[p+t],b+(e.data[f+t]-b)*a),r=(v=e.data[m+t],v+(e.data[g+t]-v)*a);o.data[n+t]=i+(r-i)*l}}(e,s+l*c-i*d-.5,a+l*d+i*c-.5,r,F(r,n,t))}}return r}(i,e,t.angle)}else t.crop&&(i=function(e,t){let i,o,n=y({x:i=Math.round(t.x),y:o=Math.round(t.y),width:Math.round(t.x+t.width)-i,height:Math.round(t.y+t.height)-o},e),r=N(n.width,n.height);for(let t=0;t<n.height;t++){let i=F(e,n.x,n.y+t),o=F(r,0,t);r.data.set(e.data.subarray(i,i+4*n.width),o)}return r}(i,t.crop));return t.resize&&(i=U(i,t.resize)),i=er(i=X(i,t.finetune),t.filter),t.focus&&(i=function(e,t){if(t.amount<=0)return N(e.width,e.height,new Uint8ClampedArray(e.data));let i=J(e,t.amount,32),{width:o,height:n}=e,r=N(o,n),s=Math.min(o,n),a=t.x*o,l=t.y*n,c=t.radius*s,d=Math.max(.06*s,.9*c),u=t.angle*Math.PI/180,h=-Math.sin(u),p=Math.cos(u);for(let s=0;s<n;s++)for(let n=0;n<o;n++){let o=n-a,u=s-l,f=function(e,t,i){if(t<=e)return+(i>=t);let o=Math.min(1,Math.max(0,(i-e)/(t-e)));return o*o*(3-2*o)}(c,c+d,"radial"===t.shape?Math.hypot(o,u):Math.abs(o*h+u*p)),m=F(r,n,s);for(let t=0;t<4;t++)r.data[m+t]=e.data[m+t]+(i.data[m+t]-e.data[m+t])*f}return r}(i,t.focus)),i}(e,t);return function(e,t,i){if(0===i.length)return t;let o=e(t.width,t.height).getContext("2d");if(!o)throw Error("Unable to acquire a 2D canvas context");for(let e of(o.putImageData(es(t),0,0),i)){if("text"!==e.type)continue;let i=function(e,t){let i=Math.max(1,Math.round(e.fontSize*t.height)),o=e.bold?"bold":"normal",n=e.italic?"italic":"normal";return{text:e.text,x:Math.round(e.x*t.width),y:Math.round(e.y*t.height),fontPx:i,font:`${n} ${o} ${i}px ${e.fontFamily}`,color:e.color,align:e.align,baseline:e.valign}}(e,t);o.font=i.font,o.fillStyle=i.color,o.textAlign=i.align,o.textBaseline=i.baseline,function(e,t){let i=t.text.split(`
1444
+ `),o=1.2*t.fontPx,n=(i.length-1)*o,r="middle"===t.baseline?t.y-n/2:"bottom"===t.baseline?t.y-n:t.y;i.forEach((i,n)=>e.fillText(i,t.x,r+n*o))}(o,i)}let n=o.getImageData(0,0,t.width,t.height);return N(n.width,n.height,n.data)}(this.createCanvas,i,t.annotations)}async toBlob(e,t,i){return this.codec.encode(this.render(e,t),i)}constructor(e){o(this,"codec",void 0),o(this,"createCanvas",void 0),this.codec=e.codec,this.createCanvas=e.createCanvas}}function eU(e,t,i){e.update({zoom:t.zoom*i})}class eV{get state(){return this.store.getState()}update(e){return this.store.update(e),this}async save(){return this.handleSave()}async saveAs(){return this.handleSaveAs()}reset(){return this.handleReset(),this}use(e){let t=e.setup(this.api());return"function"==typeof t&&this.disposers.push(t),this}async fromBlob(e){this.store.update({status:"loading",error:null});try{let t=await this.processor.decode(e);if(this.destroyed)return this;this.source=t,this.previewSource=eW(t,this.previewMaxSize),this.thumbSource=eW(t,160),this.thumbVersion++,this.store.update({source:{width:t.width,height:t.height,name:e instanceof File?e.name:null,mimeType:e.type||"image/png"},resetHistory:!0,status:"ready"})}catch(e){this.store.update({status:"error",error:e instanceof Error?e.message:e+""})}return this}async toBlob(e){if(!this.source)throw Error("No image loaded — call fromBlob() first");let t=w(this.store.getState());this.store.update({status:"exporting"});try{return t.annotations.length>0&&"u">typeof document&&document.fonts&&await document.fonts.ready,await this.processor.toBlob(this.source,t,e)}finally{this.store.update({status:"ready"})}}destroy(){if(!this.destroyed){for(let e of(this.destroyed=!0,this.clearBusyTimer(),this.dragCleanup?.(),this.resizeObserver?.disconnect(),this.disposers.splice(0)))e();this.renderer.unmount(),this.store.destroy()}}api(){return{registerTool:e=>this.registry.register(e),registerFilter:e=>en(e),registerLocale:e=>this.locales.register(e),getState:()=>this.store.getState(),update:e=>this.store.update(e)}}translator(){return this.locales.translator(this.store.getState().locale)}appContext(){return{update:e=>this.store.update(e),tools:this.registry.list(),t:this.translator(),onSave:()=>void this.handleSave(),onSaveAs:()=>void this.handleSaveAs(),onReset:()=>this.handleReset(),beginCropDrag:(e,t)=>this.beginCropDrag(e,t),beginCropRotate:e=>this.beginCropRotate(e)}}handleReset(){x(this.store.getState())&&this.confirm(this.translator()("Reset all changes? You can still undo afterwards."))&&this.store.update({resetDesign:!0})}render(){if(!this.destroyed){var e,t;let i,o,n,r,s,a,l,c;this.renderer.render((e=this.store.getState(),t=this.appContext(),ec("div",{class:"jie","data-theme":e.theme},[e.showToolbar?(i=E(e),n=(o=j(e))?Math.round(100*o.scale):Math.round(100*e.zoom),r=t.t,s="loading"===e.status||"exporting"===e.status,a="exporting"===e.status&&e.busyVisible,ec("header",{class:"jie-topbar"},[ec("div",{class:"jie-topbar__save"},[ey({label:r("Save"),variant:"primary",onClick:()=>t.onSave(),disabled:!e.source||s,busy:a}),ey({label:r("Save as"),onClick:()=>t.onSaveAs(),disabled:!e.source||s,busy:a})]),ec("div",{class:"jie-topbar__meta"},[i?ec("span",{},`${i.width} x ${i.height} px`):null,eb(eS.book),ec("div",{class:"jie-zoom"},[ey({variant:"icon",icon:eS.zoomOut,title:r("Zoom out"),onClick:()=>eU(t,e,1/1.2)}),ec("span",{},`${n}%`),ey({variant:"icon",icon:eS.zoomIn,title:r("Zoom in"),onClick:()=>eU(t,e,1.2)})])]),ec("div",{class:"jie-topbar__actions"},[ey({variant:"icon",icon:eS.reset,title:r("Reset"),disabled:!x(e),onClick:()=>t.onReset()}),ey({variant:"icon",icon:eS.undo,title:r("Undo"),disabled:!C(e),onClick:()=>t.update({history:{step:-1}})}),ey({variant:"icon",icon:eS.redo,title:r("Redo"),disabled:!S(e),onClick:()=>t.update({history:{step:1}})})])])):null,ec("div",{class:"jie-body"},[ec("nav",{class:"jie-rail"},t.tools.map(i=>ec("button",{key:i.id,class:"jie-tab",type:"button","aria-selected":(e.activeTab===i.id)+"",on:{click:()=>t.update({activeTab:i.id,activeTool:i.defaultTool??null})}},[eb(i.icon),ec("span",{},t.t(i.label))]))),(l=t.tools.find(t=>t.id===e.activeTab)??t.tools[0],c=l?.renderPanel({state:e,update:t.update,t:t.t})??null,ec("div",{class:"jie-stage"},[ec("div",{class:"jie-canvas-wrap","data-jie-canvas-wrap":""},[ec("canvas",{class:"jie-canvas","data-jie-canvas":""}),function(e,t){if(!_(e))return null;let i=j(e),o=A(e);if(!i||!o)return null;let n=D(e);return ec("div",{class:"jie-crop",style:{left:`${i.offsetX+o.x*i.scale}px`,top:`${i.offsetY+o.y*i.scale}px`,width:`${o.width*i.scale}px`,height:`${o.height*i.scale}px`,transform:`rotate(${n}deg)`},on:{pointerdown:e=>t.beginCropDrag("move",e)}},[ec("div",{key:"rotate",class:"jie-crop__rotate",title:"Rotate",on:{pointerdown(e){e.stopPropagation(),t.beginCropRotate(e)}}}),...["nw","ne","sw","se"].map(e=>ec("div",{key:e,class:"jie-crop__handle","data-h":e,on:{pointerdown(i){i.stopPropagation(),t.beginCropDrag(e,i)}}}))])}(e,t),"loading"===e.status?ec("div",{class:"jie-overlay","data-jie-loading":""},[ev()]):"error"===e.status&&e.error?ec("div",{class:"jie-overlay jie-overlay--error","data-jie-error":""},[ec("span",{},t.t("Failed to load the image")),ec("span",{class:"jie-overlay__detail"},e.error)]):null]),c?ec("div",{class:"jie-panel"},[c]):null]))])]))),this.ensureViewportObserver(),this.paint(),this.paintFilterThumbs()}}async handleSave(){if(!this.canExport())return;let e=await this.toBlob();this.onSaveCb?.(e,this),this.container.dispatchEvent(new CustomEvent("jie:save",{detail:{blob:e},bubbles:!0}))}async handleSaveAs(){if(!this.canExport())return;let e=await this.toBlob();this.onSaveAsCb?.(e,this),this.container.dispatchEvent(new CustomEvent("jie:saveas",{detail:{blob:e},bubbles:!0}))}canExport(){let{status:e}=this.store.getState();return null!==this.source&&"exporting"!==e&&"loading"!==e}syncBusyTimer(e){"exporting"!==e.status?this.clearBusyTimer():e.busyVisible||null!==this.busyTimer||(this.busyTimer=setTimeout(()=>{this.busyTimer=null,this.destroyed||"exporting"!==this.store.getState().status||this.store.update({busyVisible:!0})},this.spinnerDelay))}clearBusyTimer(){null!==this.busyTimer&&(clearTimeout(this.busyTimer),this.busyTimer=null)}ensureViewportObserver(){let e=this.container.querySelector("[data-jie-canvas-wrap]");if(e&&e!==this.observedWrap){if(this.resizeObserver?.disconnect(),this.observedWrap=e,"u"<typeof ResizeObserver)return void this.measureViewport(e);this.resizeObserver=new ResizeObserver(()=>this.measureViewport(e)),this.resizeObserver.observe(e),this.measureViewport(e)}}measureViewport(e){let{clientWidth:t,clientHeight:i}=e,o=this.store.getState().viewport;t<=0||i<=0||o&&o.width===t&&o.height===i||this.store.update({viewport:{width:t,height:i}})}paint(){let e=this.store.getState(),t=this.container.querySelector("[data-jie-canvas]");if(!t||!this.previewSource||!e.viewport)return;let i=j(e);if(!i)return;let o=k(e),n=`${this.thumbVersion}:${JSON.stringify(o)}`;n===this.cachedRasterKey&&this.cachedRaster||(this.cachedRaster=this.processor.render(this.previewSource,o),this.cachedRasterKey=n);let r=`${n}@${e.viewport.width}x${e.viewport.height}:${i.scale}:${i.offsetX},${i.offsetY}`;r!==this.lastPaintKey&&(this.lastPaintKey=r,function(e,t,i,o){let n="u">typeof window&&window.devicePixelRatio||1;e.width=Math.max(1,Math.round(i.width*n)),e.height=Math.max(1,Math.round(i.height*n));let r=e.getContext("2d");if(!r)return;r.setTransform(n,0,0,n,0,0),r.clearRect(0,0,i.width,i.height);let s=document.createElement("canvas");s.width=t.width,s.height=t.height;let a=s.getContext("2d");a&&(a.putImageData(es(t),0,0),r.imageSmoothingEnabled=!0,r.imageSmoothingQuality="high",r.drawImage(s,o.offsetX,o.offsetY,o.width,o.height))}(t,this.cachedRaster,e.viewport,i))}paintFilterThumbs(){let e=this.thumbSource;if(e)for(let t of this.container.querySelectorAll("canvas[data-jie-filter-thumb]")){let i=t.dataset.jieFilterThumb;if(!i)continue;let o=`${this.thumbVersion}:${i}`;if(t.dataset.key===o)continue;let n=er(e,i);t.width=n.width,t.height=n.height;let r=t.getContext("2d");r&&(r.putImageData(es(n),0,0),t.dataset.key=o)}}beginCropDrag(e,t){let i=this.store.getState(),o=j(i),n=A(i),r=I(i);if(!o||!n||!r)return;let s=D(i),a=i.minCropSize,l=t.clientX,c=t.clientY;this.runPointerGesture(t,t=>{let i=(t.clientX-l)/o.scale,d=(t.clientY-c)/o.scale;return{crop:0!==s?function(e,t,i,o,n,r=8){if("move"===i)return{...e,x:e.x+o,y:e.y+n};let[s,a]=L[i],l=z(e,t,s,a),c=z(e,t,-s,-a),d={x:l.x+o,y:l.y+n},u=(d.x+c.x)/2,h=(d.y+c.y)/2,p=t*M,f=Math.cos(p),m=Math.sin(p),g=d.x-c.x,b=d.y-c.y,v=Math.max(r,Math.abs(g*f+b*m)),y=Math.max(r,Math.abs(-(g*m)+b*f));return{x:u-v/2,y:h-y/2,width:v,height:y}}(n,s,e,i,d,a):function(e,t,i,o,n,r=null,s=8){var a;let l,c;if("move"===t)return y({...e,x:e.x+i,y:e.y+o},n);let{x:d,y:u,width:h,height:p}=e;if("nw"===t||"sw"===t){let e=v(d+i,0,d+h-s);h+=d-e,d=e}else h=v(h+i,s,n.width-d);if("nw"===t||"ne"===t){let e=v(u+o,0,u+p-s);p+=u-e,u=e}else p=v(p+o,s,n.height-u);let f={x:d,y:u,width:h,height:p};return null!==r&&r>0&&(l=(a=f).width/r,c="sw"===t||"se"===t?a.y:a.y+a.height-l,f={...a,height:l,y:c}),y(f,n)}(n,e,i,d,r,null,a)}})}beginCropRotate(e){let t=this.store.getState(),i=j(t),o=A(t),n=this.observedWrap??this.container.querySelector("[data-jie-canvas-wrap]");if(!i||!o||!n)return;let r=n.getBoundingClientRect(),s=R(o),a=r.left+i.offsetX+s.x*i.scale,l=r.top+i.offsetY+s.y*i.scale,c=D(t),d=B(a,l,e.clientX,e.clientY);this.runPointerGesture(e,e=>{let t=c+(B(a,l,e.clientX,e.clientY)-d);return 2>Math.abs(t)&&(t=0),{angle:Math.round(10*t)/10}})}runPointerGesture(e,t){e.preventDefault();let i=!1,o=e=>{this.store.update({design:t(e),commit:!i}),i=!0},n=()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",n),this.dragCleanup=null};window.addEventListener("pointermove",o),window.addEventListener("pointerup",n),this.dragCleanup=n}constructor(e){for(let t of(o(this,"store",void 0),o(this,"container",void 0),o(this,"renderer",void 0),o(this,"registry",new eg),o(this,"locales",new ea),o(this,"processor",void 0),o(this,"previewMaxSize",void 0),o(this,"spinnerDelay",void 0),o(this,"busyTimer",null),o(this,"onSaveCb",void 0),o(this,"onSaveAsCb",void 0),o(this,"confirm",void 0),o(this,"source",null),o(this,"previewSource",null),o(this,"thumbSource",null),o(this,"thumbVersion",0),o(this,"cachedRaster",null),o(this,"cachedRasterKey",""),o(this,"lastPaintKey",""),o(this,"disposers",[]),o(this,"resizeObserver",null),o(this,"observedWrap",null),o(this,"dragCleanup",null),o(this,"destroyed",!1),this.container=function(e){if("string"!=typeof e)return e;let t=document.querySelector(e);if(!t)throw Error("Container not found: "+e);return t}(e.container),this.processor=e.processor??function(e=eF,t){return new eH({codec:new eO(e,t),createCanvas:e})}(void 0,{maxPixels:e.maxSourcePixels,maxSize:e.maxSourceSize}),this.previewMaxSize=e.previewMaxSize??1600,this.spinnerDelay=Math.max(0,e.spinnerDelay??250),this.onSaveCb=e.onSave,this.onSaveAsCb=e.onSaveAs,this.confirm=e.confirm??(e=>"u"<typeof window||window.confirm(e)),e.locales??[]))this.locales.register(t);for(let t of(this.store=new b({scheduler:e.scheduler??function(){if("function"!=typeof requestAnimationFrame)return new m(e=>setTimeout(e,16),e=>clearTimeout(e));let e=e=>{cancelAnimationFrame(e.raf),null!==e.timer&&(clearTimeout(e.timer),e.timer=null)};return new m(t=>{let i={raf:0,timer:null},o=()=>{e(i),t()};return i.raf=requestAnimationFrame(o),i.timer=setTimeout(o,100),i},e)}(),initialState:{...c(),...e.state,...e.locale?{locale:e.locale}:{},...void 0!==e.minCropSize?{minCropSize:Math.max(1,e.minCropSize)}:{},...void 0!==e.minResizeSize?{minResizeSize:Math.max(1,e.minResizeSize)}:{},...e.palette?{palette:e.palette}:{},...e.fonts?{fonts:e.fonts}:{}}}),e.tools??[ex,eE,eT,ej,eL,eR]))this.registry.register(t);for(let t of e.plugins??[])this.use(t);this.renderer=new eh(new em(document),this.container),this.disposers.push(this.store.subscribe(()=>this.render())),this.disposers.push(this.store.subscribe(e=>this.syncBusyTimer(e))),this.render(),e.image&&this.fromBlob(e.image)}}function eW(e,t){let i=Math.max(e.width,e.height);if(t>=i)return e;let o=t/i;return U(e,{width:Math.round(e.width*o),height:Math.round(e.height*o)})}i.d(t,["ICONS",0,eS,"selectors",0,P])},82749:function(e,t,i){"use strict";function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{_:function(){return o}})},72573:function(e,t,i){"use strict";function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function n(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}i.d(t,{marked:function(){return ew}});var r,s=n(),a={exec:()=>null};function l(e,t=""){let i="string"==typeof e?e:e.source,o={replace(e,t){let n="string"==typeof t?t:t.source;return n=n.replace(d.caret,"$1"),i=i.replace(e,n),o},getRegex:()=>new RegExp(i,t)};return o}var c=(()=>{try{return!!RegExp("(?<=1)(?<!1)")}catch{return!1}})(),d={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,h=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,f=l(p).replace(/bull/g,h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),m=l(p).replace(/bull/g,h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),g=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v=l(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",b).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),y=l(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,h).getRegex(),w="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k=l("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",_).replace("tag",w).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C=l(g).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),S={blockquote:l(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:v,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:k,lheading:f,list:y,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:C,table:a,text:/^[^\n]+/},x=l("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),I={...S,lheading:m,table:x,paragraph:l(g).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex()},E={...S,html:l("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:l(g).replace("hr",u).replace("heading",` *#{1,6} *[^
1445
+ ]`).replace("lheading",f).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},T=/^( {2,}|\\)\n(?!\s*$)/,j=/[\p{P}\p{S}]/u,D=/[\s\p{P}\p{S}]/u,A=/[^\s\p{P}\p{S}]/u,P=l(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,D).getRegex(),M=/(?!~)[\p{P}\p{S}]/u,L=l(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",c?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),R=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,z=l(R,"u").replace(/punct/g,j).getRegex(),B=l(R,"u").replace(/punct/g,M).getRegex(),N="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",F=l(N,"gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,D).replace(/punct/g,j).getRegex(),O=l(N,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,M).getRegex(),H=l("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,D).replace(/punct/g,j).getRegex(),U=l(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,j).getRegex(),V=l("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,D).replace(/punct/g,j).getRegex(),W=l(/\\(punct)/,"gu").replace(/punct/g,j).getRegex(),$=l(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),K=l(_).replace("(?:--\x3e|$)","--\x3e").getRegex(),G=l("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",K).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Y=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,q=l(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Y).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J=l(/^!?\[(label)\]\[(ref)\]/).replace("label",Y).replace("ref",b).getRegex(),X=l(/^!?\[(ref)\](?:\[\])?/).replace("ref",b).getRegex(),Z=l("reflink|nolink(?!\\()","g").replace("reflink",J).replace("nolink",X).getRegex(),Q=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ee={_backpedal:a,anyPunctuation:W,autolink:$,blockSkip:L,br:T,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:a,delLDelim:a,delRDelim:a,emStrongLDelim:z,emStrongRDelimAst:F,emStrongRDelimUnd:H,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:q,nolink:X,punctuation:P,reflink:J,reflinkSearch:Z,tag:G,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:a},et={...ee,link:l(/^!?\[(label)\]\((.*?)\)/).replace("label",Y).getRegex(),reflink:l(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y).getRegex()},ei={...ee,emStrongRDelimAst:O,emStrongLDelim:B,delLDelim:U,delRDelim:V,url:l(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Q).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:l(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Q).getRegex()},eo={...ei,br:l(T).replace("{2,}","*").getRegex(),text:l(ei.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},en={normal:S,gfm:I,pedantic:E},er={normal:ee,gfm:ei,breaks:eo,pedantic:et},es={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ea=e=>es[e];function el(e,t){if(t){if(d.escapeTest.test(e))return e.replace(d.escapeReplace,ea)}else if(d.escapeTestNoEncode.test(e))return e.replace(d.escapeReplaceNoEncode,ea);return e}function ec(e){try{e=encodeURI(e).replace(d.percentDecode,"%")}catch{return null}return e}function ed(e,t){let i=e.replace(d.findPipe,(e,t,i)=>{let o=!1,n=t;for(;--n>=0&&"\\"===i[n];)o=!o;return o?"|":" |"}).split(d.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(d.slashPipe,"|");return i}function eu(e,t,i){let o=e.length;if(0===o)return"";let n=0;for(;n<o;){let r=e.charAt(o-n-1);if(r!==t||i)if(r!==t&&i)n++;else break;else n++}return e.slice(0,o-n)}function eh(e,t,i,o,n){let r=t.href,s=t.title||null,a=e[1].replace(n.other.outputLinkReplace,"$1");o.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:i,href:r,title:s,text:a,tokens:o.inlineTokens(a)};return o.state.inLink=!1,l}var ep=class{space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:eu(e,`
1434
1446
  `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],i=function(e,t,i){let o=e.match(i.other.indentCodeCompensation);if(null===o)return t;let n=o[1];return t.split(`
1435
1447
  `).map(e=>{let t=e.match(i.other.beginningSpace);if(null===t)return e;let[o]=t;return o.length>=n.length?e.slice(n.length):e}).join(`
1436
1448
  `)}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=eu(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:eu(t[0],`