@ckeditor/ckeditor5-ai 45.2.1 → 46.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +16 -11
  150. package/src/adapters/aiadapter.d.ts +2 -2
  151. package/src/adapters/aiadapter.js +1 -1
  152. package/src/adapters/aitextadapter.d.ts +4 -4
  153. package/src/adapters/aitextadapter.js +1 -1
  154. package/src/adapters/awstextadapter.d.ts +7 -7
  155. package/src/adapters/awstextadapter.js +1 -1
  156. package/src/adapters/openaitextadapter.d.ts +6 -7
  157. package/src/adapters/openaitextadapter.js +1 -1
  158. package/src/aiassistant.d.ts +11 -11
  159. package/src/aiassistant.js +1 -1
  160. package/src/aiassistantediting.d.ts +3 -3
  161. package/src/aiassistantediting.js +1 -1
  162. package/src/aiassistantui.d.ts +3 -3
  163. package/src/aiassistantui.js +1 -1
  164. package/src/aiconfig.d.ts +4 -4
  165. package/src/augmentation.d.ts +6 -6
  166. package/src/index.d.ts +9 -6
  167. package/src/index.js +1 -1
  168. package/src/legacyerrors.js +1 -1
  169. package/src/ui/aiassistantcontroller.d.ts +3 -3
  170. package/src/ui/aiassistantcontroller.js +2 -2
  171. package/src/ui/form/aiformcontentarea.d.ts +1 -1
  172. package/src/ui/form/aiformcontentarea.js +1 -1
  173. package/src/ui/form/aiformerrorview.d.ts +1 -1
  174. package/src/ui/form/aiformerrorview.js +1 -1
  175. package/src/ui/form/aiformpromptview.d.ts +1 -1
  176. package/src/ui/form/aiformpromptview.js +1 -1
  177. package/src/ui/form/aiformtoolbarview.d.ts +1 -1
  178. package/src/ui/form/aiformtoolbarview.js +1 -1
  179. package/src/ui/form/aiformview.d.ts +5 -5
  180. package/src/ui/form/aiformview.js +1 -1
  181. package/src/ui/form/aihistorylistitemview.d.ts +1 -1
  182. package/src/ui/form/aihistorylistitemview.js +1 -1
  183. package/src/ui/form/aihistorylistview.d.ts +1 -1
  184. package/src/ui/form/aihistorylistview.js +1 -1
  185. package/src/ui/form/prompthistory.d.ts +1 -1
  186. package/src/ui/form/prompthistory.js +1 -1
  187. package/src/ui/showaiassistantcommand.d.ts +3 -3
  188. package/src/ui/showaiassistantcommand.js +1 -1
  189. package/src/utils/common-translations.js +1 -1
  190. package/src/utils/normalizecommandsconfig.d.ts +2 -2
  191. package/src/utils/normalizecommandsconfig.js +1 -1
