jodit-pro 1.3.39 → 2.0.0-beta.10

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 (455) hide show
  1. package/.nvmrc +1 -0
  2. package/CHANGELOG.md +982 -0
  3. package/LICENSE.txt +1 -0
  4. package/README.md +27 -27
  5. package/SECURITY.md +10 -0
  6. package/es2015/jodit.css +4945 -0
  7. package/es2015/jodit.fat.min.css +1 -0
  8. package/es2015/jodit.fat.min.js +10 -0
  9. package/es2015/jodit.js +42706 -0
  10. package/es2015/jodit.min.css +1 -0
  11. package/es2015/jodit.min.js +10 -0
  12. package/es2015/plugins/autocomplete/autocomplete.css +26 -0
  13. package/es2015/plugins/autocomplete/autocomplete.js +473 -0
  14. package/es2015/plugins/autocomplete/autocomplete.min.js +10 -0
  15. package/es2015/plugins/backup/backup.css +48 -0
  16. package/es2015/plugins/backup/backup.js +567 -0
  17. package/{build/plugins/backup/backup.css → es2015/plugins/backup/backup.min.css} +1 -1
  18. package/es2015/plugins/backup/backup.min.js +10 -0
  19. package/es2015/plugins/button-generator/button-generator.css +316 -0
  20. package/es2015/plugins/button-generator/button-generator.js +1363 -0
  21. package/es2015/plugins/button-generator/button-generator.min.css +1 -0
  22. package/es2015/plugins/button-generator/button-generator.min.js +10 -0
  23. package/es2015/plugins/change-case/change-case.js +171 -0
  24. package/es2015/plugins/change-case/change-case.min.js +10 -0
  25. package/es2015/plugins/color-picker/color-picker.css +133 -0
  26. package/es2015/plugins/color-picker/color-picker.js +519 -0
  27. package/es2015/plugins/color-picker/color-picker.min.css +1 -0
  28. package/es2015/plugins/color-picker/color-picker.min.js +10 -0
  29. package/es2015/plugins/emoji/emoji.css +108 -0
  30. package/es2015/plugins/emoji/emoji.js +421 -0
  31. package/es2015/plugins/emoji/emoji.min.css +1 -0
  32. package/es2015/plugins/emoji/emoji.min.js +10 -0
  33. package/es2015/plugins/export-docs/export-docs.js +153 -0
  34. package/es2015/plugins/export-docs/export-docs.min.js +10 -0
  35. package/es2015/plugins/finder/finder.css +1342 -0
  36. package/es2015/plugins/finder/finder.js +3175 -0
  37. package/es2015/plugins/finder/finder.min.css +1 -0
  38. package/es2015/plugins/finder/finder.min.js +10 -0
  39. package/es2015/plugins/google-maps/google-maps.css +397 -0
  40. package/es2015/plugins/google-maps/google-maps.js +2492 -0
  41. package/es2015/plugins/google-maps/google-maps.min.css +1 -0
  42. package/es2015/plugins/google-maps/google-maps.min.js +10 -0
  43. package/es2015/plugins/google-search/google-search.js +108 -0
  44. package/es2015/plugins/google-search/google-search.min.js +10 -0
  45. package/es2015/plugins/highlight-signature/highlight-signature.js +233 -0
  46. package/es2015/plugins/highlight-signature/highlight-signature.min.js +10 -0
  47. package/es2015/plugins/iframe-editor/iframe-editor.css +16 -0
  48. package/es2015/plugins/iframe-editor/iframe-editor.js +310 -0
  49. package/es2015/plugins/iframe-editor/iframe-editor.min.js +10 -0
  50. package/es2015/plugins/keyboard/keyboard.css +48 -0
  51. package/es2015/plugins/keyboard/keyboard.js +539 -0
  52. package/es2015/plugins/keyboard/keyboard.min.js +10 -0
  53. package/es2015/plugins/mobile-view/mobile-view.js +170 -0
  54. package/es2015/plugins/mobile-view/mobile-view.min.js +10 -0
  55. package/es2015/plugins/page-break/page-break.js +181 -0
  56. package/es2015/plugins/page-break/page-break.min.js +10 -0
  57. package/es2015/plugins/paste-code/paste-code.css +21 -0
  58. package/es2015/plugins/paste-code/paste-code.js +320 -0
  59. package/es2015/plugins/paste-code/paste-code.min.js +10 -0
  60. package/es2015/plugins/paste-from-word/paste-from-word.js +1541 -0
  61. package/es2015/plugins/paste-from-word/paste-from-word.min.js +10 -0
  62. package/es2015/plugins/show-blocks/show-blocks.js +645 -0
  63. package/es2015/plugins/show-blocks/show-blocks.min.js +10 -0
  64. package/es2015/plugins/todo-list/todo-list.css +77 -0
  65. package/es2015/plugins/todo-list/todo-list.js +314 -0
  66. package/es2015/plugins/todo-list/todo-list.min.css +1 -0
  67. package/es2015/plugins/todo-list/todo-list.min.js +10 -0
  68. package/es2015/plugins/translate/translate.css +91 -0
  69. package/es2015/plugins/translate/translate.js +630 -0
  70. package/es2015/plugins/translate/translate.min.js +10 -0
  71. package/es2015/plugins/tune-block/tune-block.css +37 -0
  72. package/es2015/plugins/tune-block/tune-block.js +387 -0
  73. package/{build/plugins/tune-block/tune-block.css → es2015/plugins/tune-block/tune-block.min.css} +1 -1
  74. package/es2015/plugins/tune-block/tune-block.min.js +10 -0
  75. package/es2018/jodit.css +4945 -0
  76. package/es2018/jodit.fat.min.css +1 -0
  77. package/es2018/jodit.fat.min.js +10 -0
  78. package/es2018/jodit.js +42762 -0
  79. package/es2018/jodit.min.css +1 -0
  80. package/es2018/jodit.min.js +10 -0
  81. package/es2018/plugins/autocomplete/autocomplete.css +26 -0
  82. package/es2018/plugins/autocomplete/autocomplete.js +471 -0
  83. package/es2018/plugins/autocomplete/autocomplete.min.js +10 -0
  84. package/es2018/plugins/backup/backup.css +48 -0
  85. package/es2018/plugins/backup/backup.js +561 -0
  86. package/{build/plugins/backup/backup.es5.css → es2018/plugins/backup/backup.min.css} +1 -1
  87. package/es2018/plugins/backup/backup.min.js +10 -0
  88. package/es2018/plugins/button-generator/button-generator.css +316 -0
  89. package/es2018/plugins/button-generator/button-generator.js +1387 -0
  90. package/es2018/plugins/button-generator/button-generator.min.css +1 -0
  91. package/es2018/plugins/button-generator/button-generator.min.js +10 -0
  92. package/es2018/plugins/change-case/change-case.js +171 -0
  93. package/es2018/plugins/change-case/change-case.min.js +10 -0
  94. package/es2018/plugins/color-picker/color-picker.css +133 -0
  95. package/es2018/plugins/color-picker/color-picker.js +519 -0
  96. package/es2018/plugins/color-picker/color-picker.min.css +1 -0
  97. package/es2018/plugins/color-picker/color-picker.min.js +10 -0
  98. package/es2018/plugins/emoji/emoji.css +108 -0
  99. package/es2018/plugins/emoji/emoji.js +425 -0
  100. package/es2018/plugins/emoji/emoji.min.css +1 -0
  101. package/es2018/plugins/emoji/emoji.min.js +10 -0
  102. package/es2018/plugins/export-docs/export-docs.js +157 -0
  103. package/es2018/plugins/export-docs/export-docs.min.js +10 -0
  104. package/es2018/plugins/finder/finder.css +1342 -0
  105. package/es2018/plugins/finder/finder.js +3160 -0
  106. package/es2018/plugins/finder/finder.min.css +1 -0
  107. package/es2018/plugins/finder/finder.min.js +10 -0
  108. package/es2018/plugins/google-maps/google-maps.css +397 -0
  109. package/es2018/plugins/google-maps/google-maps.js +2556 -0
  110. package/es2018/plugins/google-maps/google-maps.min.css +1 -0
  111. package/es2018/plugins/google-maps/google-maps.min.js +10 -0
  112. package/es2018/plugins/google-search/google-search.js +108 -0
  113. package/es2018/plugins/google-search/google-search.min.js +10 -0
  114. package/es2018/plugins/highlight-signature/highlight-signature.js +233 -0
  115. package/es2018/plugins/highlight-signature/highlight-signature.min.js +10 -0
  116. package/es2018/plugins/iframe-editor/iframe-editor.css +16 -0
  117. package/es2018/plugins/iframe-editor/iframe-editor.js +310 -0
  118. package/es2018/plugins/iframe-editor/iframe-editor.min.js +10 -0
  119. package/es2018/plugins/keyboard/keyboard.css +48 -0
  120. package/es2018/plugins/keyboard/keyboard.js +539 -0
  121. package/es2018/plugins/keyboard/keyboard.min.js +10 -0
  122. package/es2018/plugins/mobile-view/mobile-view.js +170 -0
  123. package/es2018/plugins/mobile-view/mobile-view.min.js +10 -0
  124. package/es2018/plugins/page-break/page-break.js +181 -0
  125. package/es2018/plugins/page-break/page-break.min.js +10 -0
  126. package/es2018/plugins/paste-code/paste-code.css +21 -0
  127. package/es2018/plugins/paste-code/paste-code.js +318 -0
  128. package/es2018/plugins/paste-code/paste-code.min.js +10 -0
  129. package/es2018/plugins/paste-from-word/paste-from-word.js +1541 -0
  130. package/es2018/plugins/paste-from-word/paste-from-word.min.js +10 -0
  131. package/es2018/plugins/show-blocks/show-blocks.js +645 -0
  132. package/es2018/plugins/show-blocks/show-blocks.min.js +10 -0
  133. package/es2018/plugins/todo-list/todo-list.css +77 -0
  134. package/es2018/plugins/todo-list/todo-list.js +314 -0
  135. package/es2018/plugins/todo-list/todo-list.min.css +1 -0
  136. package/es2018/plugins/todo-list/todo-list.min.js +10 -0
  137. package/es2018/plugins/translate/translate.css +91 -0
  138. package/es2018/plugins/translate/translate.js +639 -0
  139. package/es2018/plugins/translate/translate.min.js +10 -0
  140. package/es2018/plugins/tune-block/tune-block.css +37 -0
  141. package/es2018/plugins/tune-block/tune-block.js +387 -0
  142. package/{build/plugins/tune-block/tune-block.es5.css → es2018/plugins/tune-block/tune-block.min.css} +1 -1
  143. package/es2018/plugins/tune-block/tune-block.min.js +10 -0
  144. package/es2021/jodit.css +4945 -0
  145. package/es2021/jodit.fat.min.css +1 -0
  146. package/es2021/jodit.fat.min.js +10 -0
  147. package/es2021/jodit.js +42643 -0
  148. package/es2021/jodit.min.css +1 -0
  149. package/es2021/jodit.min.js +10 -0
  150. package/es2021/plugins/autocomplete/autocomplete.css +26 -0
  151. package/es2021/plugins/autocomplete/autocomplete.js +463 -0
  152. package/es2021/plugins/autocomplete/autocomplete.min.css +1 -0
  153. package/es2021/plugins/autocomplete/autocomplete.min.js +10 -0
  154. package/es2021/plugins/backup/backup.css +48 -0
  155. package/es2021/plugins/backup/backup.js +554 -0
  156. package/es2021/plugins/backup/backup.min.css +1 -0
  157. package/es2021/plugins/backup/backup.min.js +10 -0
  158. package/es2021/plugins/button-generator/button-generator.css +316 -0
  159. package/es2021/plugins/button-generator/button-generator.js +1382 -0
  160. package/es2021/plugins/button-generator/button-generator.min.css +1 -0
  161. package/es2021/plugins/button-generator/button-generator.min.js +10 -0
  162. package/es2021/plugins/change-case/change-case.js +171 -0
  163. package/es2021/plugins/change-case/change-case.min.js +10 -0
  164. package/es2021/plugins/color-picker/color-picker.css +133 -0
  165. package/es2021/plugins/color-picker/color-picker.js +517 -0
  166. package/es2021/plugins/color-picker/color-picker.min.css +1 -0
  167. package/es2021/plugins/color-picker/color-picker.min.js +10 -0
  168. package/es2021/plugins/emoji/emoji.css +108 -0
  169. package/es2021/plugins/emoji/emoji.js +425 -0
  170. package/es2021/plugins/emoji/emoji.min.css +1 -0
  171. package/es2021/plugins/emoji/emoji.min.js +10 -0
  172. package/es2021/plugins/export-docs/export-docs.js +156 -0
  173. package/es2021/plugins/export-docs/export-docs.min.js +10 -0
  174. package/es2021/plugins/finder/finder.css +1342 -0
  175. package/es2021/plugins/finder/finder.js +3152 -0
  176. package/es2021/plugins/finder/finder.min.css +1 -0
  177. package/es2021/plugins/finder/finder.min.js +10 -0
  178. package/es2021/plugins/google-maps/google-maps.css +397 -0
  179. package/es2021/plugins/google-maps/google-maps.js +2540 -0
  180. package/es2021/plugins/google-maps/google-maps.min.css +1 -0
  181. package/es2021/plugins/google-maps/google-maps.min.js +10 -0
  182. package/es2021/plugins/google-search/google-search.js +107 -0
  183. package/es2021/plugins/google-search/google-search.min.js +10 -0
  184. package/es2021/plugins/highlight-signature/highlight-signature.js +231 -0
  185. package/es2021/plugins/highlight-signature/highlight-signature.min.js +10 -0
  186. package/es2021/plugins/iframe-editor/iframe-editor.css +16 -0
  187. package/es2021/plugins/iframe-editor/iframe-editor.js +308 -0
  188. package/es2021/plugins/iframe-editor/iframe-editor.min.css +1 -0
  189. package/es2021/plugins/iframe-editor/iframe-editor.min.js +10 -0
  190. package/es2021/plugins/keyboard/keyboard.css +48 -0
  191. package/es2021/plugins/keyboard/keyboard.js +537 -0
  192. package/es2021/plugins/keyboard/keyboard.min.css +1 -0
  193. package/es2021/plugins/keyboard/keyboard.min.js +10 -0
  194. package/es2021/plugins/mobile-view/mobile-view.js +168 -0
  195. package/es2021/plugins/mobile-view/mobile-view.min.js +10 -0
  196. package/es2021/plugins/page-break/page-break.js +181 -0
  197. package/es2021/plugins/page-break/page-break.min.js +10 -0
  198. package/es2021/plugins/paste-code/paste-code.css +21 -0
  199. package/es2021/plugins/paste-code/paste-code.js +318 -0
  200. package/es2021/plugins/paste-code/paste-code.min.css +1 -0
  201. package/es2021/plugins/paste-code/paste-code.min.js +10 -0
  202. package/es2021/plugins/paste-from-word/paste-from-word.js +1528 -0
  203. package/es2021/plugins/paste-from-word/paste-from-word.min.js +10 -0
  204. package/es2021/plugins/show-blocks/show-blocks.js +645 -0
  205. package/es2021/plugins/show-blocks/show-blocks.min.js +10 -0
  206. package/es2021/plugins/todo-list/todo-list.css +77 -0
  207. package/es2021/plugins/todo-list/todo-list.js +313 -0
  208. package/es2021/plugins/todo-list/todo-list.min.css +1 -0
  209. package/es2021/plugins/todo-list/todo-list.min.js +10 -0
  210. package/es2021/plugins/translate/translate.css +91 -0
  211. package/es2021/plugins/translate/translate.js +636 -0
  212. package/es2021/plugins/translate/translate.min.css +1 -0
  213. package/es2021/plugins/translate/translate.min.js +10 -0
  214. package/es2021/plugins/tune-block/tune-block.css +37 -0
  215. package/es2021/plugins/tune-block/tune-block.js +385 -0
  216. package/es2021/plugins/tune-block/tune-block.min.css +1 -0
  217. package/es2021/plugins/tune-block/tune-block.min.js +10 -0
  218. package/es2021.en/jodit.css +4945 -0
  219. package/es2021.en/jodit.fat.min.css +1 -0
  220. package/es2021.en/jodit.fat.min.js +10 -0
  221. package/es2021.en/jodit.js +40989 -0
  222. package/es2021.en/jodit.min.css +1 -0
  223. package/es2021.en/jodit.min.js +10 -0
  224. package/es2021.en/plugins/autocomplete/autocomplete.css +26 -0
  225. package/es2021.en/plugins/autocomplete/autocomplete.js +463 -0
  226. package/es2021.en/plugins/autocomplete/autocomplete.min.css +1 -0
  227. package/es2021.en/plugins/autocomplete/autocomplete.min.js +10 -0
  228. package/es2021.en/plugins/backup/backup.css +48 -0
  229. package/es2021.en/plugins/backup/backup.js +554 -0
  230. package/es2021.en/plugins/backup/backup.min.css +1 -0
  231. package/es2021.en/plugins/backup/backup.min.js +10 -0
  232. package/es2021.en/plugins/button-generator/button-generator.css +316 -0
  233. package/es2021.en/plugins/button-generator/button-generator.js +1382 -0
  234. package/es2021.en/plugins/button-generator/button-generator.min.css +1 -0
  235. package/es2021.en/plugins/button-generator/button-generator.min.js +10 -0
  236. package/es2021.en/plugins/change-case/change-case.js +171 -0
  237. package/es2021.en/plugins/change-case/change-case.min.js +10 -0
  238. package/es2021.en/plugins/color-picker/color-picker.css +133 -0
  239. package/es2021.en/plugins/color-picker/color-picker.js +517 -0
  240. package/es2021.en/plugins/color-picker/color-picker.min.css +1 -0
  241. package/es2021.en/plugins/color-picker/color-picker.min.js +10 -0
  242. package/es2021.en/plugins/emoji/emoji.css +108 -0
  243. package/es2021.en/plugins/emoji/emoji.js +425 -0
  244. package/es2021.en/plugins/emoji/emoji.min.css +1 -0
  245. package/es2021.en/plugins/emoji/emoji.min.js +10 -0
  246. package/es2021.en/plugins/export-docs/export-docs.js +156 -0
  247. package/es2021.en/plugins/export-docs/export-docs.min.js +10 -0
  248. package/es2021.en/plugins/finder/finder.css +1342 -0
  249. package/es2021.en/plugins/finder/finder.js +3117 -0
  250. package/es2021.en/plugins/finder/finder.min.css +1 -0
  251. package/es2021.en/plugins/finder/finder.min.js +10 -0
  252. package/es2021.en/plugins/google-maps/google-maps.css +397 -0
  253. package/es2021.en/plugins/google-maps/google-maps.js +2540 -0
  254. package/es2021.en/plugins/google-maps/google-maps.min.css +1 -0
  255. package/es2021.en/plugins/google-maps/google-maps.min.js +10 -0
  256. package/es2021.en/plugins/google-search/google-search.js +107 -0
  257. package/es2021.en/plugins/google-search/google-search.min.js +10 -0
  258. package/es2021.en/plugins/highlight-signature/highlight-signature.js +231 -0
  259. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +10 -0
  260. package/es2021.en/plugins/iframe-editor/iframe-editor.css +16 -0
  261. package/es2021.en/plugins/iframe-editor/iframe-editor.js +308 -0
  262. package/es2021.en/plugins/iframe-editor/iframe-editor.min.css +1 -0
  263. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +10 -0
  264. package/es2021.en/plugins/keyboard/keyboard.css +48 -0
  265. package/es2021.en/plugins/keyboard/keyboard.js +537 -0
  266. package/es2021.en/plugins/keyboard/keyboard.min.css +1 -0
  267. package/es2021.en/plugins/keyboard/keyboard.min.js +10 -0
  268. package/es2021.en/plugins/mobile-view/mobile-view.js +168 -0
  269. package/es2021.en/plugins/mobile-view/mobile-view.min.js +10 -0
  270. package/es2021.en/plugins/page-break/page-break.js +181 -0
  271. package/es2021.en/plugins/page-break/page-break.min.js +10 -0
  272. package/es2021.en/plugins/paste-code/paste-code.css +21 -0
  273. package/es2021.en/plugins/paste-code/paste-code.js +318 -0
  274. package/es2021.en/plugins/paste-code/paste-code.min.css +1 -0
  275. package/es2021.en/plugins/paste-code/paste-code.min.js +10 -0
  276. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1528 -0
  277. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +10 -0
  278. package/es2021.en/plugins/show-blocks/show-blocks.js +322 -0
  279. package/es2021.en/plugins/show-blocks/show-blocks.min.js +10 -0
  280. package/es2021.en/plugins/todo-list/todo-list.css +77 -0
  281. package/es2021.en/plugins/todo-list/todo-list.js +313 -0
  282. package/es2021.en/plugins/todo-list/todo-list.min.css +1 -0
  283. package/es2021.en/plugins/todo-list/todo-list.min.js +10 -0
  284. package/es2021.en/plugins/translate/translate.css +91 -0
  285. package/es2021.en/plugins/translate/translate.js +636 -0
  286. package/es2021.en/plugins/translate/translate.min.css +1 -0
  287. package/es2021.en/plugins/translate/translate.min.js +10 -0
  288. package/es2021.en/plugins/tune-block/tune-block.css +37 -0
  289. package/es2021.en/plugins/tune-block/tune-block.js +385 -0
  290. package/es2021.en/plugins/tune-block/tune-block.min.css +1 -0
  291. package/es2021.en/plugins/tune-block/tune-block.min.js +10 -0
  292. package/es5/jodit.css +5956 -0
  293. package/es5/jodit.fat.min.css +1 -0
  294. package/es5/jodit.fat.min.js +10 -0
  295. package/es5/jodit.js +49879 -0
  296. package/es5/jodit.min.css +15 -0
  297. package/es5/jodit.min.js +10 -0
  298. package/es5/plugins/autocomplete/autocomplete.css +26 -0
  299. package/es5/plugins/autocomplete/autocomplete.js +536 -0
  300. package/es5/plugins/autocomplete/autocomplete.min.css +1 -0
  301. package/es5/plugins/autocomplete/autocomplete.min.js +10 -0
  302. package/es5/plugins/backup/backup.css +48 -0
  303. package/es5/plugins/backup/backup.js +599 -0
  304. package/es5/plugins/backup/backup.min.css +1 -0
  305. package/es5/plugins/backup/backup.min.js +10 -0
  306. package/es5/plugins/button-generator/button-generator.css +316 -0
  307. package/es5/plugins/button-generator/button-generator.js +1310 -0
  308. package/es5/plugins/button-generator/button-generator.min.css +1 -0
  309. package/es5/plugins/button-generator/button-generator.min.js +10 -0
  310. package/es5/plugins/change-case/change-case.js +179 -0
  311. package/es5/plugins/change-case/change-case.min.js +10 -0
  312. package/es5/plugins/color-picker/color-picker.css +133 -0
  313. package/es5/plugins/color-picker/color-picker.js +525 -0
  314. package/es5/plugins/color-picker/color-picker.min.css +1 -0
  315. package/es5/plugins/color-picker/color-picker.min.js +10 -0
  316. package/es5/plugins/emoji/emoji.css +108 -0
  317. package/es5/plugins/emoji/emoji.js +459 -0
  318. package/es5/plugins/emoji/emoji.min.css +1 -0
  319. package/es5/plugins/emoji/emoji.min.js +10 -0
  320. package/es5/plugins/export-docs/export-docs.js +174 -0
  321. package/es5/plugins/export-docs/export-docs.min.js +10 -0
  322. package/es5/plugins/finder/finder.css +1342 -0
  323. package/es5/plugins/finder/finder.js +3335 -0
  324. package/es5/plugins/finder/finder.min.css +1 -0
  325. package/es5/plugins/finder/finder.min.js +10 -0
  326. package/es5/plugins/google-maps/google-maps.css +397 -0
  327. package/es5/plugins/google-maps/google-maps.js +2463 -0
  328. package/es5/plugins/google-maps/google-maps.min.css +1 -0
  329. package/es5/plugins/google-maps/google-maps.min.js +10 -0
  330. package/es5/plugins/google-search/google-search.js +113 -0
  331. package/es5/plugins/google-search/google-search.min.js +10 -0
  332. package/es5/plugins/highlight-signature/highlight-signature.js +253 -0
  333. package/es5/plugins/highlight-signature/highlight-signature.min.js +10 -0
  334. package/es5/plugins/iframe-editor/iframe-editor.css +16 -0
  335. package/es5/plugins/iframe-editor/iframe-editor.js +319 -0
  336. package/es5/plugins/iframe-editor/iframe-editor.min.css +1 -0
  337. package/es5/plugins/iframe-editor/iframe-editor.min.js +10 -0
  338. package/es5/plugins/keyboard/keyboard.css +48 -0
  339. package/es5/plugins/keyboard/keyboard.js +556 -0
  340. package/es5/plugins/keyboard/keyboard.min.css +1 -0
  341. package/es5/plugins/keyboard/keyboard.min.js +10 -0
  342. package/es5/plugins/mobile-view/mobile-view.js +176 -0
  343. package/es5/plugins/mobile-view/mobile-view.min.js +10 -0
  344. package/es5/plugins/page-break/page-break.js +169 -0
  345. package/es5/plugins/page-break/page-break.min.js +10 -0
  346. package/es5/plugins/paste-code/paste-code.css +21 -0
  347. package/es5/plugins/paste-code/paste-code.js +348 -0
  348. package/es5/plugins/paste-code/paste-code.min.css +1 -0
  349. package/es5/plugins/paste-code/paste-code.min.js +10 -0
  350. package/es5/plugins/paste-from-word/paste-from-word.js +1670 -0
  351. package/es5/plugins/paste-from-word/paste-from-word.min.js +10 -0
  352. package/es5/plugins/show-blocks/show-blocks.js +649 -0
  353. package/es5/plugins/show-blocks/show-blocks.min.js +10 -0
  354. package/es5/plugins/todo-list/todo-list.css +77 -0
  355. package/es5/plugins/todo-list/todo-list.js +324 -0
  356. package/es5/plugins/todo-list/todo-list.min.css +1 -0
  357. package/es5/plugins/todo-list/todo-list.min.js +10 -0
  358. package/es5/plugins/translate/translate.css +91 -0
  359. package/es5/plugins/translate/translate.js +657 -0
  360. package/es5/plugins/translate/translate.min.css +1 -0
  361. package/es5/plugins/translate/translate.min.js +10 -0
  362. package/es5/plugins/tune-block/tune-block.css +37 -0
  363. package/es5/plugins/tune-block/tune-block.js +397 -0
  364. package/es5/plugins/tune-block/tune-block.min.css +1 -0
  365. package/es5/plugins/tune-block/tune-block.min.js +10 -0
  366. package/examples/arabic.lang.html +8 -8
  367. package/examples/color-picker.html +6 -6
  368. package/examples/custom-icons.html +8 -8
  369. package/examples/custom-toolbar.html +8 -8
  370. package/examples/example.default.html +6 -6
  371. package/examples/fullsize.html +8 -8
  372. package/examples/index.html +6 -6
  373. package/examples/inline-mode.html +8 -8
  374. package/examples/oneinstance.html +8 -8
  375. package/examples/theme.html +6 -6
  376. package/package.json +6 -22
  377. package/LICENSE.md +0 -3
  378. package/build/jodit.css +0 -1
  379. package/build/jodit.es5.css +0 -8
  380. package/build/jodit.es5.js +0 -1
  381. package/build/jodit.fat.css +0 -1
  382. package/build/jodit.fat.es5.css +0 -1
  383. package/build/jodit.fat.es5.js +0 -1
  384. package/build/jodit.fat.js +0 -1
  385. package/build/jodit.js +0 -1
  386. package/build/plugins/autocomplete/autocomplete.es5.js +0 -1
  387. package/build/plugins/autocomplete/autocomplete.js +0 -1
  388. package/build/plugins/backup/backup.es5.js +0 -1
  389. package/build/plugins/backup/backup.js +0 -1
  390. package/build/plugins/button-generator/button-generator.css +0 -1
  391. package/build/plugins/button-generator/button-generator.es5.css +0 -1
  392. package/build/plugins/button-generator/button-generator.es5.js +0 -1
  393. package/build/plugins/button-generator/button-generator.js +0 -1
  394. package/build/plugins/change-case/change-case.es5.js +0 -1
  395. package/build/plugins/change-case/change-case.js +0 -1
  396. package/build/plugins/color-picker/color-picker.css +0 -1
  397. package/build/plugins/color-picker/color-picker.es5.css +0 -1
  398. package/build/plugins/color-picker/color-picker.es5.js +0 -1
  399. package/build/plugins/color-picker/color-picker.js +0 -1
  400. package/build/plugins/emoji/emoji.css +0 -1
  401. package/build/plugins/emoji/emoji.es5.css +0 -1
  402. package/build/plugins/emoji/emoji.es5.js +0 -1
  403. package/build/plugins/emoji/emoji.js +0 -1
  404. package/build/plugins/export-docs/export-docs.es5.js +0 -1
  405. package/build/plugins/export-docs/export-docs.js +0 -1
  406. package/build/plugins/finder/finder.css +0 -1
  407. package/build/plugins/finder/finder.es5.css +0 -1
  408. package/build/plugins/finder/finder.es5.js +0 -1
  409. package/build/plugins/finder/finder.js +0 -1
  410. package/build/plugins/google-maps/google-maps.css +0 -1
  411. package/build/plugins/google-maps/google-maps.es5.css +0 -1
  412. package/build/plugins/google-maps/google-maps.es5.js +0 -1
  413. package/build/plugins/google-maps/google-maps.js +0 -1
  414. package/build/plugins/google-search/google-search.es5.js +0 -1
  415. package/build/plugins/google-search/google-search.js +0 -1
  416. package/build/plugins/highlight-signature/highlight-signature.es5.js +0 -1
  417. package/build/plugins/highlight-signature/highlight-signature.js +0 -1
  418. package/build/plugins/iframe-editor/iframe-editor.es5.js +0 -1
  419. package/build/plugins/iframe-editor/iframe-editor.js +0 -1
  420. package/build/plugins/keyboard/keyboard.es5.js +0 -1
  421. package/build/plugins/keyboard/keyboard.js +0 -1
  422. package/build/plugins/mobile-view/mobile-view.css +0 -0
  423. package/build/plugins/mobile-view/mobile-view.es5.css +0 -0
  424. package/build/plugins/mobile-view/mobile-view.es5.js +0 -1
  425. package/build/plugins/mobile-view/mobile-view.js +0 -1
  426. package/build/plugins/page-break/page-break.css +0 -1
  427. package/build/plugins/page-break/page-break.es5.css +0 -1
  428. package/build/plugins/page-break/page-break.es5.js +0 -1
  429. package/build/plugins/page-break/page-break.js +0 -1
  430. package/build/plugins/paste-code/paste-code.es5.js +0 -1
  431. package/build/plugins/paste-code/paste-code.js +0 -1
  432. package/build/plugins/paste-from-word/paste-from-word.es5.js +0 -1
  433. package/build/plugins/paste-from-word/paste-from-word.js +0 -1
  434. package/build/plugins/show-blocks/show-blocks.es5.js +0 -1
  435. package/build/plugins/show-blocks/show-blocks.js +0 -1
  436. package/build/plugins/todo-list/todo-list.css +0 -1
  437. package/build/plugins/todo-list/todo-list.es5.css +0 -1
  438. package/build/plugins/todo-list/todo-list.es5.js +0 -1
  439. package/build/plugins/todo-list/todo-list.js +0 -1
  440. package/build/plugins/translate/translate.es5.js +0 -1
  441. package/build/plugins/translate/translate.js +0 -1
  442. package/build/plugins/tune-block/tune-block.es5.js +0 -1
  443. package/build/plugins/tune-block/tune-block.js +0 -1
  444. package/index.html +0 -268
  445. /package/{build/config.js → config.js} +0 -0
  446. /package/{build/plugins/autocomplete/autocomplete.css → es2015/plugins/autocomplete/autocomplete.min.css} +0 -0
  447. /package/{build/plugins/iframe-editor/iframe-editor.css → es2015/plugins/iframe-editor/iframe-editor.min.css} +0 -0
  448. /package/{build/plugins/keyboard/keyboard.css → es2015/plugins/keyboard/keyboard.min.css} +0 -0
  449. /package/{build/plugins/paste-code/paste-code.css → es2015/plugins/paste-code/paste-code.min.css} +0 -0
  450. /package/{build/plugins/translate/translate.css → es2015/plugins/translate/translate.min.css} +0 -0
  451. /package/{build/plugins/autocomplete/autocomplete.es5.css → es2018/plugins/autocomplete/autocomplete.min.css} +0 -0
  452. /package/{build/plugins/iframe-editor/iframe-editor.es5.css → es2018/plugins/iframe-editor/iframe-editor.min.css} +0 -0
  453. /package/{build/plugins/keyboard/keyboard.es5.css → es2018/plugins/keyboard/keyboard.min.css} +0 -0
  454. /package/{build/plugins/paste-code/paste-code.es5.css → es2018/plugins/paste-code/paste-code.min.css} +0 -0
  455. /package/{build/plugins/translate/translate.es5.css → es2018/plugins/translate/translate.min.css} +0 -0
