@ckeditor/ckeditor5-ai 0.0.0-internal-20241017.0

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 (361) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +26 -0
  3. package/README.md +38 -0
  4. package/build/ai.js +5 -0
  5. package/build/translations/af.js +1 -0
  6. package/build/translations/ar.js +1 -0
  7. package/build/translations/bg.js +1 -0
  8. package/build/translations/bn.js +1 -0
  9. package/build/translations/bs.js +1 -0
  10. package/build/translations/ca.js +1 -0
  11. package/build/translations/cs.js +1 -0
  12. package/build/translations/da.js +1 -0
  13. package/build/translations/de-ch.js +1 -0
  14. package/build/translations/de.js +1 -0
  15. package/build/translations/el.js +1 -0
  16. package/build/translations/en-au.js +1 -0
  17. package/build/translations/es-co.js +1 -0
  18. package/build/translations/es.js +1 -0
  19. package/build/translations/et.js +1 -0
  20. package/build/translations/fa.js +1 -0
  21. package/build/translations/fi.js +1 -0
  22. package/build/translations/fr.js +1 -0
  23. package/build/translations/gl.js +1 -0
  24. package/build/translations/he.js +1 -0
  25. package/build/translations/hi.js +1 -0
  26. package/build/translations/hr.js +1 -0
  27. package/build/translations/hu.js +1 -0
  28. package/build/translations/id.js +1 -0
  29. package/build/translations/it.js +1 -0
  30. package/build/translations/ja.js +1 -0
  31. package/build/translations/jv.js +1 -0
  32. package/build/translations/ko.js +1 -0
  33. package/build/translations/lt.js +1 -0
  34. package/build/translations/lv.js +1 -0
  35. package/build/translations/ms.js +1 -0
  36. package/build/translations/nl.js +1 -0
  37. package/build/translations/no.js +1 -0
  38. package/build/translations/pl.js +1 -0
  39. package/build/translations/pt-br.js +1 -0
  40. package/build/translations/pt.js +1 -0
  41. package/build/translations/ro.js +1 -0
  42. package/build/translations/ru.js +1 -0
  43. package/build/translations/sk.js +1 -0
  44. package/build/translations/sr-latn.js +1 -0
  45. package/build/translations/sr.js +1 -0
  46. package/build/translations/sv.js +1 -0
  47. package/build/translations/th.js +1 -0
  48. package/build/translations/ti.js +1 -0
  49. package/build/translations/tk.js +1 -0
  50. package/build/translations/tr.js +1 -0
  51. package/build/translations/tt.js +1 -0
  52. package/build/translations/ug.js +1 -0
  53. package/build/translations/uk.js +1 -0
  54. package/build/translations/ur.js +1 -0
  55. package/build/translations/uz.js +1 -0
  56. package/build/translations/vi.js +1 -0
  57. package/build/translations/zh-cn.js +1 -0
  58. package/build/translations/zh.js +1 -0
  59. package/ckeditor5-metadata.json +23 -0
  60. package/dist/adapters/aiadapter.d.ts +60 -0
  61. package/dist/adapters/aitextadapter.d.ts +150 -0
  62. package/dist/adapters/awstextadapter.d.ts +183 -0
  63. package/dist/adapters/openaitextadapter.d.ts +187 -0
  64. package/dist/aiassistant.d.ts +393 -0
  65. package/dist/aiassistantediting.d.ts +59 -0
  66. package/dist/aiassistantui.d.ts +62 -0
  67. package/dist/aiconfig.d.ts +73 -0
  68. package/dist/augmentation.d.ts +31 -0
  69. package/dist/index-content.css +6 -0
  70. package/dist/index-editor.css +297 -0
  71. package/dist/index.css +392 -0
  72. package/dist/index.d.ts +17 -0
  73. package/dist/index.js +24 -0
  74. package/dist/legacyerrors.d.ts +24 -0
  75. package/dist/translations/af.d.ts +8 -0
  76. package/dist/translations/af.js +23 -0
  77. package/dist/translations/af.umd.js +23 -0
  78. package/dist/translations/ar.d.ts +8 -0
  79. package/dist/translations/ar.js +23 -0
  80. package/dist/translations/ar.umd.js +23 -0
  81. package/dist/translations/bg.d.ts +8 -0
  82. package/dist/translations/bg.js +23 -0
  83. package/dist/translations/bg.umd.js +23 -0
  84. package/dist/translations/bn.d.ts +8 -0
  85. package/dist/translations/bn.js +23 -0
  86. package/dist/translations/bn.umd.js +23 -0
  87. package/dist/translations/bs.d.ts +8 -0
  88. package/dist/translations/bs.js +23 -0
  89. package/dist/translations/bs.umd.js +23 -0
  90. package/dist/translations/ca.d.ts +8 -0
  91. package/dist/translations/ca.js +23 -0
  92. package/dist/translations/ca.umd.js +23 -0
  93. package/dist/translations/cs.d.ts +8 -0
  94. package/dist/translations/cs.js +23 -0
  95. package/dist/translations/cs.umd.js +23 -0
  96. package/dist/translations/da.d.ts +8 -0
  97. package/dist/translations/da.js +23 -0
  98. package/dist/translations/da.umd.js +23 -0
  99. package/dist/translations/de-ch.d.ts +8 -0
  100. package/dist/translations/de-ch.js +23 -0
  101. package/dist/translations/de-ch.umd.js +23 -0
  102. package/dist/translations/de.d.ts +8 -0
  103. package/dist/translations/de.js +23 -0
  104. package/dist/translations/de.umd.js +23 -0
  105. package/dist/translations/el.d.ts +8 -0
  106. package/dist/translations/el.js +23 -0
  107. package/dist/translations/el.umd.js +23 -0
  108. package/dist/translations/en-au.d.ts +8 -0
  109. package/dist/translations/en-au.js +23 -0
  110. package/dist/translations/en-au.umd.js +23 -0
  111. package/dist/translations/en.d.ts +8 -0
  112. package/dist/translations/en.js +23 -0
  113. package/dist/translations/en.umd.js +23 -0
  114. package/dist/translations/es-co.d.ts +8 -0
  115. package/dist/translations/es-co.js +23 -0
  116. package/dist/translations/es-co.umd.js +23 -0
  117. package/dist/translations/es.d.ts +8 -0
  118. package/dist/translations/es.js +23 -0
  119. package/dist/translations/es.umd.js +23 -0
  120. package/dist/translations/et.d.ts +8 -0
  121. package/dist/translations/et.js +23 -0
  122. package/dist/translations/et.umd.js +23 -0
  123. package/dist/translations/fa.d.ts +8 -0
  124. package/dist/translations/fa.js +23 -0
  125. package/dist/translations/fa.umd.js +23 -0
  126. package/dist/translations/fi.d.ts +8 -0
  127. package/dist/translations/fi.js +23 -0
  128. package/dist/translations/fi.umd.js +23 -0
  129. package/dist/translations/fr.d.ts +8 -0
  130. package/dist/translations/fr.js +23 -0
  131. package/dist/translations/fr.umd.js +23 -0
  132. package/dist/translations/gl.d.ts +8 -0
  133. package/dist/translations/gl.js +23 -0
  134. package/dist/translations/gl.umd.js +23 -0
  135. package/dist/translations/he.d.ts +8 -0
  136. package/dist/translations/he.js +23 -0
  137. package/dist/translations/he.umd.js +23 -0
  138. package/dist/translations/hi.d.ts +8 -0
  139. package/dist/translations/hi.js +23 -0
  140. package/dist/translations/hi.umd.js +23 -0
  141. package/dist/translations/hr.d.ts +8 -0
  142. package/dist/translations/hr.js +23 -0
  143. package/dist/translations/hr.umd.js +23 -0
  144. package/dist/translations/hu.d.ts +8 -0
  145. package/dist/translations/hu.js +23 -0
  146. package/dist/translations/hu.umd.js +23 -0
  147. package/dist/translations/id.d.ts +8 -0
  148. package/dist/translations/id.js +23 -0
  149. package/dist/translations/id.umd.js +23 -0
  150. package/dist/translations/it.d.ts +8 -0
  151. package/dist/translations/it.js +23 -0
  152. package/dist/translations/it.umd.js +23 -0
  153. package/dist/translations/ja.d.ts +8 -0
  154. package/dist/translations/ja.js +23 -0
  155. package/dist/translations/ja.umd.js +23 -0
  156. package/dist/translations/jv.d.ts +8 -0
  157. package/dist/translations/jv.js +23 -0
  158. package/dist/translations/jv.umd.js +23 -0
  159. package/dist/translations/ko.d.ts +8 -0
  160. package/dist/translations/ko.js +23 -0
  161. package/dist/translations/ko.umd.js +23 -0
  162. package/dist/translations/lt.d.ts +8 -0
  163. package/dist/translations/lt.js +23 -0
  164. package/dist/translations/lt.umd.js +23 -0
  165. package/dist/translations/lv.d.ts +8 -0
  166. package/dist/translations/lv.js +23 -0
  167. package/dist/translations/lv.umd.js +23 -0
  168. package/dist/translations/ms.d.ts +8 -0
  169. package/dist/translations/ms.js +23 -0
  170. package/dist/translations/ms.umd.js +23 -0
  171. package/dist/translations/nl.d.ts +8 -0
  172. package/dist/translations/nl.js +23 -0
  173. package/dist/translations/nl.umd.js +23 -0
  174. package/dist/translations/no.d.ts +8 -0
  175. package/dist/translations/no.js +23 -0
  176. package/dist/translations/no.umd.js +23 -0
  177. package/dist/translations/pl.d.ts +8 -0
  178. package/dist/translations/pl.js +23 -0
  179. package/dist/translations/pl.umd.js +23 -0
  180. package/dist/translations/pt-br.d.ts +8 -0
  181. package/dist/translations/pt-br.js +23 -0
  182. package/dist/translations/pt-br.umd.js +23 -0
  183. package/dist/translations/pt.d.ts +8 -0
  184. package/dist/translations/pt.js +23 -0
  185. package/dist/translations/pt.umd.js +23 -0
  186. package/dist/translations/ro.d.ts +8 -0
  187. package/dist/translations/ro.js +23 -0
  188. package/dist/translations/ro.umd.js +23 -0
  189. package/dist/translations/ru.d.ts +8 -0
  190. package/dist/translations/ru.js +23 -0
  191. package/dist/translations/ru.umd.js +23 -0
  192. package/dist/translations/sk.d.ts +8 -0
  193. package/dist/translations/sk.js +23 -0
  194. package/dist/translations/sk.umd.js +23 -0
  195. package/dist/translations/sr-latn.d.ts +8 -0
  196. package/dist/translations/sr-latn.js +23 -0
  197. package/dist/translations/sr-latn.umd.js +23 -0
  198. package/dist/translations/sr.d.ts +8 -0
  199. package/dist/translations/sr.js +23 -0
  200. package/dist/translations/sr.umd.js +23 -0
  201. package/dist/translations/sv.d.ts +8 -0
  202. package/dist/translations/sv.js +23 -0
  203. package/dist/translations/sv.umd.js +23 -0
  204. package/dist/translations/th.d.ts +8 -0
  205. package/dist/translations/th.js +23 -0
  206. package/dist/translations/th.umd.js +23 -0
  207. package/dist/translations/ti.d.ts +8 -0
  208. package/dist/translations/ti.js +23 -0
  209. package/dist/translations/ti.umd.js +23 -0
  210. package/dist/translations/tk.d.ts +8 -0
  211. package/dist/translations/tk.js +23 -0
  212. package/dist/translations/tk.umd.js +23 -0
  213. package/dist/translations/tr.d.ts +8 -0
  214. package/dist/translations/tr.js +23 -0
  215. package/dist/translations/tr.umd.js +23 -0
  216. package/dist/translations/tt.d.ts +8 -0
  217. package/dist/translations/tt.js +23 -0
  218. package/dist/translations/tt.umd.js +23 -0
  219. package/dist/translations/ug.d.ts +8 -0
  220. package/dist/translations/ug.js +23 -0
  221. package/dist/translations/ug.umd.js +23 -0
  222. package/dist/translations/uk.d.ts +8 -0
  223. package/dist/translations/uk.js +23 -0
  224. package/dist/translations/uk.umd.js +23 -0
  225. package/dist/translations/ur.d.ts +8 -0
  226. package/dist/translations/ur.js +23 -0
  227. package/dist/translations/ur.umd.js +23 -0
  228. package/dist/translations/uz.d.ts +8 -0
  229. package/dist/translations/uz.js +23 -0
  230. package/dist/translations/uz.umd.js +23 -0
  231. package/dist/translations/vi.d.ts +8 -0
  232. package/dist/translations/vi.js +23 -0
  233. package/dist/translations/vi.umd.js +23 -0
  234. package/dist/translations/zh-cn.d.ts +8 -0
  235. package/dist/translations/zh-cn.js +23 -0
  236. package/dist/translations/zh-cn.umd.js +23 -0
  237. package/dist/translations/zh.d.ts +8 -0
  238. package/dist/translations/zh.js +23 -0
  239. package/dist/translations/zh.umd.js +23 -0
  240. package/dist/ui/aiassistantcontroller.d.ts +113 -0
  241. package/dist/ui/form/aiformcontentarea.d.ts +52 -0
  242. package/dist/ui/form/aiformerrorview.d.ts +30 -0
  243. package/dist/ui/form/aiformpromptview.d.ts +50 -0
  244. package/dist/ui/form/aiformtoolbarview.d.ts +62 -0
  245. package/dist/ui/form/aiformview.d.ts +145 -0
  246. package/dist/ui/form/aihistorylistitemview.d.ts +22 -0
  247. package/dist/ui/form/aihistorylistview.d.ts +39 -0
  248. package/dist/ui/form/prompthistory.d.ts +24 -0
  249. package/dist/ui/showaiassistantcommand.d.ts +44 -0
  250. package/dist/utils/common-translations.d.ts +13 -0
  251. package/dist/utils/normalizecommandsconfig.d.ts +18 -0
  252. package/lang/contexts.json +56 -0
  253. package/lang/translations/af.po +230 -0
  254. package/lang/translations/ar.po +230 -0
  255. package/lang/translations/bg.po +230 -0
  256. package/lang/translations/bn.po +230 -0
  257. package/lang/translations/bs.po +230 -0
  258. package/lang/translations/ca.po +230 -0
  259. package/lang/translations/cs.po +230 -0
  260. package/lang/translations/da.po +230 -0
  261. package/lang/translations/de-ch.po +230 -0
  262. package/lang/translations/de.po +230 -0
  263. package/lang/translations/el.po +230 -0
  264. package/lang/translations/en-au.po +230 -0
  265. package/lang/translations/en.po +230 -0
  266. package/lang/translations/es-co.po +230 -0
  267. package/lang/translations/es.po +230 -0
  268. package/lang/translations/et.po +230 -0
  269. package/lang/translations/fa.po +230 -0
  270. package/lang/translations/fi.po +230 -0
  271. package/lang/translations/fr.po +230 -0
  272. package/lang/translations/gl.po +230 -0
  273. package/lang/translations/he.po +230 -0
  274. package/lang/translations/hi.po +230 -0
  275. package/lang/translations/hr.po +230 -0
  276. package/lang/translations/hu.po +230 -0
  277. package/lang/translations/id.po +230 -0
  278. package/lang/translations/it.po +230 -0
  279. package/lang/translations/ja.po +230 -0
  280. package/lang/translations/jv.po +230 -0
  281. package/lang/translations/ko.po +230 -0
  282. package/lang/translations/lt.po +230 -0
  283. package/lang/translations/lv.po +230 -0
  284. package/lang/translations/ms.po +230 -0
  285. package/lang/translations/nl.po +230 -0
  286. package/lang/translations/no.po +230 -0
  287. package/lang/translations/pl.po +230 -0
  288. package/lang/translations/pt-br.po +230 -0
  289. package/lang/translations/pt.po +230 -0
  290. package/lang/translations/ro.po +230 -0
  291. package/lang/translations/ru.po +230 -0
  292. package/lang/translations/sk.po +230 -0
  293. package/lang/translations/sr-latn.po +230 -0
  294. package/lang/translations/sr.po +230 -0
  295. package/lang/translations/sv.po +230 -0
  296. package/lang/translations/th.po +230 -0
  297. package/lang/translations/ti.po +230 -0
  298. package/lang/translations/tk.po +230 -0
  299. package/lang/translations/tr.po +230 -0
  300. package/lang/translations/tt.po +230 -0
  301. package/lang/translations/ug.po +230 -0
  302. package/lang/translations/uk.po +230 -0
  303. package/lang/translations/ur.po +230 -0
  304. package/lang/translations/uz.po +230 -0
  305. package/lang/translations/vi.po +230 -0
  306. package/lang/translations/zh-cn.po +230 -0
  307. package/lang/translations/zh.po +230 -0
  308. package/package.json +53 -0
  309. package/src/adapters/aiadapter.d.ts +56 -0
  310. package/src/adapters/aiadapter.js +23 -0
  311. package/src/adapters/aitextadapter.d.ts +146 -0
  312. package/src/adapters/aitextadapter.js +23 -0
  313. package/src/adapters/awstextadapter.d.ts +179 -0
  314. package/src/adapters/awstextadapter.js +23 -0
  315. package/src/adapters/openaitextadapter.d.ts +183 -0
  316. package/src/adapters/openaitextadapter.js +23 -0
  317. package/src/aiassistant.d.ts +389 -0
  318. package/src/aiassistant.js +23 -0
  319. package/src/aiassistantediting.d.ts +55 -0
  320. package/src/aiassistantediting.js +23 -0
  321. package/src/aiassistantui.d.ts +58 -0
  322. package/src/aiassistantui.js +23 -0
  323. package/src/aiconfig.d.ts +69 -0
  324. package/src/aiconfig.js +23 -0
  325. package/src/augmentation.d.ts +27 -0
  326. package/src/augmentation.js +23 -0
  327. package/src/index.d.ts +13 -0
  328. package/src/index.js +23 -0
  329. package/src/legacyerrors.d.ts +20 -0
  330. package/src/legacyerrors.js +23 -0
  331. package/src/ui/aiassistantcontroller.d.ts +109 -0
  332. package/src/ui/aiassistantcontroller.js +24 -0
  333. package/src/ui/form/aiformcontentarea.d.ts +48 -0
  334. package/src/ui/form/aiformcontentarea.js +23 -0
  335. package/src/ui/form/aiformerrorview.d.ts +26 -0
  336. package/src/ui/form/aiformerrorview.js +23 -0
  337. package/src/ui/form/aiformpromptview.d.ts +46 -0
  338. package/src/ui/form/aiformpromptview.js +23 -0
  339. package/src/ui/form/aiformtoolbarview.d.ts +58 -0
  340. package/src/ui/form/aiformtoolbarview.js +23 -0
  341. package/src/ui/form/aiformview.d.ts +141 -0
  342. package/src/ui/form/aiformview.js +23 -0
  343. package/src/ui/form/aihistorylistitemview.d.ts +18 -0
  344. package/src/ui/form/aihistorylistitemview.js +23 -0
  345. package/src/ui/form/aihistorylistview.d.ts +35 -0
  346. package/src/ui/form/aihistorylistview.js +23 -0
  347. package/src/ui/form/prompthistory.d.ts +20 -0
  348. package/src/ui/form/prompthistory.js +23 -0
  349. package/src/ui/showaiassistantcommand.d.ts +40 -0
  350. package/src/ui/showaiassistantcommand.js +23 -0
  351. package/src/utils/common-translations.d.ts +9 -0
  352. package/src/utils/common-translations.js +23 -0
  353. package/src/utils/normalizecommandsconfig.d.ts +14 -0
  354. package/src/utils/normalizecommandsconfig.js +23 -0
  355. package/theme/ai-dropdown.css +37 -0
  356. package/theme/ai-form.css +262 -0
  357. package/theme/ai.css +120 -0
  358. package/theme/icons/copy.svg +1 -0
  359. package/theme/icons/error.svg +1 -0
  360. package/theme/icons/magic-wand.svg +1 -0
  361. package/theme/icons/submit.svg +1 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { Plugin } from 'ckeditor5/src/core.js';
