@ckeditor/ckeditor5-ai 44.0.0 → 44.1.0-alpha.1

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 (218) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/adapters/aiadapter.d.ts +1 -1
  3. package/dist/adapters/aitextadapter.d.ts +1 -1
  4. package/dist/adapters/awstextadapter.d.ts +1 -1
  5. package/dist/adapters/openaitextadapter.d.ts +1 -1
  6. package/dist/aiassistant.d.ts +1 -1
  7. package/dist/aiassistantediting.d.ts +1 -1
  8. package/dist/aiassistantui.d.ts +1 -1
  9. package/dist/aiconfig.d.ts +1 -1
  10. package/dist/augmentation.d.ts +1 -1
  11. package/dist/index.css +7 -7
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +2 -2
  14. package/dist/legacyerrors.d.ts +1 -1
  15. package/dist/translations/af.js +1 -1
  16. package/dist/translations/af.umd.js +1 -1
  17. package/dist/translations/ar.js +1 -1
  18. package/dist/translations/ar.umd.js +1 -1
  19. package/dist/translations/ast.js +1 -1
  20. package/dist/translations/ast.umd.js +1 -1
  21. package/dist/translations/az.js +1 -1
  22. package/dist/translations/az.umd.js +1 -1
  23. package/dist/translations/bg.js +1 -1
  24. package/dist/translations/bg.umd.js +1 -1
  25. package/dist/translations/bn.js +1 -1
  26. package/dist/translations/bn.umd.js +1 -1
  27. package/dist/translations/bs.js +1 -1
  28. package/dist/translations/bs.umd.js +1 -1
  29. package/dist/translations/ca.js +1 -1
  30. package/dist/translations/ca.umd.js +1 -1
  31. package/dist/translations/cs.js +1 -1
  32. package/dist/translations/cs.umd.js +1 -1
  33. package/dist/translations/da.js +1 -1
  34. package/dist/translations/da.umd.js +1 -1
  35. package/dist/translations/de-ch.js +1 -1
  36. package/dist/translations/de-ch.umd.js +1 -1
  37. package/dist/translations/de.js +1 -1
  38. package/dist/translations/de.umd.js +1 -1
  39. package/dist/translations/el.js +1 -1
  40. package/dist/translations/el.umd.js +1 -1
  41. package/dist/translations/en-au.js +1 -1
  42. package/dist/translations/en-au.umd.js +1 -1
  43. package/dist/translations/en-gb.js +1 -1
  44. package/dist/translations/en-gb.umd.js +1 -1
  45. package/dist/translations/en.js +1 -1
  46. package/dist/translations/en.umd.js +1 -1
  47. package/dist/translations/eo.js +1 -1
  48. package/dist/translations/eo.umd.js +1 -1
  49. package/dist/translations/es-co.js +1 -1
  50. package/dist/translations/es-co.umd.js +1 -1
  51. package/dist/translations/es.js +1 -1
  52. package/dist/translations/es.umd.js +1 -1
  53. package/dist/translations/et.js +1 -1
  54. package/dist/translations/et.umd.js +1 -1
  55. package/dist/translations/eu.js +1 -1
  56. package/dist/translations/eu.umd.js +1 -1
  57. package/dist/translations/fa.js +1 -1
  58. package/dist/translations/fa.umd.js +1 -1
  59. package/dist/translations/fi.js +1 -1
  60. package/dist/translations/fi.umd.js +1 -1
  61. package/dist/translations/fr.js +1 -1
  62. package/dist/translations/fr.umd.js +1 -1
  63. package/dist/translations/gl.js +1 -1
  64. package/dist/translations/gl.umd.js +1 -1
  65. package/dist/translations/gu.js +1 -1
  66. package/dist/translations/gu.umd.js +1 -1
  67. package/dist/translations/he.js +1 -1
  68. package/dist/translations/he.umd.js +1 -1
  69. package/dist/translations/hi.js +1 -1
  70. package/dist/translations/hi.umd.js +1 -1
  71. package/dist/translations/hr.js +1 -1
  72. package/dist/translations/hr.umd.js +1 -1
  73. package/dist/translations/hu.js +1 -1
  74. package/dist/translations/hu.umd.js +1 -1
  75. package/dist/translations/hy.js +1 -1
  76. package/dist/translations/hy.umd.js +1 -1
  77. package/dist/translations/id.js +1 -1
  78. package/dist/translations/id.umd.js +1 -1
  79. package/dist/translations/it.js +1 -1
  80. package/dist/translations/it.umd.js +1 -1
  81. package/dist/translations/ja.js +1 -1
  82. package/dist/translations/ja.umd.js +1 -1
  83. package/dist/translations/jv.js +1 -1
  84. package/dist/translations/jv.umd.js +1 -1
  85. package/dist/translations/kk.js +1 -1
  86. package/dist/translations/kk.umd.js +1 -1
  87. package/dist/translations/km.js +1 -1
  88. package/dist/translations/km.umd.js +1 -1
  89. package/dist/translations/kn.js +1 -1
  90. package/dist/translations/kn.umd.js +1 -1
  91. package/dist/translations/ko.js +1 -1
  92. package/dist/translations/ko.umd.js +1 -1
  93. package/dist/translations/ku.js +1 -1
  94. package/dist/translations/ku.umd.js +1 -1
  95. package/dist/translations/lt.js +1 -1
  96. package/dist/translations/lt.umd.js +1 -1
  97. package/dist/translations/lv.js +1 -1
  98. package/dist/translations/lv.umd.js +1 -1
  99. package/dist/translations/ms.js +1 -1
  100. package/dist/translations/ms.umd.js +1 -1
  101. package/dist/translations/nb.js +1 -1
  102. package/dist/translations/nb.umd.js +1 -1
  103. package/dist/translations/ne.js +1 -1
  104. package/dist/translations/ne.umd.js +1 -1
  105. package/dist/translations/nl.js +1 -1
  106. package/dist/translations/nl.umd.js +1 -1
  107. package/dist/translations/no.js +1 -1
  108. package/dist/translations/no.umd.js +1 -1
  109. package/dist/translations/oc.js +1 -1
  110. package/dist/translations/oc.umd.js +1 -1
  111. package/dist/translations/pl.js +1 -1
  112. package/dist/translations/pl.umd.js +1 -1
  113. package/dist/translations/pt-br.js +1 -1
  114. package/dist/translations/pt-br.umd.js +1 -1
  115. package/dist/translations/pt.js +1 -1
  116. package/dist/translations/pt.umd.js +1 -1
  117. package/dist/translations/ro.js +1 -1
  118. package/dist/translations/ro.umd.js +1 -1
  119. package/dist/translations/ru.js +1 -1
  120. package/dist/translations/ru.umd.js +1 -1
  121. package/dist/translations/si.js +1 -1
  122. package/dist/translations/si.umd.js +1 -1
  123. package/dist/translations/sk.js +1 -1
  124. package/dist/translations/sk.umd.js +1 -1
  125. package/dist/translations/sl.js +1 -1
  126. package/dist/translations/sl.umd.js +1 -1
  127. package/dist/translations/sq.js +1 -1
  128. package/dist/translations/sq.umd.js +1 -1
  129. package/dist/translations/sr-latn.js +1 -1
  130. package/dist/translations/sr-latn.umd.js +1 -1
  131. package/dist/translations/sr.js +1 -1
  132. package/dist/translations/sr.umd.js +1 -1
  133. package/dist/translations/sv.js +1 -1
  134. package/dist/translations/sv.umd.js +1 -1
  135. package/dist/translations/th.js +1 -1
  136. package/dist/translations/th.umd.js +1 -1
  137. package/dist/translations/ti.js +1 -1
  138. package/dist/translations/ti.umd.js +1 -1
  139. package/dist/translations/tk.js +1 -1
  140. package/dist/translations/tk.umd.js +1 -1
  141. package/dist/translations/tr.js +1 -1
  142. package/dist/translations/tr.umd.js +1 -1
  143. package/dist/translations/tt.js +1 -1
  144. package/dist/translations/tt.umd.js +1 -1
  145. package/dist/translations/ug.js +1 -1
  146. package/dist/translations/ug.umd.js +1 -1
  147. package/dist/translations/uk.js +1 -1
  148. package/dist/translations/uk.umd.js +1 -1
  149. package/dist/translations/ur.js +1 -1
  150. package/dist/translations/ur.umd.js +1 -1
  151. package/dist/translations/uz.js +1 -1
  152. package/dist/translations/uz.umd.js +1 -1
  153. package/dist/translations/vi.js +1 -1
  154. package/dist/translations/vi.umd.js +1 -1
  155. package/dist/translations/zh-cn.js +1 -1
  156. package/dist/translations/zh-cn.umd.js +1 -1
  157. package/dist/translations/zh.js +1 -1
  158. package/dist/translations/zh.umd.js +1 -1
  159. package/dist/ui/aiassistantcontroller.d.ts +1 -1
  160. package/dist/ui/form/aiformcontentarea.d.ts +1 -1
  161. package/dist/ui/form/aiformerrorview.d.ts +1 -1
  162. package/dist/ui/form/aiformpromptview.d.ts +1 -1
  163. package/dist/ui/form/aiformtoolbarview.d.ts +1 -1
  164. package/dist/ui/form/aiformview.d.ts +1 -1
  165. package/dist/ui/form/aihistorylistitemview.d.ts +1 -1
  166. package/dist/ui/form/aihistorylistview.d.ts +1 -1
  167. package/dist/ui/form/prompthistory.d.ts +1 -1
  168. package/dist/ui/showaiassistantcommand.d.ts +1 -1
  169. package/dist/utils/common-translations.d.ts +1 -1
  170. package/dist/utils/normalizecommandsconfig.d.ts +1 -1
  171. package/package.json +8 -8
  172. package/src/adapters/aiadapter.d.ts +1 -1
  173. package/src/adapters/aiadapter.js +1 -1
  174. package/src/adapters/aitextadapter.d.ts +1 -1
  175. package/src/adapters/aitextadapter.js +1 -1
  176. package/src/adapters/awstextadapter.d.ts +1 -1
  177. package/src/adapters/awstextadapter.js +1 -1
  178. package/src/adapters/openaitextadapter.d.ts +1 -1
  179. package/src/adapters/openaitextadapter.js +1 -1
  180. package/src/aiassistant.d.ts +1 -1
  181. package/src/aiassistant.js +1 -1
  182. package/src/aiassistantediting.d.ts +1 -1
  183. package/src/aiassistantediting.js +1 -1
  184. package/src/aiassistantui.d.ts +1 -1
  185. package/src/aiassistantui.js +1 -1
  186. package/src/aiconfig.d.ts +1 -1
  187. package/src/augmentation.d.ts +1 -1
  188. package/src/index.d.ts +1 -1
  189. package/src/index.js +1 -1
  190. package/src/legacyerrors.d.ts +1 -1
  191. package/src/legacyerrors.js +1 -1
  192. package/src/ui/aiassistantcontroller.d.ts +1 -1
  193. package/src/ui/aiassistantcontroller.js +2 -2
  194. package/src/ui/form/aiformcontentarea.d.ts +1 -1
  195. package/src/ui/form/aiformcontentarea.js +1 -1
  196. package/src/ui/form/aiformerrorview.d.ts +1 -1
  197. package/src/ui/form/aiformerrorview.js +1 -1
  198. package/src/ui/form/aiformpromptview.d.ts +1 -1
  199. package/src/ui/form/aiformpromptview.js +1 -1
  200. package/src/ui/form/aiformtoolbarview.d.ts +1 -1
  201. package/src/ui/form/aiformtoolbarview.js +1 -1
  202. package/src/ui/form/aiformview.d.ts +1 -1
  203. package/src/ui/form/aiformview.js +1 -1
  204. package/src/ui/form/aihistorylistitemview.d.ts +1 -1
  205. package/src/ui/form/aihistorylistitemview.js +1 -1
  206. package/src/ui/form/aihistorylistview.d.ts +1 -1
  207. package/src/ui/form/aihistorylistview.js +1 -1
  208. package/src/ui/form/prompthistory.d.ts +1 -1
  209. package/src/ui/form/prompthistory.js +1 -1
  210. package/src/ui/showaiassistantcommand.d.ts +1 -1
  211. package/src/ui/showaiassistantcommand.js +1 -1
  212. package/src/utils/common-translations.d.ts +1 -1
  213. package/src/utils/common-translations.js +1 -1
  214. package/src/utils/normalizecommandsconfig.d.ts +1 -1
  215. package/src/utils/normalizecommandsconfig.js +1 -1
  216. package/theme/ai-dropdown.css +1 -1
  217. package/theme/ai-form.css +1 -1
  218. package/theme/ai.css +1 -1