@@ -0,0 +1,3152 @@
1
+ /*!
2
+ * jodit-pro - PRO Version of Jodit Editor
3
+ * Author: Chupurnov Valeriy <chupurnov@gmail.com>
4
+ * Version: v2.0.0-beta.10
5
+ * Url: https://xdsoft.net/jodit/pro/
6
+ * License(s): SEE LICENSE IN LICENSE.md
7
+ */
8
+
9
+ (function webpackUniversalModuleDefinition(root, factory) {
10
+ if(typeof exports === 'object' && typeof module === 'object')
11
+ module.exports = factory();
12
+ else if(typeof define === 'function' && define.amd)
13
+ define([], factory);
14
+ else {
15
+ var a = factory();
16
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
+ }
18
+ })(self, function() {
19
+ return (self["webpackChunkjodit_pro"] = self["webpackChunkjodit_pro"] || []).push([[524],{
20
+
21
+ /***/ 82942:
22
+ /***/ (function(module) {
23
+
24
+ module.exports = "<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M365.4,59.628c60.56,0,109.6,49.03,109.6,109.47c0,109.47-109.6,171.8-219.06,281.271 C146.47,340.898,37,278.568,37,169.099c0-60.44,49.04-109.47,109.47-109.47c54.73,0,82.1,27.37,109.47,82.1 C283.3,86.999,310.67,59.628,365.4,59.628z\"/> </svg>"
25
+
26
+ /***/ }),
27
+
28
+ /***/ 19327:
29
+ /***/ (function(module) {
30
+
31
+ module.exports = "<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M28.7,16.3l-12-13c-0.4-0.4-1.1-0.4-1.5,0l-12,13C3,16.6,2.9,17,3.1,17.4C3.2,17.8,3.6,18,4,18h3v10c0,0.6,0.4,1,1,1h16 c0.6,0,1-0.4,1-1V18h3c0.4,0,0.8-0.2,0.9-0.6C29.1,17,29,16.6,28.7,16.3z\"/> </svg>"
32
+
33
+ /***/ }),
34
+
35
+ /***/ 59239:
36
+ /***/ (function(module) {
37
+
38
+ module.exports = "<svg viewBox=\"0 0 252 252\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M0 16C0 7.16344 7.16344 0 16 0H85.6364C86.5205 0 87.3797 0.29288 88.0796 0.832871L120.92 26.1671C121.62 26.7071 122.48 27 123.364 27H227C235.837 27 243 34.1634 243 43V132.335C243 134.779 240.234 136.198 238.25 134.772L233 131L226.5 127L220 124L212.5 122L202.5 120L189 120.5L179.5 122.5L170.5 125.5L161.5 130.5L157 133.5L153 137L146.5 144L141 152L137 160L134 168L132.5 178L132 183.5V189.5L133 197.5L135 205.5L137.5 211.5L139.524 214.996C141.068 217.663 139.144 221 136.062 221H16C7.16344 221 0 213.837 0 205V16Z\"/> <circle cx=\"197\" cy=\"185\" r=\"56\"/> <path d=\"M188.364 215.955V151.591H204.636V215.955H188.364ZM164.318 191.909V175.636H228.682V191.909H164.318Z\" fill=\"white\"/> </svg>"
39
+
40
+ /***/ }),
41
+
42
+ /***/ 46567:
43
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
44
+
45
+ "use strict";
46
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
47
+ /* harmony export */ "lf": function() { return /* reexport safe */ _dlgs__WEBPACK_IMPORTED_MODULE_1__.l; }
48
+ /* harmony export */ });
49
+ /* harmony import */ var _elms__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71917);
50
+ /* harmony import */ var _dlgs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87759);
51
+ /*!
52
+ * Jodit Editor (https://xdsoft.net/jodit/)
53
+ * Released under MIT see LICENSE.txt in the project root for license information.
54
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
55
+ */
56
+ /**
57
+ * @module traits
58
+ */
59
+
60
+
61
+
62
+
63
+
64
+ /***/ }),
65
+
66
+ /***/ 68813:
67
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
68
+
69
+ "use strict";
70
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
71
+ /* harmony export */ "X": function() { return /* binding */ FileBrowserPro; }
72
+ /* harmony export */ });
73
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(97582);
74
+ /* harmony import */ var _ui_assets_icons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68349);
75
+ /* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8079);
76
+ /* harmony import */ var jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2932);
77
+ /* harmony import */ var _ui_panel_panel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96123);
78
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95582);
79
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50526);
80
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11612);
81
+ /* harmony import */ var _helpers_state_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83568);
82
+ /* harmony import */ var _ui_header_header__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65669);
83
+ /* harmony import */ var jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(92803);
84
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(77628);
85
+ /* harmony import */ var _ui_progress_progress__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(22840);
86
+ /* harmony import */ var jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(3028);
87
+ /* harmony import */ var jodit_core_traits__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46567);
88
+ /* harmony import */ var _helpers_persistent_store__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(93469);
89
+ /* harmony import */ var _helpers_history_manager__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(9581);
90
+ /* harmony import */ var _helpers_context_menu__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(63052);
91
+ /* harmony import */ var _helpers_helpers__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(70467);
92
+ /* harmony import */ var _JoditPro__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(88292);
93
+ /* harmony import */ var _license_license__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(19564);
94
+ /* harmony import */ var _ui_lightboox_lightbox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(41424);
95
+ /* harmony import */ var _helpers_loading_manager__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(48086);
96
+ /*!
97
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
98
+ * See LICENSE.md in the project root for license information.
99
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
100
+ */
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ let FileBrowserPro = class FileBrowserPro extends jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .Vq {
126
+ /** @override */
127
+ className() {
128
+ return 'FileBrowserPro';
129
+ }
130
+ /** @override */
131
+ lock(name = 'any') {
132
+ this.container.classList.add('jodit_disabled');
133
+ return super.lock(name);
134
+ }
135
+ unlock() {
136
+ this.container.classList.remove('jodit_disabled');
137
+ return super.unlock();
138
+ }
139
+ status(message, success = !(message instanceof Error)) {
140
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isAbort)(message)) {
141
+ return;
142
+ }
143
+ if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.IS_PROD && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(message)) {
144
+ console.error(message);
145
+ }
146
+ this.message.message((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(message) ? message : message.message, success ? 'success' : 'error', this.options.howLongShowMsg);
147
+ }
148
+ get progressbar() {
149
+ return new _ui_progress_progress__WEBPACK_IMPORTED_MODULE_11__/* .UIProgress */ .u(this, this.stateManager.state);
150
+ }
151
+ constructor(options) {
152
+ super((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(Object.assign(options || {}, {
153
+ resizable: true,
154
+ draggable: true,
155
+ toolbarButtons: options?.toolbarButtons ||
156
+ jodit_config__WEBPACK_IMPORTED_MODULE_10__.Config.defaultOptions.filebrowser.buttons,
157
+ buttons: _JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.atom */ .y.atom([
158
+ 'filebrowser.settings',
159
+ 'fullsize',
160
+ 'dialog.close'
161
+ ])
162
+ }), jodit_config__WEBPACK_IMPORTED_MODULE_10__.Config.defaultOptions.filebrowser));
163
+ this.dataProvider = (0,jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_12__/* .makeDataProvider */ .S)(this, this.options);
164
+ this.state = (0,jodit_modules__WEBPACK_IMPORTED_MODULE_1__.observable)({
165
+ onSelectCallBack: null,
166
+ theme: 'default',
167
+ showSideBar: true,
168
+ showFavorites: true,
169
+ showSettings: false,
170
+ showPreview: false,
171
+ withFolders: true,
172
+ foldersPosition: 'bottom',
173
+ info: '',
174
+ metaInfo: null,
175
+ currentPath: '',
176
+ currentSource: '',
177
+ currentBaseUrl: '',
178
+ tree: [],
179
+ activeElements: [],
180
+ favorites: [],
181
+ progress: 0,
182
+ lastSelectedIndex: 0,
183
+ elements: [],
184
+ messages: [],
185
+ sources: [],
186
+ view: 'tiles',
187
+ tileSize: 'default',
188
+ sortBy: 'name-asc',
189
+ filterWord: '',
190
+ onlyImages: false
191
+ });
192
+ this.persistent = new _helpers_persistent_store__WEBPACK_IMPORTED_MODULE_14__/* .PersistentStore */ .h(this, this.state);
193
+ this.loadingManager = new _helpers_loading_manager__WEBPACK_IMPORTED_MODULE_20__/* .LoadingManager */ .l(this, this.state);
194
+ this.stateManager = new _helpers_state_manager__WEBPACK_IMPORTED_MODULE_7__/* .StateManager */ .O(this.state);
195
+ this.historyManager = new _helpers_history_manager__WEBPACK_IMPORTED_MODULE_15__/* .HistoryManager */ .E(this, this.state);
196
+ this.contextMenuManager = new _helpers_context_menu__WEBPACK_IMPORTED_MODULE_16__/* .ContextMenuManager */ .z(this);
197
+ this.header = new _ui_header_header__WEBPACK_IMPORTED_MODULE_8__/* .UIBrowserHeader */ .C(this, this.options, this.stateManager);
198
+ this.panel = new _ui_panel_panel__WEBPACK_IMPORTED_MODULE_3__/* .UIBrowserPanel */ .G(this, this.stateManager);
199
+ this.files = this.panel;
200
+ this.tree = this.panel;
201
+ _license_license__WEBPACK_IMPORTED_MODULE_18__/* .license.make */ .V.make(this);
202
+ if (!this.persistent.theme && this.options.theme) {
203
+ this.persistent.theme = this.options.theme;
204
+ }
205
+ this.panel.append(this.progressbar);
206
+ this.toolbar.setMod('mode', 'header');
207
+ this.setSize(Math.min(this.options.width, screen.width), Math.min(this.options.height, screen.height)).setHeader(this.header);
208
+ this.onResizeWindow();
209
+ this.initUploader();
210
+ this.onChangeTheme();
211
+ this.fullFillOptions();
212
+ this.dataProvider.onProgress((percentage) => {
213
+ if (percentage === 0) {
214
+ percentage = 30;
215
+ }
216
+ this.state.progress = percentage;
217
+ });
218
+ this.e.on('beforeClose', this.removeGlobalListeners);
219
+ this.e.fire('afterInit');
220
+ _JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.prototype.afterInitHook.call */ .y.prototype.afterInitHook.call(this);
221
+ }
222
+ /** @override */
223
+ addDisclaimer(elm) {
224
+ this.dialog.appendChild(elm);
225
+ }
226
+ // @ts-ignore
227
+ async open(callback = this.o
228
+ .defaultCallback, onlyImages) {
229
+ this.state.onlyImages = Boolean(onlyImages);
230
+ this.prepareOpening(callback);
231
+ super.open(this.panel.container);
232
+ return this.e.fire('update.filebrowser');
233
+ }
234
+ /**
235
+ * Resize handler
236
+ */
237
+ onResizeWindow() {
238
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(this.dialog, {
239
+ maxWidth: screen.width,
240
+ minHeight: Math.min(this.options.height, screen.height),
241
+ minWidth: Math.min(this.options.width, screen.width)
242
+ });
243
+ }
244
+ onChangePath() {
245
+ const { currentPath, currentSource } = this.state;
246
+ this.uploader.setPath(currentPath);
247
+ this.uploader.setSource(currentSource);
248
+ }
249
+ onChangeTheme() {
250
+ this.setMod('theme', this.state.theme);
251
+ this.header.setMod('theme', this.state.theme);
252
+ this.panel.setMod('theme', this.state.theme);
253
+ this.options.theme = this.state.theme;
254
+ }
255
+ onToggleSettings() {
256
+ this.state.showSettings = !this.state.showSettings;
257
+ }
258
+ prepareOpening(callback) {
259
+ this.registerGlobalListeners();
260
+ if (callback) {
261
+ this.state.onSelectCallBack = (data) => {
262
+ this.close();
263
+ callback(data);
264
+ };
265
+ }
266
+ this.persistent.syncWithState();
267
+ }
268
+ registerGlobalListeners() {
269
+ this.e.on(this.ow, 'keydown', this.onKeyPress);
270
+ }
271
+ onKeyPress(e) {
272
+ const { activeElement } = this.od;
273
+ if (!this.state.activeElements.length ||
274
+ !activeElement ||
275
+ !jodit_modules__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(this.panel.items.container, activeElement)) {
276
+ return;
277
+ }
278
+ const elms = this.state.elements;
279
+ switch (e.key) {
280
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_ENTER: {
281
+ return this.onChooseItems();
282
+ }
283
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DELETE: {
284
+ return this.onFileRemove();
285
+ }
286
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT:
287
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_LEFT:
288
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DOWN:
289
+ case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_UP: {
290
+ const next = e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DOWN, index = this.state.lastSelectedIndex;
291
+ let nextIndex;
292
+ if ([jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT, jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_LEFT].includes(e.key)) {
293
+ if (next) {
294
+ nextIndex = !elms[index + 1] ? 0 : index + 1;
295
+ }
296
+ else {
297
+ nextIndex = !elms[index - 1]
298
+ ? elms.length - 1
299
+ : index - 1;
300
+ }
301
+ }
302
+ else {
303
+ const { countInRow } = this.panel;
304
+ nextIndex = Math.round(((index + 1) / countInRow + (next ? 1 : -1)) *
305
+ countInRow -
306
+ 1);
307
+ }
308
+ elms[nextIndex] &&
309
+ this.stateManager.addActive(elms[nextIndex], e.shiftKey);
310
+ return false;
311
+ }
312
+ }
313
+ }
314
+ removeGlobalListeners() {
315
+ this.e.off(this.ow, 'keydown', this.onKeyPress);
316
+ }
317
+ onFileRemove() {
318
+ if (this.state.activeElements.length) {
319
+ this.confirm('Are you sure?', 'Delete', (yes) => {
320
+ yes && void this.__itemsRemove(this.state.activeElements);
321
+ }).bindDestruct(this);
322
+ }
323
+ }
324
+ __itemsRemove(items) {
325
+ if (!items.length) {
326
+ return Promise.resolve();
327
+ }
328
+ const promises = [];
329
+ items.forEach((item) => {
330
+ promises.push(item.type === 'folder'
331
+ ? this.__folderRemove((0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_21__/* .parentPath */ .C)(item.path), item.name ?? '', item.sourceName)
332
+ : this.__removeFile(item.file || item.name || '', item.sourceName));
333
+ });
334
+ this.state.activeElements.forEach((el) => {
335
+ this.stateManager.isFavorite(el) &&
336
+ this.stateManager.toggleFavorite(el);
337
+ });
338
+ this.state.activeElements = [];
339
+ return Promise.allSettled(promises).then(() => Promise.allSettled([
340
+ this.loadingManager.loadItems(),
341
+ this.loadingManager.loadFolders()
342
+ ]));
343
+ }
344
+ __removeFile(name, source) {
345
+ return this.dataProvider
346
+ .fileRemove(this.state.currentPath, name, source)
347
+ .then((message) => {
348
+ this.status(message || this.i18n('File "%s" was deleted', name), true);
349
+ })
350
+ .catch(this.status);
351
+ }
352
+ __folderRemove(path, name, sourceName) {
353
+ return this.dataProvider
354
+ .folderRemove(path, name, sourceName)
355
+ .then((message) => {
356
+ this.status(message || this.i18n('Folder "%s" was deleted', name), true);
357
+ if (this.state.currentPath === path) {
358
+ this.state.currentPath = (0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_21__/* .parentPath */ .C)(path);
359
+ this.state.currentSource = sourceName;
360
+ }
361
+ })
362
+ .catch(this.status);
363
+ }
364
+ onFileEdit() {
365
+ if (this.state.activeElements.length === 1) {
366
+ const [file] = this.state.activeElements;
367
+ jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_9__/* .openImageEditor.call */ .r.call(this, file.fileURL, file.file || '', file.path, file.sourceName, undefined, this.status);
368
+ }
369
+ }
370
+ onFolderRename(data) {
371
+ this.prompt('Enter new name', 'Rename', (newName) => {
372
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isValidName)(newName) || newName === data.name) {
373
+ this.status(this.i18n('Enter new name'));
374
+ return false;
375
+ }
376
+ this.dataProvider
377
+ .folderRename((0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_21__/* .parentPath */ .C)(data.path), data.name, newName, data.sourceName)
378
+ .then((message) => {
379
+ this.state.activeElements = [];
380
+ this.status(message, true);
381
+ this.state.currentPath =
382
+ (0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_21__/* .parentPath */ .C)(data.path) + '/' + newName;
383
+ this.state.currentSource = data.sourceName;
384
+ this.historyManager.updateCurrent();
385
+ this.loadingManager.loadFolders();
386
+ })
387
+ .catch(this.status);
388
+ return;
389
+ }, this.i18n('type name'), data.name).bindDestruct(this);
390
+ }
391
+ onFolderRemove(data) {
392
+ this.confirm('Are you sure?', 'Delete', (yes) => {
393
+ yes &&
394
+ void this.__itemsRemove([
395
+ {
396
+ type: 'folder',
397
+ name: data.name,
398
+ path: data.path,
399
+ sourceName: data.sourceName
400
+ }
401
+ ]);
402
+ }).bindDestruct(this);
403
+ }
404
+ onFolderCreate(data) {
405
+ this.prompt('Enter Directory name', 'Create directory', (name) => {
406
+ const path = data.path || '/';
407
+ this.dataProvider
408
+ .createFolder(name, data.path || '/', data.sourceName)
409
+ .then(() => {
410
+ if (this.state.currentSource === data.sourceName &&
411
+ this.state.currentPath === path) {
412
+ this.e.fire('update.filebrowser');
413
+ }
414
+ else {
415
+ this.state.currentSource = data.sourceName;
416
+ this.state.currentPath = path;
417
+ }
418
+ this.historyManager.updateCurrent();
419
+ }, this.status);
420
+ }, this.i18n('type name')).bindDestruct(this);
421
+ }
422
+ onFileRename(item) {
423
+ const name = item.file || item.name || '';
424
+ if (this.state.activeElements.length === 1 && name) {
425
+ this.prompt('Enter new name', 'Rename', (newName) => {
426
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isValidName)(newName)) {
427
+ this.status(this.i18n('Enter new name'));
428
+ return false;
429
+ }
430
+ this.dataProvider
431
+ .fileRename(this.state.currentPath, name, newName, this.state.currentSource)
432
+ .then((message) => {
433
+ this.state.activeElements = [];
434
+ this.status(message, true);
435
+ void this.loadingManager.loadItems();
436
+ })
437
+ .catch(this.status);
438
+ return;
439
+ }, this.i18n('type name'), name).bindDestruct(this);
440
+ }
441
+ }
442
+ onChooseItems() {
443
+ const act = this.stateManager.state.activeElements;
444
+ if (act.length) {
445
+ if (act[0].type === 'folder') {
446
+ this.state.currentPath =
447
+ this.state.currentPath + '/' + act[0].name;
448
+ this.state.currentSource = act[0].sourceName;
449
+ this.e.fire('afterOpenFolder.filebrowser');
450
+ return;
451
+ }
452
+ if (this.state.onSelectCallBack) {
453
+ this.stateManager.callSelectHandler();
454
+ }
455
+ else {
456
+ this.onOpenLightBox(act[0]);
457
+ }
458
+ }
459
+ }
460
+ onOpenLightBox(item) {
461
+ _ui_lightboox_lightbox__WEBPACK_IMPORTED_MODULE_19__/* .UILightBox.open */ .m.open(this, item, this.state.elements);
462
+ }
463
+ initUploader() {
464
+ const self = this, uploaderOptions = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(self.o.uploader || {}, jodit_config__WEBPACK_IMPORTED_MODULE_10__.Config.defaultOptions.uploader);
465
+ const uploadHandler = () => this.loadingManager.loadItems();
466
+ self.uploader = self.getInstance('Uploader', uploaderOptions);
467
+ self.uploader.bind(self.panel.container, uploadHandler, self.status);
468
+ self.e.on('bindUploader.filebrowser', (button) => {
469
+ self.uploader.bind(button, uploadHandler, self.status);
470
+ });
471
+ }
472
+ /** @override */
473
+ destruct() {
474
+ this.removeGlobalListeners();
475
+ this.header.destruct();
476
+ this.panel.destruct();
477
+ super.destruct();
478
+ }
479
+ fullFillOptions() {
480
+ const keys = [
481
+ 'getLocalFileByUrl',
482
+ 'crop',
483
+ 'resize',
484
+ 'create',
485
+ 'fileMove',
486
+ 'folderMove',
487
+ 'fileRename',
488
+ 'folderRename',
489
+ 'fileRemove',
490
+ 'folderRemove',
491
+ 'folder',
492
+ 'items',
493
+ 'permissions'
494
+ ];
495
+ keys.forEach((key) => {
496
+ if (this.options[key] != null) {
497
+ this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(this.options[key], this.o.ajax);
498
+ }
499
+ });
500
+ }
501
+ };
502
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
503
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
504
+ ], FileBrowserPro.prototype, "status", null);
505
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
506
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
507
+ ], FileBrowserPro.prototype, "progressbar", null);
508
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
509
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':resize', { context: window })
510
+ ], FileBrowserPro.prototype, "onResizeWindow", null);
511
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
512
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(['state.currentPath', 'state.currentSource'])
513
+ ], FileBrowserPro.prototype, "onChangePath", null);
514
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
515
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)('state.theme')
516
+ ], FileBrowserPro.prototype, "onChangeTheme", null);
517
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
518
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':toggleSettings.filebrowser')
519
+ ], FileBrowserPro.prototype, "onToggleSettings", null);
520
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
521
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
522
+ ], FileBrowserPro.prototype, "onKeyPress", null);
523
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
524
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
525
+ ], FileBrowserPro.prototype, "removeGlobalListeners", null);
526
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
527
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':fileRemove.filebrowser')
528
+ ], FileBrowserPro.prototype, "onFileRemove", null);
529
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
530
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':edit.filebrowser')
531
+ ], FileBrowserPro.prototype, "onFileEdit", null);
532
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
533
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderRename.filebrowser')
534
+ ], FileBrowserPro.prototype, "onFolderRename", null);
535
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
536
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderRemove.filebrowser')
537
+ ], FileBrowserPro.prototype, "onFolderRemove", null);
538
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
539
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderCreate.filebrowser')
540
+ ], FileBrowserPro.prototype, "onFolderCreate", null);
541
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
542
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':fileRename.filebrowser')
543
+ ], FileBrowserPro.prototype, "onFileRename", null);
544
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
545
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':select.filebrowser')
546
+ ], FileBrowserPro.prototype, "onChooseItems", null);
547
+ (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
548
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':openLightBox.filebrowser')
549
+ ], FileBrowserPro.prototype, "onOpenLightBox", null);
550
+ FileBrowserPro = (0,tslib__WEBPACK_IMPORTED_MODULE_22__/* .__decorate */ .gn)([
551
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.component,
552
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.derive)(jodit_core_traits__WEBPACK_IMPORTED_MODULE_13__/* .Dlgs */ .lf)
553
+ ], FileBrowserPro);
554
+ Object.defineProperty(_JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.modules */ .y.modules, 'FileBrowserPro', {
555
+ value: FileBrowserPro,
556
+ writable: false,
557
+ enumerable: true,
558
+ configurable: true
559
+ });
560
+
561
+
562
+ /***/ }),
563
+
564
+ /***/ 99993:
565
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
566
+
567
+ "use strict";
568
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77628);
569
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81160);
570
+ /*!
571
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
572
+ * See LICENSE.md in the project root for license information.
573
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
574
+ */
575
+
576
+
577
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .extendLang */ .xl)(__webpack_require__(57591));
578
+ const fb = jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.filebrowser;
579
+ fb.settings = {
580
+ icon: 'settings',
581
+ tooltip: 'Settings',
582
+ exec: (editor) => {
583
+ const view = editor.parent ?? editor;
584
+ view.e.fire('toggleSettings.filebrowser');
585
+ }
586
+ };
587
+ fb.home = {
588
+ icon: 'home',
589
+ tooltip: 'Home',
590
+ exec: (editor) => {
591
+ editor.e.fire('goHome.filebrowser');
592
+ }
593
+ };
594
+ fb.preview = {
595
+ icon: 'eye',
596
+ tooltip: 'Preview',
597
+ isDisabled(fb) {
598
+ return fb.state.activeElements.length === 0;
599
+ },
600
+ exec: (editor) => {
601
+ editor.e.fire('togglePreview.filebrowser');
602
+ }
603
+ };
604
+ fb.next = {
605
+ icon: 'angle-right',
606
+ tooltip: 'History next',
607
+ isDisabled: (browser) => !browser.historyManager.canNext(),
608
+ exec: (editor) => {
609
+ editor.historyManager.next();
610
+ }
611
+ };
612
+ fb.previous = {
613
+ icon: 'angle-left',
614
+ tooltip: 'History previous',
615
+ isDisabled: (browser) => !browser.historyManager.canPrevious(),
616
+ exec: (editor) => {
617
+ editor.historyManager.previous();
618
+ }
619
+ };
620
+ fb['new-folder'] = {
621
+ icon: 'new-folder',
622
+ exec: (editor) => {
623
+ editor.e.fire('folderCreate.filebrowser', {
624
+ path: editor.state.currentPath,
625
+ sourceName: editor.state.currentSource
626
+ });
627
+ },
628
+ tooltip: 'New folder'
629
+ };
630
+ Object.assign(jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.filebrowser, {
631
+ buttons: [
632
+ 'filebrowser.home',
633
+ 'filebrowser.previous',
634
+ 'filebrowser.next',
635
+ '|',
636
+ 'filebrowser.upload',
637
+ 'filebrowser.new-folder',
638
+ 'filebrowser.remove',
639
+ 'filebrowser.update',
640
+ 'filebrowser.select',
641
+ 'filebrowser.edit',
642
+ '|',
643
+ 'filebrowser.preview',
644
+ 'about'
645
+ ],
646
+ sort: false,
647
+ pixelOffsetLoadNewChunk: 300,
648
+ width: 800,
649
+ height: 400,
650
+ previewOfficeURL: 'https://view.officeapps.live.com/op/view.aspx?src='
651
+ });
652
+
653
+
654
+ /***/ }),
655
+
656
+ /***/ 48531:
657
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
658
+
659
+ "use strict";
660
+ __webpack_require__.r(__webpack_exports__);
661
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
662
+ /* harmony export */ "finder": function() { return /* binding */ finder; }
663
+ /* harmony export */ });
664
+ /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7324);
665
+ /* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68813);
666
+ /* harmony import */ var _JoditPro__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88292);
667
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99993);
668
+ /*!
669
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
670
+ * See LICENSE.md in the project root for license information.
671
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
672
+ */
673
+
674
+
675
+
676
+
677
+ class finder extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */ .S {
678
+ constructor() {
679
+ super(...arguments);
680
+ /** @override */
681
+ this.hasStyle = !_JoditPro__WEBPACK_IMPORTED_MODULE_2__/* .JoditPro.fatMode */ .y.fatMode;
682
+ }
683
+ /** @override */
684
+ afterInit(jodit) {
685
+ jodit.e.on('getInstanceFileBrowser', (options) => {
686
+ if (!this.__instance) {
687
+ this.__instance = new _browser__WEBPACK_IMPORTED_MODULE_1__/* .FileBrowserPro */ .X(options);
688
+ }
689
+ return this.__instance;
690
+ });
691
+ }
692
+ /** @override */
693
+ beforeDestruct(jodit) {
694
+ jodit.e.off('getInstanceFileBrowser');
695
+ this.__instance?.destruct();
696
+ }
697
+ }
698
+ /** @override */
699
+ finder.requires = ['license'];
700
+ _JoditPro__WEBPACK_IMPORTED_MODULE_2__/* .JoditPro.plugins.add */ .y.plugins.add('finder', finder);
701
+
702
+
703
+ /***/ }),
704
+
705
+ /***/ 63052:
706
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
707
+
708
+ "use strict";
709
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
710
+ /* harmony export */ "z": function() { return /* binding */ ContextMenuManager; }
711
+ /* harmony export */ });
712
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
713
+ /* harmony import */ var jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3028);
714
+ /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22562);
715
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
716
+ /*!
717
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
718
+ * See LICENSE.md in the project root for license information.
719
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
720
+ */
721
+
722
+
723
+
724
+
725
+ let ContextMenuManager = class ContextMenuManager extends jodit_core_component__WEBPACK_IMPORTED_MODULE_1__/* .ViewComponent */ .Hr {
726
+ /** @override */
727
+ className() {
728
+ return 'ContextMenuManager';
729
+ }
730
+ onFolderContext(item, e) {
731
+ this.buildContextItemMenu(this.getFolderContextActions(item), e);
732
+ return false;
733
+ }
734
+ onItemContext(item, _, e) {
735
+ this.buildContextItemMenu(this.getItemContextActions(item), e);
736
+ return false;
737
+ }
738
+ onSourceContext(item, e) {
739
+ this.buildContextItemMenu(this.getSourceContextActions(item), e);
740
+ return false;
741
+ }
742
+ buildContextItemMenu(actions, e) {
743
+ if (!this.j.o.contextMenu) {
744
+ return;
745
+ }
746
+ const context = (0,jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_0__/* .makeContextMenu */ .L)(this.j).setMod('theme', this.j.state.theme);
747
+ context.show(e.clientX, e.clientY, actions.filter((a) => a && a.enabled !== false));
748
+ this.j.e.on(this.j, 'afterClose', () => {
749
+ if (context.isOpened) {
750
+ context.close();
751
+ }
752
+ });
753
+ }
754
+ getItemContextActions(item) {
755
+ if (!this.j.stateManager.isActive(item)) {
756
+ this.j.stateManager.addActive(item, this.j.state.activeElements.length > 1);
757
+ }
758
+ if (item.type === 'folder') {
759
+ return this.getFolderContextActions({
760
+ type: 'directory',
761
+ children: [],
762
+ name: item.name || '',
763
+ path: item.path,
764
+ sourceName: item.sourceName
765
+ });
766
+ }
767
+ const opt = this.j.options, dp = this.j.dataProvider, single = this.j.state.activeElements.length === 1;
768
+ return [
769
+ {
770
+ icon: 'pencil',
771
+ title: 'Edit',
772
+ enabled: Boolean(item.isImage) &&
773
+ opt.editImage &&
774
+ single &&
775
+ (dp.canI('ImageResize') || dp.canI('ImageCrop')),
776
+ exec: () => {
777
+ this.j.e.fire('edit.filebrowser');
778
+ }
779
+ },
780
+ {
781
+ icon: 'italic',
782
+ title: 'Rename',
783
+ enabled: dp.canI('FileRename') && single,
784
+ exec: () => this.j.e.fire('fileRename.filebrowser', item)
785
+ },
786
+ {
787
+ icon: 'bin',
788
+ title: 'Delete',
789
+ enabled: dp.canI('FileRemove'),
790
+ exec: () => this.j.e.fire('fileRemove.filebrowser', item)
791
+ },
792
+ {
793
+ icon: 'eye',
794
+ title: 'Preview',
795
+ enabled: Boolean(item.isImage || item.type === 'file') &&
796
+ opt.preview &&
797
+ single,
798
+ exec: () => this.j.e.fire('openLightBox.filebrowser', item)
799
+ },
800
+ {
801
+ icon: 'upload',
802
+ title: 'Download',
803
+ exec: () => {
804
+ // TODO Replace to download action
805
+ if (item.fileURL) {
806
+ this.j.ow.open(item.fileURL);
807
+ }
808
+ }
809
+ }
810
+ ];
811
+ }
812
+ getFolderContextActions(item) {
813
+ const dp = this.j.dataProvider;
814
+ return [
815
+ {
816
+ icon: 'pencil',
817
+ title: 'Rename',
818
+ exec: () => {
819
+ this.j.e.fire('folderRename.filebrowser', item);
820
+ },
821
+ enabled: dp.canI('FolderRename')
822
+ },
823
+ {
824
+ icon: 'bin',
825
+ title: 'Delete',
826
+ exec: () => {
827
+ this.j.e.fire('folderRemove.filebrowser', item);
828
+ },
829
+ enabled: dp.canI('FolderRemove')
830
+ },
831
+ {
832
+ icon: 'plus',
833
+ title: 'Add folder',
834
+ exec: () => {
835
+ this.j.e.fire('folderCreate.filebrowser', item);
836
+ },
837
+ enabled: dp.canI('FolderCreate')
838
+ }
839
+ ];
840
+ }
841
+ getSourceContextActions(item) {
842
+ return [
843
+ {
844
+ icon: 'plus',
845
+ title: 'Create folder',
846
+ exec: () => {
847
+ this.j.e.fire('folderCreate.filebrowser', item);
848
+ }
849
+ }
850
+ ];
851
+ }
852
+ };
853
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
854
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuFolder.filebrowser')
855
+ ], ContextMenuManager.prototype, "onFolderContext", null);
856
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
857
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuItem.filebrowser')
858
+ ], ContextMenuManager.prototype, "onItemContext", null);
859
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
860
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuSource.filebrowser')
861
+ ], ContextMenuManager.prototype, "onSourceContext", null);
862
+ ContextMenuManager = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
863
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
864
+ ], ContextMenuManager);
865
+
866
+
867
+ /***/ }),
868
+
869
+ /***/ 70467:
870
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
871
+
872
+ "use strict";
873
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
874
+ /* harmony export */ "C": function() { return /* binding */ parentPath; }
875
+ /* harmony export */ });
876
+ /*!
877
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
878
+ * See LICENSE.md in the project root for license information.
879
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
880
+ */
881
+ const parentPath = (path) => {
882
+ const parts = path.split('/').filter((p) => p.length);
883
+ parts.pop();
884
+ return parts.join('/') || '/';
885
+ };
886
+
887
+
888
+ /***/ }),
889
+
890
+ /***/ 9581:
891
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
892
+
893
+ "use strict";
894
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
895
+ /* harmony export */ "E": function() { return /* binding */ HistoryManager; }
896
+ /* harmony export */ });
897
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
898
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95582);
899
+ /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22562);
900
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
901
+ /*!
902
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
903
+ * See LICENSE.md in the project root for license information.
904
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
905
+ */
906
+
907
+
908
+
909
+
910
+ let HistoryManager = class HistoryManager extends jodit_core_component__WEBPACK_IMPORTED_MODULE_1__/* .ViewComponent */ .Hr {
911
+ /** @override */
912
+ className() {
913
+ return 'HistoryManager';
914
+ }
915
+ constructor(jodit, state) {
916
+ super(jodit);
917
+ this.state = state;
918
+ this.history = [];
919
+ this.historyIndex = 0;
920
+ }
921
+ canNext() {
922
+ return this.historyIndex < this.history.length - 1;
923
+ }
924
+ canPrevious() {
925
+ return this.historyIndex > 0;
926
+ }
927
+ push(item) {
928
+ let { historyIndex } = this;
929
+ const current = this.history[historyIndex];
930
+ if (current &&
931
+ current.currentSource === item.currentSource &&
932
+ current.currentPath === item.currentPath) {
933
+ return;
934
+ }
935
+ let history = [...this.history];
936
+ if (history.length - 1 !== historyIndex) {
937
+ history = history.slice(0, historyIndex + 1);
938
+ }
939
+ history.push(item);
940
+ if (current) {
941
+ historyIndex += 1;
942
+ }
943
+ this.history = history;
944
+ this.historyIndex = historyIndex;
945
+ }
946
+ next() {
947
+ if (this.canNext()) {
948
+ this.historyIndex += 1;
949
+ this.updateState();
950
+ }
951
+ }
952
+ previous() {
953
+ if (this.canPrevious()) {
954
+ this.historyIndex -= 1;
955
+ this.updateState();
956
+ }
957
+ }
958
+ updateCurrent() {
959
+ this.history[this.historyIndex] = {
960
+ currentSource: this.state.currentSource,
961
+ currentPath: this.state.currentPath,
962
+ tree: (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.fastClone)(this.state.tree),
963
+ elements: [...this.state.elements]
964
+ };
965
+ }
966
+ onHome() {
967
+ this.state.currentPath = '';
968
+ this.state.currentSource = '';
969
+ this.j.e.fire('afterOpenFolder.filebrowser update.filebrowser');
970
+ }
971
+ onOpenFolder() {
972
+ this.push({
973
+ tree: [],
974
+ elements: [],
975
+ currentPath: this.state.currentPath,
976
+ currentSource: this.state.currentSource
977
+ });
978
+ this.j.e.fire('changeSelection');
979
+ }
980
+ updateState() {
981
+ const { tree, elements, currentSource, currentPath } = this.history[this.historyIndex];
982
+ this.state.activeElements = [];
983
+ this.state.elements = [...elements];
984
+ this.state.tree = [...tree];
985
+ this.state.currentSource = currentSource;
986
+ this.state.currentPath = currentPath;
987
+ this.j.e.fire('changeSelection');
988
+ }
989
+ };
990
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
991
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.elements', 'state.tree'])
992
+ ], HistoryManager.prototype, "updateCurrent", null);
993
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
994
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':goHome.filebrowser')
995
+ ], HistoryManager.prototype, "onHome", null);
996
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
997
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterOpenFolder.filebrowser')
998
+ ], HistoryManager.prototype, "onOpenFolder", null);
999
+ HistoryManager = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1000
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
1001
+ ], HistoryManager);
1002
+
1003
+
1004
+ /***/ }),
1005
+
1006
+ /***/ 48086:
1007
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1008
+
1009
+ "use strict";
1010
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1011
+ /* harmony export */ "l": function() { return /* binding */ LoadingManager; }
1012
+ /* harmony export */ });
1013
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97582);
1014
+ /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22562);
1015
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1016
+ /*!
1017
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1018
+ * See LICENSE.md in the project root for license information.
1019
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1020
+ */
1021
+
1022
+
1023
+
1024
+ let LoadingManager = class LoadingManager extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewComponent */ .Hr {
1025
+ /** @override */
1026
+ className() {
1027
+ return 'LoadingManager';
1028
+ }
1029
+ /** @override */
1030
+ constructor(jodit, state) {
1031
+ super(jodit);
1032
+ this.state = state;
1033
+ this.__tick = 0;
1034
+ this.offset = 0;
1035
+ this.countInOneChunk = 20;
1036
+ this.stopLoadingParts = false;
1037
+ this.__isLoadingPart = false;
1038
+ this.__callQueueCount = 0;
1039
+ }
1040
+ async onUpdateFileBrowser() {
1041
+ this.state.activeElements = [];
1042
+ this.j.panel.setMod('loading', true);
1043
+ await Promise.all([this.loadFolders(), this.loadItems()]);
1044
+ this.j.panel.setMod('loading', false);
1045
+ }
1046
+ async loadFolders() {
1047
+ if (!this.j.isOpened) {
1048
+ return;
1049
+ }
1050
+ const { currentPath, currentSource } = this.state;
1051
+ try {
1052
+ const sources = await this.j.dataProvider.tree(currentPath, currentSource);
1053
+ this.j.stateManager.fillTreeForPath(sources, currentPath);
1054
+ this.state.sources = sources;
1055
+ }
1056
+ catch (e) {
1057
+ this.j.status(e);
1058
+ }
1059
+ }
1060
+ async loadItems() {
1061
+ if (!this.j.isOpened) {
1062
+ return;
1063
+ }
1064
+ try {
1065
+ this.__tick += 1;
1066
+ const { __tick } = this;
1067
+ this.offset = 0;
1068
+ this.stopLoadingParts = false;
1069
+ this.__callQueueCount = 0;
1070
+ const { items, loadedTotal } = await loadPartItems(this.state, this.j.dataProvider, this.offset, this.countInOneChunk);
1071
+ this.state.elements = items;
1072
+ this.stopLoadingParts = loadedTotal < this.countInOneChunk;
1073
+ await this.loadItemsChunk(__tick);
1074
+ await this.async.requestIdlePromise();
1075
+ if (this.__tick !== __tick) {
1076
+ return;
1077
+ }
1078
+ while (!this.stopLoadingParts &&
1079
+ this.j.panel.countInColumn * this.j.panel.countInRow >=
1080
+ this.state.elements.length) {
1081
+ await this.loadItemsChunk(__tick);
1082
+ if (this.__tick !== __tick) {
1083
+ return;
1084
+ }
1085
+ }
1086
+ }
1087
+ catch (e) {
1088
+ this.j.status(e);
1089
+ }
1090
+ }
1091
+ async __loadItemsChunk(tick) {
1092
+ if (this.__isLoadingPart) {
1093
+ this.__callQueueCount += 1;
1094
+ return;
1095
+ }
1096
+ if (this.stopLoadingParts) {
1097
+ this.__callQueueCount = 0;
1098
+ return;
1099
+ }
1100
+ this.__isLoadingPart = true;
1101
+ this.j.panel.items.setMod('chunk-loading', true);
1102
+ try {
1103
+ this.offset += this.countInOneChunk;
1104
+ const { items, loadedTotal } = await loadPartItems(this.state, this.j.dataProvider, this.offset, this.countInOneChunk);
1105
+ if (this.__tick !== tick) {
1106
+ return;
1107
+ }
1108
+ this.stopLoadingParts = loadedTotal < this.countInOneChunk;
1109
+ if (items.length) {
1110
+ this.state.elements = this.state.elements.concat(items);
1111
+ }
1112
+ }
1113
+ catch (e) {
1114
+ this.j.status(e);
1115
+ }
1116
+ this.j.panel.items.setMod('chunk-loading', false);
1117
+ this.__isLoadingPart = false;
1118
+ if (this.__callQueueCount > 0) {
1119
+ this.__callQueueCount -= 1;
1120
+ return this.__loadItemsChunk(tick);
1121
+ }
1122
+ }
1123
+ loadItemsChunk(tick = this.__tick) {
1124
+ if (tick !== this.__tick) {
1125
+ return Promise.resolve();
1126
+ }
1127
+ return this.__loadItemsChunk(tick);
1128
+ }
1129
+ };
1130
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1131
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':update.filebrowser')
1132
+ ], LoadingManager.prototype, "onUpdateFileBrowser", null);
1133
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1134
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['state.currentPath', 'state.currentSource']),
1135
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)((ctx) => ({
1136
+ timeout: ctx.defaultTimeout,
1137
+ promisify: true
1138
+ }))
1139
+ ], LoadingManager.prototype, "loadFolders", null);
1140
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1141
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([
1142
+ 'state.currentPath',
1143
+ 'state.currentSource',
1144
+ 'state.sortBy',
1145
+ 'state.onlyImages',
1146
+ 'state.foldersPosition',
1147
+ 'state.filterWord'
1148
+ ]),
1149
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)((ctx) => ({
1150
+ timeout: ctx.defaultTimeout,
1151
+ promisify: true
1152
+ }))
1153
+ ], LoadingManager.prototype, "loadItems", null);
1154
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1155
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)((ctx) => ({
1156
+ timeout: ctx.defaultTimeout,
1157
+ promisify: true
1158
+ }))
1159
+ ], LoadingManager.prototype, "loadItemsChunk", null);
1160
+ LoadingManager = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1161
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1162
+ ], LoadingManager);
1163
+ function loadPartItems(state, dataProvider, offset, limit) {
1164
+ const { currentPath, currentSource, sortBy, withFolders, foldersPosition, onlyImages, filterWord } = state;
1165
+ return dataProvider.itemsEx(currentPath, currentSource, {
1166
+ offset,
1167
+ limit,
1168
+ sortBy,
1169
+ withFolders,
1170
+ foldersPosition,
1171
+ onlyImages,
1172
+ filterWord
1173
+ });
1174
+ }
1175
+
1176
+
1177
+ /***/ }),
1178
+
1179
+ /***/ 93469:
1180
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1181
+
1182
+ "use strict";
1183
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1184
+ /* harmony export */ "h": function() { return /* binding */ PersistentStore; }
1185
+ /* harmony export */ });
1186
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
1187
+ /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22562);
1188
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1189
+ /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45545);
1190
+
1191
+
1192
+
1193
+
1194
+ let PersistentStore = class PersistentStore extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewComponent */ .Hr {
1195
+ /** @override */
1196
+ className() {
1197
+ return 'PersistentStore';
1198
+ }
1199
+ constructor(jodit, state) {
1200
+ super(jodit);
1201
+ this.state = state;
1202
+ this.sortBy = 'changed-desc';
1203
+ this.view = 'tiles';
1204
+ this.foldersPosition = 'top';
1205
+ this.tileSize = 'default';
1206
+ this.favorites = [];
1207
+ this.showSideBar = true;
1208
+ this.showPreview = false;
1209
+ this.showFavorites = true;
1210
+ }
1211
+ onChangeThemeSetField() {
1212
+ this.theme = this.state.theme;
1213
+ }
1214
+ onChangeView() {
1215
+ this.view = this.state.view;
1216
+ }
1217
+ onChangeSortBy() {
1218
+ this.sortBy = this.state.sortBy;
1219
+ }
1220
+ onChangeTileSize() {
1221
+ this.tileSize = this.state.tileSize;
1222
+ }
1223
+ onChangeFavorites() {
1224
+ this.favorites = this.state.favorites;
1225
+ }
1226
+ onChangeShowSideBar() {
1227
+ this.showSideBar = this.state.showSideBar;
1228
+ }
1229
+ onChangeShowPreview() {
1230
+ this.showPreview = this.state.showPreview;
1231
+ }
1232
+ onChangeShowFavorites() {
1233
+ this.showFavorites = this.state.showFavorites;
1234
+ }
1235
+ onChangeFoldersPosition() {
1236
+ this.foldersPosition = this.state.foldersPosition;
1237
+ }
1238
+ syncWithState() {
1239
+ this.state.tileSize = this.tileSize;
1240
+ this.state.favorites = this.favorites.map((item) => {
1241
+ if (item instanceof jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem */ .Z) {
1242
+ return item;
1243
+ }
1244
+ return jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem.create */ .Z.create(item);
1245
+ });
1246
+ this.state.view = this.view;
1247
+ this.state.theme = this.theme;
1248
+ this.state.showSideBar = this.showSideBar;
1249
+ this.state.showPreview = this.showPreview;
1250
+ this.state.showFavorites = this.showFavorites;
1251
+ this.state.sortBy = this.sortBy;
1252
+ this.state.foldersPosition = this.foldersPosition;
1253
+ }
1254
+ };
1255
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1256
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1257
+ ], PersistentStore.prototype, "theme", void 0);
1258
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1259
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1260
+ ], PersistentStore.prototype, "sortBy", void 0);
1261
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1262
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1263
+ ], PersistentStore.prototype, "view", void 0);
1264
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1265
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1266
+ ], PersistentStore.prototype, "foldersPosition", void 0);
1267
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1268
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1269
+ ], PersistentStore.prototype, "tileSize", void 0);
1270
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1271
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1272
+ ], PersistentStore.prototype, "favorites", void 0);
1273
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1274
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1275
+ ], PersistentStore.prototype, "showSideBar", void 0);
1276
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1277
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1278
+ ], PersistentStore.prototype, "showPreview", void 0);
1279
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1280
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
1281
+ ], PersistentStore.prototype, "showFavorites", void 0);
1282
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1283
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.theme')
1284
+ ], PersistentStore.prototype, "onChangeThemeSetField", null);
1285
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1286
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.view')
1287
+ ], PersistentStore.prototype, "onChangeView", null);
1288
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1289
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.sortBy')
1290
+ ], PersistentStore.prototype, "onChangeSortBy", null);
1291
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1292
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.tileSize')
1293
+ ], PersistentStore.prototype, "onChangeTileSize", null);
1294
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1295
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.favorites')
1296
+ ], PersistentStore.prototype, "onChangeFavorites", null);
1297
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1298
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showSideBar')
1299
+ ], PersistentStore.prototype, "onChangeShowSideBar", null);
1300
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1301
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showPreview')
1302
+ ], PersistentStore.prototype, "onChangeShowPreview", null);
1303
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1304
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showFavorites')
1305
+ ], PersistentStore.prototype, "onChangeShowFavorites", null);
1306
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1307
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.foldersPosition')
1308
+ ], PersistentStore.prototype, "onChangeFoldersPosition", null);
1309
+ PersistentStore = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1310
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1311
+ ], PersistentStore);
1312
+
1313
+
1314
+ /***/ }),
1315
+
1316
+ /***/ 83568:
1317
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1318
+
1319
+ "use strict";
1320
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1321
+ /* harmony export */ "O": function() { return /* binding */ StateManager; }
1322
+ /* harmony export */ });
1323
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97582);
1324
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50526);
1325
+ /*!
1326
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1327
+ * See LICENSE.md in the project root for license information.
1328
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1329
+ */
1330
+
1331
+
1332
+ class StateManager {
1333
+ constructor(state) {
1334
+ this.state = state;
1335
+ }
1336
+ getIndex(elm, elms = this.state.elements) {
1337
+ return elms.findIndex((item) => item.uniqueHashKey === elm.uniqueHashKey);
1338
+ }
1339
+ isActive(item) {
1340
+ return Boolean(this.state.activeElements.find((data) => data.uniqueHashKey === item.uniqueHashKey));
1341
+ }
1342
+ isFavorite(item) {
1343
+ return Boolean(this.state.favorites.find((data) => data.uniqueHashKey === item.uniqueHashKey));
1344
+ }
1345
+ addActive(item, multi) {
1346
+ this.state.metaInfo = item;
1347
+ this.state.info = item.file ?? '';
1348
+ this.state.lastSelectedIndex = this.getIndex(item);
1349
+ this.state.activeElements = multi
1350
+ ? [...this.state.activeElements, item]
1351
+ : [item];
1352
+ }
1353
+ callSelectHandler() {
1354
+ const act = this.state.activeElements;
1355
+ this.state.onSelectCallBack?.call(this, {
1356
+ baseurl: '',
1357
+ files: act.map((data) => data.fileURL),
1358
+ isImages: act.map((data) => Boolean(data.isImage))
1359
+ });
1360
+ }
1361
+ setFilter(value) {
1362
+ this.state.filterWord = value;
1363
+ }
1364
+ toggleFavorite(item) {
1365
+ const favoriteIndex = this.getIndex(item, this.state.favorites);
1366
+ const favorites = [...this.state.favorites];
1367
+ if (favoriteIndex === -1) {
1368
+ favorites.push(item);
1369
+ }
1370
+ else {
1371
+ favorites.splice(favoriteIndex, 1);
1372
+ }
1373
+ this.state.favorites = favorites;
1374
+ }
1375
+ fillTreeForPath(sources, path) {
1376
+ if (!this.state.tree.length || !path || path === '/') {
1377
+ this.state.tree = sources.map(sourceToTreeItem);
1378
+ return;
1379
+ }
1380
+ this.removeActive(this.state.tree);
1381
+ sources.forEach((source) => {
1382
+ let sourceItem = findItem(this.state.tree, source.name);
1383
+ if (!sourceItem) {
1384
+ sourceItem = sourceToTreeItem(source);
1385
+ this.state.tree.push(sourceItem);
1386
+ }
1387
+ sourceItem.isActive = true;
1388
+ const childrenItem = findTreeItem(path, sourceItem);
1389
+ if (!childrenItem) {
1390
+ return;
1391
+ }
1392
+ childrenItem.isActive = true;
1393
+ childrenItem.children = filterFolders(source.folders).map((folder) => folderToTreeItem(folder, path + '/' + folder, source.name));
1394
+ });
1395
+ this.state.tree = [...this.state.tree];
1396
+ }
1397
+ removeActive(tree) {
1398
+ tree.forEach((item) => {
1399
+ item.isActive = false;
1400
+ this.removeActive(item.children);
1401
+ });
1402
+ }
1403
+ get isFavoriteItems() {
1404
+ return this.state.favorites === this.state.elements;
1405
+ }
1406
+ }
1407
+ (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
1408
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
1409
+ ], StateManager.prototype, "getIndex", null);
1410
+ (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
1411
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
1412
+ ], StateManager.prototype, "isActive", null);
1413
+ (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
1414
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
1415
+ ], StateManager.prototype, "isFavorite", null);
1416
+ function findTreeItem(path, sourceItem) {
1417
+ return path
1418
+ .split('/')
1419
+ .reduce((item, part) => item && findItem(item.children, part), sourceItem);
1420
+ }
1421
+ function findItem(children, name) {
1422
+ return children.find((item) => item.name === name) ?? null;
1423
+ }
1424
+ function filterFolders(folders) {
1425
+ return folders.filter((folder) => folder !== '.' && folder !== '..');
1426
+ }
1427
+ function sourceToTreeItem(source) {
1428
+ return {
1429
+ type: 'source',
1430
+ name: source.name,
1431
+ title: source.title,
1432
+ sourceName: source.name,
1433
+ path: '/',
1434
+ children: filterFolders(source.folders).map((folder) => folderToTreeItem(folder, folder, source.name))
1435
+ };
1436
+ }
1437
+ function folderToTreeItem(name, path, sourceName) {
1438
+ return {
1439
+ type: 'directory',
1440
+ name,
1441
+ path,
1442
+ sourceName,
1443
+ children: []
1444
+ };
1445
+ }
1446
+
1447
+
1448
+ /***/ }),
1449
+
1450
+ /***/ 57591:
1451
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1452
+
1453
+ "use strict";
1454
+ __webpack_require__.r(__webpack_exports__);
1455
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1456
+ /* harmony export */ "ru": function() { return /* binding */ ru; }
1457
+ /* harmony export */ });
1458
+ /*!
1459
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1460
+ * See LICENSE.md in the project root for license information.
1461
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1462
+ */
1463
+ const ru = __webpack_require__(11937);
1464
+
1465
+
1466
+
1467
+ /***/ }),
1468
+
1469
+ /***/ 11937:
1470
+ /***/ (function(module) {
1471
+
1472
+ "use strict";
1473
+
1474
+ /*!
1475
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1476
+ * See LICENSE.md in the project root for license information.
1477
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1478
+ */
1479
+ module.exports = {
1480
+ Favorites: 'Избранное',
1481
+ Settings: 'Настройки',
1482
+ Light: 'Светлая',
1483
+ Dark: 'Темная',
1484
+ Theme: 'Тема',
1485
+ Show: 'Показать',
1486
+ Hide: 'Скрыть',
1487
+ 'Show favorites': 'Показывать избранное',
1488
+ Tiles: 'Плитка',
1489
+ List: 'Список',
1490
+ Compact: 'Компактный',
1491
+ View: 'Отображение',
1492
+ 'Folders position': 'Позиция папок',
1493
+ 'Sort by': 'Сортировать по',
1494
+ 'Extra small': 'Очень маленькие',
1495
+ Small: 'Маленькие',
1496
+ Large: 'Большие',
1497
+ 'Extra large': 'Очень большие',
1498
+ 'Tile size': 'Размер плитки'
1499
+ };
1500
+
1501
+
1502
+ /***/ }),
1503
+
1504
+ /***/ 68349:
1505
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
1506
+
1507
+ "use strict";
1508
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1509
+ /* harmony import */ var _heart_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82942);
1510
+ /* harmony import */ var _heart_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_heart_svg__WEBPACK_IMPORTED_MODULE_1__);
1511
+ /* harmony import */ var _home_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19327);
1512
+ /* harmony import */ var _home_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_home_svg__WEBPACK_IMPORTED_MODULE_2__);
1513
+ /* harmony import */ var _new_folder_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59239);
1514
+ /* harmony import */ var _new_folder_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_new_folder_svg__WEBPACK_IMPORTED_MODULE_3__);
1515
+ /*!
1516
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1517
+ * See LICENSE.md in the project root for license information.
1518
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1519
+ */
1520
+
1521
+
1522
+
1523
+
1524
+ jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('heart', String(_heart_svg__WEBPACK_IMPORTED_MODULE_1__));
1525
+ jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('home', String(_home_svg__WEBPACK_IMPORTED_MODULE_2__));
1526
+ jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('new-folder', String(_new_folder_svg__WEBPACK_IMPORTED_MODULE_3__));
1527
+
1528
+
1529
+ /***/ }),
1530
+
1531
+ /***/ 9890:
1532
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1533
+
1534
+ "use strict";
1535
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1536
+ /* harmony export */ "D": function() { return /* binding */ UIBrowserFolder; }
1537
+ /* harmony export */ });
1538
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
1539
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1540
+ /* harmony import */ var jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1541
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
1542
+ /*!
1543
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1544
+ * See LICENSE.md in the project root for license information.
1545
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1546
+ */
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+ let UIBrowserFolder = class UIBrowserFolder extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
1553
+ /** @override */
1554
+ className() {
1555
+ return 'UIBrowserFolder';
1556
+ }
1557
+ /** @override */
1558
+ render() {
1559
+ return `<div>
1560
+ <div class="&__icon">
1561
+ <div class='&__loader'></div>
1562
+ <div class="&__icon-wrapper">
1563
+ *folder*
1564
+ </div>
1565
+ </div>
1566
+ <div class="&__name"></div>
1567
+ <div class="&__arrow">*angle-right*</div>
1568
+ </div>`;
1569
+ }
1570
+ constructor(jodit, item) {
1571
+ super(jodit);
1572
+ this.item = item;
1573
+ /** @override */
1574
+ this.syncMod = true;
1575
+ const name = this.getElm('name');
1576
+ void 0;
1577
+ name.innerText = item.name;
1578
+ jodit.e
1579
+ .on(this.container, 'click', () => {
1580
+ if (!this.getMod('active')) {
1581
+ this.setMod('loading', true);
1582
+ }
1583
+ return jodit.e.fire('openFolder', item);
1584
+ })
1585
+ .on(this.container, 'contextmenu', (e) => {
1586
+ return jodit.e.fire('contextmenuFolder.filebrowser', item, e);
1587
+ });
1588
+ }
1589
+ };
1590
+ UIBrowserFolder = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
1591
+ jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__.component
1592
+ ], UIBrowserFolder);
1593
+
1594
+
1595
+ /***/ }),
1596
+
1597
+ /***/ 65669:
1598
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1599
+
1600
+ "use strict";
1601
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1602
+ /* harmony export */ "C": function() { return /* binding */ UIBrowserHeader; }
1603
+ /* harmony export */ });
1604
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
1605
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1606
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1607
+ /* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45429);
1608
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4682);
1609
+ /*!
1610
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1611
+ * See LICENSE.md in the project root for license information.
1612
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1613
+ */
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+ let UIBrowserHeader = class UIBrowserHeader extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
1621
+ /** @override */
1622
+ className() {
1623
+ return 'UIBrowserHeader';
1624
+ }
1625
+ constructor(jodit, options, stateManager) {
1626
+ super(jodit);
1627
+ this.options = options;
1628
+ this.stateManager = stateManager;
1629
+ /** @override */
1630
+ this.syncMod = true;
1631
+ this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_2__/* .makeCollection */ .R)(this.j);
1632
+ this.filter = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIInput */ .u3(this.j, {
1633
+ icon: 'search',
1634
+ placeholder: 'Filter',
1635
+ clearButton: true,
1636
+ onChange: (value) => {
1637
+ this.stateManager.setFilter(value);
1638
+ }
1639
+ });
1640
+ this.append(this.toolbar).append(this.filter);
1641
+ this.filter.container.classList.add(this.getFullElName('filter'));
1642
+ this.toolbar.setMod('mode', 'header').build(this.__getButtons());
1643
+ }
1644
+ __getButtons() {
1645
+ const options = (this.options.toolbarButtons ?? []);
1646
+ return options.filter((btn) => {
1647
+ if (!(0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_3__/* .isString */ .H)(btn)) {
1648
+ return true;
1649
+ }
1650
+ switch (btn) {
1651
+ case 'filebrowser.edit':
1652
+ return (this.j.dataProvider.canI('ImageResize') ||
1653
+ this.j.dataProvider.canI('ImageCrop'));
1654
+ case 'filebrowser.new-folder':
1655
+ return this.j.dataProvider.canI('FolderCreate');
1656
+ case 'filebrowser.upload':
1657
+ return this.j.dataProvider.canI('FileUpload');
1658
+ case 'filebrowser.remove':
1659
+ return this.j.dataProvider.canI('FileRemove');
1660
+ }
1661
+ return true;
1662
+ });
1663
+ }
1664
+ };
1665
+ UIBrowserHeader = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1666
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1667
+ ], UIBrowserHeader);
1668
+
1669
+
1670
+ /***/ }),
1671
+
1672
+ /***/ 87695:
1673
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1674
+
1675
+ "use strict";
1676
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1677
+ /* harmony export */ "u": function() { return /* binding */ UIBrowserItem; }
1678
+ /* harmony export */ });
1679
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97582);
1680
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1681
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1682
+ /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45545);
1683
+ /* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8079);
1684
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95582);
1685
+ /*!
1686
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1687
+ * See LICENSE.md in the project root for license information.
1688
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1689
+ */
1690
+
1691
+
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+ let UIBrowserItem = class UIBrowserItem extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
1699
+ /** @override */
1700
+ className() {
1701
+ return 'UIBrowserItem';
1702
+ }
1703
+ constructor(jodit, item) {
1704
+ super(jodit);
1705
+ this.item = jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem.create */ .Z.create(item);
1706
+ jodit.e.on(this.container, 'click contextmenu dblclick', (e) => {
1707
+ jodit.e.fire(e.type + 'Item.filebrowser', this.item, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ctrlKey)(e) || e.shiftKey, e);
1708
+ return false;
1709
+ });
1710
+ }
1711
+ /** @override */
1712
+ render() {
1713
+ return `<div tabindex='-1'>
1714
+ <div class='&__image'></div>
1715
+ <div class='&__info'></div>
1716
+ <div class='&__heart'>*heart*</div>
1717
+ </div>`;
1718
+ }
1719
+ onClickFavorite() {
1720
+ this.bubble((box) => {
1721
+ this.jodit.e.fire(box, 'toggleFavoriteItem', this.item);
1722
+ });
1723
+ return false;
1724
+ }
1725
+ onAction(e) {
1726
+ this.jodit.e.fire(e.type + 'Item.filebrowser', this.item, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ctrlKey)(e) || e.shiftKey, e);
1727
+ return false;
1728
+ }
1729
+ /** @override */
1730
+ update() {
1731
+ const image = this.getElm('image');
1732
+ void 0;
1733
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'backgroundImage', `url(${encodeURI(this.item.imageURL)})`);
1734
+ const { type, file, time, size } = this.item;
1735
+ this.setMod('is-file', this.item.isImage === false)
1736
+ .setMod('type', type ?? 'file')
1737
+ .setElementValue('name', file)
1738
+ .setElementValue('time', time)
1739
+ .setElementValue('filesize', size);
1740
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.container, 'title', type !== 'folder' ? `${file} ${time} ${size}` : file);
1741
+ super.update();
1742
+ }
1743
+ /**
1744
+ * Create element and set value
1745
+ */
1746
+ setElementValue(name, value) {
1747
+ const elementClassName = this.getFullElName(name);
1748
+ let element = this.getElm(name);
1749
+ if (!value) {
1750
+ element && jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(element);
1751
+ return this;
1752
+ }
1753
+ if (!element) {
1754
+ const wrapper = this.getElm('info');
1755
+ void 0;
1756
+ element = this.j.create.div(elementClassName);
1757
+ wrapper.appendChild(element);
1758
+ }
1759
+ element.innerText = value;
1760
+ return this;
1761
+ }
1762
+ };
1763
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
1764
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('heart:click')
1765
+ ], UIBrowserItem.prototype, "onClickFavorite", null);
1766
+ (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
1767
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['container:click', 'container:contextmenu', 'container:dblclick'])
1768
+ ], UIBrowserItem.prototype, "onAction", null);
1769
+ UIBrowserItem = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
1770
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1771
+ ], UIBrowserItem);
1772
+
1773
+
1774
+ /***/ }),
1775
+
1776
+ /***/ 41424:
1777
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1778
+
1779
+ "use strict";
1780
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1781
+ /* harmony export */ "m": function() { return /* binding */ UILightBox; }
1782
+ /* harmony export */ });
1783
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
1784
+ /* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8079);
1785
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
1786
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
1787
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11612);
1788
+ /*!
1789
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1790
+ * See LICENSE.md in the project root for license information.
1791
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1792
+ */
1793
+ var UILightBox_1;
1794
+
1795
+
1796
+
1797
+
1798
+
1799
+
1800
+
1801
+ let UILightBox = UILightBox_1 = class UILightBox extends jodit_modules__WEBPACK_IMPORTED_MODULE_0__.UIElement {
1802
+ /** @override */
1803
+ className() {
1804
+ return 'UILightBox';
1805
+ }
1806
+ render() {
1807
+ return `<div>
1808
+ <div class='&__previous'>*angle-left*</div>
1809
+ <div class='&__preview'></div>
1810
+ <div class='&__loader'></div>
1811
+ <div class='&__next'>*angle-right*</div>
1812
+ </div>`;
1813
+ }
1814
+ constructor(jodit, current, elements) {
1815
+ super(jodit);
1816
+ this.current = current;
1817
+ this.elements = elements;
1818
+ this.dialog = new jodit_modules__WEBPACK_IMPORTED_MODULE_0__.Dialog();
1819
+ const { dialog } = this;
1820
+ dialog
1821
+ .setMod('theme', jodit.state.theme)
1822
+ .toolbar.setMod('mode', 'header');
1823
+ dialog.open(this);
1824
+ this.elements = this.elements.filter((e) => e.isImage);
1825
+ dialog.e.on(dialog, 'afterClose', () => {
1826
+ this.destruct();
1827
+ });
1828
+ this.addGlobalListeners();
1829
+ this.onChangeCurrent();
1830
+ dialog.toolbar.build([
1831
+ {
1832
+ icon: 'check',
1833
+ exec: () => {
1834
+ jodit.stateManager.addActive(this.current, false);
1835
+ jodit.e.fire('select.filebrowser');
1836
+ dialog.close();
1837
+ }
1838
+ },
1839
+ 'dialog.close'
1840
+ ]);
1841
+ }
1842
+ async onChangeCurrent() {
1843
+ const { current } = this;
1844
+ this.setMod('loading', true);
1845
+ const preview = this.getElm('preview');
1846
+ void 0;
1847
+ jodit_modules__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(preview);
1848
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(preview, {
1849
+ backgroundImage: null
1850
+ });
1851
+ if (current.isImage) {
1852
+ const image = await (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.loadImage)(current.fileURL, this.j);
1853
+ this.dialog.setPosition();
1854
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(preview, {
1855
+ width: Math.min(this.jodit.ow.innerWidth, image.naturalWidth),
1856
+ height: Math.min(this.jodit.ow.innerHeight - 100, image.naturalHeight),
1857
+ backgroundImage: `url(${image.src})`
1858
+ });
1859
+ }
1860
+ else {
1861
+ const iframe = await this.makeIframe(current.fileURL);
1862
+ preview.appendChild(iframe);
1863
+ }
1864
+ this.dialog.setSize();
1865
+ this.dialog.setPosition();
1866
+ this.setMod('loading', false);
1867
+ }
1868
+ makeIframe(url) {
1869
+ const iframe = this.j.c.element('iframe');
1870
+ iframe.classList.add(this.getFullElName('office-iframe'));
1871
+ iframe.src = /\.pdf/.test(url)
1872
+ ? url
1873
+ : this.j.o.previewOfficeURL + encodeURIComponent(url);
1874
+ return iframe;
1875
+ }
1876
+ onPreviousClick() {
1877
+ const { current } = this;
1878
+ let index = this.j.stateManager.getIndex(current, this.elements);
1879
+ if (index <= 0) {
1880
+ index = this.elements.length - 1;
1881
+ }
1882
+ else {
1883
+ index -= 1;
1884
+ }
1885
+ this.current = this.elements[index];
1886
+ }
1887
+ onNextClick() {
1888
+ const { current } = this;
1889
+ let index = this.j.stateManager.getIndex(current, this.elements);
1890
+ if (index >= this.elements.length - 1) {
1891
+ index = 0;
1892
+ }
1893
+ else {
1894
+ index += 1;
1895
+ }
1896
+ this.current = this.elements[index];
1897
+ }
1898
+ static open(jodit, current, elements) {
1899
+ return new UILightBox_1(jodit, current, elements);
1900
+ }
1901
+ addGlobalListeners() {
1902
+ this.j.e.on(this.j.od, 'keydown', this.onKeyPress);
1903
+ }
1904
+ onKeyPress(e) {
1905
+ if (e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_LEFT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_RIGHT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_SPACE) {
1906
+ e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_LEFT ? this.onPreviousClick() : this.onNextClick();
1907
+ return false;
1908
+ }
1909
+ }
1910
+ removeGlobalListeners() {
1911
+ this.j.e.off(this.j.od, 'keydown', this.onKeyPress);
1912
+ }
1913
+ destruct() {
1914
+ this.removeGlobalListeners();
1915
+ this.dialog.destruct();
1916
+ return super.destruct();
1917
+ }
1918
+ };
1919
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1920
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('current')
1921
+ ], UILightBox.prototype, "onChangeCurrent", null);
1922
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1923
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('previous:click')
1924
+ ], UILightBox.prototype, "onPreviousClick", null);
1925
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1926
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('next:click')
1927
+ ], UILightBox.prototype, "onNextClick", null);
1928
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1929
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
1930
+ ], UILightBox.prototype, "onKeyPress", null);
1931
+ UILightBox = UILightBox_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
1932
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
1933
+ ], UILightBox);
1934
+
1935
+
1936
+ /***/ }),
1937
+
1938
+ /***/ 96123:
1939
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1940
+
1941
+ "use strict";
1942
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1943
+ /* harmony export */ "G": function() { return /* binding */ UIBrowserPanel; }
1944
+ /* harmony export */ });
1945
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(97582);
1946
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
1947
+ /* harmony import */ var _virtual_scroll_virtual_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72618);
1948
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
1949
+ /* harmony import */ var _sidebar_sidebar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68787);
1950
+ /* harmony import */ var _settings_settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(62983);
1951
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95582);
1952
+ /* harmony import */ var _sources_sources__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93582);
1953
+ /* harmony import */ var _statusbar_statusbar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67775);
1954
+ /* harmony import */ var _preview_preview__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(96945);
1955
+ /*!
1956
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1957
+ * See LICENSE.md in the project root for license information.
1958
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1959
+ */
1960
+
1961
+
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+
1968
+
1969
+
1970
+
1971
+ let UIBrowserPanel = class UIBrowserPanel extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
1972
+ /** @override */
1973
+ className() {
1974
+ return 'UIBrowserPanel';
1975
+ }
1976
+ /**
1977
+ * Count elements in one row for calculate navigation
1978
+ */
1979
+ get countInRow() {
1980
+ if (this.state.view === 'list') {
1981
+ return 1;
1982
+ }
1983
+ if (!this.items.elements.length) {
1984
+ return 1;
1985
+ }
1986
+ const { container } = this.items.elements[0], margin = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.css)(container, 'marginLeft');
1987
+ return Math.floor(this.items.container.offsetWidth /
1988
+ (container.offsetWidth + ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isNumber)(margin) ? margin : 0)));
1989
+ }
1990
+ /**
1991
+ * Count elements in one column for calculate navigation
1992
+ */
1993
+ get countInColumn() {
1994
+ if (!this.items.elements.length) {
1995
+ return 1;
1996
+ }
1997
+ const { container } = this.items.elements[0], margin = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.css)(container, 'marginTop');
1998
+ return Math.floor(this.items.container.offsetHeight /
1999
+ (container.offsetHeight + ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isNumber)(margin) ? margin : 0)));
2000
+ }
2001
+ /** @override */
2002
+ render() {
2003
+ return `<div>
2004
+ <div class='&__content'></div>
2005
+ <div class='&__footer'></div>
2006
+ </div>`;
2007
+ }
2008
+ constructor(jodit, stateManager) {
2009
+ super(jodit);
2010
+ this.stateManager = stateManager;
2011
+ /** @override */
2012
+ this.syncMod = true;
2013
+ this.sources = new _sources_sources__WEBPACK_IMPORTED_MODULE_6__/* .UIBrowserSources */ .L(this.j);
2014
+ this.sidebar = new _sidebar_sidebar__WEBPACK_IMPORTED_MODULE_3__/* .UISidebar */ .o(this.jodit, [this.sources], this.stateManager.state);
2015
+ this.preview = new _preview_preview__WEBPACK_IMPORTED_MODULE_8__/* .UIPreview */ .o(this.jodit, this.stateManager.state);
2016
+ this.statusbar = new _statusbar_statusbar__WEBPACK_IMPORTED_MODULE_7__/* .UIBrowserStatusBar */ .s(this.j);
2017
+ this.items = new _virtual_scroll_virtual_scroll__WEBPACK_IMPORTED_MODULE_1__/* .UIVirtualScroll */ .d(this.j, this.stateManager);
2018
+ this.settings = new _settings_settings__WEBPACK_IMPORTED_MODULE_4__/* .UIBrowserSettings */ .r(this.jodit, this.stateManager.state);
2019
+ this.state = stateManager.state;
2020
+ this.append(this.sidebar, 'content');
2021
+ this.append(this.items, 'content');
2022
+ this.append(this.settings, 'content');
2023
+ this.append(this.preview, 'content');
2024
+ this.append(this.statusbar, 'footer');
2025
+ this.onChangeElements();
2026
+ this.onChangeSources();
2027
+ this.onChangeView();
2028
+ this.onChangeTileSize();
2029
+ this.onChangeShowFavorites();
2030
+ this.onChangeActiveElements();
2031
+ this.onChangeFavorites();
2032
+ this.onChangeShowSideBar();
2033
+ this.onChangeShowSettings();
2034
+ this.onChangeShowPreview();
2035
+ this.onChangeTheme();
2036
+ }
2037
+ onChangeTheme() {
2038
+ this.setMod('theme', this.stateManager.state.theme);
2039
+ }
2040
+ onChangeElements() {
2041
+ this.items.build(this.stateManager.state.elements);
2042
+ }
2043
+ onChangeActiveElements() {
2044
+ if (!this.state.activeElements.length) {
2045
+ this.state.info = '';
2046
+ this.state.metaInfo = null;
2047
+ }
2048
+ this.items.elements.forEach((elm) => {
2049
+ elm.setMod('active', Boolean(this.stateManager.isActive(elm.item)));
2050
+ });
2051
+ this.j.e.fire('changeSelection');
2052
+ }
2053
+ onChangeFavorites() {
2054
+ this.items.elements.forEach((elm) => {
2055
+ elm.setMod('favorite', Boolean(this.stateManager.isFavorite(elm.item)));
2056
+ });
2057
+ }
2058
+ onChangeSources() {
2059
+ this.sources.build(this.stateManager.state.tree);
2060
+ }
2061
+ onChangeLastSelectedIndex() {
2062
+ const container = this.items.elements[this.stateManager.state.lastSelectedIndex]
2063
+ ?.container;
2064
+ if (container) {
2065
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.scrollIntoViewIfNeeded)(container, this.items.container, this.j.od);
2066
+ container.focus();
2067
+ }
2068
+ }
2069
+ onChangeInfo() {
2070
+ this.statusbar.value(this.state.info, 'center');
2071
+ }
2072
+ onChangePathOrSource() {
2073
+ this.statusbar.value(this.state.currentPath
2074
+ ? `${this.state.currentPath} (${this.state.currentSource})`
2075
+ : this.i18n('Home'), 'left');
2076
+ }
2077
+ onChangeShowSettings() {
2078
+ this.settings.setMod('hidden', !this.stateManager.state.showSettings);
2079
+ }
2080
+ onChangeShowPreview() {
2081
+ this.preview.setMod('hidden', !this.stateManager.state.showPreview);
2082
+ }
2083
+ onChangeShowSideBar() {
2084
+ this.sidebar.setMod('hidden', !this.stateManager.state.showSideBar);
2085
+ }
2086
+ onChangeView() {
2087
+ this.items.setMod('view', this.stateManager.state.view);
2088
+ }
2089
+ onChangeTileSize() {
2090
+ this.items.setMod('size', this.stateManager.state.tileSize);
2091
+ }
2092
+ onChangeShowFavorites() {
2093
+ this.sidebar.setMod('show-favorites', this.stateManager.state.showFavorites);
2094
+ this.items.setMod('show-favorites', this.stateManager.state.showFavorites);
2095
+ }
2096
+ onItemDblClick() {
2097
+ this.j.e.fire('select.filebrowser');
2098
+ return false;
2099
+ }
2100
+ onItemClick(data, multi) {
2101
+ this.stateManager.addActive(data, multi);
2102
+ }
2103
+ onTogglePreview() {
2104
+ this.state.showPreview = !this.state.showPreview;
2105
+ return false;
2106
+ }
2107
+ onToggleFavoriteItem(data) {
2108
+ this.stateManager.toggleFavorite(data);
2109
+ }
2110
+ onFolderClick(data) {
2111
+ this.stateManager.state.currentSource = data.sourceName;
2112
+ this.stateManager.state.currentPath = data.path || '/';
2113
+ this.j.e.fire('afterOpenFolder.filebrowser');
2114
+ }
2115
+ };
2116
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2117
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.theme')
2118
+ ], UIBrowserPanel.prototype, "onChangeTheme", null);
2119
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2120
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.elements')
2121
+ ], UIBrowserPanel.prototype, "onChangeElements", null);
2122
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2123
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.activeElements')
2124
+ ], UIBrowserPanel.prototype, "onChangeActiveElements", null);
2125
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2126
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.favorites', 'state.elements'])
2127
+ ], UIBrowserPanel.prototype, "onChangeFavorites", null);
2128
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2129
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.sources')
2130
+ ], UIBrowserPanel.prototype, "onChangeSources", null);
2131
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2132
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.lastSelectedIndex')
2133
+ ], UIBrowserPanel.prototype, "onChangeLastSelectedIndex", null);
2134
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2135
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.info')
2136
+ ], UIBrowserPanel.prototype, "onChangeInfo", null);
2137
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2138
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.currentPath', 'state.currentSource'])
2139
+ ], UIBrowserPanel.prototype, "onChangePathOrSource", null);
2140
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2141
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showSettings')
2142
+ ], UIBrowserPanel.prototype, "onChangeShowSettings", null);
2143
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2144
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showPreview')
2145
+ ], UIBrowserPanel.prototype, "onChangeShowPreview", null);
2146
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2147
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showSideBar')
2148
+ ], UIBrowserPanel.prototype, "onChangeShowSideBar", null);
2149
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2150
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.view')
2151
+ ], UIBrowserPanel.prototype, "onChangeView", null);
2152
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2153
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.tileSize')
2154
+ ], UIBrowserPanel.prototype, "onChangeTileSize", null);
2155
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2156
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showFavorites')
2157
+ ], UIBrowserPanel.prototype, "onChangeShowFavorites", null);
2158
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2159
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':dblclickItem.filebrowser')
2160
+ ], UIBrowserPanel.prototype, "onItemDblClick", null);
2161
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2162
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':clickItem.filebrowser')
2163
+ ], UIBrowserPanel.prototype, "onItemClick", null);
2164
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2165
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':togglePreview.filebrowser')
2166
+ ], UIBrowserPanel.prototype, "onTogglePreview", null);
2167
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2168
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':toggleFavoriteItem')
2169
+ ], UIBrowserPanel.prototype, "onToggleFavoriteItem", null);
2170
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2171
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':openFolder')
2172
+ ], UIBrowserPanel.prototype, "onFolderClick", null);
2173
+ UIBrowserPanel = (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
2174
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
2175
+ ], UIBrowserPanel);
2176
+
2177
+
2178
+ /***/ }),
2179
+
2180
+ /***/ 96945:
2181
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2182
+
2183
+ "use strict";
2184
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2185
+ /* harmony export */ "o": function() { return /* binding */ UIPreview; }
2186
+ /* harmony export */ });
2187
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97582);
2188
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2189
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2190
+ /* harmony import */ var _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62499);
2191
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
2192
+ /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8138);
2193
+ /* harmony import */ var _item_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87695);
2194
+
2195
+ /*!
2196
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2197
+ * See LICENSE.md in the project root for license information.
2198
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2199
+ */
2200
+
2201
+
2202
+
2203
+
2204
+
2205
+
2206
+
2207
+
2208
+ let UIPreview = class UIPreview extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2209
+ /** @override */
2210
+ className() {
2211
+ return 'UIPreview';
2212
+ }
2213
+ /**
2214
+ * Add handle resizer
2215
+ */
2216
+ addResize() {
2217
+ _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.remove */ .c.remove(this);
2218
+ _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.install */ .c.install(this, screen.width > 450 ? 'left' : 'top');
2219
+ }
2220
+ /** @override */
2221
+ render() {
2222
+ return `<div>
2223
+ <div class="&__image"></div>
2224
+ <div class="&__info"></div>
2225
+ <div class="&__loader"></div>
2226
+ <div class="&__empty-message">~Select image~</div>
2227
+ </div>`;
2228
+ }
2229
+ constructor(jodit, state) {
2230
+ super(jodit);
2231
+ this.state = state;
2232
+ this.lastLoadPromise = null;
2233
+ this.onChangeMetaInfo();
2234
+ }
2235
+ afterSetMod(name, value) {
2236
+ if (name === 'hidden' && value === false) {
2237
+ this.onChangeMetaInfo();
2238
+ }
2239
+ super.afterSetMod(name, value);
2240
+ }
2241
+ onChangeMetaInfo() {
2242
+ if (this.getMod('hidden')) {
2243
+ return;
2244
+ }
2245
+ const { metaInfo } = this.state;
2246
+ this.setMod('empty', !metaInfo);
2247
+ const info = this.getElm('info');
2248
+ void 0;
2249
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_4__/* .Dom.detach */ .i.detach(info);
2250
+ const image = this.getElm('image');
2251
+ void 0;
2252
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
2253
+ backgroundImage: null
2254
+ });
2255
+ if (!metaInfo) {
2256
+ return;
2257
+ }
2258
+ this.setMod('is-file', metaInfo.isImage === false).setMod('type', metaInfo.type ?? 'file');
2259
+ _item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'name', metaInfo.file);
2260
+ _item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'time', metaInfo.time);
2261
+ _item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'filesize', metaInfo.size);
2262
+ this.setMod('loading', true);
2263
+ this.lastLoadPromise?.rejectCallback();
2264
+ this.lastLoadPromise = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.loadImage)(metaInfo.isImage ? metaInfo.fileURL : metaInfo.imageURL, this.j);
2265
+ this.lastLoadPromise
2266
+ .then((image) => {
2267
+ const elm = this.getElm('image');
2268
+ void 0;
2269
+ image &&
2270
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css)(elm, {
2271
+ backgroundImage: `url(${image.src})`
2272
+ });
2273
+ })
2274
+ .finally(() => {
2275
+ this.setMod('loading', false);
2276
+ })
2277
+ .catch(() => { });
2278
+ }
2279
+ };
2280
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2281
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.hook)('ready'),
2282
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize', { context: window }),
2283
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)()
2284
+ ], UIPreview.prototype, "addResize", null);
2285
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2286
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.metaInfo')
2287
+ ], UIPreview.prototype, "onChangeMetaInfo", null);
2288
+ UIPreview = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2289
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2290
+ ], UIPreview);
2291
+
2292
+
2293
+ /***/ }),
2294
+
2295
+ /***/ 22840:
2296
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2297
+
2298
+ "use strict";
2299
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2300
+ /* harmony export */ "u": function() { return /* binding */ UIProgress; }
2301
+ /* harmony export */ });
2302
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97582);
2303
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2304
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2305
+
2306
+ /*!
2307
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2308
+ * See LICENSE.md in the project root for license information.
2309
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2310
+ */
2311
+
2312
+
2313
+
2314
+ let UIProgress = class UIProgress extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .ProgressBar */ .ko {
2315
+ /** @override */
2316
+ className() {
2317
+ return 'UIProgress';
2318
+ }
2319
+ constructor(jodit, state) {
2320
+ super(jodit);
2321
+ this.state = state;
2322
+ this.onProgress();
2323
+ }
2324
+ onProgress() {
2325
+ if (this.state.progress) {
2326
+ this.show();
2327
+ }
2328
+ else {
2329
+ this.hide();
2330
+ }
2331
+ this.progress(this.state.progress);
2332
+ }
2333
+ hide() {
2334
+ this.setMod('hidden', true);
2335
+ return this;
2336
+ }
2337
+ progress(percentage) {
2338
+ this.container.style.width = percentage.toFixed(2) + '%';
2339
+ if (percentage >= 98) {
2340
+ this.j.async.setTimeout(() => {
2341
+ this.hide();
2342
+ }, {
2343
+ label: 'progress',
2344
+ timeout: 300
2345
+ });
2346
+ }
2347
+ return this;
2348
+ }
2349
+ show() {
2350
+ this.setMod('hidden', false);
2351
+ return this;
2352
+ }
2353
+ };
2354
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
2355
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.progress')
2356
+ ], UIProgress.prototype, "onProgress", null);
2357
+ UIProgress = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
2358
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2359
+ ], UIProgress);
2360
+
2361
+
2362
+ /***/ }),
2363
+
2364
+ /***/ 62983:
2365
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2366
+
2367
+ "use strict";
2368
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2369
+ /* harmony export */ "r": function() { return /* binding */ UIBrowserSettings; }
2370
+ /* harmony export */ });
2371
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
2372
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2373
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2374
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
2375
+ /*!
2376
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2377
+ * See LICENSE.md in the project root for license information.
2378
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2379
+ */
2380
+
2381
+
2382
+
2383
+
2384
+
2385
+ let UIBrowserSettings = class UIBrowserSettings extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2386
+ /** @override */
2387
+ className() {
2388
+ return 'UIBrowserSettings';
2389
+ }
2390
+ /** @override */
2391
+ render() {
2392
+ return `<div>
2393
+ <div class="${this.getFullElName('close')}">${jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.get */ .JO.get('cancel')}</div>
2394
+ <div class="${this.getFullElName('title')}">${this.j.i18n('Settings')}</div>
2395
+ <div class="${this.getFullElName('options')}"></div>
2396
+ </div>`;
2397
+ }
2398
+ /** @override */
2399
+ appendChildToContainer(childContainer) {
2400
+ const options = this.getElm('options');
2401
+ void 0;
2402
+ options.appendChild(childContainer);
2403
+ }
2404
+ afterSetMod(name, value) {
2405
+ if (name === 'hidden' && value === false) {
2406
+ this.generateSettings();
2407
+ }
2408
+ super.afterSetMod(name, value);
2409
+ }
2410
+ constructor(jodit, state) {
2411
+ super(jodit);
2412
+ this.state = state;
2413
+ const close = this.getElm('close');
2414
+ void 0;
2415
+ jodit.e.on(close, 'click', () => {
2416
+ this.state.showSettings = false;
2417
+ });
2418
+ }
2419
+ onChangeView() {
2420
+ const tileSize = this.getElm('tile-size');
2421
+ if (tileSize) {
2422
+ tileSize.style.display =
2423
+ this.state.view === 'tiles' ? 'block' : 'none';
2424
+ }
2425
+ }
2426
+ /**
2427
+ * Generate options list
2428
+ */
2429
+ generateSettings() {
2430
+ this.clear();
2431
+ const { j } = this;
2432
+ this.append([
2433
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
2434
+ label: 'Theme',
2435
+ name: 'theme',
2436
+ value: this.state.theme,
2437
+ radio: true,
2438
+ options: [
2439
+ { value: 'default', text: 'Light' },
2440
+ { value: 'dark', text: 'Dark' }
2441
+ ],
2442
+ onChange: (values) => {
2443
+ if (this.state.theme !== 'default' &&
2444
+ this.state.theme !== 'dark') {
2445
+ this.state.theme = 'default';
2446
+ return;
2447
+ }
2448
+ this.state.theme = values[0].value;
2449
+ }
2450
+ }),
2451
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
2452
+ label: 'Show favorites',
2453
+ name: 'showFavorites',
2454
+ value: this.state.showFavorites,
2455
+ radio: true,
2456
+ options: [
2457
+ { value: true, text: 'Show' },
2458
+ { value: false, text: 'Hide' }
2459
+ ],
2460
+ onChange: (values) => {
2461
+ this.state.showFavorites = values[0].value;
2462
+ }
2463
+ }),
2464
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
2465
+ label: 'View',
2466
+ name: 'view',
2467
+ value: this.state.view,
2468
+ radio: true,
2469
+ options: [
2470
+ { value: 'tiles', text: 'Tiles' },
2471
+ { value: 'list', text: 'List' },
2472
+ { value: 'compact', text: 'Compact' }
2473
+ ],
2474
+ onChange: (values) => {
2475
+ this.state.view = values[0].value;
2476
+ }
2477
+ }),
2478
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
2479
+ label: 'Folders position',
2480
+ name: 'foldersPosition',
2481
+ value: this.state.foldersPosition,
2482
+ radio: true,
2483
+ options: [
2484
+ { value: 'top', text: 'Top' },
2485
+ { value: 'bottom', text: 'Bottom' },
2486
+ { value: 'default', text: 'Default' }
2487
+ ],
2488
+ onChange: (values) => {
2489
+ this.state.foldersPosition = values[0].value;
2490
+ }
2491
+ }),
2492
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UISelect */ .Cj(j, {
2493
+ label: 'Sort by',
2494
+ name: 'sort-by',
2495
+ value: this.state.sortBy,
2496
+ options: [
2497
+ {
2498
+ value: 'changed-asc',
2499
+ text: j.i18n('Sort by changed') + '(⬆)'
2500
+ },
2501
+ {
2502
+ value: 'changed-desc',
2503
+ text: j.i18n('Sort by changed') + '(⬇)'
2504
+ },
2505
+ {
2506
+ value: 'name-asc',
2507
+ text: j.i18n('Sort by name') + '(⬆)'
2508
+ },
2509
+ {
2510
+ value: 'name-desc',
2511
+ text: j.i18n('Sort by name') + '(⬇)'
2512
+ },
2513
+ {
2514
+ value: 'size-asc',
2515
+ text: j.i18n('Sort by size') + '(⬆)'
2516
+ },
2517
+ {
2518
+ value: 'size-desc',
2519
+ text: j.i18n('Sort by size') + '(⬇)'
2520
+ }
2521
+ ],
2522
+ onChange: (value) => {
2523
+ this.state.sortBy = value;
2524
+ }
2525
+ }),
2526
+ new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UISelect */ .Cj(j, {
2527
+ label: 'Tile size',
2528
+ name: 'tile-size',
2529
+ value: this.state.tileSize,
2530
+ options: [
2531
+ {
2532
+ value: 'xsmall',
2533
+ text: 'Extra small'
2534
+ },
2535
+ {
2536
+ value: 'small',
2537
+ text: 'Small'
2538
+ },
2539
+ {
2540
+ value: 'default',
2541
+ text: 'Default'
2542
+ },
2543
+ {
2544
+ value: 'large',
2545
+ text: 'Large'
2546
+ },
2547
+ {
2548
+ value: 'xlarge',
2549
+ text: 'Extra large'
2550
+ }
2551
+ ],
2552
+ onChange: (value) => {
2553
+ this.state.tileSize =
2554
+ value;
2555
+ }
2556
+ })
2557
+ ]);
2558
+ this.onChangeView();
2559
+ }
2560
+ };
2561
+ (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2562
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.view')
2563
+ ], UIBrowserSettings.prototype, "onChangeView", null);
2564
+ UIBrowserSettings = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2565
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2566
+ ], UIBrowserSettings);
2567
+
2568
+
2569
+ /***/ }),
2570
+
2571
+ /***/ 68787:
2572
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2573
+
2574
+ "use strict";
2575
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2576
+ /* harmony export */ "o": function() { return /* binding */ UISidebar; }
2577
+ /* harmony export */ });
2578
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
2579
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2580
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2581
+ /* harmony import */ var _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62499);
2582
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
2583
+
2584
+ /*!
2585
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2586
+ * See LICENSE.md in the project root for license information.
2587
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2588
+ */
2589
+
2590
+
2591
+
2592
+
2593
+
2594
+ let UISidebar = class UISidebar extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2595
+ /** @override */
2596
+ className() {
2597
+ return 'UISidebar';
2598
+ }
2599
+ /** @override */
2600
+ render() {
2601
+ return `<div>
2602
+ <div class='&__hide-btn'>*angle-left*</div>
2603
+ <div class='&__favorites'>*heart* ~Favorites~</div>
2604
+ <div class='&__box'></div>
2605
+ </div>`;
2606
+ }
2607
+ /** @override */
2608
+ appendChildToContainer(childContainer) {
2609
+ const box = this.getElm('box');
2610
+ void 0;
2611
+ box.appendChild(childContainer);
2612
+ }
2613
+ /**
2614
+ * Add handle resizer
2615
+ */
2616
+ addResize() {
2617
+ _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.remove */ .c.remove(this);
2618
+ _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.install */ .c.install(this, screen.width > 450 ? 'right' : 'bottom');
2619
+ }
2620
+ constructor(jodit, elements, state) {
2621
+ super(jodit, elements);
2622
+ this.state = state;
2623
+ this.onChangeFavorites();
2624
+ }
2625
+ onChangeFavorites() {
2626
+ this.setMod('has-favorites', Boolean(this.state.favorites.length));
2627
+ }
2628
+ onClickHideButton() {
2629
+ this.state.showSideBar = !this.state.showSideBar;
2630
+ return false;
2631
+ }
2632
+ onClickFavorites() {
2633
+ this.state.elements = this.state.favorites;
2634
+ return false;
2635
+ }
2636
+ };
2637
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2638
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.hook)('ready'),
2639
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize', { context: window }),
2640
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)()
2641
+ ], UISidebar.prototype, "addResize", null);
2642
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2643
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.favorites')
2644
+ ], UISidebar.prototype, "onChangeFavorites", null);
2645
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2646
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('hide-btn:click')
2647
+ ], UISidebar.prototype, "onClickHideButton", null);
2648
+ (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2649
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('favorites:click')
2650
+ ], UISidebar.prototype, "onClickFavorites", null);
2651
+ UISidebar = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2652
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2653
+ ], UISidebar);
2654
+
2655
+
2656
+ /***/ }),
2657
+
2658
+ /***/ 21596:
2659
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2660
+
2661
+ "use strict";
2662
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2663
+ /* harmony export */ "f": function() { return /* binding */ UIBrowserSource; }
2664
+ /* harmony export */ });
2665
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
2666
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2667
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2668
+ /* harmony import */ var _tree_tree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91919);
2669
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
2670
+ /*!
2671
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2672
+ * See LICENSE.md in the project root for license information.
2673
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2674
+ */
2675
+
2676
+
2677
+
2678
+
2679
+
2680
+
2681
+ let UIBrowserSource = class UIBrowserSource extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
2682
+ /** @override */
2683
+ className() {
2684
+ return 'UIBrowserSource';
2685
+ }
2686
+ /** @override */
2687
+ render() {
2688
+ return `<div>
2689
+ <div class="&__name"></div>
2690
+ <div class="&__tree"></div>
2691
+ </div>`;
2692
+ }
2693
+ constructor(jodit, data) {
2694
+ super(jodit, data);
2695
+ this.data = data;
2696
+ this.tree = new _tree_tree__WEBPACK_IMPORTED_MODULE_2__/* .UITree */ .v(this.j, this.data.children);
2697
+ /** @override */
2698
+ this.syncMod = true;
2699
+ const name = this.getElm('name');
2700
+ void 0;
2701
+ name.innerText = data.title || data.name;
2702
+ const tree = this.getElm('tree');
2703
+ void 0;
2704
+ tree.appendChild(this.tree.container);
2705
+ jodit.e.on(this.container, 'contextmenu', (e) => {
2706
+ return jodit.e.fire('contextmenuSource.filebrowser', data, e);
2707
+ });
2708
+ }
2709
+ };
2710
+ UIBrowserSource = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
2711
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2712
+ ], UIBrowserSource);
2713
+
2714
+
2715
+ /***/ }),
2716
+
2717
+ /***/ 93582:
2718
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2719
+
2720
+ "use strict";
2721
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2722
+ /* harmony export */ "L": function() { return /* binding */ UIBrowserSources; }
2723
+ /* harmony export */ });
2724
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
2725
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2726
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2727
+ /* harmony import */ var _source_source__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21596);
2728
+ /*!
2729
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2730
+ * See LICENSE.md in the project root for license information.
2731
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2732
+ */
2733
+
2734
+
2735
+
2736
+
2737
+
2738
+ let UIBrowserSources = class UIBrowserSources extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2739
+ constructor() {
2740
+ super(...arguments);
2741
+ /** @override */
2742
+ this.syncMod = true;
2743
+ }
2744
+ /** @override */
2745
+ className() {
2746
+ return 'UIBrowserSources';
2747
+ }
2748
+ build(items) {
2749
+ this.clear();
2750
+ items.forEach((item) => {
2751
+ this.append(new _source_source__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserSource */ .f(this.jodit, item));
2752
+ });
2753
+ }
2754
+ };
2755
+ UIBrowserSources = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2756
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2757
+ ], UIBrowserSources);
2758
+
2759
+
2760
+ /***/ }),
2761
+
2762
+ /***/ 67775:
2763
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2764
+
2765
+ "use strict";
2766
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2767
+ /* harmony export */ "s": function() { return /* binding */ UIBrowserStatusBar; }
2768
+ /* harmony export */ });
2769
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
2770
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2771
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2772
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
2773
+ /*!
2774
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2775
+ * See LICENSE.md in the project root for license information.
2776
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2777
+ */
2778
+
2779
+
2780
+
2781
+
2782
+
2783
+ let UIBrowserStatusBar = class UIBrowserStatusBar extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
2784
+ /** @override */
2785
+ className() {
2786
+ return 'UIBrowserStatusBar';
2787
+ }
2788
+ /** @override */
2789
+ render() {
2790
+ return `<div>
2791
+ <div class='&__slot-left'></div>
2792
+ <div class='&__slot-center'></div>
2793
+ <div class='&__slot-right'></div>
2794
+ </div>`;
2795
+ }
2796
+ value(text, slot = 'left') {
2797
+ const slotElm = this.getElm(`slot-${slot}`);
2798
+ void 0;
2799
+ slotElm.innerText = text;
2800
+ return this;
2801
+ }
2802
+ };
2803
+ UIBrowserStatusBar = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2804
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2805
+ ], UIBrowserStatusBar);
2806
+
2807
+
2808
+ /***/ }),
2809
+
2810
+ /***/ 91919:
2811
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2812
+
2813
+ "use strict";
2814
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2815
+ /* harmony export */ "v": function() { return /* binding */ UITree; }
2816
+ /* harmony export */ });
2817
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
2818
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2819
+ /* harmony import */ var jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2820
+ /* harmony import */ var _folder_folder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9890);
2821
+ /*!
2822
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2823
+ * See LICENSE.md in the project root for license information.
2824
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2825
+ */
2826
+ var UITree_1;
2827
+
2828
+
2829
+
2830
+
2831
+
2832
+ let UITree = UITree_1 = class UITree extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2833
+ /** @override */
2834
+ className() {
2835
+ return 'UITree';
2836
+ }
2837
+ constructor(jodit, items) {
2838
+ super(jodit);
2839
+ /** @override */
2840
+ this.syncMod = true;
2841
+ this.build(items);
2842
+ }
2843
+ build(items) {
2844
+ this.clear();
2845
+ items.forEach((item) => {
2846
+ const folder = new _folder_folder__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserFolder */ .D(this.jodit, item);
2847
+ this.append(folder);
2848
+ if (item.isActive) {
2849
+ folder.setMod('active', true);
2850
+ }
2851
+ if (item.children.length) {
2852
+ this.append(new UITree_1(this.jodit, item.children));
2853
+ }
2854
+ });
2855
+ }
2856
+ };
2857
+ UITree = UITree_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
2858
+ jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__.component
2859
+ ], UITree);
2860
+
2861
+
2862
+ /***/ }),
2863
+
2864
+ /***/ 72618:
2865
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2866
+
2867
+ "use strict";
2868
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2869
+ /* harmony export */ "d": function() { return /* binding */ UIVirtualScroll; }
2870
+ /* harmony export */ });
2871
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97582);
2872
+ /* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
2873
+ /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
2874
+ /* harmony import */ var _item_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87695);
2875
+ /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45545);
2876
+ /* harmony import */ var _traits_select_items_select_items__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81766);
2877
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95582);
2878
+ /*!
2879
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
2880
+ * See LICENSE.md in the project root for license information.
2881
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
2882
+ */
2883
+ var UIVirtualScroll_1;
2884
+
2885
+
2886
+
2887
+
2888
+
2889
+
2890
+
2891
+
2892
+ let UIVirtualScroll = UIVirtualScroll_1 = class UIVirtualScroll extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
2893
+ /** @override */
2894
+ className() {
2895
+ return 'UIVirtualScroll';
2896
+ }
2897
+ /** @override */
2898
+ render() {
2899
+ return `<div>
2900
+ <div class="&__empty-message">~There are no files~</div>
2901
+ <div class='&__loader'></div>
2902
+ <div class='&__drag-area'>~Drop image~</div>
2903
+ </div>`;
2904
+ }
2905
+ constructor(jodit, stateManager) {
2906
+ super(jodit);
2907
+ this.stateManager = stateManager;
2908
+ /** @override */
2909
+ this.syncMod = true;
2910
+ this.addItemsSelector();
2911
+ }
2912
+ reconcile(items) {
2913
+ const clearIndex = this.elements.findIndex((elm, index) => {
2914
+ return (!items[index] ||
2915
+ elm.item.uniqueHashKey !==
2916
+ jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_3__/* .FileBrowserItem.create */ .Z.create(items[index]).uniqueHashKey);
2917
+ });
2918
+ if (clearIndex > -1) {
2919
+ for (let i = clearIndex; i < this.elements.length; i += 1) {
2920
+ this.elements[i].destruct();
2921
+ }
2922
+ this.elements.length = clearIndex;
2923
+ }
2924
+ return clearIndex;
2925
+ }
2926
+ build(items) {
2927
+ const clearIndex = this.reconcile(items);
2928
+ items
2929
+ .slice(clearIndex > -1 ? clearIndex : this.elements.length)
2930
+ .forEach((item) => {
2931
+ const elm = new _item_item__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserItem */ .u(this.jodit, item);
2932
+ Object.keys(this.mods).forEach((mod) => {
2933
+ elm.setMod(mod, this.mods[mod]);
2934
+ });
2935
+ this.append(elm);
2936
+ });
2937
+ this.setMod('empty', !this.elements.length);
2938
+ }
2939
+ onScrollLoadChunk() {
2940
+ if (!this.stateManager.isFavoriteItems &&
2941
+ this.container.scrollHeight -
2942
+ (this.container.scrollTop + this.container.offsetHeight) <
2943
+ this.j.o.pixelOffsetLoadNewChunk) {
2944
+ void this.j.loadingManager.loadItemsChunk();
2945
+ }
2946
+ }
2947
+ onDragOver(e) {
2948
+ e.preventDefault();
2949
+ this.setMod('dragover', true);
2950
+ }
2951
+ onDragLeave(e) {
2952
+ e.preventDefault();
2953
+ this.setMod('dragover', false);
2954
+ }
2955
+ addItemsSelector() {
2956
+ _traits_select_items_select_items__WEBPACK_IMPORTED_MODULE_4__/* .UISelectItems.install */ .r.install(this);
2957
+ }
2958
+ static intersectRect(r1, r2) {
2959
+ return !(r2.left > r1.left + r1.width ||
2960
+ r2.left + r2.width < r1.left ||
2961
+ r2.top > r1.top + r1.height ||
2962
+ r2.top + r2.height < r1.top);
2963
+ }
2964
+ onSelectItems(bound) {
2965
+ const selected = [];
2966
+ this.elements.forEach((elm) => {
2967
+ const pos = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.position)(elm.container);
2968
+ if (UIVirtualScroll_1.intersectRect(pos, bound)) {
2969
+ selected.push(elm.item);
2970
+ }
2971
+ });
2972
+ this.stateManager.state.activeElements = selected;
2973
+ }
2974
+ };
2975
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2976
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterResize'),
2977
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize'),
2978
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('container:scroll'),
2979
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.throttle)()
2980
+ ], UIVirtualScroll.prototype, "onScrollLoadChunk", null);
2981
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2982
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('container:dragover')
2983
+ ], UIVirtualScroll.prototype, "onDragOver", null);
2984
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2985
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['container:dragleave', 'container:drop'])
2986
+ ], UIVirtualScroll.prototype, "onDragLeave", null);
2987
+ UIVirtualScroll = UIVirtualScroll_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
2988
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
2989
+ ], UIVirtualScroll);
2990
+
2991
+
2992
+ /***/ }),
2993
+
2994
+ /***/ 62499:
2995
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2996
+
2997
+ "use strict";
2998
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2999
+ /* harmony export */ "c": function() { return /* binding */ UIResize; }
3000
+ /* harmony export */ });
3001
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18002);
3002
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44913);
3003
+ /*!
3004
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
3005
+ * See LICENSE.md in the project root for license information.
3006
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
3007
+ */
3008
+
3009
+
3010
+
3011
+ class UIResize {
3012
+ static remove(element) {
3013
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, {
3014
+ width: null,
3015
+ height: null
3016
+ });
3017
+ element.container.classList.remove('jodit-ui-resize');
3018
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(element.container.querySelector('.jodit-ui-resize__handle'));
3019
+ }
3020
+ static install(element, direction) {
3021
+ element.container.classList.add('jodit-ui-resize');
3022
+ if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, 'position') === 'static') {
3023
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, 'position', 'relative');
3024
+ }
3025
+ const handle = element.j.c.div('jodit-ui-resize__handle');
3026
+ handle.classList.add('jodit-ui-resize__handle_type_' + direction);
3027
+ element.container.appendChild(handle);
3028
+ element.j.e.on(handle, 'mousedown touchstart', this.onStartResize.bind(this, element, direction));
3029
+ }
3030
+ static onStartResize(element, direction, e) {
3031
+ const start = {
3032
+ x: e.clientX,
3033
+ y: e.clientY,
3034
+ w: element.container.offsetWidth,
3035
+ h: element.container.offsetHeight,
3036
+ direction
3037
+ }, onResize = element.j.async.throttle(this.onResize.bind(this, element, start), element.j.defaultTimeout / 10);
3038
+ element.j.lock();
3039
+ element.j.e
3040
+ .on(element.j.ow, 'mousemove touchmove', onResize)
3041
+ .one(element.j.ow, 'mouseup touchend', this.onEndResize.bind(this, element, onResize));
3042
+ }
3043
+ static onResize(element, start, e) {
3044
+ const byWidth = ['left', 'right'].includes(start.direction), parentElement = element.container.parentElement;
3045
+ if (!parentElement) {
3046
+ return;
3047
+ }
3048
+ let diff;
3049
+ if (byWidth) {
3050
+ diff =
3051
+ (start.w +
3052
+ (e.clientX - start.x) *
3053
+ (start.direction === 'right' ? 1 : -1)) /
3054
+ parentElement.offsetWidth;
3055
+ }
3056
+ else {
3057
+ diff =
3058
+ (start.h +
3059
+ (e.clientY - start.y) *
3060
+ (start.direction === 'top' ? 1 : -1)) /
3061
+ parentElement.offsetHeight;
3062
+ }
3063
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, byWidth ? 'width' : 'height', diff * 100 + '%');
3064
+ }
3065
+ static onEndResize(element, onResize, _) {
3066
+ element.j.e.off(element.j.ow, 'mousemove touchmove', onResize);
3067
+ element.j.unlock();
3068
+ }
3069
+ }
3070
+
3071
+
3072
+ /***/ }),
3073
+
3074
+ /***/ 81766:
3075
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3076
+
3077
+ "use strict";
3078
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3079
+ /* harmony export */ "r": function() { return /* binding */ UISelectItems; }
3080
+ /* harmony export */ });
3081
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44913);
3082
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18002);
3083
+ /*!
3084
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
3085
+ * See LICENSE.md in the project root for license information.
3086
+ * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
3087
+ */
3088
+
3089
+
3090
+
3091
+ class UISelectItems {
3092
+ static remove(element) {
3093
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(element.container.querySelector('.jodit-ui-select-items'));
3094
+ element.j.e.off(element.container, 'mousedown.uiselectitems touchstart.uiselectitems');
3095
+ }
3096
+ static install(element) {
3097
+ const bound = element.j.c.div('jodit-ui-select-items');
3098
+ element.j.e.on(element.container, 'mousedown.uiselectitems touchstart.uiselectitems', this.onStartSelect.bind(this, element, bound));
3099
+ }
3100
+ static onStartSelect(element, bound, e) {
3101
+ if (e.target !== element.container) {
3102
+ return;
3103
+ }
3104
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(bound, { width: 0, height: 0 });
3105
+ element.container.appendChild(bound);
3106
+ const start = {
3107
+ x: e.clientX,
3108
+ y: e.clientY,
3109
+ w: element.container.offsetWidth,
3110
+ h: element.container.offsetHeight
3111
+ }, onSelect = element.j.async.throttle(this.onSelect.bind(this, element, bound, start), element.j.defaultTimeout / 10);
3112
+ element.j.lock();
3113
+ element.j.e
3114
+ .on(element.j.ow, 'mousemove touchmove', onSelect)
3115
+ .one(element.j.ow, 'mouseup touchend', this.onEndSelect.bind(this, element, bound, onSelect));
3116
+ element.onSelectItems({
3117
+ left: start.x,
3118
+ top: start.y,
3119
+ width: 0,
3120
+ height: 0
3121
+ });
3122
+ }
3123
+ static onSelect(element, bound, start, e) {
3124
+ const left = start.x > e.clientX ? e.clientX : start.x;
3125
+ const top = start.y > e.clientY ? e.clientY : start.y;
3126
+ const selectBound = {
3127
+ left,
3128
+ top,
3129
+ width: Math.abs(start.x - e.clientX),
3130
+ height: Math.abs(start.y - e.clientY)
3131
+ };
3132
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(bound, selectBound);
3133
+ element.onSelectItems(selectBound);
3134
+ }
3135
+ static onEndSelect(element, bound, onResize, _) {
3136
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(bound);
3137
+ element.j.e.off(element.j.ow, 'mousemove touchmove', onResize);
3138
+ element.j.unlock();
3139
+ }
3140
+ }
3141
+
3142
+
3143
+ /***/ })
3144
+
3145
+ },
3146
+ /******/ function(__webpack_require__) { // webpackRuntimeModules
3147
+ /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
3148
+ /******/ var __webpack_exports__ = (__webpack_exec__(48531));
3149
+ /******/ return __webpack_exports__;
3150
+ /******/ }
3151
+ ]);
3152
+ });