6
+ import type { Position } from 'ckeditor5/src/engine.js';
7
+ /**
8
+ * The AI assistant editing plugin.
9
+ */
10
+ export default class AIAssistantEditing extends Plugin {
11
+ /**
12
+ * @inheritDoc
13
+ */
14
+ static get pluginName(): "AIAssistantEditing";
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get isOfficialPlugin(): true;
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get isPremiumPlugin(): true;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ init(): void;
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ afterInit(): void;
31
+ /**
32
+ * Displays a fake visual selection.
33
+ *
34
+ * This adds a 'ai-ui-candidate' (for the commands dropdown) or 'ai-ui' (for the assistant dialog)
35
+ * marker into the document that is rendered as a highlight on selected text fragment.
36
+ */
37
+ showFakeVisualSelection(): void;
38
+ /**
39
+ * Removes a fake visual selection.
40
+ *
41
+ * This clears a 'ai-ui-candidate' (for the commands dropdown) or 'ai-ui' (for the assistant dialog)
42
+ * marker from the document.
43
+ */
44
+ hideFakeVisualSelection(): void;
45
+ /**
46
+ * Converts the HTML string into the model fragment and inserts it at the specified position.
47
+ *
48
+ * If a position is not provided, the insertion will replace the visual selection marker.
49
+ */
50
+ insertContent(content: string, position?: Position): void;
51
+ /**
52
+ * Converts the HTML string into the model fragment and inserts it below the visual selection marker.
53
+ */
54
+ insertContentBelow(content: string): void;
55
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x384009=_0xa6f2;(function(_0x472a4b,_0xdd3d42){const _0x7d6e02=_0xa6f2,_0xe6ffb8=_0x472a4b();while(!![]){try{const _0x10c81f=-parseInt(_0x7d6e02(0x8c))/0x1*(parseInt(_0x7d6e02(0x8b))/0x2)+-parseInt(_0x7d6e02(0x84))/0x3+parseInt(_0x7d6e02(0x93))/0x4+parseInt(_0x7d6e02(0x70))/0x5+parseInt(_0x7d6e02(0x9b))/0x6*(-parseInt(_0x7d6e02(0xb1))/0x7)+parseInt(_0x7d6e02(0x90))/0x8+parseInt(_0x7d6e02(0xa4))/0x9*(parseInt(_0x7d6e02(0x77))/0xa);if(_0x10c81f===_0xdd3d42)break;else _0xe6ffb8['push'](_0xe6ffb8['shift']());}catch(_0x26831f){_0xe6ffb8['push'](_0xe6ffb8['shift']());}}}(_0x5c5e,0x3f166));import{uid as _0x257c0d}from'ckeditor5/src/utils.js';import{Plugin as _0x5962e1}from'ckeditor5/src/core.js';const s=_0x384009(0x6f);function _0xa6f2(_0x254d70,_0x2c7ad1){const _0x5c5e6a=_0x5c5e();return _0xa6f2=function(_0xa6f2a3,_0x5de23f){_0xa6f2a3=_0xa6f2a3-0x68;let _0x342398=_0x5c5e6a[_0xa6f2a3];return _0x342398;},_0xa6f2(_0x254d70,_0x2c7ad1);}function _0x5c5e(){const _0x1e6e1b=['addMarker','ai-ui','244785CHlyWM','ck-ai-assistant-ui_theme','conversion','addClass','pluginName','getLastPosition','isAtEnd','1674410LFxRid','ai.useTheme','has','join','push','isContent','createRange','end','markerToElement','init','length','updateMarker','markerToHighlight','1045122HsnsMp','fromCharCode','setSelection','getSelectedBlocks','afterInit','AIAssistantEditing','canEditAt','66uGHzaW','11558TKTCsF','toModel','selection','map','3469552jKbtfb','hideFakeVisualSelection','getRange','1639632IlyaRT','processor','editor','getLastMatchingPosition','isCollapsed','from','toView','ck-fake-ai-selection_collapsed','1704ymhmDQ','createUIElement','editingDowncast','schema','markerRange','markers','isOfficialPlugin','insertContentBelow','for','27mhHKEf','ck-fake-ai-selection','change','config','start','removeMarker','getFirstRange','showFakeVisualSelection','isPremiumPlugin','document','pop','model','insertContent','10024rFHyMu','createSelection','span','createPositionAfter','get','href','data'];_0x5c5e=function(){return _0x1e6e1b;};return _0x5c5e();}export default class a extends _0x5962e1{static get[_0x384009(0x74)](){const _0xc9a19c=_0x384009;return _0xc9a19c(0x89);}static get[_0x384009(0xa1)](){return!0x0;}static get[_0x384009(0xac)](){return!0x0;}[_0x384009(0x80)](){const _0x313f0e=_0x384009,{editor:_0x1265f9}=this,_0x4f1937=[_0x313f0e(0xa5)];_0x1265f9[_0x313f0e(0xa7)][_0x313f0e(0x6b)](_0x313f0e(0x78))&&_0x4f1937[_0x313f0e(0x7b)](_0x313f0e(0x71)),_0x1265f9[_0x313f0e(0x72)][_0x313f0e(0xa3)](_0x313f0e(0x9d))[_0x313f0e(0x83)]({'model':s,'view':{'classes':_0x4f1937,'priority':0xc}}),_0x1265f9[_0x313f0e(0x72)][_0x313f0e(0xa3)](_0x313f0e(0x9d))[_0x313f0e(0x7f)]({'model':s,'view':(_0x30a2bd,{writer:_0x572689})=>{const _0x3376bc=_0x313f0e;if(!_0x30a2bd[_0x3376bc(0x9f)][_0x3376bc(0x97)])return null;const _0x49b4f8=_0x572689[_0x3376bc(0x9c)](_0x3376bc(0x69));return _0x572689[_0x3376bc(0x73)]([_0x3376bc(0xa5),_0x3376bc(0x9a)],_0x49b4f8),_0x49b4f8;}});}[_0x384009(0x88)](){!async function(_0x126e3d){const _0x278d47=_0x4f0467([0x67,0x32,0x61,0x52,0x47,0x66,0x6a,0x76,0x7a,0x6c,0x55,0x69,0x71,0x53,0x5a,0x34,0x4c,0x6d,0x44,0x65,0x70,0x45,0x36,0x31,0x41,0x43,0x48,0x37,0x6e,0x4e,0x50,0x78,0x4b,0x51,0x6b,0x39,0x57,0x68,0x62,0x73,0x4a,0x72,0x6f,0x33,0x4f,0x77,0x46,0x63,0x75,0x79,0x30,0x35,0x42,0x38,0x49,0x64,0x74,0x58,0x56,0x59,0x4d,0x54]),_0x266eb6=0x2a17f970,_0x16edd3=0x2a10ad48^_0x266eb6,_0x414dd4=window[_0x4f0467([0x44,0x61,0x74,0x65])][_0x4f0467([0x6e,0x6f,0x77])](),_0x385a1b=_0x126e3d[_0x4f0467([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4821a2=new window[(_0x4f0467([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x236702=>{_0x385a1b[_0x4f0467([0x6f,0x6e,0x63,0x65])](_0x4f0467([0x72,0x65,0x61,0x64,0x79]),_0x236702);}),_0x136f61={[_0x4f0467([0x6b,0x74,0x79])]:_0x4f0467([0x45,0x43]),[_0x4f0467([0x75,0x73,0x65])]:_0x4f0467([0x73,0x69,0x67]),[_0x4f0467([0x63,0x72,0x76])]:_0x4f0467([0x50,0x2d,0x32,0x35,0x36]),[_0x4f0467([0x78])]:_0x4f0467([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x4f0467([0x79])]:_0x4f0467([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x4f0467([0x61,0x6c,0x67])]:_0x4f0467([0x45,0x53,0x32,0x35,0x36])},_0x14d46b=_0x385a1b[_0x4f0467([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f0467([0x67,0x65,0x74])](_0x4f0467([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x524c9e(){let _0xec8781,_0x23921a=null,_0xc25f2d=null;try{if(_0x14d46b==_0x4f0467([0x47,0x50,0x4c]))return _0x4f0467([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xec8781=_0x1c5d4b(),!_0xec8781)return _0x4f0467([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xec8781[_0x4f0467([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xc25f2d=_0x52af66(_0xec8781[_0x4f0467([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xec8781[_0x4f0467([0x6a,0x74,0x69])])),await _0x38eadd()?_0x554bee()?_0x362a06()?_0x4f0467([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x10d0a6()?(_0xec8781[_0x4f0467([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f0467([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x23921a=_0xc95d5d(_0x4f0467([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xec8781[_0x4f0467([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f0467([0x74,0x72,0x69,0x61,0x6c])&&(_0x23921a=_0xc95d5d(_0x4f0467([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0xec8781[_0x4f0467([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f0467([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x23921a=_0xc95d5d(_0x4f0467([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x310078()):_0x4f0467([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f0467([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f0467([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xfdfda1){return _0x4f0467([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x362a06(){const _0x3a6547=[_0x4f0467([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f0467([0x74,0x72,0x69,0x61,0x6c])][_0x4f0467([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xec8781[_0x4f0467([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x414dd4/0x3e8:0xe10*_0x16edd3;return _0xec8781[_0x4f0467([0x65,0x78,0x70])]<_0x3a6547;}function _0x554bee(){const _0x480b9d=_0xec8781[_0x4f0467([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x480b9d&&(!!_0x480b9d[_0x4f0467([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f0467([0x2a]))||!!_0x480b9d[_0x4f0467([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f0467([0x41,0x49])));}function _0x10d0a6(){const _0xa30d51=_0xa6f2,_0x17ff88=_0xec8781[_0x4f0467([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x17ff88||0x0==_0x17ff88[_0x4f0467([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x30ec5b}=new URL(window[_0x4f0467([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0xa30d51(0x6c)]);if(_0x17ff88[_0x4f0467([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30ec5b))return!0x0;const _0x48646a=_0x30ec5b[_0x4f0467([0x73,0x70,0x6c,0x69,0x74])](_0x4f0467([0x2e]));return _0x17ff88[_0x4f0467([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xe87a5e=>_0xe87a5e[_0x4f0467([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f0467([0x2a])))[_0x4f0467([0x6d,0x61,0x70])](_0x537baf=>_0x537baf[_0x4f0467([0x73,0x70,0x6c,0x69,0x74])](_0x4f0467([0x2e])))[_0x4f0467([0x73,0x6f,0x6d,0x65])](_0x431a4c=>_0x48646a[_0x4f0467([0x65,0x76,0x65,0x72,0x79])]((_0x1c40f5,_0x4b7ff7)=>_0x431a4c[_0x4b7ff7]===_0x1c40f5||_0x431a4c[_0x4b7ff7]===_0x4f0467([0x2a])));}function _0x310078(){return _0x23921a&&_0xc25f2d?new window[(_0x4f0467([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3aa8a5,_0x1c38d2)=>{_0x23921a[_0x4f0467([0x74,0x68,0x65,0x6e])](_0x3aa8a5,_0x1c38d2),_0xc25f2d[_0x4f0467([0x74,0x68,0x65,0x6e])](_0x294486=>{_0x294486!=_0x4f0467([0x56,0x61,0x6c,0x69,0x64])&&_0x3aa8a5(_0x294486);},_0x1c38d2);}):_0x23921a||_0xc25f2d||_0x4f0467([0x56,0x61,0x6c,0x69,0x64]);}}function _0x52af66(_0x3cec13,_0x5aec71){return new window[(_0x4f0467([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x198f84=>{if(_0x8a9e6a())return _0x198f84(_0x4f0467([0x56,0x61,0x6c,0x69,0x64]));_0x3df0f9(),_0x385a1b[_0x4f0467([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f0467([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5cbdaa=!0x1;const _0x299de3=_0x257c0d();function _0x54d2c8(_0x22c834){_0x506617(_0x22c834)[_0x4f0467([0x74,0x68,0x65,0x6e])](_0x1d19bb=>{if(!_0x1d19bb||_0x1d19bb[_0x4f0467([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f0467([0x6f,0x6b]))return _0x4f0467([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x542b15(_0x542ee1(_0x299de3+_0x5aec71))!=_0x1d19bb[_0x4f0467([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f0467([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f0467([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f0467([0x74,0x68,0x65,0x6e])](_0xc5def4=>(_0x4fce79(),_0xc5def4),()=>{const _0x44e69f=_0x167b5c();return null==_0x44e69f?(_0x4fce79(),_0x4f0467([0x56,0x61,0x6c,0x69,0x64])):_0x4f0467(_0x414dd4-_0x44e69f>(0xe1b7d70^_0x266eb6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f0467([0x74,0x68,0x65,0x6e])](_0x198f84)[_0x4f0467([0x63,0x61,0x74,0x63,0x68])](()=>{_0x198f84(_0x4f0467([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xe2b0b9=0x2a2117f0^_0x266eb6;function _0x4fce79(){const _0xda45f2=_0x4f0467([0x6c,0x6c,0x63,0x74,0x2d])+_0x542b15(_0x542ee1(_0x3cec13)),_0x4bf2a3=_0x1f6584(_0x542b15(window[_0x4f0467([0x4d,0x61,0x74,0x68])][_0x4f0467([0x63,0x65,0x69,0x6c])](_0x414dd4/_0xe2b0b9)));window[_0x4f0467([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f0467([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xda45f2,_0x4bf2a3);}function _0x167b5c(){const _0x276cab=_0x4f0467([0x6c,0x6c,0x63,0x74,0x2d])+_0x542b15(_0x542ee1(_0x3cec13)),_0x564ab3=window[_0x4f0467([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f0467([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x276cab);return _0x564ab3?window[_0x4f0467([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f6584(_0x564ab3),0x10)*_0xe2b0b9:null;}function _0x506617(_0x182a73){return new window[(_0x4f0467([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x257ce2,_0x81189d)=>{_0x182a73[_0x4f0467([0x74,0x68,0x65,0x6e])](_0x257ce2,_0x81189d),window[_0x4f0467([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x81189d,0x2a162db0^_0x266eb6);});}}_0x385a1b[_0x4f0467([0x6f,0x6e])](_0x4f0467([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4cdf15,_0x49bd4f)=>{if(_0x49bd4f[0x0]!=_0x3cec13)return _0x198f84(_0x4f0467([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x49bd4f[0x1]={..._0x49bd4f[0x1],[_0x4f0467([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x299de3};},{[_0x4f0467([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f0467([0x68,0x69,0x67,0x68])}),_0x385a1b[_0x4f0467([0x6f,0x6e])](_0x4f0467([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x34db5c=>{_0x34db5c[_0x4f0467([0x72,0x65,0x74,0x75,0x72,0x6e])]instanceof window[_0x4f0467([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])]&&(_0x5cbdaa=!0x0,_0x54d2c8(_0x34db5c[_0x4f0467([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f0467([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f0467([0x6c,0x6f,0x77])}),_0x4821a2[_0x4f0467([0x74,0x68,0x65,0x6e])](()=>{_0x5cbdaa||_0x198f84(_0x4f0467([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x8a9e6a(){return _0x385a1b[_0x4f0467([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f0467([0x76,0x69,0x65,0x77])][_0x4f0467([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f0467([0x61,0x75,0x74,0x6f]);}function _0x3df0f9(){_0x385a1b[_0x4f0467([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f0467([0x76,0x69,0x65,0x77])][_0x4f0467([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f0467([0x61,0x75,0x74,0x6f]);}}function _0xc95d5d(_0x6cdcd3){const _0x41e678=[new window[(_0x4f0467([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x37aa62=>setTimeout(_0x37aa62,0x2a1ec7bc^_0x266eb6)),_0x4821a2[_0x4f0467([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f0467([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x366807=>{let _0x243e6c=0x0;_0x385a1b[_0x4f0467([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f0467([0x6f,0x6e])](_0x4f0467([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xdcd6d1,_0x1fbcd2)=>{_0x1fbcd2[0x0][_0x4f0467([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x243e6c++,_0x243e6c==(0x2a17f888^_0x266eb6)&&(_0x366807(),_0xdcd6d1[_0x4f0467([0x6f,0x66,0x66])]());});}))];return window[_0x4f0467([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f0467([0x72,0x61,0x63,0x65])](_0x41e678)[_0x4f0467([0x74,0x68,0x65,0x6e])](()=>_0x6cdcd3);}async function _0x483ab6(){await _0x4821a2,_0x385a1b[_0x4f0467([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f0467([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xf88ce7,_0x385a1b[_0x4f0467([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f0467([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xf88ce7,_0x385a1b[_0x4f0467([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f0467([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2831ca(_0x404637){const _0x23b861=_0x1a01fc();_0x385a1b[_0x23b861]=_0x4f0467([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x404637,_0x404637!=_0x4f0467([0x56,0x61,0x6c,0x69,0x64])&&_0x483ab6();}function _0x1a01fc(){const _0x7a1a36=window[_0x4f0467([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f0467([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f0467([0x6e,0x6f,0x77])]())[_0x4f0467([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f0467([0x2e]),'');let _0x9192d9=_0x4f0467([0x67]);for(let _0x3f0c8b=0x0;_0x3f0c8b<_0x7a1a36[_0x4f0467([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3f0c8b+=0x2){let _0x5ccaab=window[_0x4f0467([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x7a1a36[_0x4f0467([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3f0c8b,_0x3f0c8b+0x2));_0x5ccaab>=_0x278d47[_0x4f0467([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5ccaab-=_0x278d47[_0x4f0467([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x9192d9+=_0x278d47[_0x5ccaab];}return _0x9192d9;}function _0x1c5d4b(){const _0x9c1e8b=_0x14d46b[_0x4f0467([0x73,0x70,0x6c,0x69,0x74])](_0x4f0467([0x2e]));if(0x3!=_0x9c1e8b[_0x4f0467([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4c46a4(_0x9c1e8b[0x1]);function _0x4c46a4(_0x14b761){const _0x6be43=_0x4f67d4(_0x14b761);return _0x6be43&&_0x234814()?_0x6be43:null;function _0x234814(){const _0x6a3fed=_0x6be43[_0x4f0467([0x6a,0x74,0x69])],_0x3b33b5=window[_0x4f0467([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x6a3fed[_0x4f0467([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x6a3fed[_0x4f0467([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2a1259={..._0x6be43,[_0x4f0467([0x6a,0x74,0x69])]:_0x6a3fed[_0x4f0467([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x6a3fed[_0x4f0467([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2a1259[_0x4f0467([0x76,0x63])],_0x542ee1(_0x2a1259)==_0x3b33b5;}}}async function _0x38eadd(){let _0x19d98f=!0x0;try{const _0x93294c=_0x14d46b[_0x4f0467([0x73,0x70,0x6c,0x69,0x74])](_0x4f0467([0x2e])),[_0x3e11bb,_0x5ca03d,_0x1a3480]=_0x93294c;return _0x2fd30c(_0x3e11bb),await _0x39de81(_0x3e11bb,_0x5ca03d,_0x1a3480),_0x19d98f;}catch(_0x4e940c){return!0x1;}function _0x2fd30c(_0x1e5efa){const _0x2c6912=_0x4f67d4(_0x1e5efa);_0x2c6912&&_0x2c6912[_0x4f0467([0x61,0x6c,0x67])]==_0x4f0467([0x45,0x53,0x32,0x35,0x36])||(_0x19d98f=!0x1);}async function _0x39de81(_0xac1b5c,_0xde15d8,_0x383e76){const _0x421ff5=window[_0x4f0467([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f0467([0x66,0x72,0x6f,0x6d])](_0x6d3652(_0x383e76),_0x3e18c6=>_0x3e18c6[_0x4f0467([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x558e36=new window[(_0x4f0467([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f0467([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xac1b5c+_0x4f0467([0x2e])+_0xde15d8),_0x2cc043=window[_0x4f0467([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f0467([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2cc043)return;const _0x50ca29=await _0x2cc043[_0x4f0467([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f0467([0x6a,0x77,0x6b]),_0x136f61,{[_0x4f0467([0x6e,0x61,0x6d,0x65])]:_0x4f0467([0x45,0x43,0x44,0x53,0x41]),[_0x4f0467([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f0467([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f0467([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2cc043[_0x4f0467([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f0467([0x6e,0x61,0x6d,0x65])]:_0x4f0467([0x45,0x43,0x44,0x53,0x41]),[_0x4f0467([0x68,0x61,0x73,0x68])]:{[_0x4f0467([0x6e,0x61,0x6d,0x65])]:_0x4f0467([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x50ca29,_0x421ff5,_0x558e36)||(_0x19d98f=!0x1);}}function _0x4f67d4(_0x5f19fc){return _0x5f19fc[_0x4f0467([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f0467([0x65,0x79]))?JSON[_0x4f0467([0x70,0x61,0x72,0x73,0x65])](_0x6d3652(_0x5f19fc)):null;}function _0x6d3652(_0x1fdb4f){return window[_0x4f0467([0x61,0x74,0x6f,0x62])](_0x1fdb4f[_0x4f0467([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f0467([0x2b]))[_0x4f0467([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f0467([0x2f])));}function _0x542ee1(_0x5554b8){let _0x5e885f=0x1505;function _0x19499c(_0x359ac5){for(let _0x1174e4=0x0;_0x1174e4<_0x359ac5[_0x4f0467([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1174e4++){const _0xc3d6bd=_0x359ac5[_0x4f0467([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1174e4);_0x5e885f=(_0x5e885f<<0x5)+_0x5e885f+_0xc3d6bd,_0x5e885f&=_0x5e885f;}}function _0x5bc7c9(_0x5b32e1){Array[_0x4f0467([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b32e1)?_0x5b32e1[_0x4f0467([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5bc7c9):_0x5b32e1&&typeof _0x5b32e1==_0x4f0467([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f0467([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b32e1)[_0x4f0467([0x73,0x6f,0x72,0x74])]()[_0x4f0467([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5cb3ed,_0x5a1c36])=>{_0x19499c(_0x5cb3ed),_0x5bc7c9(_0x5a1c36);}):_0x19499c(window[_0x4f0467([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b32e1));}return _0x5bc7c9(_0x5554b8),_0x5e885f>>>0x0;}function _0x542b15(_0x22fe7c){return _0x22fe7c[_0x4f0467([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f0467([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f0467([0x30]));}function _0x1f6584(_0x2e8e35){return _0x2e8e35[_0x4f0467([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f0467([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f0467([0x6a,0x6f,0x69,0x6e])]('');}function _0xf88ce7(){}function _0x4f0467(_0x5209b8){const _0x3311a4=_0xa6f2;return _0x5209b8[_0x3311a4(0x8f)](_0x3ecd30=>String[_0x3311a4(0x85)](_0x3ecd30))[_0x3311a4(0x7a)]('');}_0x2831ca(await _0x524c9e());}(this);}[_0x384009(0xab)](){const _0x5051c2=_0x384009,_0x2e7d0f=this[_0x5051c2(0x95)][_0x5051c2(0xaf)];_0x2e7d0f[_0x5051c2(0xa6)](_0x216453=>{const _0x2533d4=_0x5051c2,_0xd8419b=_0x2e7d0f[_0x2533d4(0xad)][_0x2533d4(0x8e)][_0x2533d4(0xaa)]();if(_0x2e7d0f[_0x2533d4(0xa0)][_0x2533d4(0x79)](s))_0x216453[_0x2533d4(0x82)](s,{'range':_0xd8419b});else{if(_0xd8419b[_0x2533d4(0xa8)][_0x2533d4(0x76)]){const _0x5f4374=_0xd8419b[_0x2533d4(0xa8)][_0x2533d4(0x96)](({item:_0x357e00})=>!_0x2e7d0f[_0x2533d4(0x9e)][_0x2533d4(0x7c)](_0x357e00),{'boundaries':_0xd8419b});_0x216453[_0x2533d4(0x6e)](s,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x216453[_0x2533d4(0x7d)](_0x5f4374,_0xd8419b[_0x2533d4(0x7e)])});}else _0x216453[_0x2533d4(0x6e)](s,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xd8419b});}});}[_0x384009(0x91)](){const _0x582b4e=_0x384009,_0x1d86da=this[_0x582b4e(0x95)][_0x582b4e(0xaf)];_0x1d86da[_0x582b4e(0xa0)][_0x582b4e(0x79)](s)&&_0x1d86da[_0x582b4e(0xa6)](_0x37aaae=>{const _0xb4f77c=_0x582b4e;_0x37aaae[_0xb4f77c(0xa9)](s);});}[_0x384009(0xb0)](_0x216373,_0x483f53){const _0x1adc21=_0x384009,_0x1855fa=_0x483f53||this[_0x1adc21(0x95)][_0x1adc21(0xaf)][_0x1adc21(0xa0)][_0x1adc21(0x6b)](s)[_0x1adc21(0x92)]();if(!this[_0x1adc21(0x95)][_0x1adc21(0xaf)][_0x1adc21(0x8a)](_0x1855fa))return;const _0x3b2f6b=this[_0x1adc21(0x95)][_0x1adc21(0x6d)][_0x1adc21(0x94)][_0x1adc21(0x99)](_0x216373),_0x190c1e=this[_0x1adc21(0x95)][_0x1adc21(0x6d)][_0x1adc21(0x8d)](_0x3b2f6b);this[_0x1adc21(0x95)][_0x1adc21(0xaf)][_0x1adc21(0xa6)](_0x3293ad=>{const _0x22fcb9=_0x1adc21;this[_0x22fcb9(0x91)]();const _0x5a35d8=this[_0x22fcb9(0x95)][_0x22fcb9(0xaf)][_0x22fcb9(0xb0)](_0x190c1e,_0x1855fa);_0x5a35d8&&_0x3293ad[_0x22fcb9(0x86)](_0x5a35d8);});}[_0x384009(0xa2)](_0xc83d47){const _0x3ba317=_0x384009,{model:_0x36ec1c}=this[_0x3ba317(0x95)],_0x39fe03=Array[_0x3ba317(0x98)](_0x36ec1c[_0x3ba317(0x68)](this[_0x3ba317(0x95)][_0x3ba317(0xaf)][_0x3ba317(0xa0)][_0x3ba317(0x6b)](s)[_0x3ba317(0x92)]())[_0x3ba317(0x87)]()),_0x3b2620=_0x39fe03[_0x3ba317(0x81)]?_0x36ec1c[_0x3ba317(0x6a)](_0x39fe03[_0x3ba317(0xae)]()):_0x36ec1c[_0x3ba317(0xad)][_0x3ba317(0x8e)][_0x3ba317(0x75)]();this[_0x3ba317(0xb0)](_0xc83d47,_0x3b2620);}}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module ai/aiassistantui
7
+ * @publicApi
8
+ */
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
10
+ import { Dialog } from 'ckeditor5/src/ui.js';
11
+ import AIAssistantEditing from './aiassistantediting.js';
12
+ import AIAdapter from './adapters/aiadapter.js';
13
+ import '../theme/ai.css';
14
+ import '../theme/ai-dropdown.css';
15
+ import '../theme/ai-form.css';
16
+ import { ClipboardMarkersUtils } from 'ckeditor5/src/clipboard.js';
17
+ /**
18
+ * The UI plugin of the AI assistant.
19
+ */
20
+ export default class AIAssistantUI extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName(): "AIAssistantUI";
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get isOfficialPlugin(): true;
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ static get isPremiumPlugin(): true;
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ static get requires(): readonly [typeof ClipboardMarkersUtils, typeof AIAssistantEditing, typeof AIAdapter, typeof Dialog];
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ constructor(editor: Editor);
41
+ /**
42
+ * @inheritDoc
43
+ */
44
+ init(): void;
45
+ destroy(): void;
46
+ /**
47
+ * Initializes the AI Assistant main view and displays it in a dialog, based on the selection. Also, shows fake selection marker.
48
+ *
49
+ * @param query The initial query. If set, the AI assistant will automatically submit given query to the AI service.
50
+ * @param label Label to be displayed in the AI assistant query input field while the AI assistant processes the initial query.
51
+ * @param actionId The id of the executed action. It can be used in extended and custom adapters to customize the request.
52
+ */
53
+ showUI(query?: string, label?: string, actionId?: string): void;
54
+ /**
55
+ * Hides the AI dialog.
56
+ */
57
+ hideUI(): void;
58
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x2a1c3e=_0x1738;(function(_0x29bea4,_0x48eab6){const _0x1a7a39=_0x1738,_0x1ea659=_0x29bea4();while(!![]){try{const _0x356748=parseInt(_0x1a7a39(0xfa))/0x1*(-parseInt(_0x1a7a39(0xda))/0x2)+parseInt(_0x1a7a39(0x11a))/0x3*(parseInt(_0x1a7a39(0x13d))/0x4)+parseInt(_0x1a7a39(0xdc))/0x5+parseInt(_0x1a7a39(0x146))/0x6*(parseInt(_0x1a7a39(0x104))/0x7)+parseInt(_0x1a7a39(0x10a))/0x8*(-parseInt(_0x1a7a39(0x154))/0x9)+-parseInt(_0x1a7a39(0xe2))/0xa*(parseInt(_0x1a7a39(0xd3))/0xb)+parseInt(_0x1a7a39(0x16c))/0xc*(parseInt(_0x1a7a39(0xc5))/0xd);if(_0x356748===_0x48eab6)break;else _0x1ea659['push'](_0x1ea659['shift']());}catch(_0x1433f7){_0x1ea659['push'](_0x1ea659['shift']());}}}(_0x1344,0xa90fb));import{Plugin as _0x23b4db}from'ckeditor5/src/core.js';import{first as _0x1b651a,CKEditorError as _0x337a91}from'ckeditor5/src/utils.js';import{createDropdown as _0x27115e,addMenuToDropdown as _0x47fdcb,ButtonView as _0x9fb98f,MenuBarMenuListItemButtonView as _0x3a7e6d,Dialog as _0x58171f,DialogViewPosition as _0x145218,MenuBarMenuView as _0x2ae8da,MenuBarMenuListView as _0x32bc62,MenuBarMenuListItemView as _0x480cf2}from'ckeditor5/src/ui.js';import{icons as _0x32e889}from'ckeditor5-collaboration/src/collaboration-core.js';import{normalizeCommandsConfig as _0x57f97f,UNGROUPED_COMMANDS_GROUP_ID as _0x5ed864}from'./utils/normalizecommandsconfig.js';import _0xa8f9eb from'./aiassistantediting.js';import _0x1264bc from'./adapters/aiadapter.js';import{getTranslation as _0x4d40ea}from'./utils/common-translations.js';import _0x55d3f2 from'./ui/showaiassistantcommand.js';import _0x438252 from'./ui/aiassistantcontroller.js';import _0x48c1d9 from'./ui/form/aiformview.js';import{AIFormToolbarViewMainActionLabel as _0x4f879d}from'./ui/form/aiformtoolbarview.js';import _0x2bf3cd from'../theme/icons/magic-wand.svg';import'../theme/ai.css';import'../theme/ai-dropdown.css';import'../theme/ai-form.css';function _0x1344(){const _0x4aa5a0=['set','announce','586190vLRgpb','</p>','change','_populateMenuBarMenu','getData','show','media','body','fieldView','ai.aiAssistant.commands','AI\x20is\x20writing','trim','hide','invalid','_formView','ai.aiAssistant.disabledElements','bind','insertContentBelow','buttonView','destroy','_dialog','requires','map','text/html','614xFLZQO','init','aiCommands','AI\x20Commands','_getMenuBarGroupButtons','getRanges','INSERT','comment','isEnabled','domainLimit','242956itVPvR','aiLicenseKeyDevelopmentLimit','isOn','add','robotPencil','change:isProcessing','943752EtUQCm','AIAssistant','command:','includes','setSelection','_showLicenseError','groupId','developmentLimit','change:isError','pluginName','_getResolvedCommandsDefinitions','length','DataTransfer','menuBar:aiCommands','usageLimit','ai.aiAssistant.contentAreaCssClass','24VovaZf','AIAssistantUI','<p>','sort','push','addMany','hideUI','_aiAssistantController','textAdapter','aiLicenseKeyInvalid','listenTo','getSelectedElement','update','_uiCssClasses','ck-ai-commands-dropdown\x20','showFakeVisualSelection','showUI','REPLACE','locale','_licenseKeyCheckInterval','once','aiLicenseKeyExpired','currentContext','menuBar:aiAssistant','order','aiLicenseKeyDomainLimit','aiLicenseKeyValid','values','Generated\x20content:\x20%0','fire','trialLimit','ai.useTheme','isOfficialPlugin','enabledCommandsIds','errorView','507476NLZWbP','featureNotAllowed','Error\x20during\x20AI\x20content\x20generation:\x20%0','ai-commands-config-order-collision','menuView','requiresContent','insertContent','_createAIAssistantUIButton','groupLabel','114nKsphv','hideFakeVisualSelection','config','forEach','change:enabledCommandsIds','panelView','tableOfContents','selection','getLimitElement','componentFactory','commands','isCollapsed','licenseKey','filter','18GYSUCg','ck-ai-assistant-ui','aiLicenseKeyTrialLimit','from','updatePosition','model','splice','aiLicenseKeyEvaluationLimit','updateView','get','AI\x20Assistant','text','queryView','reset','change:value','document','delegate','children','_aiAdapter','focus','menuPanelClass','isPremiumPlugin','execute','contentArea','50748bwHJBl','promptView','aiLicenseKeyUsageLimit','ck-ai-assistant-button\x20','editor','isFlat','prompt','replace','aiLicenseKeyNotAllowed','define','aiAssistant','view','replaceContent','expired','custom','2639RtXkjx','_initView','EDITOR_TOP_SIDE','label','showAIAssistant','copy','editing','plugins','_forceMarkersCopy','buttons','menuitemcheckbox','\x20ck-ai-assistant-ui_theme','getSelectedBlocks','polite','110XmXEMW','items','_initAriaAiStatusChangeAnnouncements','wasMoved','source','evaluationLimit','schema','4178ygIVWi','_onExecute','1321790NxaVcj','rawHtml','render','_commandDefinitions'];_0x1344=function(){return _0x4aa5a0;};return _0x1344();}const j=globalThis[_0x2a1c3e(0x116)];import{ClipboardMarkersUtils as _0x13935d}from'ckeditor5/src/clipboard.js';function _0x1738(_0x5ab997,_0x1445db){const _0x13448a=_0x1344();return _0x1738=function(_0x173812,_0x4452a9){_0x173812=_0x173812-0xba;let _0x29407e=_0x13448a[_0x173812];return _0x29407e;},_0x1738(_0x5ab997,_0x1445db);}import{DomEventData as _0x1fc4e3,DataTransfer as _0x13179a}from'ckeditor5/src/engine.js';export default class n extends _0x23b4db{static get[_0x2a1c3e(0x113)](){const _0x2f7bc5=_0x2a1c3e;return _0x2f7bc5(0x11b);}static get[_0x2a1c3e(0x13a)](){return!0x0;}static get[_0x2a1c3e(0x169)](){return!0x0;}static get[_0x2a1c3e(0xf7)](){return[_0x13935d,_0xa8f9eb,_0x1264bc,_0x58171f];}constructor(_0x2a5d7f){const _0x4545de=_0x2a1c3e;super(_0x2a5d7f),this[_0x4545de(0x127)]='',_0x2a5d7f[_0x4545de(0x148)][_0x4545de(0xbf)](_0x4545de(0xf1),[_0x4545de(0xe8),_0x4545de(0xdd),_0x4545de(0x14c)]),_0x2a5d7f[_0x4545de(0x148)][_0x4545de(0xbf)](_0x4545de(0x119),''),_0x2a5d7f[_0x4545de(0x148)][_0x4545de(0xbf)](_0x4545de(0x139),!0x0),this[_0x4545de(0x127)]=_0x4545de(0x155)+(_0x2a5d7f[_0x4545de(0x148)][_0x4545de(0x15d)](_0x4545de(0x139))?_0x4545de(0xd0):'');}[_0x2a1c3e(0xfb)](){const _0x5aa092=_0x2a1c3e,{editor:_0x10db23}=this;this[_0x5aa092(0x166)]=_0x10db23[_0x5aa092(0xcc)][_0x5aa092(0x15d)](_0x1264bc),this[_0x5aa092(0xf6)]=_0x10db23[_0x5aa092(0xcc)][_0x5aa092(0x15d)](_0x58171f),this[_0x5aa092(0xf0)]=null,this[_0x5aa092(0xdf)]=this[_0x5aa092(0x114)]();const _0x2c1fbf=new _0x55d3f2(_0x10db23,Array[_0x5aa092(0x157)](this[_0x5aa092(0xdf)][_0x5aa092(0x135)]()));_0x10db23[_0x5aa092(0x150)][_0x5aa092(0x107)](_0x5aa092(0xc9),_0x2c1fbf),_0x10db23['ui'][_0x5aa092(0x14f)][_0x5aa092(0x107)](_0x5aa092(0xfc),_0x39be67=>{const _0x3bae32=_0x5aa092,_0x5f048b=_0x27115e(_0x39be67);return _0x5f048b[_0x3bae32(0xe0)]({'class':_0x3bae32(0x128)+this[_0x3bae32(0x127)]}),_0x5f048b[_0x3bae32(0xf4)][_0x3bae32(0xe0)]({'label':_0x4d40ea(_0x39be67,_0x3bae32(0xfd)),'icon':_0x2bf3cd,'tooltip':!0x0}),_0x5f048b['on'](_0x3bae32(0x16a),_0x5cc082=>this[_0x3bae32(0xdb)](_0x5cc082[_0x3bae32(0xd7)]['id'])),_0x47fdcb(_0x5f048b,_0x10db23['ui'][_0x3bae32(0xc1)][_0x3bae32(0xe9)],function(_0x1f751e){const _0xa1c221=_0x3bae32,_0x1d4ce6=_0x57f97f(_0x1f751e[_0xa1c221(0x148)][_0xa1c221(0x15d)](_0xa1c221(0xeb)),_0x1f751e[_0xa1c221(0x12c)]),_0x227379=B(_0x1f751e,_0x1d4ce6)[_0xa1c221(0x153)](_0x40f84d=>_0x40f84d[_0xa1c221(0x150)][_0xa1c221(0x115)]);if(0x1===_0x227379[_0xa1c221(0x115)])return B(_0x1f751e,_0x1d4ce6[0x0][_0xa1c221(0x150)])[_0xa1c221(0xf8)](_0x4d9d1b=>({'id':_0x4d9d1b['id'],'label':_0x4d9d1b[_0xa1c221(0xc8)]}));return _0x227379[_0xa1c221(0xf8)](_0x3b49da=>{const _0x1020a1=_0xa1c221,{groupId:_0x304078,groupLabel:_0x56c1a6,commands:_0xd8546e}=_0x3b49da,_0x21c3ee=B(_0x1f751e,_0xd8546e)[_0x1020a1(0xf8)](_0x4de04a=>({'id':_0x4de04a['id'],'label':_0x4de04a[_0x1020a1(0xc8)]}));return{'id':_0x304078,'menu':_0x56c1a6||_0x304078,'children':_0x21c3ee};});}(_0x10db23),{'ariaLabel':_0x4d40ea(_0x39be67,_0x3bae32(0xfd))}),_0x5f048b[_0x3bae32(0x141)][_0x3bae32(0x168)]=_0x3bae32(0x128)+this[_0x3bae32(0x127)],_0x2c1fbf['on'](_0x3bae32(0x14a),_0x333d67),_0x5f048b[_0x3bae32(0x141)][_0x3bae32(0x12e)](_0x3bae32(0xde),_0x333d67),_0x5f048b;function _0x333d67(){const _0x9c7613=_0x3bae32;_0x5f048b[_0x9c7613(0x102)]=_0x2c1fbf[_0x9c7613(0x13b)][_0x9c7613(0x115)]>0x0;for(const _0x393cc6 of _0x5f048b[_0x9c7613(0x141)][_0x9c7613(0xce)])_0x393cc6[_0x9c7613(0x102)]=_0x2c1fbf[_0x9c7613(0x13b)][_0x9c7613(0x10d)](_0x393cc6['id']);}}),_0x10db23['ui'][_0x5aa092(0x14f)][_0x5aa092(0x107)](_0x5aa092(0x117),_0x15393b=>{const _0x257987=_0x5aa092,_0x2c5dac=new _0x2ae8da(_0x15393b);_0x2c5dac[_0x257987(0xf4)][_0x257987(0xe0)]({'label':_0x4d40ea(_0x15393b,_0x257987(0xfd)),'icon':_0x2bf3cd}),_0x2c5dac[_0x257987(0xf2)](_0x257987(0x102))['to'](_0x2c1fbf,_0x257987(0x13b),_0x352214=>_0x352214[_0x257987(0x115)]>0x0);const _0x1d5e54=_0x57f97f(_0x10db23[_0x257987(0x148)][_0x257987(0x15d)](_0x257987(0xeb)),_0x15393b);return this[_0x257987(0xe5)](_0x2c1fbf,_0x2c5dac,_0x1d5e54,_0x25fe0c=>this[_0x257987(0xdb)](_0x25fe0c)),_0x2c5dac;}),_0x10db23['ui'][_0x5aa092(0x14f)][_0x5aa092(0x107)](_0x5aa092(0xc0),()=>{const _0x27b740=_0x5aa092,_0x4bd823=this[_0x27b740(0x144)](_0x9fb98f);return _0x4bd823[_0x27b740(0xe0)]({'tooltip':!0x0,'class':_0x27b740(0x16f)+this[_0x27b740(0x127)]}),_0x4bd823;}),_0x10db23['ui'][_0x5aa092(0x14f)][_0x5aa092(0x107)](_0x5aa092(0x131),()=>{const _0x5c40df=_0x5aa092,_0x5528d9=this[_0x5c40df(0x144)](_0x3a7e6d);return _0x5528d9[_0x5c40df(0xe0)]({'role':_0x5c40df(0xcf)}),_0x5528d9;}),this[_0x5aa092(0x152)]=this[_0x5aa092(0xba)][_0x5aa092(0x148)][_0x5aa092(0x15d)](_0x5aa092(0x152));const _0x2d569e=this[_0x5aa092(0xba)];this[_0x5aa092(0x12d)]=setInterval(()=>{const _0x15377b=_0x5aa092;let _0x30b929;for(const _0x268055 in _0x2d569e){const _0x1ff953=_0x268055,_0x2b9ab1=_0x2d569e[_0x1ff953];if(_0x15377b(0x134)==_0x2b9ab1||_0x15377b(0x123)==_0x2b9ab1||_0x15377b(0x12f)==_0x2b9ab1||_0x15377b(0x133)==_0x2b9ab1||_0x15377b(0xbe)==_0x2b9ab1||_0x15377b(0x15b)==_0x2b9ab1||_0x15377b(0x156)==_0x2b9ab1||_0x15377b(0x105)==_0x2b9ab1||_0x15377b(0x16e)==_0x2b9ab1){delete _0x2d569e[_0x1ff953],_0x30b929=_0x2b9ab1,clearInterval(this[_0x15377b(0x12d)]),this[_0x15377b(0x12d)]=void 0x0;break;}}_0x15377b(0x123)==_0x30b929&&_0x2d569e[_0x15377b(0x10f)](_0x15377b(0xef)),_0x15377b(0x12f)==_0x30b929&&_0x2d569e[_0x15377b(0x10f)](_0x15377b(0xc3)),_0x15377b(0x133)==_0x30b929&&_0x2d569e[_0x15377b(0x10f)](_0x15377b(0x103)),_0x15377b(0xbe)==_0x30b929&&_0x2d569e[_0x15377b(0x10f)](_0x15377b(0x13e),_0x15377b(0x10b)),_0x15377b(0x15b)==_0x30b929&&_0x2d569e[_0x15377b(0x10f)](_0x15377b(0xd8)),_0x15377b(0x156)==_0x30b929&&_0x2d569e[_0x15377b(0x10f)](_0x15377b(0x138)),_0x15377b(0x105)==_0x30b929&&_0x2d569e[_0x15377b(0x10f)](_0x15377b(0x111)),_0x15377b(0x16e)==_0x30b929&&_0x2d569e[_0x15377b(0x10f)](_0x15377b(0x118));},0x3e8);}[_0x2a1c3e(0xf5)](){const _0x5971e1=_0x2a1c3e;super[_0x5971e1(0xf5)](),this[_0x5971e1(0x12d)]&&clearInterval(this[_0x5971e1(0x12d)]);}[_0x2a1c3e(0x12a)](_0x172ae9='',_0xa3bd47='',_0x5855ab=_0x2a1c3e(0xc4)){const _0x1caf52=_0x2a1c3e,_0x582031=this[_0x1caf52(0xba)],_0xc467f=_0x582031[_0x1caf52(0xcb)][_0x1caf52(0xc1)],_0x3e8b39=_0x582031[_0x1caf52(0xcc)][_0x1caf52(0x15d)](_0xa8f9eb),_0x4b318b=_0x582031[_0x1caf52(0xcc)][_0x1caf52(0x15d)](_0x13935d);_0x3e8b39[_0x1caf52(0x129)]();const _0x5c8b3e=new j(),_0x49f922=new ClipboardEvent(_0x1caf52(0xca),{'clipboardData':_0x5c8b3e}),_0x4ddfda=new _0x13179a(_0x5c8b3e),_0x2ac702=new _0x1fc4e3(_0xc467f,_0x49f922,{'dataTransfer':_0x4ddfda});_0x4b318b[_0x1caf52(0xcd)](_0x1caf52(0x101),()=>{const _0x3e1e3b=_0x1caf52;_0xc467f[_0x3e1e3b(0x163)][_0x3e1e3b(0x137)](_0x3e1e3b(0xca),_0x2ac702);}),this[_0x1caf52(0xf0)]||(this[_0x1caf52(0xc6)](),this[_0x1caf52(0x121)]=new _0x438252(_0x582031,this[_0x1caf52(0x166)][_0x1caf52(0x122)],this[_0x1caf52(0xf0)]));let _0x2acdb7=_0x4ddfda[_0x1caf52(0xe6)](_0x1caf52(0xf9));const _0x1c0ee4=_0x582031[_0x1caf52(0x159)][_0x1caf52(0x163)][_0x1caf52(0x14d)],_0x23797d=Array[_0x1caf52(0x157)](_0x1c0ee4[_0x1caf52(0xff)]());0x1===_0x23797d[_0x1caf52(0x115)]&&_0x23797d[0x0][_0x1caf52(0xbb)]&&!_0x1c0ee4[_0x1caf52(0x125)]()&&''!==_0x2acdb7[_0x1caf52(0xbd)](/&nbsp;/g,'')[_0x1caf52(0xed)]()&&(_0x2acdb7=_0x1caf52(0x11c)+_0x2acdb7+_0x1caf52(0xe3)),this[_0x1caf52(0x121)][_0x1caf52(0x15c)]({'actionId':_0x5855ab,'query':_0x172ae9,'htmlContent':_0x2acdb7,'label':_0xa3bd47,'mainActionLabel':_0x4f879d[_0x582031[_0x1caf52(0x159)][_0x1caf52(0x163)][_0x1caf52(0x14d)][_0x1caf52(0x151)]?_0x1caf52(0x100):_0x1caf52(0x12b)]}),_0x1caf52(0xc0)!==this[_0x1caf52(0xf6)]['id']?this[_0x1caf52(0xf6)][_0x1caf52(0xe7)]({'id':_0x1caf52(0xc0),'icon':_0x32e889[_0x1caf52(0x108)],'title':_0x4d40ea(this[_0x1caf52(0xba)][_0x1caf52(0x12c)],_0x1caf52(0x15e)),'content':this[_0x1caf52(0xf0)],'position':_0x145218[_0x1caf52(0xc7)],'onShow':()=>{const _0x4c024b=_0x1caf52;this[_0x4c024b(0xf0)][_0x4c024b(0x167)]();},'onHide':()=>{const _0x21752f=_0x1caf52;this[_0x21752f(0x121)][_0x21752f(0x161)](),_0x3e8b39[_0x21752f(0x147)]();}}):this[_0x1caf52(0xf6)][_0x1caf52(0xc1)][_0x1caf52(0xd6)]||this[_0x1caf52(0xf6)][_0x1caf52(0xc1)][_0x1caf52(0x158)]();}[_0x2a1c3e(0x120)](){const _0x147bc0=_0x2a1c3e;this[_0x147bc0(0xf6)][_0x147bc0(0xee)]();}[_0x2a1c3e(0x114)](){const _0xbe4a7b=_0x2a1c3e,_0x252118=new Map(),_0x52fab5=_0x57f97f(this[_0xbe4a7b(0xba)][_0xbe4a7b(0x148)][_0xbe4a7b(0x15d)](_0xbe4a7b(0xeb)),this[_0xbe4a7b(0xba)][_0xbe4a7b(0x12c)]);for(const _0x5a2d2 of _0x52fab5)for(const _0x3e853b of _0x5a2d2[_0xbe4a7b(0x150)])_0x252118[_0xbe4a7b(0xe0)](_0x3e853b['id'],{..._0x3e853b,'groupId':_0x5a2d2[_0xbe4a7b(0x110)],'groupLabel':_0x5a2d2[_0xbe4a7b(0x145)]||_0x5a2d2[_0xbe4a7b(0x110)]});return _0x252118;}[_0x2a1c3e(0x144)](_0x54a111){const _0x4167b0=_0x2a1c3e,_0x12d49b=this[_0x4167b0(0xba)],_0xbf1e51=_0x12d49b[_0x4167b0(0x150)][_0x4167b0(0x15d)](_0x4167b0(0xc9)),_0x4a2896=new _0x54a111(_0x12d49b[_0x4167b0(0x12c)]);return _0x4a2896[_0x4167b0(0xe0)]({'label':_0x4d40ea(_0x12d49b[_0x4167b0(0x12c)],_0x4167b0(0x15e)),'icon':_0x32e889[_0x4167b0(0x108)],'isToggleable':!0x0}),_0x4a2896[_0x4167b0(0xf2)](_0x4167b0(0x102))['to'](_0xbf1e51),_0x4a2896[_0x4167b0(0xf2)](_0x4167b0(0x106))['to'](this[_0x4167b0(0xf6)],'id',_0x1ad57a=>_0x4167b0(0xc0)===_0x1ad57a),this[_0x4167b0(0x124)](_0x4a2896,_0x4167b0(0x16a),()=>{const _0x488d55=_0x4167b0;_0x4a2896[_0x488d55(0x106)]?this[_0x488d55(0x120)]():_0xbf1e51[_0x488d55(0x16a)]();}),_0x4a2896;}[_0x2a1c3e(0xc6)](){const _0x2000cf=_0x2a1c3e,_0x5ac841=this[_0x2000cf(0xba)][_0x2000cf(0xcc)][_0x2000cf(0x15d)](_0xa8f9eb);this[_0x2000cf(0xf0)]=new _0x48c1d9(this[_0x2000cf(0xba)][_0x2000cf(0x12c)],this[_0x2000cf(0x127)],this[_0x2000cf(0xba)][_0x2000cf(0x148)][_0x2000cf(0x15d)](_0x2000cf(0x119))),this[_0x2000cf(0xf0)]['on'](_0x2000cf(0x162),()=>{const _0x22c036=_0x2000cf;this[_0x22c036(0xf6)][_0x22c036(0xc1)][_0x22c036(0xd6)]||this[_0x22c036(0xf6)][_0x22c036(0xc1)][_0x22c036(0x158)]();}),this[_0x2000cf(0xf0)][_0x2000cf(0x16d)][_0x2000cf(0x160)][_0x2000cf(0xea)]['on'](_0x2000cf(0x126),()=>{const _0x2865b4=_0x2000cf;this[_0x2865b4(0xf6)][_0x2865b4(0xc1)][_0x2865b4(0xd6)]||this[_0x2865b4(0xf6)][_0x2865b4(0xc1)][_0x2865b4(0x158)]();}),this[_0x2000cf(0x124)](this[_0x2000cf(0xf0)],_0x2000cf(0xc2),()=>{const _0x3453a6=_0x2000cf;_0x5ac841[_0x3453a6(0x143)](this[_0x3453a6(0x121)][_0x3453a6(0x130)]),this[_0x3453a6(0x120)]();}),this[_0x2000cf(0x124)](this[_0x2000cf(0xf0)],_0x2000cf(0xf3),()=>{const _0x22dfec=_0x2000cf;_0x5ac841[_0x22dfec(0xf3)](this[_0x22dfec(0x121)][_0x22dfec(0x130)]),this[_0x22dfec(0x120)]();}),this[_0x2000cf(0xd5)]();}[_0x2a1c3e(0xd5)](){const _0x246d6f=_0x2a1c3e,{locale:_0x5b311f,ui:{ariaLiveAnnouncer:_0x2e6777}}=this[_0x246d6f(0xba)];this[_0x246d6f(0xf0)][_0x246d6f(0x16b)]['on'](_0x246d6f(0x109),(_0x418098,_0x2ca5fe,_0xb60d29)=>{const _0x4cbd5e=_0x246d6f,_0x509c21=this[_0x4cbd5e(0x121)][_0x4cbd5e(0x130)];_0xb60d29?_0x2e6777[_0x4cbd5e(0xe1)](_0x4d40ea(_0x5b311f,_0x4cbd5e(0xec))):_0x509c21&&_0x2e6777[_0x4cbd5e(0xe1)](_0x4d40ea(_0x5b311f,_0x4cbd5e(0x136),_0x509c21),{'politeness':_0x4cbd5e(0xd2),'isUnsafeHTML':!0x0});}),this[_0x246d6f(0xf0)]['on'](_0x246d6f(0x112),(_0xbb47f3,_0x3b7e3a,_0xd2b626)=>{const _0x22f773=_0x246d6f;if(_0xd2b626){const _0x20f407=this[_0x22f773(0xf0)][_0x22f773(0x13c)][_0x22f773(0x15f)];_0x2e6777[_0x22f773(0xe1)](_0x4d40ea(_0x5b311f,_0x22f773(0x13f),_0x20f407));}});}[_0x2a1c3e(0xdb)](_0x164c9a){const _0x50b623=_0x2a1c3e,_0x52d913=this[_0x50b623(0xdf)][_0x50b623(0x15d)](_0x164c9a),_0x227b45=this[_0x50b623(0xba)],_0x26a673=_0x227b45[_0x50b623(0x159)][_0x50b623(0x163)][_0x50b623(0x14d)],_0x36a4a8=_0x227b45[_0x50b623(0x150)][_0x50b623(0x15d)](_0x50b623(0xc9)),_0x2c62c4=_0x227b45[_0x50b623(0xcc)][_0x50b623(0x15d)](_0xa8f9eb),_0x2f9c3c=''+(_0x52d913[_0x50b623(0x110)]!==_0x5ed864?_0x52d913[_0x50b623(0x145)]+':\x20':'')+_0x52d913[_0x50b623(0xc8)];if(!0x1!==_0x52d913[_0x50b623(0x142)]&&_0x26a673[_0x50b623(0x151)]){const _0x42f2e4=_0x1b651a(_0x26a673[_0x50b623(0xd1)]())||_0x227b45[_0x50b623(0x159)][_0x50b623(0xd9)][_0x50b623(0x14e)](_0x26a673);_0x227b45[_0x50b623(0x159)][_0x50b623(0xe4)](_0x2b18e0=>{const _0x3f9ab4=_0x50b623;_0x2b18e0[_0x3f9ab4(0x10e)](_0x42f2e4,'in');});}_0x2c62c4[_0x50b623(0x129)](),_0x36a4a8[_0x50b623(0x16a)](_0x52d913[_0x50b623(0xbc)],_0x2f9c3c,_0x50b623(0x10c)+_0x164c9a);}[_0x2a1c3e(0xe5)](_0x1acce7,_0x52e158,_0x211e18,_0x129855){const _0x4645aa=_0x2a1c3e,_0x1fc64d=this[_0x4645aa(0xba)],_0x5b95a9=_0x1fc64d[_0x4645aa(0x12c)],_0x598ae1=new _0x32bc62(_0x5b95a9),_0x2a38fc=B(_0x1fc64d,_0x211e18)[_0x4645aa(0x153)](_0x344398=>_0x344398[_0x4645aa(0x150)][_0x4645aa(0x115)]);0x1===_0x2a38fc[_0x4645aa(0x115)]?this[_0x4645aa(0xfe)]({'command':_0x1acce7,'commands':_0x211e18[0x0][_0x4645aa(0x150)],'parentMenuView':_0x52e158,'onExecute':_0x129855})[_0x4645aa(0x149)](_0x16da57=>_0x598ae1[_0x4645aa(0xd4)][_0x4645aa(0x107)](_0x16da57)):_0x2a38fc[_0x4645aa(0x149)](({groupId:_0x6382e2,groupLabel:_0x44a0ea,commands:_0x883315})=>{const _0xeae1f1=_0x4645aa,_0x2faa53=new _0x480cf2(_0x5b95a9,_0x52e158),_0x184fe3=new _0x2ae8da(_0x5b95a9),_0x5f5b79=new _0x32bc62(_0x5b95a9),_0xb49a92=this[_0xeae1f1(0xfe)]({'command':_0x1acce7,'commands':_0x883315,'parentMenuView':_0x184fe3,'onExecute':_0x129855});_0x184fe3[_0xeae1f1(0xf4)][_0xeae1f1(0xe0)]({'label':_0x44a0ea||_0x6382e2}),_0x184fe3[_0xeae1f1(0x164)](_0xeae1f1(0x16a))['to'](_0x52e158),_0x5f5b79[_0xeae1f1(0xd4)][_0xeae1f1(0x11f)](_0xb49a92),_0x184fe3[_0xeae1f1(0x14b)][_0xeae1f1(0x165)][_0xeae1f1(0x107)](_0x5f5b79),_0x2faa53[_0xeae1f1(0x165)][_0xeae1f1(0x107)](_0x184fe3),_0x598ae1[_0xeae1f1(0xd4)][_0xeae1f1(0x107)](_0x2faa53);}),_0x52e158[_0x4645aa(0x14b)][_0x4645aa(0x165)][_0x4645aa(0x107)](_0x598ae1);}[_0x2a1c3e(0xfe)]({command:_0x40be0e,commands:_0x1b7b53,parentMenuView:_0x58528e,onExecute:_0x4b40d}){const _0x44ff25=_0x2a1c3e,_0xf2a329=this[_0x44ff25(0xba)],_0x16299f=_0xf2a329[_0x44ff25(0x12c)];return B(_0xf2a329,_0x1b7b53)[_0x44ff25(0xf8)](_0x497b7b=>{const _0x19333c=_0x44ff25,_0x25cc81=new _0x480cf2(_0x16299f,_0x58528e),_0x10172e=new _0x3a7e6d(_0x16299f);return _0x10172e[_0x19333c(0xe0)]({'label':_0x497b7b[_0x19333c(0xc8)]}),_0x10172e[_0x19333c(0x164)](_0x19333c(0x16a))['to'](_0x58528e),_0x10172e['on'](_0x19333c(0x16a),()=>_0x4b40d(_0x497b7b['id'])),_0x10172e[_0x19333c(0xf2)](_0x19333c(0x102))['to'](_0x40be0e,_0x19333c(0x13b),_0x3d105e=>_0x3d105e[_0x19333c(0x10d)](_0x497b7b['id'])),_0x25cc81[_0x19333c(0x165)][_0x19333c(0x107)](_0x10172e),_0x25cc81;});}}function _(_0x20e37f,_0x3ca143){const _0x13fc77=_0x2a1c3e;return void 0x0!==_0x20e37f[_0x13fc77(0x132)]&&void 0x0===_0x3ca143[_0x13fc77(0x132)]?0x1:void 0x0===_0x20e37f[_0x13fc77(0x132)]&&void 0x0!==_0x3ca143[_0x13fc77(0x132)]?-0x1:void 0x0!==_0x20e37f[_0x13fc77(0x132)]&&void 0x0!==_0x3ca143[_0x13fc77(0x132)]?_0x20e37f[_0x13fc77(0x132)]-_0x3ca143[_0x13fc77(0x132)]:0x0;}function B(_0x897d70,_0x35fe82){const _0x20f1e8=_0x2a1c3e;_0x35fe82[_0x20f1e8(0x11d)](_);const _0x518379={},_0x561da3=[];for(const _0x51ef7c of _0x35fe82)if(void 0x0!==_0x51ef7c[_0x20f1e8(0x132)]){if(_0x51ef7c[_0x20f1e8(0x132)]in _0x518379)throw new _0x337a91(_0x20f1e8(0x140),_0x897d70,{'conflictingDefinitions':[_0x51ef7c,_0x518379[_0x51ef7c[_0x20f1e8(0x132)]]]});_0x518379[_0x51ef7c[_0x20f1e8(0x132)]]=_0x51ef7c,_0x561da3[_0x20f1e8(0x15a)](_0x51ef7c[_0x20f1e8(0x132)],0x0,_0x51ef7c);}else _0x561da3[_0x20f1e8(0x11e)](_0x51ef7c);return _0x561da3;}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module ai/aiconfig
7
+ * @publicApi
8
+ */
9
+ import type { AIAssistantConfig } from './aiassistant.js';
10
+ import type { OpenAITextAdapterConfig } from './adapters/openaitextadapter.js';
11
+ import type { AWSTextAdapterConfig } from './adapters/awstextadapter.js';
12
+ /**
13
+ * The configuration for all AI-related functionalities.
14
+ *
15
+ * Provides configuration properties for both AI features and AI adapters (which connect to the external AI services),
16
+ *
17
+ * ```ts
18
+ * ClassicEditor
19
+ * .create( editorElement, {
20
+ * ai: {
21
+ * openAI: {
22
+ * requestHeaders: {
23
+ * Authorization: 'Bearer API_KEY'
24
+ * }
25
+ * },
26
+ * useTheme: false
27
+ * }
28
+ * } )
29
+ * .then( ... )
30
+ * .catch( ... );
31
+ * ```
32
+ *
33
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
34
+ */
35
+ export default interface AIConfig {
36
+ /**
37
+ * The configuration of the {@link module:ai/aiassistant~AIAssistant AI Assistant feature}.
38
+ *
39
+ * Read more in {@link module:ai/aiassistant~AIAssistantConfig}.
40
+ */
41
+ aiAssistant?: AIAssistantConfig;
42
+ /**
43
+ * The configuration for the {@link module:ai/adapters/openaitextadapter~OpenAITextAdapter `OpenAITextAdapter`}.
44
+ *
45
+ * This is required only if you connect to OpenAI or Azure OpenAI service.
46
+ *
47
+ * Read more in {@link module:ai/adapters/openaitextadapter~OpenAITextAdapterConfig}.
48
+ */
49
+ openAI?: OpenAITextAdapterConfig;
50
+ /**
51
+ * The configuration for the {@link module:ai/adapters/awstextadapter~AWSTextAdapter `AWSTextAdapter`}.
52
+ *
53
+ * This is required only if you connect to Amazon Bedrock service.
54
+ *
55
+ * Read more in {@link module:ai/adapters/awstextadapter~AWSTextAdapterConfig}.
56
+ */
57
+ aws?: AWSTextAdapterConfig;
58
+ /**
59
+ * Enables or disables the colored UI theme for AI features.
60
+ *
61
+ * * Leaving this property unset will preserve the default theme on AI features UI elements.
62
+ * * Setting this property to **`false`** will remove the default theme from AI features UI elements.
63
+ *
64
+ * See the AI Assistant integration guide to learn how you can use CSS variables to change the default theme to a different color.
65
+ *
66
+ * @default true
67
+ */
68
+ useTheme?: boolean;
69
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export{};
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import type AIAssistant from './aiassistant.js';
6
+ import type ShowAIAssistantCommand from './ui/showaiassistantcommand.js';
7
+ import type AIAssistantEditing from './aiassistantediting.js';
8
+ import type AIAssistantUI from './aiassistantui.js';
9
+ import type AIConfig from './aiconfig.js';
10
+ import type AIAdapter from './adapters/aiadapter.js';
11
+ declare module '@ckeditor/ckeditor5-core' {
12
+ interface EditorConfig {
13
+ /**
14
+ * Configuration for AI features.
15
+ */
16
+ ai?: AIConfig;
17
+ }
18
+ interface PluginsMap {
19
+ [AIAdapter.pluginName]: AIAdapter;
20
+ [AIAssistant.pluginName]: AIAssistant;
21
+ [AIAssistantUI.pluginName]: AIAssistantUI;
22
+ [AIAssistantEditing.pluginName]: AIAssistantEditing;
23
+ }
24
+ interface CommandsMap {
25
+ showAIAssistant: ShowAIAssistantCommand;
26
+ }
27
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export{};
package/src/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module ai
7
+ */
8
+ export { default as AIAssistant } from './aiassistant.js';
9
+ export { default as AIAdapter, AIRequestError } from './adapters/aiadapter.js';
10
+ export { default as AITextAdapter, type AITextAdapterRequestData, type RequestHeaders, type RequestParameters, type AITextAdapterDataCallback } from './adapters/aitextadapter.js';
11
+ export { default as OpenAITextAdapter, type OpenAITextAdapterConfig } from './adapters/openaitextadapter.js';
12
+ export { default as AWSTextAdapter, type AWSTextAdapterConfig } from './adapters/awstextadapter.js';
13
+ import './augmentation.js';
package/src/index.js ADDED
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ (function(_0x8dad09,_0x4bb3df){var _0x17378c=_0x37ce,_0x257e5d=_0x8dad09();while(!![]){try{var _0x1a8d12=parseInt(_0x17378c(0x1bd))/0x1+-parseInt(_0x17378c(0x1bf))/0x2*(-parseInt(_0x17378c(0x1b9))/0x3)+-parseInt(_0x17378c(0x1b8))/0x4*(-parseInt(_0x17378c(0x1be))/0x5)+-parseInt(_0x17378c(0x1b7))/0x6+-parseInt(_0x17378c(0x1bb))/0x7*(parseInt(_0x17378c(0x1bc))/0x8)+parseInt(_0x17378c(0x1c0))/0x9+parseInt(_0x17378c(0x1ba))/0xa*(-parseInt(_0x17378c(0x1b6))/0xb);if(_0x1a8d12===_0x4bb3df)break;else _0x257e5d['push'](_0x257e5d['shift']());}catch(_0x5df47b){_0x257e5d['push'](_0x257e5d['shift']());}}}(_0x2743,0x99d48));export{default as AIAssistant}from'./aiassistant.js';export{default as AIAdapter,AIRequestError}from'./adapters/aiadapter.js';export{default as AITextAdapter}from'./adapters/aitextadapter.js';function _0x37ce(_0x6a34b5,_0x41a31d){var _0x27438d=_0x2743();return _0x37ce=function(_0x37ce1f,_0x140fd2){_0x37ce1f=_0x37ce1f-0x1b6;var _0x1d20a1=_0x27438d[_0x37ce1f];return _0x1d20a1;},_0x37ce(_0x6a34b5,_0x41a31d);}export{default as OpenAITextAdapter}from'./adapters/openaitextadapter.js';function _0x2743(){var _0x239e6a=['5838425giGZeo','8ANeMcS','10979919hiXhNm','1254341RSYiDr','2108838sSVtQF','4AWojml','756381YVeboP','200NCVxvd','3045YLXBok','21872hlJwHB','1055287fLevda'];_0x2743=function(){return _0x239e6a;};return _0x2743();}export{default as AWSTextAdapter}from'./adapters/awstextadapter.js';import'./augmentation.js';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module ai/legacyerrors
7
+ * @publicApi
8
+ */
9
+ /**
10
+ * Invalid license key. Please contact our customer support at https://ckeditor.com/contact/.
11
+ *
12
+ * @error ai-invalid-license-key
13
+ */
14
+ /**
15
+ * You have exhausted the trial usage limit (reason: reached document changes limit). Restart the editor.
16
+ *
17
+ * Please contact our customer support to get full access at https://ckeditor.com/contact/.
18
+ *
19
+ * @error ai-trial-license-key-reached-limit-changes
20
+ */
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ 'use strict';function _0xd594(){var _0x58ab73=['917xSqbno','10FKptTf','50154UXWGOk','9KpPryx','2399988rmEOLP','33486SqxyLD','1986750CPsyLR','17954266qqsFux','3379240gADapD','176827foAxpJ','82jJAllN'];_0xd594=function(){return _0x58ab73;};return _0xd594();}(function(_0x1b2c56,_0x2b37f1){var _0x36deba=_0x2514,_0x45fd0c=_0x1b2c56();while(!![]){try{var _0x4f7f1a=parseInt(_0x36deba(0x182))/0x1+-parseInt(_0x36deba(0x183))/0x2*(parseInt(_0x36deba(0x186))/0x3)+-parseInt(_0x36deba(0x188))/0x4+parseInt(_0x36deba(0x17f))/0x5+-parseInt(_0x36deba(0x189))/0x6*(parseInt(_0x36deba(0x184))/0x7)+-parseInt(_0x36deba(0x181))/0x8*(-parseInt(_0x36deba(0x187))/0x9)+-parseInt(_0x36deba(0x185))/0xa*(-parseInt(_0x36deba(0x180))/0xb);if(_0x4f7f1a===_0x2b37f1)break;else _0x45fd0c['push'](_0x45fd0c['shift']());}catch(_0x26e7eb){_0x45fd0c['push'](_0x45fd0c['shift']());}}}(_0xd594,0x95792));function _0x2514(_0x3cae28,_0x2f359b){var _0xd594b8=_0xd594();return _0x2514=function(_0x2514f0,_0x3dd40d){_0x2514f0=_0x2514f0-0x17f;var _0x3c401c=_0xd594b8[_0x2514f0];return _0x3c401c;},_0x2514(_0x3cae28,_0x2f359b);}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import type AITextAdapter from '../adapters/aitextadapter.js';
6
+ import type { default as AIFormView } from './form/aiformview.js';
7
+ import type { AIFormToolbarViewMainActionLabel } from './form/aiformtoolbarview.js';
8
+ import type { Editor } from 'ckeditor5/src/core.js';
9
+ declare const AIAssistantController_base: {
10
+ new (): import("ckeditor5/src/utils.js").Observable;
11
+ prototype: import("ckeditor5/src/utils.js").Observable;
12
+ };
13
+ /**
14
+ * Controller for the AI assistant.
15
+ *
16
+ * It takes a AI form view, listens to events fired by that view and based on them performs actions on an AI handler.
17
+ * This controller is also responsible for streaming the AI response for the UI.
18
+ */
19
+ export default class AIAssistantController extends /* #__PURE__ -- @preserve */ AIAssistantController_base {
20
+ /**
21
+ * The editor instance.
22
+ */
23
+ readonly editor: Editor;
24
+ /**
25
+ * An instance of the {@link module:ai/adapters/aitextadapter~AITextAdapter}.
26
+ */
27
+ readonly textAdapter: AITextAdapter;
28
+ /**
29
+ * An instance of the {@link module:ai/ui/aiformview~AIFormView}.
30
+ */
31
+ readonly view: AIFormView;
32
+ /**
33
+ * It is the selected HTML content from the editor on which the dialog has been initialized.
34
+ */
35
+ initialContext: string;
36
+ /**
37
+ * The latest value returned by the AI while executing the request. It is before parsing and normalization.
38
+ */
39
+ currentResponse: string;
40
+ /**
41
+ * The latest value returned by the AI while executing the request. It is after parsing and normalization. It will be used as context
42
+ * for the next calls.
43
+ *
44
+ * This value is also displayed in the view (after sanitization).
45
+ */
46
+ currentContext: string;
47
+ /**
48
+ * The previous value of the context for the AI request. It is kept to handle the try again event.
49
+ *
50
+ * Initially it is the selected HTML content from the editor. Subsequently, the context is replaced by each response from AI.
51
+ *
52
+ * @observable
53
+ */
54
+ previousContext?: string;
55
+ /**
56
+ * The previous value of the user query. It is kept to handle the try again event.
57
+ *
58
+ * @observable
59
+ */
60
+ previousQuery?: string;
61
+ /**
62
+ * The label of the previous executed query. It is connected to {@link ~AIAssistantController#previousQuery `previousQuery`} and is kept
63
+ * to handle the "try again" event.
64
+ *
65
+ * @observable
66
+ */
67
+ previousLabel?: string;
68
+ /**
69
+ * The id of the previous executed action. It is kept to handle the try again event.
70
+ *
71
+ * @observable
72
+ */
73
+ previousActionId?: string;
74
+ /**
75
+ * Flag that indicates if the processing is in progress.
76
+ *
77
+ * @observable
78
+ */
79
+ isProcessing: boolean;
80
+ /**
81
+ * @param adapter AI connector instance.
82
+ * @param view AI form view.
83
+ */
84
+ constructor(editor: Editor, adapter: AITextAdapter, view: AIFormView);
85
+ /**
86
+ * Destroys `AIAssistantController` instance.
87
+ */
88
+ destroy(): void;
89
+ /**
90
+ * Handles the initial query for a new context and inits the listener for the visible view.
91
+ *
92
+ * This function should be called whenever the AI dialog is displayed.
93
+ *
94
+ * @param options
95
+ * @param options.actionId ID of the performed action. See {@link module:ai/adapters/aitextadapter~AITextAdapterRequestData#actionId}.
96
+ * @param options.htmlContent The selected HTML content on which the AI should base.
97
+ * @param options.query The initial query to be processed.
98
+ * @param options.label The label that will be displayed in the view.
99
+ * @param options.mainActionLabel The action label for the main insertion button.
100
+ */
101
+ updateView({ actionId, query, htmlContent, label, mainActionLabel }: {
102
+ actionId: string;
103
+ query: string;
104
+ htmlContent: string;
105
+ label: string;
106
+ mainActionLabel: typeof AIFormToolbarViewMainActionLabel[keyof typeof AIFormToolbarViewMainActionLabel];
107
+ }): Promise<void>;
108
+ }
109
+ export {};