package/dist/index.js CHANGED
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0xabda4,Command as _0x2de2ad,icons as _0x920dbd}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x1529f6,CKEditorError as _0x330cbb,ObservableMixin as _0x231b14,global as _0x801c9d,isVisible as it,Rect as st,Collection as _0x4fff2d,FocusTracker as _0x40df9d,KeystrokeHandler as ts,first as _0x5c4c64}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as rt,ButtonView as _0x2bb139,View as _0x1c3289,SpinnerView as _0x12c8ae,IconView as _0x2bae19,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x167320,ButtonLabelView as te,FocusCycler as _0xa8003d,createLabeledTextarea as _0x56b023,Dialog as _0x2a9063,createDropdown as _0x2fa994,addMenuToDropdown as _0x157bac,MenuBarMenuView as _0x1c85dc,MenuBarMenuListItemButtonView as _0x76fd7e,DialogViewPosition as _0x11a9ae,MenuBarMenuListView as _0x2d3f8b,MenuBarMenuListItemView as _0x1d4daa}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as at}from'ckeditor5-collaboration/dist/index.js';import{UpcastWriter as _0x1f90c4,Matcher as _0x13ca83,DataTransfer as _0x21d85d,DomEventData as _0x30c459}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x5879f9,escape as _0x511938}from'lodash-es';import{ClipboardMarkersUtils as _0x1ae44a}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{BedrockRuntimeClient as _0x5f0bb9,InvokeModelWithResponseStreamCommand as _0x251c9f,InvokeModelCommand as _0x3f1b57}from'@aws-sdk/client-bedrock-runtime';const I='_ungrouppedCommands';function o(_0x15f408,_0x476a20){const _0x14cefb=(0x0,_0x476a20['t'])('Other');return _0x15f408['length']?'groupId'in _0x15f408[0x0]?_0x15f408:[{'groupId':I,'groupLabel':_0x14cefb,'order':0x1/0x0,'commands':_0x15f408}]:[{'groupId':I,'groupLabel':_0x14cefb,'order':0x1/0x0,'commands':[]}];}const u='ai-ui';class a extends _0xabda4{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x425e48}=this,_0x29119e=['ck-fake-ai-selection'];_0x425e48['config']['get']('ai.useTheme')&&_0x29119e['push']('ck-ai-assistant-ui_theme'),_0x425e48['conversion']['for']('editingDowncast')['markerToHighlight']({'model':u,'view':{'classes':_0x29119e,'priority':0xc}}),_0x425e48['conversion']['for']('editingDowncast')['markerToElement']({'model':u,'view':(_0x50ae91,{writer:_0x23d33d})=>{if(!_0x50ae91['markerRange']['isCollapsed'])return null;const _0x2abe60=_0x23d33d['createUIElement']('span');return _0x23d33d['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x2abe60),_0x2abe60;}});}['afterInit'](){!async function(_0x37b65e){const _0x2cf1cb=_0x5f4458([0x53,0x76,0x51,0x4a,0x46,0x43,0x79,0x6f,0x70,0x52,0x4c,0x6a,0x32,0x7a,0x45,0x74,0x35,0x44,0x56,0x6b,0x6c,0x6e,0x62,0x49,0x72,0x75,0x48,0x4b,0x57,0x55,0x71,0x66,0x31,0x50,0x4d,0x58,0x65,0x69,0x67,0x77,0x61,0x54,0x30,0x73,0x38,0x4e,0x78,0x59,0x33,0x47,0x34,0x4f,0x68,0x64,0x63,0x42,0x36,0x37,0x5a,0x41,0x39,0x6d]),_0x525b26=0x7ed660b2,_0x5a02fb=0x7ed1383a^_0x525b26,_0x7f15e9=window[_0x5f4458([0x44,0x61,0x74,0x65])][_0x5f4458([0x6e,0x6f,0x77])](),_0x183e59=_0x37b65e[_0x5f4458([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2949b2=new window[(_0x5f4458([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x37fc61=>{_0x183e59[_0x5f4458([0x6f,0x6e,0x63,0x65])](_0x5f4458([0x72,0x65,0x61,0x64,0x79]),_0x37fc61);}),_0x307c87={[_0x5f4458([0x6b,0x74,0x79])]:_0x5f4458([0x45,0x43]),[_0x5f4458([0x75,0x73,0x65])]:_0x5f4458([0x73,0x69,0x67]),[_0x5f4458([0x63,0x72,0x76])]:_0x5f4458([0x50,0x2d,0x32,0x35,0x36]),[_0x5f4458([0x78])]:_0x5f4458([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]),[_0x5f4458([0x79])]:_0x5f4458([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]),[_0x5f4458([0x61,0x6c,0x67])]:_0x5f4458([0x45,0x53,0x32,0x35,0x36])},_0x22396f=_0x183e59[_0x5f4458([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5f4458([0x67,0x65,0x74])](_0x5f4458([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x36ddac(){let _0x5a6248,_0x2e15e8=null,_0x20c750=null;try{if(_0x22396f==_0x5f4458([0x47,0x50,0x4c]))return _0x5f4458([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5a6248=_0x4d5b82(),!_0x5a6248)return _0x5f4458([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5a6248[_0x5f4458([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x20c750=_0x384163(_0x5a6248[_0x5f4458([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5a6248[_0x5f4458([0x6a,0x74,0x69])])),await _0x415695()?_0x3f2eea()?_0x4d1c15()?_0x5f4458([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x14a75b()?(_0x5a6248[_0x5f4458([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5f4458([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e15e8=_0x180b82(_0x5f4458([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5a6248[_0x5f4458([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5f4458([0x74,0x72,0x69,0x61,0x6c])&&(_0x2e15e8=_0x180b82(_0x5f4458([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x5a6248[_0x5f4458([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5f4458([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x2e15e8=_0x180b82(_0x5f4458([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x30f8e7()):_0x5f4458([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5f4458([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5f4458([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4db984){return _0x5f4458([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4d1c15(){const _0x51ef9e=[_0x5f4458([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5f4458([0x74,0x72,0x69,0x61,0x6c])][_0x5f4458([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a6248[_0x5f4458([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x7f15e9/0x3e8:0xe10*_0x5a02fb;return _0x5a6248[_0x5f4458([0x65,0x78,0x70])]<_0x51ef9e;}function _0x3f2eea(){const _0x1cb9cd=_0x5a6248[_0x5f4458([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1cb9cd&&(!!_0x1cb9cd[_0x5f4458([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f4458([0x2a]))||!!_0x1cb9cd[_0x5f4458([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f4458([0x41,0x49])));}function _0x14a75b(){const _0x88840=_0x5a6248[_0x5f4458([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x88840||0x0==_0x88840[_0x5f4458([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x569455}=new URL(window[_0x5f4458([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x88840[_0x5f4458([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x569455))return!0x0;const _0x1105b9=_0x569455[_0x5f4458([0x73,0x70,0x6c,0x69,0x74])](_0x5f4458([0x2e]));return _0x88840[_0x5f4458([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x40c8bc=>_0x40c8bc[_0x5f4458([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f4458([0x2a])))[_0x5f4458([0x6d,0x61,0x70])](_0x4befdd=>_0x4befdd[_0x5f4458([0x73,0x70,0x6c,0x69,0x74])](_0x5f4458([0x2e])))[_0x5f4458([0x73,0x6f,0x6d,0x65])](_0x5ee93e=>_0x1105b9[_0x5f4458([0x65,0x76,0x65,0x72,0x79])]((_0xb53d38,_0x3ab422)=>_0x5ee93e[_0x3ab422]===_0xb53d38||_0x5ee93e[_0x3ab422]===_0x5f4458([0x2a])));}function _0x30f8e7(){return _0x2e15e8&&_0x20c750?new window[(_0x5f4458([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57e887,_0x3ee6cc)=>{_0x2e15e8[_0x5f4458([0x74,0x68,0x65,0x6e])](_0x57e887,_0x3ee6cc),_0x20c750[_0x5f4458([0x74,0x68,0x65,0x6e])](_0x26536b=>{_0x26536b!=_0x5f4458([0x56,0x61,0x6c,0x69,0x64])&&_0x57e887(_0x26536b);},_0x3ee6cc);}):_0x2e15e8||_0x20c750||_0x5f4458([0x56,0x61,0x6c,0x69,0x64]);}}function _0x384163(_0x38faa3,_0x390420){return new window[(_0x5f4458([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa268d0=>{if(_0x4bf925())return _0xa268d0(_0x5f4458([0x56,0x61,0x6c,0x69,0x64]));_0x137fd2(),_0x183e59[_0x5f4458([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5f4458([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x54f234=!0x1;const _0x1a436f=_0x1529f6();function _0x2092c1(_0x44f1dc){return!!_0x44f1dc&&(typeof _0x44f1dc===_0x5f4458([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x44f1dc===_0x5f4458([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x44f1dc[_0x5f4458([0x74,0x68,0x65,0x6e])]===_0x5f4458([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x44f1dc[_0x5f4458([0x63,0x61,0x74,0x63,0x68])]===_0x5f4458([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x288274(_0x5da120){_0x2a9c7c(_0x5da120)[_0x5f4458([0x74,0x68,0x65,0x6e])](_0x2c0e0e=>{if(!_0x2c0e0e||_0x2c0e0e[_0x5f4458([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5f4458([0x6f,0x6b]))return _0x5f4458([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xf9687a(_0x518b94(_0x1a436f+_0x390420))!=_0x2c0e0e[_0x5f4458([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5f4458([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5f4458([0x56,0x61,0x6c,0x69,0x64]);})[_0x5f4458([0x74,0x68,0x65,0x6e])](_0xf3023=>(_0x54b43b(),_0xf3023),()=>{const _0x23b46c=_0x2c7c9d();return null==_0x23b46c?(_0x54b43b(),_0x5f4458([0x56,0x61,0x6c,0x69,0x64])):_0x5f4458(_0x7f15e9-_0x23b46c>(0x5adae4b2^_0x525b26)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5f4458([0x74,0x68,0x65,0x6e])](_0xa268d0)[_0x5f4458([0x63,0x61,0x74,0x63,0x68])](()=>{_0xa268d0(_0x5f4458([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xa73af6=0x7ee08e32^_0x525b26;function _0x54b43b(){const _0x51f250=_0x5f4458([0x6c,0x6c,0x63,0x74,0x2d])+_0xf9687a(_0x518b94(_0x38faa3)),_0x928ff4=_0x5a5f27(_0xf9687a(window[_0x5f4458([0x4d,0x61,0x74,0x68])][_0x5f4458([0x63,0x65,0x69,0x6c])](_0x7f15e9/_0xa73af6)));window[_0x5f4458([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5f4458([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x51f250,_0x928ff4);}function _0x2c7c9d(){const _0x261831=_0x5f4458([0x6c,0x6c,0x63,0x74,0x2d])+_0xf9687a(_0x518b94(_0x38faa3)),_0x521178=window[_0x5f4458([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5f4458([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x261831);return _0x521178?window[_0x5f4458([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a5f27(_0x521178),0x10)*_0xa73af6:null;}function _0x2a9c7c(_0x27a3f2){return new window[(_0x5f4458([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x243811,_0x133c14)=>{_0x27a3f2[_0x5f4458([0x74,0x68,0x65,0x6e])](_0x243811,_0x133c14),window[_0x5f4458([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x133c14,0x7ed7b472^_0x525b26);});}}_0x183e59[_0x5f4458([0x6f,0x6e])](_0x5f4458([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3ef8f4,_0x4ff85b)=>{if(_0x4ff85b[0x0]!=_0x38faa3)return _0xa268d0(_0x5f4458([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4ff85b[0x1]={..._0x4ff85b[0x1],[_0x5f4458([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1a436f};},{[_0x5f4458([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5f4458([0x68,0x69,0x67,0x68])}),_0x183e59[_0x5f4458([0x6f,0x6e])](_0x5f4458([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x38e44b=>{_0x2092c1(_0x38e44b[_0x5f4458([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x54f234=!0x0,_0x288274(_0x38e44b[_0x5f4458([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5f4458([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5f4458([0x6c,0x6f,0x77])}),_0x2949b2[_0x5f4458([0x74,0x68,0x65,0x6e])](()=>{_0x54f234||_0xa268d0(_0x5f4458([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4bf925(){return _0x183e59[_0x5f4458([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5f4458([0x76,0x69,0x65,0x77])][_0x5f4458([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5f4458([0x61,0x75,0x74,0x6f]);}function _0x137fd2(){_0x183e59[_0x5f4458([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5f4458([0x76,0x69,0x65,0x77])][_0x5f4458([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5f4458([0x61,0x75,0x74,0x6f]);}}function _0x180b82(_0x274f6d){const _0x25706a=[new window[(_0x5f4458([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1a5d6b=>setTimeout(_0x1a5d6b,0x7edf5e7e^_0x525b26)),_0x2949b2[_0x5f4458([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5f4458([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2da7f3=>{let _0x19cfc2=0x0;_0x183e59[_0x5f4458([0x6d,0x6f,0x64,0x65,0x6c])][_0x5f4458([0x6f,0x6e])](_0x5f4458([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x266e39,_0x55e5bc)=>{_0x55e5bc[0x0][_0x5f4458([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x19cfc2++,_0x19cfc2==(0x7ed6614a^_0x525b26)&&(_0x2da7f3(),_0x266e39[_0x5f4458([0x6f,0x66,0x66])]());});}))];return window[_0x5f4458([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5f4458([0x72,0x61,0x63,0x65])](_0x25706a)[_0x5f4458([0x74,0x68,0x65,0x6e])](()=>_0x274f6d);}async function _0x4be056(){await _0x2949b2,_0x183e59[_0x5f4458([0x6d,0x6f,0x64,0x65,0x6c])][_0x5f4458([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2b2dbb,_0x183e59[_0x5f4458([0x6d,0x6f,0x64,0x65,0x6c])][_0x5f4458([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2b2dbb,_0x183e59[_0x5f4458([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5f4458([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3bae1b(_0x2e045c){const _0x64bfd2=_0x56725c();_0x183e59[_0x64bfd2]=_0x5f4458([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2e045c,_0x2e045c!=_0x5f4458([0x56,0x61,0x6c,0x69,0x64])&&_0x4be056();}function _0x56725c(){const _0x239bed=window[_0x5f4458([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5f4458([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5f4458([0x6e,0x6f,0x77])]())[_0x5f4458([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5f4458([0x2e]),'');let _0x2abcb1=_0x5f4458([0x53]);for(let _0x1057c7=0x0;_0x1057c7<_0x239bed[_0x5f4458([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1057c7+=0x2){let _0x5bd486=window[_0x5f4458([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x239bed[_0x5f4458([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1057c7,_0x1057c7+0x2));_0x5bd486>=_0x2cf1cb[_0x5f4458([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5bd486-=_0x2cf1cb[_0x5f4458([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2abcb1+=_0x2cf1cb[_0x5bd486];}return _0x2abcb1;}function _0x4d5b82(){const _0x42cd89=_0x22396f[_0x5f4458([0x73,0x70,0x6c,0x69,0x74])](_0x5f4458([0x2e]));if(0x3!=_0x42cd89[_0x5f4458([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x69477a(_0x42cd89[0x1]);function _0x69477a(_0x1e0f09){const _0x48678f=_0x5d113e(_0x1e0f09);return _0x48678f&&_0x5c1720()?_0x48678f:null;function _0x5c1720(){const _0x274333=_0x48678f[_0x5f4458([0x6a,0x74,0x69])],_0x35bb73=window[_0x5f4458([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x274333[_0x5f4458([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x274333[_0x5f4458([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5071ac={..._0x48678f,[_0x5f4458([0x6a,0x74,0x69])]:_0x274333[_0x5f4458([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x274333[_0x5f4458([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5071ac[_0x5f4458([0x76,0x63])],_0x518b94(_0x5071ac)==_0x35bb73;}}}async function _0x415695(){let _0x5e9cdb=!0x0;try{const _0x5f4831=_0x22396f[_0x5f4458([0x73,0x70,0x6c,0x69,0x74])](_0x5f4458([0x2e])),[_0x58257c,_0x9c25bc,_0x58e147]=_0x5f4831;return _0x4cb003(_0x58257c),await _0x555b6c(_0x58257c,_0x9c25bc,_0x58e147),_0x5e9cdb;}catch(_0x1830e5){return!0x1;}function _0x4cb003(_0x53192b){const _0x15fcba=_0x5d113e(_0x53192b);_0x15fcba&&_0x15fcba[_0x5f4458([0x61,0x6c,0x67])]==_0x5f4458([0x45,0x53,0x32,0x35,0x36])||(_0x5e9cdb=!0x1);}async function _0x555b6c(_0x97c90,_0x4d83bb,_0x338b2e){const _0x4aa841=window[_0x5f4458([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5f4458([0x66,0x72,0x6f,0x6d])](_0x1d1add(_0x338b2e),_0x185a24=>_0x185a24[_0x5f4458([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1df626=new window[(_0x5f4458([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5f4458([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x97c90+_0x5f4458([0x2e])+_0x4d83bb),_0x55fd74=window[_0x5f4458([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5f4458([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x55fd74)return;const _0x3c6da6=await _0x55fd74[_0x5f4458([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5f4458([0x6a,0x77,0x6b]),_0x307c87,{[_0x5f4458([0x6e,0x61,0x6d,0x65])]:_0x5f4458([0x45,0x43,0x44,0x53,0x41]),[_0x5f4458([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5f4458([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5f4458([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x55fd74[_0x5f4458([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5f4458([0x6e,0x61,0x6d,0x65])]:_0x5f4458([0x45,0x43,0x44,0x53,0x41]),[_0x5f4458([0x68,0x61,0x73,0x68])]:{[_0x5f4458([0x6e,0x61,0x6d,0x65])]:_0x5f4458([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3c6da6,_0x4aa841,_0x1df626)||(_0x5e9cdb=!0x1);}}function _0x5d113e(_0x3d286e){return _0x3d286e[_0x5f4458([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5f4458([0x65,0x79]))?JSON[_0x5f4458([0x70,0x61,0x72,0x73,0x65])](_0x1d1add(_0x3d286e)):null;}function _0x1d1add(_0x35bc12){return window[_0x5f4458([0x61,0x74,0x6f,0x62])](_0x35bc12[_0x5f4458([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5f4458([0x2b]))[_0x5f4458([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5f4458([0x2f])));}function _0x518b94(_0x585b56){let _0x52eb2a=0x1505;function _0x49b567(_0x86b17f){for(let _0xd1dd98=0x0;_0xd1dd98<_0x86b17f[_0x5f4458([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd1dd98++){const _0x596d22=_0x86b17f[_0x5f4458([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xd1dd98);_0x52eb2a=(_0x52eb2a<<0x5)+_0x52eb2a+_0x596d22,_0x52eb2a&=_0x52eb2a;}}function _0x41c3a1(_0x52935e){Array[_0x5f4458([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x52935e)?_0x52935e[_0x5f4458([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x41c3a1):_0x52935e&&typeof _0x52935e==_0x5f4458([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5f4458([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x52935e)[_0x5f4458([0x73,0x6f,0x72,0x74])]()[_0x5f4458([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x494532,_0x1a55d3])=>{_0x49b567(_0x494532),_0x41c3a1(_0x1a55d3);}):_0x49b567(window[_0x5f4458([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x52935e));}return _0x41c3a1(_0x585b56),_0x52eb2a>>>0x0;}function _0xf9687a(_0x4ea01b){return _0x4ea01b[_0x5f4458([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5f4458([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5f4458([0x30]));}function _0x5a5f27(_0x4570a6){return _0x4570a6[_0x5f4458([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5f4458([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5f4458([0x6a,0x6f,0x69,0x6e])]('');}function _0x2b2dbb(){}function _0x5f4458(_0x13e341){return _0x13e341['map'](_0x2c8b3a=>String['fromCharCode'](_0x2c8b3a))['join']('');}_0x3bae1b(await _0x36ddac());}(this);}['showFakeVisualSelection'](){const _0x3b5eb5=this['editor']['model'];_0x3b5eb5['change'](_0x202e60=>{const _0x484d4a=_0x3b5eb5['document']['selection']['getFirstRange']();if(_0x3b5eb5['markers']['has'](u))_0x202e60['updateMarker'](u,{'range':_0x484d4a});else{if(_0x484d4a['start']['isAtEnd']){const _0x5aab3f=_0x484d4a['start']['getLastMatchingPosition'](({item:_0x31efa6})=>!_0x3b5eb5['schema']['isContent'](_0x31efa6),{'boundaries':_0x484d4a});_0x202e60['addMarker'](u,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x202e60['createRange'](_0x5aab3f,_0x484d4a['end'])});}else _0x202e60['addMarker'](u,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x484d4a});}});}['hideFakeVisualSelection'](){const _0x2c4560=this['editor']['model'];_0x2c4560['markers']['has'](u)&&_0x2c4560['change'](_0x55272e=>{_0x55272e['removeMarker'](u);});}['insertContent'](_0x62ae52,_0x4af234){const _0x312aad=_0x4af234||this['editor']['model']['markers']['get'](u)['getRange']();if(!this['editor']['model']['canEditAt'](_0x312aad))return;const _0x263405=this['editor']['data']['processor']['toView'](_0x62ae52),_0x103324=this['editor']['data']['toModel'](_0x263405);this['editor']['model']['change'](_0x38c7d4=>{this['hideFakeVisualSelection']();const _0x392803=this['editor']['model']['insertContent'](_0x103324,_0x312aad);_0x392803&&_0x38c7d4['setSelection'](_0x392803);});}['insertContentBelow'](_0x2a80d3){const {model:_0x4be7a7}=this['editor'],_0xedcf14=Array['from'](_0x4be7a7['createSelection'](this['editor']['model']['markers']['get'](u)['getRange']())['getSelectedBlocks']()),_0x5c4a2e=_0xedcf14['length']?_0x4be7a7['createPositionAfter'](_0xedcf14['pop']()):_0x4be7a7['document']['selection']['getLastPosition']();this['insertContent'](_0x2a80d3,_0x5c4a2e);}}class v extends _0xabda4{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x330cbb('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x1e488e){super(_0x1e488e),this['name']='AIRequestError';}}function i(_0x545ac7,_0x2a832c,_0x6a791e){const t=_0x545ac7['t'];switch(_0x2a832c){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x6a791e);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x6a791e);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x6a791e);case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x2a832c;}}class y extends _0x2de2ad{['_commandDefinitions'];constructor(_0x39c390,_0xe08bbd){super(_0x39c390),this['_commandDefinitions']=_0xe08bbd,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0xf31e95,_0x4d005c,_0x287a75)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x287a75));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x5c3d8b,_0xddbaa2,_0x295c7b)=>{this['enabledCommandsIds']=_0x295c7b?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x2a40ba=this['editor']['model'];this['_hasContext']=function(_0x2110fe){const _0xca323d=_0x2110fe['document']['selection'];return _0xca323d['isCollapsed']?0x0!==[..._0xca323d['getSelectedBlocks']()]['length']&&![..._0xca323d['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x2110fe['hasContent'](_0xca323d['getFirstRange']());}(_0x2a40ba);const _0x2ea7f9=_0x2a40ba['document']['selection'],_0x72c3c3=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x4520db of _0x2ea7f9['getRanges']())for(const _0x4e5779 of _0x4520db['getItems']())if(_0x4e5779['is']('element')&&_0x72c3c3['includes'](_0x4e5779['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x5f030d='',_0x150e29='',_0x223f15='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x5f030d,_0x150e29,_0x223f15);}}function G(_0x5dcd3a,_0x3e27b7){const _0x39b7b5=new Set();for(const _0x117010 of _0x5dcd3a['values']())(_0x3e27b7||!0x1===_0x117010['requiresContent'])&&_0x39b7b5['add'](_0x117010['id']);return Array['from'](_0x39b7b5);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class C extends/* #__PURE__ -- @preserve */
24
- _0x231b14(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x566019,_0x10cae2,_0x3d7fd3){super(),this['editor']=_0x566019,this['textAdapter']=_0x10cae2,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x3d7fd3,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x5876f8,_0x4e33e8,_0x29e2e9)=>{this['view']['value']=this['_sanitizeHTML'](_0x29e2e9);}),this['listenTo'](this['view'],'submitPrompt',(_0x23d7b7,_0x25225b)=>{const _0x1f1d7a=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x25225b,_0x1f1d7a,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0x4abc23,query:_0x2b0e41,htmlContent:_0x4e64b9,label:_0x846263,mainActionLabel:_0x4c8d9c}){this['view']['prompt']=_0x846263,this['view']['mainAction']=_0x4c8d9c,this['initialContext']=_0x4e64b9,_0x2b0e41&&(this['view']['isRendered']?this['_handleQuery'](_0x2b0e41,_0x4e64b9,_0x4abc23,_0x846263):this['view']['once']('render',()=>{this['_handleQuery'](_0x2b0e41,_0x4e64b9,_0x4abc23,_0x846263);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x2c6686,_0x541e8b,_0x370c4a,_0x35d902){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x541e8b,this['previousQuery']=_0x2c6686,this['previousLabel']=_0x35d902||_0x2c6686,this['previousActionId']=_0x370c4a,new Promise(_0x5d34dc=>{this['textAdapter']['makeRequest']({'query':_0x2c6686,'context':_0x541e8b,'onData':_0x105766=>{this['currentResponse']=_0x105766,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x370c4a})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x5148df=>{_0x5148df instanceof R?this['view']['handleError'](_0x5148df['message']):this['view']['handleError'](),_0x5d34dc();})['finally'](()=>{this['stopProcessing'](),_0x5d34dc();});});}['_parseAndNormalizeContent'](_0x25dba4,_0x47d858=!0x1){const _0x7efc7c=Z['exec'](_0x25dba4);_0x25dba4=_0x7efc7c?_0x25dba4['substring'](_0x7efc7c[0x1]['length']):_0x25dba4['length']<0x64&&!_0x47d858?'':this['_stripMarkdownSyntax'](_0x25dba4);const _0x101df3=this['_domParser']['parseFromString'](_0x25dba4,'text/html');if(_0x7efc7c){const _0x5a850f=Array['from'](_0x101df3['body']['childNodes']);_0x5a850f['reverse']();for(const _0x2c47c6 of _0x5a850f){if(_0x2c47c6['nodeType']==Node['ELEMENT_NODE'])break;_0x2c47c6['remove']();}}const _0xf61091=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x101df3['body']));return this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0xf61091),this['editor']['data']['stringify'](this['editor']['data']['toModel'](_0xf61091));}['_normalizeResponseHeadings'](_0x34f824){const _0x50c02c=new _0x1f90c4(this['editor']['editing']['view']['document']),_0x52ef97=new _0x13ca83({'name':/^h[1-5]$/}),_0x5a6ea4=[];let _0x14d5f9=!0x1;for(const _0x1d0b56 of _0x34f824)_0x1d0b56['is']('element')&&_0x52ef97['match'](_0x1d0b56)&&(_0x5a6ea4['push'](_0x1d0b56),'h1'==_0x1d0b56['name']&&(_0x14d5f9=!0x0));if(_0x14d5f9){for(const _0xaf3a5c of _0x5a6ea4)_0x50c02c['rename']('h'+(parseInt(_0xaf3a5c['name'][0x1])+0x1),_0xaf3a5c);}}['_isH1TagSupportEnabled'](){const {data:_0x3e5509,editing:_0x2b6bb1}=this['editor'],_0x173c9c=_0x3e5509['htmlProcessor']['toView']('<h1></h1>'),_0x13aad5=_0x3e5509['toView'](_0x3e5509['toModel'](_0x173c9c));return!!_0x2b6bb1['view']['domConverter']['viewToDom'](_0x13aad5)['querySelector']('h1');}['_sanitizeHTML'](_0x6ebe1c){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x6ebe1c),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x35532a){const _0x1d1306=_0x35532a['trim']();return _0x1d1306['startsWith']('```html')?_0x1d1306['endsWith']('```')?_0x1d1306['substring'](0x7,_0x1d1306['length']-0x3):_0x1d1306['substring'](0x7):_0x35532a;}}const x={'REPLACE':'replace','INSERT':'insert'};class nt extends rt{constructor(_0x1502c0){super(_0x1502c0),this['set']('isVisible',!0x1),this['set']('mainAction',x['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x37340e=>i(_0x1502c0,'AI_'+_0x37340e['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x1502c0,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x1502c0,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x1502c0,'Stop'));const _0x176c6d=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x176c6d['if']('isVisible','ck-hidden',_0x4e2442=>!_0x4e2442)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5b6c8f,_0x49635f){const _0x579594=new _0x2bb139(this['locale']);return _0x579594['set']({'label':_0x5b6c8f,'class':_0x49635f||'','isVisible':!0x0,'withText':!0x0}),_0x579594;}}var U='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class W extends _0x1c3289{['contentFieldView'];['copyButtonView'];constructor(_0x8d6071,_0x199706=''){super(_0x8d6071),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x23698c=this['bindTemplate'];this['contentFieldView']=new ct(_0x8d6071,_0x199706),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x23698c['if']('isVisible','ck-hidden',_0x38ff16=>!_0x38ff16)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x23698c['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0x24c082=!0x1;this['on']('change:value',(_0xcb4446,_0xf142ed,_0x3c1c8a)=>{const _0x2bead6=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x3c1c8a),this['isProcessing']&&_0x2bead6&&!_0x24c082&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x19ab65,_0x1ede39,_0x57d873)=>{_0x24c082=!0x1,_0x57d873?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x24c082=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x24c082=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x4f281a=this['locale'],_0x140278=new _0x2bb139(this['locale']),_0xc3c798='ck-ai-form__copy-button';return _0x140278['set']({'label':i(_0x4f281a,'Copy'),'icon':U,'class':_0xc3c798,'tooltip':!0x0}),_0x140278['bind']('isVisible')['to'](this,'value',_0x50f36a=>!!_0x50f36a),_0x140278['bind']('isEnabled')['to'](this,'isProcessing',_0x18711a=>!_0x18711a),_0x140278['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x140278['icon']=_0x920dbd['check'],_0x140278['class']=_0xc3c798+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x140278['icon']=U,_0x140278['class']=_0xc3c798;},0x3e8);}),_0x140278;}['_copyHTMLToClipboard'](_0x181e54){const {window:_0x28fec3,document:_0x43dd7b}=_0x801c9d;if(_0x28fec3['ClipboardItem']){const {Blob:_0x1415ab,ClipboardItem:_0x5d2f62}=_0x28fec3,_0x4d1946=[new _0x5d2f62({'text/html':new _0x1415ab([_0x181e54['innerHTML']],{'type':'text/html'}),'text/plain':new _0x1415ab([_0x181e54['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x4d1946);}else{const _0x2dd33f=_0x43dd7b['createElement']('div');_0x2dd33f['style']['position']='absolute',_0x2dd33f['style']['left']='-9999px',_0x2dd33f['innerHTML']='<span>[</span>'+_0x181e54['innerHTML']+'<span>]</span>',_0x43dd7b['body']['appendChild'](_0x2dd33f);const _0x347fb2=_0x43dd7b['createRange']();_0x347fb2['setStartAfter'](_0x2dd33f['firstElementChild']),_0x347fb2['setEndBefore'](_0x2dd33f['lastElementChild']);const _0x53703c=_0x28fec3['getSelection']();_0x53703c['removeAllRanges'](),_0x53703c['addRange'](_0x347fb2),_0x43dd7b['execCommand']('copy'),_0x2dd33f['remove']();}}}class ct extends _0x1c3289{constructor(_0x460a15,_0x18948f=''){super(_0x460a15),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x18948f,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x2a0aff){this['element']['innerHTML']=_0x2a0aff;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x399434=new _0x1c3289(),_0x1d35c8=this['locale'],_0x38b93b=new _0x12c8ae();return _0x38b93b['isVisible']=!0x0,_0x399434['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x38b93b,{'text':i(_0x1d35c8,'AI\x20is\x20writing...')}]}),_0x399434['render'](),_0x399434;}}class tt extends _0x1c3289{constructor(_0x20adac,_0x477681=''){super(_0x20adac);const _0x367d56=new _0x2bae19(),_0x4e359c=this['bindTemplate'];this['set']('text',_0x477681),_0x367d56['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x367d56,{'text':_0x4e359c['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x2c55a5,_0x249f55){super(_0x2c55a5,_0x249f55),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0x294eb8,_0x1e4f1f)=>{_0x294eb8['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x1e4f1f());});}['_createSubmitButton'](){const _0x5e6702=new _0x2bb139(this['locale']),_0x433895=this['locale'];return _0x5e6702['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x433895,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x5e6702['on']('execute',()=>{this['submit']();}),_0x5e6702['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x4e3ff9,_0x271b07)=>!_0x4e3ff9&&_0x271b07),_0x5e6702;}['_createShowHistoryButton'](){const _0x445f75=new _0x2bb139(this['locale']),_0x1ce552=this['resultsView'],_0x50acc2=this['locale'];_0x445f75['set']({'label':i(_0x50acc2,'History'),'withText':!0x1,'icon':_0x920dbd['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x445f75['bind']('isOn')['to'](_0x1ce552,'isVisible'),_0x445f75['bind']('isEnabled')['to'](this,'isEnabled'),_0x445f75['on']('execute',()=>{_0x1ce552['isVisible']=!_0x1ce552['isVisible'],_0x1ce552['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x4e4057=()=>{_0x801c9d['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x2a8eeb=new st(this['queryView']['fieldView']['element']),_0x2f4954=_0x2a8eeb['width'],_0x10afce='rtl'===_0x50acc2['uiLanguageDirection']?'left':'right';_0x2a8eeb['excludeScrollbarsAndBorders'](),_0x445f75['element']['style'][_0x10afce]=_0x2f4954-_0x2a8eeb['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x4e4057),this['on']('render',_0x4e4057),_0x445f75;}['submit'](){const _0x4ec2a9=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x4ec2a9);}['focus'](_0x581af9){-0x1===_0x581af9?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x4e84e0){super(_0x4e84e0),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x4e84e0,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x35e833=0x0;for(const _0x1cc035 of this['items'])_0x35e833+=_0x1cc035['items']['length'];return{'resultsCount':_0x35e833,'totalItemsCount':_0x35e833};}['_createClearHistoryButton'](){const _0x1211a1=this['locale'],_0x5c509a=new _0x2bb139(this['locale']);return _0x5c509a['set']({'label':'('+i(_0x1211a1,'Clear')+')','withText':!0x0}),_0x5c509a['on']('execute',()=>this['fire']('clearHistory')),_0x5c509a;}}class hs extends _0x167320{constructor(_0x378ef6){super();const _0x343c96=new te(),_0xf0da86=new _0x2bb139(this['locale'],_0x343c96);this['children']['add'](_0xf0da86),_0xf0da86['set']({'label':_0x378ef6['prompt'],'withText':!0x0}),_0xf0da86['on']('execute',()=>{this['fire']('execute',{'value':_0x5879f9(_0x378ef6['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x4fff2d{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x461570,_0x5e0a74)=>{const _0x2823b8=Ss(_0x5e0a74['prompt']);for(const _0x5127a6 of this)if(_0x5127a6!=_0x5e0a74&&Ss(_0x5127a6['prompt'])===_0x2823b8){this['remove'](_0x5127a6);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0xa10fbf=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0xa10fbf));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x10e430=>_0x10e430)));}}function Ss(_0x308262){return _0x308262['toLowerCase']()['trim']();}class K extends _0x1c3289{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x704bff,_0x21908c,_0x1f3cde=''){super(_0x704bff),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',x['REPLACE']),this['_promptHistory']=new os(),this['errorView']=new tt(_0x704bff),this['contentArea']=new W(_0x704bff,_0x1f3cde),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new _0x40df9d(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0xa8003d({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x5bdae8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x21908c],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x5bdae8['if']('isError','ck-hidden',_0x163c36=>!_0x163c36)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x4f69ca=0x1){-0x1===_0x4f69ca?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0x27f0ff=this['locale'],_0x59ddb9=new ht(_0x27f0ff,{'queryView':{'label':i(_0x27f0ff,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x56b023,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x27f0ff,'Empty\x20history'),'secondary':i(_0x27f0ff,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x59ddb9['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x46511e,_0x3c1fda)=>_0x46511e&&!_0x3c1fda),this['listenTo'](_0x59ddb9,'submit',(_0x20c491,_0x2e0b7d)=>{this['prompt']=_0x2e0b7d;const _0x238173=_0x511938(_0x2e0b7d);this['fire']('submitPrompt',_0x238173),_0x2e0b7d['trim']()&&this['_promptHistory']['add']({'prompt':_0x238173},0x0);},{'priority':'high'}),_0x59ddb9;}['_createHistoryView'](){const _0x371121=new rs(this['locale']);return _0x371121['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x371121['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x371121;}['_createToolbar'](){const _0x4c2472=new nt(this['locale']);return _0x4c2472['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x357891,_0x2d1f1b,_0x328ac6)=>_0x357891&&!_0x2d1f1b&&!!_0x328ac6),_0x4c2472['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x4c2472['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x7c3656,_0x4afe27,_0x3f7f3d)=>_0x7c3656&&!_0x4afe27&&!!_0x3f7f3d),_0x4c2472['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x4c2472['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x5d4a41,_0x21d209)=>_0x5d4a41&&!_0x21d209),_0x4c2472['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x4c2472['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x4c2472['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x4c2472;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x3b1e86=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x3b1e86,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x271694){const _0x468f2c=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x271694||i(_0x468f2c,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var E='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const j=globalThis['DataTransfer'];class n extends _0xabda4{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1ae44a,a,v,_0x2a9063];}constructor(_0x166a79){super(_0x166a79),_0x166a79['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x166a79['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x166a79['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x166a79['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x5e3f44}=this;this['_aiAdapter']=_0x5e3f44['plugins']['get'](v),this['_dialog']=_0x5e3f44['plugins']['get'](_0x2a9063),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x3271c5=new y(_0x5e3f44,Array['from'](this['_commandDefinitions']['values']()));_0x5e3f44['commands']['add']('showAIAssistant',_0x3271c5),_0x5e3f44['ui']['componentFactory']['add']('aiCommands',_0x40c8b4=>{const _0x3f7627=_0x2fa994(_0x40c8b4);return _0x3f7627['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x3f7627['buttonView']['set']({'label':i(_0x40c8b4,'AI\x20Commands'),'icon':E,'tooltip':!0x0}),_0x3f7627['on']('execute',_0xe2fa13=>this['_onExecute'](_0xe2fa13['source']['id'])),_0x157bac(_0x3f7627,_0x5e3f44['ui']['view']['body'],function(_0x2e23fd){const _0x5bb9fe=o(_0x2e23fd['config']['get']('ai.aiAssistant.commands'),_0x2e23fd['locale']),_0x298fb5=B(_0x2e23fd,_0x5bb9fe)['filter'](_0xf8ed8=>_0xf8ed8['commands']['length']);if(0x1===_0x298fb5['length'])return B(_0x2e23fd,_0x298fb5[0x0]['commands'])['map'](_0x487dc3=>({'id':_0x487dc3['id'],'label':_0x487dc3['label']}));return _0x298fb5['map'](_0x1285a3=>{const {groupId:_0x69de05,groupLabel:_0x20b3dd,commands:_0x15b062}=_0x1285a3,_0x34666f=B(_0x2e23fd,_0x15b062)['map'](_0x892ac5=>({'id':_0x892ac5['id'],'label':_0x892ac5['label']}));return{'id':_0x69de05,'menu':_0x20b3dd||_0x69de05,'children':_0x34666f};});}(_0x5e3f44),{'ariaLabel':i(_0x40c8b4,'AI\x20Commands')}),_0x3f7627['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x3271c5['on']('change:enabledCommandsIds',_0x59f273),_0x3f7627['menuView']['once']('render',_0x59f273),_0x3f7627;function _0x59f273(){_0x3f7627['isEnabled']=_0x3271c5['enabledCommandsIds']['length']>0x0;for(const _0x253341 of _0x3f7627['menuView']['buttons'])_0x253341['isEnabled']=_0x3271c5['enabledCommandsIds']['includes'](_0x253341['id']);}}),_0x5e3f44['ui']['componentFactory']['add']('menuBar:aiCommands',_0x37b10f=>{const _0x2d6cf6=new _0x1c85dc(_0x37b10f);_0x2d6cf6['buttonView']['set']({'label':i(_0x37b10f,'AI\x20Commands'),'icon':E}),_0x2d6cf6['bind']('isEnabled')['to'](_0x3271c5,'enabledCommandsIds',_0x316b3f=>_0x316b3f['length']>0x0);const _0x232877=o(_0x5e3f44['config']['get']('ai.aiAssistant.commands'),_0x37b10f);return this['_populateMenuBarMenu'](_0x3271c5,_0x2d6cf6,_0x232877,_0x33a1e7=>this['_onExecute'](_0x33a1e7)),_0x2d6cf6;}),_0x5e3f44['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x4814f4=this['_createAIAssistantUIButton'](_0x2bb139);return _0x4814f4['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x4814f4;}),_0x5e3f44['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x10b928=this['_createAIAssistantUIButton'](_0x76fd7e);return _0x10b928['set']({'role':'menuitemcheckbox'}),_0x10b928;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x266db8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x422497;for(const _0xbc3b2a in _0x266db8){const _0x40e999=_0xbc3b2a,_0x6d37fb=_0x266db8[_0x40e999];if('aiLicenseKeyValid'==_0x6d37fb||'aiLicenseKeyInvalid'==_0x6d37fb||'aiLicenseKeyExpired'==_0x6d37fb||'aiLicenseKeyDomainLimit'==_0x6d37fb||'aiLicenseKeyNotAllowed'==_0x6d37fb||'aiLicenseKeyEvaluationLimit'==_0x6d37fb||'aiLicenseKeyTrialLimit'==_0x6d37fb||'aiLicenseKeyDevelopmentLimit'==_0x6d37fb||'aiLicenseKeyUsageLimit'==_0x6d37fb){delete _0x266db8[_0x40e999],_0x422497=_0x6d37fb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x422497&&_0x266db8['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x422497&&_0x266db8['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x422497&&_0x266db8['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x422497&&_0x266db8['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x422497&&_0x266db8['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x422497&&_0x266db8['_showLicenseError']('trialLimit'),'aiLicenseKeyDevelopmentLimit'==_0x422497&&_0x266db8['_showLicenseError']('developmentLimit'),'aiLicenseKeyUsageLimit'==_0x422497&&_0x266db8['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x37d6d7='',_0x1cce15='',_0xe4dd7f='custom'){const _0xae56ee=this['editor'],_0x2f2f09=_0xae56ee['editing']['view'],_0x371b9b=_0xae56ee['plugins']['get'](a),_0x4d1ca0=_0xae56ee['plugins']['get'](_0x1ae44a);_0x371b9b['showFakeVisualSelection']();const _0x518d26=new j(),_0x254550=new ClipboardEvent('copy',{'clipboardData':_0x518d26}),_0x1fda3e=new _0x21d85d(_0x518d26),_0x3d75d3=new _0x30c459(_0x2f2f09,_0x254550,{'dataTransfer':_0x1fda3e});_0x4d1ca0['_forceMarkersCopy']('comment',()=>{_0x2f2f09['document']['fire']('copy',_0x3d75d3);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new C(_0xae56ee,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x20d560=_0x1fda3e['getData']('text/html');const _0x93159b=_0xae56ee['model']['document']['selection'],_0x43714f=Array['from'](_0x93159b['getRanges']());0x1===_0x43714f['length']&&_0x43714f[0x0]['isFlat']&&!_0x93159b['getSelectedElement']()&&''!==_0x20d560['replace'](/&nbsp;/g,'')['trim']()&&(_0x20d560='<p>'+_0x20d560+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0xe4dd7f,'query':_0x37d6d7,'htmlContent':_0x20d560,'label':_0x1cce15,'mainActionLabel':x[_0xae56ee['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':at['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x11a9ae['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x371b9b['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x18f273=new Map(),_0x4a262a=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x679d52 of _0x4a262a)for(const _0xc5575f of _0x679d52['commands'])_0x18f273['set'](_0xc5575f['id'],{..._0xc5575f,'groupId':_0x679d52['groupId'],'groupLabel':_0x679d52['groupLabel']||_0x679d52['groupId']});return _0x18f273;}['_createAIAssistantUIButton'](_0x29e570){const _0x382d43=this['editor'],_0x4ff237=_0x382d43['commands']['get']('showAIAssistant'),_0x2f4d82=new _0x29e570(_0x382d43['locale']);return _0x2f4d82['set']({'label':i(_0x382d43['locale'],'AI\x20Assistant'),'icon':at['robotPencil'],'isToggleable':!0x0}),_0x2f4d82['bind']('isEnabled')['to'](_0x4ff237),_0x2f4d82['bind']('isOn')['to'](this['_dialog'],'id',_0x4a6fe4=>'aiAssistant'===_0x4a6fe4),this['listenTo'](_0x2f4d82,'execute',()=>{_0x2f4d82['isOn']?this['hideUI']():_0x4ff237['execute']();}),_0x2f4d82;}['_initView'](){const _0x3691f2=this['editor']['plugins']['get'](a);this['_formView']=new K(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x3691f2['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x3691f2['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x3dfdad,ui:{ariaLiveAnnouncer:_0x467b90}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x2fdf55,_0x2d31c1,_0x2ae252)=>{const _0x10db64=this['_aiAssistantController']['currentContext'];_0x2ae252?_0x467b90['announce'](i(_0x3dfdad,'AI\x20is\x20writing')):_0x10db64&&_0x467b90['announce'](i(_0x3dfdad,'Generated\x20content:\x20%0',_0x10db64),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x37d778,_0x19515b,_0x4a1c6c)=>{if(_0x4a1c6c){const _0x3bf6d7=this['_formView']['errorView']['text'];_0x467b90['announce'](i(_0x3dfdad,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x3bf6d7));}});}['_onExecute'](_0x188750){const _0x9aeec7=this['_commandDefinitions']['get'](_0x188750),_0x4d3208=this['editor'],_0x15aafa=_0x4d3208['model']['document']['selection'],_0x905210=_0x4d3208['commands']['get']('showAIAssistant'),_0x2d8d56=_0x4d3208['plugins']['get'](a),_0x1b5b4b=''+(_0x9aeec7['groupId']!==I?_0x9aeec7['groupLabel']+':\x20':'')+_0x9aeec7['label'];if(!0x1!==_0x9aeec7['requiresContent']&&_0x15aafa['isCollapsed']){const _0x36df48=_0x5c4c64(_0x15aafa['getSelectedBlocks']())||_0x4d3208['model']['schema']['getLimitElement'](_0x15aafa);_0x4d3208['model']['change'](_0x2f9c9f=>{_0x2f9c9f['setSelection'](_0x36df48,'in');});}_0x2d8d56['showFakeVisualSelection'](),_0x905210['execute'](_0x9aeec7['prompt'],_0x1b5b4b,'command:'+_0x188750);}['_populateMenuBarMenu'](_0x117c7f,_0x2ceb15,_0x5e420f,_0x2be0b8){const _0x352828=this['editor'],_0x56f98f=_0x352828['locale'],_0x597d8e=new _0x2d3f8b(_0x56f98f),_0xfbf317=B(_0x352828,_0x5e420f)['filter'](_0x3d1b25=>_0x3d1b25['commands']['length']);0x1===_0xfbf317['length']?this['_getMenuBarGroupButtons']({'command':_0x117c7f,'commands':_0xfbf317[0x0]['commands'],'parentMenuView':_0x2ceb15,'onExecute':_0x2be0b8})['forEach'](_0x4dc6fa=>_0x597d8e['items']['add'](_0x4dc6fa)):_0xfbf317['forEach'](({groupId:_0x2689fc,groupLabel:_0x4c9458,commands:_0x551678})=>{const _0x587da1=new _0x1d4daa(_0x56f98f,_0x2ceb15),_0x391dad=new _0x1c85dc(_0x56f98f),_0x34837c=new _0x2d3f8b(_0x56f98f),_0x9825ce=this['_getMenuBarGroupButtons']({'command':_0x117c7f,'commands':_0x551678,'parentMenuView':_0x391dad,'onExecute':_0x2be0b8});_0x391dad['buttonView']['set']({'label':_0x4c9458||_0x2689fc}),_0x391dad['delegate']('execute')['to'](_0x2ceb15),_0x34837c['items']['addMany'](_0x9825ce),_0x391dad['panelView']['children']['add'](_0x34837c),_0x587da1['children']['add'](_0x391dad),_0x597d8e['items']['add'](_0x587da1);}),_0x2ceb15['panelView']['children']['add'](_0x597d8e);}['_getMenuBarGroupButtons']({command:_0x5d4758,commands:_0x513586,parentMenuView:_0x44d379,onExecute:_0x392a81}){const _0x3bb070=this['editor'],_0x1ca4d9=_0x3bb070['locale'];return B(_0x3bb070,_0x513586)['map'](_0x3eefda=>{const _0x302ee4=new _0x1d4daa(_0x1ca4d9,_0x44d379),_0xcdbbfc=new _0x76fd7e(_0x1ca4d9);return _0xcdbbfc['set']({'label':_0x3eefda['label']}),_0xcdbbfc['delegate']('execute')['to'](_0x44d379),_0xcdbbfc['on']('execute',()=>_0x392a81(_0x3eefda['id'])),_0xcdbbfc['bind']('isEnabled')['to'](_0x5d4758,'enabledCommandsIds',_0x4db226=>_0x4db226['includes'](_0x3eefda['id'])),_0x302ee4['children']['add'](_0xcdbbfc),_0x302ee4;});}}function _(_0x5a2d54,_0x3a9174){return void 0x0!==_0x5a2d54['order']&&void 0x0===_0x3a9174['order']?0x1:void 0x0===_0x5a2d54['order']&&void 0x0!==_0x3a9174['order']?-0x1:void 0x0!==_0x5a2d54['order']&&void 0x0!==_0x3a9174['order']?_0x5a2d54['order']-_0x3a9174['order']:0x0;}function B(_0x4fb477,_0x37e2e3){_0x37e2e3['sort'](_);const _0x18e7f0={},_0x44025e=[];for(const _0x5087b4 of _0x37e2e3)if(void 0x0!==_0x5087b4['order']){if(_0x5087b4['order']in _0x18e7f0)throw new _0x330cbb('ai-commands-config-order-collision',_0x4fb477,{'conflictingDefinitions':[_0x5087b4,_0x18e7f0[_0x5087b4['order']]]});_0x18e7f0[_0x5087b4['order']]=_0x5087b4,_0x44025e['splice'](_0x5087b4['order'],0x0,_0x5087b4);}else _0x44025e['push'](_0x5087b4);return _0x44025e;}class r extends _0xabda4{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x61b3d){super(_0x61b3d);const _0x11438e=_0x61b3d['config'],_0x3217bb=_0x61b3d['locale'];_0x11438e['define']('ai.aiAssistant.commands',function(_0x39a7ff){return[{'groupId':'editOrReview','groupLabel':i(_0x39a7ff,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x39a7ff,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x39a7ff,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x39a7ff,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x39a7ff,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x39a7ff,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x39a7ff,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x39a7ff,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x39a7ff,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x39a7ff,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x39a7ff,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x39a7ff,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x39a7ff,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x39a7ff,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x39a7ff,'Change\x20style'),'commands':[{'id':'business','label':i(_0x39a7ff,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x39a7ff,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x39a7ff,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x39a7ff,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x39a7ff,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x39a7ff,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x39a7ff,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x39a7ff,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x39a7ff,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x39a7ff,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x39a7ff,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x39a7ff,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x39a7ff,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x3217bb)),_0x11438e['define']('ai.aiAssistant.extraCommandGroups',[]),_0x11438e['define']('ai.aiAssistant.removeCommands',[]);const _0xc78892=o(_0x11438e['get']('ai.aiAssistant.commands'),_0x3217bb),_0x129525=_0x11438e['get']('ai.aiAssistant.extraCommandGroups'),_0xf75f16=_0x11438e['get']('ai.aiAssistant.removeCommands');_0x129525['forEach'](_0x59b9e9=>{const _0x1abebc=_0xc78892['find'](_0x43d3e5=>_0x43d3e5['groupId']===_0x59b9e9['groupId']);_0x1abebc?_0x1abebc['commands']=_0x1abebc['commands']['concat'](_0x59b9e9['commands']):_0xc78892['push'](_0x59b9e9);}),_0xc78892['forEach'](_0x2b5f2f=>{_0x2b5f2f['commands']=_0x2b5f2f['commands']['filter'](_0x40f6ad=>!_0xf75f16['includes'](_0x40f6ad['id']));}),_0x11438e['set']('ai.aiAssistant.commands',_0xc78892);}}class P extends _0xabda4{['abortController'];static get['requires'](){return[v];}constructor(_0x2290e2){super(_0x2290e2),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](v)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x1a5c1e){return this['sendRequest'](_0x1a5c1e)['catch'](_0x5292dd=>{if(_0x5292dd instanceof R)return Promise['reject'](_0x5292dd);if('AbortError'==_0x5292dd['name'])return Promise['resolve']();throw console['error'](_0x5292dd),new _0x330cbb('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x488b78,_0x1a7a33){const _0x47e33e=this['editor']['locale'],_0x39c9b0={'Content-Type':'application/json'};if('object'==typeof _0x488b78)Object['assign'](_0x39c9b0,_0x488b78);else{if(_0x488b78)try{const _0x1db397=await _0x488b78(_0x1a7a33);Object['assign'](_0x39c9b0,_0x1db397);}catch(_0x5f4065){return Promise['reject'](new R(i(_0x47e33e,'AI_ERROR_GET_HEADERS')));}}return _0x39c9b0;}async['_prepareRequestParameters'](_0x2963fc,_0x3dcb98){const _0x5eba51=this['editor']['locale'];if('object'==typeof _0x2963fc)return _0x2963fc;try{return await _0x2963fc(_0x3dcb98);}catch(_0x5ae0ba){return Promise['reject'](new R(i(_0x5eba51,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x51e081){super(_0x51e081),_0x51e081['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x51e081['config']['get']('ai.openAI.requestParameters')||_0x51e081['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x51e081['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x51e081['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x51e081['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x486545,context:_0x3848f2,onData:_0x19c843,actionId:_0x361888}){const _0x129722=this['editor']['locale'],_0xaacc8c=await this['prepareMessages'](_0x486545,_0x3848f2,_0x361888),_0x279e93=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x361888),_0x23f9a3=await this['_prepareRequestParameters'](this['_requestParameters'],_0x361888),_0x153707={'messages':_0xaacc8c,..._0x23f9a3},_0x4c1935={'method':'POST','headers':_0x279e93,'body':JSON['stringify'](_0x153707),'signal':this['abortController']['signal']},_0x21ffd7=await fetch(this['_apiUrl'],_0x4c1935);if(_0x21ffd7['ok'])return _0x23f9a3['stream']?await this['_readStreamableResponse'](_0x21ffd7,_0x19c843):await this['_readStaticResponse'](_0x21ffd7,_0x19c843),Promise['resolve']();{const _0x4f80db=await _0x21ffd7['text']();return _0x4f80db['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x129722,'AI_ERROR_CONTEXT_LENGTH'))):_0x4f80db['includes']('Moderation')?Promise['reject'](new R(i(_0x129722,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x4f80db));}}async['prepareMessages'](_0x7190af,_0x259f39,_0x1669bc){let _0xa56670,_0x5c32a8;return _0x259f39?(_0xa56670='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x5c32a8='Instruction:\x0a'+_0x7190af+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x259f39):(_0xa56670='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x5c32a8=_0x7190af),[{'role':'system','content':_0xa56670},{'role':'user','content':_0x5c32a8}];}async['_readStreamableResponse'](_0x5728de,_0x143fd0){const _0xae6eb3=_0x5728de['body']['getReader'](),_0x49eb31=new TextDecoder();let _0x2a86fc='',_0x3fccb8='',_0x3d2828='',_0x1a55b7=!0x1;for(;!_0x1a55b7;){const {done:_0x24f424,value:_0x12fdce}=await _0xae6eb3['read'](),_0x261229=_0x2a86fc+_0x49eb31['decode'](_0x12fdce);let _0x2e75eb='';_0x1a55b7=_0x24f424;try{_0x2e75eb=this['_cleanUpData'](_0x261229),_0x2a86fc='';}catch(_0x5778b0){_0x2a86fc=_0x261229;continue;}_0x3fccb8+=_0x2e75eb,!_0x1a55b7&&this['_isBufferIncomplete'](_0x3fccb8)||_0x3fccb8&&(_0x3d2828+=_0x3fccb8,_0x3fccb8='',_0x143fd0(_0x3d2828));}return Promise['resolve']();}async['_readStaticResponse'](_0x188aad,_0xbd62f1){return _0xbd62f1((await _0x188aad['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x174cb9){const _0x256d8f=_0x174cb9['split']('<')['length']!==_0x174cb9['split']('>')['length'],_0x280570=_0x174cb9['length']<0x1e;return _0x256d8f&&_0x280570;}['_cleanUpData'](_0x13e33f){return _0x13e33f['split'](/\n(?![^{]*\})/g)['map'](_0x432b8e=>_0x432b8e['replace']('data:\x20',''))['filter'](_0x3f4f63=>_0x3f4f63&&_0x3f4f63['length']>0x0&&'[DONE]'!==_0x3f4f63)['map'](_0x16dcc3=>{const {choices:_0x4d22b4}=JSON['parse'](_0x16dcc3);if(_0x4d22b4[0x0]&&_0x4d22b4[0x0]['delta']&&_0x4d22b4[0x0]['delta']['content'])return _0x4d22b4[0x0]['delta']['content'];})['filter'](_0xb9ec18=>_0xb9ec18)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x33ec9a){super(_0x33ec9a),_0x33ec9a['config']['get']('ai.aws.requestParameters')||_0x33ec9a['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x33ec9a['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x33ec9a['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x33ec9a['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x33ec9a['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x4c3c90,context:_0x30a846,onData:_0x311e9d,actionId:_0x4a148c}){const {model:_0x18e737,stream:_0x3dc812,..._0x52c882}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4a148c),_0x1eefaf={'prompt':await this['preparePrompt'](_0x4c3c90,_0x30a846,_0x18e737,_0x4a148c),..._0x52c882};this['_apiUrl']?await this['_processProxyRequest'](_0x1eefaf,_0x18e737,_0x3dc812,_0x311e9d,_0x4a148c):await this['_processAWSRequest'](_0x1eefaf,_0x18e737,_0x3dc812,_0x311e9d);}async['preparePrompt'](_0x483459,_0x11d225,_0x1a5423,_0x19acc7){let _0x3c1fb0,_0x20fe10;return _0x11d225?(_0x3c1fb0='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x20fe10='Instruction:\x0a'+_0x483459+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x11d225):(_0x3c1fb0='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x20fe10=_0x483459),'meta.llama'==this['getModelFamily'](_0x1a5423)?'<<SYS>>\x0a'+_0x3c1fb0+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x20fe10+'\x0a[/INST]':'Human:\x0a'+_0x3c1fb0+'\x0a'+_0x20fe10+'\x0a\x0aAssistant:';}['getModelFamily'](_0x516cb3){if(/^anthropic\.claude/['test'](_0x516cb3))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x516cb3))return'ai21.j2';if(/^cohere\.command/['test'](_0x516cb3))return'cohere.command';if(/^meta\.llama/['test'](_0x516cb3))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x516cb3));}async['_processProxyRequest'](_0x18dcd4,_0x748857,_0x57862f,_0xad8a3e,_0x27a414){const _0x2fa9aa={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x27a414),'body':JSON['stringify']({..._0x18dcd4,'model':_0x748857,'stream':_0x57862f}),'signal':this['abortController']['signal']},_0x300baa=await fetch(this['_apiUrl'],_0x2fa9aa);_0x57862f?await this['_readStreamableResponse'](_0x300baa,_0x748857,_0xad8a3e):await this['_readStaticResponse'](_0x300baa,_0x748857,_0xad8a3e);}async['_processAWSRequest'](_0x30c570,_0x5bf996,_0x431756,_0x17e2ce){const _0x5320f2=new _0x5f0bb9(this['_bedrockClientConfig']),_0x1d936a={'body':JSON['stringify'](_0x30c570),'contentType':'application/json','accept':'application/json','modelId':_0x5bf996};let _0xcef9de;if(_0x431756){const _0x406673=new _0x251c9f(_0x1d936a);_0xcef9de=await _0x5320f2['send'](_0x406673,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0xcef9de,_0x5bf996,_0x17e2ce);}else{const _0x40af0b=new _0x3f1b57(_0x1d936a);_0xcef9de=await _0x5320f2['send'](_0x40af0b,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0xcef9de,_0x5bf996,_0x17e2ce);}}async['_readAsyncIterableResponse'](_0x500a65,_0x9a112f,_0x310ca0){const _0x1b6f8f=_0x500a65['body'],_0x357bc0=new TextDecoder('utf-8');let _0x338461='';for await(const _0x5f0c81 of _0x1b6f8f)if(_0x5f0c81['chunk']){const _0x33dded=_0x357bc0['decode'](_0x5f0c81['chunk']['bytes']),_0x86eef8=JSON['parse'](_0x33dded);_0x338461+=this['_getGeneratedText'](_0x86eef8,_0x9a112f),_0x310ca0(_0x338461);}return Promise['resolve']();}async['_readStreamableResponse'](_0x3b327a,_0x4422c5,_0x4ca728){const _0x395812=_0x3b327a['body'],_0xab7f77=new TextDecoder('utf-8'),_0xf065d3=_0x395812['getReader']();let _0x37ecd0='',_0x1689a7='',_0x551b2a=!0x1;for(;!_0x551b2a;){const {done:_0x41f89c,value:_0x12bbd1}=await _0xf065d3['read']();if(_0x551b2a=_0x41f89c,_0x551b2a)break;const _0x4fa735=(_0x37ecd0+_0xab7f77['decode'](_0x12bbd1))['split']('\x0a')['map'](_0x477d75=>{try{return _0x37ecd0='',JSON['parse'](_0x477d75);}catch(_0x166ea5){return _0x37ecd0=_0x477d75,null;}})['filter'](_0x267e65=>null!==_0x267e65);_0x4fa735['length']&&(_0x1689a7+=_0x4fa735['map'](_0x57e20b=>this['_getGeneratedText'](_0x57e20b,_0x4422c5))['join'](''),_0x4ca728(_0x1689a7));}return Promise['resolve']();}async['_readStaticResponse'](_0x8c0cb3,_0x1bed5,_0x1faa19){let _0x4db237;return _0x4db237=_0x8c0cb3 instanceof Response?await _0x8c0cb3['json']():JSON['parse'](Buffer['from'](_0x8c0cb3['body'])['toString']('utf8')),(_0x1faa19(this['_getGeneratedText'](_0x4db237,_0x1bed5)),Promise['resolve']());}['_getGeneratedText'](_0x2b22d3,_0x5dffaf){switch(this['getModelFamily'](_0x5dffaf)){case'anthropic.claude':return _0x2b22d3['completion'];case'ai21.j2':return _0x2b22d3['completions'][0x0]['data']['text'];case'cohere.command':return _0x2b22d3['generations'][0x0]['text'];case'meta.llama':return _0x2b22d3['generation'];}}}export{v as AIAdapter,r as AIAssistant,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
23
+ import{Plugin as _0x112e8c,Command as _0xe404c1,icons as _0x1f826f}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x56f145,CKEditorError as _0x392509,ObservableMixin as _0xd3673c,global as _0x13a027,isVisible as it,Rect as st,Collection as _0x471979,FocusTracker as _0xed408f,KeystrokeHandler as ts,first as _0x3def0b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as rt,ButtonView as _0x58f273,View as _0x2c75cb,SpinnerView as _0x393585,IconView as _0x3b8d2e,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x5ef314,ButtonLabelView as te,FocusCycler as _0x45e84e,createLabeledTextarea as _0x172481,Dialog as _0x489f1b,createDropdown as _0xef42bc,addMenuToDropdown as _0x49ed60,MenuBarMenuView as _0x26c46d,MenuBarMenuListItemButtonView as _0x335f6e,DialogViewPosition as _0x3f4ae1,MenuBarMenuListView as _0x5cd8e2,MenuBarMenuListItemView as _0x1ce200}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as at}from'ckeditor5-collaboration/dist/index.js';import{UpcastWriter as _0x4d462d,Matcher as _0x315730,DataTransfer as _0x4e5dbd,DomEventData as _0x511d02}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x584ead,escape as _0x201397}from'lodash-es';import{ClipboardMarkersUtils as _0x5a8d15}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{BedrockRuntimeClient as _0x4a8a89,InvokeModelWithResponseStreamCommand as _0x53dd86,InvokeModelCommand as _0x5754c1}from'@aws-sdk/client-bedrock-runtime';const I='_ungrouppedCommands';function o(_0x4ffea1,_0x1334e5){const _0x57cd5e=(0x0,_0x1334e5['t'])('Other');return _0x4ffea1['length']?'groupId'in _0x4ffea1[0x0]?_0x4ffea1:[{'groupId':I,'groupLabel':_0x57cd5e,'order':0x1/0x0,'commands':_0x4ffea1}]:[{'groupId':I,'groupLabel':_0x57cd5e,'order':0x1/0x0,'commands':[]}];}const u='ai-ui';class a extends _0x112e8c{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2b5fa8}=this,_0x11186c=['ck-fake-ai-selection'];_0x2b5fa8['config']['get']('ai.useTheme')&&_0x11186c['push']('ck-ai-assistant-ui_theme'),_0x2b5fa8['conversion']['for']('editingDowncast')['markerToHighlight']({'model':u,'view':{'classes':_0x11186c,'priority':0xc}}),_0x2b5fa8['conversion']['for']('editingDowncast')['markerToElement']({'model':u,'view':(_0x872f99,{writer:_0x52cce2})=>{if(!_0x872f99['markerRange']['isCollapsed'])return null;const _0xb5c72c=_0x52cce2['createUIElement']('span');return _0x52cce2['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0xb5c72c),_0xb5c72c;}});}['afterInit'](){!async function(_0x180012){const _0xc9ab9a=_0x553ef9([0x61,0x58,0x32,0x72,0x54,0x4a,0x34,0x47,0x30,0x36,0x71,0x64,0x73,0x4c,0x77,0x37,0x38,0x6d,0x6c,0x65,0x66,0x45,0x74,0x75,0x31,0x43,0x6b,0x62,0x39,0x35,0x50,0x44,0x46,0x6e,0x79,0x55,0x42,0x6f,0x51,0x4f,0x67,0x78,0x59,0x76,0x70,0x33,0x48,0x4b,0x63,0x57,0x68,0x7a,0x5a,0x41,0x6a,0x53,0x69,0x52,0x4e,0x56,0x49,0x4d]),_0x40fc1c=0x73f48f83,_0x505e55=0x73f3d6fb^_0x40fc1c,_0x59c349=window[_0x553ef9([0x44,0x61,0x74,0x65])][_0x553ef9([0x6e,0x6f,0x77])](),_0x39d412=_0x180012[_0x553ef9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x36ac15=new window[(_0x553ef9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x73bf5b=>{_0x39d412[_0x553ef9([0x6f,0x6e,0x63,0x65])](_0x553ef9([0x72,0x65,0x61,0x64,0x79]),_0x73bf5b);}),_0x324fb8={[_0x553ef9([0x6b,0x74,0x79])]:_0x553ef9([0x45,0x43]),[_0x553ef9([0x75,0x73,0x65])]:_0x553ef9([0x73,0x69,0x67]),[_0x553ef9([0x63,0x72,0x76])]:_0x553ef9([0x50,0x2d,0x32,0x35,0x36]),[_0x553ef9([0x78])]:_0x553ef9([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]),[_0x553ef9([0x79])]:_0x553ef9([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]),[_0x553ef9([0x61,0x6c,0x67])]:_0x553ef9([0x45,0x53,0x32,0x35,0x36])},_0x541c74=_0x39d412[_0x553ef9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x553ef9([0x67,0x65,0x74])](_0x553ef9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2a9bf8(){let _0xbcc37b,_0x5d4a48=null,_0x226edc=null;try{if(_0x541c74==_0x553ef9([0x47,0x50,0x4c]))return _0x553ef9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xbcc37b=_0x22480d(),!_0xbcc37b)return _0x553ef9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xbcc37b[_0x553ef9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x226edc=_0x2dbfc5(_0xbcc37b[_0x553ef9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xbcc37b[_0x553ef9([0x6a,0x74,0x69])])),await _0x2f4d23()?_0x11c8c0()?_0x964635()?_0x553ef9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3435e3()?(_0xbcc37b[_0x553ef9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x553ef9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5d4a48=_0x7ca89(_0x553ef9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xbcc37b[_0x553ef9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x553ef9([0x74,0x72,0x69,0x61,0x6c])&&(_0x5d4a48=_0x7ca89(_0x553ef9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0xbcc37b[_0x553ef9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x553ef9([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x5d4a48=_0x7ca89(_0x553ef9([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1db883()):_0x553ef9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x553ef9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x553ef9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x759415){return _0x553ef9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x964635(){const _0xd13e68=[_0x553ef9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x553ef9([0x74,0x72,0x69,0x61,0x6c])][_0x553ef9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbcc37b[_0x553ef9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x59c349/0x3e8:0xe10*_0x505e55;return _0xbcc37b[_0x553ef9([0x65,0x78,0x70])]<_0xd13e68;}function _0x11c8c0(){const _0x49c5fb=_0xbcc37b[_0x553ef9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x49c5fb&&(!!_0x49c5fb[_0x553ef9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x553ef9([0x2a]))||!!_0x49c5fb[_0x553ef9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x553ef9([0x41,0x49])));}function _0x3435e3(){const _0x43fe68=_0xbcc37b[_0x553ef9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x43fe68||0x0==_0x43fe68[_0x553ef9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x420045}=new URL(window[_0x553ef9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x43fe68[_0x553ef9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x420045))return!0x0;const _0x4fe384=_0x420045[_0x553ef9([0x73,0x70,0x6c,0x69,0x74])](_0x553ef9([0x2e]));return _0x43fe68[_0x553ef9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x100968=>_0x100968[_0x553ef9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x553ef9([0x2a])))[_0x553ef9([0x6d,0x61,0x70])](_0x315e74=>_0x315e74[_0x553ef9([0x73,0x70,0x6c,0x69,0x74])](_0x553ef9([0x2e])))[_0x553ef9([0x73,0x6f,0x6d,0x65])](_0x5051ed=>_0x4fe384[_0x553ef9([0x65,0x76,0x65,0x72,0x79])]((_0x635dbd,_0x50b1b4)=>_0x5051ed[_0x50b1b4]===_0x635dbd||_0x5051ed[_0x50b1b4]===_0x553ef9([0x2a])));}function _0x1db883(){return _0x5d4a48&&_0x226edc?new window[(_0x553ef9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x305dbe,_0x3002d4)=>{_0x5d4a48[_0x553ef9([0x74,0x68,0x65,0x6e])](_0x305dbe,_0x3002d4),_0x226edc[_0x553ef9([0x74,0x68,0x65,0x6e])](_0x5ba336=>{_0x5ba336!=_0x553ef9([0x56,0x61,0x6c,0x69,0x64])&&_0x305dbe(_0x5ba336);},_0x3002d4);}):_0x5d4a48||_0x226edc||_0x553ef9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2dbfc5(_0x413073,_0x5a4400){return new window[(_0x553ef9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a8a4c=>{if(_0x317b82())return _0x2a8a4c(_0x553ef9([0x56,0x61,0x6c,0x69,0x64]));_0x2faaaf(),_0x39d412[_0x553ef9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x553ef9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5a7570=!0x1;const _0x41d3f9=_0x56f145();function _0x450516(_0x461243){return!!_0x461243&&(typeof _0x461243===_0x553ef9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x461243===_0x553ef9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x461243[_0x553ef9([0x74,0x68,0x65,0x6e])]===_0x553ef9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x461243[_0x553ef9([0x63,0x61,0x74,0x63,0x68])]===_0x553ef9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x375976(_0x186b5c){_0x85e51e(_0x186b5c)[_0x553ef9([0x74,0x68,0x65,0x6e])](_0x5362cb=>{if(!_0x5362cb||_0x5362cb[_0x553ef9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x553ef9([0x6f,0x6b]))return _0x553ef9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5608fe(_0xa16b53(_0x41d3f9+_0x5a4400))!=_0x5362cb[_0x553ef9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x553ef9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x553ef9([0x56,0x61,0x6c,0x69,0x64]);})[_0x553ef9([0x74,0x68,0x65,0x6e])](_0x39d929=>(_0x54bd0f(),_0x39d929),()=>{const _0x51599c=_0x2a358b();return null==_0x51599c?(_0x54bd0f(),_0x553ef9([0x56,0x61,0x6c,0x69,0x64])):_0x553ef9(_0x59c349-_0x51599c>(0x57f80b83^_0x40fc1c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x553ef9([0x74,0x68,0x65,0x6e])](_0x2a8a4c)[_0x553ef9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2a8a4c(_0x553ef9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3f60e1=0x73c26103^_0x40fc1c;function _0x54bd0f(){const _0x1cd90f=_0x553ef9([0x6c,0x6c,0x63,0x74,0x2d])+_0x5608fe(_0xa16b53(_0x413073)),_0x21c5a1=_0x28393d(_0x5608fe(window[_0x553ef9([0x4d,0x61,0x74,0x68])][_0x553ef9([0x63,0x65,0x69,0x6c])](_0x59c349/_0x3f60e1)));window[_0x553ef9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x553ef9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1cd90f,_0x21c5a1);}function _0x2a358b(){const _0x27129a=_0x553ef9([0x6c,0x6c,0x63,0x74,0x2d])+_0x5608fe(_0xa16b53(_0x413073)),_0x588f6e=window[_0x553ef9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x553ef9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x27129a);return _0x588f6e?window[_0x553ef9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x28393d(_0x588f6e),0x10)*_0x3f60e1:null;}function _0x85e51e(_0x5f36f1){return new window[(_0x553ef9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c8821,_0x18853b)=>{_0x5f36f1[_0x553ef9([0x74,0x68,0x65,0x6e])](_0x5c8821,_0x18853b),window[_0x553ef9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x18853b,0x73f55b43^_0x40fc1c);});}}_0x39d412[_0x553ef9([0x6f,0x6e])](_0x553ef9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x338b21,_0x25a4aa)=>{if(_0x25a4aa[0x0]!=_0x413073)return _0x2a8a4c(_0x553ef9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x25a4aa[0x1]={..._0x25a4aa[0x1],[_0x553ef9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x41d3f9};},{[_0x553ef9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x553ef9([0x68,0x69,0x67,0x68])}),_0x39d412[_0x553ef9([0x6f,0x6e])](_0x553ef9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xeb01e4=>{_0x450516(_0xeb01e4[_0x553ef9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5a7570=!0x0,_0x375976(_0xeb01e4[_0x553ef9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x553ef9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x553ef9([0x6c,0x6f,0x77])}),_0x36ac15[_0x553ef9([0x74,0x68,0x65,0x6e])](()=>{_0x5a7570||_0x2a8a4c(_0x553ef9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x317b82(){return _0x39d412[_0x553ef9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x553ef9([0x76,0x69,0x65,0x77])][_0x553ef9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x553ef9([0x61,0x75,0x74,0x6f]);}function _0x2faaaf(){_0x39d412[_0x553ef9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x553ef9([0x76,0x69,0x65,0x77])][_0x553ef9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x553ef9([0x61,0x75,0x74,0x6f]);}}function _0x7ca89(_0xd27246){const _0x4f05aa=[new window[(_0x553ef9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x560467=>setTimeout(_0x560467,0x73fdb14f^_0x40fc1c)),_0x36ac15[_0x553ef9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x553ef9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x7107e3=>{let _0xe2a6ba=0x0;_0x39d412[_0x553ef9([0x6d,0x6f,0x64,0x65,0x6c])][_0x553ef9([0x6f,0x6e])](_0x553ef9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2448cc,_0x13ff96)=>{_0x13ff96[0x0][_0x553ef9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xe2a6ba++,_0xe2a6ba==(0x73f48e7b^_0x40fc1c)&&(_0x7107e3(),_0x2448cc[_0x553ef9([0x6f,0x66,0x66])]());});}))];return window[_0x553ef9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x553ef9([0x72,0x61,0x63,0x65])](_0x4f05aa)[_0x553ef9([0x74,0x68,0x65,0x6e])](()=>_0xd27246);}async function _0x20eba5(){await _0x36ac15,_0x39d412[_0x553ef9([0x6d,0x6f,0x64,0x65,0x6c])][_0x553ef9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x276e21,_0x39d412[_0x553ef9([0x6d,0x6f,0x64,0x65,0x6c])][_0x553ef9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x276e21,_0x39d412[_0x553ef9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x553ef9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x594d99(_0x39d338){const _0x55242d=_0x48322f();_0x39d412[_0x55242d]=_0x553ef9([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x39d338,_0x39d338!=_0x553ef9([0x56,0x61,0x6c,0x69,0x64])&&_0x20eba5();}function _0x48322f(){const _0x53409d=window[_0x553ef9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x553ef9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x553ef9([0x6e,0x6f,0x77])]())[_0x553ef9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x553ef9([0x2e]),'');let _0x41d43f=_0x553ef9([0x61]);for(let _0x351853=0x0;_0x351853<_0x53409d[_0x553ef9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x351853+=0x2){let _0x12509d=window[_0x553ef9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53409d[_0x553ef9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x351853,_0x351853+0x2));_0x12509d>=_0xc9ab9a[_0x553ef9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x12509d-=_0xc9ab9a[_0x553ef9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x41d43f+=_0xc9ab9a[_0x12509d];}return _0x41d43f;}function _0x22480d(){const _0x55183d=_0x541c74[_0x553ef9([0x73,0x70,0x6c,0x69,0x74])](_0x553ef9([0x2e]));if(0x3!=_0x55183d[_0x553ef9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1711c4(_0x55183d[0x1]);function _0x1711c4(_0x5d422a){const _0x3cd5d3=_0x12beb7(_0x5d422a);return _0x3cd5d3&&_0x1b205c()?_0x3cd5d3:null;function _0x1b205c(){const _0x50b04d=_0x3cd5d3[_0x553ef9([0x6a,0x74,0x69])],_0x816316=window[_0x553ef9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x50b04d[_0x553ef9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x50b04d[_0x553ef9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4e0999={..._0x3cd5d3,[_0x553ef9([0x6a,0x74,0x69])]:_0x50b04d[_0x553ef9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x50b04d[_0x553ef9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4e0999[_0x553ef9([0x76,0x63])],_0xa16b53(_0x4e0999)==_0x816316;}}}async function _0x2f4d23(){let _0x4621cc=!0x0;try{const _0x5b0b2c=_0x541c74[_0x553ef9([0x73,0x70,0x6c,0x69,0x74])](_0x553ef9([0x2e])),[_0x1428df,_0x5a4c84,_0x53c475]=_0x5b0b2c;return _0x39c88b(_0x1428df),await _0x1c1fed(_0x1428df,_0x5a4c84,_0x53c475),_0x4621cc;}catch(_0x140255){return!0x1;}function _0x39c88b(_0xce2460){const _0x5d2414=_0x12beb7(_0xce2460);_0x5d2414&&_0x5d2414[_0x553ef9([0x61,0x6c,0x67])]==_0x553ef9([0x45,0x53,0x32,0x35,0x36])||(_0x4621cc=!0x1);}async function _0x1c1fed(_0x1376c1,_0x4ce374,_0xf6fd50){const _0x46d5c5=window[_0x553ef9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x553ef9([0x66,0x72,0x6f,0x6d])](_0x2195d3(_0xf6fd50),_0x32c4c8=>_0x32c4c8[_0x553ef9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x24ce6b=new window[(_0x553ef9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x553ef9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1376c1+_0x553ef9([0x2e])+_0x4ce374),_0x5300f0=window[_0x553ef9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x553ef9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5300f0)return;const _0x4fefb1=await _0x5300f0[_0x553ef9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x553ef9([0x6a,0x77,0x6b]),_0x324fb8,{[_0x553ef9([0x6e,0x61,0x6d,0x65])]:_0x553ef9([0x45,0x43,0x44,0x53,0x41]),[_0x553ef9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x553ef9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x553ef9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5300f0[_0x553ef9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x553ef9([0x6e,0x61,0x6d,0x65])]:_0x553ef9([0x45,0x43,0x44,0x53,0x41]),[_0x553ef9([0x68,0x61,0x73,0x68])]:{[_0x553ef9([0x6e,0x61,0x6d,0x65])]:_0x553ef9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4fefb1,_0x46d5c5,_0x24ce6b)||(_0x4621cc=!0x1);}}function _0x12beb7(_0x305ccb){return _0x305ccb[_0x553ef9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x553ef9([0x65,0x79]))?JSON[_0x553ef9([0x70,0x61,0x72,0x73,0x65])](_0x2195d3(_0x305ccb)):null;}function _0x2195d3(_0x37de0c){return window[_0x553ef9([0x61,0x74,0x6f,0x62])](_0x37de0c[_0x553ef9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x553ef9([0x2b]))[_0x553ef9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x553ef9([0x2f])));}function _0xa16b53(_0x33546c){let _0x4cef02=0x1505;function _0x1cd846(_0x5c6cfd){for(let _0x44a638=0x0;_0x44a638<_0x5c6cfd[_0x553ef9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x44a638++){const _0x4fa838=_0x5c6cfd[_0x553ef9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x44a638);_0x4cef02=(_0x4cef02<<0x5)+_0x4cef02+_0x4fa838,_0x4cef02&=_0x4cef02;}}function _0x2174e8(_0x4d8293){Array[_0x553ef9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4d8293)?_0x4d8293[_0x553ef9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2174e8):_0x4d8293&&typeof _0x4d8293==_0x553ef9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x553ef9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4d8293)[_0x553ef9([0x73,0x6f,0x72,0x74])]()[_0x553ef9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x431f07,_0x5771d9])=>{_0x1cd846(_0x431f07),_0x2174e8(_0x5771d9);}):_0x1cd846(window[_0x553ef9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4d8293));}return _0x2174e8(_0x33546c),_0x4cef02>>>0x0;}function _0x5608fe(_0x47e862){return _0x47e862[_0x553ef9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x553ef9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x553ef9([0x30]));}function _0x28393d(_0x1fc29c){return _0x1fc29c[_0x553ef9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x553ef9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x553ef9([0x6a,0x6f,0x69,0x6e])]('');}function _0x276e21(){}function _0x553ef9(_0x475186){return _0x475186['map'](_0x121fbc=>String['fromCharCode'](_0x121fbc))['join']('');}_0x594d99(await _0x2a9bf8());}(this);}['showFakeVisualSelection'](){const _0x4c971d=this['editor']['model'];_0x4c971d['change'](_0x59be5b=>{const _0x55f026=_0x4c971d['document']['selection']['getFirstRange']();if(_0x4c971d['markers']['has'](u))_0x59be5b['updateMarker'](u,{'range':_0x55f026});else{if(_0x55f026['start']['isAtEnd']){const _0x32e5ed=_0x55f026['start']['getLastMatchingPosition'](({item:_0x5b74fa})=>!_0x4c971d['schema']['isContent'](_0x5b74fa),{'boundaries':_0x55f026});_0x59be5b['addMarker'](u,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x59be5b['createRange'](_0x32e5ed,_0x55f026['end'])});}else _0x59be5b['addMarker'](u,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x55f026});}});}['hideFakeVisualSelection'](){const _0x10bce3=this['editor']['model'];_0x10bce3['markers']['has'](u)&&_0x10bce3['change'](_0xd7bf7d=>{_0xd7bf7d['removeMarker'](u);});}['insertContent'](_0xaa8156,_0x46b13b){const _0x518cbb=_0x46b13b||this['editor']['model']['markers']['get'](u)['getRange']();if(!this['editor']['model']['canEditAt'](_0x518cbb))return;const _0x4cb50b=this['editor']['data']['processor']['toView'](_0xaa8156),_0x38a653=this['editor']['data']['toModel'](_0x4cb50b);this['editor']['model']['change'](_0x45f345=>{this['hideFakeVisualSelection']();const _0x2093d5=this['editor']['model']['insertContent'](_0x38a653,_0x518cbb);_0x2093d5&&_0x45f345['setSelection'](_0x2093d5);});}['insertContentBelow'](_0x5a8573){const {model:_0x1c8f18}=this['editor'],_0x95127a=Array['from'](_0x1c8f18['createSelection'](this['editor']['model']['markers']['get'](u)['getRange']())['getSelectedBlocks']()),_0x45aac5=_0x95127a['length']?_0x1c8f18['createPositionAfter'](_0x95127a['pop']()):_0x1c8f18['document']['selection']['getLastPosition']();this['insertContent'](_0x5a8573,_0x45aac5);}}class v extends _0x112e8c{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x392509('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x5e9aa5){super(_0x5e9aa5),this['name']='AIRequestError';}}function i(_0x2cca8a,_0x2710a9,_0x34990a){const t=_0x2cca8a['t'];switch(_0x2710a9){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x34990a);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x34990a);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x34990a);case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x2710a9;}}class y extends _0xe404c1{['_commandDefinitions'];constructor(_0x54a24f,_0xad87ea){super(_0x54a24f),this['_commandDefinitions']=_0xad87ea,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0xecbb23,_0x18be5e,_0x56aef)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x56aef));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x39c769,_0x4a658a,_0x7ffb81)=>{this['enabledCommandsIds']=_0x7ffb81?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x486b84=this['editor']['model'];this['_hasContext']=function(_0x186d94){const _0x4e0765=_0x186d94['document']['selection'];return _0x4e0765['isCollapsed']?0x0!==[..._0x4e0765['getSelectedBlocks']()]['length']&&![..._0x4e0765['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x186d94['hasContent'](_0x4e0765['getFirstRange']());}(_0x486b84);const _0x593cb6=_0x486b84['document']['selection'],_0xc7b80e=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x4f65f9 of _0x593cb6['getRanges']())for(const _0x1c9cae of _0x4f65f9['getItems']())if(_0x1c9cae['is']('element')&&_0xc7b80e['includes'](_0x1c9cae['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x2913ae='',_0x406dee='',_0x1cd099='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x2913ae,_0x406dee,_0x1cd099);}}function G(_0x250233,_0x556dc7){const _0x2984d8=new Set();for(const _0x283e3a of _0x250233['values']())(_0x556dc7||!0x1===_0x283e3a['requiresContent'])&&_0x2984d8['add'](_0x283e3a['id']);return Array['from'](_0x2984d8);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class C extends/* #__PURE__ -- @preserve */
24
+ _0xd3673c(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x6c48e6,_0xe3c4c8,_0x5721fa){super(),this['editor']=_0x6c48e6,this['textAdapter']=_0xe3c4c8,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x5721fa,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x4ccf93,_0x5cb636,_0x196960)=>{this['view']['value']=this['_sanitizeHTML'](_0x196960);}),this['listenTo'](this['view'],'submitPrompt',(_0x229066,_0x1eaf93)=>{const _0x4ebace=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1eaf93,_0x4ebace,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0x54381f,query:_0x4069c0,htmlContent:_0x4edf9b,label:_0xfa5ceb,mainActionLabel:_0x55c661}){this['view']['prompt']=_0xfa5ceb,this['view']['mainAction']=_0x55c661,this['initialContext']=_0x4edf9b,_0x4069c0&&(this['view']['isRendered']?this['_handleQuery'](_0x4069c0,_0x4edf9b,_0x54381f,_0xfa5ceb):this['view']['once']('render',()=>{this['_handleQuery'](_0x4069c0,_0x4edf9b,_0x54381f,_0xfa5ceb);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x4278c8,_0x337743,_0x5d6963,_0x50a2e3){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x337743,this['previousQuery']=_0x4278c8,this['previousLabel']=_0x50a2e3||_0x4278c8,this['previousActionId']=_0x5d6963,new Promise(_0x1388f7=>{this['textAdapter']['makeRequest']({'query':_0x4278c8,'context':_0x337743,'onData':_0x2c41b3=>{this['currentResponse']=_0x2c41b3,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x5d6963})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x37c606=>{_0x37c606 instanceof R?this['view']['handleError'](_0x37c606['message']):this['view']['handleError'](),_0x1388f7();})['finally'](()=>{this['stopProcessing'](),_0x1388f7();});});}['_parseAndNormalizeContent'](_0xb2e12a,_0x277662=!0x1){const _0x2925c6=Z['exec'](_0xb2e12a);_0xb2e12a=_0x2925c6?_0xb2e12a['substring'](_0x2925c6[0x1]['length']):_0xb2e12a['length']<0x64&&!_0x277662?'':this['_stripMarkdownSyntax'](_0xb2e12a);const _0x3d4df2=this['_domParser']['parseFromString'](_0xb2e12a,'text/html');if(_0x2925c6){const _0x4b708b=Array['from'](_0x3d4df2['body']['childNodes']);_0x4b708b['reverse']();for(const _0xf3249a of _0x4b708b){if(_0xf3249a['nodeType']==Node['ELEMENT_NODE'])break;_0xf3249a['remove']();}}const _0x329d6c=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x3d4df2['body']));return this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x329d6c),this['editor']['data']['stringify'](this['editor']['data']['toModel'](_0x329d6c));}['_normalizeResponseHeadings'](_0x3881dd){const _0x50b381=new _0x4d462d(this['editor']['editing']['view']['document']),_0x44ad11=new _0x315730({'name':/^h[1-5]$/}),_0x40c37a=[];let _0x2bf22=!0x1;for(const _0x331069 of _0x3881dd)_0x331069['is']('element')&&_0x44ad11['match'](_0x331069)&&(_0x40c37a['push'](_0x331069),'h1'==_0x331069['name']&&(_0x2bf22=!0x0));if(_0x2bf22){for(const _0x20e803 of _0x40c37a)_0x50b381['rename']('h'+(parseInt(_0x20e803['name'][0x1])+0x1),_0x20e803);}}['_isH1TagSupportEnabled'](){const {data:_0x3b864e,editing:_0x4f273c}=this['editor'],_0x58d758=_0x3b864e['htmlProcessor']['toView']('<h1></h1>'),_0x3fae4e=_0x3b864e['toView'](_0x3b864e['toModel'](_0x58d758));return!!_0x4f273c['view']['domConverter']['viewToDom'](_0x3fae4e)['querySelector']('h1');}['_sanitizeHTML'](_0x1da93f){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x1da93f),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x25d053){const _0x1b3393=_0x25d053['trim']();return _0x1b3393['startsWith']('```html')?_0x1b3393['endsWith']('```')?_0x1b3393['substring'](0x7,_0x1b3393['length']-0x3):_0x1b3393['substring'](0x7):_0x25d053;}}const x={'REPLACE':'replace','INSERT':'insert'};class nt extends rt{constructor(_0x23836a){super(_0x23836a),this['set']('isVisible',!0x1),this['set']('mainAction',x['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x122453=>i(_0x23836a,'AI_'+_0x122453['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x23836a,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x23836a,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x23836a,'Stop'));const _0x5d854f=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x5d854f['if']('isVisible','ck-hidden',_0x162753=>!_0x162753)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x2f56dc,_0x3e4a8f){const _0x2c45fd=new _0x58f273(this['locale']);return _0x2c45fd['set']({'label':_0x2f56dc,'class':_0x3e4a8f||'','isVisible':!0x0,'withText':!0x0}),_0x2c45fd;}}var U='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class W extends _0x2c75cb{['contentFieldView'];['copyButtonView'];constructor(_0x75955,_0x2b584d=''){super(_0x75955),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x4ec6c6=this['bindTemplate'];this['contentFieldView']=new ct(_0x75955,_0x2b584d),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x4ec6c6['if']('isVisible','ck-hidden',_0x2b687d=>!_0x2b687d)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x4ec6c6['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0x5b4b91=!0x1;this['on']('change:value',(_0x22b1d6,_0x19f181,_0x3d0054)=>{const _0x420df8=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x3d0054),this['isProcessing']&&_0x420df8&&!_0x5b4b91&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x91b528,_0x1d93a7,_0x1a65c7)=>{_0x5b4b91=!0x1,_0x1a65c7?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x5b4b91=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x5b4b91=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x4491c9=this['locale'],_0x5dffbb=new _0x58f273(this['locale']),_0x144df7='ck-ai-form__copy-button';return _0x5dffbb['set']({'label':i(_0x4491c9,'Copy'),'icon':U,'class':_0x144df7,'tooltip':!0x0}),_0x5dffbb['bind']('isVisible')['to'](this,'value',_0x5539e0=>!!_0x5539e0),_0x5dffbb['bind']('isEnabled')['to'](this,'isProcessing',_0x212765=>!_0x212765),_0x5dffbb['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x5dffbb['icon']=_0x1f826f['check'],_0x5dffbb['class']=_0x144df7+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x5dffbb['icon']=U,_0x5dffbb['class']=_0x144df7;},0x3e8);}),_0x5dffbb;}['_copyHTMLToClipboard'](_0x337f18){const {window:_0x583a77,document:_0x597765}=_0x13a027;if(_0x583a77['ClipboardItem']){const {Blob:_0x424f93,ClipboardItem:_0x3cad72}=_0x583a77,_0x31eeb2=[new _0x3cad72({'text/html':new _0x424f93([_0x337f18['innerHTML']],{'type':'text/html'}),'text/plain':new _0x424f93([_0x337f18['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x31eeb2);}else{const _0x5c6649=_0x597765['createElement']('div');_0x5c6649['style']['position']='absolute',_0x5c6649['style']['left']='-9999px',_0x5c6649['innerHTML']='<span>[</span>'+_0x337f18['innerHTML']+'<span>]</span>',_0x597765['body']['appendChild'](_0x5c6649);const _0x2f34b6=_0x597765['createRange']();_0x2f34b6['setStartAfter'](_0x5c6649['firstElementChild']),_0x2f34b6['setEndBefore'](_0x5c6649['lastElementChild']);const _0x1f7434=_0x583a77['getSelection']();_0x1f7434['removeAllRanges'](),_0x1f7434['addRange'](_0x2f34b6),_0x597765['execCommand']('copy'),_0x5c6649['remove']();}}}class ct extends _0x2c75cb{constructor(_0x5e3562,_0x22fa8d=''){super(_0x5e3562),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x22fa8d,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x57a0d1){this['element']['innerHTML']=_0x57a0d1;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x8fd196=new _0x2c75cb(),_0x1daf06=this['locale'],_0x3ecf0a=new _0x393585();return _0x3ecf0a['isVisible']=!0x0,_0x8fd196['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x3ecf0a,{'text':i(_0x1daf06,'AI\x20is\x20writing...')}]}),_0x8fd196['render'](),_0x8fd196;}}class tt extends _0x2c75cb{constructor(_0x4fbbfa,_0x375388=''){super(_0x4fbbfa);const _0x36a1f4=new _0x3b8d2e(),_0x5ed70a=this['bindTemplate'];this['set']('text',_0x375388),_0x36a1f4['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x36a1f4,{'text':_0x5ed70a['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x42880d,_0x30a363){super(_0x42880d,_0x30a363),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0x233e44,_0x30aa81)=>{_0x233e44['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x30aa81());});}['_createSubmitButton'](){const _0x112b27=new _0x58f273(this['locale']),_0x52a9bf=this['locale'];return _0x112b27['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x52a9bf,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x112b27['on']('execute',()=>{this['submit']();}),_0x112b27['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x24520f,_0xf454fa)=>!_0x24520f&&_0xf454fa),_0x112b27;}['_createShowHistoryButton'](){const _0xff287c=new _0x58f273(this['locale']),_0x5d4ef0=this['resultsView'],_0x350cb4=this['locale'];_0xff287c['set']({'label':i(_0x350cb4,'History'),'withText':!0x1,'icon':_0x1f826f['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0xff287c['bind']('isOn')['to'](_0x5d4ef0,'isVisible'),_0xff287c['bind']('isEnabled')['to'](this,'isEnabled'),_0xff287c['on']('execute',()=>{_0x5d4ef0['isVisible']=!_0x5d4ef0['isVisible'],_0x5d4ef0['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x5cb1ab=()=>{_0x13a027['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x48fdd7=new st(this['queryView']['fieldView']['element']),_0x5690b6=_0x48fdd7['width'],_0x2c8451='rtl'===_0x350cb4['uiLanguageDirection']?'left':'right';_0x48fdd7['excludeScrollbarsAndBorders'](),_0xff287c['element']['style'][_0x2c8451]=_0x5690b6-_0x48fdd7['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x5cb1ab),this['on']('render',_0x5cb1ab),_0xff287c;}['submit'](){const _0x288518=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x288518);}['focus'](_0x231449){-0x1===_0x231449?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x34fb76){super(_0x34fb76),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x34fb76,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x1e1860=0x0;for(const _0x355f77 of this['items'])_0x1e1860+=_0x355f77['items']['length'];return{'resultsCount':_0x1e1860,'totalItemsCount':_0x1e1860};}['_createClearHistoryButton'](){const _0x1b4003=this['locale'],_0x434f4f=new _0x58f273(this['locale']);return _0x434f4f['set']({'label':'('+i(_0x1b4003,'Clear')+')','withText':!0x0}),_0x434f4f['on']('execute',()=>this['fire']('clearHistory')),_0x434f4f;}}class hs extends _0x5ef314{constructor(_0xb58eca){super();const _0x3cc714=new te(),_0x1d6344=new _0x58f273(this['locale'],_0x3cc714);this['children']['add'](_0x1d6344),_0x1d6344['set']({'label':_0xb58eca['prompt'],'withText':!0x0}),_0x1d6344['on']('execute',()=>{this['fire']('execute',{'value':_0x584ead(_0xb58eca['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x471979{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x48fa59,_0x427197)=>{const _0x41de03=Ss(_0x427197['prompt']);for(const _0x2c199e of this)if(_0x2c199e!=_0x427197&&Ss(_0x2c199e['prompt'])===_0x41de03){this['remove'](_0x2c199e);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x5bf81f=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x5bf81f));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x1ffb35=>_0x1ffb35)));}}function Ss(_0x524a0c){return _0x524a0c['toLowerCase']()['trim']();}class K extends _0x2c75cb{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x569037,_0x30a490,_0x49ab30=''){super(_0x569037),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',x['REPLACE']),this['_promptHistory']=new os(),this['errorView']=new tt(_0x569037),this['contentArea']=new W(_0x569037,_0x49ab30),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new _0xed408f(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0x45e84e({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x161d13=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x30a490],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x161d13['if']('isError','ck-hidden',_0x344249=>!_0x344249)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x5977e4=0x1){-0x1===_0x5977e4?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0xc63cc4=this['locale'],_0x29cc8e=new ht(_0xc63cc4,{'queryView':{'label':i(_0xc63cc4,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x172481,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0xc63cc4,'Empty\x20history'),'secondary':i(_0xc63cc4,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x29cc8e['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1e6595,_0x28f8f2)=>_0x1e6595&&!_0x28f8f2),this['listenTo'](_0x29cc8e,'submit',(_0x3621ff,_0x48d45e)=>{this['prompt']=_0x48d45e;const _0x589799=_0x201397(_0x48d45e);this['fire']('submitPrompt',_0x589799),_0x48d45e['trim']()&&this['_promptHistory']['add']({'prompt':_0x589799},0x0);},{'priority':'high'}),_0x29cc8e;}['_createHistoryView'](){const _0x59b418=new rs(this['locale']);return _0x59b418['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x59b418['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x59b418;}['_createToolbar'](){const _0x1dc3ca=new nt(this['locale']);return _0x1dc3ca['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x36e18f,_0x107fc6,_0xdb77e2)=>_0x36e18f&&!_0x107fc6&&!!_0xdb77e2),_0x1dc3ca['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x1dc3ca['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x210cde,_0x25d3c3,_0x5b3c90)=>_0x210cde&&!_0x25d3c3&&!!_0x5b3c90),_0x1dc3ca['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x1dc3ca['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1f71d8,_0x103b52)=>_0x1f71d8&&!_0x103b52),_0x1dc3ca['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x1dc3ca['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x1dc3ca['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x1dc3ca;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x43782c=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x43782c,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x4b3ea8){const _0x5c743a=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x4b3ea8||i(_0x5c743a,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var E='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const j=globalThis['DataTransfer'];class n extends _0x112e8c{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5a8d15,a,v,_0x489f1b];}constructor(_0x364b4a){super(_0x364b4a),_0x364b4a['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x364b4a['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x364b4a['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x364b4a['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x251158}=this;this['_aiAdapter']=_0x251158['plugins']['get'](v),this['_dialog']=_0x251158['plugins']['get'](_0x489f1b),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0xf1678=new y(_0x251158,Array['from'](this['_commandDefinitions']['values']()));_0x251158['commands']['add']('showAIAssistant',_0xf1678),_0x251158['ui']['componentFactory']['add']('aiCommands',_0x3e5a29=>{const _0x3cde34=_0xef42bc(_0x3e5a29);return _0x3cde34['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x3cde34['buttonView']['set']({'label':i(_0x3e5a29,'AI\x20Commands'),'icon':E,'tooltip':!0x0}),_0x3cde34['on']('execute',_0x377d6f=>this['_onExecute'](_0x377d6f['source']['id'])),_0x49ed60(_0x3cde34,_0x251158['ui']['view']['body'],function(_0x298427){const _0x157bdc=o(_0x298427['config']['get']('ai.aiAssistant.commands'),_0x298427['locale']),_0x23e9f3=B(_0x298427,_0x157bdc)['filter'](_0x31f499=>_0x31f499['commands']['length']);if(0x1===_0x23e9f3['length'])return B(_0x298427,_0x23e9f3[0x0]['commands'])['map'](_0x3df3c1=>({'id':_0x3df3c1['id'],'label':_0x3df3c1['label']}));return _0x23e9f3['map'](_0x3513af=>{const {groupId:_0x22b661,groupLabel:_0x53b43e,commands:_0x3becd9}=_0x3513af,_0x39ef9b=B(_0x298427,_0x3becd9)['map'](_0x59e8a4=>({'id':_0x59e8a4['id'],'label':_0x59e8a4['label']}));return{'id':_0x22b661,'menu':_0x53b43e||_0x22b661,'children':_0x39ef9b};});}(_0x251158),{'ariaLabel':i(_0x3e5a29,'AI\x20Commands')}),_0x3cde34['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0xf1678['on']('change:enabledCommandsIds',_0x4e1c40),_0x3cde34['menuView']['once']('render',_0x4e1c40),_0x3cde34;function _0x4e1c40(){_0x3cde34['isEnabled']=_0xf1678['enabledCommandsIds']['length']>0x0;for(const _0x490855 of _0x3cde34['menuView']['buttons'])_0x490855['isEnabled']=_0xf1678['enabledCommandsIds']['includes'](_0x490855['id']);}}),_0x251158['ui']['componentFactory']['add']('menuBar:aiCommands',_0x4640a9=>{const _0x48657e=new _0x26c46d(_0x4640a9);_0x48657e['buttonView']['set']({'label':i(_0x4640a9,'AI\x20Commands'),'icon':E}),_0x48657e['bind']('isEnabled')['to'](_0xf1678,'enabledCommandsIds',_0x276f37=>_0x276f37['length']>0x0);const _0x3e2433=o(_0x251158['config']['get']('ai.aiAssistant.commands'),_0x4640a9);return this['_populateMenuBarMenu'](_0xf1678,_0x48657e,_0x3e2433,_0x11879e=>this['_onExecute'](_0x11879e)),_0x48657e;}),_0x251158['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x4d738e=this['_createAIAssistantUIButton'](_0x58f273);return _0x4d738e['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x4d738e;}),_0x251158['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x7a783b=this['_createAIAssistantUIButton'](_0x335f6e);return _0x7a783b['set']({'role':'menuitemcheckbox'}),_0x7a783b;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2e68ce=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x494ec8;for(const _0x166025 in _0x2e68ce){const _0x8c6a83=_0x166025,_0x5595c9=_0x2e68ce[_0x8c6a83];if('aiLicenseKeyValid'==_0x5595c9||'aiLicenseKeyInvalid'==_0x5595c9||'aiLicenseKeyExpired'==_0x5595c9||'aiLicenseKeyDomainLimit'==_0x5595c9||'aiLicenseKeyNotAllowed'==_0x5595c9||'aiLicenseKeyEvaluationLimit'==_0x5595c9||'aiLicenseKeyTrialLimit'==_0x5595c9||'aiLicenseKeyDevelopmentLimit'==_0x5595c9||'aiLicenseKeyUsageLimit'==_0x5595c9){delete _0x2e68ce[_0x8c6a83],_0x494ec8=_0x5595c9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x494ec8&&_0x2e68ce['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x494ec8&&_0x2e68ce['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x494ec8&&_0x2e68ce['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x494ec8&&_0x2e68ce['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x494ec8&&_0x2e68ce['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x494ec8&&_0x2e68ce['_showLicenseError']('trialLimit'),'aiLicenseKeyDevelopmentLimit'==_0x494ec8&&_0x2e68ce['_showLicenseError']('developmentLimit'),'aiLicenseKeyUsageLimit'==_0x494ec8&&_0x2e68ce['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x2ce980='',_0x39eb7d='',_0x7e8744='custom'){const _0x1051e6=this['editor'],_0x5d2b44=_0x1051e6['editing']['view'],_0x5ee46b=_0x1051e6['plugins']['get'](a),_0x29a93f=_0x1051e6['plugins']['get'](_0x5a8d15);_0x5ee46b['showFakeVisualSelection']();const _0x520435=new j(),_0x41dbd9=new ClipboardEvent('copy',{'clipboardData':_0x520435}),_0x5ba0a4=new _0x4e5dbd(_0x520435),_0x20e4ee=new _0x511d02(_0x5d2b44,_0x41dbd9,{'dataTransfer':_0x5ba0a4});_0x29a93f['_forceMarkersCopy']('comment',()=>{_0x5d2b44['document']['fire']('copy',_0x20e4ee);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new C(_0x1051e6,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x10e6a2=_0x5ba0a4['getData']('text/html');const _0x2bbfd6=_0x1051e6['model']['document']['selection'],_0x18c7de=Array['from'](_0x2bbfd6['getRanges']());0x1===_0x18c7de['length']&&_0x18c7de[0x0]['isFlat']&&!_0x2bbfd6['getSelectedElement']()&&''!==_0x10e6a2['replace'](/&nbsp;/g,'')['trim']()&&(_0x10e6a2='<p>'+_0x10e6a2+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x7e8744,'query':_0x2ce980,'htmlContent':_0x10e6a2,'label':_0x39eb7d,'mainActionLabel':x[_0x1051e6['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':at['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x3f4ae1['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x5ee46b['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0xf23324=new Map(),_0x496086=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x276dc4 of _0x496086)for(const _0x543228 of _0x276dc4['commands'])_0xf23324['set'](_0x543228['id'],{..._0x543228,'groupId':_0x276dc4['groupId'],'groupLabel':_0x276dc4['groupLabel']||_0x276dc4['groupId']});return _0xf23324;}['_createAIAssistantUIButton'](_0x1d5e7c){const _0x545495=this['editor'],_0x555125=_0x545495['commands']['get']('showAIAssistant'),_0x53fd26=new _0x1d5e7c(_0x545495['locale']);return _0x53fd26['set']({'label':i(_0x545495['locale'],'AI\x20Assistant'),'icon':at['robotPencil'],'isToggleable':!0x0}),_0x53fd26['bind']('isEnabled')['to'](_0x555125),_0x53fd26['bind']('isOn')['to'](this['_dialog'],'id',_0x3d0175=>'aiAssistant'===_0x3d0175),this['listenTo'](_0x53fd26,'execute',()=>{_0x53fd26['isOn']?this['hideUI']():_0x555125['execute']();}),_0x53fd26;}['_initView'](){const _0x1151c7=this['editor']['plugins']['get'](a);this['_formView']=new K(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x1151c7['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x1151c7['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x4b8ce3,ui:{ariaLiveAnnouncer:_0x2d53b1}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x34e70d,_0x32f664,_0x208e61)=>{const _0x59f83e=this['_aiAssistantController']['currentContext'];_0x208e61?_0x2d53b1['announce'](i(_0x4b8ce3,'AI\x20is\x20writing')):_0x59f83e&&_0x2d53b1['announce'](i(_0x4b8ce3,'Generated\x20content:\x20%0',_0x59f83e),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x28e113,_0x3dcfb4,_0x3b4cbb)=>{if(_0x3b4cbb){const _0x3868e9=this['_formView']['errorView']['text'];_0x2d53b1['announce'](i(_0x4b8ce3,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x3868e9));}});}['_onExecute'](_0x51e017){const _0x4285f6=this['_commandDefinitions']['get'](_0x51e017),_0x1a926a=this['editor'],_0xca34b6=_0x1a926a['model']['document']['selection'],_0x5bd931=_0x1a926a['commands']['get']('showAIAssistant'),_0x265c8b=_0x1a926a['plugins']['get'](a),_0x3f33eb=''+(_0x4285f6['groupId']!==I?_0x4285f6['groupLabel']+':\x20':'')+_0x4285f6['label'];if(!0x1!==_0x4285f6['requiresContent']&&_0xca34b6['isCollapsed']){const _0x50545c=_0x3def0b(_0xca34b6['getSelectedBlocks']())||_0x1a926a['model']['schema']['getLimitElement'](_0xca34b6);_0x1a926a['model']['change'](_0xea2029=>{_0xea2029['setSelection'](_0x50545c,'in');});}_0x265c8b['showFakeVisualSelection'](),_0x5bd931['execute'](_0x4285f6['prompt'],_0x3f33eb,'command:'+_0x51e017);}['_populateMenuBarMenu'](_0x32b6f0,_0x44ad55,_0x583586,_0x3c3242){const _0x3c70db=this['editor'],_0x1aa3ed=_0x3c70db['locale'],_0x4538f1=new _0x5cd8e2(_0x1aa3ed),_0x4a1775=B(_0x3c70db,_0x583586)['filter'](_0x2c7166=>_0x2c7166['commands']['length']);0x1===_0x4a1775['length']?this['_getMenuBarGroupButtons']({'command':_0x32b6f0,'commands':_0x4a1775[0x0]['commands'],'parentMenuView':_0x44ad55,'onExecute':_0x3c3242})['forEach'](_0x780994=>_0x4538f1['items']['add'](_0x780994)):_0x4a1775['forEach'](({groupId:_0x232bb3,groupLabel:_0x51384c,commands:_0x37737e})=>{const _0x449f63=new _0x1ce200(_0x1aa3ed,_0x44ad55),_0x5ab004=new _0x26c46d(_0x1aa3ed),_0x3e6a75=new _0x5cd8e2(_0x1aa3ed),_0x1593d0=this['_getMenuBarGroupButtons']({'command':_0x32b6f0,'commands':_0x37737e,'parentMenuView':_0x5ab004,'onExecute':_0x3c3242});_0x5ab004['buttonView']['set']({'label':_0x51384c||_0x232bb3}),_0x5ab004['delegate']('execute')['to'](_0x44ad55),_0x3e6a75['items']['addMany'](_0x1593d0),_0x5ab004['panelView']['children']['add'](_0x3e6a75),_0x449f63['children']['add'](_0x5ab004),_0x4538f1['items']['add'](_0x449f63);}),_0x44ad55['panelView']['children']['add'](_0x4538f1);}['_getMenuBarGroupButtons']({command:_0x25ec29,commands:_0x296de3,parentMenuView:_0x4e424b,onExecute:_0x5070cf}){const _0x4852ea=this['editor'],_0x5d71c5=_0x4852ea['locale'];return B(_0x4852ea,_0x296de3)['map'](_0x3e8e8e=>{const _0x14672a=new _0x1ce200(_0x5d71c5,_0x4e424b),_0x4efa76=new _0x335f6e(_0x5d71c5);return _0x4efa76['set']({'label':_0x3e8e8e['label']}),_0x4efa76['delegate']('execute')['to'](_0x4e424b),_0x4efa76['on']('execute',()=>_0x5070cf(_0x3e8e8e['id'])),_0x4efa76['bind']('isEnabled')['to'](_0x25ec29,'enabledCommandsIds',_0x3f30d8=>_0x3f30d8['includes'](_0x3e8e8e['id'])),_0x14672a['children']['add'](_0x4efa76),_0x14672a;});}}function _(_0x340113,_0x5d45f4){return void 0x0!==_0x340113['order']&&void 0x0===_0x5d45f4['order']?0x1:void 0x0===_0x340113['order']&&void 0x0!==_0x5d45f4['order']?-0x1:void 0x0!==_0x340113['order']&&void 0x0!==_0x5d45f4['order']?_0x340113['order']-_0x5d45f4['order']:0x0;}function B(_0x50e24d,_0x7b0783){_0x7b0783['sort'](_);const _0x303c99={},_0x1e3a93=[];for(const _0x47532b of _0x7b0783)if(void 0x0!==_0x47532b['order']){if(_0x47532b['order']in _0x303c99)throw new _0x392509('ai-commands-config-order-collision',_0x50e24d,{'conflictingDefinitions':[_0x47532b,_0x303c99[_0x47532b['order']]]});_0x303c99[_0x47532b['order']]=_0x47532b,_0x1e3a93['splice'](_0x47532b['order'],0x0,_0x47532b);}else _0x1e3a93['push'](_0x47532b);return _0x1e3a93;}class r extends _0x112e8c{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c1904){super(_0x4c1904);const _0x1ddf02=_0x4c1904['config'],_0x413ee4=_0x4c1904['locale'];_0x1ddf02['define']('ai.aiAssistant.commands',function(_0x386ddb){return[{'groupId':'editOrReview','groupLabel':i(_0x386ddb,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x386ddb,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x386ddb,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x386ddb,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x386ddb,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x386ddb,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x386ddb,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x386ddb,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x386ddb,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x386ddb,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x386ddb,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x386ddb,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x386ddb,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x386ddb,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x386ddb,'Change\x20style'),'commands':[{'id':'business','label':i(_0x386ddb,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x386ddb,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x386ddb,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x386ddb,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x386ddb,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x386ddb,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x386ddb,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x386ddb,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x386ddb,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x386ddb,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x386ddb,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x386ddb,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x386ddb,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x413ee4)),_0x1ddf02['define']('ai.aiAssistant.extraCommandGroups',[]),_0x1ddf02['define']('ai.aiAssistant.removeCommands',[]);const _0x2d445c=o(_0x1ddf02['get']('ai.aiAssistant.commands'),_0x413ee4),_0x2dfed9=_0x1ddf02['get']('ai.aiAssistant.extraCommandGroups'),_0x3ec6b1=_0x1ddf02['get']('ai.aiAssistant.removeCommands');_0x2dfed9['forEach'](_0x59dcac=>{const _0x24eb7b=_0x2d445c['find'](_0x1617f2=>_0x1617f2['groupId']===_0x59dcac['groupId']);_0x24eb7b?_0x24eb7b['commands']=_0x24eb7b['commands']['concat'](_0x59dcac['commands']):_0x2d445c['push'](_0x59dcac);}),_0x2d445c['forEach'](_0x3884ca=>{_0x3884ca['commands']=_0x3884ca['commands']['filter'](_0x35cecb=>!_0x3ec6b1['includes'](_0x35cecb['id']));}),_0x1ddf02['set']('ai.aiAssistant.commands',_0x2d445c);}}class P extends _0x112e8c{['abortController'];static get['requires'](){return[v];}constructor(_0x464024){super(_0x464024),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](v)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x38e6c0){return this['sendRequest'](_0x38e6c0)['catch'](_0x1bcafa=>{if(_0x1bcafa instanceof R)return Promise['reject'](_0x1bcafa);if('AbortError'==_0x1bcafa['name'])return Promise['resolve']();throw console['error'](_0x1bcafa),new _0x392509('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x28870d,_0x3bfded){const _0x452bb2=this['editor']['locale'],_0x194698={'Content-Type':'application/json'};if('object'==typeof _0x28870d)Object['assign'](_0x194698,_0x28870d);else{if(_0x28870d)try{const _0x5219e5=await _0x28870d(_0x3bfded);Object['assign'](_0x194698,_0x5219e5);}catch(_0x1ad27d){return Promise['reject'](new R(i(_0x452bb2,'AI_ERROR_GET_HEADERS')));}}return _0x194698;}async['_prepareRequestParameters'](_0x122385,_0x12f789){const _0xb25255=this['editor']['locale'];if('object'==typeof _0x122385)return _0x122385;try{return await _0x122385(_0x12f789);}catch(_0x3aeee9){return Promise['reject'](new R(i(_0xb25255,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x516148){super(_0x516148),_0x516148['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x516148['config']['get']('ai.openAI.requestParameters')||_0x516148['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x516148['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x516148['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x516148['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x49a3c1,context:_0x3f4d91,onData:_0x598ade,actionId:_0x2d8a7b}){const _0x2cf537=this['editor']['locale'],_0x262417=await this['prepareMessages'](_0x49a3c1,_0x3f4d91,_0x2d8a7b),_0x4d7640=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x2d8a7b),_0x5b25b3=await this['_prepareRequestParameters'](this['_requestParameters'],_0x2d8a7b),_0x2bc1a5={'messages':_0x262417,..._0x5b25b3},_0x52e40e={'method':'POST','headers':_0x4d7640,'body':JSON['stringify'](_0x2bc1a5),'signal':this['abortController']['signal']},_0x5edd2b=await fetch(this['_apiUrl'],_0x52e40e);if(_0x5edd2b['ok'])return _0x5b25b3['stream']?await this['_readStreamableResponse'](_0x5edd2b,_0x598ade):await this['_readStaticResponse'](_0x5edd2b,_0x598ade),Promise['resolve']();{const _0x21b9dc=await _0x5edd2b['text']();return _0x21b9dc['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x2cf537,'AI_ERROR_CONTEXT_LENGTH'))):_0x21b9dc['includes']('Moderation')?Promise['reject'](new R(i(_0x2cf537,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x21b9dc));}}async['prepareMessages'](_0x5259f2,_0x391a32,_0x2500dd){let _0x124694,_0x3fffad;return _0x391a32?(_0x124694='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x3fffad='Instruction:\x0a'+_0x5259f2+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x391a32):(_0x124694='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x3fffad=_0x5259f2),[{'role':'system','content':_0x124694},{'role':'user','content':_0x3fffad}];}async['_readStreamableResponse'](_0x5aba74,_0x5173a1){const _0x3f8bba=_0x5aba74['body']['getReader'](),_0x477d34=new TextDecoder();let _0x2a3306='',_0x5193f1='',_0x4ff565='',_0x53f009=!0x1;for(;!_0x53f009;){const {done:_0x5e4107,value:_0x5d92bb}=await _0x3f8bba['read'](),_0x56bd3a=_0x2a3306+_0x477d34['decode'](_0x5d92bb);let _0x48988b='';_0x53f009=_0x5e4107;try{_0x48988b=this['_cleanUpData'](_0x56bd3a),_0x2a3306='';}catch(_0x18b35e){_0x2a3306=_0x56bd3a;continue;}_0x5193f1+=_0x48988b,!_0x53f009&&this['_isBufferIncomplete'](_0x5193f1)||_0x5193f1&&(_0x4ff565+=_0x5193f1,_0x5193f1='',_0x5173a1(_0x4ff565));}return Promise['resolve']();}async['_readStaticResponse'](_0x17ccd4,_0x1e0689){return _0x1e0689((await _0x17ccd4['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x48e07c){const _0x430f4b=_0x48e07c['split']('<')['length']!==_0x48e07c['split']('>')['length'],_0x3210b8=_0x48e07c['length']<0x1e;return _0x430f4b&&_0x3210b8;}['_cleanUpData'](_0x5e7a3d){return _0x5e7a3d['split'](/\n(?![^{]*\})/g)['map'](_0x1ea7e1=>_0x1ea7e1['replace']('data:\x20',''))['filter'](_0x3dbeac=>_0x3dbeac&&_0x3dbeac['length']>0x0&&'[DONE]'!==_0x3dbeac)['map'](_0x1bcb93=>{const {choices:_0x4a50c0}=JSON['parse'](_0x1bcb93);if(_0x4a50c0[0x0]&&_0x4a50c0[0x0]['delta']&&_0x4a50c0[0x0]['delta']['content'])return _0x4a50c0[0x0]['delta']['content'];})['filter'](_0x42f94c=>_0x42f94c)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x58035c){super(_0x58035c),_0x58035c['config']['get']('ai.aws.requestParameters')||_0x58035c['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x58035c['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x58035c['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x58035c['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x58035c['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x35ce13,context:_0x1690fd,onData:_0x49504e,actionId:_0x257a1d}){const {model:_0x314381,stream:_0x866d96,..._0x2c2708}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x257a1d),_0x2ed24f={'prompt':await this['preparePrompt'](_0x35ce13,_0x1690fd,_0x314381,_0x257a1d),..._0x2c2708};this['_apiUrl']?await this['_processProxyRequest'](_0x2ed24f,_0x314381,_0x866d96,_0x49504e,_0x257a1d):await this['_processAWSRequest'](_0x2ed24f,_0x314381,_0x866d96,_0x49504e);}async['preparePrompt'](_0x5346ab,_0x5650ae,_0x5ce865,_0x2bd56b){let _0x3e3699,_0x86b07;return _0x5650ae?(_0x3e3699='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x86b07='Instruction:\x0a'+_0x5346ab+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5650ae):(_0x3e3699='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x86b07=_0x5346ab),'meta.llama'==this['getModelFamily'](_0x5ce865)?'<<SYS>>\x0a'+_0x3e3699+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x86b07+'\x0a[/INST]':'Human:\x0a'+_0x3e3699+'\x0a'+_0x86b07+'\x0a\x0aAssistant:';}['getModelFamily'](_0x47b561){if(/^anthropic\.claude/['test'](_0x47b561))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x47b561))return'ai21.j2';if(/^cohere\.command/['test'](_0x47b561))return'cohere.command';if(/^meta\.llama/['test'](_0x47b561))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x47b561));}async['_processProxyRequest'](_0x414473,_0x169e1e,_0x20d28f,_0x1a75b6,_0x48ff2c){const _0x39e2af={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x48ff2c),'body':JSON['stringify']({..._0x414473,'model':_0x169e1e,'stream':_0x20d28f}),'signal':this['abortController']['signal']},_0x462e45=await fetch(this['_apiUrl'],_0x39e2af);_0x20d28f?await this['_readStreamableResponse'](_0x462e45,_0x169e1e,_0x1a75b6):await this['_readStaticResponse'](_0x462e45,_0x169e1e,_0x1a75b6);}async['_processAWSRequest'](_0x21bc6a,_0x51d1e9,_0x46654d,_0x495722){const _0x1c1885=new _0x4a8a89(this['_bedrockClientConfig']),_0x5c2ee2={'body':JSON['stringify'](_0x21bc6a),'contentType':'application/json','accept':'application/json','modelId':_0x51d1e9};let _0x436a72;if(_0x46654d){const _0x2ac1e1=new _0x53dd86(_0x5c2ee2);_0x436a72=await _0x1c1885['send'](_0x2ac1e1,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x436a72,_0x51d1e9,_0x495722);}else{const _0x210608=new _0x5754c1(_0x5c2ee2);_0x436a72=await _0x1c1885['send'](_0x210608,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x436a72,_0x51d1e9,_0x495722);}}async['_readAsyncIterableResponse'](_0x380be0,_0x1d1ef9,_0x4e287e){const _0x391f14=_0x380be0['body'],_0x2f6e21=new TextDecoder('utf-8');let _0x573200='';for await(const _0x176224 of _0x391f14)if(_0x176224['chunk']){const _0x97457c=_0x2f6e21['decode'](_0x176224['chunk']['bytes']),_0x51af4c=JSON['parse'](_0x97457c);_0x573200+=this['_getGeneratedText'](_0x51af4c,_0x1d1ef9),_0x4e287e(_0x573200);}return Promise['resolve']();}async['_readStreamableResponse'](_0x5c5fbe,_0x1cf803,_0x5a183b){const _0x58c126=_0x5c5fbe['body'],_0x3156e0=new TextDecoder('utf-8'),_0x2a1d45=_0x58c126['getReader']();let _0x5131db='',_0x2dda6e='',_0x3d8df5=!0x1;for(;!_0x3d8df5;){const {done:_0x2af110,value:_0x8d86ee}=await _0x2a1d45['read']();if(_0x3d8df5=_0x2af110,_0x3d8df5)break;const _0x28f0f0=(_0x5131db+_0x3156e0['decode'](_0x8d86ee))['split']('\x0a')['map'](_0x236687=>{try{return _0x5131db='',JSON['parse'](_0x236687);}catch(_0x2d05d2){return _0x5131db=_0x236687,null;}})['filter'](_0x1bf300=>null!==_0x1bf300);_0x28f0f0['length']&&(_0x2dda6e+=_0x28f0f0['map'](_0x2e9f69=>this['_getGeneratedText'](_0x2e9f69,_0x1cf803))['join'](''),_0x5a183b(_0x2dda6e));}return Promise['resolve']();}async['_readStaticResponse'](_0x1ba133,_0x292166,_0x5d9e50){let _0x144d3a;return _0x144d3a=_0x1ba133 instanceof Response?await _0x1ba133['json']():JSON['parse'](Buffer['from'](_0x1ba133['body'])['toString']('utf8')),(_0x5d9e50(this['_getGeneratedText'](_0x144d3a,_0x292166)),Promise['resolve']());}['_getGeneratedText'](_0x2c33a1,_0x244ee9){switch(this['getModelFamily'](_0x244ee9)){case'anthropic.claude':return _0x2c33a1['completion'];case'ai21.j2':return _0x2c33a1['completions'][0x0]['data']['text'];case'cohere.command':return _0x2c33a1['generations'][0x0]['text'];case'meta.llama':return _0x2c33a1['generation'];}}}export{v as AIAdapter,r as AIAssistant,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
@@ -4,6 +4,6 @@
4
4
  */
5
5
  /**
6
6
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
8
  */
9
9
  export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x98eeaa=>0x1!=_0x98eeaa}};
23
+ export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x36e1b8=>0x1!=_0x36e1b8}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x2a180f=>{const {af:{dictionary:_0x196502,getPluralForm:_0x5d53b9}}={'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x5753a3=>0x1!=_0x5753a3}};_0x2a180f['af']||={'dictionary':{},'getPluralForm':null},_0x2a180f['af']['dictionary']=Object['assign'](_0x2a180f['af']['dictionary'],_0x196502),_0x2a180f['af']['getPluralForm']=_0x5d53b9;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x55a126=>{const {af:{dictionary:_0xaf13bd,getPluralForm:_0x5bb329}}={'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x2ebe86=>0x1!=_0x2ebe86}};_0x55a126['af']||={'dictionary':{},'getPluralForm':null},_0x55a126['af']['dictionary']=Object['assign'](_0x55a126['af']['dictionary'],_0xaf13bd),_0x55a126['af']['getPluralForm']=_0x5bb329;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x31173d=>0x0==_0x31173d?0x0:0x1==_0x31173d?0x1:0x2==_0x31173d?0x2:_0x31173d%0x64>=0x3&&_0x31173d%0x64<=0xa?0x3:_0x31173d%0x64>=0xb?0x4:0x5}};
23
+ export default{'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x58073f=>0x0==_0x58073f?0x0:0x1==_0x58073f?0x1:0x2==_0x58073f?0x2:_0x58073f%0x64>=0x3&&_0x58073f%0x64<=0xa?0x3:_0x58073f%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x1baf66=>{const {ar:{dictionary:_0x58e1ca,getPluralForm:_0x97de5e}}={'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x53d286=>0x0==_0x53d286?0x0:0x1==_0x53d286?0x1:0x2==_0x53d286?0x2:_0x53d286%0x64>=0x3&&_0x53d286%0x64<=0xa?0x3:_0x53d286%0x64>=0xb?0x4:0x5}};_0x1baf66['ar']||={'dictionary':{},'getPluralForm':null},_0x1baf66['ar']['dictionary']=Object['assign'](_0x1baf66['ar']['dictionary'],_0x58e1ca),_0x1baf66['ar']['getPluralForm']=_0x97de5e;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x4e8811=>{const {ar:{dictionary:_0x472f1b,getPluralForm:_0x494c3d}}={'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x2e7ca0=>0x0==_0x2e7ca0?0x0:0x1==_0x2e7ca0?0x1:0x2==_0x2e7ca0?0x2:_0x2e7ca0%0x64>=0x3&&_0x2e7ca0%0x64<=0xa?0x3:_0x2e7ca0%0x64>=0xb?0x4:0x5}};_0x4e8811['ar']||={'dictionary':{},'getPluralForm':null},_0x4e8811['ar']['dictionary']=Object['assign'](_0x4e8811['ar']['dictionary'],_0x472f1b),_0x4e8811['ar']['getPluralForm']=_0x494c3d;})(window['CKEDITOR_TRANSLATIONS']||={});