@ckeditor/ckeditor5-ai 44.3.0-alpha.3 → 44.3.0-alpha.5

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 (168) 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/bg.js +1 -1
  12. package/dist/translations/bg.umd.js +1 -1
  13. package/dist/translations/bn.js +1 -1
  14. package/dist/translations/bn.umd.js +1 -1
  15. package/dist/translations/bs.js +1 -1
  16. package/dist/translations/bs.umd.js +1 -1
  17. package/dist/translations/ca.js +1 -1
  18. package/dist/translations/ca.umd.js +1 -1
  19. package/dist/translations/cs.js +1 -1
  20. package/dist/translations/cs.umd.js +1 -1
  21. package/dist/translations/da.js +1 -1
  22. package/dist/translations/da.umd.js +1 -1
  23. package/dist/translations/de-ch.js +1 -1
  24. package/dist/translations/de-ch.umd.js +1 -1
  25. package/dist/translations/de.js +1 -1
  26. package/dist/translations/de.umd.js +1 -1
  27. package/dist/translations/el.js +1 -1
  28. package/dist/translations/el.umd.js +1 -1
  29. package/dist/translations/en-au.js +1 -1
  30. package/dist/translations/en-au.umd.js +1 -1
  31. package/dist/translations/en-gb.js +1 -1
  32. package/dist/translations/en-gb.umd.js +1 -1
  33. package/dist/translations/en.js +1 -1
  34. package/dist/translations/en.umd.js +1 -1
  35. package/dist/translations/eo.js +1 -1
  36. package/dist/translations/eo.umd.js +1 -1
  37. package/dist/translations/es-co.js +1 -1
  38. package/dist/translations/es-co.umd.js +1 -1
  39. package/dist/translations/es.js +1 -1
  40. package/dist/translations/es.umd.js +1 -1
  41. package/dist/translations/et.js +1 -1
  42. package/dist/translations/et.umd.js +1 -1
  43. package/dist/translations/eu.js +1 -1
  44. package/dist/translations/eu.umd.js +1 -1
  45. package/dist/translations/fa.js +1 -1
  46. package/dist/translations/fa.umd.js +1 -1
  47. package/dist/translations/fi.js +1 -1
  48. package/dist/translations/fi.umd.js +1 -1
  49. package/dist/translations/fr.js +1 -1
  50. package/dist/translations/fr.umd.js +1 -1
  51. package/dist/translations/gl.js +1 -1
  52. package/dist/translations/gl.umd.js +1 -1
  53. package/dist/translations/gu.js +1 -1
  54. package/dist/translations/gu.umd.js +1 -1
  55. package/dist/translations/he.js +1 -1
  56. package/dist/translations/he.umd.js +1 -1
  57. package/dist/translations/hi.js +1 -1
  58. package/dist/translations/hi.umd.js +1 -1
  59. package/dist/translations/hr.js +1 -1
  60. package/dist/translations/hr.umd.js +1 -1
  61. package/dist/translations/hu.js +1 -1
  62. package/dist/translations/hu.umd.js +1 -1
  63. package/dist/translations/hy.js +1 -1
  64. package/dist/translations/hy.umd.js +1 -1
  65. package/dist/translations/id.js +1 -1
  66. package/dist/translations/id.umd.js +1 -1
  67. package/dist/translations/it.js +1 -1
  68. package/dist/translations/it.umd.js +1 -1
  69. package/dist/translations/ja.js +1 -1
  70. package/dist/translations/ja.umd.js +1 -1
  71. package/dist/translations/jv.js +1 -1
  72. package/dist/translations/jv.umd.js +1 -1
  73. package/dist/translations/kk.js +1 -1
  74. package/dist/translations/kk.umd.js +1 -1
  75. package/dist/translations/km.js +1 -1
  76. package/dist/translations/km.umd.js +1 -1
  77. package/dist/translations/kn.js +1 -1
  78. package/dist/translations/kn.umd.js +1 -1
  79. package/dist/translations/ko.js +1 -1
  80. package/dist/translations/ko.umd.js +1 -1
  81. package/dist/translations/ku.js +1 -1
  82. package/dist/translations/ku.umd.js +1 -1
  83. package/dist/translations/lt.js +1 -1
  84. package/dist/translations/lt.umd.js +1 -1
  85. package/dist/translations/lv.js +1 -1
  86. package/dist/translations/lv.umd.js +1 -1
  87. package/dist/translations/ms.js +1 -1
  88. package/dist/translations/ms.umd.js +1 -1
  89. package/dist/translations/nb.js +1 -1
  90. package/dist/translations/nb.umd.js +1 -1
  91. package/dist/translations/ne.js +1 -1
  92. package/dist/translations/ne.umd.js +1 -1
  93. package/dist/translations/nl.js +1 -1
  94. package/dist/translations/nl.umd.js +1 -1
  95. package/dist/translations/no.js +1 -1
  96. package/dist/translations/no.umd.js +1 -1
  97. package/dist/translations/oc.js +1 -1
  98. package/dist/translations/oc.umd.js +1 -1
  99. package/dist/translations/pl.js +1 -1
  100. package/dist/translations/pl.umd.js +1 -1
  101. package/dist/translations/pt-br.js +1 -1
  102. package/dist/translations/pt-br.umd.js +1 -1
  103. package/dist/translations/pt.js +1 -1
  104. package/dist/translations/pt.umd.js +1 -1
  105. package/dist/translations/ro.js +1 -1
  106. package/dist/translations/ro.umd.js +1 -1
  107. package/dist/translations/ru.js +1 -1
  108. package/dist/translations/ru.umd.js +1 -1
  109. package/dist/translations/si.js +1 -1
  110. package/dist/translations/si.umd.js +1 -1
  111. package/dist/translations/sk.js +1 -1
  112. package/dist/translations/sk.umd.js +1 -1
  113. package/dist/translations/sl.js +1 -1
  114. package/dist/translations/sl.umd.js +1 -1
  115. package/dist/translations/sq.js +1 -1
  116. package/dist/translations/sq.umd.js +1 -1
  117. package/dist/translations/sr-latn.js +1 -1
  118. package/dist/translations/sr-latn.umd.js +1 -1
  119. package/dist/translations/sr.js +1 -1
  120. package/dist/translations/sr.umd.js +1 -1
  121. package/dist/translations/sv.js +1 -1
  122. package/dist/translations/sv.umd.js +1 -1
  123. package/dist/translations/th.js +1 -1
  124. package/dist/translations/th.umd.js +1 -1
  125. package/dist/translations/ti.js +1 -1
  126. package/dist/translations/ti.umd.js +1 -1
  127. package/dist/translations/tk.js +1 -1
  128. package/dist/translations/tk.umd.js +1 -1
  129. package/dist/translations/tr.js +1 -1
  130. package/dist/translations/tr.umd.js +1 -1
  131. package/dist/translations/tt.js +1 -1
  132. package/dist/translations/tt.umd.js +1 -1
  133. package/dist/translations/ug.js +1 -1
  134. package/dist/translations/ug.umd.js +1 -1
  135. package/dist/translations/uk.js +1 -1
  136. package/dist/translations/uk.umd.js +1 -1
  137. package/dist/translations/ur.js +1 -1
  138. package/dist/translations/ur.umd.js +1 -1
  139. package/dist/translations/uz.js +1 -1
  140. package/dist/translations/uz.umd.js +1 -1
  141. package/dist/translations/vi.js +1 -1
  142. package/dist/translations/vi.umd.js +1 -1
  143. package/dist/translations/zh-cn.js +1 -1
  144. package/dist/translations/zh-cn.umd.js +1 -1
  145. package/dist/translations/zh.js +1 -1
  146. package/dist/translations/zh.umd.js +1 -1
  147. package/package.json +9 -9
  148. package/src/adapters/aiadapter.js +1 -1
  149. package/src/adapters/aitextadapter.js +1 -1
  150. package/src/adapters/awstextadapter.js +1 -1
  151. package/src/adapters/openaitextadapter.js +1 -1
  152. package/src/aiassistant.js +1 -1
  153. package/src/aiassistantediting.js +1 -1
  154. package/src/aiassistantui.js +1 -1
  155. package/src/index.js +1 -1
  156. package/src/legacyerrors.js +1 -1
  157. package/src/ui/aiassistantcontroller.js +2 -2
  158. package/src/ui/form/aiformcontentarea.js +1 -1
  159. package/src/ui/form/aiformerrorview.js +1 -1
  160. package/src/ui/form/aiformpromptview.js +1 -1
  161. package/src/ui/form/aiformtoolbarview.js +1 -1
  162. package/src/ui/form/aiformview.js +1 -1
  163. package/src/ui/form/aihistorylistitemview.js +1 -1
  164. package/src/ui/form/aihistorylistview.js +1 -1
  165. package/src/ui/form/prompthistory.js +1 -1
  166. package/src/ui/showaiassistantcommand.js +1 -1
  167. package/src/utils/common-translations.js +1 -1
  168. 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 _0x168661,Command as _0x35ac5d,icons as _0x333562}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x56b11d,CKEditorError as _0x398ace,ObservableMixin as _0x2790c7,global as _0x5b9a8c,isVisible as it,Rect as st,Collection as _0x4aa76a,FocusTracker as _0x430094,KeystrokeHandler as ts,first as _0x193f29}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as nt,ButtonView as _0x199d88,View as _0x4e48f5,SpinnerView as _0x5a4df3,IconView as _0x544509,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0xb5146e,ButtonLabelView as te,FocusCycler as _0x43557f,createLabeledTextarea as _0x158201,Dialog as _0x444672,createDropdown as _0x492dc9,addMenuToDropdown as _0x551bc4,MenuBarMenuView as _0x5aa9c6,MenuBarMenuListItemButtonView as _0x1a42ca,DialogViewPosition as _0x279bd1,MenuBarMenuListView as _0x558ef1,MenuBarMenuListItemView as _0x448066}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as ct}from'ckeditor5-collaboration/dist/index.js';import{ClipboardPipeline as _0x596e08,ClipboardMarkersUtils as _0x2f192a}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0xa654a1,DataTransfer as _0x1a7d11,UpcastWriter as _0x181f34,Matcher as _0x41b47d}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x5a21fa,escape as _0x510345}from'lodash-es';import{BedrockRuntimeClient as _0x331464,InvokeModelWithResponseStreamCommand as _0x37025e,InvokeModelCommand as _0x479582}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x4e1e11,_0x3f955a){const _0x420f40=(0x0,_0x3f955a['t'])('Other');return _0x4e1e11['length']?'groupId'in _0x4e1e11[0x0]?_0x4e1e11:[{'groupId':x,'groupLabel':_0x420f40,'order':0x1/0x0,'commands':_0x4e1e11}]:[{'groupId':x,'groupLabel':_0x420f40,'order':0x1/0x0,'commands':[]}];}const dt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x168661{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x21368f}=this,_0x88e0d1=['ck-fake-ai-selection'];_0x21368f['config']['get']('ai.useTheme')&&_0x88e0d1['push']('ck-ai-assistant-ui_theme'),_0x21368f['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x88e0d1,'priority':0xc}}),_0x21368f['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x272df0,{writer:_0x28ab7d})=>{if(!_0x272df0['markerRange']['isCollapsed'])return null;const _0x311360=_0x28ab7d['createUIElement']('span');return _0x28ab7d['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x311360),_0x311360;}});}['afterInit'](){!async function(_0x1b3440){const _0x2a48a8=_0x596725([0x4d,0x78,0x65,0x46,0x53,0x62,0x56,0x55,0x41,0x33,0x70,0x36,0x63,0x66,0x74,0x6d,0x68,0x4f,0x49,0x4c,0x72,0x35,0x32,0x69,0x76,0x6a,0x34,0x48,0x71,0x58,0x6f,0x6e,0x37,0x39,0x67,0x73,0x4e,0x50,0x77,0x4b,0x5a,0x61,0x42,0x47,0x44,0x4a,0x38,0x30,0x54,0x45,0x57,0x43,0x79,0x59,0x52,0x7a,0x51,0x6b,0x6c,0x64,0x75,0x31]),_0x33de54=0x3cfc86f2,_0x37ffe9=0x3cfbe612^_0x33de54,_0xeaeeed=window[_0x596725([0x44,0x61,0x74,0x65])][_0x596725([0x6e,0x6f,0x77])](),_0xc4a562=_0x1b3440[_0x596725([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xa74894=new window[(_0x596725([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x206ff0=>{_0xc4a562[_0x596725([0x6f,0x6e,0x63,0x65])](_0x596725([0x72,0x65,0x61,0x64,0x79]),_0x206ff0);}),_0x1a1cec={[_0x596725([0x6b,0x74,0x79])]:_0x596725([0x45,0x43]),[_0x596725([0x75,0x73,0x65])]:_0x596725([0x73,0x69,0x67]),[_0x596725([0x63,0x72,0x76])]:_0x596725([0x50,0x2d,0x32,0x35,0x36]),[_0x596725([0x78])]:_0x596725([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]),[_0x596725([0x79])]:_0x596725([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]),[_0x596725([0x61,0x6c,0x67])]:_0x596725([0x45,0x53,0x32,0x35,0x36])},_0x2bbe9f=_0xc4a562[_0x596725([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x596725([0x67,0x65,0x74])](_0x596725([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1e946(){let _0x41d5a2,_0x1f50e1=null,_0x16fbe9=null;try{if(_0x2bbe9f==_0x596725([0x47,0x50,0x4c]))return _0x596725([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x41d5a2=_0x59cf20(),!_0x41d5a2)return _0x596725([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x41d5a2[_0x596725([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x16fbe9=_0x3e8826(_0x41d5a2[_0x596725([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x41d5a2[_0x596725([0x6a,0x74,0x69])])),await _0x687d92()?_0x563438()?_0x5a96b7()?_0x596725([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1d90a3()?(_0x41d5a2[_0x596725([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x596725([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1f50e1=_0x153d3b(_0x596725([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x41d5a2[_0x596725([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x596725([0x74,0x72,0x69,0x61,0x6c])&&(_0x1f50e1=_0x153d3b(_0x596725([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2ecd80()):_0x596725([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x596725([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x596725([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x347e95){return _0x596725([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5a96b7(){const _0x20f948=[_0x596725([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x596725([0x74,0x72,0x69,0x61,0x6c])][_0x596725([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41d5a2[_0x596725([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xeaeeed/0x3e8:0xe10*_0x37ffe9;return _0x41d5a2[_0x596725([0x65,0x78,0x70])]<_0x20f948;}function _0x563438(){const _0x1e7d3b=_0x41d5a2[_0x596725([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1e7d3b&&(!!_0x1e7d3b[_0x596725([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x596725([0x2a]))||!!_0x1e7d3b[_0x596725([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x596725([0x41,0x49])));}function _0x1d90a3(){const _0x5586b2=_0x41d5a2[_0x596725([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5586b2||0x0==_0x5586b2[_0x596725([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x26bdba}=new URL(window[_0x596725([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5586b2[_0x596725([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26bdba))return!0x0;const _0x53db16=_0x26bdba[_0x596725([0x73,0x70,0x6c,0x69,0x74])](_0x596725([0x2e]));return _0x5586b2[_0x596725([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3dc45e=>_0x3dc45e[_0x596725([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x596725([0x2a])))[_0x596725([0x6d,0x61,0x70])](_0xbc34e5=>_0xbc34e5[_0x596725([0x73,0x70,0x6c,0x69,0x74])](_0x596725([0x2e])))[_0x596725([0x73,0x6f,0x6d,0x65])](_0x21f02d=>_0x53db16[_0x596725([0x65,0x76,0x65,0x72,0x79])]((_0x16084b,_0x2ae400)=>_0x21f02d[_0x2ae400]===_0x16084b||_0x21f02d[_0x2ae400]===_0x596725([0x2a])));}function _0x2ecd80(){return _0x1f50e1&&_0x16fbe9?new window[(_0x596725([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2cb139,_0x1065b3)=>{_0x1f50e1[_0x596725([0x74,0x68,0x65,0x6e])](_0x2cb139,_0x1065b3),_0x16fbe9[_0x596725([0x74,0x68,0x65,0x6e])](_0xa0b26e=>{_0xa0b26e!=_0x596725([0x56,0x61,0x6c,0x69,0x64])&&_0x2cb139(_0xa0b26e);},_0x1065b3);}):_0x1f50e1||_0x16fbe9||_0x596725([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3e8826(_0x5374e9,_0x277282){return new window[(_0x596725([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ea528=>{if(_0x42d8d8())return _0x4ea528(_0x596725([0x56,0x61,0x6c,0x69,0x64]));_0x2112c0(),_0xc4a562[_0x596725([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x596725([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xf72ab0=!0x1;const _0x438e9f=_0x56b11d();function _0x50f656(_0x128aa4){return!!_0x128aa4&&(typeof _0x128aa4===_0x596725([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x128aa4===_0x596725([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x128aa4[_0x596725([0x74,0x68,0x65,0x6e])]===_0x596725([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x128aa4[_0x596725([0x63,0x61,0x74,0x63,0x68])]===_0x596725([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x376174(_0x37d357){_0x1b5088(_0x37d357)[_0x596725([0x74,0x68,0x65,0x6e])](_0x4ac56e=>{if(!_0x4ac56e||_0x4ac56e[_0x596725([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x596725([0x6f,0x6b]))return _0x596725([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3a548f(_0x3e736f(_0x438e9f+_0x277282))!=_0x4ac56e[_0x596725([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x596725([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x596725([0x56,0x61,0x6c,0x69,0x64]);})[_0x596725([0x74,0x68,0x65,0x6e])](_0x2cd182=>(_0x4f3547(),_0x2cd182),()=>{const _0xc9d09a=_0x2f4dc4();return null==_0xc9d09a?(_0x4f3547(),_0x596725([0x56,0x61,0x6c,0x69,0x64])):_0x596725(_0xeaeeed-_0xc9d09a>(0x18f002f2^_0x33de54)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x596725([0x74,0x68,0x65,0x6e])](_0x4ea528)[_0x596725([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4ea528(_0x596725([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5d3b3d=0x3cca6872^_0x33de54;function _0x4f3547(){const _0x37c9c8=_0x596725([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a548f(_0x3e736f(_0x5374e9)),_0x44c738=_0x4917df(_0x3a548f(window[_0x596725([0x4d,0x61,0x74,0x68])][_0x596725([0x63,0x65,0x69,0x6c])](_0xeaeeed/_0x5d3b3d)));window[_0x596725([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x596725([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x37c9c8,_0x44c738);}function _0x2f4dc4(){const _0x3e9d1e=_0x596725([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a548f(_0x3e736f(_0x5374e9)),_0x1435df=window[_0x596725([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x596725([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3e9d1e);return _0x1435df?window[_0x596725([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4917df(_0x1435df),0x10)*_0x5d3b3d:null;}function _0x1b5088(_0x39e865){return new window[(_0x596725([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1bca7f,_0x29450e)=>{_0x39e865[_0x596725([0x74,0x68,0x65,0x6e])](_0x1bca7f,_0x29450e),window[_0x596725([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x29450e,0x3cfd5232^_0x33de54);});}}_0xc4a562[_0x596725([0x6f,0x6e])](_0x596725([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3910fc,_0x5b5565)=>{if(_0x5b5565[0x0]!=_0x5374e9)return _0x4ea528(_0x596725([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5b5565[0x1]={..._0x5b5565[0x1],[_0x596725([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x438e9f};},{[_0x596725([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x596725([0x68,0x69,0x67,0x68])}),_0xc4a562[_0x596725([0x6f,0x6e])](_0x596725([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4fc48b=>{_0x50f656(_0x4fc48b[_0x596725([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xf72ab0=!0x0,_0x376174(_0x4fc48b[_0x596725([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x596725([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x596725([0x6c,0x6f,0x77])}),_0xa74894[_0x596725([0x74,0x68,0x65,0x6e])](()=>{_0xf72ab0||_0x4ea528(_0x596725([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x42d8d8(){return _0xc4a562[_0x596725([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x596725([0x76,0x69,0x65,0x77])][_0x596725([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x596725([0x61,0x75,0x74,0x6f]);}function _0x2112c0(){_0xc4a562[_0x596725([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x596725([0x76,0x69,0x65,0x77])][_0x596725([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x596725([0x61,0x75,0x74,0x6f]);}}function _0x153d3b(_0x23bb9a){const _0x3efa90=[new window[(_0x596725([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x137ea5=>setTimeout(_0x137ea5,0x3cf5b83e^_0x33de54)),_0xa74894[_0x596725([0x74,0x68,0x65,0x6e])](()=>new window[(_0x596725([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15593f=>{let _0x4ed854=0x0;_0xc4a562[_0x596725([0x6d,0x6f,0x64,0x65,0x6c])][_0x596725([0x6f,0x6e])](_0x596725([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xb18f72,_0x46e7ac)=>{_0x46e7ac[0x0][_0x596725([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4ed854++,_0x4ed854==(0x3cfc870a^_0x33de54)&&(_0x15593f(),_0xb18f72[_0x596725([0x6f,0x66,0x66])]());});}))];return window[_0x596725([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x596725([0x72,0x61,0x63,0x65])](_0x3efa90)[_0x596725([0x74,0x68,0x65,0x6e])](()=>_0x23bb9a);}async function _0x5a4e96(){await _0xa74894,_0xc4a562[_0x596725([0x6d,0x6f,0x64,0x65,0x6c])][_0x596725([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3eccc9,_0xc4a562[_0x596725([0x6d,0x6f,0x64,0x65,0x6c])][_0x596725([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3eccc9,_0xc4a562[_0x596725([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x596725([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x27f602(_0x3a667a){const _0x34012c=_0x3f2d4d();_0xc4a562[_0x34012c]=_0x596725([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3a667a,_0x3a667a!=_0x596725([0x56,0x61,0x6c,0x69,0x64])&&_0x5a4e96();}function _0x3f2d4d(){const _0x587c92=window[_0x596725([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x596725([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x596725([0x6e,0x6f,0x77])]())[_0x596725([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x596725([0x2e]),'');let _0x3fe099=_0x596725([0x4d]);for(let _0x5bf2db=0x0;_0x5bf2db<_0x587c92[_0x596725([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5bf2db+=0x2){let _0x4bc702=window[_0x596725([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x587c92[_0x596725([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5bf2db,_0x5bf2db+0x2));_0x4bc702>=_0x2a48a8[_0x596725([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4bc702-=_0x2a48a8[_0x596725([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3fe099+=_0x2a48a8[_0x4bc702];}return _0x3fe099;}function _0x59cf20(){const _0x2a4d93=_0x2bbe9f[_0x596725([0x73,0x70,0x6c,0x69,0x74])](_0x596725([0x2e]));if(0x3!=_0x2a4d93[_0x596725([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1bc87c(_0x2a4d93[0x1]);function _0x1bc87c(_0x3fafd4){const _0x2eee84=_0x149121(_0x3fafd4);return _0x2eee84&&_0x29fba1()?_0x2eee84:null;function _0x29fba1(){const _0x4fd097=_0x2eee84[_0x596725([0x6a,0x74,0x69])],_0x10e484=window[_0x596725([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4fd097[_0x596725([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4fd097[_0x596725([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xe498ce={..._0x2eee84,[_0x596725([0x6a,0x74,0x69])]:_0x4fd097[_0x596725([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4fd097[_0x596725([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xe498ce[_0x596725([0x76,0x63])],_0x3e736f(_0xe498ce)==_0x10e484;}}}async function _0x687d92(){let _0x39ae31=!0x0;try{const _0x2c6614=_0x2bbe9f[_0x596725([0x73,0x70,0x6c,0x69,0x74])](_0x596725([0x2e])),[_0x4cb553,_0x5a6ac8,_0x594d9f]=_0x2c6614;return _0x47fac7(_0x4cb553),await _0x2a425(_0x4cb553,_0x5a6ac8,_0x594d9f),_0x39ae31;}catch(_0x2c365c){return!0x1;}function _0x47fac7(_0x3520ae){const _0x14b516=_0x149121(_0x3520ae);_0x14b516&&_0x14b516[_0x596725([0x61,0x6c,0x67])]==_0x596725([0x45,0x53,0x32,0x35,0x36])||(_0x39ae31=!0x1);}async function _0x2a425(_0x32beb2,_0x2e17b7,_0x54f569){const _0x2455c4=window[_0x596725([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x596725([0x66,0x72,0x6f,0x6d])](_0x1f925b(_0x54f569),_0x4f5e62=>_0x4f5e62[_0x596725([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x253ea7=new window[(_0x596725([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x596725([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x32beb2+_0x596725([0x2e])+_0x2e17b7),_0x3fdaac=window[_0x596725([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x596725([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3fdaac)return;const _0x1c161d=await _0x3fdaac[_0x596725([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x596725([0x6a,0x77,0x6b]),_0x1a1cec,{[_0x596725([0x6e,0x61,0x6d,0x65])]:_0x596725([0x45,0x43,0x44,0x53,0x41]),[_0x596725([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x596725([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x596725([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3fdaac[_0x596725([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x596725([0x6e,0x61,0x6d,0x65])]:_0x596725([0x45,0x43,0x44,0x53,0x41]),[_0x596725([0x68,0x61,0x73,0x68])]:{[_0x596725([0x6e,0x61,0x6d,0x65])]:_0x596725([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1c161d,_0x2455c4,_0x253ea7)||(_0x39ae31=!0x1);}}function _0x149121(_0x449e4b){return _0x449e4b[_0x596725([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x596725([0x65,0x79]))?JSON[_0x596725([0x70,0x61,0x72,0x73,0x65])](_0x1f925b(_0x449e4b)):null;}function _0x1f925b(_0x3403fe){return window[_0x596725([0x61,0x74,0x6f,0x62])](_0x3403fe[_0x596725([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x596725([0x2b]))[_0x596725([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x596725([0x2f])));}function _0x3e736f(_0x884294){let _0x54b75e=0x1505;function _0x1b1156(_0x2b09c9){for(let _0x4f91ce=0x0;_0x4f91ce<_0x2b09c9[_0x596725([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4f91ce++){const _0x559944=_0x2b09c9[_0x596725([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4f91ce);_0x54b75e=(_0x54b75e<<0x5)+_0x54b75e+_0x559944,_0x54b75e&=_0x54b75e;}}function _0x1a57c9(_0x270463){Array[_0x596725([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x270463)?_0x270463[_0x596725([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1a57c9):_0x270463&&typeof _0x270463==_0x596725([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x596725([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x270463)[_0x596725([0x73,0x6f,0x72,0x74])]()[_0x596725([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1b158a,_0x336562])=>{_0x1b1156(_0x1b158a),_0x1a57c9(_0x336562);}):_0x1b1156(window[_0x596725([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x270463));}return _0x1a57c9(_0x884294),_0x54b75e>>>0x0;}function _0x3a548f(_0x677e1){return _0x677e1[_0x596725([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x596725([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x596725([0x30]));}function _0x4917df(_0x362c18){return _0x362c18[_0x596725([0x73,0x70,0x6c,0x69,0x74])]('')[_0x596725([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x596725([0x6a,0x6f,0x69,0x6e])]('');}function _0x3eccc9(){}function _0x596725(_0xf9da3a){return _0xf9da3a['map'](_0x439faf=>String['fromCharCode'](_0x439faf))['join']('');}_0x27f602(await _0x1e946());}(this);}['showFakeVisualSelection'](){const _0x1fa551=this['editor']['model'];_0x1fa551['change'](_0x1e5a85=>{const _0x4c900b=_0x1fa551['document']['selection']['getRanges']();let _0x198742=0x0;for(const _0x4bb71d of _0x4c900b){const _0x2755c3=f+':'+_0x198742;if(_0x1fa551['markers']['has'](_0x2755c3))_0x1e5a85['updateMarker'](_0x2755c3,{'range':_0x4bb71d});else{if(_0x4bb71d['start']['isAtEnd']){const _0xeca8ee=_0x4bb71d['start']['getLastMatchingPosition'](({item:_0x2ba1ad})=>!_0x1fa551['schema']['isContent'](_0x2ba1ad),{'boundaries':_0x4bb71d});_0x1e5a85['addMarker'](_0x2755c3,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x1e5a85['createRange'](_0xeca8ee,_0x4bb71d['end'])});}else _0x1e5a85['addMarker'](_0x2755c3,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x4bb71d});}_0x198742++;}});}['hideFakeVisualSelection'](){const _0x2e6999=this['editor']['model'],_0x3858a0=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x3858a0['length']&&_0x2e6999['change'](_0x11a4f3=>{_0x3858a0['forEach'](_0x942a1a=>{_0x11a4f3['removeMarker'](_0x942a1a);});});}['insertContent'](_0x4dc770,_0x166fe1){const _0x436b6d=this['_getAISelection'](),_0x20c494=_0x166fe1||_0x436b6d['getFirstRange']();this['editor']['model']['canEditAt'](_0x20c494)&&this['editor']['model']['change'](_0x26b397=>{this['hideFakeVisualSelection'](),_0x166fe1||this['_resetContentOfSelectedTableCells'](_0x26b397,_0x436b6d),this['_pasteHTMLUsingClipboard']({'insertAt':_0x20c494,'writer':_0x26b397,'html':_0x4dc770});});}['insertContentBelow'](_0x44dbe9){const {model:_0x4bdcc5}=this['editor'],_0x34a955=this['_getAISelection']();_0x4bdcc5['change'](()=>{const _0xb5b94b=this['_prepareTableInsertBelowPosition'](_0x44dbe9,_0x34a955)||this['_getDefaultInsertBelowPosition'](_0x34a955);this['insertContent'](_0x44dbe9,_0xb5b94b);});}['_getAISelection'](){const _0x36ed6a=this['editor']['model'],_0x453867=Array['from'](_0x36ed6a['markers']['getMarkersGroup'](f))['map'](_0x367c91=>_0x367c91['getRange']());return _0x36ed6a['createSelection'](_0x453867);}['_pasteHTMLUsingClipboard']({writer:_0x4f1b4f,html:_0x56fe88,insertAt:_0x5bdd5f}){const {view:_0x4820dc}=this['editor']['editing'],_0x10106e=this['editor']['plugins']['get'](_0x596e08),_0x3783f3=new dt();_0x3783f3['setData']('text/html',_0x56fe88);const _0x74fa94=new ClipboardEvent('paste',{'clipboardData':_0x3783f3}),_0xd04777=new _0xa654a1(_0x4820dc,_0x74fa94,{'dataTransfer':new _0x1a7d11(_0x3783f3)});_0x4f1b4f['setSelection'](_0x5bdd5f);const _0x51960d=(_0x989474,_0x359083)=>{_0x359083['resultRange']&&_0x4f1b4f['setSelection'](_0x359083['resultRange']);};_0x10106e['once']('contentInsertion',_0x51960d,{'priority':'lowest'}),_0x4820dc['document']['fire']('paste',_0xd04777),_0x10106e['off']('contentInsertion',_0x51960d);}['_getDefaultInsertBelowPosition'](_0x166eb8){const {model:_0x5064c0}=this['editor'],_0x33101e=Array['from'](_0x166eb8['getSelectedBlocks']());return _0x33101e['length']?_0x5064c0['createPositionAfter'](_0x33101e['pop']()):_0x166eb8['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x248523,_0x12cee5){const {model:_0x5a210a,plugins:_0xedcd87}=this['editor'];if(_0xedcd87['has']('TableUtils')){const _0x2807d9=_0xedcd87['get']('TableUtils')['getSelectedTableCells'](_0x12cee5);if(_0x2807d9['length']){const _0x51f1da=this['_getTableRowCountFromContent'](_0x248523),_0x202cb2=this['_createEmptyTableRows'](_0x2807d9,_0x51f1da);return _0x5a210a['createPositionAt'](_0x202cb2,0x0);}}return null;}['_getTableRowCountFromContent'](_0x279698){const _0x105a77=this['editor']['plugins']['get']('TableUtils'),_0x1aaac7=this['editor']['data']['parse'](_0x279698),_0x218a3a=Array['from'](_0x1aaac7['getChildren']())['filter'](_0x41abbf=>_0x41abbf['is']('element','table'));let _0x1e18d5=0x0;return _0x218a3a['forEach'](_0x7be6d7=>{_0x1e18d5+=_0x105a77['getRows'](_0x7be6d7);}),_0x1e18d5;}['_createEmptyTableRows'](_0x2b954f,_0x16dc80){const _0x4640eb=this['editor']['plugins']['get']('TableUtils'),_0x44e89a=_0x4640eb['getRowIndexes'](_0x2b954f),_0x3201eb=_0x4640eb['getColumnIndexes'](_0x2b954f),_0x33badc=_0x44e89a['last']+0x1,_0x20a338=_0x3201eb['first'],_0x232816=_0x2b954f[0x0]['findAncestor']('table');for(let _0x1bff32=0x0;_0x1bff32<_0x16dc80;_0x1bff32++)_0x4640eb['insertRows'](_0x232816,{'at':_0x33badc});return _0x232816['getChild'](_0x33badc)['getChild'](_0x20a338);}['_resetContentOfSelectedTableCells'](_0x2bcd3e,_0x4edc62){const {plugins:_0x5b3c0b}=this['editor'],{model:_0x1df34c}=_0x2bcd3e;if(!_0x5b3c0b['has']('TableUtils'))return;_0x5b3c0b['get']('TableUtils')['getSelectedTableCells'](_0x4edc62)['length']&&_0x1df34c['deleteContent'](_0x4edc62);}}class K extends _0x168661{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x398ace('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x11667d){super(_0x11667d),this['name']='AIRequestError';}}function i(_0x33e749,_0x3e30fd,_0x45e44a){const t=_0x33e749['t'];switch(_0x3e30fd){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',_0x45e44a);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x45e44a);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'},_0x45e44a);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 _0x3e30fd;}}class E extends _0x35ac5d{['_commandDefinitions'];constructor(_0x1e5b26,_0xfb5e4){super(_0x1e5b26),this['_commandDefinitions']=_0xfb5e4,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x544df3,_0x369ef5,_0x297e79)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x297e79));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0xfc4eb0,_0x5a7882,_0x398c80)=>{this['enabledCommandsIds']=_0x398c80?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x5a0eeb=this['editor']['model'];this['_hasContext']=function(_0x4dd1ff){const _0x4de8f5=_0x4dd1ff['document']['selection'];return _0x4de8f5['isCollapsed']?0x0!==[..._0x4de8f5['getSelectedBlocks']()]['length']&&![..._0x4de8f5['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x4dd1ff['hasContent'](_0x4de8f5['getFirstRange']());}(_0x5a0eeb);const _0x3c99ad=_0x5a0eeb['document']['selection'],_0x341e74=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x30934f of _0x3c99ad['getRanges']())for(const _0x357048 of _0x30934f['getItems']())if(_0x357048['is']('element')&&_0x341e74['includes'](_0x357048['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x399d4b='',_0x4f16f3='',_0x516cec='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x399d4b,_0x4f16f3,_0x516cec);}}function G(_0x43c9bc,_0x3fa4e5){const _0x45b9ad=new Set();for(const _0x2e7690 of _0x43c9bc['values']())(_0x3fa4e5||!0x1===_0x2e7690['requiresContent'])&&_0x45b9ad['add'](_0x2e7690['id']);return Array['from'](_0x45b9ad);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
- _0x2790c7(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x49eb91,_0x2a205a,_0xeea4c9){super(),this['editor']=_0x49eb91,this['textAdapter']=_0x2a205a,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0xeea4c9,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0xbfdc30,_0x2ee5b2,_0x488f0d)=>{this['view']['value']=this['_sanitizeHTML'](_0x488f0d);}),this['listenTo'](this['view'],'submitPrompt',(_0x48230f,_0x4b924b)=>{const _0x5a34f6=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x4b924b,_0x5a34f6,'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:_0xdf298d,query:_0x12072e,htmlContent:_0x4b831c,label:_0x587009,mainActionLabel:_0x561890}){this['view']['prompt']=_0x587009,this['view']['mainAction']=_0x561890,this['initialContext']=_0x4b831c,_0x12072e&&(this['view']['isRendered']?this['_handleQuery'](_0x12072e,_0x4b831c,_0xdf298d,_0x587009):this['view']['once']('render',()=>{this['_handleQuery'](_0x12072e,_0x4b831c,_0xdf298d,_0x587009);}));}['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'](_0x108adf,_0x253280,_0x5a43a8,_0x10a458){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x253280,this['previousQuery']=_0x108adf,this['previousLabel']=_0x10a458||_0x108adf,this['previousActionId']=_0x5a43a8,new Promise(_0x23fabf=>{this['textAdapter']['makeRequest']({'query':_0x108adf,'context':_0x253280,'onData':_0x316570=>{this['currentResponse']=_0x316570,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x5a43a8})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x5a1f26=>{_0x5a1f26 instanceof R?this['view']['handleError'](_0x5a1f26['message']):this['view']['handleError'](),_0x23fabf();})['finally'](()=>{this['stopProcessing'](),_0x23fabf();});});}['_parseAndNormalizeContent'](_0x253287,_0x4a5762=!0x1){const _0x169e07=Z['exec'](_0x253287);_0x253287=_0x169e07?_0x253287['substring'](_0x169e07[0x1]['length']):_0x253287['length']<0x64&&!_0x4a5762?'':this['_stripMarkdownSyntax'](_0x253287);const _0x33e954=this['_domParser']['parseFromString'](_0x253287,'text/html');if(_0x169e07){const _0x2bf304=Array['from'](_0x33e954['body']['childNodes']);_0x2bf304['reverse']();for(const _0x3d505d of _0x2bf304){if(_0x3d505d['nodeType']==Node['ELEMENT_NODE'])break;_0x3d505d['remove']();}}const _0xb6b498=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x33e954['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0xb6b498);const _0xa999ed=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x49c892=this['editor']['data']['toModel'](_0xb6b498);return _0xa999ed||_0x49c892['markers']['clear'](),this['editor']['data']['stringify'](_0x49c892);}['_normalizeResponseHeadings'](_0x216d69){const _0x3ef74c=new _0x181f34(this['editor']['editing']['view']['document']),_0x2d5e48=new _0x41b47d({'name':/^h[1-5]$/}),_0x5d0b8b=[];let _0x35e61f=!0x1;for(const _0x3db610 of _0x216d69)_0x3db610['is']('element')&&_0x2d5e48['match'](_0x3db610)&&(_0x5d0b8b['push'](_0x3db610),'h1'==_0x3db610['name']&&(_0x35e61f=!0x0));if(_0x35e61f){for(const _0x186dbe of _0x5d0b8b)_0x3ef74c['rename']('h'+(parseInt(_0x186dbe['name'][0x1])+0x1),_0x186dbe);}}['_isH1TagSupportEnabled'](){const {data:_0x234574,editing:_0x860d5e}=this['editor'],_0x417798=_0x234574['htmlProcessor']['toView']('<h1></h1>'),_0x4aaf05=_0x234574['toView'](_0x234574['toModel'](_0x417798));return!!_0x860d5e['view']['domConverter']['viewToDom'](_0x4aaf05)['querySelector']('h1');}['_sanitizeHTML'](_0x5a2842){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x5a2842),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x58194e){const _0x36f6f7=_0x58194e['trim']();return _0x36f6f7['startsWith']('```html')?_0x36f6f7['endsWith']('```')?_0x36f6f7['substring'](0x7,_0x36f6f7['length']-0x3):_0x36f6f7['substring'](0x7):_0x58194e;}}const M={'REPLACE':'replace','INSERT':'insert'};class at extends nt{constructor(_0x52449a){super(_0x52449a),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x473f71=>i(_0x52449a,'AI_'+_0x473f71['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x52449a,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x52449a,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x52449a,'Stop'));const _0x2d60c3=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x2d60c3['if']('isVisible','ck-hidden',_0x33ea65=>!_0x33ea65)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x524385,_0x4e4e2c){const _0x2c87ba=new _0x199d88(this['locale']);return _0x2c87ba['set']({'label':_0x524385,'class':_0x4e4e2c||'','isVisible':!0x0,'withText':!0x0}),_0x2c87ba;}}var W='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class X extends _0x4e48f5{['contentFieldView'];['copyButtonView'];constructor(_0x55477c,_0x37adf2=''){super(_0x55477c),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x37c62f=this['bindTemplate'];this['contentFieldView']=new mt(_0x55477c,_0x37adf2),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x37c62f['if']('isVisible','ck-hidden',_0x956f74=>!_0x956f74)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x37c62f['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 _0x113f41=!0x1;this['on']('change:value',(_0x3070a5,_0x30bd07,_0x3f1f24)=>{const _0x132d26=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x3f1f24),this['isProcessing']&&_0x132d26&&!_0x113f41&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x51698b,_0x331526,_0xefb642)=>{_0x113f41=!0x1,_0xefb642?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x113f41=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x113f41=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x5b1a93=this['locale'],_0x1eef87=new _0x199d88(this['locale']),_0x20172b='ck-ai-form__copy-button';return _0x1eef87['set']({'label':i(_0x5b1a93,'Copy'),'icon':W,'class':_0x20172b,'tooltip':!0x0}),_0x1eef87['bind']('isVisible')['to'](this,'value',_0x185233=>!!_0x185233),_0x1eef87['bind']('isEnabled')['to'](this,'isProcessing',_0x501c4f=>!_0x501c4f),_0x1eef87['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x1eef87['icon']=_0x333562['check'],_0x1eef87['class']=_0x20172b+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x1eef87['icon']=W,_0x1eef87['class']=_0x20172b;},0x3e8);}),_0x1eef87;}['_copyHTMLToClipboard'](_0x120f60){const {window:_0x5b7ed7,document:_0x26d685}=_0x5b9a8c;if(_0x5b7ed7['ClipboardItem']){const {Blob:_0xed123a,ClipboardItem:_0x4f0297}=_0x5b7ed7,_0x1a82df=[new _0x4f0297({'text/html':new _0xed123a([_0x120f60['innerHTML']],{'type':'text/html'}),'text/plain':new _0xed123a([_0x120f60['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x1a82df);}else{const _0x345635=_0x26d685['createElement']('div');_0x345635['style']['position']='absolute',_0x345635['style']['left']='-9999px',_0x345635['innerHTML']='<span>[</span>'+_0x120f60['innerHTML']+'<span>]</span>',_0x26d685['body']['appendChild'](_0x345635);const _0x469caa=_0x26d685['createRange']();_0x469caa['setStartAfter'](_0x345635['firstElementChild']),_0x469caa['setEndBefore'](_0x345635['lastElementChild']);const _0x4ba46c=_0x5b7ed7['getSelection']();_0x4ba46c['removeAllRanges'](),_0x4ba46c['addRange'](_0x469caa),_0x26d685['execCommand']('copy'),_0x345635['remove']();}}}class mt extends _0x4e48f5{constructor(_0x1e4434,_0x383681=''){super(_0x1e4434),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x383681,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x245484){this['element']['innerHTML']=_0x245484;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x13bb0a=new _0x4e48f5(),_0x264b80=this['locale'],_0x966459=new _0x5a4df3();return _0x966459['isVisible']=!0x0,_0x13bb0a['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x966459,{'text':i(_0x264b80,'AI\x20is\x20writing...')}]}),_0x13bb0a['render'](),_0x13bb0a;}}class rt extends _0x4e48f5{constructor(_0x502982,_0x4b6a49=''){super(_0x502982);const _0x1fa431=new _0x544509(),_0x2cd492=this['bindTemplate'];this['set']('text',_0x4b6a49),_0x1fa431['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x1fa431,{'text':_0x2cd492['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x3a39ae,_0x159ba3){super(_0x3a39ae,_0x159ba3),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',(_0x16c424,_0x4bcee5)=>{_0x16c424['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x4bcee5());});}['_createSubmitButton'](){const _0x3272dd=new _0x199d88(this['locale']),_0x1c9590=this['locale'];return _0x3272dd['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x1c9590,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x3272dd['on']('execute',()=>{this['submit']();}),_0x3272dd['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x519c01,_0x47740e)=>!_0x519c01&&_0x47740e),_0x3272dd;}['_createShowHistoryButton'](){const _0x261b7a=new _0x199d88(this['locale']),_0x170789=this['resultsView'],_0x524299=this['locale'];_0x261b7a['set']({'label':i(_0x524299,'History'),'withText':!0x1,'icon':_0x333562['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x261b7a['bind']('isOn')['to'](_0x170789,'isVisible'),_0x261b7a['bind']('isEnabled')['to'](this,'isEnabled'),_0x261b7a['on']('execute',()=>{_0x170789['isVisible']=!_0x170789['isVisible'],_0x170789['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x2596fb=()=>{_0x5b9a8c['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x522353=new st(this['queryView']['fieldView']['element']),_0x2d044d=_0x522353['width'],_0x3297f1='rtl'===_0x524299['uiLanguageDirection']?'left':'right';_0x522353['excludeScrollbarsAndBorders'](),_0x261b7a['element']['style'][_0x3297f1]=_0x2d044d-_0x522353['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x2596fb),this['on']('render',_0x2596fb),_0x261b7a;}['submit'](){const _0x45223d=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x45223d);}['focus'](_0x3f6ca2){-0x1===_0x3f6ca2?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x204a57){super(_0x204a57),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x204a57,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x236ff1=0x0;for(const _0x1019a6 of this['items'])_0x236ff1+=_0x1019a6['items']['length'];return{'resultsCount':_0x236ff1,'totalItemsCount':_0x236ff1};}['_createClearHistoryButton'](){const _0x49071d=this['locale'],_0x1e28ab=new _0x199d88(this['locale']);return _0x1e28ab['set']({'label':'('+i(_0x49071d,'Clear')+')','withText':!0x0}),_0x1e28ab['on']('execute',()=>this['fire']('clearHistory')),_0x1e28ab;}}class hs extends _0xb5146e{constructor(_0x567119){super();const _0x41e2b1=new te(),_0x84b672=new _0x199d88(this['locale'],_0x41e2b1);this['children']['add'](_0x84b672),_0x84b672['set']({'label':_0x567119['prompt'],'withText':!0x0}),_0x84b672['on']('execute',()=>{this['fire']('execute',{'value':_0x5a21fa(_0x567119['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x4aa76a{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x25676d,_0x1e25e6)=>{const _0x2f14a4=Ss(_0x1e25e6['prompt']);for(const _0x2d7fe5 of this)if(_0x2d7fe5!=_0x1e25e6&&Ss(_0x2d7fe5['prompt'])===_0x2f14a4){this['remove'](_0x2d7fe5);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x339367=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x339367));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x192409=>_0x192409)));}}function Ss(_0x399aba){return _0x399aba['toLowerCase']()['trim']();}class k extends _0x4e48f5{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x34e0cc,_0x2537ab,_0x55af5c=''){super(_0x34e0cc),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 os(),this['errorView']=new rt(_0x34e0cc),this['contentArea']=new X(_0x34e0cc,_0x55af5c),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 _0x430094(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0x43557f({'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 _0xbaa40b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x2537ab],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0xbaa40b['if']('isError','ck-hidden',_0x2f3152=>!_0x2f3152)]},'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'](_0x5c205a=0x1){-0x1===_0x5c205a?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 _0x39bb91=this['locale'],_0x21b611=new ht(_0x39bb91,{'queryView':{'label':i(_0x39bb91,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x158201,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x39bb91,'Empty\x20history'),'secondary':i(_0x39bb91,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x21b611['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x546ba3,_0x3a49f7)=>_0x546ba3&&!_0x3a49f7),this['listenTo'](_0x21b611,'submit',(_0x3f6671,_0x2adc41)=>{this['prompt']=_0x2adc41;const _0x39a1e1=_0x510345(_0x2adc41);this['fire']('submitPrompt',_0x39a1e1),_0x2adc41['trim']()&&this['_promptHistory']['add']({'prompt':_0x39a1e1},0x0);},{'priority':'high'}),_0x21b611;}['_createHistoryView'](){const _0xfa3c99=new rs(this['locale']);return _0xfa3c99['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0xfa3c99['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0xfa3c99;}['_createToolbar'](){const _0x4f77fa=new at(this['locale']);return _0x4f77fa['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x572241,_0x37ab4c,_0x221030)=>_0x572241&&!_0x37ab4c&&!!_0x221030),_0x4f77fa['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x4f77fa['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x18a243,_0x828e08,_0x234903)=>_0x18a243&&!_0x828e08&&!!_0x234903),_0x4f77fa['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x4f77fa['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x4f5a64,_0x17369f)=>_0x4f5a64&&!_0x17369f),_0x4f77fa['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x4f77fa['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x4f77fa['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x4f77fa;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x52473e=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x52473e,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0xd67d6d){const _0x44aa58=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0xd67d6d||i(_0x44aa58,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var T='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const w=globalThis['DataTransfer'];class n extends _0x168661{['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[_0x2f192a,a,K,_0x444672];}constructor(_0x40f449){super(_0x40f449),_0x40f449['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x40f449['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x40f449['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x40f449['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x69570f}=this;this['_aiAdapter']=_0x69570f['plugins']['get'](K),this['_dialog']=_0x69570f['plugins']['get'](_0x444672),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0xddeb93=new E(_0x69570f,Array['from'](this['_commandDefinitions']['values']()));_0x69570f['commands']['add']('showAIAssistant',_0xddeb93),_0x69570f['ui']['componentFactory']['add']('aiCommands',_0x3aa5ee=>{const _0x1309ae=_0x492dc9(_0x3aa5ee);return _0x1309ae['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x1309ae['buttonView']['set']({'label':i(_0x3aa5ee,'AI\x20Commands'),'icon':T,'tooltip':!0x0}),_0x1309ae['on']('execute',_0x38ef0e=>this['_onExecute'](_0x38ef0e['source']['id'])),_0x551bc4(_0x1309ae,_0x69570f['ui']['view']['body'],function(_0x1d3f30){const _0x315602=o(_0x1d3f30['config']['get']('ai.aiAssistant.commands'),_0x1d3f30['locale']),_0x328c73=U(_0x1d3f30,_0x315602)['filter'](_0x33ba18=>_0x33ba18['commands']['length']);if(0x1===_0x328c73['length'])return U(_0x1d3f30,_0x328c73[0x0]['commands'])['map'](_0xa1c378=>({'id':_0xa1c378['id'],'label':_0xa1c378['label']}));return _0x328c73['map'](_0x56832b=>{const {groupId:_0x199796,groupLabel:_0x4f4963,commands:_0x2d2ee3}=_0x56832b,_0x472e68=U(_0x1d3f30,_0x2d2ee3)['map'](_0x165621=>({'id':_0x165621['id'],'label':_0x165621['label']}));return{'id':_0x199796,'menu':_0x4f4963||_0x199796,'children':_0x472e68};});}(_0x69570f),{'ariaLabel':i(_0x3aa5ee,'AI\x20Commands')}),_0x1309ae['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0xddeb93['on']('change:enabledCommandsIds',_0x5111a4),_0x1309ae['menuView']['once']('render',_0x5111a4),_0x1309ae;function _0x5111a4(){_0x1309ae['isEnabled']=_0xddeb93['enabledCommandsIds']['length']>0x0;for(const _0x9b4d of _0x1309ae['menuView']['buttons'])_0x9b4d['isEnabled']=_0xddeb93['enabledCommandsIds']['includes'](_0x9b4d['id']);}}),_0x69570f['ui']['componentFactory']['add']('menuBar:aiCommands',_0x3455df=>{const _0x37bc46=new _0x5aa9c6(_0x3455df);_0x37bc46['buttonView']['set']({'label':i(_0x3455df,'AI\x20Commands'),'icon':T}),_0x37bc46['bind']('isEnabled')['to'](_0xddeb93,'enabledCommandsIds',_0x5b45d3=>_0x5b45d3['length']>0x0);const _0x477024=o(_0x69570f['config']['get']('ai.aiAssistant.commands'),_0x3455df);return this['_populateMenuBarMenu'](_0xddeb93,_0x37bc46,_0x477024,_0x4fc18f=>this['_onExecute'](_0x4fc18f)),_0x37bc46;}),_0x69570f['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x1b8d8c=this['_createAIAssistantUIButton'](_0x199d88);return _0x1b8d8c['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x1b8d8c;}),_0x69570f['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x48ce1b=this['_createAIAssistantUIButton'](_0x1a42ca);return _0x48ce1b['set']({'role':'menuitemcheckbox'}),_0x48ce1b;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xc72587=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1d2863;for(const _0x44ba68 in _0xc72587){const _0x55e338=_0x44ba68,_0xe70d0d=_0xc72587[_0x55e338];if('aiLicenseKeyValid'==_0xe70d0d||'aiLicenseKeyInvalid'==_0xe70d0d||'aiLicenseKeyExpired'==_0xe70d0d||'aiLicenseKeyDomainLimit'==_0xe70d0d||'aiLicenseKeyNotAllowed'==_0xe70d0d||'aiLicenseKeyEvaluationLimit'==_0xe70d0d||'aiLicenseKeyTrialLimit'==_0xe70d0d||'aiLicenseKeyUsageLimit'==_0xe70d0d){delete _0xc72587[_0x55e338],_0x1d2863=_0xe70d0d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x1d2863&&_0xc72587['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x1d2863&&_0xc72587['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x1d2863&&_0xc72587['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x1d2863&&_0xc72587['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x1d2863&&_0xc72587['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x1d2863&&_0xc72587['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x1d2863&&_0xc72587['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x57b14='',_0x5739d9='',_0x6f47='custom'){const _0xebb4f7=this['editor'],_0x32cc1f=_0xebb4f7['editing']['view'],_0x392a94=_0xebb4f7['plugins']['get'](a),_0x4a143f=_0xebb4f7['plugins']['get'](_0x2f192a);_0x392a94['showFakeVisualSelection']();const _0x2d230d=new w(),_0x2ef9ee=new ClipboardEvent('copy',{'clipboardData':_0x2d230d}),_0x227bc6=new _0x1a7d11(_0x2d230d),_0x508fe5=new _0xa654a1(_0x32cc1f,_0x2ef9ee,{'dataTransfer':_0x227bc6});_0x4a143f['_forceMarkersCopy']('comment',()=>{_0x32cc1f['document']['fire']('copy',_0x508fe5);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0xebb4f7,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x33704c=_0x227bc6['getData']('text/html');const _0x50a677=_0xebb4f7['model']['document']['selection'],_0x3df444=Array['from'](_0x50a677['getRanges']());0x1===_0x3df444['length']&&_0x3df444[0x0]['isFlat']&&!_0x50a677['getSelectedElement']()&&''!==_0x33704c['replace'](/&nbsp;/g,'')['trim']()&&(_0x33704c='<p>'+_0x33704c+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x6f47,'query':_0x57b14,'htmlContent':_0x33704c,'label':_0x5739d9,'mainActionLabel':M[_0xebb4f7['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':ct['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x279bd1['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x392a94['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0xbb3d5=new Map(),_0x53b5ba=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x179a74 of _0x53b5ba)for(const _0xf137f7 of _0x179a74['commands'])_0xbb3d5['set'](_0xf137f7['id'],{..._0xf137f7,'groupId':_0x179a74['groupId'],'groupLabel':_0x179a74['groupLabel']||_0x179a74['groupId']});return _0xbb3d5;}['_createAIAssistantUIButton'](_0xad9628){const _0x4eac76=this['editor'],_0x11dba4=_0x4eac76['commands']['get']('showAIAssistant'),_0x7e0a35=new _0xad9628(_0x4eac76['locale']);return _0x7e0a35['set']({'label':i(_0x4eac76['locale'],'AI\x20Assistant'),'icon':ct['robotPencil'],'isToggleable':!0x0}),_0x7e0a35['bind']('isEnabled')['to'](_0x11dba4),_0x7e0a35['bind']('isOn')['to'](this['_dialog'],'id',_0x410def=>'aiAssistant'===_0x410def),this['listenTo'](_0x7e0a35,'execute',()=>{_0x7e0a35['isOn']?this['hideUI']():_0x11dba4['execute']();}),_0x7e0a35;}['_initView'](){const _0x53e1f8=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',()=>{_0x53e1f8['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x53e1f8['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x59582e,ui:{ariaLiveAnnouncer:_0x260388}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x519d73,_0xdb02a5,_0x2abcca)=>{const _0x4268e9=this['_aiAssistantController']['currentContext'];_0x2abcca?_0x260388['announce'](i(_0x59582e,'AI\x20is\x20writing')):_0x4268e9&&_0x260388['announce'](i(_0x59582e,'Generated\x20content:\x20%0',_0x4268e9),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x1d997d,_0x3a6e00,_0x227fb4)=>{if(_0x227fb4){const _0x5b972d=this['_formView']['errorView']['text'];_0x260388['announce'](i(_0x59582e,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x5b972d));}});}['_onExecute'](_0x5cabd9){const _0x388883=this['_commandDefinitions']['get'](_0x5cabd9),_0xa6a620=this['editor'],_0x4c9f65=_0xa6a620['model']['document']['selection'],_0x27d7c9=_0xa6a620['commands']['get']('showAIAssistant'),_0x28a152=_0xa6a620['plugins']['get'](a),_0x226ff7=''+(_0x388883['groupId']!==x?_0x388883['groupLabel']+':\x20':'')+_0x388883['label'];if(!0x1!==_0x388883['requiresContent']&&_0x4c9f65['isCollapsed']){const _0x4ef8cb=_0x193f29(_0x4c9f65['getSelectedBlocks']())||_0xa6a620['model']['schema']['getLimitElement'](_0x4c9f65);_0xa6a620['model']['change'](_0x33c8dc=>{_0x33c8dc['setSelection'](_0x4ef8cb,'in');});}_0x28a152['showFakeVisualSelection'](),_0x27d7c9['execute'](_0x388883['prompt'],_0x226ff7,'command:'+_0x5cabd9);}['_populateMenuBarMenu'](_0x6069d1,_0x5cd543,_0x3e6dca,_0x5129e8){const _0x14869f=this['editor'],_0x586b25=_0x14869f['locale'],_0x3de399=new _0x558ef1(_0x586b25),_0x5a830f=U(_0x14869f,_0x3e6dca)['filter'](_0x1cb50e=>_0x1cb50e['commands']['length']);0x1===_0x5a830f['length']?this['_getMenuBarGroupButtons']({'command':_0x6069d1,'commands':_0x5a830f[0x0]['commands'],'parentMenuView':_0x5cd543,'onExecute':_0x5129e8})['forEach'](_0x4c8ff2=>_0x3de399['items']['add'](_0x4c8ff2)):_0x5a830f['forEach'](({groupId:_0x2a9032,groupLabel:_0x256f30,commands:_0x550772})=>{const _0xb38b4b=new _0x448066(_0x586b25,_0x5cd543),_0x2e7b3=new _0x5aa9c6(_0x586b25),_0x1c366=new _0x558ef1(_0x586b25),_0x1f6ff4=this['_getMenuBarGroupButtons']({'command':_0x6069d1,'commands':_0x550772,'parentMenuView':_0x2e7b3,'onExecute':_0x5129e8});_0x2e7b3['buttonView']['set']({'label':_0x256f30||_0x2a9032}),_0x2e7b3['delegate']('execute')['to'](_0x5cd543),_0x1c366['items']['addMany'](_0x1f6ff4),_0x2e7b3['panelView']['children']['add'](_0x1c366),_0xb38b4b['children']['add'](_0x2e7b3),_0x3de399['items']['add'](_0xb38b4b);}),_0x5cd543['panelView']['children']['add'](_0x3de399);}['_getMenuBarGroupButtons']({command:_0x174a59,commands:_0x417814,parentMenuView:_0x523177,onExecute:_0xc58c79}){const _0x17e686=this['editor'],_0x130683=_0x17e686['locale'];return U(_0x17e686,_0x417814)['map'](_0x224d3c=>{const _0x2a2c27=new _0x448066(_0x130683,_0x523177),_0x102df8=new _0x1a42ca(_0x130683);return _0x102df8['set']({'label':_0x224d3c['label']}),_0x102df8['delegate']('execute')['to'](_0x523177),_0x102df8['on']('execute',()=>_0xc58c79(_0x224d3c['id'])),_0x102df8['bind']('isEnabled')['to'](_0x174a59,'enabledCommandsIds',_0x239bcb=>_0x239bcb['includes'](_0x224d3c['id'])),_0x2a2c27['children']['add'](_0x102df8),_0x2a2c27;});}}function B(_0x44d5a2,_0x33c097){return void 0x0!==_0x44d5a2['order']&&void 0x0===_0x33c097['order']?0x1:void 0x0===_0x44d5a2['order']&&void 0x0!==_0x33c097['order']?-0x1:void 0x0!==_0x44d5a2['order']&&void 0x0!==_0x33c097['order']?_0x44d5a2['order']-_0x33c097['order']:0x0;}function U(_0x25f62c,_0x215e88){_0x215e88['sort'](B);const _0x2c2adc={},_0x2d0a85=[];for(const _0x5285f6 of _0x215e88)if(void 0x0!==_0x5285f6['order']){if(_0x5285f6['order']in _0x2c2adc)throw new _0x398ace('ai-commands-config-order-collision',_0x25f62c,{'conflictingDefinitions':[_0x5285f6,_0x2c2adc[_0x5285f6['order']]]});_0x2c2adc[_0x5285f6['order']]=_0x5285f6,_0x2d0a85['splice'](_0x5285f6['order'],0x0,_0x5285f6);}else _0x2d0a85['push'](_0x5285f6);return _0x2d0a85;}class r extends _0x168661{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d1db8){super(_0x3d1db8);const _0xaf5b8a=_0x3d1db8['config'],_0x397ff1=_0x3d1db8['locale'];_0xaf5b8a['define']('ai.aiAssistant.preserveComments',!0x0),_0xaf5b8a['define']('ai.aiAssistant.commands',function(_0x55ba95){return[{'groupId':'editOrReview','groupLabel':i(_0x55ba95,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x55ba95,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x55ba95,'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(_0x55ba95,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x55ba95,'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(_0x55ba95,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x55ba95,'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(_0x55ba95,'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(_0x55ba95,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x55ba95,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x55ba95,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x55ba95,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x55ba95,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x55ba95,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x55ba95,'Change\x20style'),'commands':[{'id':'business','label':i(_0x55ba95,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x55ba95,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x55ba95,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x55ba95,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x55ba95,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x55ba95,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x55ba95,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x55ba95,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x55ba95,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x55ba95,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x55ba95,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x55ba95,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x55ba95,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x397ff1)),_0xaf5b8a['define']('ai.aiAssistant.extraCommandGroups',[]),_0xaf5b8a['define']('ai.aiAssistant.removeCommands',[]);let _0x353e11=o(_0xaf5b8a['get']('ai.aiAssistant.commands'),_0x397ff1);const _0x4eca69=_0xaf5b8a['get']('ai.aiAssistant.extraCommandGroups'),_0x5b77df=_0xaf5b8a['get']('ai.aiAssistant.removeCommands');_0x4eca69['forEach'](_0x42a218=>{const _0x511b2b=_0x353e11['find'](_0x44e49a=>_0x44e49a['groupId']===_0x42a218['groupId']);_0x511b2b?_0x511b2b['commands']=_0x511b2b['commands']['concat'](_0x42a218['commands']):_0x353e11['push'](_0x42a218);}),_0x353e11=_0x353e11['filter'](_0x1b7e08=>!_0x5b77df['includes'](_0x1b7e08['groupId'])),_0x353e11['forEach'](_0x3fdf87=>{_0x3fdf87['commands']=_0x3fdf87['commands']['filter'](_0x284222=>!_0x5b77df['includes'](_0x284222['id']));}),_0xaf5b8a['set']('ai.aiAssistant.commands',_0x353e11);}}class P extends _0x168661{['abortController'];static get['requires'](){return[K];}constructor(_0x314645){super(_0x314645),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](K)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x5efe53){return this['sendRequest'](_0x5efe53)['catch'](_0x5030ca=>{if(_0x5030ca instanceof R)return Promise['reject'](_0x5030ca);if('AbortError'==_0x5030ca['name'])return Promise['resolve']();throw console['error'](_0x5030ca),new _0x398ace('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x271c4b,_0x55fc87){const _0x47de3c=this['editor']['locale'],_0x15d519={'Content-Type':'application/json'};if('object'==typeof _0x271c4b)Object['assign'](_0x15d519,_0x271c4b);else{if(_0x271c4b)try{const _0x502b86=await _0x271c4b(_0x55fc87);Object['assign'](_0x15d519,_0x502b86);}catch(_0x57a4bb){return Promise['reject'](new R(i(_0x47de3c,'AI_ERROR_GET_HEADERS')));}}return _0x15d519;}async['_prepareRequestParameters'](_0x17d10c,_0x2dcc5e){const _0x35e6b8=this['editor']['locale'];if('object'==typeof _0x17d10c)return _0x17d10c;try{return await _0x17d10c(_0x2dcc5e);}catch(_0x2ce9eb){return Promise['reject'](new R(i(_0x35e6b8,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x284849){super(_0x284849),_0x284849['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x284849['config']['get']('ai.openAI.requestParameters')||_0x284849['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x284849['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x284849['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x284849['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x3cd9b2,context:_0x59f5bb,onData:_0x526c9b,actionId:_0x548313}){const _0x1eed60=this['editor']['locale'],_0x253aaf=await this['prepareMessages'](_0x3cd9b2,_0x59f5bb,_0x548313),_0x13e819=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x548313),_0x5e118b=await this['_prepareRequestParameters'](this['_requestParameters'],_0x548313),_0x4cd87a={'messages':_0x253aaf,..._0x5e118b},_0x2b94af={'method':'POST','headers':_0x13e819,'body':JSON['stringify'](_0x4cd87a),'signal':this['abortController']['signal']},_0xd27499=await fetch(this['_apiUrl'],_0x2b94af);if(_0xd27499['ok'])return _0x5e118b['stream']?await this['_readStreamableResponse'](_0xd27499,_0x526c9b):await this['_readStaticResponse'](_0xd27499,_0x526c9b),Promise['resolve']();{const _0x2db1e0=await _0xd27499['text']();return _0x2db1e0['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x1eed60,'AI_ERROR_CONTEXT_LENGTH'))):_0x2db1e0['includes']('Moderation')?Promise['reject'](new R(i(_0x1eed60,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x2db1e0));}}async['prepareMessages'](_0x44f44e,_0x36ffbc,_0x4a8f9e){let _0x2ada83,_0x51354b;return _0x36ffbc?(_0x2ada83='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.',_0x51354b='Instruction:\x0a'+_0x44f44e+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x36ffbc):(_0x2ada83='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.',_0x51354b=_0x44f44e),[{'role':'system','content':_0x2ada83},{'role':'user','content':_0x51354b}];}async['_readStreamableResponse'](_0x1fcac1,_0xafd95d){const _0x1212bc=_0x1fcac1['body']['getReader'](),_0x3e98f1=new TextDecoder();let _0x2c1180='',_0x2b392a='',_0x115ba8='',_0x4b5d53=!0x1;for(;!_0x4b5d53;){const {done:_0x9ef27b,value:_0x30e51e}=await _0x1212bc['read'](),_0x5170d7=_0x2c1180+_0x3e98f1['decode'](_0x30e51e);let _0xdf402c='';_0x4b5d53=_0x9ef27b;try{_0xdf402c=this['_cleanUpData'](_0x5170d7),_0x2c1180='';}catch(_0x94b76a){_0x2c1180=_0x5170d7;continue;}_0x2b392a+=_0xdf402c,!_0x4b5d53&&this['_isBufferIncomplete'](_0x2b392a)||_0x2b392a&&(_0x115ba8+=_0x2b392a,_0x2b392a='',_0xafd95d(_0x115ba8));}return Promise['resolve']();}async['_readStaticResponse'](_0xdae08c,_0x4cf629){return _0x4cf629((await _0xdae08c['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x36e3a7){const _0x356359=_0x36e3a7['split']('<')['length']!==_0x36e3a7['split']('>')['length'],_0x31ffa2=_0x36e3a7['length']<0x1e;return _0x356359&&_0x31ffa2;}['_cleanUpData'](_0x524a00){return _0x524a00['split'](/\n(?![^{]*\})/g)['map'](_0xa1155c=>_0xa1155c['replace']('data:\x20',''))['filter'](_0x2c7543=>_0x2c7543&&_0x2c7543['length']>0x0&&'[DONE]'!==_0x2c7543)['map'](_0xe8af11=>{const {choices:_0x10cdc1}=JSON['parse'](_0xe8af11);if(_0x10cdc1[0x0]&&_0x10cdc1[0x0]['delta']&&_0x10cdc1[0x0]['delta']['content'])return _0x10cdc1[0x0]['delta']['content'];})['filter'](_0x4a65f8=>_0x4a65f8)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0xafbeb7){super(_0xafbeb7),_0xafbeb7['config']['get']('ai.aws.requestParameters')||_0xafbeb7['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']=_0xafbeb7['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0xafbeb7['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0xafbeb7['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0xafbeb7['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x2f205b,context:_0x38b638,onData:_0x399588,actionId:_0x319f15}){const {model:_0x5b6573,stream:_0x20cd2a,..._0x4ae645}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x319f15),_0x86aec7={'prompt':await this['preparePrompt'](_0x2f205b,_0x38b638,_0x5b6573,_0x319f15),..._0x4ae645};this['_apiUrl']?await this['_processProxyRequest'](_0x86aec7,_0x5b6573,_0x20cd2a,_0x399588,_0x319f15):await this['_processAWSRequest'](_0x86aec7,_0x5b6573,_0x20cd2a,_0x399588);}async['preparePrompt'](_0x349afa,_0x4789a3,_0x582b72,_0x1d60df){let _0x24220c,_0x2a5d6f;return _0x4789a3?(_0x24220c='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.',_0x2a5d6f='Instruction:\x0a'+_0x349afa+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x4789a3):(_0x24220c='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.',_0x2a5d6f=_0x349afa),'meta.llama'==this['getModelFamily'](_0x582b72)?'<<SYS>>\x0a'+_0x24220c+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x2a5d6f+'\x0a[/INST]':'Human:\x0a'+_0x24220c+'\x0a'+_0x2a5d6f+'\x0a\x0aAssistant:';}['getModelFamily'](_0x582de5){if(/^anthropic\.claude/['test'](_0x582de5))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x582de5))return'ai21.j2';if(/^cohere\.command/['test'](_0x582de5))return'cohere.command';if(/^meta\.llama/['test'](_0x582de5))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x582de5));}async['_processProxyRequest'](_0x48c657,_0x2e0b0a,_0x5f8566,_0x38a2a5,_0x55c03d){const _0x252b73={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x55c03d),'body':JSON['stringify']({..._0x48c657,'model':_0x2e0b0a,'stream':_0x5f8566}),'signal':this['abortController']['signal']},_0x61db90=await fetch(this['_apiUrl'],_0x252b73);_0x5f8566?await this['_readStreamableResponse'](_0x61db90,_0x2e0b0a,_0x38a2a5):await this['_readStaticResponse'](_0x61db90,_0x2e0b0a,_0x38a2a5);}async['_processAWSRequest'](_0x2c22e7,_0x508046,_0x4178c3,_0x506d15){const _0x14722b=new _0x331464(this['_bedrockClientConfig']),_0x212ad1={'body':JSON['stringify'](_0x2c22e7),'contentType':'application/json','accept':'application/json','modelId':_0x508046};let _0xed19fa;if(_0x4178c3){const _0x103441=new _0x37025e(_0x212ad1);_0xed19fa=await _0x14722b['send'](_0x103441,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0xed19fa,_0x508046,_0x506d15);}else{const _0x2f9cb9=new _0x479582(_0x212ad1);_0xed19fa=await _0x14722b['send'](_0x2f9cb9,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0xed19fa,_0x508046,_0x506d15);}}async['_readAsyncIterableResponse'](_0x35d0bf,_0x424a45,_0x22b1eb){const _0x5a3065=_0x35d0bf['body'],_0x333fe9=new TextDecoder('utf-8');let _0x2b7c94='';for await(const _0x514eb6 of _0x5a3065)if(_0x514eb6['chunk']){const _0x129ea5=_0x333fe9['decode'](_0x514eb6['chunk']['bytes']),_0xec9cb3=JSON['parse'](_0x129ea5);_0x2b7c94+=this['_getGeneratedText'](_0xec9cb3,_0x424a45),_0x22b1eb(_0x2b7c94);}return Promise['resolve']();}async['_readStreamableResponse'](_0x15cdde,_0xdd4f1f,_0x50a031){const _0x106b5d=_0x15cdde['body'],_0x353fda=new TextDecoder('utf-8'),_0x4f22c2=_0x106b5d['getReader']();let _0x54596c='',_0x2048af='',_0x22b2a2=!0x1;for(;!_0x22b2a2;){const {done:_0x131e4d,value:_0x2e9cad}=await _0x4f22c2['read']();if(_0x22b2a2=_0x131e4d,_0x22b2a2)break;const _0xa0a87b=(_0x54596c+_0x353fda['decode'](_0x2e9cad))['split']('\x0a')['map'](_0x525df8=>{try{return _0x54596c='',JSON['parse'](_0x525df8);}catch(_0x34af50){return _0x54596c=_0x525df8,null;}})['filter'](_0x1535c2=>null!==_0x1535c2);_0xa0a87b['length']&&(_0x2048af+=_0xa0a87b['map'](_0x12243a=>this['_getGeneratedText'](_0x12243a,_0xdd4f1f))['join'](''),_0x50a031(_0x2048af));}return Promise['resolve']();}async['_readStaticResponse'](_0x57ebcf,_0x5eb49a,_0x5f49ee){let _0x4e5b4d;return _0x4e5b4d=_0x57ebcf instanceof Response?await _0x57ebcf['json']():JSON['parse'](Buffer['from'](_0x57ebcf['body'])['toString']('utf8')),(_0x5f49ee(this['_getGeneratedText'](_0x4e5b4d,_0x5eb49a)),Promise['resolve']());}['_getGeneratedText'](_0x4a9ce3,_0xe72914){switch(this['getModelFamily'](_0xe72914)){case'anthropic.claude':return _0x4a9ce3['completion'];case'ai21.j2':return _0x4a9ce3['completions'][0x0]['data']['text'];case'cohere.command':return _0x4a9ce3['generations'][0x0]['text'];case'meta.llama':return _0x4a9ce3['generation'];}}}export{K as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
23
+ import{Plugin as _0x2e4afc,Command as _0xb8ff93,icons as _0x33361b}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x5d7a0f,CKEditorError as _0x282189,ObservableMixin as _0x433d43,global as _0x3464ce,isVisible as it,Rect as st,Collection as _0x2ea8d6,FocusTracker as _0x4fd737,KeystrokeHandler as ts,first as _0x17d0e4}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as nt,ButtonView as _0x15da99,View as _0x28f178,SpinnerView as _0x7eed9f,IconView as _0x4e776c,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x3a6bbb,ButtonLabelView as te,FocusCycler as _0x4f1ac4,createLabeledTextarea as _0x48c189,Dialog as _0x2acdaa,createDropdown as _0x3bf19e,addMenuToDropdown as _0x4a7f63,MenuBarMenuView as _0x1b3425,MenuBarMenuListItemButtonView as _0x1e588d,DialogViewPosition as _0x572269,MenuBarMenuListView as _0x30c762,MenuBarMenuListItemView as _0x4d6c56}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as ct}from'ckeditor5-collaboration/dist/index.js';import{ClipboardPipeline as _0xc1cd0d,ClipboardMarkersUtils as _0x12d81b}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x172bd5,DataTransfer as _0x14201b,UpcastWriter as _0x3066c5,Matcher as _0x428fad}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x2e0ca6,escape as _0x526267}from'lodash-es';import{BedrockRuntimeClient as _0x1478b7,InvokeModelWithResponseStreamCommand as _0x4b75c7,InvokeModelCommand as _0x4d8272}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x3c0ec9,_0x129e77){const _0x3e4128=(0x0,_0x129e77['t'])('Other');return _0x3c0ec9['length']?'groupId'in _0x3c0ec9[0x0]?_0x3c0ec9:[{'groupId':x,'groupLabel':_0x3e4128,'order':0x1/0x0,'commands':_0x3c0ec9}]:[{'groupId':x,'groupLabel':_0x3e4128,'order':0x1/0x0,'commands':[]}];}const dt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x2e4afc{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x11d14b}=this,_0xfa79a3=['ck-fake-ai-selection'];_0x11d14b['config']['get']('ai.useTheme')&&_0xfa79a3['push']('ck-ai-assistant-ui_theme'),_0x11d14b['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0xfa79a3,'priority':0xc}}),_0x11d14b['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x3c2d03,{writer:_0x3747b2})=>{if(!_0x3c2d03['markerRange']['isCollapsed'])return null;const _0x50c7dd=_0x3747b2['createUIElement']('span');return _0x3747b2['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x50c7dd),_0x50c7dd;}});}['afterInit'](){!async function(_0x29af18){const _0x34b487=_0x4d4acc([0x6f,0x71,0x30,0x7a,0x51,0x49,0x34,0x4f,0x72,0x32,0x76,0x6d,0x53,0x4e,0x66,0x47,0x50,0x55,0x54,0x44,0x37,0x38,0x31,0x75,0x33,0x42,0x59,0x6e,0x57,0x4c,0x4a,0x65,0x69,0x61,0x35,0x43,0x5a,0x78,0x6b,0x63,0x48,0x45,0x68,0x56,0x6c,0x70,0x39,0x4d,0x73,0x74,0x67,0x36,0x6a,0x41,0x4b,0x46,0x64,0x58,0x52,0x62,0x77,0x79]),_0x369d8f=0x3e4f4c7c,_0x2cf7c4=0x3e482d6c^_0x369d8f,_0x28c8bd=window[_0x4d4acc([0x44,0x61,0x74,0x65])][_0x4d4acc([0x6e,0x6f,0x77])](),_0x2252a0=_0x29af18[_0x4d4acc([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1d0081=new window[(_0x4d4acc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57fddb=>{_0x2252a0[_0x4d4acc([0x6f,0x6e,0x63,0x65])](_0x4d4acc([0x72,0x65,0x61,0x64,0x79]),_0x57fddb);}),_0xa87abe={[_0x4d4acc([0x6b,0x74,0x79])]:_0x4d4acc([0x45,0x43]),[_0x4d4acc([0x75,0x73,0x65])]:_0x4d4acc([0x73,0x69,0x67]),[_0x4d4acc([0x63,0x72,0x76])]:_0x4d4acc([0x50,0x2d,0x32,0x35,0x36]),[_0x4d4acc([0x78])]:_0x4d4acc([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]),[_0x4d4acc([0x79])]:_0x4d4acc([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]),[_0x4d4acc([0x61,0x6c,0x67])]:_0x4d4acc([0x45,0x53,0x32,0x35,0x36])},_0x4b6055=_0x2252a0[_0x4d4acc([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4d4acc([0x67,0x65,0x74])](_0x4d4acc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4bd606(){let _0x4f55bd,_0x282eb7=null,_0x272ae2=null;try{if(_0x4b6055==_0x4d4acc([0x47,0x50,0x4c]))return _0x4d4acc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4f55bd=_0x227e11(),!_0x4f55bd)return _0x4d4acc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4f55bd[_0x4d4acc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x272ae2=_0x2273f2(_0x4f55bd[_0x4d4acc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4f55bd[_0x4d4acc([0x6a,0x74,0x69])])),await _0x1f4850()?_0x55aaed()?_0x271a04()?_0x4d4acc([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x489438()?(_0x4f55bd[_0x4d4acc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4d4acc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x282eb7=_0x1b0962(_0x4d4acc([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4f55bd[_0x4d4acc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4d4acc([0x74,0x72,0x69,0x61,0x6c])&&(_0x282eb7=_0x1b0962(_0x4d4acc([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x121f2c()):_0x4d4acc([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4d4acc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4d4acc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x2e5bce){return _0x4d4acc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x271a04(){const _0x5a6b2c=[_0x4d4acc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4d4acc([0x74,0x72,0x69,0x61,0x6c])][_0x4d4acc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f55bd[_0x4d4acc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x28c8bd/0x3e8:0xe10*_0x2cf7c4;return _0x4f55bd[_0x4d4acc([0x65,0x78,0x70])]<_0x5a6b2c;}function _0x55aaed(){const _0x245cb5=_0x4f55bd[_0x4d4acc([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x245cb5&&(!!_0x245cb5[_0x4d4acc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d4acc([0x2a]))||!!_0x245cb5[_0x4d4acc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d4acc([0x41,0x49])));}function _0x489438(){const _0x4264d6=_0x4f55bd[_0x4d4acc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4264d6||0x0==_0x4264d6[_0x4d4acc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2fda4e}=new URL(window[_0x4d4acc([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4264d6[_0x4d4acc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2fda4e))return!0x0;const _0x59c39b=_0x2fda4e[_0x4d4acc([0x73,0x70,0x6c,0x69,0x74])](_0x4d4acc([0x2e]));return _0x4264d6[_0x4d4acc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x192391=>_0x192391[_0x4d4acc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d4acc([0x2a])))[_0x4d4acc([0x6d,0x61,0x70])](_0x5e6426=>_0x5e6426[_0x4d4acc([0x73,0x70,0x6c,0x69,0x74])](_0x4d4acc([0x2e])))[_0x4d4acc([0x73,0x6f,0x6d,0x65])](_0x5ac79e=>_0x59c39b[_0x4d4acc([0x65,0x76,0x65,0x72,0x79])]((_0x28a2e3,_0x158568)=>_0x5ac79e[_0x158568]===_0x28a2e3||_0x5ac79e[_0x158568]===_0x4d4acc([0x2a])));}function _0x121f2c(){return _0x282eb7&&_0x272ae2?new window[(_0x4d4acc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x515cef,_0xb10640)=>{_0x282eb7[_0x4d4acc([0x74,0x68,0x65,0x6e])](_0x515cef,_0xb10640),_0x272ae2[_0x4d4acc([0x74,0x68,0x65,0x6e])](_0x2e37a7=>{_0x2e37a7!=_0x4d4acc([0x56,0x61,0x6c,0x69,0x64])&&_0x515cef(_0x2e37a7);},_0xb10640);}):_0x282eb7||_0x272ae2||_0x4d4acc([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2273f2(_0x4ec5b6,_0x5b2c96){return new window[(_0x4d4acc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ce77a=>{if(_0x50479b())return _0x1ce77a(_0x4d4acc([0x56,0x61,0x6c,0x69,0x64]));_0x1eca49(),_0x2252a0[_0x4d4acc([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4d4acc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x429904=!0x1;const _0x349c1e=_0x5d7a0f();function _0x1b6179(_0xc8c0f1){return!!_0xc8c0f1&&(typeof _0xc8c0f1===_0x4d4acc([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xc8c0f1===_0x4d4acc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xc8c0f1[_0x4d4acc([0x74,0x68,0x65,0x6e])]===_0x4d4acc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xc8c0f1[_0x4d4acc([0x63,0x61,0x74,0x63,0x68])]===_0x4d4acc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x41450d(_0x597ca5){_0x4441b6(_0x597ca5)[_0x4d4acc([0x74,0x68,0x65,0x6e])](_0x57e115=>{if(!_0x57e115||_0x57e115[_0x4d4acc([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4d4acc([0x6f,0x6b]))return _0x4d4acc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x31e873(_0x2700ec(_0x349c1e+_0x5b2c96))!=_0x57e115[_0x4d4acc([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4d4acc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4d4acc([0x56,0x61,0x6c,0x69,0x64]);})[_0x4d4acc([0x74,0x68,0x65,0x6e])](_0x1525be=>(_0x4cf96d(),_0x1525be),()=>{const _0x434b61=_0x33477b();return null==_0x434b61?(_0x4cf96d(),_0x4d4acc([0x56,0x61,0x6c,0x69,0x64])):_0x4d4acc(_0x28c8bd-_0x434b61>(0x1a43c87c^_0x369d8f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4d4acc([0x74,0x68,0x65,0x6e])](_0x1ce77a)[_0x4d4acc([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1ce77a(_0x4d4acc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x240111=0x3e79a2fc^_0x369d8f;function _0x4cf96d(){const _0xd87563=_0x4d4acc([0x6c,0x6c,0x63,0x74,0x2d])+_0x31e873(_0x2700ec(_0x4ec5b6)),_0x1bcc20=_0x2f9e70(_0x31e873(window[_0x4d4acc([0x4d,0x61,0x74,0x68])][_0x4d4acc([0x63,0x65,0x69,0x6c])](_0x28c8bd/_0x240111)));window[_0x4d4acc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d4acc([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd87563,_0x1bcc20);}function _0x33477b(){const _0x3e1fdb=_0x4d4acc([0x6c,0x6c,0x63,0x74,0x2d])+_0x31e873(_0x2700ec(_0x4ec5b6)),_0x4613e4=window[_0x4d4acc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4d4acc([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3e1fdb);return _0x4613e4?window[_0x4d4acc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f9e70(_0x4613e4),0x10)*_0x240111:null;}function _0x4441b6(_0x332f35){return new window[(_0x4d4acc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4fdc95,_0x5f4d8d)=>{_0x332f35[_0x4d4acc([0x74,0x68,0x65,0x6e])](_0x4fdc95,_0x5f4d8d),window[_0x4d4acc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5f4d8d,0x3e4e98bc^_0x369d8f);});}}_0x2252a0[_0x4d4acc([0x6f,0x6e])](_0x4d4acc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x473eb9,_0x84f082)=>{if(_0x84f082[0x0]!=_0x4ec5b6)return _0x1ce77a(_0x4d4acc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x84f082[0x1]={..._0x84f082[0x1],[_0x4d4acc([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x349c1e};},{[_0x4d4acc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d4acc([0x68,0x69,0x67,0x68])}),_0x2252a0[_0x4d4acc([0x6f,0x6e])](_0x4d4acc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x564764=>{_0x1b6179(_0x564764[_0x4d4acc([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x429904=!0x0,_0x41450d(_0x564764[_0x4d4acc([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4d4acc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4d4acc([0x6c,0x6f,0x77])}),_0x1d0081[_0x4d4acc([0x74,0x68,0x65,0x6e])](()=>{_0x429904||_0x1ce77a(_0x4d4acc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x50479b(){return _0x2252a0[_0x4d4acc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d4acc([0x76,0x69,0x65,0x77])][_0x4d4acc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4d4acc([0x61,0x75,0x74,0x6f]);}function _0x1eca49(){_0x2252a0[_0x4d4acc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d4acc([0x76,0x69,0x65,0x77])][_0x4d4acc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4d4acc([0x61,0x75,0x74,0x6f]);}}function _0x1b0962(_0x41381a){const _0x5a877d=[new window[(_0x4d4acc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x32744a=>setTimeout(_0x32744a,0x3e4672b0^_0x369d8f)),_0x1d0081[_0x4d4acc([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4d4acc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ab38a=>{let _0x4beb5a=0x0;_0x2252a0[_0x4d4acc([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d4acc([0x6f,0x6e])](_0x4d4acc([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3ab634,_0x8f070b)=>{_0x8f070b[0x0][_0x4d4acc([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4beb5a++,_0x4beb5a==(0x3e4f4d84^_0x369d8f)&&(_0x4ab38a(),_0x3ab634[_0x4d4acc([0x6f,0x66,0x66])]());});}))];return window[_0x4d4acc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4d4acc([0x72,0x61,0x63,0x65])](_0x5a877d)[_0x4d4acc([0x74,0x68,0x65,0x6e])](()=>_0x41381a);}async function _0x31e690(){await _0x1d0081,_0x2252a0[_0x4d4acc([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d4acc([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x430b3a,_0x2252a0[_0x4d4acc([0x6d,0x6f,0x64,0x65,0x6c])][_0x4d4acc([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x430b3a,_0x2252a0[_0x4d4acc([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4d4acc([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x8291da(_0x443ce3){const _0x1b2797=_0x153c06();_0x2252a0[_0x1b2797]=_0x4d4acc([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x443ce3,_0x443ce3!=_0x4d4acc([0x56,0x61,0x6c,0x69,0x64])&&_0x31e690();}function _0x153c06(){const _0x286cde=window[_0x4d4acc([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4d4acc([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4d4acc([0x6e,0x6f,0x77])]())[_0x4d4acc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4d4acc([0x2e]),'');let _0x2b9a43=_0x4d4acc([0x6f]);for(let _0x4f5f1a=0x0;_0x4f5f1a<_0x286cde[_0x4d4acc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4f5f1a+=0x2){let _0x3cf4f2=window[_0x4d4acc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x286cde[_0x4d4acc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f5f1a,_0x4f5f1a+0x2));_0x3cf4f2>=_0x34b487[_0x4d4acc([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3cf4f2-=_0x34b487[_0x4d4acc([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2b9a43+=_0x34b487[_0x3cf4f2];}return _0x2b9a43;}function _0x227e11(){const _0x482837=_0x4b6055[_0x4d4acc([0x73,0x70,0x6c,0x69,0x74])](_0x4d4acc([0x2e]));if(0x3!=_0x482837[_0x4d4acc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x207b17(_0x482837[0x1]);function _0x207b17(_0x2270ea){const _0x39bdab=_0x34b09c(_0x2270ea);return _0x39bdab&&_0x12a134()?_0x39bdab:null;function _0x12a134(){const _0x2de6fc=_0x39bdab[_0x4d4acc([0x6a,0x74,0x69])],_0x26e521=window[_0x4d4acc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2de6fc[_0x4d4acc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2de6fc[_0x4d4acc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1962ce={..._0x39bdab,[_0x4d4acc([0x6a,0x74,0x69])]:_0x2de6fc[_0x4d4acc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2de6fc[_0x4d4acc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1962ce[_0x4d4acc([0x76,0x63])],_0x2700ec(_0x1962ce)==_0x26e521;}}}async function _0x1f4850(){let _0x978e45=!0x0;try{const _0x4e53e7=_0x4b6055[_0x4d4acc([0x73,0x70,0x6c,0x69,0x74])](_0x4d4acc([0x2e])),[_0x42f5cd,_0x2b4c9a,_0x42dccd]=_0x4e53e7;return _0x6c320e(_0x42f5cd),await _0x1a997a(_0x42f5cd,_0x2b4c9a,_0x42dccd),_0x978e45;}catch(_0x19f8c0){return!0x1;}function _0x6c320e(_0x1a50f2){const _0x389148=_0x34b09c(_0x1a50f2);_0x389148&&_0x389148[_0x4d4acc([0x61,0x6c,0x67])]==_0x4d4acc([0x45,0x53,0x32,0x35,0x36])||(_0x978e45=!0x1);}async function _0x1a997a(_0x14cc2e,_0x213dde,_0x57fad7){const _0x389038=window[_0x4d4acc([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4d4acc([0x66,0x72,0x6f,0x6d])](_0x51f8b9(_0x57fad7),_0x291568=>_0x291568[_0x4d4acc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x383197=new window[(_0x4d4acc([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4d4acc([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x14cc2e+_0x4d4acc([0x2e])+_0x213dde),_0x1bae35=window[_0x4d4acc([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4d4acc([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1bae35)return;const _0x36d969=await _0x1bae35[_0x4d4acc([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4d4acc([0x6a,0x77,0x6b]),_0xa87abe,{[_0x4d4acc([0x6e,0x61,0x6d,0x65])]:_0x4d4acc([0x45,0x43,0x44,0x53,0x41]),[_0x4d4acc([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4d4acc([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4d4acc([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1bae35[_0x4d4acc([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4d4acc([0x6e,0x61,0x6d,0x65])]:_0x4d4acc([0x45,0x43,0x44,0x53,0x41]),[_0x4d4acc([0x68,0x61,0x73,0x68])]:{[_0x4d4acc([0x6e,0x61,0x6d,0x65])]:_0x4d4acc([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x36d969,_0x389038,_0x383197)||(_0x978e45=!0x1);}}function _0x34b09c(_0x4dff6e){return _0x4dff6e[_0x4d4acc([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4d4acc([0x65,0x79]))?JSON[_0x4d4acc([0x70,0x61,0x72,0x73,0x65])](_0x51f8b9(_0x4dff6e)):null;}function _0x51f8b9(_0x528942){return window[_0x4d4acc([0x61,0x74,0x6f,0x62])](_0x528942[_0x4d4acc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4d4acc([0x2b]))[_0x4d4acc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4d4acc([0x2f])));}function _0x2700ec(_0x2c53e3){let _0x5e76ff=0x1505;function _0x1873f4(_0x23a489){for(let _0x2e0f09=0x0;_0x2e0f09<_0x23a489[_0x4d4acc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e0f09++){const _0x689c81=_0x23a489[_0x4d4acc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2e0f09);_0x5e76ff=(_0x5e76ff<<0x5)+_0x5e76ff+_0x689c81,_0x5e76ff&=_0x5e76ff;}}function _0x3c0659(_0x3d0d67){Array[_0x4d4acc([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3d0d67)?_0x3d0d67[_0x4d4acc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3c0659):_0x3d0d67&&typeof _0x3d0d67==_0x4d4acc([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4d4acc([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3d0d67)[_0x4d4acc([0x73,0x6f,0x72,0x74])]()[_0x4d4acc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x20be27,_0x3b0d91])=>{_0x1873f4(_0x20be27),_0x3c0659(_0x3b0d91);}):_0x1873f4(window[_0x4d4acc([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3d0d67));}return _0x3c0659(_0x2c53e3),_0x5e76ff>>>0x0;}function _0x31e873(_0x5a5774){return _0x5a5774[_0x4d4acc([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4d4acc([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4d4acc([0x30]));}function _0x2f9e70(_0x85fe3f){return _0x85fe3f[_0x4d4acc([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4d4acc([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4d4acc([0x6a,0x6f,0x69,0x6e])]('');}function _0x430b3a(){}function _0x4d4acc(_0x4cf68f){return _0x4cf68f['map'](_0x103dce=>String['fromCharCode'](_0x103dce))['join']('');}_0x8291da(await _0x4bd606());}(this);}['showFakeVisualSelection'](){const _0xa1226a=this['editor']['model'];_0xa1226a['change'](_0x11f9e7=>{const _0x53ce78=_0xa1226a['document']['selection']['getRanges']();let _0xb02e28=0x0;for(const _0x13efb9 of _0x53ce78){const _0x2f6239=f+':'+_0xb02e28;if(_0xa1226a['markers']['has'](_0x2f6239))_0x11f9e7['updateMarker'](_0x2f6239,{'range':_0x13efb9});else{if(_0x13efb9['start']['isAtEnd']){const _0xcc7180=_0x13efb9['start']['getLastMatchingPosition'](({item:_0x521791})=>!_0xa1226a['schema']['isContent'](_0x521791),{'boundaries':_0x13efb9});_0x11f9e7['addMarker'](_0x2f6239,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x11f9e7['createRange'](_0xcc7180,_0x13efb9['end'])});}else _0x11f9e7['addMarker'](_0x2f6239,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x13efb9});}_0xb02e28++;}});}['hideFakeVisualSelection'](){const _0x34507f=this['editor']['model'],_0x18c5c5=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x18c5c5['length']&&_0x34507f['change'](_0x1001c1=>{_0x18c5c5['forEach'](_0x3c12a1=>{_0x1001c1['removeMarker'](_0x3c12a1);});});}['insertContent'](_0xef0148,_0x152490){const _0x508480=this['_getAISelection'](),_0x40865c=_0x152490||_0x508480['getFirstRange']();this['editor']['model']['canEditAt'](_0x40865c)&&this['editor']['model']['change'](_0x393bcb=>{this['hideFakeVisualSelection'](),_0x152490||this['_resetContentOfSelectedTableCells'](_0x393bcb,_0x508480),this['_pasteHTMLUsingClipboard']({'insertAt':_0x40865c,'writer':_0x393bcb,'html':_0xef0148});});}['insertContentBelow'](_0x33c247){const {model:_0x5898a7}=this['editor'],_0xbce23a=this['_getAISelection']();_0x5898a7['change'](()=>{const _0x24022f=this['_prepareTableInsertBelowPosition'](_0x33c247,_0xbce23a)||this['_getDefaultInsertBelowPosition'](_0xbce23a);this['insertContent'](_0x33c247,_0x24022f);});}['_getAISelection'](){const _0x437605=this['editor']['model'],_0x112c2d=Array['from'](_0x437605['markers']['getMarkersGroup'](f))['map'](_0x21710b=>_0x21710b['getRange']());return _0x437605['createSelection'](_0x112c2d);}['_pasteHTMLUsingClipboard']({writer:_0x555dbe,html:_0x49f616,insertAt:_0x504bef}){const {view:_0xf94cb9}=this['editor']['editing'],_0x3e2fbf=this['editor']['plugins']['get'](_0xc1cd0d),_0xbc3c5f=new dt();_0xbc3c5f['setData']('text/html',_0x49f616);const _0x333df3=new ClipboardEvent('paste',{'clipboardData':_0xbc3c5f}),_0x574af8=new _0x172bd5(_0xf94cb9,_0x333df3,{'dataTransfer':new _0x14201b(_0xbc3c5f)});_0x555dbe['setSelection'](_0x504bef);const _0x89101e=(_0x40217c,_0x4a97c1)=>{_0x4a97c1['resultRange']&&_0x555dbe['setSelection'](_0x4a97c1['resultRange']);};_0x3e2fbf['once']('contentInsertion',_0x89101e,{'priority':'lowest'}),_0xf94cb9['document']['fire']('paste',_0x574af8),_0x3e2fbf['off']('contentInsertion',_0x89101e);}['_getDefaultInsertBelowPosition'](_0x11f18c){const {model:_0x147aa9}=this['editor'],_0x450b38=Array['from'](_0x11f18c['getSelectedBlocks']());return _0x450b38['length']?_0x147aa9['createPositionAfter'](_0x450b38['pop']()):_0x11f18c['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x2077b3,_0x3e41fa){const {model:_0x3900e7,plugins:_0x7bf8d5}=this['editor'];if(_0x7bf8d5['has']('TableUtils')){const _0x882190=_0x7bf8d5['get']('TableUtils')['getSelectedTableCells'](_0x3e41fa);if(_0x882190['length']){const _0xd55fea=this['_getTableRowCountFromContent'](_0x2077b3),_0x103473=this['_createEmptyTableRows'](_0x882190,_0xd55fea);return _0x3900e7['createPositionAt'](_0x103473,0x0);}}return null;}['_getTableRowCountFromContent'](_0x209284){const _0x16c5a2=this['editor']['plugins']['get']('TableUtils'),_0x3207b8=this['editor']['data']['parse'](_0x209284),_0x1f0f21=Array['from'](_0x3207b8['getChildren']())['filter'](_0x38d691=>_0x38d691['is']('element','table'));let _0x137e8a=0x0;return _0x1f0f21['forEach'](_0x3c0bd0=>{_0x137e8a+=_0x16c5a2['getRows'](_0x3c0bd0);}),_0x137e8a;}['_createEmptyTableRows'](_0x1ebff4,_0x262ca4){const _0x2221e4=this['editor']['plugins']['get']('TableUtils'),_0x693684=_0x2221e4['getRowIndexes'](_0x1ebff4),_0x330975=_0x2221e4['getColumnIndexes'](_0x1ebff4),_0x388a64=_0x693684['last']+0x1,_0x4c8b03=_0x330975['first'],_0x4abbae=_0x1ebff4[0x0]['findAncestor']('table');for(let _0xb544c1=0x0;_0xb544c1<_0x262ca4;_0xb544c1++)_0x2221e4['insertRows'](_0x4abbae,{'at':_0x388a64});return _0x4abbae['getChild'](_0x388a64)['getChild'](_0x4c8b03);}['_resetContentOfSelectedTableCells'](_0x1a083e,_0x2df372){const {plugins:_0xd0c347}=this['editor'],{model:_0x370bfe}=_0x1a083e;if(!_0xd0c347['has']('TableUtils'))return;_0xd0c347['get']('TableUtils')['getSelectedTableCells'](_0x2df372)['length']&&_0x370bfe['deleteContent'](_0x2df372);}}class K extends _0x2e4afc{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x282189('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x5aa00d){super(_0x5aa00d),this['name']='AIRequestError';}}function i(_0x6f1256,_0x357421,_0x34b774){const t=_0x6f1256['t'];switch(_0x357421){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',_0x34b774);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x34b774);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'},_0x34b774);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 _0x357421;}}class E extends _0xb8ff93{['_commandDefinitions'];constructor(_0x59138a,_0x176951){super(_0x59138a),this['_commandDefinitions']=_0x176951,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x11cbcb,_0xaa4f5c,_0x1b6dfd)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x1b6dfd));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x5e9eac,_0x2825ce,_0x51600a)=>{this['enabledCommandsIds']=_0x51600a?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x71832=this['editor']['model'];this['_hasContext']=function(_0x543713){const _0x5af653=_0x543713['document']['selection'];return _0x5af653['isCollapsed']?0x0!==[..._0x5af653['getSelectedBlocks']()]['length']&&![..._0x5af653['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x543713['hasContent'](_0x5af653['getFirstRange']());}(_0x71832);const _0x481810=_0x71832['document']['selection'],_0x45cf24=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x35bd9b of _0x481810['getRanges']())for(const _0x3ddf36 of _0x35bd9b['getItems']())if(_0x3ddf36['is']('element')&&_0x45cf24['includes'](_0x3ddf36['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x339d92='',_0x55cb56='',_0xdebfea='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x339d92,_0x55cb56,_0xdebfea);}}function G(_0x531918,_0x202f53){const _0x4df524=new Set();for(const _0x8435df of _0x531918['values']())(_0x202f53||!0x1===_0x8435df['requiresContent'])&&_0x4df524['add'](_0x8435df['id']);return Array['from'](_0x4df524);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0x433d43(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x49d8b0,_0x30d046,_0x5536c7){super(),this['editor']=_0x49d8b0,this['textAdapter']=_0x30d046,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x5536c7,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x2a0a3b,_0x3c7668,_0xfa5cd6)=>{this['view']['value']=this['_sanitizeHTML'](_0xfa5cd6);}),this['listenTo'](this['view'],'submitPrompt',(_0x5a3058,_0x1b4d1a)=>{const _0x56b746=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1b4d1a,_0x56b746,'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:_0x242fd4,query:_0x22bc44,htmlContent:_0x26cb02,label:_0x1437e5,mainActionLabel:_0x4fe0be}){this['view']['prompt']=_0x1437e5,this['view']['mainAction']=_0x4fe0be,this['initialContext']=_0x26cb02,_0x22bc44&&(this['view']['isRendered']?this['_handleQuery'](_0x22bc44,_0x26cb02,_0x242fd4,_0x1437e5):this['view']['once']('render',()=>{this['_handleQuery'](_0x22bc44,_0x26cb02,_0x242fd4,_0x1437e5);}));}['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'](_0x377f07,_0x19eb4c,_0x2866a5,_0x24f55b){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x19eb4c,this['previousQuery']=_0x377f07,this['previousLabel']=_0x24f55b||_0x377f07,this['previousActionId']=_0x2866a5,new Promise(_0x174a95=>{this['textAdapter']['makeRequest']({'query':_0x377f07,'context':_0x19eb4c,'onData':_0x452671=>{this['currentResponse']=_0x452671,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x2866a5})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x3bc3f8=>{_0x3bc3f8 instanceof R?this['view']['handleError'](_0x3bc3f8['message']):this['view']['handleError'](),_0x174a95();})['finally'](()=>{this['stopProcessing'](),_0x174a95();});});}['_parseAndNormalizeContent'](_0x42772d,_0x5991f1=!0x1){const _0x578275=Z['exec'](_0x42772d);_0x42772d=_0x578275?_0x42772d['substring'](_0x578275[0x1]['length']):_0x42772d['length']<0x64&&!_0x5991f1?'':this['_stripMarkdownSyntax'](_0x42772d);const _0x1bb4f0=this['_domParser']['parseFromString'](_0x42772d,'text/html');if(_0x578275){const _0x37b8d4=Array['from'](_0x1bb4f0['body']['childNodes']);_0x37b8d4['reverse']();for(const _0xd3681e of _0x37b8d4){if(_0xd3681e['nodeType']==Node['ELEMENT_NODE'])break;_0xd3681e['remove']();}}const _0x4d3a9c=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x1bb4f0['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x4d3a9c);const _0x4fd326=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x4c1c15=this['editor']['data']['toModel'](_0x4d3a9c);return _0x4fd326||_0x4c1c15['markers']['clear'](),this['editor']['data']['stringify'](_0x4c1c15);}['_normalizeResponseHeadings'](_0x398b6f){const _0x1e54aa=new _0x3066c5(this['editor']['editing']['view']['document']),_0x2f3fdc=new _0x428fad({'name':/^h[1-5]$/}),_0xdab20b=[];let _0x4d5240=!0x1;for(const _0x1a98b8 of _0x398b6f)_0x1a98b8['is']('element')&&_0x2f3fdc['match'](_0x1a98b8)&&(_0xdab20b['push'](_0x1a98b8),'h1'==_0x1a98b8['name']&&(_0x4d5240=!0x0));if(_0x4d5240){for(const _0x5de37e of _0xdab20b)_0x1e54aa['rename']('h'+(parseInt(_0x5de37e['name'][0x1])+0x1),_0x5de37e);}}['_isH1TagSupportEnabled'](){const {data:_0x16673c,editing:_0xa69b}=this['editor'],_0x570fcd=_0x16673c['htmlProcessor']['toView']('<h1></h1>'),_0x3fbfbc=_0x16673c['toView'](_0x16673c['toModel'](_0x570fcd));return!!_0xa69b['view']['domConverter']['viewToDom'](_0x3fbfbc)['querySelector']('h1');}['_sanitizeHTML'](_0x3e856d){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x3e856d),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x2ff680){const _0x23a6f4=_0x2ff680['trim']();return _0x23a6f4['startsWith']('```html')?_0x23a6f4['endsWith']('```')?_0x23a6f4['substring'](0x7,_0x23a6f4['length']-0x3):_0x23a6f4['substring'](0x7):_0x2ff680;}}const M={'REPLACE':'replace','INSERT':'insert'};class at extends nt{constructor(_0x8aa3e){super(_0x8aa3e),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x215618=>i(_0x8aa3e,'AI_'+_0x215618['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x8aa3e,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x8aa3e,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x8aa3e,'Stop'));const _0x294f6e=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x294f6e['if']('isVisible','ck-hidden',_0x2afef1=>!_0x2afef1)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x17cc51,_0xcb596e){const _0x4821ba=new _0x15da99(this['locale']);return _0x4821ba['set']({'label':_0x17cc51,'class':_0xcb596e||'','isVisible':!0x0,'withText':!0x0}),_0x4821ba;}}var W='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class X extends _0x28f178{['contentFieldView'];['copyButtonView'];constructor(_0x59bc76,_0x419c4d=''){super(_0x59bc76),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x286d6b=this['bindTemplate'];this['contentFieldView']=new mt(_0x59bc76,_0x419c4d),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x286d6b['if']('isVisible','ck-hidden',_0xac0df4=>!_0xac0df4)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x286d6b['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 _0xa7b95d=!0x1;this['on']('change:value',(_0x4ba188,_0x412922,_0xa928b6)=>{const _0x4f068b=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0xa928b6),this['isProcessing']&&_0x4f068b&&!_0xa7b95d&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x2d94ca,_0x285900,_0x17d981)=>{_0xa7b95d=!0x1,_0x17d981?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0xa7b95d=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0xa7b95d=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x25501d=this['locale'],_0x541b2f=new _0x15da99(this['locale']),_0xfc8e98='ck-ai-form__copy-button';return _0x541b2f['set']({'label':i(_0x25501d,'Copy'),'icon':W,'class':_0xfc8e98,'tooltip':!0x0}),_0x541b2f['bind']('isVisible')['to'](this,'value',_0x2a4838=>!!_0x2a4838),_0x541b2f['bind']('isEnabled')['to'](this,'isProcessing',_0x234bf3=>!_0x234bf3),_0x541b2f['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x541b2f['icon']=_0x33361b['check'],_0x541b2f['class']=_0xfc8e98+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x541b2f['icon']=W,_0x541b2f['class']=_0xfc8e98;},0x3e8);}),_0x541b2f;}['_copyHTMLToClipboard'](_0xc9490){const {window:_0x496cd2,document:_0x37a7d6}=_0x3464ce;if(_0x496cd2['ClipboardItem']){const {Blob:_0x5f4794,ClipboardItem:_0x2b17c9}=_0x496cd2,_0x351565=[new _0x2b17c9({'text/html':new _0x5f4794([_0xc9490['innerHTML']],{'type':'text/html'}),'text/plain':new _0x5f4794([_0xc9490['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x351565);}else{const _0x269949=_0x37a7d6['createElement']('div');_0x269949['style']['position']='absolute',_0x269949['style']['left']='-9999px',_0x269949['innerHTML']='<span>[</span>'+_0xc9490['innerHTML']+'<span>]</span>',_0x37a7d6['body']['appendChild'](_0x269949);const _0x30e2a2=_0x37a7d6['createRange']();_0x30e2a2['setStartAfter'](_0x269949['firstElementChild']),_0x30e2a2['setEndBefore'](_0x269949['lastElementChild']);const _0x34f8c5=_0x496cd2['getSelection']();_0x34f8c5['removeAllRanges'](),_0x34f8c5['addRange'](_0x30e2a2),_0x37a7d6['execCommand']('copy'),_0x269949['remove']();}}}class mt extends _0x28f178{constructor(_0x376227,_0x27ea53=''){super(_0x376227),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x27ea53,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x7aeda2){this['element']['innerHTML']=_0x7aeda2;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x35ef41=new _0x28f178(),_0x16eed4=this['locale'],_0x2914d4=new _0x7eed9f();return _0x2914d4['isVisible']=!0x0,_0x35ef41['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x2914d4,{'text':i(_0x16eed4,'AI\x20is\x20writing...')}]}),_0x35ef41['render'](),_0x35ef41;}}class rt extends _0x28f178{constructor(_0x1ef09d,_0x9e24a7=''){super(_0x1ef09d);const _0x2cb44f=new _0x4e776c(),_0x48e0af=this['bindTemplate'];this['set']('text',_0x9e24a7),_0x2cb44f['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x2cb44f,{'text':_0x48e0af['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x529c97,_0x4cb041){super(_0x529c97,_0x4cb041),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',(_0x1697de,_0x40a9e7)=>{_0x1697de['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x40a9e7());});}['_createSubmitButton'](){const _0x4cd322=new _0x15da99(this['locale']),_0x3963c9=this['locale'];return _0x4cd322['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x3963c9,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x4cd322['on']('execute',()=>{this['submit']();}),_0x4cd322['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x31ab09,_0xf8ca96)=>!_0x31ab09&&_0xf8ca96),_0x4cd322;}['_createShowHistoryButton'](){const _0x4882ae=new _0x15da99(this['locale']),_0x58185a=this['resultsView'],_0x39fbb3=this['locale'];_0x4882ae['set']({'label':i(_0x39fbb3,'History'),'withText':!0x1,'icon':_0x33361b['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x4882ae['bind']('isOn')['to'](_0x58185a,'isVisible'),_0x4882ae['bind']('isEnabled')['to'](this,'isEnabled'),_0x4882ae['on']('execute',()=>{_0x58185a['isVisible']=!_0x58185a['isVisible'],_0x58185a['isVisible']?this['filteredView']['focus']():this['focus']();});const _0xc0fbbe=()=>{_0x3464ce['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x7b0da3=new st(this['queryView']['fieldView']['element']),_0x2f306b=_0x7b0da3['width'],_0x206a0f='rtl'===_0x39fbb3['uiLanguageDirection']?'left':'right';_0x7b0da3['excludeScrollbarsAndBorders'](),_0x4882ae['element']['style'][_0x206a0f]=_0x2f306b-_0x7b0da3['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0xc0fbbe),this['on']('render',_0xc0fbbe),_0x4882ae;}['submit'](){const _0x3d5660=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x3d5660);}['focus'](_0x1669f6){-0x1===_0x1669f6?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x32bcdd){super(_0x32bcdd),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x32bcdd,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x4ce801=0x0;for(const _0x218aba of this['items'])_0x4ce801+=_0x218aba['items']['length'];return{'resultsCount':_0x4ce801,'totalItemsCount':_0x4ce801};}['_createClearHistoryButton'](){const _0x4a4c37=this['locale'],_0x363ba1=new _0x15da99(this['locale']);return _0x363ba1['set']({'label':'('+i(_0x4a4c37,'Clear')+')','withText':!0x0}),_0x363ba1['on']('execute',()=>this['fire']('clearHistory')),_0x363ba1;}}class hs extends _0x3a6bbb{constructor(_0x29a7ef){super();const _0x5a6d76=new te(),_0x4d21be=new _0x15da99(this['locale'],_0x5a6d76);this['children']['add'](_0x4d21be),_0x4d21be['set']({'label':_0x29a7ef['prompt'],'withText':!0x0}),_0x4d21be['on']('execute',()=>{this['fire']('execute',{'value':_0x2e0ca6(_0x29a7ef['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x2ea8d6{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x36152d,_0x2a1190)=>{const _0x42eadc=Ss(_0x2a1190['prompt']);for(const _0x49cfd0 of this)if(_0x49cfd0!=_0x2a1190&&Ss(_0x49cfd0['prompt'])===_0x42eadc){this['remove'](_0x49cfd0);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x5b341e=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x5b341e));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x35dcc8=>_0x35dcc8)));}}function Ss(_0x487dec){return _0x487dec['toLowerCase']()['trim']();}class k extends _0x28f178{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x36b8a9,_0x25c044,_0x40afba=''){super(_0x36b8a9),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 os(),this['errorView']=new rt(_0x36b8a9),this['contentArea']=new X(_0x36b8a9,_0x40afba),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 _0x4fd737(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0x4f1ac4({'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 _0x6ab3d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x25c044],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x6ab3d['if']('isError','ck-hidden',_0x40f74e=>!_0x40f74e)]},'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'](_0x1beacc=0x1){-0x1===_0x1beacc?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 _0x4ab17c=this['locale'],_0x27a3ff=new ht(_0x4ab17c,{'queryView':{'label':i(_0x4ab17c,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x48c189,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x4ab17c,'Empty\x20history'),'secondary':i(_0x4ab17c,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x27a3ff['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x455600,_0x1cf2b3)=>_0x455600&&!_0x1cf2b3),this['listenTo'](_0x27a3ff,'submit',(_0xf3afa8,_0x29c544)=>{this['prompt']=_0x29c544;const _0x13303f=_0x526267(_0x29c544);this['fire']('submitPrompt',_0x13303f),_0x29c544['trim']()&&this['_promptHistory']['add']({'prompt':_0x13303f},0x0);},{'priority':'high'}),_0x27a3ff;}['_createHistoryView'](){const _0x56ba9c=new rs(this['locale']);return _0x56ba9c['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x56ba9c['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x56ba9c;}['_createToolbar'](){const _0x17df6a=new at(this['locale']);return _0x17df6a['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x201a23,_0x25f48b,_0x24a1c6)=>_0x201a23&&!_0x25f48b&&!!_0x24a1c6),_0x17df6a['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x17df6a['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2f48f4,_0x572d65,_0x41f83b)=>_0x2f48f4&&!_0x572d65&&!!_0x41f83b),_0x17df6a['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x17df6a['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x24d01f,_0x12494b)=>_0x24d01f&&!_0x12494b),_0x17df6a['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x17df6a['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x17df6a['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x17df6a;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x3e1130=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x3e1130,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x1cff74){const _0xe2df32=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x1cff74||i(_0xe2df32,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var T='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const w=globalThis['DataTransfer'];class n extends _0x2e4afc{['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[_0x12d81b,a,K,_0x2acdaa];}constructor(_0x2d6cf1){super(_0x2d6cf1),_0x2d6cf1['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x2d6cf1['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x2d6cf1['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x2d6cf1['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x339677}=this;this['_aiAdapter']=_0x339677['plugins']['get'](K),this['_dialog']=_0x339677['plugins']['get'](_0x2acdaa),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x5059ba=new E(_0x339677,Array['from'](this['_commandDefinitions']['values']()));_0x339677['commands']['add']('showAIAssistant',_0x5059ba),_0x339677['ui']['componentFactory']['add']('aiCommands',_0x65f0fa=>{const _0x45948b=_0x3bf19e(_0x65f0fa);return _0x45948b['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x45948b['buttonView']['set']({'label':i(_0x65f0fa,'AI\x20Commands'),'icon':T,'tooltip':!0x0}),_0x45948b['on']('execute',_0xf17504=>this['_onExecute'](_0xf17504['source']['id'])),_0x4a7f63(_0x45948b,_0x339677['ui']['view']['body'],function(_0x457a3a){const _0x42a219=o(_0x457a3a['config']['get']('ai.aiAssistant.commands'),_0x457a3a['locale']),_0xf5fde5=U(_0x457a3a,_0x42a219)['filter'](_0x30b809=>_0x30b809['commands']['length']);if(0x1===_0xf5fde5['length'])return U(_0x457a3a,_0xf5fde5[0x0]['commands'])['map'](_0x1824bf=>({'id':_0x1824bf['id'],'label':_0x1824bf['label']}));return _0xf5fde5['map'](_0x58022f=>{const {groupId:_0x28b35b,groupLabel:_0x55812f,commands:_0x522a7c}=_0x58022f,_0x38671c=U(_0x457a3a,_0x522a7c)['map'](_0x4d4741=>({'id':_0x4d4741['id'],'label':_0x4d4741['label']}));return{'id':_0x28b35b,'menu':_0x55812f||_0x28b35b,'children':_0x38671c};});}(_0x339677),{'ariaLabel':i(_0x65f0fa,'AI\x20Commands')}),_0x45948b['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x5059ba['on']('change:enabledCommandsIds',_0x1b9ccb),_0x45948b['menuView']['once']('render',_0x1b9ccb),_0x45948b;function _0x1b9ccb(){_0x45948b['isEnabled']=_0x5059ba['enabledCommandsIds']['length']>0x0;for(const _0x284a12 of _0x45948b['menuView']['buttons'])_0x284a12['isEnabled']=_0x5059ba['enabledCommandsIds']['includes'](_0x284a12['id']);}}),_0x339677['ui']['componentFactory']['add']('menuBar:aiCommands',_0x550e81=>{const _0x494bd2=new _0x1b3425(_0x550e81);_0x494bd2['buttonView']['set']({'label':i(_0x550e81,'AI\x20Commands'),'icon':T}),_0x494bd2['bind']('isEnabled')['to'](_0x5059ba,'enabledCommandsIds',_0x53a176=>_0x53a176['length']>0x0);const _0x1c5d59=o(_0x339677['config']['get']('ai.aiAssistant.commands'),_0x550e81);return this['_populateMenuBarMenu'](_0x5059ba,_0x494bd2,_0x1c5d59,_0x593e48=>this['_onExecute'](_0x593e48)),_0x494bd2;}),_0x339677['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x4e7827=this['_createAIAssistantUIButton'](_0x15da99);return _0x4e7827['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x4e7827;}),_0x339677['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x1620ac=this['_createAIAssistantUIButton'](_0x1e588d);return _0x1620ac['set']({'role':'menuitemcheckbox'}),_0x1620ac;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x21ce9f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x47490c;for(const _0x591d94 in _0x21ce9f){const _0x418bb8=_0x591d94,_0x4a9b7e=_0x21ce9f[_0x418bb8];if('aiLicenseKeyValid'==_0x4a9b7e||'aiLicenseKeyInvalid'==_0x4a9b7e||'aiLicenseKeyExpired'==_0x4a9b7e||'aiLicenseKeyDomainLimit'==_0x4a9b7e||'aiLicenseKeyNotAllowed'==_0x4a9b7e||'aiLicenseKeyEvaluationLimit'==_0x4a9b7e||'aiLicenseKeyTrialLimit'==_0x4a9b7e||'aiLicenseKeyUsageLimit'==_0x4a9b7e){delete _0x21ce9f[_0x418bb8],_0x47490c=_0x4a9b7e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x47490c&&_0x21ce9f['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x47490c&&_0x21ce9f['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x47490c&&_0x21ce9f['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x47490c&&_0x21ce9f['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x47490c&&_0x21ce9f['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x47490c&&_0x21ce9f['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x47490c&&_0x21ce9f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x2532fe='',_0x22c37d='',_0x509f8c='custom'){const _0x27ddb4=this['editor'],_0x1270c5=_0x27ddb4['editing']['view'],_0x4866b6=_0x27ddb4['plugins']['get'](a),_0x29ce27=_0x27ddb4['plugins']['get'](_0x12d81b);_0x4866b6['showFakeVisualSelection']();const _0x4a62c1=new w(),_0x39a37d=new ClipboardEvent('copy',{'clipboardData':_0x4a62c1}),_0x58af78=new _0x14201b(_0x4a62c1),_0x38ad52=new _0x172bd5(_0x1270c5,_0x39a37d,{'dataTransfer':_0x58af78});_0x29ce27['_forceMarkersCopy']('comment',()=>{_0x1270c5['document']['fire']('copy',_0x38ad52);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x27ddb4,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x1a8eff=_0x58af78['getData']('text/html');const _0x5a1713=_0x27ddb4['model']['document']['selection'],_0x1ac769=Array['from'](_0x5a1713['getRanges']());0x1===_0x1ac769['length']&&_0x1ac769[0x0]['isFlat']&&!_0x5a1713['getSelectedElement']()&&''!==_0x1a8eff['replace'](/&nbsp;/g,'')['trim']()&&(_0x1a8eff='<p>'+_0x1a8eff+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x509f8c,'query':_0x2532fe,'htmlContent':_0x1a8eff,'label':_0x22c37d,'mainActionLabel':M[_0x27ddb4['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':ct['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x572269['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x4866b6['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x38204b=new Map(),_0xeb515b=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x2b7529 of _0xeb515b)for(const _0x51ffa5 of _0x2b7529['commands'])_0x38204b['set'](_0x51ffa5['id'],{..._0x51ffa5,'groupId':_0x2b7529['groupId'],'groupLabel':_0x2b7529['groupLabel']||_0x2b7529['groupId']});return _0x38204b;}['_createAIAssistantUIButton'](_0x4b65f6){const _0x2d2f68=this['editor'],_0xc86d51=_0x2d2f68['commands']['get']('showAIAssistant'),_0x2f8fb8=new _0x4b65f6(_0x2d2f68['locale']);return _0x2f8fb8['set']({'label':i(_0x2d2f68['locale'],'AI\x20Assistant'),'icon':ct['robotPencil'],'isToggleable':!0x0}),_0x2f8fb8['bind']('isEnabled')['to'](_0xc86d51),_0x2f8fb8['bind']('isOn')['to'](this['_dialog'],'id',_0x65728a=>'aiAssistant'===_0x65728a),this['listenTo'](_0x2f8fb8,'execute',()=>{_0x2f8fb8['isOn']?this['hideUI']():_0xc86d51['execute']();}),_0x2f8fb8;}['_initView'](){const _0x2c90e5=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',()=>{_0x2c90e5['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x2c90e5['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x372931,ui:{ariaLiveAnnouncer:_0x29eb39}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x55175d,_0x258613,_0x469e2a)=>{const _0x400a82=this['_aiAssistantController']['currentContext'];_0x469e2a?_0x29eb39['announce'](i(_0x372931,'AI\x20is\x20writing')):_0x400a82&&_0x29eb39['announce'](i(_0x372931,'Generated\x20content:\x20%0',_0x400a82),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x4fd7b5,_0x489dd7,_0x4c65e2)=>{if(_0x4c65e2){const _0x160396=this['_formView']['errorView']['text'];_0x29eb39['announce'](i(_0x372931,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x160396));}});}['_onExecute'](_0x5d8792){const _0x293ec9=this['_commandDefinitions']['get'](_0x5d8792),_0x2c17e3=this['editor'],_0x59d4dd=_0x2c17e3['model']['document']['selection'],_0x25ba5a=_0x2c17e3['commands']['get']('showAIAssistant'),_0x396fa2=_0x2c17e3['plugins']['get'](a),_0xbe9c42=''+(_0x293ec9['groupId']!==x?_0x293ec9['groupLabel']+':\x20':'')+_0x293ec9['label'];if(!0x1!==_0x293ec9['requiresContent']&&_0x59d4dd['isCollapsed']){const _0x54aefd=_0x17d0e4(_0x59d4dd['getSelectedBlocks']())||_0x2c17e3['model']['schema']['getLimitElement'](_0x59d4dd);_0x2c17e3['model']['change'](_0x41c76b=>{_0x41c76b['setSelection'](_0x54aefd,'in');});}_0x396fa2['showFakeVisualSelection'](),_0x25ba5a['execute'](_0x293ec9['prompt'],_0xbe9c42,'command:'+_0x5d8792);}['_populateMenuBarMenu'](_0x2f8ec6,_0x401623,_0x1a3aaf,_0x1b6e55){const _0x1062d3=this['editor'],_0x47efb4=_0x1062d3['locale'],_0x210989=new _0x30c762(_0x47efb4),_0x31c73a=U(_0x1062d3,_0x1a3aaf)['filter'](_0x1c7e61=>_0x1c7e61['commands']['length']);0x1===_0x31c73a['length']?this['_getMenuBarGroupButtons']({'command':_0x2f8ec6,'commands':_0x31c73a[0x0]['commands'],'parentMenuView':_0x401623,'onExecute':_0x1b6e55})['forEach'](_0x500c3b=>_0x210989['items']['add'](_0x500c3b)):_0x31c73a['forEach'](({groupId:_0x4fa35e,groupLabel:_0x456300,commands:_0x250936})=>{const _0x361b83=new _0x4d6c56(_0x47efb4,_0x401623),_0x421972=new _0x1b3425(_0x47efb4),_0x4e587f=new _0x30c762(_0x47efb4),_0x550a62=this['_getMenuBarGroupButtons']({'command':_0x2f8ec6,'commands':_0x250936,'parentMenuView':_0x421972,'onExecute':_0x1b6e55});_0x421972['buttonView']['set']({'label':_0x456300||_0x4fa35e}),_0x421972['delegate']('execute')['to'](_0x401623),_0x4e587f['items']['addMany'](_0x550a62),_0x421972['panelView']['children']['add'](_0x4e587f),_0x361b83['children']['add'](_0x421972),_0x210989['items']['add'](_0x361b83);}),_0x401623['panelView']['children']['add'](_0x210989);}['_getMenuBarGroupButtons']({command:_0x47de52,commands:_0x3195d0,parentMenuView:_0x57dabb,onExecute:_0xc3138}){const _0x2b6034=this['editor'],_0x2eec6e=_0x2b6034['locale'];return U(_0x2b6034,_0x3195d0)['map'](_0x8dcfb2=>{const _0x142b87=new _0x4d6c56(_0x2eec6e,_0x57dabb),_0x579852=new _0x1e588d(_0x2eec6e);return _0x579852['set']({'label':_0x8dcfb2['label']}),_0x579852['delegate']('execute')['to'](_0x57dabb),_0x579852['on']('execute',()=>_0xc3138(_0x8dcfb2['id'])),_0x579852['bind']('isEnabled')['to'](_0x47de52,'enabledCommandsIds',_0x956f1c=>_0x956f1c['includes'](_0x8dcfb2['id'])),_0x142b87['children']['add'](_0x579852),_0x142b87;});}}function B(_0x2ce95d,_0x5075c8){return void 0x0!==_0x2ce95d['order']&&void 0x0===_0x5075c8['order']?0x1:void 0x0===_0x2ce95d['order']&&void 0x0!==_0x5075c8['order']?-0x1:void 0x0!==_0x2ce95d['order']&&void 0x0!==_0x5075c8['order']?_0x2ce95d['order']-_0x5075c8['order']:0x0;}function U(_0x519f05,_0x4177f2){_0x4177f2['sort'](B);const _0x499143={},_0x4217d7=[];for(const _0x1ad87d of _0x4177f2)if(void 0x0!==_0x1ad87d['order']){if(_0x1ad87d['order']in _0x499143)throw new _0x282189('ai-commands-config-order-collision',_0x519f05,{'conflictingDefinitions':[_0x1ad87d,_0x499143[_0x1ad87d['order']]]});_0x499143[_0x1ad87d['order']]=_0x1ad87d,_0x4217d7['splice'](_0x1ad87d['order'],0x0,_0x1ad87d);}else _0x4217d7['push'](_0x1ad87d);return _0x4217d7;}class r extends _0x2e4afc{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ddc63){super(_0x1ddc63);const _0x5250f6=_0x1ddc63['config'],_0x28e4be=_0x1ddc63['locale'];_0x5250f6['define']('ai.aiAssistant.preserveComments',!0x0),_0x5250f6['define']('ai.aiAssistant.commands',function(_0x12cb10){return[{'groupId':'editOrReview','groupLabel':i(_0x12cb10,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x12cb10,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x12cb10,'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(_0x12cb10,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x12cb10,'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(_0x12cb10,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x12cb10,'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(_0x12cb10,'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(_0x12cb10,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x12cb10,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x12cb10,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x12cb10,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x12cb10,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x12cb10,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x12cb10,'Change\x20style'),'commands':[{'id':'business','label':i(_0x12cb10,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x12cb10,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x12cb10,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x12cb10,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x12cb10,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x12cb10,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x12cb10,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x12cb10,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x12cb10,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x12cb10,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x12cb10,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x12cb10,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x12cb10,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x28e4be)),_0x5250f6['define']('ai.aiAssistant.extraCommandGroups',[]),_0x5250f6['define']('ai.aiAssistant.removeCommands',[]);let _0xc3517f=o(_0x5250f6['get']('ai.aiAssistant.commands'),_0x28e4be);const _0x5cb0cd=_0x5250f6['get']('ai.aiAssistant.extraCommandGroups'),_0x112161=_0x5250f6['get']('ai.aiAssistant.removeCommands');_0x5cb0cd['forEach'](_0x3bdb6f=>{const _0x1ef5a7=_0xc3517f['find'](_0x381982=>_0x381982['groupId']===_0x3bdb6f['groupId']);_0x1ef5a7?_0x1ef5a7['commands']=_0x1ef5a7['commands']['concat'](_0x3bdb6f['commands']):_0xc3517f['push'](_0x3bdb6f);}),_0xc3517f=_0xc3517f['filter'](_0x41f547=>!_0x112161['includes'](_0x41f547['groupId'])),_0xc3517f['forEach'](_0x38015e=>{_0x38015e['commands']=_0x38015e['commands']['filter'](_0x161c82=>!_0x112161['includes'](_0x161c82['id']));}),_0x5250f6['set']('ai.aiAssistant.commands',_0xc3517f);}}class P extends _0x2e4afc{['abortController'];static get['requires'](){return[K];}constructor(_0x40bef1){super(_0x40bef1),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](K)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x4951f8){return this['sendRequest'](_0x4951f8)['catch'](_0x235866=>{if(_0x235866 instanceof R)return Promise['reject'](_0x235866);if('AbortError'==_0x235866['name'])return Promise['resolve']();throw console['error'](_0x235866),new _0x282189('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x4dc49a,_0x3bd4dd){const _0x3097ff=this['editor']['locale'],_0x3ead65={'Content-Type':'application/json'};if('object'==typeof _0x4dc49a)Object['assign'](_0x3ead65,_0x4dc49a);else{if(_0x4dc49a)try{const _0x5500fa=await _0x4dc49a(_0x3bd4dd);Object['assign'](_0x3ead65,_0x5500fa);}catch(_0x3b6b47){return Promise['reject'](new R(i(_0x3097ff,'AI_ERROR_GET_HEADERS')));}}return _0x3ead65;}async['_prepareRequestParameters'](_0x208ad3,_0x5e2269){const _0x4499ee=this['editor']['locale'];if('object'==typeof _0x208ad3)return _0x208ad3;try{return await _0x208ad3(_0x5e2269);}catch(_0x1faf3b){return Promise['reject'](new R(i(_0x4499ee,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x1e326a){super(_0x1e326a),_0x1e326a['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x1e326a['config']['get']('ai.openAI.requestParameters')||_0x1e326a['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x1e326a['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x1e326a['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x1e326a['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x5ce276,context:_0x3a31e8,onData:_0x16dffe,actionId:_0x4aecd1}){const _0xab0c4d=this['editor']['locale'],_0x5ca8a0=await this['prepareMessages'](_0x5ce276,_0x3a31e8,_0x4aecd1),_0x166ef0=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x4aecd1),_0xa3edb3=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4aecd1),_0x1afbcc={'messages':_0x5ca8a0,..._0xa3edb3},_0x3eebab={'method':'POST','headers':_0x166ef0,'body':JSON['stringify'](_0x1afbcc),'signal':this['abortController']['signal']},_0x58384f=await fetch(this['_apiUrl'],_0x3eebab);if(_0x58384f['ok'])return _0xa3edb3['stream']?await this['_readStreamableResponse'](_0x58384f,_0x16dffe):await this['_readStaticResponse'](_0x58384f,_0x16dffe),Promise['resolve']();{const _0x1be17a=await _0x58384f['text']();return _0x1be17a['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0xab0c4d,'AI_ERROR_CONTEXT_LENGTH'))):_0x1be17a['includes']('Moderation')?Promise['reject'](new R(i(_0xab0c4d,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x1be17a));}}async['prepareMessages'](_0x2f8389,_0x5426ba,_0xde1b84){let _0x20f571,_0xb5ded3;return _0x5426ba?(_0x20f571='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.',_0xb5ded3='Instruction:\x0a'+_0x2f8389+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5426ba):(_0x20f571='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.',_0xb5ded3=_0x2f8389),[{'role':'system','content':_0x20f571},{'role':'user','content':_0xb5ded3}];}async['_readStreamableResponse'](_0x4da26a,_0x43d1d4){const _0x58ae81=_0x4da26a['body']['getReader'](),_0x5e444e=new TextDecoder();let _0x26a740='',_0x40d8de='',_0x95bc1b='',_0x478b86=!0x1;for(;!_0x478b86;){const {done:_0x21a9a5,value:_0x3c4cbf}=await _0x58ae81['read'](),_0x3f9921=_0x26a740+_0x5e444e['decode'](_0x3c4cbf);let _0x44f406='';_0x478b86=_0x21a9a5;try{_0x44f406=this['_cleanUpData'](_0x3f9921),_0x26a740='';}catch(_0x11c9ec){_0x26a740=_0x3f9921;continue;}_0x40d8de+=_0x44f406,!_0x478b86&&this['_isBufferIncomplete'](_0x40d8de)||_0x40d8de&&(_0x95bc1b+=_0x40d8de,_0x40d8de='',_0x43d1d4(_0x95bc1b));}return Promise['resolve']();}async['_readStaticResponse'](_0x596768,_0x1f9635){return _0x1f9635((await _0x596768['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x3d2ddd){const _0xde6e1c=_0x3d2ddd['split']('<')['length']!==_0x3d2ddd['split']('>')['length'],_0x2cbe56=_0x3d2ddd['length']<0x1e;return _0xde6e1c&&_0x2cbe56;}['_cleanUpData'](_0x18ec92){return _0x18ec92['split'](/\n(?![^{]*\})/g)['map'](_0x3d5fbc=>_0x3d5fbc['replace']('data:\x20',''))['filter'](_0x3045bf=>_0x3045bf&&_0x3045bf['length']>0x0&&'[DONE]'!==_0x3045bf)['map'](_0x114e58=>{const {choices:_0x4a0999}=JSON['parse'](_0x114e58);if(_0x4a0999[0x0]&&_0x4a0999[0x0]['delta']&&_0x4a0999[0x0]['delta']['content'])return _0x4a0999[0x0]['delta']['content'];})['filter'](_0x2ccf95=>_0x2ccf95)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x4103f2){super(_0x4103f2),_0x4103f2['config']['get']('ai.aws.requestParameters')||_0x4103f2['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']=_0x4103f2['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x4103f2['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x4103f2['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x4103f2['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x12be83,context:_0x42ab6b,onData:_0xfd9acd,actionId:_0x4d07df}){const {model:_0x10280d,stream:_0x4c210c,..._0x55653b}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4d07df),_0x490717={'prompt':await this['preparePrompt'](_0x12be83,_0x42ab6b,_0x10280d,_0x4d07df),..._0x55653b};this['_apiUrl']?await this['_processProxyRequest'](_0x490717,_0x10280d,_0x4c210c,_0xfd9acd,_0x4d07df):await this['_processAWSRequest'](_0x490717,_0x10280d,_0x4c210c,_0xfd9acd);}async['preparePrompt'](_0x87f6c8,_0x1e1da7,_0x10f82f,_0x56749e){let _0x202b6d,_0x5ae8a4;return _0x1e1da7?(_0x202b6d='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.',_0x5ae8a4='Instruction:\x0a'+_0x87f6c8+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x1e1da7):(_0x202b6d='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.',_0x5ae8a4=_0x87f6c8),'meta.llama'==this['getModelFamily'](_0x10f82f)?'<<SYS>>\x0a'+_0x202b6d+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x5ae8a4+'\x0a[/INST]':'Human:\x0a'+_0x202b6d+'\x0a'+_0x5ae8a4+'\x0a\x0aAssistant:';}['getModelFamily'](_0xff33bf){if(/^anthropic\.claude/['test'](_0xff33bf))return'anthropic.claude';if(/^ai21\.j2/['test'](_0xff33bf))return'ai21.j2';if(/^cohere\.command/['test'](_0xff33bf))return'cohere.command';if(/^meta\.llama/['test'](_0xff33bf))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0xff33bf));}async['_processProxyRequest'](_0x34e85f,_0x49c2bb,_0x545d8a,_0x510d9f,_0x234ce){const _0xe5ee9c={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x234ce),'body':JSON['stringify']({..._0x34e85f,'model':_0x49c2bb,'stream':_0x545d8a}),'signal':this['abortController']['signal']},_0x385280=await fetch(this['_apiUrl'],_0xe5ee9c);_0x545d8a?await this['_readStreamableResponse'](_0x385280,_0x49c2bb,_0x510d9f):await this['_readStaticResponse'](_0x385280,_0x49c2bb,_0x510d9f);}async['_processAWSRequest'](_0x1fc299,_0x20b63f,_0x306192,_0x4081f3){const _0x4a833a=new _0x1478b7(this['_bedrockClientConfig']),_0x1c8160={'body':JSON['stringify'](_0x1fc299),'contentType':'application/json','accept':'application/json','modelId':_0x20b63f};let _0x360d6f;if(_0x306192){const _0x576b8a=new _0x4b75c7(_0x1c8160);_0x360d6f=await _0x4a833a['send'](_0x576b8a,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x360d6f,_0x20b63f,_0x4081f3);}else{const _0x50bee7=new _0x4d8272(_0x1c8160);_0x360d6f=await _0x4a833a['send'](_0x50bee7,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x360d6f,_0x20b63f,_0x4081f3);}}async['_readAsyncIterableResponse'](_0x4ef507,_0x4f2953,_0x2102f4){const _0x2b4b0b=_0x4ef507['body'],_0x3ca505=new TextDecoder('utf-8');let _0x407d35='';for await(const _0x12cac0 of _0x2b4b0b)if(_0x12cac0['chunk']){const _0x26a682=_0x3ca505['decode'](_0x12cac0['chunk']['bytes']),_0x2c9434=JSON['parse'](_0x26a682);_0x407d35+=this['_getGeneratedText'](_0x2c9434,_0x4f2953),_0x2102f4(_0x407d35);}return Promise['resolve']();}async['_readStreamableResponse'](_0x45e746,_0x41243b,_0x4c99e4){const _0x45ba4a=_0x45e746['body'],_0x18bee1=new TextDecoder('utf-8'),_0x2e99d3=_0x45ba4a['getReader']();let _0x2a4a1d='',_0x16e5e3='',_0x5875b9=!0x1;for(;!_0x5875b9;){const {done:_0x56ed3d,value:_0x47db78}=await _0x2e99d3['read']();if(_0x5875b9=_0x56ed3d,_0x5875b9)break;const _0x56152a=(_0x2a4a1d+_0x18bee1['decode'](_0x47db78))['split']('\x0a')['map'](_0x235b3c=>{try{return _0x2a4a1d='',JSON['parse'](_0x235b3c);}catch(_0x3bc376){return _0x2a4a1d=_0x235b3c,null;}})['filter'](_0x1c92e3=>null!==_0x1c92e3);_0x56152a['length']&&(_0x16e5e3+=_0x56152a['map'](_0xbd488b=>this['_getGeneratedText'](_0xbd488b,_0x41243b))['join'](''),_0x4c99e4(_0x16e5e3));}return Promise['resolve']();}async['_readStaticResponse'](_0x37459f,_0xe14ea6,_0x20c9b3){let _0x356940;return _0x356940=_0x37459f instanceof Response?await _0x37459f['json']():JSON['parse'](Buffer['from'](_0x37459f['body'])['toString']('utf8')),(_0x20c9b3(this['_getGeneratedText'](_0x356940,_0xe14ea6)),Promise['resolve']());}['_getGeneratedText'](_0x502b08,_0x276560){switch(this['getModelFamily'](_0x276560)){case'anthropic.claude':return _0x502b08['completion'];case'ai21.j2':return _0x502b08['completions'][0x0]['data']['text'];case'cohere.command':return _0x502b08['generations'][0x0]['text'];case'meta.llama':return _0x502b08['generation'];}}}export{K as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
@@ -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':_0x15a698=>0x1!=_0x15a698}};
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':_0x2106e6=>0x1!=_0x2106e6}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x555e52=>{const {af:{dictionary:_0x393eea,getPluralForm:_0x2651d0}}={'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':_0x19a526=>0x1!=_0x19a526}};_0x555e52['af']||={'dictionary':{},'getPluralForm':null},_0x555e52['af']['dictionary']=Object['assign'](_0x555e52['af']['dictionary'],_0x393eea),_0x555e52['af']['getPluralForm']=_0x2651d0;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x4e14ee=>{const {af:{dictionary:_0x23db11,getPluralForm:_0x26671a}}={'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':_0x50fa82=>0x1!=_0x50fa82}};_0x4e14ee['af']||={'dictionary':{},'getPluralForm':null},_0x4e14ee['af']['dictionary']=Object['assign'](_0x4e14ee['af']['dictionary'],_0x23db11),_0x4e14ee['af']['getPluralForm']=_0x26671a;})(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':_0x3df35b=>0x0==_0x3df35b?0x0:0x1==_0x3df35b?0x1:0x2==_0x3df35b?0x2:_0x3df35b%0x64>=0x3&&_0x3df35b%0x64<=0xa?0x3:_0x3df35b%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':_0x1298c3=>0x0==_0x1298c3?0x0:0x1==_0x1298c3?0x1:0x2==_0x1298c3?0x2:_0x1298c3%0x64>=0x3&&_0x1298c3%0x64<=0xa?0x3:_0x1298c3%0x64>=0xb?0x4:0x5}};