package/dist/index.js CHANGED
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x58c284,Command as _0x235131}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x4af1a4,IconCheck as _0xe93727,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x33d94a,IconRobotPencil as _0x56f6bc}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x5f1dae,CKEditorError as _0x26f180,ObservableMixin as _0x79355d,global as _0x88f13d,isVisible as ot,Rect as it,Collection as _0x5eae86,FocusTracker as mt,KeystrokeHandler as ut,first as _0x52ab24}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x305138,View as _0x43b1d,SpinnerView as _0x136edd,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0x807586,createDropdown as _0x157fbc,addMenuToDropdown as _0x4fc12e,MenuBarMenuView as _0x40fff5,MenuBarMenuListItemButtonView as _0x59b48b,DialogViewPosition as _0x582549,MenuBarMenuListView as _0x257a1b,MenuBarMenuListItemView as _0x591844}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x37cfcc,ClipboardMarkersUtils as _0x20837e}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x4e37ac,DataTransfer as _0x3805b9,UpcastWriter as _0x41e201,Matcher as _0x574ccc}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x26893b,InvokeModelWithResponseStreamCommand as _0x1ed34e,InvokeModelCommand as _0x597627}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x2526c2,_0x230891){const _0x4699ff=(0x0,_0x230891['t'])('Other');return _0x2526c2['length']?'groupId'in _0x2526c2[0x0]?_0x2526c2:[{'groupId':x,'groupLabel':_0x4699ff,'order':0x1/0x0,'commands':_0x2526c2}]:[{'groupId':x,'groupLabel':_0x4699ff,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x58c284{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4426e1}=this,_0x5b1c92=['ck-fake-ai-selection'];_0x4426e1['config']['get']('ai.useTheme')&&_0x5b1c92['push']('ck-ai-assistant-ui_theme'),_0x4426e1['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x5b1c92,'priority':0xc}}),_0x4426e1['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x8c5d3f,{writer:_0x166dfe})=>{if(!_0x8c5d3f['markerRange']['isCollapsed'])return null;const _0x5bd482=_0x166dfe['createUIElement']('span');return _0x166dfe['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x5bd482),_0x5bd482;}});}['afterInit'](){!async function(_0x481c2b){const _0x22966f=_0x1bd3cf([0x39,0x72,0x58,0x32,0x41,0x30,0x66,0x45,0x56,0x36,0x49,0x4d,0x79,0x73,0x6e,0x31,0x35,0x6d,0x7a,0x71,0x68,0x67,0x34,0x59,0x76,0x6f,0x4b,0x33,0x52,0x63,0x50,0x54,0x65,0x4c,0x43,0x51,0x77,0x78,0x47,0x74,0x37,0x55,0x62,0x4f,0x57,0x69,0x48,0x4a,0x6b,0x42,0x38,0x61,0x75,0x4e,0x44,0x6a,0x70,0x6c,0x5a,0x46,0x64,0x53]),_0x252621=0x13aad356,_0x3c509c=0x13adb8fe^_0x252621,_0x101ddb=window[_0x1bd3cf([0x44,0x61,0x74,0x65])][_0x1bd3cf([0x6e,0x6f,0x77])](),_0xd410ae=_0x481c2b[_0x1bd3cf([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x502f26=new window[(_0x1bd3cf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x215c95=>{_0xd410ae[_0x1bd3cf([0x6f,0x6e,0x63,0x65])](_0x1bd3cf([0x72,0x65,0x61,0x64,0x79]),_0x215c95);}),_0x5b11fb={[_0x1bd3cf([0x6b,0x74,0x79])]:_0x1bd3cf([0x45,0x43]),[_0x1bd3cf([0x75,0x73,0x65])]:_0x1bd3cf([0x73,0x69,0x67]),[_0x1bd3cf([0x63,0x72,0x76])]:_0x1bd3cf([0x50,0x2d,0x32,0x35,0x36]),[_0x1bd3cf([0x78])]:_0x1bd3cf([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]),[_0x1bd3cf([0x79])]:_0x1bd3cf([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]),[_0x1bd3cf([0x61,0x6c,0x67])]:_0x1bd3cf([0x45,0x53,0x32,0x35,0x36])},_0x266974=_0xd410ae[_0x1bd3cf([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1bd3cf([0x67,0x65,0x74])](_0x1bd3cf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x10656f(){let _0x93a1,_0x5431bf=null,_0x730498=null;try{if(_0x266974==_0x1bd3cf([0x47,0x50,0x4c]))return _0x1bd3cf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x93a1=_0x1941ea(),!_0x93a1)return _0x1bd3cf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x93a1[_0x1bd3cf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x730498=_0x2f0c0a(_0x93a1[_0x1bd3cf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x93a1[_0x1bd3cf([0x6a,0x74,0x69])])),await _0x1868a2()?_0x20f257()?_0x328462()?_0x1bd3cf([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3b6286()?(_0x93a1[_0x1bd3cf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1bd3cf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5431bf=_0x2d7d8d(_0x1bd3cf([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x93a1[_0x1bd3cf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1bd3cf([0x74,0x72,0x69,0x61,0x6c])&&(_0x5431bf=_0x2d7d8d(_0x1bd3cf([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x132d41()):_0x1bd3cf([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1bd3cf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1bd3cf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1bd3cf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x328462(){const _0xdf5e73=[_0x1bd3cf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1bd3cf([0x74,0x72,0x69,0x61,0x6c])][_0x1bd3cf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x93a1[_0x1bd3cf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x101ddb/0x3e8:0xe10*_0x3c509c;return _0x93a1[_0x1bd3cf([0x65,0x78,0x70])]<_0xdf5e73;}function _0x20f257(){const _0xafaad6=_0x93a1[_0x1bd3cf([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xafaad6&&(!!_0xafaad6[_0x1bd3cf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1bd3cf([0x2a]))||!!_0xafaad6[_0x1bd3cf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1bd3cf([0x41,0x49])));}function _0x3b6286(){const _0x4bf98d=_0x93a1[_0x1bd3cf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bf98d||0x0==_0x4bf98d[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x490a31}=new URL(window[_0x1bd3cf([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bf98d[_0x1bd3cf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x490a31))return!0x0;const _0x2c93d1=_0x490a31[_0x1bd3cf([0x73,0x70,0x6c,0x69,0x74])](_0x1bd3cf([0x2e]));return _0x4bf98d[_0x1bd3cf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x26ff48=>_0x26ff48[_0x1bd3cf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1bd3cf([0x2a])))[_0x1bd3cf([0x6d,0x61,0x70])](_0x502cb4=>_0x502cb4[_0x1bd3cf([0x73,0x70,0x6c,0x69,0x74])](_0x1bd3cf([0x2e])))[_0x1bd3cf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xa73985=>_0xa73985[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2c93d1[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1bd3cf([0x6d,0x61,0x70])](_0x5d2828=>Array(_0x2c93d1[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5d2828[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1bd3cf([0x66,0x69,0x6c,0x6c])](_0x5d2828[0x0]===_0x1bd3cf([0x2a])?_0x1bd3cf([0x2a]):'')[_0x1bd3cf([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5d2828))[_0x1bd3cf([0x73,0x6f,0x6d,0x65])](_0x27ac34=>_0x2c93d1[_0x1bd3cf([0x65,0x76,0x65,0x72,0x79])]((_0x38b169,_0x2a6200)=>_0x27ac34[_0x2a6200]===_0x38b169||_0x27ac34[_0x2a6200]===_0x1bd3cf([0x2a])));}function _0x132d41(){return _0x5431bf&&_0x730498?new window[(_0x1bd3cf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x186df0,_0x5c0ae5)=>{_0x5431bf[_0x1bd3cf([0x74,0x68,0x65,0x6e])](_0x186df0,_0x5c0ae5),_0x730498[_0x1bd3cf([0x74,0x68,0x65,0x6e])](_0x32c0fd=>{_0x32c0fd!=_0x1bd3cf([0x56,0x61,0x6c,0x69,0x64])&&_0x186df0(_0x32c0fd);},_0x5c0ae5);}):_0x5431bf||_0x730498||_0x1bd3cf([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2f0c0a(_0x114e59,_0x148155){return new window[(_0x1bd3cf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x104ad7=>{if(_0x1b7e85())return _0x104ad7(_0x1bd3cf([0x56,0x61,0x6c,0x69,0x64]));_0x295a9d(),_0xd410ae[_0x1bd3cf([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1bd3cf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xaa7eac=!0x1;const _0x4cc25d=_0x5f1dae();function _0x33db1b(_0x275bf7){return!!_0x275bf7&&(typeof _0x275bf7===_0x1bd3cf([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x275bf7===_0x1bd3cf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x275bf7[_0x1bd3cf([0x74,0x68,0x65,0x6e])]===_0x1bd3cf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x275bf7[_0x1bd3cf([0x63,0x61,0x74,0x63,0x68])]===_0x1bd3cf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3354c0(_0xa879fd){_0x11c2f1(_0xa879fd)[_0x1bd3cf([0x74,0x68,0x65,0x6e])](_0x5c444e=>{if(!_0x5c444e||_0x5c444e[_0x1bd3cf([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1bd3cf([0x6f,0x6b]))return _0x1bd3cf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x31cb86(_0x5c38c1(_0x4cc25d+_0x148155))!=_0x5c444e[_0x1bd3cf([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1bd3cf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1bd3cf([0x56,0x61,0x6c,0x69,0x64]);})[_0x1bd3cf([0x74,0x68,0x65,0x6e])](_0x5f0168=>(_0xdbd2e(),_0x5f0168),()=>{const _0x428858=_0x24a186();return null==_0x428858?(_0xdbd2e(),_0x1bd3cf([0x56,0x61,0x6c,0x69,0x64])):_0x1bd3cf(_0x101ddb-_0x428858>(0x37a65756^_0x252621)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1bd3cf([0x74,0x68,0x65,0x6e])](_0x104ad7)[_0x1bd3cf([0x63,0x61,0x74,0x63,0x68])](()=>{_0x104ad7(_0x1bd3cf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x59f478=0x139c3dd6^_0x252621;function _0xdbd2e(){const _0xd58b25=_0x1bd3cf([0x6c,0x6c,0x63,0x74,0x2d])+_0x31cb86(_0x5c38c1(_0x114e59)),_0x2e9f53=_0x4a2e67(_0x31cb86(window[_0x1bd3cf([0x4d,0x61,0x74,0x68])][_0x1bd3cf([0x63,0x65,0x69,0x6c])](_0x101ddb/_0x59f478)));window[_0x1bd3cf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1bd3cf([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd58b25,_0x2e9f53);}function _0x24a186(){const _0x30d818=_0x1bd3cf([0x6c,0x6c,0x63,0x74,0x2d])+_0x31cb86(_0x5c38c1(_0x114e59)),_0x4e160c=window[_0x1bd3cf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1bd3cf([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30d818);return _0x4e160c?window[_0x1bd3cf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4a2e67(_0x4e160c),0x10)*_0x59f478:null;}function _0x11c2f1(_0x395675){return new window[(_0x1bd3cf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x88a2f4,_0x43bbaf)=>{_0x395675[_0x1bd3cf([0x74,0x68,0x65,0x6e])](_0x88a2f4,_0x43bbaf),window[_0x1bd3cf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x43bbaf,0x13ab0796^_0x252621);});}}_0xd410ae[_0x1bd3cf([0x6f,0x6e])](_0x1bd3cf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3ef0ec,_0x4fe150)=>{if(_0x4fe150[0x0]!=_0x114e59)return _0x104ad7(_0x1bd3cf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4fe150[0x1]={..._0x4fe150[0x1],[_0x1bd3cf([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4cc25d};},{[_0x1bd3cf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1bd3cf([0x68,0x69,0x67,0x68])}),_0xd410ae[_0x1bd3cf([0x6f,0x6e])](_0x1bd3cf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xede4db=>{_0x33db1b(_0xede4db[_0x1bd3cf([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xaa7eac=!0x0,_0x3354c0(_0xede4db[_0x1bd3cf([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1bd3cf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1bd3cf([0x6c,0x6f,0x77])}),_0x502f26[_0x1bd3cf([0x74,0x68,0x65,0x6e])](()=>{_0xaa7eac||_0x104ad7(_0x1bd3cf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1b7e85(){return _0xd410ae[_0x1bd3cf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1bd3cf([0x76,0x69,0x65,0x77])][_0x1bd3cf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1bd3cf([0x61,0x75,0x74,0x6f]);}function _0x295a9d(){_0xd410ae[_0x1bd3cf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1bd3cf([0x76,0x69,0x65,0x77])][_0x1bd3cf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1bd3cf([0x61,0x75,0x74,0x6f]);}}function _0x2d7d8d(_0x52666f){const _0x162307=[new window[(_0x1bd3cf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fb4ad=>setTimeout(_0x3fb4ad,0x13a3ed9a^_0x252621)),_0x502f26[_0x1bd3cf([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1bd3cf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x554ba6=>{let _0x4a8936=0x0;_0xd410ae[_0x1bd3cf([0x6d,0x6f,0x64,0x65,0x6c])][_0x1bd3cf([0x6f,0x6e])](_0x1bd3cf([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x243993,_0x674f8)=>{_0x674f8[0x0][_0x1bd3cf([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4a8936++,_0x4a8936==(0x13aad2ae^_0x252621)&&(_0x554ba6(),_0x243993[_0x1bd3cf([0x6f,0x66,0x66])]());});}))];return window[_0x1bd3cf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1bd3cf([0x72,0x61,0x63,0x65])](_0x162307)[_0x1bd3cf([0x74,0x68,0x65,0x6e])](()=>_0x52666f);}async function _0x20ab3a(){await _0x502f26,_0xd410ae[_0x1bd3cf([0x6d,0x6f,0x64,0x65,0x6c])][_0x1bd3cf([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1e18e0,_0xd410ae[_0x1bd3cf([0x6d,0x6f,0x64,0x65,0x6c])][_0x1bd3cf([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1e18e0,_0xd410ae[_0x1bd3cf([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1bd3cf([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1da261(_0x5740c5){const _0x1191e3=_0x21119f();_0xd410ae[_0x1191e3]=_0x1bd3cf([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5740c5,_0x5740c5!=_0x1bd3cf([0x56,0x61,0x6c,0x69,0x64])&&_0x20ab3a();}function _0x21119f(){const _0x8ec75d=window[_0x1bd3cf([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1bd3cf([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1bd3cf([0x6e,0x6f,0x77])]())[_0x1bd3cf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1bd3cf([0x2e]),'');let _0x37148e=_0x1bd3cf([0x72]);for(let _0x211794=0x0;_0x211794<_0x8ec75d[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x211794+=0x2){let _0x7bc02c=window[_0x1bd3cf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x8ec75d[_0x1bd3cf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x211794,_0x211794+0x2));_0x7bc02c>=_0x22966f[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x7bc02c-=_0x22966f[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x37148e+=_0x22966f[_0x7bc02c];}return _0x37148e;}function _0x1941ea(){const _0x193d79=_0x266974[_0x1bd3cf([0x73,0x70,0x6c,0x69,0x74])](_0x1bd3cf([0x2e]));if(0x3!=_0x193d79[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x538e73(_0x193d79[0x1]);function _0x538e73(_0x41dd7e){const _0x160890=_0xa402bf(_0x41dd7e);return _0x160890&&_0x1a0fd6()?_0x160890:null;function _0x1a0fd6(){const _0xb8248f=_0x160890[_0x1bd3cf([0x6a,0x74,0x69])],_0x4cd5ac=window[_0x1bd3cf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb8248f[_0x1bd3cf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xb8248f[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xef8b9a={..._0x160890,[_0x1bd3cf([0x6a,0x74,0x69])]:_0xb8248f[_0x1bd3cf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xb8248f[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xef8b9a[_0x1bd3cf([0x76,0x63])],_0x5c38c1(_0xef8b9a)==_0x4cd5ac;}}}async function _0x1868a2(){let _0x41589c=!0x0;try{const _0x27dd62=_0x266974[_0x1bd3cf([0x73,0x70,0x6c,0x69,0x74])](_0x1bd3cf([0x2e])),[_0x511392,_0x20f2c8,_0x29c44a]=_0x27dd62;return _0x112fd8(_0x511392),await _0x138d33(_0x511392,_0x20f2c8,_0x29c44a),_0x41589c;}catch{return!0x1;}function _0x112fd8(_0x4a2678){const _0x4fa229=_0xa402bf(_0x4a2678);_0x4fa229&&_0x4fa229[_0x1bd3cf([0x61,0x6c,0x67])]==_0x1bd3cf([0x45,0x53,0x32,0x35,0x36])||(_0x41589c=!0x1);}async function _0x138d33(_0x5adba6,_0x172c36,_0x9bb9da){const _0x4ea841=window[_0x1bd3cf([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1bd3cf([0x66,0x72,0x6f,0x6d])](_0x304888(_0x9bb9da),_0x2554bf=>_0x2554bf[_0x1bd3cf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x17183c=new window[(_0x1bd3cf([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1bd3cf([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5adba6+_0x1bd3cf([0x2e])+_0x172c36),_0x102084=window[_0x1bd3cf([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1bd3cf([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x102084)return;const _0x1efd45=await _0x102084[_0x1bd3cf([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1bd3cf([0x6a,0x77,0x6b]),_0x5b11fb,{[_0x1bd3cf([0x6e,0x61,0x6d,0x65])]:_0x1bd3cf([0x45,0x43,0x44,0x53,0x41]),[_0x1bd3cf([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1bd3cf([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1bd3cf([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x102084[_0x1bd3cf([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1bd3cf([0x6e,0x61,0x6d,0x65])]:_0x1bd3cf([0x45,0x43,0x44,0x53,0x41]),[_0x1bd3cf([0x68,0x61,0x73,0x68])]:{[_0x1bd3cf([0x6e,0x61,0x6d,0x65])]:_0x1bd3cf([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1efd45,_0x4ea841,_0x17183c)||(_0x41589c=!0x1);}}function _0xa402bf(_0x361060){return _0x361060[_0x1bd3cf([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1bd3cf([0x65,0x79]))?JSON[_0x1bd3cf([0x70,0x61,0x72,0x73,0x65])](_0x304888(_0x361060)):null;}function _0x304888(_0x315ed3){return window[_0x1bd3cf([0x61,0x74,0x6f,0x62])](_0x315ed3[_0x1bd3cf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1bd3cf([0x2b]))[_0x1bd3cf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1bd3cf([0x2f])));}function _0x5c38c1(_0x1dd660){let _0x150004=0x1505;function _0x514b60(_0xfd6218){for(let _0x2028e9=0x0;_0x2028e9<_0xfd6218[_0x1bd3cf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2028e9++){const _0x3419d7=_0xfd6218[_0x1bd3cf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2028e9);_0x150004=(_0x150004<<0x5)+_0x150004+_0x3419d7,_0x150004&=_0x150004;}}function _0x3fa242(_0x25d2bd){Array[_0x1bd3cf([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x25d2bd)?_0x25d2bd[_0x1bd3cf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3fa242):_0x25d2bd&&typeof _0x25d2bd==_0x1bd3cf([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1bd3cf([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x25d2bd)[_0x1bd3cf([0x73,0x6f,0x72,0x74])]()[_0x1bd3cf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x157233,_0x5c668e])=>{_0x514b60(_0x157233),_0x3fa242(_0x5c668e);}):_0x514b60(window[_0x1bd3cf([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x25d2bd));}return _0x3fa242(_0x1dd660),_0x150004>>>0x0;}function _0x31cb86(_0x281fdc){return _0x281fdc[_0x1bd3cf([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1bd3cf([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1bd3cf([0x30]));}function _0x4a2e67(_0x403d5a){return _0x403d5a[_0x1bd3cf([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1bd3cf([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1bd3cf([0x6a,0x6f,0x69,0x6e])]('');}function _0x1e18e0(){}function _0x1bd3cf(_0x1ec4cb){return _0x1ec4cb['map'](_0x2ded1a=>String['fromCharCode'](_0x2ded1a))['join']('');}_0x1da261(await _0x10656f());}(this);}['showFakeVisualSelection'](){const _0x1af352=this['editor']['model'];_0x1af352['change'](_0x5a0c0a=>{const _0x28f3a9=_0x1af352['document']['selection']['getRanges']();let _0x259ecf=0x0;for(const _0x3091da of _0x28f3a9){const _0x7c9c59=f+':'+_0x259ecf;if(_0x1af352['markers']['has'](_0x7c9c59))_0x5a0c0a['updateMarker'](_0x7c9c59,{'range':_0x3091da});else{if(_0x3091da['start']['isAtEnd']){const _0x3dbd6d=_0x3091da['start']['getLastMatchingPosition'](({item:_0x5737e7})=>!_0x1af352['schema']['isContent'](_0x5737e7),{'boundaries':_0x3091da});_0x5a0c0a['addMarker'](_0x7c9c59,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5a0c0a['createRange'](_0x3dbd6d,_0x3091da['end'])});}else _0x5a0c0a['addMarker'](_0x7c9c59,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3091da});}_0x259ecf++;}});}['hideFakeVisualSelection'](){const _0x42086f=this['editor']['model'],_0x2230fd=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x2230fd['length']&&_0x42086f['change'](_0x85ff85=>{_0x2230fd['forEach'](_0x3865e3=>{_0x85ff85['removeMarker'](_0x3865e3);});});}['insertContent'](_0x1fc08f,_0x356ca8){const _0x42a4c9=this['_getAISelection'](),_0x14ad1d=_0x356ca8||_0x42a4c9['getFirstRange']();this['editor']['model']['canEditAt'](_0x14ad1d)&&this['editor']['model']['change'](_0x4090c1=>{this['hideFakeVisualSelection'](),_0x356ca8||this['_resetContentOfSelectedTableCells'](_0x4090c1,_0x42a4c9),this['_pasteHTMLUsingClipboard']({'insertAt':_0x14ad1d,'writer':_0x4090c1,'html':_0x1fc08f});});}['insertContentBelow'](_0x26b8aa){const {model:_0x192051}=this['editor'],_0x452064=this['_getAISelection']();_0x192051['change'](()=>{const _0xcff945=this['_prepareTableInsertBelowPosition'](_0x26b8aa,_0x452064)||this['_getDefaultInsertBelowPosition'](_0x452064);this['insertContent'](_0x26b8aa,_0xcff945);});}['_getAISelection'](){const _0x3f5868=this['editor']['model'],_0x566e79=Array['from'](_0x3f5868['markers']['getMarkersGroup'](f))['map'](_0x5e70ab=>_0x5e70ab['getRange']());return _0x3f5868['createSelection'](_0x566e79);}['_pasteHTMLUsingClipboard']({writer:_0x2c205a,html:_0x5b3591,insertAt:_0x109bc6}){const {view:_0x1c8215}=this['editor']['editing'],_0x2f875d=this['editor']['plugins']['get'](_0x37cfcc),_0x2dce3b=new gt();_0x2dce3b['setData']('text/html',_0x5b3591);const _0x2f71ad=new ClipboardEvent('paste',{'clipboardData':_0x2dce3b}),_0x5ed638=new _0x4e37ac(_0x1c8215,_0x2f71ad,{'dataTransfer':new _0x3805b9(_0x2dce3b)});_0x2c205a['setSelection'](_0x109bc6);const _0x25d08d=(_0x26c090,_0x34a781)=>{_0x34a781['resultRange']&&_0x2c205a['setSelection'](_0x34a781['resultRange']);};_0x2f875d['once']('contentInsertion',_0x25d08d,{'priority':'lowest'}),_0x1c8215['document']['fire']('paste',_0x5ed638),_0x2f875d['off']('contentInsertion',_0x25d08d);}['_getDefaultInsertBelowPosition'](_0xd71f4a){const {model:_0x27ac48}=this['editor'],_0x1016e3=Array['from'](_0xd71f4a['getSelectedBlocks']());return _0x1016e3['length']?_0x27ac48['createPositionAfter'](_0x1016e3['pop']()):_0xd71f4a['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x207d6e,_0x170032){const {model:_0x4f3500,plugins:_0x56cf22}=this['editor'];if(_0x56cf22['has']('TableUtils')){const _0x5aebcd=_0x56cf22['get']('TableUtils')['getSelectedTableCells'](_0x170032);if(_0x5aebcd['length']){const _0x3328a7=this['_getTableRowCountFromContent'](_0x207d6e),_0xc3b85c=this['_createEmptyTableRows'](_0x5aebcd,_0x3328a7);return _0x4f3500['createPositionAt'](_0xc3b85c,0x0);}}return null;}['_getTableRowCountFromContent'](_0x17bec7){const _0x53c4d0=this['editor']['plugins']['get']('TableUtils'),_0x150beb=this['editor']['data']['parse'](_0x17bec7),_0x20e447=Array['from'](_0x150beb['getChildren']())['filter'](_0x50a7ff=>_0x50a7ff['is']('element','table'));let _0x2f6c02=0x0;return _0x20e447['forEach'](_0x4d9ba4=>{_0x2f6c02+=_0x53c4d0['getRows'](_0x4d9ba4);}),_0x2f6c02;}['_createEmptyTableRows'](_0x445264,_0x43bdf3){const _0x28a511=this['editor']['plugins']['get']('TableUtils'),_0x323279=_0x28a511['getRowIndexes'](_0x445264),_0x48925e=_0x28a511['getColumnIndexes'](_0x445264),_0x5e6ddb=_0x323279['last']+0x1,_0x1265af=_0x48925e['first'],_0x501293=_0x445264[0x0]['findAncestor']('table');for(let _0x530331=0x0;_0x530331<_0x43bdf3;_0x530331++)_0x28a511['insertRows'](_0x501293,{'at':_0x5e6ddb});return _0x501293['getChild'](_0x5e6ddb)['getChild'](_0x1265af);}['_resetContentOfSelectedTableCells'](_0xef8753,_0x50f7b7){const {plugins:_0x4351e5}=this['editor'],{model:_0x5ffa84}=_0xef8753;if(!_0x4351e5['has']('TableUtils'))return;_0x4351e5['get']('TableUtils')['getSelectedTableCells'](_0x50f7b7)['length']&&_0x5ffa84['deleteContent'](_0x50f7b7);}}class E extends _0x58c284{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x26f180('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x550d31){super(_0x550d31),this['name']='AIRequestError';}}function i(_0x4651f7,_0x1f7af5,_0x74fbaf){const t=_0x4651f7['t'];switch(_0x1f7af5){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',_0x74fbaf);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x74fbaf);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'},_0x74fbaf);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 _0x1f7af5;}}class j extends _0x235131{['_commandDefinitions'];constructor(_0x3085e6,_0x289b1c){super(_0x3085e6),this['_commandDefinitions']=_0x289b1c,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x29ced9,_0x12a764,_0x2a8bf2)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x2a8bf2));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x53cca8,_0xb9f54c,_0x149a10)=>{this['enabledCommandsIds']=_0x149a10?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x535436=this['editor']['model'];this['_hasContext']=function(_0x37fdc4){const _0x1f912a=_0x37fdc4['document']['selection'];return _0x1f912a['isCollapsed']?0x0!==[..._0x1f912a['getSelectedBlocks']()]['length']&&![..._0x1f912a['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x37fdc4['hasContent'](_0x1f912a['getFirstRange']());}(_0x535436);const _0x3f41b9=_0x535436['document']['selection'],_0x4bd5aa=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x23a4b5 of _0x3f41b9['getRanges']())for(const _0x233091 of _0x23a4b5['getItems']())if(_0x233091['is']('element')&&_0x4bd5aa['includes'](_0x233091['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x20ac7e='',_0x413727='',_0x27c095='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x20ac7e,_0x413727,_0x27c095);}}function G(_0xdf0fab,_0x29baac){const _0xb4d5d6=new Set();for(const _0x22b7a8 of _0xdf0fab['values']())(_0x29baac||!0x1===_0x22b7a8['requiresContent'])&&_0xb4d5d6['add'](_0x22b7a8['id']);return Array['from'](_0xb4d5d6);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
24
- _0x79355d(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x4889be,_0x51dcdf,_0x1c2e6c){super(),this['editor']=_0x4889be,this['textAdapter']=_0x51dcdf,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x1c2e6c,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x3f60fa,_0x37bc8d,_0x30537e)=>{this['view']['value']=this['_sanitizeHTML'](_0x30537e);}),this['listenTo'](this['view'],'submitPrompt',(_0x3c66aa,_0x466548)=>{const _0x501194=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x466548,_0x501194,'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:_0x5dc1ea,query:_0x3ca1fa,htmlContent:_0x12717c,label:_0x459144,mainActionLabel:_0x510cd8}){this['view']['prompt']=_0x459144,this['view']['mainAction']=_0x510cd8,this['initialContext']=_0x12717c,_0x3ca1fa&&(this['view']['isRendered']?this['_handleQuery'](_0x3ca1fa,_0x12717c,_0x5dc1ea,_0x459144):this['view']['once']('render',()=>{this['_handleQuery'](_0x3ca1fa,_0x12717c,_0x5dc1ea,_0x459144);}));}['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'](_0x229a3d,_0x32769a,_0x9e7a55,_0x3324c0){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x32769a,this['previousQuery']=_0x229a3d,this['previousLabel']=_0x3324c0||_0x229a3d,this['previousActionId']=_0x9e7a55,new Promise(_0x389698=>{this['textAdapter']['makeRequest']({'query':_0x229a3d,'context':_0x32769a,'onData':_0x12b3b0=>{this['currentResponse']=_0x12b3b0,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x9e7a55})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x20e737=>{_0x20e737 instanceof R?this['view']['handleError'](_0x20e737['message']):this['view']['handleError'](),_0x389698();})['finally'](()=>{this['stopProcessing'](),_0x389698();});});}['_parseAndNormalizeContent'](_0xad0b8b,_0x12ea19=!0x1){const _0x5612de=Z['exec'](_0xad0b8b);_0xad0b8b=_0x5612de?_0xad0b8b['substring'](_0x5612de[0x1]['length']):_0xad0b8b['length']<0x64&&!_0x12ea19?'':this['_stripMarkdownSyntax'](_0xad0b8b);const _0x34ead4=this['_domParser']['parseFromString'](_0xad0b8b,'text/html');if(_0x5612de){const _0x332bd1=Array['from'](_0x34ead4['body']['childNodes']);_0x332bd1['reverse']();for(const _0x1c1cce of _0x332bd1){if(_0x1c1cce['nodeType']==Node['ELEMENT_NODE'])break;_0x1c1cce['remove']();}}const _0x4eb90b=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x34ead4['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x4eb90b);const _0x340416=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x1f8112=this['editor']['data']['toModel'](_0x4eb90b);return _0x340416||_0x1f8112['markers']['clear'](),this['editor']['data']['stringify'](_0x1f8112);}['_normalizeResponseHeadings'](_0x58d2eb){const _0x310c6e=new _0x41e201(this['editor']['editing']['view']['document']),_0xc4b9a=new _0x574ccc({'name':/^h[1-5]$/}),_0x5b6645=[];let _0x49cf33=!0x1;for(const _0x416808 of _0x58d2eb)_0x416808['is']('element')&&_0xc4b9a['match'](_0x416808)&&(_0x5b6645['push'](_0x416808),'h1'==_0x416808['name']&&(_0x49cf33=!0x0));if(_0x49cf33){for(const _0x37b0e9 of _0x5b6645)_0x310c6e['rename']('h'+(parseInt(_0x37b0e9['name'][0x1])+0x1),_0x37b0e9);}}['_isH1TagSupportEnabled'](){const {data:_0x11a591,editing:_0x28b208}=this['editor'],_0x5cb096=_0x11a591['htmlProcessor']['toView']('<h1></h1>'),_0x241873=_0x11a591['toView'](_0x11a591['toModel'](_0x5cb096));return!!_0x28b208['view']['domConverter']['viewToDom'](_0x241873)['querySelector']('h1');}['_sanitizeHTML'](_0x4f4bb3){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x4f4bb3),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0xb47652){const _0x8b2dc7=_0xb47652['trim']();return _0x8b2dc7['startsWith']('```html')?_0x8b2dc7['endsWith']('```')?_0x8b2dc7['substring'](0x7,_0x8b2dc7['length']-0x3):_0x8b2dc7['substring'](0x7):_0xb47652;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x172e84){super(_0x172e84),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x4b02be=>i(_0x172e84,'AI_'+_0x4b02be['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x172e84,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x172e84,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x172e84,'Stop'));const _0x48b0b3=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x48b0b3['if']('isVisible','ck-hidden',_0x3a0cf4=>!_0x3a0cf4)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x382eae,_0x427218){const _0xff146e=new _0x305138(this['locale']);return _0xff146e['set']({'label':_0x382eae,'class':_0x427218||'','isVisible':!0x0,'withText':!0x0}),_0xff146e;}}class Y extends _0x43b1d{['contentFieldView'];['copyButtonView'];constructor(_0x630e42,_0x27618f=''){super(_0x630e42),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x39d638=this['bindTemplate'];this['contentFieldView']=new At(_0x630e42,_0x27618f),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x39d638['if']('isVisible','ck-hidden',_0x4df84e=>!_0x4df84e)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x39d638['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 _0x453f29=!0x1;this['on']('change:value',(_0x303ab4,_0x157c24,_0x3a5f06)=>{const _0x133e03=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x3a5f06),this['isProcessing']&&_0x133e03&&!_0x453f29&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x3c8c5d,_0x1eca0e,_0x4b68b0)=>{_0x453f29=!0x1,_0x4b68b0?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x453f29=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x453f29=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x4a95cc=this['locale'],_0xe95743=new _0x305138(this['locale']),_0x5a7d80='ck-ai-form__copy-button';return _0xe95743['set']({'label':i(_0x4a95cc,'Copy'),'icon':_0x4af1a4,'class':_0x5a7d80,'tooltip':!0x0}),_0xe95743['bind']('isVisible')['to'](this,'value',_0x24a6f8=>!!_0x24a6f8),_0xe95743['bind']('isEnabled')['to'](this,'isProcessing',_0x4d0fde=>!_0x4d0fde),_0xe95743['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0xe95743['icon']=_0xe93727,_0xe95743['class']=_0x5a7d80+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0xe95743['icon']=_0x4af1a4,_0xe95743['class']=_0x5a7d80;},0x3e8);}),_0xe95743;}['_copyHTMLToClipboard'](_0x4d02d5){const {window:_0x1f8df5,document:_0x37e9f7}=_0x88f13d;if(_0x1f8df5['ClipboardItem']){const {Blob:_0x3415bd,ClipboardItem:_0x647782}=_0x1f8df5,_0x4a08b=[new _0x647782({'text/html':new _0x3415bd([_0x4d02d5['innerHTML']],{'type':'text/html'}),'text/plain':new _0x3415bd([_0x4d02d5['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x4a08b);}else{const _0x1103ed=_0x37e9f7['createElement']('div');_0x1103ed['style']['position']='absolute',_0x1103ed['style']['left']='-9999px',_0x1103ed['innerHTML']='<span>[</span>'+_0x4d02d5['innerHTML']+'<span>]</span>',_0x37e9f7['body']['appendChild'](_0x1103ed);const _0x126660=_0x37e9f7['createRange']();_0x126660['setStartAfter'](_0x1103ed['firstElementChild']),_0x126660['setEndBefore'](_0x1103ed['lastElementChild']);const _0x52dc85=_0x1f8df5['getSelection']();_0x52dc85['removeAllRanges'](),_0x52dc85['addRange'](_0x126660),_0x37e9f7['execCommand']('copy'),_0x1103ed['remove']();}}}class At extends _0x43b1d{constructor(_0x3071b6,_0x346f53=''){super(_0x3071b6),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x346f53,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x57e550){this['element']['innerHTML']=_0x57e550;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x236a17=new _0x43b1d(),_0x60c304=this['locale'],_0x7c5eb2=new _0x136edd();return _0x7c5eb2['isVisible']=!0x0,_0x236a17['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x7c5eb2,{'text':i(_0x60c304,'AI\x20is\x20writing...')}]}),_0x236a17['render'](),_0x236a17;}}class st extends _0x43b1d{constructor(_0x4c9c82,_0x39c2ce=''){super(_0x4c9c82);const _0x367a4b=new rt(),_0x120b67=this['bindTemplate'];this['set']('text',_0x39c2ce),_0x367a4b['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x367a4b,{'text':_0x120b67['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x4598cd,_0x54ce26){super(_0x4598cd,_0x54ce26),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',(_0x2128e9,_0x336cb3)=>{_0x2128e9['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x336cb3());});}['_createSubmitButton'](){const _0x13f9a6=new _0x305138(this['locale']),_0x97db8f=this['locale'];return _0x13f9a6['set']({'icon':ht,'label':i(_0x97db8f,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x13f9a6['on']('execute',()=>{this['submit']();}),_0x13f9a6['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x1e2d8a,_0xce55c6)=>!_0x1e2d8a&&_0xce55c6),_0x13f9a6;}['_createShowHistoryButton'](){const _0x1c68b5=new _0x305138(this['locale']),_0x21d260=this['resultsView'],_0xc19c8b=this['locale'];_0x1c68b5['set']({'label':i(_0xc19c8b,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x1c68b5['bind']('isOn')['to'](_0x21d260,'isVisible'),_0x1c68b5['bind']('isEnabled')['to'](this,'isEnabled'),_0x1c68b5['on']('execute',()=>{_0x21d260['isVisible']=!_0x21d260['isVisible'],_0x21d260['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x136d6e=()=>{_0x88f13d['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0xe293d7=new it(this['queryView']['fieldView']['element']),_0x1e6f29=_0xe293d7['width'],_0x325f49='rtl'===_0xc19c8b['uiLanguageDirection']?'left':'right';_0xe293d7['excludeScrollbarsAndBorders'](),_0x1c68b5['element']['style'][_0x325f49]=_0x1e6f29-_0xe293d7['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x136d6e),this['on']('render',_0x136d6e),_0x1c68b5;}['submit'](){const _0x1449b7=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x1449b7);}['focus'](_0x418b3b){-0x1===_0x418b3b?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x18e00a){super(_0x18e00a),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x18e00a,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x1ff5b1=0x0;for(const _0x17151f of this['items'])_0x1ff5b1+=_0x17151f['items']['length'];return{'resultsCount':_0x1ff5b1,'totalItemsCount':_0x1ff5b1};}['_createClearHistoryButton'](){const _0x1f742e=this['locale'],_0x554e01=new _0x305138(this['locale']);return _0x554e01['set']({'label':'('+i(_0x1f742e,'Clear')+')','withText':!0x0}),_0x554e01['on']('execute',()=>this['fire']('clearHistory')),_0x554e01;}}class bt extends xt{constructor(_0x6b0d45){super();const _0x3efc39=new kt(),_0x39069c=new _0x305138(this['locale'],_0x3efc39);this['children']['add'](_0x39069c),_0x39069c['set']({'label':_0x6b0d45['prompt'],'withText':!0x0}),_0x39069c['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x6b0d45['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x5eae86{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x41d85b,_0x3d3910)=>{const _0x1761d2=os(_0x3d3910['prompt']);for(const _0x1d7e3f of this)if(_0x1d7e3f!=_0x3d3910&&os(_0x1d7e3f['prompt'])===_0x1761d2){this['remove'](_0x1d7e3f);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x267d64=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x267d64));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x453a63=>_0x453a63)));}}function os(_0x1cb635){return _0x1cb635['toLowerCase']()['trim']();}class _ extends _0x43b1d{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x5aacfd,_0x298772,_0xddd29d=''){super(_0x5aacfd),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new wt(),this['errorView']=new st(_0x5aacfd),this['contentArea']=new Y(_0x5aacfd,_0xddd29d),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 mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'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 _0x5acc74=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x298772],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x5acc74['if']('isError','ck-hidden',_0x194dd3=>!_0x194dd3)]},'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'](_0x395135=0x1){-0x1===_0x395135?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 _0x45c0a9=this['locale'],_0xacb8c1=new ct(_0x45c0a9,{'queryView':{'label':i(_0x45c0a9,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x45c0a9,'Empty\x20history'),'secondary':i(_0x45c0a9,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0xacb8c1['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x649be8,_0x45aba3)=>_0x649be8&&!_0x45aba3),this['listenTo'](_0xacb8c1,'submit',(_0x554a2d,_0x48491e)=>{this['prompt']=_0x48491e;const _0x4c20a3=yt(_0x48491e);this['fire']('submitPrompt',_0x4c20a3),_0x48491e['trim']()&&this['_promptHistory']['add']({'prompt':_0x4c20a3},0x0);},{'priority':'high'}),_0xacb8c1;}['_createHistoryView'](){const _0x3cd402=new ft(this['locale']);return _0x3cd402['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x3cd402['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x3cd402;}['_createToolbar'](){const _0x26b43d=new lt(this['locale']);return _0x26b43d['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x54cf37,_0x39fdb6,_0x559bbb)=>_0x54cf37&&!_0x39fdb6&&!!_0x559bbb),_0x26b43d['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x26b43d['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x498dd0,_0x44a4cb,_0x531a3b)=>_0x498dd0&&!_0x44a4cb&&!!_0x531a3b),_0x26b43d['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x26b43d['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x511a7f,_0x49e125)=>_0x511a7f&&!_0x49e125),_0x26b43d['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x26b43d['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x26b43d['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x26b43d;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x2f9ee2=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x2f9ee2,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0xe8d8f8){const _0x57c260=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0xe8d8f8||i(_0x57c260,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x58c284{['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[_0x20837e,a,E,_0x807586];}constructor(_0x29690d){super(_0x29690d),_0x29690d['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x29690d['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x29690d['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x29690d['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x2b7bc5}=this;this['_aiAdapter']=_0x2b7bc5['plugins']['get'](E),this['_dialog']=_0x2b7bc5['plugins']['get'](_0x807586),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x514275=new j(_0x2b7bc5,Array['from'](this['_commandDefinitions']['values']()));_0x2b7bc5['commands']['add']('showAIAssistant',_0x514275),_0x2b7bc5['ui']['componentFactory']['add']('aiCommands',_0x39d24c=>{const _0x12cfee=_0x157fbc(_0x39d24c);return _0x12cfee['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x12cfee['buttonView']['set']({'label':i(_0x39d24c,'AI\x20Commands'),'icon':_0x33d94a,'tooltip':!0x0}),_0x12cfee['on']('execute',_0x18fa17=>this['_onExecute'](_0x18fa17['source']['id'])),_0x4fc12e(_0x12cfee,_0x2b7bc5['ui']['view']['body'],function(_0x1d8ce5){const _0x44f8cf=o(_0x1d8ce5['config']['get']('ai.aiAssistant.commands'),_0x1d8ce5['locale']),_0x469c95=U(_0x1d8ce5,_0x44f8cf)['filter'](_0x10c4af=>_0x10c4af['commands']['length']);if(0x1===_0x469c95['length'])return U(_0x1d8ce5,_0x469c95[0x0]['commands'])['map'](_0xba865c=>({'id':_0xba865c['id'],'label':_0xba865c['label']}));return _0x469c95['map'](_0x1ed8d5=>{const {groupId:_0x652216,groupLabel:_0x31dd5b,commands:_0x5039ff}=_0x1ed8d5,_0x3b0ae7=U(_0x1d8ce5,_0x5039ff)['map'](_0x5cc777=>({'id':_0x5cc777['id'],'label':_0x5cc777['label']}));return{'id':_0x652216,'menu':_0x31dd5b||_0x652216,'children':_0x3b0ae7};});}(_0x2b7bc5),{'ariaLabel':i(_0x39d24c,'AI\x20Commands')}),_0x12cfee['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x514275['on']('change:enabledCommandsIds',_0x185dc2),_0x12cfee['menuView']['once']('render',_0x185dc2),_0x12cfee;function _0x185dc2(){_0x12cfee['isEnabled']=_0x514275['enabledCommandsIds']['length']>0x0;for(const _0x784a95 of _0x12cfee['menuView']['buttons'])_0x784a95['isEnabled']=_0x514275['enabledCommandsIds']['includes'](_0x784a95['id']);}}),_0x2b7bc5['ui']['componentFactory']['add']('menuBar:aiCommands',_0x36837d=>{const _0x1cee74=new _0x40fff5(_0x36837d);_0x1cee74['buttonView']['set']({'label':i(_0x36837d,'AI\x20Commands'),'icon':_0x33d94a}),_0x1cee74['bind']('isEnabled')['to'](_0x514275,'enabledCommandsIds',_0x44be52=>_0x44be52['length']>0x0);const _0x4ad377=o(_0x2b7bc5['config']['get']('ai.aiAssistant.commands'),_0x36837d);return this['_populateMenuBarMenu'](_0x514275,_0x1cee74,_0x4ad377,_0x13ac3e=>this['_onExecute'](_0x13ac3e)),_0x1cee74;}),_0x2b7bc5['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x2b5f42=this['_createAIAssistantUIButton'](_0x305138);return _0x2b5f42['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x2b5f42;}),_0x2b7bc5['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x1ae043=this['_createAIAssistantUIButton'](_0x59b48b);return _0x1ae043['set']({'role':'menuitemcheckbox'}),_0x1ae043;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1c4253=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5845b6;for(const _0x4123d7 in _0x1c4253){const _0x1ec325=_0x4123d7,_0x59b923=_0x1c4253[_0x1ec325];if('aiLicenseKeyValid'==_0x59b923||'aiLicenseKeyInvalid'==_0x59b923||'aiLicenseKeyExpired'==_0x59b923||'aiLicenseKeyDomainLimit'==_0x59b923||'aiLicenseKeyNotAllowed'==_0x59b923||'aiLicenseKeyEvaluationLimit'==_0x59b923||'aiLicenseKeyTrialLimit'==_0x59b923||'aiLicenseKeyUsageLimit'==_0x59b923){delete _0x1c4253[_0x1ec325],_0x5845b6=_0x59b923,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x5845b6&&_0x1c4253['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x5845b6&&_0x1c4253['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x5845b6&&_0x1c4253['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x5845b6&&_0x1c4253['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x5845b6&&_0x1c4253['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x5845b6&&_0x1c4253['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x5845b6&&_0x1c4253['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0xe686dc='',_0x2ad963='',_0x41406f='custom'){const _0x5932f2=this['editor'],_0xc5b7a7=_0x5932f2['editing']['view'],_0x4775d4=_0x5932f2['plugins']['get'](a),_0x4a7809=_0x5932f2['plugins']['get'](_0x20837e);_0x4775d4['showFakeVisualSelection']();const _0x526531=new w(),_0x1b26fe=new ClipboardEvent('copy',{'clipboardData':_0x526531}),_0x560ae7=new _0x3805b9(_0x526531),_0x4b009f=new _0x4e37ac(_0xc5b7a7,_0x1b26fe,{'dataTransfer':_0x560ae7});_0x4a7809['_forceMarkersCopy']('comment',()=>{_0xc5b7a7['document']['fire']('copy',_0x4b009f);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x5932f2,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x4506c3=_0x560ae7['getData']('text/html');const _0x573d44=_0x5932f2['model']['document']['selection'],_0x24c041=Array['from'](_0x573d44['getRanges']());0x1===_0x24c041['length']&&_0x24c041[0x0]['isFlat']&&!_0x573d44['getSelectedElement']()&&''!==_0x4506c3['replace'](/&nbsp;/g,'')['trim']()&&(_0x4506c3='<p>'+_0x4506c3+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x41406f,'query':_0xe686dc,'htmlContent':_0x4506c3,'label':_0x2ad963,'mainActionLabel':M[_0x5932f2['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x56f6bc,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x582549['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x4775d4['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x51949e=new Map(),_0x57920e=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x12af2b of _0x57920e)for(const _0x47ca33 of _0x12af2b['commands'])_0x51949e['set'](_0x47ca33['id'],{..._0x47ca33,'groupId':_0x12af2b['groupId'],'groupLabel':_0x12af2b['groupLabel']||_0x12af2b['groupId']});return _0x51949e;}['_createAIAssistantUIButton'](_0x59e396){const _0x21011f=this['editor'],_0x1192be=_0x21011f['commands']['get']('showAIAssistant'),_0x367456=new _0x59e396(_0x21011f['locale']);return _0x367456['set']({'label':i(_0x21011f['locale'],'AI\x20Assistant'),'icon':_0x56f6bc,'isToggleable':!0x0}),_0x367456['bind']('isEnabled')['to'](_0x1192be),_0x367456['bind']('isOn')['to'](this['_dialog'],'id',_0x22265a=>'aiAssistant'===_0x22265a),this['listenTo'](_0x367456,'execute',()=>{_0x367456['isOn']?this['hideUI']():_0x1192be['execute']();}),_0x367456;}['_initView'](){const _0x2fa5df=this['editor']['plugins']['get'](a);this['_formView']=new _(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',()=>{_0x2fa5df['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x2fa5df['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x4526a6,ui:{ariaLiveAnnouncer:_0x275f88}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x1c21d4,_0xd805cd,_0x492eba)=>{const _0xd9fd54=this['_aiAssistantController']['currentContext'];_0x492eba?_0x275f88['announce'](i(_0x4526a6,'AI\x20is\x20writing')):_0xd9fd54&&_0x275f88['announce'](i(_0x4526a6,'Generated\x20content:\x20%0',_0xd9fd54),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x3963b0,_0xc59552,_0x464f1f)=>{if(_0x464f1f){const _0x5615c2=this['_formView']['errorView']['text'];_0x275f88['announce'](i(_0x4526a6,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x5615c2));}});}['_onExecute'](_0x52d6bb){const _0x53b669=this['_commandDefinitions']['get'](_0x52d6bb),_0x42748d=this['editor'],_0x37ba21=_0x42748d['model']['document']['selection'],_0x2b9634=_0x42748d['commands']['get']('showAIAssistant'),_0x401ebd=_0x42748d['plugins']['get'](a),_0x4c40f4=''+(_0x53b669['groupId']!==x?_0x53b669['groupLabel']+':\x20':'')+_0x53b669['label'];if(!0x1!==_0x53b669['requiresContent']&&_0x37ba21['isCollapsed']){const _0x12ff94=_0x52ab24(_0x37ba21['getSelectedBlocks']())||_0x42748d['model']['schema']['getLimitElement'](_0x37ba21);_0x42748d['model']['change'](_0x11bf42=>{_0x11bf42['setSelection'](_0x12ff94,'in');});}_0x401ebd['showFakeVisualSelection'](),_0x2b9634['execute'](_0x53b669['prompt'],_0x4c40f4,'command:'+_0x52d6bb);}['_populateMenuBarMenu'](_0x340c89,_0x26a6cc,_0x58014c,_0x14a94f){const _0x5bb2f1=this['editor'],_0x540849=_0x5bb2f1['locale'],_0x338df8=new _0x257a1b(_0x540849),_0x15cce0=U(_0x5bb2f1,_0x58014c)['filter'](_0x395f76=>_0x395f76['commands']['length']);0x1===_0x15cce0['length']?this['_getMenuBarGroupButtons']({'command':_0x340c89,'commands':_0x15cce0[0x0]['commands'],'parentMenuView':_0x26a6cc,'onExecute':_0x14a94f})['forEach'](_0x69600c=>_0x338df8['items']['add'](_0x69600c)):_0x15cce0['forEach'](({groupId:_0x593f85,groupLabel:_0x175860,commands:_0xc28269})=>{const _0xac2e6e=new _0x591844(_0x540849,_0x26a6cc),_0x322d4e=new _0x40fff5(_0x540849),_0x3a7880=new _0x257a1b(_0x540849),_0x3fffc4=this['_getMenuBarGroupButtons']({'command':_0x340c89,'commands':_0xc28269,'parentMenuView':_0x322d4e,'onExecute':_0x14a94f});_0x322d4e['buttonView']['set']({'label':_0x175860||_0x593f85}),_0x322d4e['delegate']('execute')['to'](_0x26a6cc),_0x3a7880['items']['addMany'](_0x3fffc4),_0x322d4e['panelView']['children']['add'](_0x3a7880),_0xac2e6e['children']['add'](_0x322d4e),_0x338df8['items']['add'](_0xac2e6e);}),_0x26a6cc['panelView']['children']['add'](_0x338df8);}['_getMenuBarGroupButtons']({command:_0x538287,commands:_0x40f08d,parentMenuView:_0x4e31ca,onExecute:_0x108539}){const _0x63f976=this['editor'],_0xc2d367=_0x63f976['locale'];return U(_0x63f976,_0x40f08d)['map'](_0x159c01=>{const _0x5edf1c=new _0x591844(_0xc2d367,_0x4e31ca),_0x50fecb=new _0x59b48b(_0xc2d367);return _0x50fecb['set']({'label':_0x159c01['label']}),_0x50fecb['delegate']('execute')['to'](_0x4e31ca),_0x50fecb['on']('execute',()=>_0x108539(_0x159c01['id'])),_0x50fecb['bind']('isEnabled')['to'](_0x538287,'enabledCommandsIds',_0x409821=>_0x409821['includes'](_0x159c01['id'])),_0x5edf1c['children']['add'](_0x50fecb),_0x5edf1c;});}}function B(_0x4cbf6c,_0x14e6e7){return void 0x0!==_0x4cbf6c['order']&&void 0x0===_0x14e6e7['order']?0x1:void 0x0===_0x4cbf6c['order']&&void 0x0!==_0x14e6e7['order']?-0x1:void 0x0!==_0x4cbf6c['order']&&void 0x0!==_0x14e6e7['order']?_0x4cbf6c['order']-_0x14e6e7['order']:0x0;}function U(_0x20617b,_0x4cca77){_0x4cca77['sort'](B);const _0xe023ef={},_0x3ca2de=[];for(const _0x87ce1d of _0x4cca77)if(void 0x0!==_0x87ce1d['order']){if(_0x87ce1d['order']in _0xe023ef)throw new _0x26f180('ai-commands-config-order-collision',_0x20617b,{'conflictingDefinitions':[_0x87ce1d,_0xe023ef[_0x87ce1d['order']]]});_0xe023ef[_0x87ce1d['order']]=_0x87ce1d,_0x3ca2de['splice'](_0x87ce1d['order'],0x0,_0x87ce1d);}else _0x3ca2de['push'](_0x87ce1d);return _0x3ca2de;}class r extends _0x58c284{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x62bb32){super(_0x62bb32);const _0xcf138b=_0x62bb32['config'],_0x5cb64b=_0x62bb32['locale'];_0xcf138b['define']('ai.aiAssistant.preserveComments',!0x0),_0xcf138b['define']('ai.aiAssistant.commands',function(_0x2740fb){return[{'groupId':'editOrReview','groupLabel':i(_0x2740fb,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x2740fb,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x2740fb,'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(_0x2740fb,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x2740fb,'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(_0x2740fb,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x2740fb,'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(_0x2740fb,'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(_0x2740fb,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x2740fb,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x2740fb,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x2740fb,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x2740fb,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x2740fb,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x2740fb,'Change\x20style'),'commands':[{'id':'business','label':i(_0x2740fb,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x2740fb,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x2740fb,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x2740fb,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x2740fb,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x2740fb,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x2740fb,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x2740fb,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x2740fb,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x2740fb,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x2740fb,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x2740fb,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x2740fb,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x5cb64b)),_0xcf138b['define']('ai.aiAssistant.extraCommandGroups',[]),_0xcf138b['define']('ai.aiAssistant.removeCommands',[]);let _0xd68a2=o(_0xcf138b['get']('ai.aiAssistant.commands'),_0x5cb64b);const _0x2bba2d=_0xcf138b['get']('ai.aiAssistant.extraCommandGroups'),_0x1cc3fb=_0xcf138b['get']('ai.aiAssistant.removeCommands');_0x2bba2d['forEach'](_0x1f0f06=>{const _0x11e5b8=_0xd68a2['find'](_0x118785=>_0x118785['groupId']===_0x1f0f06['groupId']);_0x11e5b8?_0x11e5b8['commands']=_0x11e5b8['commands']['concat'](_0x1f0f06['commands']):_0xd68a2['push'](_0x1f0f06);}),_0xd68a2=_0xd68a2['filter'](_0x1982a0=>!_0x1cc3fb['includes'](_0x1982a0['groupId'])),_0xd68a2['forEach'](_0x4c4546=>{_0x4c4546['commands']=_0x4c4546['commands']['filter'](_0x41ff0c=>!_0x1cc3fb['includes'](_0x41ff0c['id']));}),_0xcf138b['set']('ai.aiAssistant.commands',_0xd68a2);}}class P extends _0x58c284{['abortController'];static get['requires'](){return[E];}constructor(_0x3f9de2){super(_0x3f9de2),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x55f52b){return this['sendRequest'](_0x55f52b)['catch'](_0x5b034e=>{if(_0x5b034e instanceof R)return Promise['reject'](_0x5b034e);if('AbortError'==_0x5b034e['name'])return Promise['resolve']();throw console['error'](_0x5b034e),new _0x26f180('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x2c9286,_0x33fecc){const _0x46345d=this['editor']['locale'],_0x5f014e={'Content-Type':'application/json'};if('object'==typeof _0x2c9286)Object['assign'](_0x5f014e,_0x2c9286);else{if(_0x2c9286)try{const _0x1267bf=await _0x2c9286(_0x33fecc);Object['assign'](_0x5f014e,_0x1267bf);}catch{return Promise['reject'](new R(i(_0x46345d,'AI_ERROR_GET_HEADERS')));}}return _0x5f014e;}async['_prepareRequestParameters'](_0x4b1e6c,_0x3dfb07){const _0x51e108=this['editor']['locale'];if('object'==typeof _0x4b1e6c)return _0x4b1e6c;try{return await _0x4b1e6c(_0x3dfb07);}catch{return Promise['reject'](new R(i(_0x51e108,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x304f9a){super(_0x304f9a),_0x304f9a['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x304f9a['config']['get']('ai.openAI.requestParameters')||_0x304f9a['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x304f9a['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x304f9a['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x304f9a['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0xfe4de0,context:_0x2e30cb,onData:_0x21be30,actionId:_0x1aa627}){const _0x56164c=this['editor']['locale'],_0x32c933=await this['prepareMessages'](_0xfe4de0,_0x2e30cb,_0x1aa627),_0x1b7c5b=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1aa627),_0x5b2ac0=await this['_prepareRequestParameters'](this['_requestParameters'],_0x1aa627),_0x5cc9ab={'messages':_0x32c933,..._0x5b2ac0},_0x315c7b={'method':'POST','headers':_0x1b7c5b,'body':JSON['stringify'](_0x5cc9ab),'signal':this['abortController']['signal']},_0x1e3ec4=await fetch(this['_apiUrl'],_0x315c7b);if(_0x1e3ec4['ok'])return _0x5b2ac0['stream']?await this['_readStreamableResponse'](_0x1e3ec4,_0x21be30):await this['_readStaticResponse'](_0x1e3ec4,_0x21be30),Promise['resolve']();{const _0x964cd0=await _0x1e3ec4['text']();return _0x964cd0['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x56164c,'AI_ERROR_CONTEXT_LENGTH'))):_0x964cd0['includes']('Moderation')?Promise['reject'](new R(i(_0x56164c,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x964cd0));}}async['prepareMessages'](_0x4ea3fe,_0x6d4e31,_0x19e67b){let _0x5f8e91,_0x2762b4;return _0x6d4e31?(_0x5f8e91='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.',_0x2762b4='Instruction:\x0a'+_0x4ea3fe+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x6d4e31):(_0x5f8e91='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.',_0x2762b4=_0x4ea3fe),[{'role':'system','content':_0x5f8e91},{'role':'user','content':_0x2762b4}];}async['_readStreamableResponse'](_0x1b5e3f,_0x1bd553){const _0x1774dd=_0x1b5e3f['body']['getReader'](),_0x2a4aa0=new TextDecoder();let _0x2c6dc0='',_0x17dc73='',_0x5e3641='',_0x5e8906=!0x1;for(;!_0x5e8906;){const {done:_0x5166c0,value:_0x581399}=await _0x1774dd['read'](),_0x284c89=_0x2c6dc0+_0x2a4aa0['decode'](_0x581399);let _0x3fab29='';_0x5e8906=_0x5166c0;try{_0x3fab29=this['_cleanUpData'](_0x284c89),_0x2c6dc0='';}catch{_0x2c6dc0=_0x284c89;continue;}_0x17dc73+=_0x3fab29,!_0x5e8906&&this['_isBufferIncomplete'](_0x17dc73)||_0x17dc73&&(_0x5e3641+=_0x17dc73,_0x17dc73='',_0x1bd553(_0x5e3641));}return Promise['resolve']();}async['_readStaticResponse'](_0x25c08f,_0x4a6696){return _0x4a6696((await _0x25c08f['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x125d8c){const _0x400dfa=_0x125d8c['split']('<')['length']!==_0x125d8c['split']('>')['length'],_0x70598f=_0x125d8c['length']<0x1e;return _0x400dfa&&_0x70598f;}['_cleanUpData'](_0xcec773){return _0xcec773['split'](/\n(?![^{]*\})/g)['map'](_0x27a223=>_0x27a223['replace']('data:\x20',''))['filter'](_0x59673c=>_0x59673c&&_0x59673c['length']>0x0&&'[DONE]'!==_0x59673c)['map'](_0x12d549=>{const {choices:_0x3701a4}=JSON['parse'](_0x12d549);if(_0x3701a4[0x0]?.['delta']?.['content'])return _0x3701a4[0x0]['delta']['content'];})['filter'](_0x58d95f=>_0x58d95f)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x1ee22b){super(_0x1ee22b),_0x1ee22b['config']['get']('ai.aws.requestParameters')||_0x1ee22b['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']=_0x1ee22b['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x1ee22b['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x1ee22b['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x1ee22b['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x19ca34,context:_0x5d14dc,onData:_0x545509,actionId:_0x52d3c9}){const {model:_0x29ddb6,stream:_0x423bf7,..._0x1f515d}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x52d3c9),_0x1675f8={'prompt':await this['preparePrompt'](_0x19ca34,_0x5d14dc,_0x29ddb6,_0x52d3c9),..._0x1f515d};this['_apiUrl']?await this['_processProxyRequest'](_0x1675f8,_0x29ddb6,_0x423bf7,_0x545509,_0x52d3c9):await this['_processAWSRequest'](_0x1675f8,_0x29ddb6,_0x423bf7,_0x545509);}async['preparePrompt'](_0xc1f55c,_0x1aa6a4,_0x4181a0,_0x232310){let _0x49cebd,_0x1e156c;return _0x1aa6a4?(_0x49cebd='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.',_0x1e156c='Instruction:\x0a'+_0xc1f55c+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x1aa6a4):(_0x49cebd='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.',_0x1e156c=_0xc1f55c),'meta.llama'==this['getModelFamily'](_0x4181a0)?'<<SYS>>\x0a'+_0x49cebd+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x1e156c+'\x0a[/INST]':'Human:\x0a'+_0x49cebd+'\x0a'+_0x1e156c+'\x0a\x0aAssistant:';}['getModelFamily'](_0x104d1e){if(/^anthropic\.claude/['test'](_0x104d1e))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x104d1e))return'ai21.j2';if(/^cohere\.command/['test'](_0x104d1e))return'cohere.command';if(/^meta\.llama/['test'](_0x104d1e))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x104d1e));}async['_processProxyRequest'](_0x1d959b,_0x1e6f4a,_0x1e8d7c,_0x7e57c0,_0x15c2b3){const _0x28e741={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x15c2b3),'body':JSON['stringify']({..._0x1d959b,'model':_0x1e6f4a,'stream':_0x1e8d7c}),'signal':this['abortController']['signal']},_0x366e8d=await fetch(this['_apiUrl'],_0x28e741);_0x1e8d7c?await this['_readStreamableResponse'](_0x366e8d,_0x1e6f4a,_0x7e57c0):await this['_readStaticResponse'](_0x366e8d,_0x1e6f4a,_0x7e57c0);}async['_processAWSRequest'](_0x5d1ea7,_0x2773db,_0x362e3b,_0x491fa1){const _0x4742e6=new _0x26893b(this['_bedrockClientConfig']),_0x5f97d8={'body':JSON['stringify'](_0x5d1ea7),'contentType':'application/json','accept':'application/json','modelId':_0x2773db};let _0x425af9;if(_0x362e3b){const _0x5389fa=new _0x1ed34e(_0x5f97d8);_0x425af9=await _0x4742e6['send'](_0x5389fa,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x425af9,_0x2773db,_0x491fa1);}else{const _0x4dae34=new _0x597627(_0x5f97d8);_0x425af9=await _0x4742e6['send'](_0x4dae34,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x425af9,_0x2773db,_0x491fa1);}}async['_readAsyncIterableResponse'](_0x2cb250,_0x3b3f13,_0x358d31){const _0x507d73=_0x2cb250['body'],_0x2ba65b=new TextDecoder('utf-8');let _0x36b7de='';for await(const _0x564a82 of _0x507d73)if(_0x564a82['chunk']){const _0x585d6b=_0x2ba65b['decode'](_0x564a82['chunk']['bytes']),_0x1c4c3=JSON['parse'](_0x585d6b);_0x36b7de+=this['_getGeneratedText'](_0x1c4c3,_0x3b3f13),_0x358d31(_0x36b7de);}return Promise['resolve']();}async['_readStreamableResponse'](_0x4f22ff,_0x138392,_0x5ca6df){const _0x56c5fb=_0x4f22ff['body'],_0x3800e4=new TextDecoder('utf-8'),_0x496919=_0x56c5fb['getReader']();let _0x2f83ec='',_0x3e8e17='',_0x53117f=!0x1;for(;!_0x53117f;){const {done:_0x4d526e,value:_0x5058c3}=await _0x496919['read']();if(_0x53117f=_0x4d526e,_0x53117f)break;const _0x5701bc=(_0x2f83ec+_0x3800e4['decode'](_0x5058c3))['split']('\x0a')['map'](_0x335b92=>{try{return _0x2f83ec='',JSON['parse'](_0x335b92);}catch{return _0x2f83ec=_0x335b92,null;}})['filter'](_0x17ed3e=>null!==_0x17ed3e);_0x5701bc['length']&&(_0x3e8e17+=_0x5701bc['map'](_0x1306c9=>this['_getGeneratedText'](_0x1306c9,_0x138392))['join'](''),_0x5ca6df(_0x3e8e17));}return Promise['resolve']();}async['_readStaticResponse'](_0x3d5538,_0x509f83,_0x3bb34e){let _0x2fe7cb;return _0x2fe7cb=_0x3d5538 instanceof Response?await _0x3d5538['json']():JSON['parse'](Buffer['from'](_0x3d5538['body'])['toString']('utf8')),(_0x3bb34e(this['_getGeneratedText'](_0x2fe7cb,_0x509f83)),Promise['resolve']());}['_getGeneratedText'](_0x42898b,_0x2bcd65){switch(this['getModelFamily'](_0x2bcd65)){case'anthropic.claude':return _0x42898b['completion'];case'ai21.j2':return _0x42898b['completions'][0x0]['data']['text'];case'cohere.command':return _0x42898b['generations'][0x0]['text'];case'meta.llama':return _0x42898b['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O as OpenAITextAdapter};
23
+ import{Plugin as _0x10bc3a,Command as _0x15f716}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x2a92e5,IconCheck as _0x1fe880,IconError as _0x4492c5,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x3fba16,IconRobotPencil as _0x13700b}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x4fc4a8,CKEditorError as _0x392644,ObservableMixin as _0xd58f3b,global as _0x330e0d,isVisible as _0xeb7e24,Rect as _0xccd7cf,Collection as _0x316043,FocusTracker as et,KeystrokeHandler as rt,first as _0x44987d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x4e6ac4,View as _0x23ffe4,SpinnerView as _0x50bc2a,IconView as _0x276037,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x243330,createDropdown as _0x3cb5fc,addMenuToDropdown as _0xd9c24b,MenuBarMenuView as _0x4e7f31,MenuBarMenuListItemButtonView as _0x26a9a5,DialogViewPosition as _0x546376,MenuBarMenuListView as _0x169506,MenuBarMenuListItemView as _0x581f49}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x165414,ClipboardMarkersUtils as _0x480aee}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x546334,ViewDataTransfer as _0x1610c3,ViewUpcastWriter as _0x598e62,Matcher as _0x5b879c}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x2f9aa6,InvokeModelWithResponseStreamCommand as _0x8108be,InvokeModelCommand as _0x5e0609}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x35ac57,_0x4ebe1f){const _0x13551b=(0x0,_0x4ebe1f['t'])('Other');return _0x35ac57['length']?'groupId'in _0x35ac57[0x0]?_0x35ac57:[{'groupId':K,'groupLabel':_0x13551b,'order':0x1/0x0,'commands':_0x35ac57}]:[{'groupId':K,'groupLabel':_0x13551b,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x10bc3a{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x527101}=this,_0x2f9ddc=['ck-fake-ai-selection'];_0x527101['config']['get']('ai.useTheme')&&_0x2f9ddc['push']('ck-ai-assistant-ui_theme'),_0x527101['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x2f9ddc,'priority':0xc}}),_0x527101['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x437be3,{writer:_0x46df13})=>{if(!_0x437be3['markerRange']['isCollapsed'])return null;const _0x56ee1f=_0x46df13['createUIElement']('span');return _0x46df13['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x56ee1f),_0x56ee1f;}});}['afterInit'](){!async function(_0x28d872){const _0x579e8e=_0x13ec21([0x53,0x65,0x57,0x5a,0x6f,0x78,0x49,0x4c,0x50,0x35,0x74,0x42,0x68,0x32,0x31,0x58,0x6d,0x79,0x4d,0x6c,0x30,0x4e,0x52,0x64,0x33,0x54,0x51,0x48,0x45,0x73,0x6b,0x72,0x4a,0x76,0x43,0x77,0x47,0x71,0x55,0x61,0x63,0x56,0x44,0x4f,0x4b,0x46,0x37,0x59,0x62,0x67,0x70,0x34,0x38,0x75,0x66,0x36,0x6a,0x7a,0x41,0x6e,0x39,0x69]),_0x50588c=0x23b6d058,_0x344cc3=0x23b1bc08^_0x50588c,_0x56e8e4=window[_0x13ec21([0x44,0x61,0x74,0x65])][_0x13ec21([0x6e,0x6f,0x77])](),_0x146a9e=_0x28d872[_0x13ec21([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xe6d7c6=new window[(_0x13ec21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3eeb78=>{_0x146a9e[_0x13ec21([0x6f,0x6e,0x63,0x65])](_0x13ec21([0x72,0x65,0x61,0x64,0x79]),_0x3eeb78);}),_0x35f492={[_0x13ec21([0x6b,0x74,0x79])]:_0x13ec21([0x45,0x43]),[_0x13ec21([0x75,0x73,0x65])]:_0x13ec21([0x73,0x69,0x67]),[_0x13ec21([0x63,0x72,0x76])]:_0x13ec21([0x50,0x2d,0x32,0x35,0x36]),[_0x13ec21([0x78])]:_0x13ec21([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]),[_0x13ec21([0x79])]:_0x13ec21([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]),[_0x13ec21([0x61,0x6c,0x67])]:_0x13ec21([0x45,0x53,0x32,0x35,0x36])},_0xed7b59=_0x146a9e[_0x13ec21([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x13ec21([0x67,0x65,0x74])](_0x13ec21([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x54d1f0(){let _0x49c81d,_0x4df27a=null,_0x151a01=null;try{if(_0xed7b59==_0x13ec21([0x47,0x50,0x4c]))return _0x13ec21([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x49c81d=_0x2534d1(),!_0x49c81d)return _0x13ec21([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x49c81d[_0x13ec21([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x151a01=_0x237bae(_0x49c81d[_0x13ec21([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x49c81d[_0x13ec21([0x6a,0x74,0x69])])),await _0x378bbb()?_0x367278()?_0x34571c()?_0x13ec21([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2d5dc7()?(_0x49c81d[_0x13ec21([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x13ec21([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4df27a=_0x5e92dd(_0x13ec21([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x49c81d[_0x13ec21([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x13ec21([0x74,0x72,0x69,0x61,0x6c])&&(_0x4df27a=_0x5e92dd(_0x13ec21([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4c3539()):_0x13ec21([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x13ec21([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x13ec21([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x13ec21([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x34571c(){const _0x537fc5=[_0x13ec21([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x13ec21([0x74,0x72,0x69,0x61,0x6c])][_0x13ec21([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49c81d[_0x13ec21([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x56e8e4/0x3e8:0xe10*_0x344cc3;return _0x49c81d[_0x13ec21([0x65,0x78,0x70])]<_0x537fc5;}function _0x367278(){const _0x58b6f3=_0x49c81d[_0x13ec21([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x58b6f3&&(!!_0x58b6f3[_0x13ec21([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13ec21([0x2a]))||!!_0x58b6f3[_0x13ec21([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13ec21([0x41,0x49])));}function _0x2d5dc7(){const _0x5a27b3=_0x49c81d[_0x13ec21([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5a27b3||0x0==_0x5a27b3[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x400b92}=new URL(window[_0x13ec21([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5a27b3[_0x13ec21([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x400b92))return!0x0;const _0x545b89=_0x400b92[_0x13ec21([0x73,0x70,0x6c,0x69,0x74])](_0x13ec21([0x2e]));return _0x5a27b3[_0x13ec21([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23758b=>_0x23758b[_0x13ec21([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13ec21([0x2a])))[_0x13ec21([0x6d,0x61,0x70])](_0x491fe2=>_0x491fe2[_0x13ec21([0x73,0x70,0x6c,0x69,0x74])](_0x13ec21([0x2e])))[_0x13ec21([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1273b8=>_0x1273b8[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x545b89[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x13ec21([0x6d,0x61,0x70])](_0x341297=>Array(_0x545b89[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x341297[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x13ec21([0x66,0x69,0x6c,0x6c])](_0x341297[0x0]===_0x13ec21([0x2a])?_0x13ec21([0x2a]):'')[_0x13ec21([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x341297))[_0x13ec21([0x73,0x6f,0x6d,0x65])](_0x59d461=>_0x545b89[_0x13ec21([0x65,0x76,0x65,0x72,0x79])]((_0xc77027,_0x49023e)=>_0x59d461[_0x49023e]===_0xc77027||_0x59d461[_0x49023e]===_0x13ec21([0x2a])));}function _0x4c3539(){return _0x4df27a&&_0x151a01?new window[(_0x13ec21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2ddcd2,_0x537924)=>{_0x4df27a[_0x13ec21([0x74,0x68,0x65,0x6e])](_0x2ddcd2,_0x537924),_0x151a01[_0x13ec21([0x74,0x68,0x65,0x6e])](_0x4e6be7=>{_0x4e6be7!=_0x13ec21([0x56,0x61,0x6c,0x69,0x64])&&_0x2ddcd2(_0x4e6be7);},_0x537924);}):_0x4df27a||_0x151a01||_0x13ec21([0x56,0x61,0x6c,0x69,0x64]);}}function _0x237bae(_0x3ae74b,_0x2e4857){return new window[(_0x13ec21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x169859=>{if(_0xbeb935())return _0x169859(_0x13ec21([0x56,0x61,0x6c,0x69,0x64]));_0x58b53a(),_0x146a9e[_0x13ec21([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x13ec21([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x21d1d4=!0x1;const _0x3079ef=_0x4fc4a8();function _0x30bfca(_0x2cef7b){return!!_0x2cef7b&&(typeof _0x2cef7b===_0x13ec21([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2cef7b===_0x13ec21([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2cef7b[_0x13ec21([0x74,0x68,0x65,0x6e])]===_0x13ec21([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2cef7b[_0x13ec21([0x63,0x61,0x74,0x63,0x68])]===_0x13ec21([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5b4591(_0x3eed83){_0x39de67(_0x3eed83)[_0x13ec21([0x74,0x68,0x65,0x6e])](_0x5fb0a5=>{if(!_0x5fb0a5||_0x5fb0a5[_0x13ec21([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x13ec21([0x6f,0x6b]))return _0x13ec21([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x37cf16(_0x544d61(_0x3079ef+_0x2e4857))!=_0x5fb0a5[_0x13ec21([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x13ec21([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x13ec21([0x56,0x61,0x6c,0x69,0x64]);})[_0x13ec21([0x74,0x68,0x65,0x6e])](_0x208bec=>(_0x10973c(),_0x208bec),()=>{const _0x2a80cd=_0x3b440c();return null==_0x2a80cd?(_0x10973c(),_0x13ec21([0x56,0x61,0x6c,0x69,0x64])):_0x13ec21(_0x56e8e4-_0x2a80cd>(0x7ba5458^_0x50588c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x13ec21([0x74,0x68,0x65,0x6e])](_0x169859)[_0x13ec21([0x63,0x61,0x74,0x63,0x68])](()=>{_0x169859(_0x13ec21([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2ede29=0x23803ed8^_0x50588c;function _0x10973c(){const _0x33a293=_0x13ec21([0x6c,0x6c,0x63,0x74,0x2d])+_0x37cf16(_0x544d61(_0x3ae74b)),_0x8b5c7e=_0x3f6a23(_0x37cf16(window[_0x13ec21([0x4d,0x61,0x74,0x68])][_0x13ec21([0x63,0x65,0x69,0x6c])](_0x56e8e4/_0x2ede29)));window[_0x13ec21([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x13ec21([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x33a293,_0x8b5c7e);}function _0x3b440c(){const _0x6417af=_0x13ec21([0x6c,0x6c,0x63,0x74,0x2d])+_0x37cf16(_0x544d61(_0x3ae74b)),_0x59f6c6=window[_0x13ec21([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x13ec21([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x6417af);return _0x59f6c6?window[_0x13ec21([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f6a23(_0x59f6c6),0x10)*_0x2ede29:null;}function _0x39de67(_0x501d97){return new window[(_0x13ec21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x174237,_0x37b621)=>{_0x501d97[_0x13ec21([0x74,0x68,0x65,0x6e])](_0x174237,_0x37b621),window[_0x13ec21([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x37b621,0x23b70498^_0x50588c);});}}_0x146a9e[_0x13ec21([0x6f,0x6e])](_0x13ec21([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x25ada5,_0x24a0bc)=>{if(_0x24a0bc[0x0]!=_0x3ae74b)return _0x169859(_0x13ec21([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x24a0bc[0x1]={..._0x24a0bc[0x1],[_0x13ec21([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3079ef};},{[_0x13ec21([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x13ec21([0x68,0x69,0x67,0x68])}),_0x146a9e[_0x13ec21([0x6f,0x6e])](_0x13ec21([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x276ca1=>{_0x30bfca(_0x276ca1[_0x13ec21([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x21d1d4=!0x0,_0x5b4591(_0x276ca1[_0x13ec21([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x13ec21([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x13ec21([0x6c,0x6f,0x77])}),_0xe6d7c6[_0x13ec21([0x74,0x68,0x65,0x6e])](()=>{_0x21d1d4||_0x169859(_0x13ec21([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xbeb935(){return _0x146a9e[_0x13ec21([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13ec21([0x76,0x69,0x65,0x77])][_0x13ec21([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x13ec21([0x61,0x75,0x74,0x6f]);}function _0x58b53a(){_0x146a9e[_0x13ec21([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13ec21([0x76,0x69,0x65,0x77])][_0x13ec21([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x13ec21([0x61,0x75,0x74,0x6f]);}}function _0x5e92dd(_0x25e2d2){const _0x5ce047=[new window[(_0x13ec21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f0d54=>setTimeout(_0x1f0d54,0x23bfee94^_0x50588c)),_0xe6d7c6[_0x13ec21([0x74,0x68,0x65,0x6e])](()=>new window[(_0x13ec21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2407d7=>{let _0x1ef850=0x0;_0x146a9e[_0x13ec21([0x6d,0x6f,0x64,0x65,0x6c])][_0x13ec21([0x6f,0x6e])](_0x13ec21([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3dc0ac,_0x4ddbcb)=>{_0x4ddbcb[0x0][_0x13ec21([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1ef850++,_0x1ef850==(0x23b6d1a0^_0x50588c)&&(_0x2407d7(),_0x3dc0ac[_0x13ec21([0x6f,0x66,0x66])]());});}))];return window[_0x13ec21([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x13ec21([0x72,0x61,0x63,0x65])](_0x5ce047)[_0x13ec21([0x74,0x68,0x65,0x6e])](()=>_0x25e2d2);}async function _0x23c061(){await _0xe6d7c6,_0x146a9e[_0x13ec21([0x6d,0x6f,0x64,0x65,0x6c])][_0x13ec21([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x13dee9,_0x146a9e[_0x13ec21([0x6d,0x6f,0x64,0x65,0x6c])][_0x13ec21([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x13dee9,_0x146a9e[_0x13ec21([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x13ec21([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x287a06(_0x546fa9){const _0x103f17=_0x1769aa();_0x146a9e[_0x103f17]=_0x13ec21([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x546fa9,_0x546fa9!=_0x13ec21([0x56,0x61,0x6c,0x69,0x64])&&_0x23c061();}function _0x1769aa(){const _0x2cb572=window[_0x13ec21([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x13ec21([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x13ec21([0x6e,0x6f,0x77])]())[_0x13ec21([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x13ec21([0x2e]),'');let _0x272ce7=_0x13ec21([0x53]);for(let _0x2eddfe=0x0;_0x2eddfe<_0x2cb572[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2eddfe+=0x2){let _0x32c114=window[_0x13ec21([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2cb572[_0x13ec21([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2eddfe,_0x2eddfe+0x2));_0x32c114>=_0x579e8e[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x32c114-=_0x579e8e[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x272ce7+=_0x579e8e[_0x32c114];}return _0x272ce7;}function _0x2534d1(){const _0xb34930=_0xed7b59[_0x13ec21([0x73,0x70,0x6c,0x69,0x74])](_0x13ec21([0x2e]));if(0x3!=_0xb34930[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4a4163(_0xb34930[0x1]);function _0x4a4163(_0x447245){const _0x4a6e43=_0x8a5e9b(_0x447245);return _0x4a6e43&&_0x84559d()?_0x4a6e43:null;function _0x84559d(){const _0x5a9bb3=_0x4a6e43[_0x13ec21([0x6a,0x74,0x69])],_0x1cf382=window[_0x13ec21([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a9bb3[_0x13ec21([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5a9bb3[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2dc805={..._0x4a6e43,[_0x13ec21([0x6a,0x74,0x69])]:_0x5a9bb3[_0x13ec21([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5a9bb3[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2dc805[_0x13ec21([0x76,0x63])],_0x544d61(_0x2dc805)==_0x1cf382;}}}async function _0x378bbb(){let _0x210070=!0x0;try{const _0x14f88b=_0xed7b59[_0x13ec21([0x73,0x70,0x6c,0x69,0x74])](_0x13ec21([0x2e])),[_0x4d5c23,_0x6ee6f6,_0x27cd70]=_0x14f88b;return _0x445cc9(_0x4d5c23),await _0x488bac(_0x4d5c23,_0x6ee6f6,_0x27cd70),_0x210070;}catch{return!0x1;}function _0x445cc9(_0x4928b4){const _0x20bd66=_0x8a5e9b(_0x4928b4);_0x20bd66&&_0x20bd66[_0x13ec21([0x61,0x6c,0x67])]==_0x13ec21([0x45,0x53,0x32,0x35,0x36])||(_0x210070=!0x1);}async function _0x488bac(_0x203c0e,_0x207f3b,_0x2f653a){const _0x5673fb=window[_0x13ec21([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x13ec21([0x66,0x72,0x6f,0x6d])](_0x280c6f(_0x2f653a),_0x30f8e3=>_0x30f8e3[_0x13ec21([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3c6c94=new window[(_0x13ec21([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x13ec21([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x203c0e+_0x13ec21([0x2e])+_0x207f3b),_0x1e38f9=window[_0x13ec21([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x13ec21([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1e38f9)return;const _0x3a4072=await _0x1e38f9[_0x13ec21([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x13ec21([0x6a,0x77,0x6b]),_0x35f492,{[_0x13ec21([0x6e,0x61,0x6d,0x65])]:_0x13ec21([0x45,0x43,0x44,0x53,0x41]),[_0x13ec21([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x13ec21([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x13ec21([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1e38f9[_0x13ec21([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x13ec21([0x6e,0x61,0x6d,0x65])]:_0x13ec21([0x45,0x43,0x44,0x53,0x41]),[_0x13ec21([0x68,0x61,0x73,0x68])]:{[_0x13ec21([0x6e,0x61,0x6d,0x65])]:_0x13ec21([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3a4072,_0x5673fb,_0x3c6c94)||(_0x210070=!0x1);}}function _0x8a5e9b(_0x30fa4f){return _0x30fa4f[_0x13ec21([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x13ec21([0x65,0x79]))?JSON[_0x13ec21([0x70,0x61,0x72,0x73,0x65])](_0x280c6f(_0x30fa4f)):null;}function _0x280c6f(_0x4c6ca1){return window[_0x13ec21([0x61,0x74,0x6f,0x62])](_0x4c6ca1[_0x13ec21([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x13ec21([0x2b]))[_0x13ec21([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x13ec21([0x2f])));}function _0x544d61(_0x334146){let _0x18d6ec=0x1505;function _0xcd1811(_0x5e59cc){for(let _0x27e5c2=0x0;_0x27e5c2<_0x5e59cc[_0x13ec21([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x27e5c2++){const _0x94807e=_0x5e59cc[_0x13ec21([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x27e5c2);_0x18d6ec=(_0x18d6ec<<0x5)+_0x18d6ec+_0x94807e,_0x18d6ec&=_0x18d6ec;}}function _0x451f2d(_0x106abd){Array[_0x13ec21([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x106abd)?_0x106abd[_0x13ec21([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x451f2d):_0x106abd&&typeof _0x106abd==_0x13ec21([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x13ec21([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x106abd)[_0x13ec21([0x73,0x6f,0x72,0x74])]()[_0x13ec21([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x229b21,_0x5ebf1f])=>{_0xcd1811(_0x229b21),_0x451f2d(_0x5ebf1f);}):_0xcd1811(window[_0x13ec21([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x106abd));}return _0x451f2d(_0x334146),_0x18d6ec>>>0x0;}function _0x37cf16(_0x53731e){return _0x53731e[_0x13ec21([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x13ec21([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x13ec21([0x30]));}function _0x3f6a23(_0x2a3ae0){return _0x2a3ae0[_0x13ec21([0x73,0x70,0x6c,0x69,0x74])]('')[_0x13ec21([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x13ec21([0x6a,0x6f,0x69,0x6e])]('');}function _0x13dee9(){}function _0x13ec21(_0x26e9ef){return _0x26e9ef['map'](_0x1468a7=>String['fromCharCode'](_0x1468a7))['join']('');}_0x287a06(await _0x54d1f0());}(this);}['showFakeVisualSelection'](){const _0x9e2ea9=this['editor']['model'];_0x9e2ea9['change'](_0x496b33=>{const _0x7d0a02=_0x9e2ea9['document']['selection']['getRanges']();let _0x2d8455=0x0;for(const _0x196452 of _0x7d0a02){const _0xa9ecea=w+':'+_0x2d8455;if(_0x9e2ea9['markers']['has'](_0xa9ecea))_0x496b33['updateMarker'](_0xa9ecea,{'range':_0x196452});else{if(_0x196452['start']['isAtEnd']){const _0x2d1fee=_0x196452['start']['getLastMatchingPosition'](({item:_0x12b1d0})=>!_0x9e2ea9['schema']['isContent'](_0x12b1d0),{'boundaries':_0x196452});_0x496b33['addMarker'](_0xa9ecea,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x496b33['createRange'](_0x2d1fee,_0x196452['end'])});}else _0x496b33['addMarker'](_0xa9ecea,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x196452});}_0x2d8455++;}});}['hideFakeVisualSelection'](){const _0x556e37=this['editor']['model'],_0x402e7e=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x402e7e['length']&&_0x556e37['change'](_0x3bad8b=>{_0x402e7e['forEach'](_0x16596f=>{_0x3bad8b['removeMarker'](_0x16596f);});});}['insertContent'](_0x4f5dcc,_0x3e7d0e){const _0xf75c87=this['_getAISelection'](),_0x3cb5cc=_0x3e7d0e||_0xf75c87['getFirstRange']();this['editor']['model']['canEditAt'](_0x3cb5cc)&&this['editor']['model']['change'](_0x1b0ed0=>{this['hideFakeVisualSelection'](),_0x3e7d0e||this['_resetContentOfSelectedTableCells'](_0x1b0ed0,_0xf75c87),this['_pasteHTMLUsingClipboard']({'insertAt':_0x3cb5cc,'writer':_0x1b0ed0,'html':_0x4f5dcc});});}['insertContentBelow'](_0x515ce2){const {model:_0x454001}=this['editor'],_0x2f75c7=this['_getAISelection']();_0x454001['change'](()=>{const _0x3cd3e9=this['_prepareTableInsertBelowPosition'](_0x515ce2,_0x2f75c7)||this['_getDefaultInsertBelowPosition'](_0x2f75c7);this['insertContent'](_0x515ce2,_0x3cd3e9);});}['_getAISelection'](){const _0x13b7a7=this['editor']['model'],_0x388bde=Array['from'](_0x13b7a7['markers']['getMarkersGroup'](w))['map'](_0x320011=>_0x320011['getRange']());return _0x13b7a7['createSelection'](_0x388bde);}['_pasteHTMLUsingClipboard']({writer:_0xeef652,html:_0x55a9f2,insertAt:_0x45dd33}){const {view:_0x432bb9}=this['editor']['editing'],_0x35d9ec=this['editor']['plugins']['get'](_0x165414),_0x228121=new gt();_0x228121['setData']('text/html',_0x55a9f2);const _0xf9908=new ClipboardEvent('paste',{'clipboardData':_0x228121}),_0x1cdb66=new _0x546334(_0x432bb9,_0xf9908,{'dataTransfer':new _0x1610c3(_0x228121)});_0xeef652['setSelection'](_0x45dd33);const _0x1a44fa=(_0x2ca4dc,_0x1bcb65)=>{_0x1bcb65['resultRange']&&_0xeef652['setSelection'](_0x1bcb65['resultRange']);};_0x35d9ec['once']('contentInsertion',_0x1a44fa,{'priority':'lowest'}),_0x432bb9['document']['fire']('paste',_0x1cdb66),_0x35d9ec['off']('contentInsertion',_0x1a44fa);}['_getDefaultInsertBelowPosition'](_0x283a83){const {model:_0x37a261}=this['editor'],_0x182428=Array['from'](_0x283a83['getSelectedBlocks']());return _0x182428['length']?_0x37a261['createPositionAfter'](_0x182428['pop']()):_0x283a83['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x52ab35,_0x5351ad){const {model:_0x381b96,plugins:_0x36760f}=this['editor'];if(_0x36760f['has']('TableUtils')){const _0x4af12d=_0x36760f['get']('TableUtils')['getSelectedTableCells'](_0x5351ad);if(_0x4af12d['length']){const _0x5ce86b=this['_getTableRowCountFromContent'](_0x52ab35),_0x27c11a=this['_createEmptyTableRows'](_0x4af12d,_0x5ce86b);return _0x381b96['createPositionAt'](_0x27c11a,0x0);}}return null;}['_getTableRowCountFromContent'](_0x5d7a32){const _0x48fb45=this['editor']['plugins']['get']('TableUtils'),_0x571d88=this['editor']['data']['parse'](_0x5d7a32),_0xcb4d22=Array['from'](_0x571d88['getChildren']())['filter'](_0x30ff53=>_0x30ff53['is']('element','table'));let _0x482fad=0x0;return _0xcb4d22['forEach'](_0x38b147=>{_0x482fad+=_0x48fb45['getRows'](_0x38b147);}),_0x482fad;}['_createEmptyTableRows'](_0x865792,_0x24427e){const _0x5cdf22=this['editor']['plugins']['get']('TableUtils'),_0x447fad=_0x5cdf22['getRowIndexes'](_0x865792),_0x34b9a4=_0x5cdf22['getColumnIndexes'](_0x865792),_0x38f133=_0x447fad['last']+0x1,_0x1f12b1=_0x34b9a4['first'],_0x869031=_0x865792[0x0]['findAncestor']('table');for(let _0x2b674d=0x0;_0x2b674d<_0x24427e;_0x2b674d++)_0x5cdf22['insertRows'](_0x869031,{'at':_0x38f133});return _0x869031['getChild'](_0x38f133)['getChild'](_0x1f12b1);}['_resetContentOfSelectedTableCells'](_0x2e8717,_0x5b2cc8){const {plugins:_0x1a0211}=this['editor'],{model:_0x1b2871}=_0x2e8717;if(!_0x1a0211['has']('TableUtils'))return;_0x1a0211['get']('TableUtils')['getSelectedTableCells'](_0x5b2cc8)['length']&&_0x1b2871['deleteContent'](_0x5b2cc8);}}class x extends _0x10bc3a{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x392644('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x202478){super(_0x202478),this['name']='AIRequestError';}}function i(_0x5cec03,_0x474e16,_0x524e69){const t=_0x5cec03['t'];switch(_0x474e16){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',_0x524e69);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x524e69);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'},_0x524e69);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 _0x474e16;}}class E extends _0x15f716{['_commandDefinitions'];constructor(_0x301950,_0x5dc63e){super(_0x301950),this['_commandDefinitions']=_0x5dc63e,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x4410b6,_0x2c3e47,_0x5491a4)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x5491a4));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0xfe2abf,_0x1a3e73,_0x52c09e)=>{this['enabledCommandsIds']=_0x52c09e?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x541636=this['editor']['model'];this['_hasContext']=function(_0x53135d){const _0x2bd9d2=_0x53135d['document']['selection'];return _0x2bd9d2['isCollapsed']?0x0!==[..._0x2bd9d2['getSelectedBlocks']()]['length']&&![..._0x2bd9d2['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x53135d['hasContent'](_0x2bd9d2['getFirstRange']());}(_0x541636);const _0x1068f9=_0x541636['document']['selection'],_0x23664c=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x14b62c of _0x1068f9['getRanges']())for(const _0x2d908d of _0x14b62c['getItems']())if(_0x2d908d['is']('element')&&_0x23664c['includes'](_0x2d908d['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x3111e0='',_0x4f6914='',_0x118cb2='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x3111e0,_0x4f6914,_0x118cb2);}}function F(_0x4be0e8,_0x3f9f46){const _0x44d127=new Set();for(const _0x78f666 of _0x4be0e8['values']())(_0x3f9f46||!0x1===_0x78f666['requiresContent'])&&_0x44d127['add'](_0x78f666['id']);return Array['from'](_0x44d127);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0xd58f3b(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x3fb2c5,_0x10798a,_0x2e1dcd){super(),this['editor']=_0x3fb2c5,this['textAdapter']=_0x10798a,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x2e1dcd,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x51653e,_0x4ffca9,_0x17fd1e)=>{this['view']['value']=this['_sanitizeHTML'](_0x17fd1e);}),this['listenTo'](this['view'],'submitPrompt',(_0x546b70,_0x1b4698)=>{const _0x5aba0c=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1b4698,_0x5aba0c,'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:_0x569cbe,query:_0x1827b8,htmlContent:_0x4a17f9,label:_0x1de68d,mainActionLabel:_0x493125}){this['view']['prompt']=_0x1de68d,this['view']['mainAction']=_0x493125,this['initialContext']=_0x4a17f9,_0x1827b8&&(this['view']['isRendered']?this['_handleQuery'](_0x1827b8,_0x4a17f9,_0x569cbe,_0x1de68d):this['view']['once']('render',()=>{this['_handleQuery'](_0x1827b8,_0x4a17f9,_0x569cbe,_0x1de68d);}));}['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'](_0x4929c0,_0x42b8ff,_0x182ea5,_0x13bca4){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x42b8ff,this['previousQuery']=_0x4929c0,this['previousLabel']=_0x13bca4||_0x4929c0,this['previousActionId']=_0x182ea5,new Promise(_0x3d9030=>{this['textAdapter']['makeRequest']({'query':_0x4929c0,'context':_0x42b8ff,'onData':_0x2e849b=>{this['currentResponse']=_0x2e849b,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x182ea5})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x355650=>{_0x355650 instanceof R?this['view']['handleError'](_0x355650['message']):this['view']['handleError'](),_0x3d9030();})['finally'](()=>{this['stopProcessing'](),_0x3d9030();});});}['_parseAndNormalizeContent'](_0x456d4d,_0x3e6eb1=!0x1){const _0x34232c=Q['exec'](_0x456d4d);_0x456d4d=_0x34232c?_0x456d4d['substring'](_0x34232c[0x1]['length']):_0x456d4d['length']<0x64&&!_0x3e6eb1?'':this['_stripMarkdownSyntax'](_0x456d4d);const _0x2ace00=this['_domParser']['parseFromString'](_0x456d4d,'text/html');if(_0x34232c){const _0x30bd83=Array['from'](_0x2ace00['body']['childNodes']);_0x30bd83['reverse']();for(const _0x3a51aa of _0x30bd83){if(_0x3a51aa['nodeType']==Node['ELEMENT_NODE'])break;_0x3a51aa['remove']();}}const _0x3d5d2e=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x2ace00['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x3d5d2e);const _0x21decc=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x5719dc=this['editor']['data']['toModel'](_0x3d5d2e);return _0x21decc||_0x5719dc['markers']['clear'](),this['editor']['data']['stringify'](_0x5719dc);}['_normalizeResponseHeadings'](_0x32f0db){const _0x4e8596=new _0x598e62(this['editor']['editing']['view']['document']),_0x943730=new _0x5b879c({'name':/^h[1-5]$/}),_0x41f86c=[];let _0xfa1c7f=!0x1;for(const _0x3c11d9 of _0x32f0db)_0x3c11d9['is']('element')&&_0x943730['match'](_0x3c11d9)&&(_0x41f86c['push'](_0x3c11d9),'h1'==_0x3c11d9['name']&&(_0xfa1c7f=!0x0));if(_0xfa1c7f){for(const _0x1eb612 of _0x41f86c)_0x4e8596['rename']('h'+(parseInt(_0x1eb612['name'][0x1])+0x1),_0x1eb612);}}['_isH1TagSupportEnabled'](){const {data:_0xe22769,editing:_0x54828c}=this['editor'],_0x21bac3=_0xe22769['htmlProcessor']['toView']('<h1></h1>'),_0x579bb6=_0xe22769['toView'](_0xe22769['toModel'](_0x21bac3));return!!_0x54828c['view']['domConverter']['viewToDom'](_0x579bb6)['querySelector']('h1');}['_sanitizeHTML'](_0x153ada){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x153ada),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x31c169){const _0x4e4ef8=_0x31c169['trim']();return _0x4e4ef8['startsWith']('```html')?_0x4e4ef8['endsWith']('```')?_0x4e4ef8['substring'](0x7,_0x4e4ef8['length']-0x3):_0x4e4ef8['substring'](0x7):_0x31c169;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x6635ec){super(_0x6635ec),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x243823=>i(_0x6635ec,'AI_'+_0x243823['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x6635ec,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x6635ec,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x6635ec,'Stop'));const _0x4d588a=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x4d588a['if']('isVisible','ck-hidden',_0x562e39=>!_0x562e39)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x224a94,_0xeaa9d6){const _0x19b4ab=new _0x4e6ac4(this['locale']);return _0x19b4ab['set']({'label':_0x224a94,'class':_0xeaa9d6||'','isVisible':!0x0,'withText':!0x0}),_0x19b4ab;}}class ct extends _0x23ffe4{['contentFieldView'];['copyButtonView'];constructor(_0x4ab29e,_0x368627=''){super(_0x4ab29e),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x28f503=this['bindTemplate'];this['contentFieldView']=new bt(_0x4ab29e,_0x368627),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x28f503['if']('isVisible','ck-hidden',_0x4b8102=>!_0x4b8102)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x28f503['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 _0x1fec87=!0x1;this['on']('change:value',(_0x20d1dc,_0x5e27e5,_0x3b8c4d)=>{const _0x44dae4=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x3b8c4d),this['isProcessing']&&_0x44dae4&&!_0x1fec87&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x46ec86,_0x490ae2,_0xa11bcc)=>{_0x1fec87=!0x1,_0xa11bcc?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x1fec87=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x1fec87=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x5dd025=this['locale'],_0x20fe0d=new _0x4e6ac4(this['locale']),_0x57d7c9='ck-ai-form__copy-button';return _0x20fe0d['set']({'label':i(_0x5dd025,'Copy'),'icon':_0x2a92e5,'class':_0x57d7c9,'tooltip':!0x0}),_0x20fe0d['bind']('isVisible')['to'](this,'value',_0x284c60=>!!_0x284c60),_0x20fe0d['bind']('isEnabled')['to'](this,'isProcessing',_0xac41ea=>!_0xac41ea),_0x20fe0d['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x20fe0d['icon']=_0x1fe880,_0x20fe0d['class']=_0x57d7c9+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x20fe0d['icon']=_0x2a92e5,_0x20fe0d['class']=_0x57d7c9;},0x3e8);}),_0x20fe0d;}['_copyHTMLToClipboard'](_0x1d1f6f){const {window:_0xf73760,document:_0x336b86}=_0x330e0d;if(_0xf73760['ClipboardItem']){const {Blob:_0x4dfb82,ClipboardItem:_0x1bae22}=_0xf73760,_0x1cbc9e=[new _0x1bae22({'text/html':new _0x4dfb82([_0x1d1f6f['innerHTML']],{'type':'text/html'}),'text/plain':new _0x4dfb82([_0x1d1f6f['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x1cbc9e);}else{const _0x538c59=_0x336b86['createElement']('div');_0x538c59['style']['position']='absolute',_0x538c59['style']['left']='-9999px',_0x538c59['innerHTML']='<span>[</span>'+_0x1d1f6f['innerHTML']+'<span>]</span>',_0x336b86['body']['appendChild'](_0x538c59);const _0x3c5285=_0x336b86['createRange']();_0x3c5285['setStartAfter'](_0x538c59['firstElementChild']),_0x3c5285['setEndBefore'](_0x538c59['lastElementChild']);const _0x39283f=_0xf73760['getSelection']();_0x39283f['removeAllRanges'](),_0x39283f['addRange'](_0x3c5285),_0x336b86['execCommand']('copy'),_0x538c59['remove']();}}}class bt extends _0x23ffe4{constructor(_0x474a45,_0x400ad1=''){super(_0x474a45),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x400ad1,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x10ab77){this['element']['innerHTML']=_0x10ab77;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x3dee50=new _0x23ffe4(),_0x567d07=this['locale'],_0x359bc8=new _0x50bc2a();return _0x359bc8['isVisible']=!0x0,_0x3dee50['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x359bc8,{'text':i(_0x567d07,'AI\x20is\x20writing...')}]}),_0x3dee50['render'](),_0x3dee50;}}class mt extends _0x23ffe4{constructor(_0x200295,_0x4536b6=''){super(_0x200295);const _0x4ddaf5=new _0x276037(),_0x8cb00e=this['bindTemplate'];this['set']('text',_0x4536b6),_0x4ddaf5['content']=_0x4492c5,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4ddaf5,{'text':_0x8cb00e['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x2edd75,_0x2ce88e){super(_0x2edd75,_0x2ce88e),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',(_0x21b26d,_0x4b49ce)=>{_0x21b26d['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x4b49ce());});}['_createSubmitButton'](){const _0x1255a2=new _0x4e6ac4(this['locale']),_0x1892b6=this['locale'];return _0x1255a2['set']({'icon':it,'label':i(_0x1892b6,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x1255a2['on']('execute',()=>{this['submit']();}),_0x1255a2['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x274b9f,_0x3e84e6)=>!_0x274b9f&&_0x3e84e6),_0x1255a2;}['_createShowHistoryButton'](){const _0xd0199b=new _0x4e6ac4(this['locale']),_0x10e13d=this['resultsView'],_0x1a00bf=this['locale'];_0xd0199b['set']({'label':i(_0x1a00bf,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0xd0199b['bind']('isOn')['to'](_0x10e13d,'isVisible'),_0xd0199b['bind']('isEnabled')['to'](this,'isEnabled'),_0xd0199b['on']('execute',()=>{_0x10e13d['isVisible']=!_0x10e13d['isVisible'],_0x10e13d['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x512b8e=()=>{_0x330e0d['window']['requestAnimationFrame'](()=>{if(_0xeb7e24(this['element'])){const _0x1d6f87=new _0xccd7cf(this['queryView']['fieldView']['element']),_0x3cd11e=_0x1d6f87['width'],_0x3bb1df='rtl'===_0x1a00bf['uiLanguageDirection']?'left':'right';_0x1d6f87['excludeScrollbarsAndBorders'](),_0xd0199b['element']['style'][_0x3bb1df]=_0x3cd11e-_0x1d6f87['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x512b8e),this['on']('render',_0x512b8e),_0xd0199b;}['submit'](){const _0x4028de=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x4028de);}['focus'](_0x482f6c){-0x1===_0x482f6c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x2b2420){super(_0x2b2420),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x2b2420,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x113204=0x0;for(const _0x200c36 of this['items'])_0x113204+=_0x200c36['items']['length'];return{'resultsCount':_0x113204,'totalItemsCount':_0x113204};}['_createClearHistoryButton'](){const _0x455921=this['locale'],_0x1b61b3=new _0x4e6ac4(this['locale']);return _0x1b61b3['set']({'label':'('+i(_0x455921,'Clear')+')','withText':!0x0}),_0x1b61b3['on']('execute',()=>this['fire']('clearHistory')),_0x1b61b3;}}class ut extends xt{constructor(_0x5dff4d){super();const _0x2d89cd=new wt(),_0xa8c1dc=new _0x4e6ac4(this['locale'],_0x2d89cd);this['children']['add'](_0xa8c1dc),_0xa8c1dc['set']({'label':_0x5dff4d['prompt'],'withText':!0x0}),_0xa8c1dc['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x5dff4d['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x316043{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x11c6f4,_0x20d658)=>{const _0x5208f6=os(_0x20d658['prompt']);for(const _0x50028e of this)if(_0x50028e!=_0x20d658&&os(_0x50028e['prompt'])===_0x5208f6){this['remove'](_0x50028e);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x42e358=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x42e358));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x32aaee=>_0x32aaee)));}}function os(_0x14576f){return _0x14576f['toLowerCase']()['trim']();}class k extends _0x23ffe4{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x24da3e,_0x4c2206,_0x34a55c=''){super(_0x24da3e),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x24da3e),this['contentArea']=new ct(_0x24da3e,_0x34a55c),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 et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'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 _0x3ba966=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x4c2206],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x3ba966['if']('isError','ck-hidden',_0x1ceb13=>!_0x1ceb13)]},'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'](_0x3f2716=0x1){-0x1===_0x3f2716?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 _0x1b2865=this['locale'],_0x5a8b61=new lt(_0x1b2865,{'queryView':{'label':i(_0x1b2865,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x1b2865,'Empty\x20history'),'secondary':i(_0x1b2865,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x5a8b61['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x21e9c0,_0x57b1ea)=>_0x21e9c0&&!_0x57b1ea),this['listenTo'](_0x5a8b61,'submit',(_0x589ffb,_0x4dac29)=>{this['prompt']=_0x4dac29;const _0x7ece22=ft(_0x4dac29);this['fire']('submitPrompt',_0x7ece22),_0x4dac29['trim']()&&this['_promptHistory']['add']({'prompt':_0x7ece22},0x0);},{'priority':'high'}),_0x5a8b61;}['_createHistoryView'](){const _0x1efbcc=new pt(this['locale']);return _0x1efbcc['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x1efbcc['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x1efbcc;}['_createToolbar'](){const _0x1c5c63=new at(this['locale']);return _0x1c5c63['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2ca9bc,_0x49c955,_0x4cdcdd)=>_0x2ca9bc&&!_0x49c955&&!!_0x4cdcdd),_0x1c5c63['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x1c5c63['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x5d2350,_0x31eb1e,_0xce1b58)=>_0x5d2350&&!_0x31eb1e&&!!_0xce1b58),_0x1c5c63['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x1c5c63['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1af699,_0x110f76)=>_0x1af699&&!_0x110f76),_0x1c5c63['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x1c5c63['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x1c5c63['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x1c5c63;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x1272b1=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x1272b1,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x3c3b14){const _0x122408=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x3c3b14||i(_0x122408,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x10bc3a{['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[_0x480aee,a,x,_0x243330];}constructor(_0x2e03f4){super(_0x2e03f4),_0x2e03f4['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x2e03f4['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x2e03f4['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x2e03f4['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0xeab3e9}=this;this['_aiAdapter']=_0xeab3e9['plugins']['get'](x),this['_dialog']=_0xeab3e9['plugins']['get'](_0x243330),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x59dce5=new E(_0xeab3e9,Array['from'](this['_commandDefinitions']['values']()));_0xeab3e9['commands']['add']('showAIAssistant',_0x59dce5),_0xeab3e9['ui']['componentFactory']['add']('aiCommands',_0x2e9ec5=>{const _0x5a99b4=_0x3cb5fc(_0x2e9ec5);return _0x5a99b4['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x5a99b4['buttonView']['set']({'label':i(_0x2e9ec5,'AI\x20Commands'),'icon':_0x3fba16,'tooltip':!0x0}),_0x5a99b4['on']('execute',_0x136500=>this['_onExecute'](_0x136500['source']['id'])),_0xd9c24b(_0x5a99b4,_0xeab3e9['ui']['view']['body'],function(_0x263ed2){const _0x28c7bd=o(_0x263ed2['config']['get']('ai.aiAssistant.commands'),_0x263ed2['locale']),_0x6cc63=U(_0x263ed2,_0x28c7bd)['filter'](_0x3bc2dd=>_0x3bc2dd['commands']['length']);if(0x1===_0x6cc63['length'])return U(_0x263ed2,_0x6cc63[0x0]['commands'])['map'](_0x1681bc=>({'id':_0x1681bc['id'],'label':_0x1681bc['label']}));return _0x6cc63['map'](_0x2fa8ae=>{const {groupId:_0x242f2a,groupLabel:_0x54f0fd,commands:_0x2d4eac}=_0x2fa8ae,_0x48c849=U(_0x263ed2,_0x2d4eac)['map'](_0x67b491=>({'id':_0x67b491['id'],'label':_0x67b491['label']}));return{'id':_0x242f2a,'menu':_0x54f0fd||_0x242f2a,'children':_0x48c849};});}(_0xeab3e9),{'ariaLabel':i(_0x2e9ec5,'AI\x20Commands')}),_0x5a99b4['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x59dce5['on']('change:enabledCommandsIds',_0x7c09cf),_0x5a99b4['menuView']['once']('render',_0x7c09cf),_0x5a99b4;function _0x7c09cf(){_0x5a99b4['isEnabled']=_0x59dce5['enabledCommandsIds']['length']>0x0;for(const _0x348c2a of _0x5a99b4['menuView']['buttons'])_0x348c2a['isEnabled']=_0x59dce5['enabledCommandsIds']['includes'](_0x348c2a['id']);}}),_0xeab3e9['ui']['componentFactory']['add']('menuBar:aiCommands',_0x2126d2=>{const _0x127e1e=new _0x4e7f31(_0x2126d2);_0x127e1e['buttonView']['set']({'label':i(_0x2126d2,'AI\x20Commands'),'icon':_0x3fba16}),_0x127e1e['bind']('isEnabled')['to'](_0x59dce5,'enabledCommandsIds',_0x21078e=>_0x21078e['length']>0x0);const _0x224a5f=o(_0xeab3e9['config']['get']('ai.aiAssistant.commands'),_0x2126d2);return this['_populateMenuBarMenu'](_0x59dce5,_0x127e1e,_0x224a5f,_0x45af32=>this['_onExecute'](_0x45af32)),_0x127e1e;}),_0xeab3e9['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x5eda10=this['_createAIAssistantUIButton'](_0x4e6ac4);return _0x5eda10['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x5eda10;}),_0xeab3e9['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x1b215a=this['_createAIAssistantUIButton'](_0x26a9a5);return _0x1b215a['set']({'role':'menuitemcheckbox'}),_0x1b215a;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2100de=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x53cff2;for(const _0x13d5cd in _0x2100de){const _0x5e2668=_0x13d5cd,_0x102c80=_0x2100de[_0x5e2668];if('aiLicenseKeyValid'==_0x102c80||'aiLicenseKeyInvalid'==_0x102c80||'aiLicenseKeyExpired'==_0x102c80||'aiLicenseKeyDomainLimit'==_0x102c80||'aiLicenseKeyNotAllowed'==_0x102c80||'aiLicenseKeyEvaluationLimit'==_0x102c80||'aiLicenseKeyTrialLimit'==_0x102c80||'aiLicenseKeyUsageLimit'==_0x102c80){delete _0x2100de[_0x5e2668],_0x53cff2=_0x102c80,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x53cff2&&_0x2100de['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x53cff2&&_0x2100de['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x53cff2&&_0x2100de['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x53cff2&&_0x2100de['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x53cff2&&_0x2100de['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x53cff2&&_0x2100de['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x53cff2&&_0x2100de['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x5582a0='',_0x593a2f='',_0x4e786d='custom'){const _0x584dfe=this['editor'],_0x3c2288=_0x584dfe['editing']['view'],_0x44a425=_0x584dfe['plugins']['get'](a),_0xe3b9be=_0x584dfe['plugins']['get'](_0x480aee);_0x44a425['showFakeVisualSelection']();const _0x1f5f2f=new l(),_0x1fa8a4=new ClipboardEvent('copy',{'clipboardData':_0x1f5f2f}),_0x3a4655=new _0x1610c3(_0x1f5f2f),_0x5ba150=new _0x546334(_0x3c2288,_0x1fa8a4,{'dataTransfer':_0x3a4655});_0xe3b9be['_forceMarkersCopy']('comment',()=>{_0x3c2288['document']['fire']('copy',_0x5ba150);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x584dfe,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x561cb3=_0x3a4655['getData']('text/html');const _0xef5fc7=_0x584dfe['model']['document']['selection'],_0x4e8517=Array['from'](_0xef5fc7['getRanges']());0x1===_0x4e8517['length']&&_0x4e8517[0x0]['isFlat']&&!_0xef5fc7['getSelectedElement']()&&''!==_0x561cb3['replace'](/&nbsp;/g,'')['trim']()&&(_0x561cb3='<p>'+_0x561cb3+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x4e786d,'query':_0x5582a0,'htmlContent':_0x561cb3,'label':_0x593a2f,'mainActionLabel':_[_0x584dfe['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x13700b,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x546376['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x44a425['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x29a370=new Map(),_0x31a29b=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x3fac53 of _0x31a29b)for(const _0x21dca5 of _0x3fac53['commands'])_0x29a370['set'](_0x21dca5['id'],{..._0x21dca5,'groupId':_0x3fac53['groupId'],'groupLabel':_0x3fac53['groupLabel']||_0x3fac53['groupId']});return _0x29a370;}['_createAIAssistantUIButton'](_0xe5a59){const _0x546cae=this['editor'],_0x849fe6=_0x546cae['commands']['get']('showAIAssistant'),_0x5e965a=new _0xe5a59(_0x546cae['locale']);return _0x5e965a['set']({'label':i(_0x546cae['locale'],'AI\x20Assistant'),'icon':_0x13700b,'isToggleable':!0x0}),_0x5e965a['bind']('isEnabled')['to'](_0x849fe6),_0x5e965a['bind']('isOn')['to'](this['_dialog'],'id',_0x15c9ea=>'aiAssistant'===_0x15c9ea),this['listenTo'](_0x5e965a,'execute',()=>{_0x5e965a['isOn']?this['hideUI']():_0x849fe6['execute']();}),_0x5e965a;}['_initView'](){const _0x308065=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',()=>{_0x308065['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x308065['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x31831f,ui:{ariaLiveAnnouncer:_0x584142}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x16acab,_0x77ba2b,_0x550e65)=>{const _0x5969da=this['_aiAssistantController']['currentContext'];_0x550e65?_0x584142['announce'](i(_0x31831f,'AI\x20is\x20writing')):_0x5969da&&_0x584142['announce'](i(_0x31831f,'Generated\x20content:\x20%0',_0x5969da),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x22ac81,_0x4c20f8,_0x5c726d)=>{if(_0x5c726d){const _0x381917=this['_formView']['errorView']['text'];_0x584142['announce'](i(_0x31831f,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x381917));}});}['_onExecute'](_0x4e2a88){const _0x304461=this['_commandDefinitions']['get'](_0x4e2a88),_0x39dd81=this['editor'],_0x474a02=_0x39dd81['model']['document']['selection'],_0x4d17ac=_0x39dd81['commands']['get']('showAIAssistant'),_0x15d75f=_0x39dd81['plugins']['get'](a),_0x5c3b15=''+(_0x304461['groupId']!==K?_0x304461['groupLabel']+':\x20':'')+_0x304461['label'];if(!0x1!==_0x304461['requiresContent']&&_0x474a02['isCollapsed']){const _0x40b022=_0x44987d(_0x474a02['getSelectedBlocks']())||_0x39dd81['model']['schema']['getLimitElement'](_0x474a02);_0x39dd81['model']['change'](_0x1a6796=>{_0x1a6796['setSelection'](_0x40b022,'in');});}_0x15d75f['showFakeVisualSelection'](),_0x4d17ac['execute'](_0x304461['prompt'],_0x5c3b15,'command:'+_0x4e2a88);}['_populateMenuBarMenu'](_0x2a6e1d,_0x1dcd97,_0x10c559,_0x28018a){const _0xf37d9e=this['editor'],_0x5d931b=_0xf37d9e['locale'],_0x2c15d4=new _0x169506(_0x5d931b),_0x367f72=U(_0xf37d9e,_0x10c559)['filter'](_0x104518=>_0x104518['commands']['length']);0x1===_0x367f72['length']?this['_getMenuBarGroupButtons']({'command':_0x2a6e1d,'commands':_0x367f72[0x0]['commands'],'parentMenuView':_0x1dcd97,'onExecute':_0x28018a})['forEach'](_0x3cd007=>_0x2c15d4['items']['add'](_0x3cd007)):_0x367f72['forEach'](({groupId:_0x2c403e,groupLabel:_0x31e92a,commands:_0x5e6795})=>{const _0x56cb6e=new _0x581f49(_0x5d931b,_0x1dcd97),_0x4160aa=new _0x4e7f31(_0x5d931b),_0x5c71a2=new _0x169506(_0x5d931b),_0x4d7fc4=this['_getMenuBarGroupButtons']({'command':_0x2a6e1d,'commands':_0x5e6795,'parentMenuView':_0x4160aa,'onExecute':_0x28018a});_0x4160aa['buttonView']['set']({'label':_0x31e92a||_0x2c403e}),_0x4160aa['delegate']('execute')['to'](_0x1dcd97),_0x5c71a2['items']['addMany'](_0x4d7fc4),_0x4160aa['panelView']['children']['add'](_0x5c71a2),_0x56cb6e['children']['add'](_0x4160aa),_0x2c15d4['items']['add'](_0x56cb6e);}),_0x1dcd97['panelView']['children']['add'](_0x2c15d4);}['_getMenuBarGroupButtons']({command:_0x12adee,commands:_0x53cdac,parentMenuView:_0x39fa55,onExecute:_0x386196}){const _0x55259c=this['editor'],_0x1e8474=_0x55259c['locale'];return U(_0x55259c,_0x53cdac)['map'](_0x346e86=>{const _0x559c4d=new _0x581f49(_0x1e8474,_0x39fa55),_0x5378a9=new _0x26a9a5(_0x1e8474);return _0x5378a9['set']({'label':_0x346e86['label']}),_0x5378a9['delegate']('execute')['to'](_0x39fa55),_0x5378a9['on']('execute',()=>_0x386196(_0x346e86['id'])),_0x5378a9['bind']('isEnabled')['to'](_0x12adee,'enabledCommandsIds',_0x2921f4=>_0x2921f4['includes'](_0x346e86['id'])),_0x559c4d['children']['add'](_0x5378a9),_0x559c4d;});}}function T(_0x3e1177,_0x28d56a){return void 0x0!==_0x3e1177['order']&&void 0x0===_0x28d56a['order']?0x1:void 0x0===_0x3e1177['order']&&void 0x0!==_0x28d56a['order']?-0x1:void 0x0!==_0x3e1177['order']&&void 0x0!==_0x28d56a['order']?_0x3e1177['order']-_0x28d56a['order']:0x0;}function U(_0x17fe26,_0x1e5070){_0x1e5070['sort'](T);const _0x4976f9={},_0x47c076=[];for(const _0x5b4921 of _0x1e5070)if(void 0x0!==_0x5b4921['order']){if(_0x5b4921['order']in _0x4976f9)throw new _0x392644('ai-commands-config-order-collision',_0x17fe26,{'conflictingDefinitions':[_0x5b4921,_0x4976f9[_0x5b4921['order']]]});_0x4976f9[_0x5b4921['order']]=_0x5b4921,_0x47c076['splice'](_0x5b4921['order'],0x0,_0x5b4921);}else _0x47c076['push'](_0x5b4921);return _0x47c076;}class At extends _0x10bc3a{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x58e0e4){super(_0x58e0e4);const _0x5d7afe=_0x58e0e4['config'],_0x315ba7=_0x58e0e4['locale'];_0x5d7afe['define']('ai.aiAssistant.preserveComments',!0x0),_0x5d7afe['define']('ai.aiAssistant.commands',_t(_0x315ba7)),_0x5d7afe['define']('ai.aiAssistant.extraCommandGroups',[]),_0x5d7afe['define']('ai.aiAssistant.removeCommands',[]);let _0x427f63=o(_0x5d7afe['get']('ai.aiAssistant.commands'),_0x315ba7);const _0x5ce764=_0x5d7afe['get']('ai.aiAssistant.extraCommandGroups'),_0x597d8b=_0x5d7afe['get']('ai.aiAssistant.removeCommands');_0x5ce764['forEach'](_0x2bc6ac=>{const _0x388b85=_0x427f63['find'](_0x249ce3=>_0x249ce3['groupId']===_0x2bc6ac['groupId']);_0x388b85?_0x388b85['commands']=_0x388b85['commands']['concat'](_0x2bc6ac['commands']):_0x427f63['push'](_0x2bc6ac);}),_0x427f63=_0x427f63['filter'](_0x16f4c5=>!_0x597d8b['includes'](_0x16f4c5['groupId'])),_0x427f63['forEach'](_0x3befbc=>{_0x3befbc['commands']=_0x3befbc['commands']['filter'](_0x1bfb8a=>!_0x597d8b['includes'](_0x1bfb8a['id']));}),_0x5d7afe['set']('ai.aiAssistant.commands',_0x427f63);}}function _t(_0x5d358f){return[{'groupId':'editOrReview','groupLabel':i(_0x5d358f,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x5d358f,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x5d358f,'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(_0x5d358f,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x5d358f,'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(_0x5d358f,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x5d358f,'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(_0x5d358f,'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(_0x5d358f,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x5d358f,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x5d358f,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x5d358f,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x5d358f,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x5d358f,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x5d358f,'Change\x20style'),'commands':[{'id':'business','label':i(_0x5d358f,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x5d358f,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x5d358f,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x5d358f,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x5d358f,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x5d358f,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x5d358f,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x5d358f,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x5d358f,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x5d358f,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x5d358f,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x5d358f,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x5d358f,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x10bc3a{['abortController'];static get['requires'](){return[x];}constructor(_0x329430){super(_0x329430),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x1462ac){return this['sendRequest'](_0x1462ac)['catch'](_0x34c368=>{if(_0x34c368 instanceof R)return Promise['reject'](_0x34c368);if('AbortError'==_0x34c368['name'])return Promise['resolve']();throw console['error'](_0x34c368),new _0x392644('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x47e7fb,_0x473737){const _0xd2ee29=this['editor']['locale'],_0x34fb63={'Content-Type':'application/json'};if('object'==typeof _0x47e7fb)Object['assign'](_0x34fb63,_0x47e7fb);else{if(_0x47e7fb)try{const _0x4946fc=await _0x47e7fb(_0x473737);Object['assign'](_0x34fb63,_0x4946fc);}catch{return Promise['reject'](new R(i(_0xd2ee29,'AI_ERROR_GET_HEADERS')));}}return _0x34fb63;}async['_prepareRequestParameters'](_0x10d6c6,_0x334079){const _0x2f359d=this['editor']['locale'];if('object'==typeof _0x10d6c6)return _0x10d6c6;try{return await _0x10d6c6(_0x334079);}catch{return Promise['reject'](new R(i(_0x2f359d,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x52f4f){super(_0x52f4f),_0x52f4f['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x52f4f['config']['get']('ai.openAI.requestParameters')||_0x52f4f['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x52f4f['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x52f4f['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x52f4f['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x37b55e,context:_0x529816,onData:_0x374caf,actionId:_0x36ecf0}){const _0x5027d0=this['editor']['locale'],_0x5e1484=await this['prepareMessages'](_0x37b55e,_0x529816,_0x36ecf0),_0x546a31=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x36ecf0),_0x5e02da=await this['_prepareRequestParameters'](this['_requestParameters'],_0x36ecf0),_0x32936a={'messages':_0x5e1484,..._0x5e02da},_0x1f4d7f={'method':'POST','headers':_0x546a31,'body':JSON['stringify'](_0x32936a),'signal':this['abortController']['signal']},_0x4f9c6b=await fetch(this['_apiUrl'],_0x1f4d7f);if(_0x4f9c6b['ok'])return _0x5e02da['stream']?await this['_readStreamableResponse'](_0x4f9c6b,_0x374caf):await this['_readStaticResponse'](_0x4f9c6b,_0x374caf),Promise['resolve']();{const _0x1779db=await _0x4f9c6b['text']();return _0x1779db['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x5027d0,'AI_ERROR_CONTEXT_LENGTH'))):_0x1779db['includes']('Moderation')?Promise['reject'](new R(i(_0x5027d0,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x1779db));}}async['prepareMessages'](_0x3bcf85,_0x7cd7bd,_0xc0ff0){let _0x468fde,_0x9eb7ed;return _0x7cd7bd?(_0x468fde='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.',_0x9eb7ed='Instruction:\x0a'+_0x3bcf85+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x7cd7bd):(_0x468fde='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.',_0x9eb7ed=_0x3bcf85),[{'role':'system','content':_0x468fde},{'role':'user','content':_0x9eb7ed}];}async['_readStreamableResponse'](_0x4f0426,_0x3ddd96){const _0x831e70=_0x4f0426['body']['getReader'](),_0x2aee0b=new TextDecoder();let _0x4b299b='',_0x570464='',_0xa13d0a='',_0x4244f6=!0x1;for(;!_0x4244f6;){const {done:_0x41d02b,value:_0x1ae6f8}=await _0x831e70['read'](),_0x2f9ae9=_0x4b299b+_0x2aee0b['decode'](_0x1ae6f8);let _0x1502f7='';_0x4244f6=_0x41d02b;try{_0x1502f7=this['_cleanUpData'](_0x2f9ae9),_0x4b299b='';}catch{_0x4b299b=_0x2f9ae9;continue;}_0x570464+=_0x1502f7,!_0x4244f6&&this['_isBufferIncomplete'](_0x570464)||_0x570464&&(_0xa13d0a+=_0x570464,_0x570464='',_0x3ddd96(_0xa13d0a));}return Promise['resolve']();}async['_readStaticResponse'](_0x161e55,_0x2ac1d4){return _0x2ac1d4((await _0x161e55['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x318b1b){const _0x5aaf79=_0x318b1b['split']('<')['length']!==_0x318b1b['split']('>')['length'],_0xffe5be=_0x318b1b['length']<0x1e;return _0x5aaf79&&_0xffe5be;}['_cleanUpData'](_0x1a1d26){return _0x1a1d26['split'](/\n(?![^{]*\})/g)['map'](_0x227219=>_0x227219['replace']('data:\x20',''))['filter'](_0x420604=>_0x420604&&_0x420604['length']>0x0&&'[DONE]'!==_0x420604)['map'](_0x485211=>{const {choices:_0x40926a}=JSON['parse'](_0x485211);if(_0x40926a[0x0]?.['delta']?.['content'])return _0x40926a[0x0]['delta']['content'];})['filter'](_0x4953e5=>_0x4953e5)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x955bf6){super(_0x955bf6),_0x955bf6['config']['get']('ai.aws.requestParameters')||_0x955bf6['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']=_0x955bf6['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x955bf6['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x955bf6['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x955bf6['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x25becb,context:_0x5bdcef,onData:_0x4b7728,actionId:_0x4441e6}){const {model:_0x50e663,stream:_0x5d2deb,..._0x332db4}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4441e6),_0x482205={'prompt':await this['preparePrompt'](_0x25becb,_0x5bdcef,_0x50e663,_0x4441e6),..._0x332db4};this['_apiUrl']?await this['_processProxyRequest'](_0x482205,_0x50e663,_0x5d2deb,_0x4b7728,_0x4441e6):await this['_processAWSRequest'](_0x482205,_0x50e663,_0x5d2deb,_0x4b7728);}async['preparePrompt'](_0x128594,_0x2a2ccd,_0x2a97eb,_0x5aacd5){let _0x1a9798,_0x5cd63d;return _0x2a2ccd?(_0x1a9798='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.',_0x5cd63d='Instruction:\x0a'+_0x128594+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x2a2ccd):(_0x1a9798='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.',_0x5cd63d=_0x128594),'meta.llama'==this['getModelFamily'](_0x2a97eb)?'<<SYS>>\x0a'+_0x1a9798+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x5cd63d+'\x0a[/INST]':'Human:\x0a'+_0x1a9798+'\x0a'+_0x5cd63d+'\x0a\x0aAssistant:';}['getModelFamily'](_0x34ca27){if(/^anthropic\.claude/['test'](_0x34ca27))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x34ca27))return'ai21.j2';if(/^cohere\.command/['test'](_0x34ca27))return'cohere.command';if(/^meta\.llama/['test'](_0x34ca27))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x34ca27));}async['_processProxyRequest'](_0x4ea3e0,_0x315319,_0xfca598,_0x1527ed,_0x2384a0){const _0x1600b3={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x2384a0),'body':JSON['stringify']({..._0x4ea3e0,'model':_0x315319,'stream':_0xfca598}),'signal':this['abortController']['signal']},_0x28f72d=await fetch(this['_apiUrl'],_0x1600b3);_0xfca598?await this['_readStreamableResponse'](_0x28f72d,_0x315319,_0x1527ed):await this['_readStaticResponse'](_0x28f72d,_0x315319,_0x1527ed);}async['_processAWSRequest'](_0x59303a,_0x9c363b,_0x556467,_0x357ead){const _0x2df322=new _0x2f9aa6(this['_bedrockClientConfig']),_0x4ee728={'body':JSON['stringify'](_0x59303a),'contentType':'application/json','accept':'application/json','modelId':_0x9c363b};let _0x9025b5;if(_0x556467){const _0x2199dc=new _0x8108be(_0x4ee728);_0x9025b5=await _0x2df322['send'](_0x2199dc,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x9025b5,_0x9c363b,_0x357ead);}else{const _0x16825b=new _0x5e0609(_0x4ee728);_0x9025b5=await _0x2df322['send'](_0x16825b,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x9025b5,_0x9c363b,_0x357ead);}}async['_readAsyncIterableResponse'](_0x2804fc,_0x41afa2,_0x347308){const _0x338682=_0x2804fc['body'],_0x23018d=new TextDecoder('utf-8');let _0x286917='';for await(const _0x57bc42 of _0x338682)if(_0x57bc42['chunk']){const _0x15ebff=_0x23018d['decode'](_0x57bc42['chunk']['bytes']),_0x2497b5=JSON['parse'](_0x15ebff);_0x286917+=this['_getGeneratedText'](_0x2497b5,_0x41afa2),_0x347308(_0x286917);}return Promise['resolve']();}async['_readStreamableResponse'](_0x185940,_0x58a448,_0x42ded6){const _0x1b8060=_0x185940['body'],_0x25e3f4=new TextDecoder('utf-8'),_0x37e2cb=_0x1b8060['getReader']();let _0x261115='',_0x496196='',_0x92c569=!0x1;for(;!_0x92c569;){const {done:_0x43555a,value:_0x285c02}=await _0x37e2cb['read']();if(_0x92c569=_0x43555a,_0x92c569)break;const _0x57f114=(_0x261115+_0x25e3f4['decode'](_0x285c02))['split']('\x0a')['map'](_0x5aac46=>{try{return _0x261115='',JSON['parse'](_0x5aac46);}catch{return _0x261115=_0x5aac46,null;}})['filter'](_0x21ed7e=>null!==_0x21ed7e);_0x57f114['length']&&(_0x496196+=_0x57f114['map'](_0x328c4e=>this['_getGeneratedText'](_0x328c4e,_0x58a448))['join'](''),_0x42ded6(_0x496196));}return Promise['resolve']();}async['_readStaticResponse'](_0x25c2de,_0x2806bc,_0x3091dd){let _0x565e45;return _0x565e45=_0x25c2de instanceof Response?await _0x25c2de['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x25c2de['body'])),(_0x3091dd(this['_getGeneratedText'](_0x565e45,_0x2806bc)),Promise['resolve']());}['_getGeneratedText'](_0x19287c,_0x44b3e4){switch(this['getModelFamily'](_0x44b3e4)){case'anthropic.claude':return _0x19287c['completion'];case'ai21.j2':return _0x19287c['completions'][0x0]['data']['text'];case'cohere.command':return _0x19287c['generations'][0x0]['text'];case'meta.llama':return _0x19287c['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
@@ -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':_0x4cfd07=>0x1!=_0x4cfd07}};
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':_0x2e1427=>0x1!=_0x2e1427}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x561e4d=>{const {af:{dictionary:_0x527cd0,getPluralForm:_0x5392bc}}={'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':_0x18c7b6=>0x1!=_0x18c7b6}};_0x561e4d['af']||={'dictionary':{},'getPluralForm':null},_0x561e4d['af']['dictionary']=Object['assign'](_0x561e4d['af']['dictionary'],_0x527cd0),_0x561e4d['af']['getPluralForm']=_0x5392bc;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x93c58f=>{const {af:{dictionary:_0x582206,getPluralForm:_0x33b5f6}}={'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':_0x4c78d4=>0x1!=_0x4c78d4}};_0x93c58f['af']||={'dictionary':{},'getPluralForm':null},_0x93c58f['af']['dictionary']=Object['assign'](_0x93c58f['af']['dictionary'],_0x582206),_0x93c58f['af']['getPluralForm']=_0x33b5f6;})(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':_0x1a0783=>0x0==_0x1a0783?0x0:0x1==_0x1a0783?0x1:0x2==_0x1a0783?0x2:_0x1a0783%0x64>=0x3&&_0x1a0783%0x64<=0xa?0x3:_0x1a0783%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':_0x7d8dd1=>0x0==_0x7d8dd1?0x0:0x1==_0x7d8dd1?0x1:0x2==_0x7d8dd1?0x2:_0x7d8dd1%0x64>=0x3&&_0x7d8dd1%0x64<=0xa?0x3:_0x7d8dd1%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x1381fb=>{const {ar:{dictionary:_0x5804e3,getPluralForm:_0x43d3f4}}={'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':_0x5b6e40=>0x0==_0x5b6e40?0x0:0x1==_0x5b6e40?0x1:0x2==_0x5b6e40?0x2:_0x5b6e40%0x64>=0x3&&_0x5b6e40%0x64<=0xa?0x3:_0x5b6e40%0x64>=0xb?0x4:0x5}};_0x1381fb['ar']||={'dictionary':{},'getPluralForm':null},_0x1381fb['ar']['dictionary']=Object['assign'](_0x1381fb['ar']['dictionary'],_0x5804e3),_0x1381fb['ar']['getPluralForm']=_0x43d3f4;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x998771=>{const {ar:{dictionary:_0x542b5a,getPluralForm:_0x42bc59}}={'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':_0x48e552=>0x0==_0x48e552?0x0:0x1==_0x48e552?0x1:0x2==_0x48e552?0x2:_0x48e552%0x64>=0x3&&_0x48e552%0x64<=0xa?0x3:_0x48e552%0x64>=0xb?0x4:0x5}};_0x998771['ar']||={'dictionary':{},'getPluralForm':null},_0x998771['ar']['dictionary']=Object['assign'](_0x998771['ar']['dictionary'],_0x542b5a),_0x998771['ar']['getPluralForm']=_0x42bc59;})(window['CKEDITOR_TRANSLATIONS']||={});