@ckeditor/ckeditor5-ai 46.1.1-alpha.0 → 46.1.1-alpha.2

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 (170) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +9 -9
  150. package/src/adapters/aiadapter.js +1 -1
  151. package/src/adapters/aitextadapter.js +1 -1
  152. package/src/adapters/awstextadapter.js +1 -1
  153. package/src/adapters/openaitextadapter.js +1 -1
  154. package/src/aiassistant.js +1 -1
  155. package/src/aiassistantediting.js +1 -1
  156. package/src/aiassistantui.js +1 -1
  157. package/src/index.js +1 -1
  158. package/src/legacyerrors.js +1 -1
  159. package/src/ui/aiassistantcontroller.js +2 -2
  160. package/src/ui/form/aiformcontentarea.js +1 -1
  161. package/src/ui/form/aiformerrorview.js +1 -1
  162. package/src/ui/form/aiformpromptview.js +1 -1
  163. package/src/ui/form/aiformtoolbarview.js +1 -1
  164. package/src/ui/form/aiformview.js +1 -1
  165. package/src/ui/form/aihistorylistitemview.js +1 -1
  166. package/src/ui/form/aihistorylistview.js +1 -1
  167. package/src/ui/form/prompthistory.js +1 -1
  168. package/src/ui/showaiassistantcommand.js +1 -1
  169. package/src/utils/common-translations.js +1 -1
  170. 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 _0x23910c,Command as _0xfff8ab}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x54f204,IconCheck as _0x11efa6,IconError as _0x56f0c7,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x5550f7,IconRobotPencil as _0x929c82}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x1d5f72,CKEditorError as _0x491ab1,ObservableMixin as _0xd60eb6,global as _0x30775d,isVisible as _0x1550ad,Rect as _0x1c9831,Collection as _0x4abb5f,FocusTracker as et,KeystrokeHandler as rt,first as _0x454644}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x3968d5,View as _0x4ad8d6,SpinnerView as _0x1856cc,IconView as _0x291972,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x4fca6a,createDropdown as _0x2ed582,addMenuToDropdown as _0x1897d5,MenuBarMenuView as _0x49d622,MenuBarMenuListItemButtonView as _0x477fde,DialogViewPosition as _0x5488cd,MenuBarMenuListView as _0x38874c,MenuBarMenuListItemView as _0x4608cb}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x4466c0,ClipboardMarkersUtils as _0x58befc}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x647ceb,ViewDataTransfer as _0x3fdc22,ViewUpcastWriter as _0xc8b02,Matcher as _0x36d9ea}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x55fcc8,InvokeModelWithResponseStreamCommand as _0x5ac24b,InvokeModelCommand as _0x4b1dea}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x66a185,_0x1ecf25){const _0x391967=(0x0,_0x1ecf25['t'])('Other');return _0x66a185['length']?'groupId'in _0x66a185[0x0]?_0x66a185:[{'groupId':K,'groupLabel':_0x391967,'order':0x1/0x0,'commands':_0x66a185}]:[{'groupId':K,'groupLabel':_0x391967,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x23910c{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2c7517}=this,_0x441aed=['ck-fake-ai-selection'];_0x2c7517['config']['get']('ai.useTheme')&&_0x441aed['push']('ck-ai-assistant-ui_theme'),_0x2c7517['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x441aed,'priority':0xc}}),_0x2c7517['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x35d178,{writer:_0x1ad72b})=>{if(!_0x35d178['markerRange']['isCollapsed'])return null;const _0x59855c=_0x1ad72b['createUIElement']('span');return _0x1ad72b['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x59855c),_0x59855c;}});}['afterInit'](){!async function(_0x19e33a){const _0x259e97=_0xb8d462([0x6e,0x41,0x37,0x79,0x75,0x72,0x67,0x4f,0x48,0x62,0x5a,0x76,0x44,0x70,0x6c,0x52,0x6b,0x4a,0x73,0x63,0x64,0x49,0x43,0x6d,0x38,0x36,0x6f,0x50,0x57,0x78,0x39,0x32,0x66,0x31,0x71,0x46,0x30,0x4c,0x61,0x53,0x58,0x33,0x4e,0x47,0x77,0x54,0x4d,0x4b,0x34,0x6a,0x56,0x74,0x59,0x55,0x42,0x51,0x69,0x35,0x7a,0x68,0x65,0x45]),_0xf7ea37=0x3dffc4e1,_0x315fd8=0x3df8b7c9^_0xf7ea37,_0x338f97=window[_0xb8d462([0x44,0x61,0x74,0x65])][_0xb8d462([0x6e,0x6f,0x77])](),_0x4dee1a=_0x19e33a[_0xb8d462([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x11c429=new window[(_0xb8d462([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2bf7f7=>{_0x4dee1a[_0xb8d462([0x6f,0x6e,0x63,0x65])](_0xb8d462([0x72,0x65,0x61,0x64,0x79]),_0x2bf7f7);}),_0x12f299={[_0xb8d462([0x6b,0x74,0x79])]:_0xb8d462([0x45,0x43]),[_0xb8d462([0x75,0x73,0x65])]:_0xb8d462([0x73,0x69,0x67]),[_0xb8d462([0x63,0x72,0x76])]:_0xb8d462([0x50,0x2d,0x32,0x35,0x36]),[_0xb8d462([0x78])]:_0xb8d462([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]),[_0xb8d462([0x79])]:_0xb8d462([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]),[_0xb8d462([0x61,0x6c,0x67])]:_0xb8d462([0x45,0x53,0x32,0x35,0x36])},_0x17a6cc=_0x4dee1a[_0xb8d462([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xb8d462([0x67,0x65,0x74])](_0xb8d462([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x530f88(){let _0x34e314,_0x4230f5=null,_0x353d2e=null;try{if(_0x17a6cc==_0xb8d462([0x47,0x50,0x4c]))return _0xb8d462([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x34e314=_0x338604(),!_0x34e314)return _0xb8d462([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x34e314[_0xb8d462([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x353d2e=_0xf992e7(_0x34e314[_0xb8d462([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x34e314[_0xb8d462([0x6a,0x74,0x69])])),await _0x1ab635()?_0x566492()?_0x6716c5()?_0xb8d462([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x309bc8()?(_0x34e314[_0xb8d462([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xb8d462([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4230f5=_0x10798d(_0xb8d462([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x34e314[_0xb8d462([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xb8d462([0x74,0x72,0x69,0x61,0x6c])&&(_0x4230f5=_0x10798d(_0xb8d462([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5f2f50()):_0xb8d462([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xb8d462([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xb8d462([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xb8d462([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x6716c5(){const _0x2cb7b7=[_0xb8d462([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xb8d462([0x74,0x72,0x69,0x61,0x6c])][_0xb8d462([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34e314[_0xb8d462([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x338f97/0x3e8:0xe10*_0x315fd8;return _0x34e314[_0xb8d462([0x65,0x78,0x70])]<_0x2cb7b7;}function _0x566492(){const _0x51433f=_0x34e314[_0xb8d462([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x51433f&&(!!_0x51433f[_0xb8d462([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb8d462([0x2a]))||!!_0x51433f[_0xb8d462([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb8d462([0x41,0x49])));}function _0x309bc8(){const _0x576c7b=_0x34e314[_0xb8d462([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x576c7b||0x0==_0x576c7b[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a9194}=new URL(window[_0xb8d462([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x576c7b[_0xb8d462([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a9194))return!0x0;const _0x400f77=_0x1a9194[_0xb8d462([0x73,0x70,0x6c,0x69,0x74])](_0xb8d462([0x2e]));return _0x576c7b[_0xb8d462([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e3e09=>_0x1e3e09[_0xb8d462([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb8d462([0x2a])))[_0xb8d462([0x6d,0x61,0x70])](_0x4aa6b4=>_0x4aa6b4[_0xb8d462([0x73,0x70,0x6c,0x69,0x74])](_0xb8d462([0x2e])))[_0xb8d462([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2df48a=>_0x2df48a[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x400f77[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xb8d462([0x6d,0x61,0x70])](_0x5a8092=>Array(_0x400f77[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5a8092[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xb8d462([0x66,0x69,0x6c,0x6c])](_0x5a8092[0x0]===_0xb8d462([0x2a])?_0xb8d462([0x2a]):'')[_0xb8d462([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5a8092))[_0xb8d462([0x73,0x6f,0x6d,0x65])](_0x21aee7=>_0x400f77[_0xb8d462([0x65,0x76,0x65,0x72,0x79])]((_0x4bd039,_0x1c2226)=>_0x21aee7[_0x1c2226]===_0x4bd039||_0x21aee7[_0x1c2226]===_0xb8d462([0x2a])));}function _0x5f2f50(){return _0x4230f5&&_0x353d2e?new window[(_0xb8d462([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1a1b43,_0xe8f7d)=>{_0x4230f5[_0xb8d462([0x74,0x68,0x65,0x6e])](_0x1a1b43,_0xe8f7d),_0x353d2e[_0xb8d462([0x74,0x68,0x65,0x6e])](_0x3c09f7=>{_0x3c09f7!=_0xb8d462([0x56,0x61,0x6c,0x69,0x64])&&_0x1a1b43(_0x3c09f7);},_0xe8f7d);}):_0x4230f5||_0x353d2e||_0xb8d462([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf992e7(_0x32e9a4,_0x4a987c){return new window[(_0xb8d462([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x546b08=>{if(_0x36e4ba())return _0x546b08(_0xb8d462([0x56,0x61,0x6c,0x69,0x64]));_0x39a443(),_0x4dee1a[_0xb8d462([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xb8d462([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5615f5=!0x1;const _0x3636a0=_0x1d5f72();function _0x4af9c7(_0x5ea213){return!!_0x5ea213&&(typeof _0x5ea213===_0xb8d462([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5ea213===_0xb8d462([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5ea213[_0xb8d462([0x74,0x68,0x65,0x6e])]===_0xb8d462([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5ea213[_0xb8d462([0x63,0x61,0x74,0x63,0x68])]===_0xb8d462([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xbad2dc(_0x368cb3){_0x4a792c(_0x368cb3)[_0xb8d462([0x74,0x68,0x65,0x6e])](_0x5be578=>{if(!_0x5be578||_0x5be578[_0xb8d462([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xb8d462([0x6f,0x6b]))return _0xb8d462([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x90dce0(_0x588bdf(_0x3636a0+_0x4a987c))!=_0x5be578[_0xb8d462([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xb8d462([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xb8d462([0x56,0x61,0x6c,0x69,0x64]);})[_0xb8d462([0x74,0x68,0x65,0x6e])](_0x1eb785=>(_0x4f80d9(),_0x1eb785),()=>{const _0x57c0b1=_0x185b2f();return null==_0x57c0b1?(_0x4f80d9(),_0xb8d462([0x56,0x61,0x6c,0x69,0x64])):_0xb8d462(_0x338f97-_0x57c0b1>(0x19f340e1^_0xf7ea37)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xb8d462([0x74,0x68,0x65,0x6e])](_0x546b08)[_0xb8d462([0x63,0x61,0x74,0x63,0x68])](()=>{_0x546b08(_0xb8d462([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4812b7=0x3dc92a61^_0xf7ea37;function _0x4f80d9(){const _0x2b79b4=_0xb8d462([0x6c,0x6c,0x63,0x74,0x2d])+_0x90dce0(_0x588bdf(_0x32e9a4)),_0x4c4150=_0x52062e(_0x90dce0(window[_0xb8d462([0x4d,0x61,0x74,0x68])][_0xb8d462([0x63,0x65,0x69,0x6c])](_0x338f97/_0x4812b7)));window[_0xb8d462([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xb8d462([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b79b4,_0x4c4150);}function _0x185b2f(){const _0x44401c=_0xb8d462([0x6c,0x6c,0x63,0x74,0x2d])+_0x90dce0(_0x588bdf(_0x32e9a4)),_0x49bc83=window[_0xb8d462([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xb8d462([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x44401c);return _0x49bc83?window[_0xb8d462([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52062e(_0x49bc83),0x10)*_0x4812b7:null;}function _0x4a792c(_0x37c677){return new window[(_0xb8d462([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5cad96,_0x36c228)=>{_0x37c677[_0xb8d462([0x74,0x68,0x65,0x6e])](_0x5cad96,_0x36c228),window[_0xb8d462([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x36c228,0x3dfe1021^_0xf7ea37);});}}_0x4dee1a[_0xb8d462([0x6f,0x6e])](_0xb8d462([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x167b1b,_0x275c7e)=>{if(_0x275c7e[0x0]!=_0x32e9a4)return _0x546b08(_0xb8d462([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x275c7e[0x1]={..._0x275c7e[0x1],[_0xb8d462([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3636a0};},{[_0xb8d462([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xb8d462([0x68,0x69,0x67,0x68])}),_0x4dee1a[_0xb8d462([0x6f,0x6e])](_0xb8d462([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x27760b=>{_0x4af9c7(_0x27760b[_0xb8d462([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5615f5=!0x0,_0xbad2dc(_0x27760b[_0xb8d462([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xb8d462([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xb8d462([0x6c,0x6f,0x77])}),_0x11c429[_0xb8d462([0x74,0x68,0x65,0x6e])](()=>{_0x5615f5||_0x546b08(_0xb8d462([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x36e4ba(){return _0x4dee1a[_0xb8d462([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xb8d462([0x76,0x69,0x65,0x77])][_0xb8d462([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xb8d462([0x61,0x75,0x74,0x6f]);}function _0x39a443(){_0x4dee1a[_0xb8d462([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xb8d462([0x76,0x69,0x65,0x77])][_0xb8d462([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xb8d462([0x61,0x75,0x74,0x6f]);}}function _0x10798d(_0xd763f1){const _0x9fec01=[new window[(_0xb8d462([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a2487=>setTimeout(_0x3a2487,0x3df6fa2d^_0xf7ea37)),_0x11c429[_0xb8d462([0x74,0x68,0x65,0x6e])](()=>new window[(_0xb8d462([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19eb03=>{let _0x463425=0x0;_0x4dee1a[_0xb8d462([0x6d,0x6f,0x64,0x65,0x6c])][_0xb8d462([0x6f,0x6e])](_0xb8d462([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xc28358,_0x48ac8a)=>{_0x48ac8a[0x0][_0xb8d462([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x463425++,_0x463425==(0x3dffc519^_0xf7ea37)&&(_0x19eb03(),_0xc28358[_0xb8d462([0x6f,0x66,0x66])]());});}))];return window[_0xb8d462([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xb8d462([0x72,0x61,0x63,0x65])](_0x9fec01)[_0xb8d462([0x74,0x68,0x65,0x6e])](()=>_0xd763f1);}async function _0x5d0a2c(){await _0x11c429,_0x4dee1a[_0xb8d462([0x6d,0x6f,0x64,0x65,0x6c])][_0xb8d462([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3201d0,_0x4dee1a[_0xb8d462([0x6d,0x6f,0x64,0x65,0x6c])][_0xb8d462([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3201d0,_0x4dee1a[_0xb8d462([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xb8d462([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xce42cb(_0x3f7c05){const _0x929483=_0x456778();_0x4dee1a[_0x929483]=_0xb8d462([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3f7c05,_0x3f7c05!=_0xb8d462([0x56,0x61,0x6c,0x69,0x64])&&_0x5d0a2c();}function _0x456778(){const _0x431a29=window[_0xb8d462([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xb8d462([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xb8d462([0x6e,0x6f,0x77])]())[_0xb8d462([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xb8d462([0x2e]),'');let _0x534605=_0xb8d462([0x6e]);for(let _0x1995d1=0x0;_0x1995d1<_0x431a29[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1995d1+=0x2){let _0x473bf1=window[_0xb8d462([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x431a29[_0xb8d462([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1995d1,_0x1995d1+0x2));_0x473bf1>=_0x259e97[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x473bf1-=_0x259e97[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x534605+=_0x259e97[_0x473bf1];}return _0x534605;}function _0x338604(){const _0x44dfc8=_0x17a6cc[_0xb8d462([0x73,0x70,0x6c,0x69,0x74])](_0xb8d462([0x2e]));if(0x3!=_0x44dfc8[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x11fb37(_0x44dfc8[0x1]);function _0x11fb37(_0x1a4268){const _0x54fa2f=_0x22564a(_0x1a4268);return _0x54fa2f&&_0x590809()?_0x54fa2f:null;function _0x590809(){const _0x3b60fd=_0x54fa2f[_0xb8d462([0x6a,0x74,0x69])],_0x120897=window[_0xb8d462([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b60fd[_0xb8d462([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b60fd[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3c0b46={..._0x54fa2f,[_0xb8d462([0x6a,0x74,0x69])]:_0x3b60fd[_0xb8d462([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3b60fd[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3c0b46[_0xb8d462([0x76,0x63])],_0x588bdf(_0x3c0b46)==_0x120897;}}}async function _0x1ab635(){let _0x4cd389=!0x0;try{const _0x2ac33d=_0x17a6cc[_0xb8d462([0x73,0x70,0x6c,0x69,0x74])](_0xb8d462([0x2e])),[_0x51bfa3,_0x1549b5,_0x3d54e5]=_0x2ac33d;return _0x40a7de(_0x51bfa3),await _0x5f2c45(_0x51bfa3,_0x1549b5,_0x3d54e5),_0x4cd389;}catch{return!0x1;}function _0x40a7de(_0x1302eb){const _0x41df90=_0x22564a(_0x1302eb);_0x41df90&&_0x41df90[_0xb8d462([0x61,0x6c,0x67])]==_0xb8d462([0x45,0x53,0x32,0x35,0x36])||(_0x4cd389=!0x1);}async function _0x5f2c45(_0x176264,_0x1c540e,_0x3bff66){const _0x21cafd=window[_0xb8d462([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xb8d462([0x66,0x72,0x6f,0x6d])](_0x3dcff3(_0x3bff66),_0x4d7178=>_0x4d7178[_0xb8d462([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4446f1=new window[(_0xb8d462([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xb8d462([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x176264+_0xb8d462([0x2e])+_0x1c540e),_0x2e2f35=window[_0xb8d462([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xb8d462([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2e2f35)return;const _0x1f88a6=await _0x2e2f35[_0xb8d462([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xb8d462([0x6a,0x77,0x6b]),_0x12f299,{[_0xb8d462([0x6e,0x61,0x6d,0x65])]:_0xb8d462([0x45,0x43,0x44,0x53,0x41]),[_0xb8d462([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xb8d462([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xb8d462([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2e2f35[_0xb8d462([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xb8d462([0x6e,0x61,0x6d,0x65])]:_0xb8d462([0x45,0x43,0x44,0x53,0x41]),[_0xb8d462([0x68,0x61,0x73,0x68])]:{[_0xb8d462([0x6e,0x61,0x6d,0x65])]:_0xb8d462([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1f88a6,_0x21cafd,_0x4446f1)||(_0x4cd389=!0x1);}}function _0x22564a(_0x42fce9){return _0x42fce9[_0xb8d462([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xb8d462([0x65,0x79]))?JSON[_0xb8d462([0x70,0x61,0x72,0x73,0x65])](_0x3dcff3(_0x42fce9)):null;}function _0x3dcff3(_0x19aef0){return window[_0xb8d462([0x61,0x74,0x6f,0x62])](_0x19aef0[_0xb8d462([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xb8d462([0x2b]))[_0xb8d462([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xb8d462([0x2f])));}function _0x588bdf(_0x1fd592){let _0x347592=0x1505;function _0x19d09b(_0x3f0d76){for(let _0x50f6aa=0x0;_0x50f6aa<_0x3f0d76[_0xb8d462([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50f6aa++){const _0xe83250=_0x3f0d76[_0xb8d462([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x50f6aa);_0x347592=(_0x347592<<0x5)+_0x347592+_0xe83250,_0x347592&=_0x347592;}}function _0xc67535(_0x4efd43){Array[_0xb8d462([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4efd43)?_0x4efd43[_0xb8d462([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xc67535):_0x4efd43&&typeof _0x4efd43==_0xb8d462([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xb8d462([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4efd43)[_0xb8d462([0x73,0x6f,0x72,0x74])]()[_0xb8d462([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x416f97,_0x45446b])=>{_0x19d09b(_0x416f97),_0xc67535(_0x45446b);}):_0x19d09b(window[_0xb8d462([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4efd43));}return _0xc67535(_0x1fd592),_0x347592>>>0x0;}function _0x90dce0(_0x4af013){return _0x4af013[_0xb8d462([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xb8d462([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xb8d462([0x30]));}function _0x52062e(_0x3f54ce){return _0x3f54ce[_0xb8d462([0x73,0x70,0x6c,0x69,0x74])]('')[_0xb8d462([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xb8d462([0x6a,0x6f,0x69,0x6e])]('');}function _0x3201d0(){}function _0xb8d462(_0x3a7a16){return _0x3a7a16['map'](_0x2d7c89=>String['fromCharCode'](_0x2d7c89))['join']('');}_0xce42cb(await _0x530f88());}(this);}['showFakeVisualSelection'](){const _0x8b71f5=this['editor']['model'];_0x8b71f5['change'](_0x1996d3=>{const _0x214cf6=_0x8b71f5['document']['selection']['getRanges']();let _0x585310=0x0;for(const _0x29e46f of _0x214cf6){const _0x14298a=w+':'+_0x585310;if(_0x8b71f5['markers']['has'](_0x14298a))_0x1996d3['updateMarker'](_0x14298a,{'range':_0x29e46f});else{if(_0x29e46f['start']['isAtEnd']){const _0x31b928=_0x29e46f['start']['getLastMatchingPosition'](({item:_0x22299d})=>!_0x8b71f5['schema']['isContent'](_0x22299d),{'boundaries':_0x29e46f});_0x1996d3['addMarker'](_0x14298a,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x1996d3['createRange'](_0x31b928,_0x29e46f['end'])});}else _0x1996d3['addMarker'](_0x14298a,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x29e46f});}_0x585310++;}});}['hideFakeVisualSelection'](){const _0x7fff87=this['editor']['model'],_0x129d8d=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x129d8d['length']&&_0x7fff87['change'](_0x1f40b5=>{_0x129d8d['forEach'](_0x1b4ffc=>{_0x1f40b5['removeMarker'](_0x1b4ffc);});});}['insertContent'](_0x7068d0,_0xf01105){const _0x28064e=this['_getAISelection'](),_0x2a87b7=_0xf01105||_0x28064e['getFirstRange']();this['editor']['model']['canEditAt'](_0x2a87b7)&&this['editor']['model']['change'](_0x22abc8=>{this['hideFakeVisualSelection'](),_0xf01105||this['_resetContentOfSelectedTableCells'](_0x22abc8,_0x28064e),this['_pasteHTMLUsingClipboard']({'insertAt':_0x2a87b7,'writer':_0x22abc8,'html':_0x7068d0});});}['insertContentBelow'](_0x2c9e9c){const {model:_0x333aaf}=this['editor'],_0x32c676=this['_getAISelection']();_0x333aaf['change'](()=>{const _0x2daea0=this['_prepareTableInsertBelowPosition'](_0x2c9e9c,_0x32c676)||this['_getDefaultInsertBelowPosition'](_0x32c676);this['insertContent'](_0x2c9e9c,_0x2daea0);});}['_getAISelection'](){const _0x1bcc77=this['editor']['model'],_0x18ad06=Array['from'](_0x1bcc77['markers']['getMarkersGroup'](w))['map'](_0x47caa6=>_0x47caa6['getRange']());return _0x1bcc77['createSelection'](_0x18ad06);}['_pasteHTMLUsingClipboard']({writer:_0x177cb8,html:_0x4a1b88,insertAt:_0x40fff2}){const {view:_0x3f127c}=this['editor']['editing'],_0x48b546=this['editor']['plugins']['get'](_0x4466c0),_0x4b47ca=new gt();_0x4b47ca['setData']('text/html',_0x4a1b88);const _0x50d94f=new ClipboardEvent('paste',{'clipboardData':_0x4b47ca}),_0x2a2a10=new _0x647ceb(_0x3f127c,_0x50d94f,{'dataTransfer':new _0x3fdc22(_0x4b47ca)});_0x177cb8['setSelection'](_0x40fff2);const _0x251601=(_0x1faf8c,_0x5b5bbf)=>{_0x5b5bbf['resultRange']&&_0x177cb8['setSelection'](_0x5b5bbf['resultRange']);};_0x48b546['once']('contentInsertion',_0x251601,{'priority':'lowest'}),_0x3f127c['document']['fire']('paste',_0x2a2a10),_0x48b546['off']('contentInsertion',_0x251601);}['_getDefaultInsertBelowPosition'](_0x5711dd){const {model:_0x51867a}=this['editor'],_0x5418fa=Array['from'](_0x5711dd['getSelectedBlocks']());return _0x5418fa['length']?_0x51867a['createPositionAfter'](_0x5418fa['pop']()):_0x5711dd['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x1e9705,_0x4e28b3){const {model:_0x4f7a5d,plugins:_0x24e1d6}=this['editor'];if(_0x24e1d6['has']('TableUtils')){const _0x2b8c66=_0x24e1d6['get']('TableUtils')['getSelectedTableCells'](_0x4e28b3);if(_0x2b8c66['length']){const _0x479d78=this['_getTableRowCountFromContent'](_0x1e9705),_0x26ec01=this['_createEmptyTableRows'](_0x2b8c66,_0x479d78);return _0x4f7a5d['createPositionAt'](_0x26ec01,0x0);}}return null;}['_getTableRowCountFromContent'](_0x2a044e){const _0x23515c=this['editor']['plugins']['get']('TableUtils'),_0x5ee42b=this['editor']['data']['parse'](_0x2a044e),_0x2c94a2=Array['from'](_0x5ee42b['getChildren']())['filter'](_0x3cb821=>_0x3cb821['is']('element','table'));let _0x558f14=0x0;return _0x2c94a2['forEach'](_0x4e12a8=>{_0x558f14+=_0x23515c['getRows'](_0x4e12a8);}),_0x558f14;}['_createEmptyTableRows'](_0x3234d2,_0x107287){const _0x3ed72a=this['editor']['plugins']['get']('TableUtils'),_0xf1d620=_0x3ed72a['getRowIndexes'](_0x3234d2),_0x54228f=_0x3ed72a['getColumnIndexes'](_0x3234d2),_0x2ebb45=_0xf1d620['last']+0x1,_0x54c8a1=_0x54228f['first'],_0x3c64a5=_0x3234d2[0x0]['findAncestor']('table');for(let _0x13d86b=0x0;_0x13d86b<_0x107287;_0x13d86b++)_0x3ed72a['insertRows'](_0x3c64a5,{'at':_0x2ebb45});return _0x3c64a5['getChild'](_0x2ebb45)['getChild'](_0x54c8a1);}['_resetContentOfSelectedTableCells'](_0x40be9b,_0x410861){const {plugins:_0x2a6dc6}=this['editor'],{model:_0x48dfbb}=_0x40be9b;if(!_0x2a6dc6['has']('TableUtils'))return;_0x2a6dc6['get']('TableUtils')['getSelectedTableCells'](_0x410861)['length']&&_0x48dfbb['deleteContent'](_0x410861);}}class x extends _0x23910c{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x491ab1('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x45e0e8){super(_0x45e0e8),this['name']='AIRequestError';}}function i(_0x30bbc8,_0x892016,_0x3ee9b4){const t=_0x30bbc8['t'];switch(_0x892016){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',_0x3ee9b4);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x3ee9b4);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'},_0x3ee9b4);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 _0x892016;}}class E extends _0xfff8ab{['_commandDefinitions'];constructor(_0x81ee72,_0x2ee954){super(_0x81ee72),this['_commandDefinitions']=_0x2ee954,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x46e4ce,_0x45b86d,_0x5b74c4)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x5b74c4));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x2ff072,_0x37a6a9,_0x2b7f8a)=>{this['enabledCommandsIds']=_0x2b7f8a?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x1af1a0=this['editor']['model'];this['_hasContext']=function(_0x4197d3){const _0x551653=_0x4197d3['document']['selection'];return _0x551653['isCollapsed']?0x0!==[..._0x551653['getSelectedBlocks']()]['length']&&![..._0x551653['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x4197d3['hasContent'](_0x551653['getFirstRange']());}(_0x1af1a0);const _0x377581=_0x1af1a0['document']['selection'],_0x3c53e3=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x4ddb4f of _0x377581['getRanges']())for(const _0x4b5621 of _0x4ddb4f['getItems']())if(_0x4b5621['is']('element')&&_0x3c53e3['includes'](_0x4b5621['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x4e5131='',_0x1d2091='',_0x39b268='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x4e5131,_0x1d2091,_0x39b268);}}function F(_0x4b970d,_0x2b784e){const _0x167b35=new Set();for(const _0x206abd of _0x4b970d['values']())(_0x2b784e||!0x1===_0x206abd['requiresContent'])&&_0x167b35['add'](_0x206abd['id']);return Array['from'](_0x167b35);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
- _0xd60eb6(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x5cfbc2,_0x43fdbd,_0x344609){super(),this['editor']=_0x5cfbc2,this['textAdapter']=_0x43fdbd,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x344609,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x427683,_0x12a0e7,_0x91478b)=>{this['view']['value']=this['_sanitizeHTML'](_0x91478b);}),this['listenTo'](this['view'],'submitPrompt',(_0x1ff194,_0xc32b95)=>{const _0x2cad08=this['currentContext']||this['initialContext'];this['_handleQuery'](_0xc32b95,_0x2cad08,'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:_0x450b5d,query:_0x52f770,htmlContent:_0x3068ef,label:_0x421526,mainActionLabel:_0x57b546}){this['view']['prompt']=_0x421526,this['view']['mainAction']=_0x57b546,this['initialContext']=_0x3068ef,_0x52f770&&(this['view']['isRendered']?this['_handleQuery'](_0x52f770,_0x3068ef,_0x450b5d,_0x421526):this['view']['once']('render',()=>{this['_handleQuery'](_0x52f770,_0x3068ef,_0x450b5d,_0x421526);}));}['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'](_0x552223,_0x55bd70,_0x1f1088,_0x10711e){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x55bd70,this['previousQuery']=_0x552223,this['previousLabel']=_0x10711e||_0x552223,this['previousActionId']=_0x1f1088,new Promise(_0x11511e=>{this['textAdapter']['makeRequest']({'query':_0x552223,'context':_0x55bd70,'onData':_0x4c0aaf=>{this['currentResponse']=_0x4c0aaf,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x1f1088})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x505088=>{_0x505088 instanceof R?this['view']['handleError'](_0x505088['message']):this['view']['handleError'](),_0x11511e();})['finally'](()=>{this['stopProcessing'](),_0x11511e();});});}['_parseAndNormalizeContent'](_0x232d07,_0x305e16=!0x1){const _0x1c84d9=Q['exec'](_0x232d07);_0x232d07=_0x1c84d9?_0x232d07['substring'](_0x1c84d9[0x1]['length']):_0x232d07['length']<0x64&&!_0x305e16?'':this['_stripMarkdownSyntax'](_0x232d07);const _0x59e891=this['_domParser']['parseFromString'](_0x232d07,'text/html');if(_0x1c84d9){const _0x3f87a1=Array['from'](_0x59e891['body']['childNodes']);_0x3f87a1['reverse']();for(const _0x21c577 of _0x3f87a1){if(_0x21c577['nodeType']==Node['ELEMENT_NODE'])break;_0x21c577['remove']();}}const _0x2054af=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x59e891['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x2054af);const _0x128275=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x5f59cd=this['editor']['data']['toModel'](_0x2054af);return _0x128275||_0x5f59cd['markers']['clear'](),this['editor']['data']['stringify'](_0x5f59cd);}['_normalizeResponseHeadings'](_0x218353){const _0x42b580=new _0xc8b02(this['editor']['editing']['view']['document']),_0x5951e9=new _0x36d9ea({'name':/^h[1-5]$/}),_0x44b331=[];let _0x583b5e=!0x1;for(const _0x2429a2 of _0x218353)_0x2429a2['is']('element')&&_0x5951e9['match'](_0x2429a2)&&(_0x44b331['push'](_0x2429a2),'h1'==_0x2429a2['name']&&(_0x583b5e=!0x0));if(_0x583b5e){for(const _0x3097b5 of _0x44b331)_0x42b580['rename']('h'+(parseInt(_0x3097b5['name'][0x1])+0x1),_0x3097b5);}}['_isH1TagSupportEnabled'](){const {data:_0x203002,editing:_0xdf5bf0}=this['editor'],_0x599f34=_0x203002['htmlProcessor']['toView']('<h1></h1>'),_0x9dde89=_0x203002['toView'](_0x203002['toModel'](_0x599f34));return!!_0xdf5bf0['view']['domConverter']['viewToDom'](_0x9dde89)['querySelector']('h1');}['_sanitizeHTML'](_0x10cfb0){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x10cfb0),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x21b04e){const _0x11fe60=_0x21b04e['trim']();return _0x11fe60['startsWith']('```html')?_0x11fe60['endsWith']('```')?_0x11fe60['substring'](0x7,_0x11fe60['length']-0x3):_0x11fe60['substring'](0x7):_0x21b04e;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x515ab3){super(_0x515ab3),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x426b96=>i(_0x515ab3,'AI_'+_0x426b96['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x515ab3,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x515ab3,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x515ab3,'Stop'));const _0x2ef3f8=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x2ef3f8['if']('isVisible','ck-hidden',_0x4e532d=>!_0x4e532d)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0xcaa349,_0x2b18bd){const _0x2e6ecd=new _0x3968d5(this['locale']);return _0x2e6ecd['set']({'label':_0xcaa349,'class':_0x2b18bd||'','isVisible':!0x0,'withText':!0x0}),_0x2e6ecd;}}class ct extends _0x4ad8d6{['contentFieldView'];['copyButtonView'];constructor(_0x5e6d56,_0x138601=''){super(_0x5e6d56),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x28b010=this['bindTemplate'];this['contentFieldView']=new bt(_0x5e6d56,_0x138601),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x28b010['if']('isVisible','ck-hidden',_0xc1983a=>!_0xc1983a)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x28b010['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 _0x36084e=!0x1;this['on']('change:value',(_0x1cb71e,_0x14bc63,_0x23c16a)=>{const _0x2c7ad2=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x23c16a),this['isProcessing']&&_0x2c7ad2&&!_0x36084e&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x2fc57e,_0x31c6b8,_0x13d774)=>{_0x36084e=!0x1,_0x13d774?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x36084e=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x36084e=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x36b9a8=this['locale'],_0x306d57=new _0x3968d5(this['locale']),_0x12d81c='ck-ai-form__copy-button';return _0x306d57['set']({'label':i(_0x36b9a8,'Copy'),'icon':_0x54f204,'class':_0x12d81c,'tooltip':!0x0}),_0x306d57['bind']('isVisible')['to'](this,'value',_0x1079e9=>!!_0x1079e9),_0x306d57['bind']('isEnabled')['to'](this,'isProcessing',_0x51aa8e=>!_0x51aa8e),_0x306d57['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x306d57['icon']=_0x11efa6,_0x306d57['class']=_0x12d81c+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x306d57['icon']=_0x54f204,_0x306d57['class']=_0x12d81c;},0x3e8);}),_0x306d57;}['_copyHTMLToClipboard'](_0x4ff596){const {window:_0x25580a,document:_0x394c77}=_0x30775d;if(_0x25580a['ClipboardItem']){const {Blob:_0x53e98f,ClipboardItem:_0x555938}=_0x25580a,_0xe0d172=[new _0x555938({'text/html':new _0x53e98f([_0x4ff596['innerHTML']],{'type':'text/html'}),'text/plain':new _0x53e98f([_0x4ff596['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0xe0d172);}else{const _0xc66d14=_0x394c77['createElement']('div');_0xc66d14['style']['position']='absolute',_0xc66d14['style']['left']='-9999px',_0xc66d14['innerHTML']='<span>[</span>'+_0x4ff596['innerHTML']+'<span>]</span>',_0x394c77['body']['appendChild'](_0xc66d14);const _0x377706=_0x394c77['createRange']();_0x377706['setStartAfter'](_0xc66d14['firstElementChild']),_0x377706['setEndBefore'](_0xc66d14['lastElementChild']);const _0x1d60ae=_0x25580a['getSelection']();_0x1d60ae['removeAllRanges'](),_0x1d60ae['addRange'](_0x377706),_0x394c77['execCommand']('copy'),_0xc66d14['remove']();}}}class bt extends _0x4ad8d6{constructor(_0x497e5e,_0x414e8d=''){super(_0x497e5e),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x414e8d,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x59b73e){this['element']['innerHTML']=_0x59b73e;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x565de4=new _0x4ad8d6(),_0x551320=this['locale'],_0x258d4b=new _0x1856cc();return _0x258d4b['isVisible']=!0x0,_0x565de4['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x258d4b,{'text':i(_0x551320,'AI\x20is\x20writing...')}]}),_0x565de4['render'](),_0x565de4;}}class mt extends _0x4ad8d6{constructor(_0xada7ed,_0x12a2dd=''){super(_0xada7ed);const _0x5b1241=new _0x291972(),_0x4882dc=this['bindTemplate'];this['set']('text',_0x12a2dd),_0x5b1241['content']=_0x56f0c7,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x5b1241,{'text':_0x4882dc['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x2531c6,_0x2e7f64){super(_0x2531c6,_0x2e7f64),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',(_0x296e84,_0x437390)=>{_0x296e84['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x437390());});}['_createSubmitButton'](){const _0x567722=new _0x3968d5(this['locale']),_0x1661ca=this['locale'];return _0x567722['set']({'icon':it,'label':i(_0x1661ca,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x567722['on']('execute',()=>{this['submit']();}),_0x567722['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0xe98677,_0x35d2c4)=>!_0xe98677&&_0x35d2c4),_0x567722;}['_createShowHistoryButton'](){const _0x3abb8c=new _0x3968d5(this['locale']),_0x1ad540=this['resultsView'],_0x373664=this['locale'];_0x3abb8c['set']({'label':i(_0x373664,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x3abb8c['bind']('isOn')['to'](_0x1ad540,'isVisible'),_0x3abb8c['bind']('isEnabled')['to'](this,'isEnabled'),_0x3abb8c['on']('execute',()=>{_0x1ad540['isVisible']=!_0x1ad540['isVisible'],_0x1ad540['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x324aa1=()=>{_0x30775d['window']['requestAnimationFrame'](()=>{if(_0x1550ad(this['element'])){const _0x46f503=new _0x1c9831(this['queryView']['fieldView']['element']),_0x47bcdd=_0x46f503['width'],_0x4cc3c2='rtl'===_0x373664['uiLanguageDirection']?'left':'right';_0x46f503['excludeScrollbarsAndBorders'](),_0x3abb8c['element']['style'][_0x4cc3c2]=_0x47bcdd-_0x46f503['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x324aa1),this['on']('render',_0x324aa1),_0x3abb8c;}['submit'](){const _0x25ecff=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x25ecff);}['focus'](_0x4618be){-0x1===_0x4618be?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x55507b){super(_0x55507b),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x55507b,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x3ac146=0x0;for(const _0x50cf46 of this['items'])_0x3ac146+=_0x50cf46['items']['length'];return{'resultsCount':_0x3ac146,'totalItemsCount':_0x3ac146};}['_createClearHistoryButton'](){const _0x44a3b8=this['locale'],_0x209a0a=new _0x3968d5(this['locale']);return _0x209a0a['set']({'label':'('+i(_0x44a3b8,'Clear')+')','withText':!0x0}),_0x209a0a['on']('execute',()=>this['fire']('clearHistory')),_0x209a0a;}}class ut extends xt{constructor(_0x3291f2){super();const _0x4ca43c=new wt(),_0x23e9ca=new _0x3968d5(this['locale'],_0x4ca43c);this['children']['add'](_0x23e9ca),_0x23e9ca['set']({'label':_0x3291f2['prompt'],'withText':!0x0}),_0x23e9ca['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x3291f2['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x4abb5f{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x46b533,_0x37ee3e)=>{const _0x14c47e=os(_0x37ee3e['prompt']);for(const _0x5ba8e7 of this)if(_0x5ba8e7!=_0x37ee3e&&os(_0x5ba8e7['prompt'])===_0x14c47e){this['remove'](_0x5ba8e7);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x2a99c5=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x2a99c5));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x283cfe=>_0x283cfe)));}}function os(_0x48625d){return _0x48625d['toLowerCase']()['trim']();}class k extends _0x4ad8d6{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x2b9c32,_0x18bdd0,_0x200eeb=''){super(_0x2b9c32),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x2b9c32),this['contentArea']=new ct(_0x2b9c32,_0x200eeb),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x2d313c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x18bdd0],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x2d313c['if']('isError','ck-hidden',_0x11f2cf=>!_0x11f2cf)]},'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'](_0x10a966=0x1){-0x1===_0x10a966?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 _0x38f5f5=this['locale'],_0x1ebb10=new lt(_0x38f5f5,{'queryView':{'label':i(_0x38f5f5,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x38f5f5,'Empty\x20history'),'secondary':i(_0x38f5f5,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x1ebb10['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x899fc2,_0x6ea5a2)=>_0x899fc2&&!_0x6ea5a2),this['listenTo'](_0x1ebb10,'submit',(_0xb3ece3,_0x29070b)=>{this['prompt']=_0x29070b;const _0xc07d1f=ft(_0x29070b);this['fire']('submitPrompt',_0xc07d1f),_0x29070b['trim']()&&this['_promptHistory']['add']({'prompt':_0xc07d1f},0x0);},{'priority':'high'}),_0x1ebb10;}['_createHistoryView'](){const _0x2866ad=new pt(this['locale']);return _0x2866ad['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x2866ad['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x2866ad;}['_createToolbar'](){const _0x5c734d=new at(this['locale']);return _0x5c734d['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x5a87d8,_0x350ce6,_0x37e4ce)=>_0x5a87d8&&!_0x350ce6&&!!_0x37e4ce),_0x5c734d['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x5c734d['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x19a0b7,_0x5cc2eb,_0x8c5e87)=>_0x19a0b7&&!_0x5cc2eb&&!!_0x8c5e87),_0x5c734d['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x5c734d['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x3a2127,_0x37a4de)=>_0x3a2127&&!_0x37a4de),_0x5c734d['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x5c734d['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x5c734d['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x5c734d;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x372b70=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x372b70,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x38719e){const _0x3ed8ed=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x38719e||i(_0x3ed8ed,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x23910c{['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[_0x58befc,a,x,_0x4fca6a];}constructor(_0x27a6e6){super(_0x27a6e6),_0x27a6e6['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x27a6e6['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x27a6e6['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x27a6e6['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0xf93538}=this;this['_aiAdapter']=_0xf93538['plugins']['get'](x),this['_dialog']=_0xf93538['plugins']['get'](_0x4fca6a),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x3eacb7=new E(_0xf93538,Array['from'](this['_commandDefinitions']['values']()));_0xf93538['commands']['add']('showAIAssistant',_0x3eacb7),_0xf93538['ui']['componentFactory']['add']('aiCommands',_0x485351=>{const _0x1867a9=_0x2ed582(_0x485351);return _0x1867a9['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x1867a9['buttonView']['set']({'label':i(_0x485351,'AI\x20Commands'),'icon':_0x5550f7,'tooltip':!0x0}),_0x1867a9['on']('execute',_0x2a523c=>this['_onExecute'](_0x2a523c['source']['id'])),_0x1897d5(_0x1867a9,_0xf93538['ui']['view']['body'],function(_0x5b2073){const _0x527454=o(_0x5b2073['config']['get']('ai.aiAssistant.commands'),_0x5b2073['locale']),_0x4b57d8=U(_0x5b2073,_0x527454)['filter'](_0x54647e=>_0x54647e['commands']['length']);if(0x1===_0x4b57d8['length'])return U(_0x5b2073,_0x4b57d8[0x0]['commands'])['map'](_0x22ab8a=>({'id':_0x22ab8a['id'],'label':_0x22ab8a['label']}));return _0x4b57d8['map'](_0x2d3d88=>{const {groupId:_0x3d0f99,groupLabel:_0x3ca2af,commands:_0x4dda2f}=_0x2d3d88,_0x478f75=U(_0x5b2073,_0x4dda2f)['map'](_0x34afc9=>({'id':_0x34afc9['id'],'label':_0x34afc9['label']}));return{'id':_0x3d0f99,'menu':_0x3ca2af||_0x3d0f99,'children':_0x478f75};});}(_0xf93538),{'ariaLabel':i(_0x485351,'AI\x20Commands')}),_0x1867a9['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x3eacb7['on']('change:enabledCommandsIds',_0xf3ab07),_0x1867a9['menuView']['once']('render',_0xf3ab07),_0x1867a9;function _0xf3ab07(){_0x1867a9['isEnabled']=_0x3eacb7['enabledCommandsIds']['length']>0x0;for(const _0x178bd6 of _0x1867a9['menuView']['buttons'])_0x178bd6['isEnabled']=_0x3eacb7['enabledCommandsIds']['includes'](_0x178bd6['id']);}}),_0xf93538['ui']['componentFactory']['add']('menuBar:aiCommands',_0x355279=>{const _0x56c529=new _0x49d622(_0x355279);_0x56c529['buttonView']['set']({'label':i(_0x355279,'AI\x20Commands'),'icon':_0x5550f7}),_0x56c529['bind']('isEnabled')['to'](_0x3eacb7,'enabledCommandsIds',_0x27caad=>_0x27caad['length']>0x0);const _0x1671ea=o(_0xf93538['config']['get']('ai.aiAssistant.commands'),_0x355279);return this['_populateMenuBarMenu'](_0x3eacb7,_0x56c529,_0x1671ea,_0x3ce99d=>this['_onExecute'](_0x3ce99d)),_0x56c529;}),_0xf93538['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x30d203=this['_createAIAssistantUIButton'](_0x3968d5);return _0x30d203['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x30d203;}),_0xf93538['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x235286=this['_createAIAssistantUIButton'](_0x477fde);return _0x235286['set']({'role':'menuitemcheckbox'}),_0x235286;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x29e5b2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2c983e;for(const _0xd95143 in _0x29e5b2){const _0xffc129=_0xd95143,_0x355572=_0x29e5b2[_0xffc129];if('aiLicenseKeyValid'==_0x355572||'aiLicenseKeyInvalid'==_0x355572||'aiLicenseKeyExpired'==_0x355572||'aiLicenseKeyDomainLimit'==_0x355572||'aiLicenseKeyNotAllowed'==_0x355572||'aiLicenseKeyEvaluationLimit'==_0x355572||'aiLicenseKeyTrialLimit'==_0x355572||'aiLicenseKeyUsageLimit'==_0x355572){delete _0x29e5b2[_0xffc129],_0x2c983e=_0x355572,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x2c983e&&_0x29e5b2['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x2c983e&&_0x29e5b2['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x2c983e&&_0x29e5b2['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x2c983e&&_0x29e5b2['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x2c983e&&_0x29e5b2['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x2c983e&&_0x29e5b2['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x2c983e&&_0x29e5b2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x9bf0bc='',_0x1fb204='',_0x28d1a1='custom'){const _0x384b82=this['editor'],_0x2a3d08=_0x384b82['editing']['view'],_0x5d68e8=_0x384b82['plugins']['get'](a),_0x17204c=_0x384b82['plugins']['get'](_0x58befc);_0x5d68e8['showFakeVisualSelection']();const _0x5d18a3=new l(),_0x4519cd=new ClipboardEvent('copy',{'clipboardData':_0x5d18a3}),_0xcb1829=new _0x3fdc22(_0x5d18a3),_0x8e3a15=new _0x647ceb(_0x2a3d08,_0x4519cd,{'dataTransfer':_0xcb1829});_0x17204c['_forceMarkersCopy']('comment',()=>{_0x2a3d08['document']['fire']('copy',_0x8e3a15);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x384b82,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x5b81ae=_0xcb1829['getData']('text/html');const _0x43db7c=_0x384b82['model']['document']['selection'],_0x4c7504=Array['from'](_0x43db7c['getRanges']());0x1===_0x4c7504['length']&&_0x4c7504[0x0]['isFlat']&&!_0x43db7c['getSelectedElement']()&&''!==_0x5b81ae['replace'](/&nbsp;/g,'')['trim']()&&(_0x5b81ae='<p>'+_0x5b81ae+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x28d1a1,'query':_0x9bf0bc,'htmlContent':_0x5b81ae,'label':_0x1fb204,'mainActionLabel':_[_0x384b82['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x929c82,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x5488cd['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x5d68e8['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x51edac=new Map(),_0x1e8ad7=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x5c298e of _0x1e8ad7)for(const _0x33cd10 of _0x5c298e['commands'])_0x51edac['set'](_0x33cd10['id'],{..._0x33cd10,'groupId':_0x5c298e['groupId'],'groupLabel':_0x5c298e['groupLabel']||_0x5c298e['groupId']});return _0x51edac;}['_createAIAssistantUIButton'](_0x4a8912){const _0x1ce976=this['editor'],_0x1650b2=_0x1ce976['commands']['get']('showAIAssistant'),_0x50dfaf=new _0x4a8912(_0x1ce976['locale']);return _0x50dfaf['set']({'label':i(_0x1ce976['locale'],'AI\x20Assistant'),'icon':_0x929c82,'isToggleable':!0x0}),_0x50dfaf['bind']('isEnabled')['to'](_0x1650b2),_0x50dfaf['bind']('isOn')['to'](this['_dialog'],'id',_0x4d6bec=>'aiAssistant'===_0x4d6bec),this['listenTo'](_0x50dfaf,'execute',()=>{_0x50dfaf['isOn']?this['hideUI']():_0x1650b2['execute']();}),_0x50dfaf;}['_initView'](){const _0x165b28=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',()=>{_0x165b28['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x165b28['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x386332,ui:{ariaLiveAnnouncer:_0x462374}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x2939a6,_0x2fa501,_0x3a0f71)=>{const _0xbf100e=this['_aiAssistantController']['currentContext'];_0x3a0f71?_0x462374['announce'](i(_0x386332,'AI\x20is\x20writing')):_0xbf100e&&_0x462374['announce'](i(_0x386332,'Generated\x20content:\x20%0',_0xbf100e),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0xc98935,_0x2ea0e1,_0x2967fd)=>{if(_0x2967fd){const _0x5b904d=this['_formView']['errorView']['text'];_0x462374['announce'](i(_0x386332,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x5b904d));}});}['_onExecute'](_0x2c68f5){const _0x482712=this['_commandDefinitions']['get'](_0x2c68f5),_0x512ab9=this['editor'],_0x15f914=_0x512ab9['model']['document']['selection'],_0x47fdaf=_0x512ab9['commands']['get']('showAIAssistant'),_0x432188=_0x512ab9['plugins']['get'](a),_0x55ab01=''+(_0x482712['groupId']!==K?_0x482712['groupLabel']+':\x20':'')+_0x482712['label'];if(!0x1!==_0x482712['requiresContent']&&_0x15f914['isCollapsed']){const _0xb45521=_0x454644(_0x15f914['getSelectedBlocks']())||_0x512ab9['model']['schema']['getLimitElement'](_0x15f914);_0x512ab9['model']['change'](_0x1c0a67=>{_0x1c0a67['setSelection'](_0xb45521,'in');});}_0x432188['showFakeVisualSelection'](),_0x47fdaf['execute'](_0x482712['prompt'],_0x55ab01,'command:'+_0x2c68f5);}['_populateMenuBarMenu'](_0xcf85b2,_0x2d8804,_0x1065a9,_0x562ba7){const _0x4bae3e=this['editor'],_0x24fa9a=_0x4bae3e['locale'],_0x5d8652=new _0x38874c(_0x24fa9a),_0x24b971=U(_0x4bae3e,_0x1065a9)['filter'](_0x2a8ced=>_0x2a8ced['commands']['length']);0x1===_0x24b971['length']?this['_getMenuBarGroupButtons']({'command':_0xcf85b2,'commands':_0x24b971[0x0]['commands'],'parentMenuView':_0x2d8804,'onExecute':_0x562ba7})['forEach'](_0x535b6f=>_0x5d8652['items']['add'](_0x535b6f)):_0x24b971['forEach'](({groupId:_0x1f8550,groupLabel:_0x13cce3,commands:_0x4073cb})=>{const _0x1dedb0=new _0x4608cb(_0x24fa9a,_0x2d8804),_0x9307fa=new _0x49d622(_0x24fa9a),_0x2a0e3b=new _0x38874c(_0x24fa9a),_0x5cac45=this['_getMenuBarGroupButtons']({'command':_0xcf85b2,'commands':_0x4073cb,'parentMenuView':_0x9307fa,'onExecute':_0x562ba7});_0x9307fa['buttonView']['set']({'label':_0x13cce3||_0x1f8550}),_0x9307fa['delegate']('execute')['to'](_0x2d8804),_0x2a0e3b['items']['addMany'](_0x5cac45),_0x9307fa['panelView']['children']['add'](_0x2a0e3b),_0x1dedb0['children']['add'](_0x9307fa),_0x5d8652['items']['add'](_0x1dedb0);}),_0x2d8804['panelView']['children']['add'](_0x5d8652);}['_getMenuBarGroupButtons']({command:_0x3bf8f5,commands:_0x122b68,parentMenuView:_0x43141a,onExecute:_0x14458c}){const _0x1b6a23=this['editor'],_0x1f26a3=_0x1b6a23['locale'];return U(_0x1b6a23,_0x122b68)['map'](_0x2d2f23=>{const _0x595b1a=new _0x4608cb(_0x1f26a3,_0x43141a),_0x3b4770=new _0x477fde(_0x1f26a3);return _0x3b4770['set']({'label':_0x2d2f23['label']}),_0x3b4770['delegate']('execute')['to'](_0x43141a),_0x3b4770['on']('execute',()=>_0x14458c(_0x2d2f23['id'])),_0x3b4770['bind']('isEnabled')['to'](_0x3bf8f5,'enabledCommandsIds',_0x4340ae=>_0x4340ae['includes'](_0x2d2f23['id'])),_0x595b1a['children']['add'](_0x3b4770),_0x595b1a;});}}function T(_0x24a168,_0x24186f){return void 0x0!==_0x24a168['order']&&void 0x0===_0x24186f['order']?0x1:void 0x0===_0x24a168['order']&&void 0x0!==_0x24186f['order']?-0x1:void 0x0!==_0x24a168['order']&&void 0x0!==_0x24186f['order']?_0x24a168['order']-_0x24186f['order']:0x0;}function U(_0x4ae6cc,_0x76d2ad){_0x76d2ad['sort'](T);const _0x526a53={},_0x2aef57=[];for(const _0x458c54 of _0x76d2ad)if(void 0x0!==_0x458c54['order']){if(_0x458c54['order']in _0x526a53)throw new _0x491ab1('ai-commands-config-order-collision',_0x4ae6cc,{'conflictingDefinitions':[_0x458c54,_0x526a53[_0x458c54['order']]]});_0x526a53[_0x458c54['order']]=_0x458c54,_0x2aef57['splice'](_0x458c54['order'],0x0,_0x458c54);}else _0x2aef57['push'](_0x458c54);return _0x2aef57;}class At extends _0x23910c{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e5119){super(_0x5e5119);const _0x253d73=_0x5e5119['config'],_0x24db51=_0x5e5119['locale'];_0x253d73['define']('ai.aiAssistant.preserveComments',!0x0),_0x253d73['define']('ai.aiAssistant.commands',_t(_0x24db51)),_0x253d73['define']('ai.aiAssistant.extraCommandGroups',[]),_0x253d73['define']('ai.aiAssistant.removeCommands',[]);let _0x2b0b63=o(_0x253d73['get']('ai.aiAssistant.commands'),_0x24db51);const _0xa52ad5=_0x253d73['get']('ai.aiAssistant.extraCommandGroups'),_0x3c1330=_0x253d73['get']('ai.aiAssistant.removeCommands');_0xa52ad5['forEach'](_0x35a05b=>{const _0x1aaa71=_0x2b0b63['find'](_0x84fb4a=>_0x84fb4a['groupId']===_0x35a05b['groupId']);_0x1aaa71?_0x1aaa71['commands']=_0x1aaa71['commands']['concat'](_0x35a05b['commands']):_0x2b0b63['push'](_0x35a05b);}),_0x2b0b63=_0x2b0b63['filter'](_0x4e76dd=>!_0x3c1330['includes'](_0x4e76dd['groupId'])),_0x2b0b63['forEach'](_0x2a7178=>{_0x2a7178['commands']=_0x2a7178['commands']['filter'](_0x53591c=>!_0x3c1330['includes'](_0x53591c['id']));}),_0x253d73['set']('ai.aiAssistant.commands',_0x2b0b63);}}function _t(_0x4d3034){return[{'groupId':'editOrReview','groupLabel':i(_0x4d3034,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x4d3034,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x4d3034,'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(_0x4d3034,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x4d3034,'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(_0x4d3034,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x4d3034,'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(_0x4d3034,'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(_0x4d3034,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x4d3034,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x4d3034,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x4d3034,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x4d3034,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x4d3034,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x4d3034,'Change\x20style'),'commands':[{'id':'business','label':i(_0x4d3034,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x4d3034,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x4d3034,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x4d3034,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x4d3034,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x4d3034,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x4d3034,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x4d3034,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x4d3034,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x4d3034,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x4d3034,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x4d3034,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x4d3034,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x23910c{['abortController'];static get['requires'](){return[x];}constructor(_0x32a5ce){super(_0x32a5ce),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x513cdd){return this['sendRequest'](_0x513cdd)['catch'](_0x54c5ab=>{if(_0x54c5ab instanceof R)return Promise['reject'](_0x54c5ab);if('AbortError'==_0x54c5ab['name'])return Promise['resolve']();throw console['error'](_0x54c5ab),new _0x491ab1('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x371369,_0x2f490d){const _0x215c59=this['editor']['locale'],_0x14c201={'Content-Type':'application/json'};if('object'==typeof _0x371369)Object['assign'](_0x14c201,_0x371369);else{if(_0x371369)try{const _0xf5bb92=await _0x371369(_0x2f490d);Object['assign'](_0x14c201,_0xf5bb92);}catch{return Promise['reject'](new R(i(_0x215c59,'AI_ERROR_GET_HEADERS')));}}return _0x14c201;}async['_prepareRequestParameters'](_0x45ad73,_0xa12c30){const _0x1ed18d=this['editor']['locale'];if('object'==typeof _0x45ad73)return _0x45ad73;try{return await _0x45ad73(_0xa12c30);}catch{return Promise['reject'](new R(i(_0x1ed18d,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x4f5ff0){super(_0x4f5ff0),_0x4f5ff0['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x4f5ff0['config']['get']('ai.openAI.requestParameters')||_0x4f5ff0['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x4f5ff0['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x4f5ff0['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x4f5ff0['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x1ba78e,context:_0x59c9db,onData:_0x5daf7a,actionId:_0x25e34c}){const _0x12483e=this['editor']['locale'],_0xa619d8=await this['prepareMessages'](_0x1ba78e,_0x59c9db,_0x25e34c),_0x57c402=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x25e34c),_0x215473=await this['_prepareRequestParameters'](this['_requestParameters'],_0x25e34c),_0x5143f2={'messages':_0xa619d8,..._0x215473},_0x5c2b2d={'method':'POST','headers':_0x57c402,'body':JSON['stringify'](_0x5143f2),'signal':this['abortController']['signal']},_0x373e84=await fetch(this['_apiUrl'],_0x5c2b2d);if(_0x373e84['ok'])return _0x215473['stream']?await this['_readStreamableResponse'](_0x373e84,_0x5daf7a):await this['_readStaticResponse'](_0x373e84,_0x5daf7a),Promise['resolve']();{const _0x3d4174=await _0x373e84['text']();return _0x3d4174['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x12483e,'AI_ERROR_CONTEXT_LENGTH'))):_0x3d4174['includes']('Moderation')?Promise['reject'](new R(i(_0x12483e,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x3d4174));}}async['prepareMessages'](_0xdd482a,_0x388a97,_0x2647b9){let _0x21237c,_0x36a724;return _0x388a97?(_0x21237c='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.',_0x36a724='Instruction:\x0a'+_0xdd482a+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x388a97):(_0x21237c='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.',_0x36a724=_0xdd482a),[{'role':'system','content':_0x21237c},{'role':'user','content':_0x36a724}];}async['_readStreamableResponse'](_0x1cc085,_0x572d3e){const _0xda76cc=_0x1cc085['body']['getReader'](),_0x24a8a7=new TextDecoder();let _0x22eb67='',_0x22b8b6='',_0x33a3bd='',_0x2ecb9c=!0x1;for(;!_0x2ecb9c;){const {done:_0x14552b,value:_0x4134b8}=await _0xda76cc['read'](),_0x22bb61=_0x22eb67+_0x24a8a7['decode'](_0x4134b8);let _0x6299b2='';_0x2ecb9c=_0x14552b;try{_0x6299b2=this['_cleanUpData'](_0x22bb61),_0x22eb67='';}catch{_0x22eb67=_0x22bb61;continue;}_0x22b8b6+=_0x6299b2,!_0x2ecb9c&&this['_isBufferIncomplete'](_0x22b8b6)||_0x22b8b6&&(_0x33a3bd+=_0x22b8b6,_0x22b8b6='',_0x572d3e(_0x33a3bd));}return Promise['resolve']();}async['_readStaticResponse'](_0x26c392,_0x6a4ed2){return _0x6a4ed2((await _0x26c392['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x54577b){const _0x5251fa=_0x54577b['split']('<')['length']!==_0x54577b['split']('>')['length'],_0xee040f=_0x54577b['length']<0x1e;return _0x5251fa&&_0xee040f;}['_cleanUpData'](_0x290a49){return _0x290a49['split'](/\n(?![^{]*\})/g)['map'](_0x3cf72d=>_0x3cf72d['replace']('data:\x20',''))['filter'](_0x1e6499=>_0x1e6499&&_0x1e6499['length']>0x0&&'[DONE]'!==_0x1e6499)['map'](_0x5979c4=>{const {choices:_0x29d404}=JSON['parse'](_0x5979c4);if(_0x29d404[0x0]?.['delta']?.['content'])return _0x29d404[0x0]['delta']['content'];})['filter'](_0x51dbe9=>_0x51dbe9)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x12a555){super(_0x12a555),_0x12a555['config']['get']('ai.aws.requestParameters')||_0x12a555['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']=_0x12a555['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x12a555['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x12a555['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x12a555['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x1ecf99,context:_0x5acf80,onData:_0x2e66de,actionId:_0x230c24}){const {model:_0x143ca6,stream:_0xf0e8ec,..._0x38a33f}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x230c24),_0x20907a={'prompt':await this['preparePrompt'](_0x1ecf99,_0x5acf80,_0x143ca6,_0x230c24),..._0x38a33f};this['_apiUrl']?await this['_processProxyRequest'](_0x20907a,_0x143ca6,_0xf0e8ec,_0x2e66de,_0x230c24):await this['_processAWSRequest'](_0x20907a,_0x143ca6,_0xf0e8ec,_0x2e66de);}async['preparePrompt'](_0xbf444,_0x5ac53b,_0x1e07e6,_0x23acd2){let _0x48ee91,_0x216a04;return _0x5ac53b?(_0x48ee91='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.',_0x216a04='Instruction:\x0a'+_0xbf444+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5ac53b):(_0x48ee91='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.',_0x216a04=_0xbf444),'meta.llama'==this['getModelFamily'](_0x1e07e6)?'<<SYS>>\x0a'+_0x48ee91+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x216a04+'\x0a[/INST]':'Human:\x0a'+_0x48ee91+'\x0a'+_0x216a04+'\x0a\x0aAssistant:';}['getModelFamily'](_0x2320ae){if(/^anthropic\.claude/['test'](_0x2320ae))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x2320ae))return'ai21.j2';if(/^cohere\.command/['test'](_0x2320ae))return'cohere.command';if(/^meta\.llama/['test'](_0x2320ae))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x2320ae));}async['_processProxyRequest'](_0x3baba2,_0x668111,_0x2c578e,_0x5c6c25,_0x4abf36){const _0x419822={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x4abf36),'body':JSON['stringify']({..._0x3baba2,'model':_0x668111,'stream':_0x2c578e}),'signal':this['abortController']['signal']},_0x4660fd=await fetch(this['_apiUrl'],_0x419822);_0x2c578e?await this['_readStreamableResponse'](_0x4660fd,_0x668111,_0x5c6c25):await this['_readStaticResponse'](_0x4660fd,_0x668111,_0x5c6c25);}async['_processAWSRequest'](_0x45c0e2,_0x23655e,_0xed4bc7,_0x5caf60){const _0xcb2ea1=new _0x55fcc8(this['_bedrockClientConfig']),_0x1c0ec8={'body':JSON['stringify'](_0x45c0e2),'contentType':'application/json','accept':'application/json','modelId':_0x23655e};let _0x26644d;if(_0xed4bc7){const _0x4dfdb5=new _0x5ac24b(_0x1c0ec8);_0x26644d=await _0xcb2ea1['send'](_0x4dfdb5,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x26644d,_0x23655e,_0x5caf60);}else{const _0x1a74cd=new _0x4b1dea(_0x1c0ec8);_0x26644d=await _0xcb2ea1['send'](_0x1a74cd,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x26644d,_0x23655e,_0x5caf60);}}async['_readAsyncIterableResponse'](_0x2cd84c,_0x46d909,_0x53b19e){const _0x3b5764=_0x2cd84c['body'],_0x4adeb6=new TextDecoder('utf-8');let _0x35726f='';for await(const _0x281a67 of _0x3b5764)if(_0x281a67['chunk']){const _0x1631eb=_0x4adeb6['decode'](_0x281a67['chunk']['bytes']),_0x53febb=JSON['parse'](_0x1631eb);_0x35726f+=this['_getGeneratedText'](_0x53febb,_0x46d909),_0x53b19e(_0x35726f);}return Promise['resolve']();}async['_readStreamableResponse'](_0x59d79e,_0x223994,_0x2127c2){const _0x2f195d=_0x59d79e['body'],_0x58f032=new TextDecoder('utf-8'),_0x4147dc=_0x2f195d['getReader']();let _0x5488bf='',_0x84ed71='',_0xd9126a=!0x1;for(;!_0xd9126a;){const {done:_0x5d238e,value:_0x31fd71}=await _0x4147dc['read']();if(_0xd9126a=_0x5d238e,_0xd9126a)break;const _0x53b1f8=(_0x5488bf+_0x58f032['decode'](_0x31fd71))['split']('\x0a')['map'](_0x4929da=>{try{return _0x5488bf='',JSON['parse'](_0x4929da);}catch{return _0x5488bf=_0x4929da,null;}})['filter'](_0x5c7f4a=>null!==_0x5c7f4a);_0x53b1f8['length']&&(_0x84ed71+=_0x53b1f8['map'](_0xc4c7e0=>this['_getGeneratedText'](_0xc4c7e0,_0x223994))['join'](''),_0x2127c2(_0x84ed71));}return Promise['resolve']();}async['_readStaticResponse'](_0x4468cf,_0xd52a0f,_0x3f9940){let _0x10b9f6;return _0x10b9f6=_0x4468cf instanceof Response?await _0x4468cf['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x4468cf['body'])),(_0x3f9940(this['_getGeneratedText'](_0x10b9f6,_0xd52a0f)),Promise['resolve']());}['_getGeneratedText'](_0xb3d51,_0xb9cb8b){switch(this['getModelFamily'](_0xb9cb8b)){case'anthropic.claude':return _0xb3d51['completion'];case'ai21.j2':return _0xb3d51['completions'][0x0]['data']['text'];case'cohere.command':return _0xb3d51['generations'][0x0]['text'];case'meta.llama':return _0xb3d51['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
23
+ import{Plugin as _0xa2aebb,Command as _0x11f10d}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x4229de,IconCheck as _0x37d51c,IconError as _0x93fbc8,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x4afa3b,IconRobotPencil as _0x49ac43}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x1eec10,CKEditorError as _0xa97696,ObservableMixin as _0x455c22,global as _0x466eb3,isVisible as _0x52e7a7,Rect as _0x456d6c,Collection as _0x5c19b8,FocusTracker as et,KeystrokeHandler as rt,first as _0x568f50}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x25b7ce,View as _0x33888c,SpinnerView as _0x267b2f,IconView as _0xef11c6,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x44d9b2,createDropdown as _0x1c43f9,addMenuToDropdown as _0x358282,MenuBarMenuView as _0xea1f72,MenuBarMenuListItemButtonView as _0x1bce39,DialogViewPosition as _0x46bd9d,MenuBarMenuListView as _0xaef931,MenuBarMenuListItemView as _0x9a245e}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x484822,ClipboardMarkersUtils as _0x1e3e11}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x5960d0,ViewDataTransfer as _0x53d16d,ViewUpcastWriter as _0x5e87c3,Matcher as _0xf46dd0}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x541bb0,InvokeModelWithResponseStreamCommand as _0xf413eb,InvokeModelCommand as _0x1f1126}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x1e8df0,_0x29ebc2){const _0x23ff48=(0x0,_0x29ebc2['t'])('Other');return _0x1e8df0['length']?'groupId'in _0x1e8df0[0x0]?_0x1e8df0:[{'groupId':K,'groupLabel':_0x23ff48,'order':0x1/0x0,'commands':_0x1e8df0}]:[{'groupId':K,'groupLabel':_0x23ff48,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0xa2aebb{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xf1b71f}=this,_0x29aca4=['ck-fake-ai-selection'];_0xf1b71f['config']['get']('ai.useTheme')&&_0x29aca4['push']('ck-ai-assistant-ui_theme'),_0xf1b71f['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x29aca4,'priority':0xc}}),_0xf1b71f['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x218887,{writer:_0x15a279})=>{if(!_0x218887['markerRange']['isCollapsed'])return null;const _0x3989c7=_0x15a279['createUIElement']('span');return _0x15a279['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x3989c7),_0x3989c7;}});}['afterInit'](){!async function(_0x5e7120){const _0x52621e=_0x4f86e1([0x6e,0x41,0x37,0x79,0x75,0x72,0x67,0x4f,0x48,0x62,0x5a,0x76,0x44,0x70,0x6c,0x52,0x6b,0x4a,0x73,0x63,0x64,0x49,0x43,0x6d,0x38,0x36,0x6f,0x50,0x57,0x78,0x39,0x32,0x66,0x31,0x71,0x46,0x30,0x4c,0x61,0x53,0x58,0x33,0x4e,0x47,0x77,0x54,0x4d,0x4b,0x34,0x6a,0x56,0x74,0x59,0x55,0x42,0x51,0x69,0x35,0x7a,0x68,0x65,0x45]),_0x294bd0=0x3dffc4e1,_0x36eaa1=0x3df8b7b9^_0x294bd0,_0xcc604a=window[_0x4f86e1([0x44,0x61,0x74,0x65])][_0x4f86e1([0x6e,0x6f,0x77])](),_0x534023=_0x5e7120[_0x4f86e1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4e5ad6=new window[(_0x4f86e1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f33b3=>{_0x534023[_0x4f86e1([0x6f,0x6e,0x63,0x65])](_0x4f86e1([0x72,0x65,0x61,0x64,0x79]),_0x2f33b3);}),_0x44719c={[_0x4f86e1([0x6b,0x74,0x79])]:_0x4f86e1([0x45,0x43]),[_0x4f86e1([0x75,0x73,0x65])]:_0x4f86e1([0x73,0x69,0x67]),[_0x4f86e1([0x63,0x72,0x76])]:_0x4f86e1([0x50,0x2d,0x32,0x35,0x36]),[_0x4f86e1([0x78])]:_0x4f86e1([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]),[_0x4f86e1([0x79])]:_0x4f86e1([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]),[_0x4f86e1([0x61,0x6c,0x67])]:_0x4f86e1([0x45,0x53,0x32,0x35,0x36])},_0x481226=_0x534023[_0x4f86e1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f86e1([0x67,0x65,0x74])](_0x4f86e1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x547afb(){let _0x2cdaef,_0x2e36cf=null,_0x38a551=null;try{if(_0x481226==_0x4f86e1([0x47,0x50,0x4c]))return _0x4f86e1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2cdaef=_0xbb3ead(),!_0x2cdaef)return _0x4f86e1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2cdaef[_0x4f86e1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x38a551=_0x20df02(_0x2cdaef[_0x4f86e1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2cdaef[_0x4f86e1([0x6a,0x74,0x69])])),await _0x1fa4c0()?_0x5e8b1d()?_0x228dbe()?_0x4f86e1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x59b38b()?(_0x2cdaef[_0x4f86e1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f86e1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e36cf=_0x334797(_0x4f86e1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2cdaef[_0x4f86e1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f86e1([0x74,0x72,0x69,0x61,0x6c])&&(_0x2e36cf=_0x334797(_0x4f86e1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3808a4()):_0x4f86e1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f86e1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f86e1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4f86e1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x228dbe(){const _0x417336=[_0x4f86e1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f86e1([0x74,0x72,0x69,0x61,0x6c])][_0x4f86e1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cdaef[_0x4f86e1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xcc604a/0x3e8:0xe10*_0x36eaa1;return _0x2cdaef[_0x4f86e1([0x65,0x78,0x70])]<_0x417336;}function _0x5e8b1d(){const _0x3ba631=_0x2cdaef[_0x4f86e1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3ba631&&(!!_0x3ba631[_0x4f86e1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f86e1([0x2a]))||!!_0x3ba631[_0x4f86e1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f86e1([0x41,0x49])));}function _0x59b38b(){const _0x24ddad=_0x2cdaef[_0x4f86e1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x24ddad||0x0==_0x24ddad[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x11dc40}=new URL(window[_0x4f86e1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x24ddad[_0x4f86e1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11dc40))return!0x0;const _0x5664f3=_0x11dc40[_0x4f86e1([0x73,0x70,0x6c,0x69,0x74])](_0x4f86e1([0x2e]));return _0x24ddad[_0x4f86e1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2141e1=>_0x2141e1[_0x4f86e1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f86e1([0x2a])))[_0x4f86e1([0x6d,0x61,0x70])](_0x2d9a34=>_0x2d9a34[_0x4f86e1([0x73,0x70,0x6c,0x69,0x74])](_0x4f86e1([0x2e])))[_0x4f86e1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d8a4f=>_0x2d8a4f[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5664f3[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f86e1([0x6d,0x61,0x70])](_0x53c2bb=>Array(_0x5664f3[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x53c2bb[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f86e1([0x66,0x69,0x6c,0x6c])](_0x53c2bb[0x0]===_0x4f86e1([0x2a])?_0x4f86e1([0x2a]):'')[_0x4f86e1([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x53c2bb))[_0x4f86e1([0x73,0x6f,0x6d,0x65])](_0x296b38=>_0x5664f3[_0x4f86e1([0x65,0x76,0x65,0x72,0x79])]((_0x4fe26c,_0x5f3184)=>_0x296b38[_0x5f3184]===_0x4fe26c||_0x296b38[_0x5f3184]===_0x4f86e1([0x2a])));}function _0x3808a4(){return _0x2e36cf&&_0x38a551?new window[(_0x4f86e1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x11ace8,_0x59aa28)=>{_0x2e36cf[_0x4f86e1([0x74,0x68,0x65,0x6e])](_0x11ace8,_0x59aa28),_0x38a551[_0x4f86e1([0x74,0x68,0x65,0x6e])](_0x3339a9=>{_0x3339a9!=_0x4f86e1([0x56,0x61,0x6c,0x69,0x64])&&_0x11ace8(_0x3339a9);},_0x59aa28);}):_0x2e36cf||_0x38a551||_0x4f86e1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x20df02(_0x2c63a1,_0x8f4937){return new window[(_0x4f86e1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5260f2=>{if(_0x2e2469())return _0x5260f2(_0x4f86e1([0x56,0x61,0x6c,0x69,0x64]));_0x411119(),_0x534023[_0x4f86e1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f86e1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xb83eca=!0x1;const _0x26cf1b=_0x1eec10();function _0x37c392(_0x402671){return!!_0x402671&&(typeof _0x402671===_0x4f86e1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x402671===_0x4f86e1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x402671[_0x4f86e1([0x74,0x68,0x65,0x6e])]===_0x4f86e1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x402671[_0x4f86e1([0x63,0x61,0x74,0x63,0x68])]===_0x4f86e1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4defe5(_0x3789a1){_0x48f430(_0x3789a1)[_0x4f86e1([0x74,0x68,0x65,0x6e])](_0xc382a3=>{if(!_0xc382a3||_0xc382a3[_0x4f86e1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f86e1([0x6f,0x6b]))return _0x4f86e1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1b1b3a(_0x15ab9c(_0x26cf1b+_0x8f4937))!=_0xc382a3[_0x4f86e1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f86e1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f86e1([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f86e1([0x74,0x68,0x65,0x6e])](_0x329111=>(_0x4ef3b2(),_0x329111),()=>{const _0x1997a1=_0xa7fb5b();return null==_0x1997a1?(_0x4ef3b2(),_0x4f86e1([0x56,0x61,0x6c,0x69,0x64])):_0x4f86e1(_0xcc604a-_0x1997a1>(0x19f340e1^_0x294bd0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f86e1([0x74,0x68,0x65,0x6e])](_0x5260f2)[_0x4f86e1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5260f2(_0x4f86e1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2e368c=0x3dc92a61^_0x294bd0;function _0x4ef3b2(){const _0x4a5e61=_0x4f86e1([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b1b3a(_0x15ab9c(_0x2c63a1)),_0x5e1d3c=_0xdacf1(_0x1b1b3a(window[_0x4f86e1([0x4d,0x61,0x74,0x68])][_0x4f86e1([0x63,0x65,0x69,0x6c])](_0xcc604a/_0x2e368c)));window[_0x4f86e1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f86e1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a5e61,_0x5e1d3c);}function _0xa7fb5b(){const _0x3d488d=_0x4f86e1([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b1b3a(_0x15ab9c(_0x2c63a1)),_0x74ada5=window[_0x4f86e1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f86e1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d488d);return _0x74ada5?window[_0x4f86e1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xdacf1(_0x74ada5),0x10)*_0x2e368c:null;}function _0x48f430(_0x45843a){return new window[(_0x4f86e1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x20208a,_0x3766fa)=>{_0x45843a[_0x4f86e1([0x74,0x68,0x65,0x6e])](_0x20208a,_0x3766fa),window[_0x4f86e1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3766fa,0x3dfe1021^_0x294bd0);});}}_0x534023[_0x4f86e1([0x6f,0x6e])](_0x4f86e1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x587f8d,_0x5ea479)=>{if(_0x5ea479[0x0]!=_0x2c63a1)return _0x5260f2(_0x4f86e1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5ea479[0x1]={..._0x5ea479[0x1],[_0x4f86e1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x26cf1b};},{[_0x4f86e1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f86e1([0x68,0x69,0x67,0x68])}),_0x534023[_0x4f86e1([0x6f,0x6e])](_0x4f86e1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x110399=>{_0x37c392(_0x110399[_0x4f86e1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xb83eca=!0x0,_0x4defe5(_0x110399[_0x4f86e1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f86e1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f86e1([0x6c,0x6f,0x77])}),_0x4e5ad6[_0x4f86e1([0x74,0x68,0x65,0x6e])](()=>{_0xb83eca||_0x5260f2(_0x4f86e1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2e2469(){return _0x534023[_0x4f86e1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f86e1([0x76,0x69,0x65,0x77])][_0x4f86e1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f86e1([0x61,0x75,0x74,0x6f]);}function _0x411119(){_0x534023[_0x4f86e1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f86e1([0x76,0x69,0x65,0x77])][_0x4f86e1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f86e1([0x61,0x75,0x74,0x6f]);}}function _0x334797(_0x197f4b){const _0x13d3d8=[new window[(_0x4f86e1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d7a3c=>setTimeout(_0x4d7a3c,0x3df6fa2d^_0x294bd0)),_0x4e5ad6[_0x4f86e1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f86e1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x534967=>{let _0x4e6429=0x0;_0x534023[_0x4f86e1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f86e1([0x6f,0x6e])](_0x4f86e1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x431dd7,_0xe6aa69)=>{_0xe6aa69[0x0][_0x4f86e1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4e6429++,_0x4e6429==(0x3dffc519^_0x294bd0)&&(_0x534967(),_0x431dd7[_0x4f86e1([0x6f,0x66,0x66])]());});}))];return window[_0x4f86e1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f86e1([0x72,0x61,0x63,0x65])](_0x13d3d8)[_0x4f86e1([0x74,0x68,0x65,0x6e])](()=>_0x197f4b);}async function _0x262362(){await _0x4e5ad6,_0x534023[_0x4f86e1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f86e1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x266447,_0x534023[_0x4f86e1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f86e1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x266447,_0x534023[_0x4f86e1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f86e1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4691fa(_0x111c8c){const _0x269c1e=_0x4a7801();_0x534023[_0x269c1e]=_0x4f86e1([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x111c8c,_0x111c8c!=_0x4f86e1([0x56,0x61,0x6c,0x69,0x64])&&_0x262362();}function _0x4a7801(){const _0x4d3690=window[_0x4f86e1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f86e1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f86e1([0x6e,0x6f,0x77])]())[_0x4f86e1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f86e1([0x2e]),'');let _0x5611ad=_0x4f86e1([0x6e]);for(let _0x399855=0x0;_0x399855<_0x4d3690[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x399855+=0x2){let _0xddf789=window[_0x4f86e1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4d3690[_0x4f86e1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x399855,_0x399855+0x2));_0xddf789>=_0x52621e[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xddf789-=_0x52621e[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5611ad+=_0x52621e[_0xddf789];}return _0x5611ad;}function _0xbb3ead(){const _0x51cb54=_0x481226[_0x4f86e1([0x73,0x70,0x6c,0x69,0x74])](_0x4f86e1([0x2e]));if(0x3!=_0x51cb54[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xd6a549(_0x51cb54[0x1]);function _0xd6a549(_0x4c687a){const _0x6bf05e=_0x4616bf(_0x4c687a);return _0x6bf05e&&_0x5122c5()?_0x6bf05e:null;function _0x5122c5(){const _0x471469=_0x6bf05e[_0x4f86e1([0x6a,0x74,0x69])],_0x1a2c1c=window[_0x4f86e1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x471469[_0x4f86e1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x471469[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1a0cc4={..._0x6bf05e,[_0x4f86e1([0x6a,0x74,0x69])]:_0x471469[_0x4f86e1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x471469[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1a0cc4[_0x4f86e1([0x76,0x63])],_0x15ab9c(_0x1a0cc4)==_0x1a2c1c;}}}async function _0x1fa4c0(){let _0x35dce5=!0x0;try{const _0x2329ea=_0x481226[_0x4f86e1([0x73,0x70,0x6c,0x69,0x74])](_0x4f86e1([0x2e])),[_0x5e2142,_0x34e2d0,_0x46bfc7]=_0x2329ea;return _0x1691c4(_0x5e2142),await _0x2fa68a(_0x5e2142,_0x34e2d0,_0x46bfc7),_0x35dce5;}catch{return!0x1;}function _0x1691c4(_0x587317){const _0x168f76=_0x4616bf(_0x587317);_0x168f76&&_0x168f76[_0x4f86e1([0x61,0x6c,0x67])]==_0x4f86e1([0x45,0x53,0x32,0x35,0x36])||(_0x35dce5=!0x1);}async function _0x2fa68a(_0xae329b,_0x435252,_0x5c8647){const _0x39cdba=window[_0x4f86e1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f86e1([0x66,0x72,0x6f,0x6d])](_0x30c4e8(_0x5c8647),_0x4d56e3=>_0x4d56e3[_0x4f86e1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x37bcc4=new window[(_0x4f86e1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f86e1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xae329b+_0x4f86e1([0x2e])+_0x435252),_0x4f796e=window[_0x4f86e1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f86e1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4f796e)return;const _0x25f2db=await _0x4f796e[_0x4f86e1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f86e1([0x6a,0x77,0x6b]),_0x44719c,{[_0x4f86e1([0x6e,0x61,0x6d,0x65])]:_0x4f86e1([0x45,0x43,0x44,0x53,0x41]),[_0x4f86e1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f86e1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f86e1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4f796e[_0x4f86e1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f86e1([0x6e,0x61,0x6d,0x65])]:_0x4f86e1([0x45,0x43,0x44,0x53,0x41]),[_0x4f86e1([0x68,0x61,0x73,0x68])]:{[_0x4f86e1([0x6e,0x61,0x6d,0x65])]:_0x4f86e1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x25f2db,_0x39cdba,_0x37bcc4)||(_0x35dce5=!0x1);}}function _0x4616bf(_0x288b10){return _0x288b10[_0x4f86e1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f86e1([0x65,0x79]))?JSON[_0x4f86e1([0x70,0x61,0x72,0x73,0x65])](_0x30c4e8(_0x288b10)):null;}function _0x30c4e8(_0x3752f5){return window[_0x4f86e1([0x61,0x74,0x6f,0x62])](_0x3752f5[_0x4f86e1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f86e1([0x2b]))[_0x4f86e1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f86e1([0x2f])));}function _0x15ab9c(_0x3bd759){let _0x43fb4c=0x1505;function _0x528a15(_0x5b1d70){for(let _0x58ac1c=0x0;_0x58ac1c<_0x5b1d70[_0x4f86e1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x58ac1c++){const _0x344bc0=_0x5b1d70[_0x4f86e1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x58ac1c);_0x43fb4c=(_0x43fb4c<<0x5)+_0x43fb4c+_0x344bc0,_0x43fb4c&=_0x43fb4c;}}function _0x3217ec(_0x53deb3){Array[_0x4f86e1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x53deb3)?_0x53deb3[_0x4f86e1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3217ec):_0x53deb3&&typeof _0x53deb3==_0x4f86e1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f86e1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x53deb3)[_0x4f86e1([0x73,0x6f,0x72,0x74])]()[_0x4f86e1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x30eea8,_0x330ea0])=>{_0x528a15(_0x30eea8),_0x3217ec(_0x330ea0);}):_0x528a15(window[_0x4f86e1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x53deb3));}return _0x3217ec(_0x3bd759),_0x43fb4c>>>0x0;}function _0x1b1b3a(_0x45a61b){return _0x45a61b[_0x4f86e1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f86e1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f86e1([0x30]));}function _0xdacf1(_0x149783){return _0x149783[_0x4f86e1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f86e1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f86e1([0x6a,0x6f,0x69,0x6e])]('');}function _0x266447(){}function _0x4f86e1(_0x247528){return _0x247528['map'](_0x5a87bc=>String['fromCharCode'](_0x5a87bc))['join']('');}_0x4691fa(await _0x547afb());}(this);}['showFakeVisualSelection'](){const _0x7cd694=this['editor']['model'];_0x7cd694['change'](_0x43457c=>{const _0x3ddc91=_0x7cd694['document']['selection']['getRanges']();let _0x53758e=0x0;for(const _0x342795 of _0x3ddc91){const _0x517f20=w+':'+_0x53758e;if(_0x7cd694['markers']['has'](_0x517f20))_0x43457c['updateMarker'](_0x517f20,{'range':_0x342795});else{if(_0x342795['start']['isAtEnd']){const _0x42158c=_0x342795['start']['getLastMatchingPosition'](({item:_0x1dd347})=>!_0x7cd694['schema']['isContent'](_0x1dd347),{'boundaries':_0x342795});_0x43457c['addMarker'](_0x517f20,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x43457c['createRange'](_0x42158c,_0x342795['end'])});}else _0x43457c['addMarker'](_0x517f20,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x342795});}_0x53758e++;}});}['hideFakeVisualSelection'](){const _0x5d241a=this['editor']['model'],_0x265f59=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x265f59['length']&&_0x5d241a['change'](_0x38612c=>{_0x265f59['forEach'](_0x280f7a=>{_0x38612c['removeMarker'](_0x280f7a);});});}['insertContent'](_0x3be42f,_0xb41077){const _0x440835=this['_getAISelection'](),_0x48af6d=_0xb41077||_0x440835['getFirstRange']();this['editor']['model']['canEditAt'](_0x48af6d)&&this['editor']['model']['change'](_0x5147dd=>{this['hideFakeVisualSelection'](),_0xb41077||this['_resetContentOfSelectedTableCells'](_0x5147dd,_0x440835),this['_pasteHTMLUsingClipboard']({'insertAt':_0x48af6d,'writer':_0x5147dd,'html':_0x3be42f});});}['insertContentBelow'](_0x4d1bbe){const {model:_0x58d1e4}=this['editor'],_0x284624=this['_getAISelection']();_0x58d1e4['change'](()=>{const _0x301b1f=this['_prepareTableInsertBelowPosition'](_0x4d1bbe,_0x284624)||this['_getDefaultInsertBelowPosition'](_0x284624);this['insertContent'](_0x4d1bbe,_0x301b1f);});}['_getAISelection'](){const _0x513845=this['editor']['model'],_0x120dce=Array['from'](_0x513845['markers']['getMarkersGroup'](w))['map'](_0x4be0ee=>_0x4be0ee['getRange']());return _0x513845['createSelection'](_0x120dce);}['_pasteHTMLUsingClipboard']({writer:_0x5bca07,html:_0x2f6fed,insertAt:_0x5c8112}){const {view:_0x238b72}=this['editor']['editing'],_0x51a5f9=this['editor']['plugins']['get'](_0x484822),_0x34a211=new gt();_0x34a211['setData']('text/html',_0x2f6fed);const _0x52a090=new ClipboardEvent('paste',{'clipboardData':_0x34a211}),_0x2a5896=new _0x5960d0(_0x238b72,_0x52a090,{'dataTransfer':new _0x53d16d(_0x34a211)});_0x5bca07['setSelection'](_0x5c8112);const _0x3a9f37=(_0x25efba,_0x26fb24)=>{_0x26fb24['resultRange']&&_0x5bca07['setSelection'](_0x26fb24['resultRange']);};_0x51a5f9['once']('contentInsertion',_0x3a9f37,{'priority':'lowest'}),_0x238b72['document']['fire']('paste',_0x2a5896),_0x51a5f9['off']('contentInsertion',_0x3a9f37);}['_getDefaultInsertBelowPosition'](_0x39f6bf){const {model:_0x22ac37}=this['editor'],_0x33bafa=Array['from'](_0x39f6bf['getSelectedBlocks']());return _0x33bafa['length']?_0x22ac37['createPositionAfter'](_0x33bafa['pop']()):_0x39f6bf['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0xafbe32,_0x37d1b6){const {model:_0x4354de,plugins:_0x27d815}=this['editor'];if(_0x27d815['has']('TableUtils')){const _0x526e1a=_0x27d815['get']('TableUtils')['getSelectedTableCells'](_0x37d1b6);if(_0x526e1a['length']){const _0x32f783=this['_getTableRowCountFromContent'](_0xafbe32),_0x2e2060=this['_createEmptyTableRows'](_0x526e1a,_0x32f783);return _0x4354de['createPositionAt'](_0x2e2060,0x0);}}return null;}['_getTableRowCountFromContent'](_0x591d23){const _0x206352=this['editor']['plugins']['get']('TableUtils'),_0x1ae185=this['editor']['data']['parse'](_0x591d23),_0x5f07f6=Array['from'](_0x1ae185['getChildren']())['filter'](_0x3f8488=>_0x3f8488['is']('element','table'));let _0x332446=0x0;return _0x5f07f6['forEach'](_0x350d66=>{_0x332446+=_0x206352['getRows'](_0x350d66);}),_0x332446;}['_createEmptyTableRows'](_0x2ed595,_0x4555ab){const _0x39083c=this['editor']['plugins']['get']('TableUtils'),_0xa63e3e=_0x39083c['getRowIndexes'](_0x2ed595),_0x18cfc1=_0x39083c['getColumnIndexes'](_0x2ed595),_0x58f553=_0xa63e3e['last']+0x1,_0x54424a=_0x18cfc1['first'],_0x5c0197=_0x2ed595[0x0]['findAncestor']('table');for(let _0x1ff6ac=0x0;_0x1ff6ac<_0x4555ab;_0x1ff6ac++)_0x39083c['insertRows'](_0x5c0197,{'at':_0x58f553});return _0x5c0197['getChild'](_0x58f553)['getChild'](_0x54424a);}['_resetContentOfSelectedTableCells'](_0xeae060,_0x2222a8){const {plugins:_0x2d21e1}=this['editor'],{model:_0x291eb7}=_0xeae060;if(!_0x2d21e1['has']('TableUtils'))return;_0x2d21e1['get']('TableUtils')['getSelectedTableCells'](_0x2222a8)['length']&&_0x291eb7['deleteContent'](_0x2222a8);}}class x extends _0xa2aebb{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0xa97696('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x1e8b5a){super(_0x1e8b5a),this['name']='AIRequestError';}}function i(_0x35e704,_0x36c74e,_0x110de0){const t=_0x35e704['t'];switch(_0x36c74e){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',_0x110de0);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x110de0);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'},_0x110de0);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 _0x36c74e;}}class E extends _0x11f10d{['_commandDefinitions'];constructor(_0x2280f9,_0x3a813c){super(_0x2280f9),this['_commandDefinitions']=_0x3a813c,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x2d3830,_0x448d99,_0x521276)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x521276));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x529d76,_0x589a15,_0x4b7939)=>{this['enabledCommandsIds']=_0x4b7939?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x46e9ce=this['editor']['model'];this['_hasContext']=function(_0x33b5bb){const _0x213f43=_0x33b5bb['document']['selection'];return _0x213f43['isCollapsed']?0x0!==[..._0x213f43['getSelectedBlocks']()]['length']&&![..._0x213f43['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x33b5bb['hasContent'](_0x213f43['getFirstRange']());}(_0x46e9ce);const _0x44d906=_0x46e9ce['document']['selection'],_0x3ea192=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x489f5b of _0x44d906['getRanges']())for(const _0x238b00 of _0x489f5b['getItems']())if(_0x238b00['is']('element')&&_0x3ea192['includes'](_0x238b00['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x5dc510='',_0x10ef37='',_0x56bc7c='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x5dc510,_0x10ef37,_0x56bc7c);}}function F(_0x6b46c0,_0x1b0793){const _0x3ec791=new Set();for(const _0x2fbf1c of _0x6b46c0['values']())(_0x1b0793||!0x1===_0x2fbf1c['requiresContent'])&&_0x3ec791['add'](_0x2fbf1c['id']);return Array['from'](_0x3ec791);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0x455c22(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x5d2865,_0x2e138f,_0x308b8f){super(),this['editor']=_0x5d2865,this['textAdapter']=_0x2e138f,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x308b8f,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x5687e8,_0xa5ff2d,_0x1ba822)=>{this['view']['value']=this['_sanitizeHTML'](_0x1ba822);}),this['listenTo'](this['view'],'submitPrompt',(_0x560c2d,_0x3ffd1f)=>{const _0x4bbb4c=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x3ffd1f,_0x4bbb4c,'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:_0x5509c5,query:_0xfe78fc,htmlContent:_0x387eda,label:_0x3a69b2,mainActionLabel:_0x23bb0e}){this['view']['prompt']=_0x3a69b2,this['view']['mainAction']=_0x23bb0e,this['initialContext']=_0x387eda,_0xfe78fc&&(this['view']['isRendered']?this['_handleQuery'](_0xfe78fc,_0x387eda,_0x5509c5,_0x3a69b2):this['view']['once']('render',()=>{this['_handleQuery'](_0xfe78fc,_0x387eda,_0x5509c5,_0x3a69b2);}));}['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'](_0x516bbf,_0x170ce7,_0x1b2cf2,_0x1e5303){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x170ce7,this['previousQuery']=_0x516bbf,this['previousLabel']=_0x1e5303||_0x516bbf,this['previousActionId']=_0x1b2cf2,new Promise(_0x196a25=>{this['textAdapter']['makeRequest']({'query':_0x516bbf,'context':_0x170ce7,'onData':_0x5de71c=>{this['currentResponse']=_0x5de71c,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x1b2cf2})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x51b9f1=>{_0x51b9f1 instanceof R?this['view']['handleError'](_0x51b9f1['message']):this['view']['handleError'](),_0x196a25();})['finally'](()=>{this['stopProcessing'](),_0x196a25();});});}['_parseAndNormalizeContent'](_0x4208a9,_0x1e99d2=!0x1){const _0x2cb0e9=Q['exec'](_0x4208a9);_0x4208a9=_0x2cb0e9?_0x4208a9['substring'](_0x2cb0e9[0x1]['length']):_0x4208a9['length']<0x64&&!_0x1e99d2?'':this['_stripMarkdownSyntax'](_0x4208a9);const _0x361282=this['_domParser']['parseFromString'](_0x4208a9,'text/html');if(_0x2cb0e9){const _0xe10b50=Array['from'](_0x361282['body']['childNodes']);_0xe10b50['reverse']();for(const _0x563627 of _0xe10b50){if(_0x563627['nodeType']==Node['ELEMENT_NODE'])break;_0x563627['remove']();}}const _0x4f0501=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x361282['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x4f0501);const _0x381ca7=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x301f4b=this['editor']['data']['toModel'](_0x4f0501);return _0x381ca7||_0x301f4b['markers']['clear'](),this['editor']['data']['stringify'](_0x301f4b);}['_normalizeResponseHeadings'](_0xb689e1){const _0xc860d0=new _0x5e87c3(this['editor']['editing']['view']['document']),_0x652869=new _0xf46dd0({'name':/^h[1-5]$/}),_0x3078ad=[];let _0x153ad6=!0x1;for(const _0x1ddb2f of _0xb689e1)_0x1ddb2f['is']('element')&&_0x652869['match'](_0x1ddb2f)&&(_0x3078ad['push'](_0x1ddb2f),'h1'==_0x1ddb2f['name']&&(_0x153ad6=!0x0));if(_0x153ad6){for(const _0x249b2e of _0x3078ad)_0xc860d0['rename']('h'+(parseInt(_0x249b2e['name'][0x1])+0x1),_0x249b2e);}}['_isH1TagSupportEnabled'](){const {data:_0x289526,editing:_0x5b0e4a}=this['editor'],_0x2ff90c=_0x289526['htmlProcessor']['toView']('<h1></h1>'),_0x37bad8=_0x289526['toView'](_0x289526['toModel'](_0x2ff90c));return!!_0x5b0e4a['view']['domConverter']['viewToDom'](_0x37bad8)['querySelector']('h1');}['_sanitizeHTML'](_0x1661c5){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x1661c5),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0xb3d723){const _0x374b39=_0xb3d723['trim']();return _0x374b39['startsWith']('```html')?_0x374b39['endsWith']('```')?_0x374b39['substring'](0x7,_0x374b39['length']-0x3):_0x374b39['substring'](0x7):_0xb3d723;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x1f3d8e){super(_0x1f3d8e),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x26bcfa=>i(_0x1f3d8e,'AI_'+_0x26bcfa['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x1f3d8e,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x1f3d8e,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x1f3d8e,'Stop'));const _0x35f180=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x35f180['if']('isVisible','ck-hidden',_0x503d64=>!_0x503d64)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5f49ed,_0x1baef2){const _0x244f63=new _0x25b7ce(this['locale']);return _0x244f63['set']({'label':_0x5f49ed,'class':_0x1baef2||'','isVisible':!0x0,'withText':!0x0}),_0x244f63;}}class ct extends _0x33888c{['contentFieldView'];['copyButtonView'];constructor(_0x1b7324,_0x546e77=''){super(_0x1b7324),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0xbf9071=this['bindTemplate'];this['contentFieldView']=new bt(_0x1b7324,_0x546e77),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0xbf9071['if']('isVisible','ck-hidden',_0x74ad3=>!_0x74ad3)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0xbf9071['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 _0x4f4530=!0x1;this['on']('change:value',(_0x13ab2d,_0x5f5d55,_0x2269e4)=>{const _0x31808f=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x2269e4),this['isProcessing']&&_0x31808f&&!_0x4f4530&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0xc5c064,_0x265e59,_0x7e6af6)=>{_0x4f4530=!0x1,_0x7e6af6?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x4f4530=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x4f4530=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x492255=this['locale'],_0x59cc3d=new _0x25b7ce(this['locale']),_0x45d30a='ck-ai-form__copy-button';return _0x59cc3d['set']({'label':i(_0x492255,'Copy'),'icon':_0x4229de,'class':_0x45d30a,'tooltip':!0x0}),_0x59cc3d['bind']('isVisible')['to'](this,'value',_0x20da41=>!!_0x20da41),_0x59cc3d['bind']('isEnabled')['to'](this,'isProcessing',_0x2e3f86=>!_0x2e3f86),_0x59cc3d['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x59cc3d['icon']=_0x37d51c,_0x59cc3d['class']=_0x45d30a+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x59cc3d['icon']=_0x4229de,_0x59cc3d['class']=_0x45d30a;},0x3e8);}),_0x59cc3d;}['_copyHTMLToClipboard'](_0x2d43ab){const {window:_0x5c5cf5,document:_0x27f46e}=_0x466eb3;if(_0x5c5cf5['ClipboardItem']){const {Blob:_0x28b621,ClipboardItem:_0x208dbb}=_0x5c5cf5,_0x2adba0=[new _0x208dbb({'text/html':new _0x28b621([_0x2d43ab['innerHTML']],{'type':'text/html'}),'text/plain':new _0x28b621([_0x2d43ab['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x2adba0);}else{const _0x403ee1=_0x27f46e['createElement']('div');_0x403ee1['style']['position']='absolute',_0x403ee1['style']['left']='-9999px',_0x403ee1['innerHTML']='<span>[</span>'+_0x2d43ab['innerHTML']+'<span>]</span>',_0x27f46e['body']['appendChild'](_0x403ee1);const _0x3bdafd=_0x27f46e['createRange']();_0x3bdafd['setStartAfter'](_0x403ee1['firstElementChild']),_0x3bdafd['setEndBefore'](_0x403ee1['lastElementChild']);const _0x5d2a96=_0x5c5cf5['getSelection']();_0x5d2a96['removeAllRanges'](),_0x5d2a96['addRange'](_0x3bdafd),_0x27f46e['execCommand']('copy'),_0x403ee1['remove']();}}}class bt extends _0x33888c{constructor(_0x72afdc,_0x525307=''){super(_0x72afdc),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x525307,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x17bcb){this['element']['innerHTML']=_0x17bcb;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0xa03ee0=new _0x33888c(),_0x4b75fe=this['locale'],_0x3874c8=new _0x267b2f();return _0x3874c8['isVisible']=!0x0,_0xa03ee0['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x3874c8,{'text':i(_0x4b75fe,'AI\x20is\x20writing...')}]}),_0xa03ee0['render'](),_0xa03ee0;}}class mt extends _0x33888c{constructor(_0x440c27,_0x51f9cf=''){super(_0x440c27);const _0x303221=new _0xef11c6(),_0x30d365=this['bindTemplate'];this['set']('text',_0x51f9cf),_0x303221['content']=_0x93fbc8,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x303221,{'text':_0x30d365['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0xb777af,_0x592258){super(_0xb777af,_0x592258),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',(_0x9db251,_0x2ad391)=>{_0x9db251['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2ad391());});}['_createSubmitButton'](){const _0x1a0e6f=new _0x25b7ce(this['locale']),_0x19f888=this['locale'];return _0x1a0e6f['set']({'icon':it,'label':i(_0x19f888,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x1a0e6f['on']('execute',()=>{this['submit']();}),_0x1a0e6f['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x7c81b6,_0x458db4)=>!_0x7c81b6&&_0x458db4),_0x1a0e6f;}['_createShowHistoryButton'](){const _0x22de32=new _0x25b7ce(this['locale']),_0x5c2cb1=this['resultsView'],_0x3f88e7=this['locale'];_0x22de32['set']({'label':i(_0x3f88e7,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x22de32['bind']('isOn')['to'](_0x5c2cb1,'isVisible'),_0x22de32['bind']('isEnabled')['to'](this,'isEnabled'),_0x22de32['on']('execute',()=>{_0x5c2cb1['isVisible']=!_0x5c2cb1['isVisible'],_0x5c2cb1['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x4b8cf1=()=>{_0x466eb3['window']['requestAnimationFrame'](()=>{if(_0x52e7a7(this['element'])){const _0x5bdb59=new _0x456d6c(this['queryView']['fieldView']['element']),_0x24c36f=_0x5bdb59['width'],_0x36a75d='rtl'===_0x3f88e7['uiLanguageDirection']?'left':'right';_0x5bdb59['excludeScrollbarsAndBorders'](),_0x22de32['element']['style'][_0x36a75d]=_0x24c36f-_0x5bdb59['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x4b8cf1),this['on']('render',_0x4b8cf1),_0x22de32;}['submit'](){const _0x22d7d2=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x22d7d2);}['focus'](_0x41d37c){-0x1===_0x41d37c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x3d134a){super(_0x3d134a),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x3d134a,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0xbf1650=0x0;for(const _0x59d417 of this['items'])_0xbf1650+=_0x59d417['items']['length'];return{'resultsCount':_0xbf1650,'totalItemsCount':_0xbf1650};}['_createClearHistoryButton'](){const _0x3ae3c0=this['locale'],_0x18ce56=new _0x25b7ce(this['locale']);return _0x18ce56['set']({'label':'('+i(_0x3ae3c0,'Clear')+')','withText':!0x0}),_0x18ce56['on']('execute',()=>this['fire']('clearHistory')),_0x18ce56;}}class ut extends xt{constructor(_0x3522dd){super();const _0x4f5084=new wt(),_0x287351=new _0x25b7ce(this['locale'],_0x4f5084);this['children']['add'](_0x287351),_0x287351['set']({'label':_0x3522dd['prompt'],'withText':!0x0}),_0x287351['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x3522dd['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x5c19b8{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x3f7505,_0x2a8170)=>{const _0x4769a0=os(_0x2a8170['prompt']);for(const _0x2c46e6 of this)if(_0x2c46e6!=_0x2a8170&&os(_0x2c46e6['prompt'])===_0x4769a0){this['remove'](_0x2c46e6);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x36b212=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x36b212));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x14c23d=>_0x14c23d)));}}function os(_0x306cab){return _0x306cab['toLowerCase']()['trim']();}class k extends _0x33888c{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x2f02ce,_0x31e649,_0x194c71=''){super(_0x2f02ce),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x2f02ce),this['contentArea']=new ct(_0x2f02ce,_0x194c71),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0xd4f5f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x31e649],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0xd4f5f['if']('isError','ck-hidden',_0x2d3652=>!_0x2d3652)]},'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'](_0x1b1967=0x1){-0x1===_0x1b1967?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 _0x156b6e=this['locale'],_0x430f90=new lt(_0x156b6e,{'queryView':{'label':i(_0x156b6e,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x156b6e,'Empty\x20history'),'secondary':i(_0x156b6e,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x430f90['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1acf43,_0xd7ef1)=>_0x1acf43&&!_0xd7ef1),this['listenTo'](_0x430f90,'submit',(_0xc71dc2,_0x4f7267)=>{this['prompt']=_0x4f7267;const _0x22421b=ft(_0x4f7267);this['fire']('submitPrompt',_0x22421b),_0x4f7267['trim']()&&this['_promptHistory']['add']({'prompt':_0x22421b},0x0);},{'priority':'high'}),_0x430f90;}['_createHistoryView'](){const _0x58b405=new pt(this['locale']);return _0x58b405['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x58b405['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x58b405;}['_createToolbar'](){const _0x3d492f=new at(this['locale']);return _0x3d492f['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4fc6ab,_0x419c93,_0x2941f2)=>_0x4fc6ab&&!_0x419c93&&!!_0x2941f2),_0x3d492f['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x3d492f['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x312d39,_0x30e5e6,_0x46dbb2)=>_0x312d39&&!_0x30e5e6&&!!_0x46dbb2),_0x3d492f['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x3d492f['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x2f587a,_0x332377)=>_0x2f587a&&!_0x332377),_0x3d492f['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x3d492f['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x3d492f['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x3d492f;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x344279=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x344279,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x264397){const _0x7eb523=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x264397||i(_0x7eb523,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0xa2aebb{['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[_0x1e3e11,a,x,_0x44d9b2];}constructor(_0x11ccef){super(_0x11ccef),_0x11ccef['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x11ccef['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x11ccef['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x11ccef['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x2e7026}=this;this['_aiAdapter']=_0x2e7026['plugins']['get'](x),this['_dialog']=_0x2e7026['plugins']['get'](_0x44d9b2),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x4e0cd7=new E(_0x2e7026,Array['from'](this['_commandDefinitions']['values']()));_0x2e7026['commands']['add']('showAIAssistant',_0x4e0cd7),_0x2e7026['ui']['componentFactory']['add']('aiCommands',_0x12b072=>{const _0x389c63=_0x1c43f9(_0x12b072);return _0x389c63['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x389c63['buttonView']['set']({'label':i(_0x12b072,'AI\x20Commands'),'icon':_0x4afa3b,'tooltip':!0x0}),_0x389c63['on']('execute',_0x8db4d9=>this['_onExecute'](_0x8db4d9['source']['id'])),_0x358282(_0x389c63,_0x2e7026['ui']['view']['body'],function(_0x355c42){const _0x563301=o(_0x355c42['config']['get']('ai.aiAssistant.commands'),_0x355c42['locale']),_0x75668a=U(_0x355c42,_0x563301)['filter'](_0xf9b8e7=>_0xf9b8e7['commands']['length']);if(0x1===_0x75668a['length'])return U(_0x355c42,_0x75668a[0x0]['commands'])['map'](_0x287504=>({'id':_0x287504['id'],'label':_0x287504['label']}));return _0x75668a['map'](_0x45d0d5=>{const {groupId:_0x39fbb1,groupLabel:_0x1726f0,commands:_0x168822}=_0x45d0d5,_0x11ebdb=U(_0x355c42,_0x168822)['map'](_0x2d8e84=>({'id':_0x2d8e84['id'],'label':_0x2d8e84['label']}));return{'id':_0x39fbb1,'menu':_0x1726f0||_0x39fbb1,'children':_0x11ebdb};});}(_0x2e7026),{'ariaLabel':i(_0x12b072,'AI\x20Commands')}),_0x389c63['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x4e0cd7['on']('change:enabledCommandsIds',_0x2a1523),_0x389c63['menuView']['once']('render',_0x2a1523),_0x389c63;function _0x2a1523(){_0x389c63['isEnabled']=_0x4e0cd7['enabledCommandsIds']['length']>0x0;for(const _0x406a42 of _0x389c63['menuView']['buttons'])_0x406a42['isEnabled']=_0x4e0cd7['enabledCommandsIds']['includes'](_0x406a42['id']);}}),_0x2e7026['ui']['componentFactory']['add']('menuBar:aiCommands',_0x1cd795=>{const _0x47245e=new _0xea1f72(_0x1cd795);_0x47245e['buttonView']['set']({'label':i(_0x1cd795,'AI\x20Commands'),'icon':_0x4afa3b}),_0x47245e['bind']('isEnabled')['to'](_0x4e0cd7,'enabledCommandsIds',_0x4b218c=>_0x4b218c['length']>0x0);const _0x5f019f=o(_0x2e7026['config']['get']('ai.aiAssistant.commands'),_0x1cd795);return this['_populateMenuBarMenu'](_0x4e0cd7,_0x47245e,_0x5f019f,_0x34ef65=>this['_onExecute'](_0x34ef65)),_0x47245e;}),_0x2e7026['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x525158=this['_createAIAssistantUIButton'](_0x25b7ce);return _0x525158['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x525158;}),_0x2e7026['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x54cc14=this['_createAIAssistantUIButton'](_0x1bce39);return _0x54cc14['set']({'role':'menuitemcheckbox'}),_0x54cc14;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x144764=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5a3091;for(const _0xc8ddae in _0x144764){const _0x30f5e0=_0xc8ddae,_0x185428=_0x144764[_0x30f5e0];if('aiLicenseKeyValid'==_0x185428||'aiLicenseKeyInvalid'==_0x185428||'aiLicenseKeyExpired'==_0x185428||'aiLicenseKeyDomainLimit'==_0x185428||'aiLicenseKeyNotAllowed'==_0x185428||'aiLicenseKeyEvaluationLimit'==_0x185428||'aiLicenseKeyTrialLimit'==_0x185428||'aiLicenseKeyUsageLimit'==_0x185428){delete _0x144764[_0x30f5e0],_0x5a3091=_0x185428,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x5a3091&&_0x144764['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x5a3091&&_0x144764['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x5a3091&&_0x144764['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x5a3091&&_0x144764['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x5a3091&&_0x144764['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x5a3091&&_0x144764['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x5a3091&&_0x144764['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x54e6fb='',_0x29f9f5='',_0x3ba20d='custom'){const _0x3c54d4=this['editor'],_0x51e0cb=_0x3c54d4['editing']['view'],_0x5481d6=_0x3c54d4['plugins']['get'](a),_0x14dca3=_0x3c54d4['plugins']['get'](_0x1e3e11);_0x5481d6['showFakeVisualSelection']();const _0x3aa134=new l(),_0x31d582=new ClipboardEvent('copy',{'clipboardData':_0x3aa134}),_0x2fd7eb=new _0x53d16d(_0x3aa134),_0x3025ed=new _0x5960d0(_0x51e0cb,_0x31d582,{'dataTransfer':_0x2fd7eb});_0x14dca3['_forceMarkersCopy']('comment',()=>{_0x51e0cb['document']['fire']('copy',_0x3025ed);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x3c54d4,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x375acb=_0x2fd7eb['getData']('text/html');const _0x5127fb=_0x3c54d4['model']['document']['selection'],_0x34b4b6=Array['from'](_0x5127fb['getRanges']());0x1===_0x34b4b6['length']&&_0x34b4b6[0x0]['isFlat']&&!_0x5127fb['getSelectedElement']()&&''!==_0x375acb['replace'](/&nbsp;/g,'')['trim']()&&(_0x375acb='<p>'+_0x375acb+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x3ba20d,'query':_0x54e6fb,'htmlContent':_0x375acb,'label':_0x29f9f5,'mainActionLabel':_[_0x3c54d4['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x49ac43,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x46bd9d['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x5481d6['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x39af98=new Map(),_0x5a5d23=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x37f3c3 of _0x5a5d23)for(const _0x4f4165 of _0x37f3c3['commands'])_0x39af98['set'](_0x4f4165['id'],{..._0x4f4165,'groupId':_0x37f3c3['groupId'],'groupLabel':_0x37f3c3['groupLabel']||_0x37f3c3['groupId']});return _0x39af98;}['_createAIAssistantUIButton'](_0x2af714){const _0x296735=this['editor'],_0xe61eaf=_0x296735['commands']['get']('showAIAssistant'),_0xb43b24=new _0x2af714(_0x296735['locale']);return _0xb43b24['set']({'label':i(_0x296735['locale'],'AI\x20Assistant'),'icon':_0x49ac43,'isToggleable':!0x0}),_0xb43b24['bind']('isEnabled')['to'](_0xe61eaf),_0xb43b24['bind']('isOn')['to'](this['_dialog'],'id',_0x36c391=>'aiAssistant'===_0x36c391),this['listenTo'](_0xb43b24,'execute',()=>{_0xb43b24['isOn']?this['hideUI']():_0xe61eaf['execute']();}),_0xb43b24;}['_initView'](){const _0x328532=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',()=>{_0x328532['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x328532['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x44b468,ui:{ariaLiveAnnouncer:_0x3f6f23}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x3ed6c2,_0x4b73cf,_0x48b483)=>{const _0x57c450=this['_aiAssistantController']['currentContext'];_0x48b483?_0x3f6f23['announce'](i(_0x44b468,'AI\x20is\x20writing')):_0x57c450&&_0x3f6f23['announce'](i(_0x44b468,'Generated\x20content:\x20%0',_0x57c450),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x2bd843,_0x282d0f,_0x1d3ec6)=>{if(_0x1d3ec6){const _0x5c2efe=this['_formView']['errorView']['text'];_0x3f6f23['announce'](i(_0x44b468,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x5c2efe));}});}['_onExecute'](_0x28ef85){const _0x5d3d5a=this['_commandDefinitions']['get'](_0x28ef85),_0x24dee2=this['editor'],_0x20fd3e=_0x24dee2['model']['document']['selection'],_0x30b103=_0x24dee2['commands']['get']('showAIAssistant'),_0x1fce77=_0x24dee2['plugins']['get'](a),_0x6e503a=''+(_0x5d3d5a['groupId']!==K?_0x5d3d5a['groupLabel']+':\x20':'')+_0x5d3d5a['label'];if(!0x1!==_0x5d3d5a['requiresContent']&&_0x20fd3e['isCollapsed']){const _0x24e36a=_0x568f50(_0x20fd3e['getSelectedBlocks']())||_0x24dee2['model']['schema']['getLimitElement'](_0x20fd3e);_0x24dee2['model']['change'](_0x2dc11e=>{_0x2dc11e['setSelection'](_0x24e36a,'in');});}_0x1fce77['showFakeVisualSelection'](),_0x30b103['execute'](_0x5d3d5a['prompt'],_0x6e503a,'command:'+_0x28ef85);}['_populateMenuBarMenu'](_0x56cd6b,_0x65b951,_0x581af3,_0x5d7ace){const _0x51bbec=this['editor'],_0x5389c5=_0x51bbec['locale'],_0x438baa=new _0xaef931(_0x5389c5),_0xa21c81=U(_0x51bbec,_0x581af3)['filter'](_0x4adb6b=>_0x4adb6b['commands']['length']);0x1===_0xa21c81['length']?this['_getMenuBarGroupButtons']({'command':_0x56cd6b,'commands':_0xa21c81[0x0]['commands'],'parentMenuView':_0x65b951,'onExecute':_0x5d7ace})['forEach'](_0x3da0c1=>_0x438baa['items']['add'](_0x3da0c1)):_0xa21c81['forEach'](({groupId:_0xcd3b83,groupLabel:_0x4a7c01,commands:_0x28abbb})=>{const _0x21d413=new _0x9a245e(_0x5389c5,_0x65b951),_0x395598=new _0xea1f72(_0x5389c5),_0x41da81=new _0xaef931(_0x5389c5),_0x4eaab9=this['_getMenuBarGroupButtons']({'command':_0x56cd6b,'commands':_0x28abbb,'parentMenuView':_0x395598,'onExecute':_0x5d7ace});_0x395598['buttonView']['set']({'label':_0x4a7c01||_0xcd3b83}),_0x395598['delegate']('execute')['to'](_0x65b951),_0x41da81['items']['addMany'](_0x4eaab9),_0x395598['panelView']['children']['add'](_0x41da81),_0x21d413['children']['add'](_0x395598),_0x438baa['items']['add'](_0x21d413);}),_0x65b951['panelView']['children']['add'](_0x438baa);}['_getMenuBarGroupButtons']({command:_0x512283,commands:_0x4d04ec,parentMenuView:_0x30cf45,onExecute:_0x139341}){const _0xcaf4c5=this['editor'],_0x4009c8=_0xcaf4c5['locale'];return U(_0xcaf4c5,_0x4d04ec)['map'](_0x52185f=>{const _0x5e3f94=new _0x9a245e(_0x4009c8,_0x30cf45),_0x39f860=new _0x1bce39(_0x4009c8);return _0x39f860['set']({'label':_0x52185f['label']}),_0x39f860['delegate']('execute')['to'](_0x30cf45),_0x39f860['on']('execute',()=>_0x139341(_0x52185f['id'])),_0x39f860['bind']('isEnabled')['to'](_0x512283,'enabledCommandsIds',_0x2fd6a8=>_0x2fd6a8['includes'](_0x52185f['id'])),_0x5e3f94['children']['add'](_0x39f860),_0x5e3f94;});}}function T(_0x12c721,_0x31d11c){return void 0x0!==_0x12c721['order']&&void 0x0===_0x31d11c['order']?0x1:void 0x0===_0x12c721['order']&&void 0x0!==_0x31d11c['order']?-0x1:void 0x0!==_0x12c721['order']&&void 0x0!==_0x31d11c['order']?_0x12c721['order']-_0x31d11c['order']:0x0;}function U(_0xeeeabc,_0x1824d4){_0x1824d4['sort'](T);const _0x1d5c72={},_0xbd0c4b=[];for(const _0xd8f1c8 of _0x1824d4)if(void 0x0!==_0xd8f1c8['order']){if(_0xd8f1c8['order']in _0x1d5c72)throw new _0xa97696('ai-commands-config-order-collision',_0xeeeabc,{'conflictingDefinitions':[_0xd8f1c8,_0x1d5c72[_0xd8f1c8['order']]]});_0x1d5c72[_0xd8f1c8['order']]=_0xd8f1c8,_0xbd0c4b['splice'](_0xd8f1c8['order'],0x0,_0xd8f1c8);}else _0xbd0c4b['push'](_0xd8f1c8);return _0xbd0c4b;}class At extends _0xa2aebb{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e5b54){super(_0x3e5b54);const _0xc3e7d9=_0x3e5b54['config'],_0x59db42=_0x3e5b54['locale'];_0xc3e7d9['define']('ai.aiAssistant.preserveComments',!0x0),_0xc3e7d9['define']('ai.aiAssistant.commands',_t(_0x59db42)),_0xc3e7d9['define']('ai.aiAssistant.extraCommandGroups',[]),_0xc3e7d9['define']('ai.aiAssistant.removeCommands',[]);let _0x30bff7=o(_0xc3e7d9['get']('ai.aiAssistant.commands'),_0x59db42);const _0xc07394=_0xc3e7d9['get']('ai.aiAssistant.extraCommandGroups'),_0x4f4d30=_0xc3e7d9['get']('ai.aiAssistant.removeCommands');_0xc07394['forEach'](_0x47aea4=>{const _0x421202=_0x30bff7['find'](_0x16cd7a=>_0x16cd7a['groupId']===_0x47aea4['groupId']);_0x421202?_0x421202['commands']=_0x421202['commands']['concat'](_0x47aea4['commands']):_0x30bff7['push'](_0x47aea4);}),_0x30bff7=_0x30bff7['filter'](_0x25b6d3=>!_0x4f4d30['includes'](_0x25b6d3['groupId'])),_0x30bff7['forEach'](_0x11e8c6=>{_0x11e8c6['commands']=_0x11e8c6['commands']['filter'](_0x496f4d=>!_0x4f4d30['includes'](_0x496f4d['id']));}),_0xc3e7d9['set']('ai.aiAssistant.commands',_0x30bff7);}}function _t(_0x4cb332){return[{'groupId':'editOrReview','groupLabel':i(_0x4cb332,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x4cb332,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x4cb332,'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(_0x4cb332,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x4cb332,'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(_0x4cb332,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x4cb332,'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(_0x4cb332,'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(_0x4cb332,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x4cb332,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x4cb332,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x4cb332,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x4cb332,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x4cb332,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x4cb332,'Change\x20style'),'commands':[{'id':'business','label':i(_0x4cb332,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x4cb332,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x4cb332,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x4cb332,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x4cb332,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x4cb332,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x4cb332,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x4cb332,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x4cb332,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x4cb332,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x4cb332,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x4cb332,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x4cb332,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0xa2aebb{['abortController'];static get['requires'](){return[x];}constructor(_0x52356a){super(_0x52356a),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x215ebe){return this['sendRequest'](_0x215ebe)['catch'](_0x19a3e5=>{if(_0x19a3e5 instanceof R)return Promise['reject'](_0x19a3e5);if('AbortError'==_0x19a3e5['name'])return Promise['resolve']();throw console['error'](_0x19a3e5),new _0xa97696('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x10ee1c,_0x2f9b30){const _0x3cf2a3=this['editor']['locale'],_0x1c96d3={'Content-Type':'application/json'};if('object'==typeof _0x10ee1c)Object['assign'](_0x1c96d3,_0x10ee1c);else{if(_0x10ee1c)try{const _0x25dc1d=await _0x10ee1c(_0x2f9b30);Object['assign'](_0x1c96d3,_0x25dc1d);}catch{return Promise['reject'](new R(i(_0x3cf2a3,'AI_ERROR_GET_HEADERS')));}}return _0x1c96d3;}async['_prepareRequestParameters'](_0x1eab69,_0x697b95){const _0x57d97c=this['editor']['locale'];if('object'==typeof _0x1eab69)return _0x1eab69;try{return await _0x1eab69(_0x697b95);}catch{return Promise['reject'](new R(i(_0x57d97c,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x21c86f){super(_0x21c86f),_0x21c86f['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x21c86f['config']['get']('ai.openAI.requestParameters')||_0x21c86f['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x21c86f['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x21c86f['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x21c86f['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x1c03b8,context:_0x18b7b3,onData:_0x26899a,actionId:_0x4a3b12}){const _0x299537=this['editor']['locale'],_0x49d2f3=await this['prepareMessages'](_0x1c03b8,_0x18b7b3,_0x4a3b12),_0x499ef7=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x4a3b12),_0x3d4bc0=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4a3b12),_0x12f0ac={'messages':_0x49d2f3,..._0x3d4bc0},_0x853da3={'method':'POST','headers':_0x499ef7,'body':JSON['stringify'](_0x12f0ac),'signal':this['abortController']['signal']},_0x5acafb=await fetch(this['_apiUrl'],_0x853da3);if(_0x5acafb['ok'])return _0x3d4bc0['stream']?await this['_readStreamableResponse'](_0x5acafb,_0x26899a):await this['_readStaticResponse'](_0x5acafb,_0x26899a),Promise['resolve']();{const _0x5b32a7=await _0x5acafb['text']();return _0x5b32a7['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x299537,'AI_ERROR_CONTEXT_LENGTH'))):_0x5b32a7['includes']('Moderation')?Promise['reject'](new R(i(_0x299537,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x5b32a7));}}async['prepareMessages'](_0x181537,_0x11319a,_0x384deb){let _0x33b3f5,_0x5e0966;return _0x11319a?(_0x33b3f5='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.',_0x5e0966='Instruction:\x0a'+_0x181537+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x11319a):(_0x33b3f5='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.',_0x5e0966=_0x181537),[{'role':'system','content':_0x33b3f5},{'role':'user','content':_0x5e0966}];}async['_readStreamableResponse'](_0x1f34bd,_0x323a4a){const _0x5bf25e=_0x1f34bd['body']['getReader'](),_0x5ace77=new TextDecoder();let _0x5d077f='',_0x3ba6dc='',_0x95feb9='',_0x4ffbd3=!0x1;for(;!_0x4ffbd3;){const {done:_0x4530a4,value:_0x26fe58}=await _0x5bf25e['read'](),_0x181db6=_0x5d077f+_0x5ace77['decode'](_0x26fe58);let _0x483a56='';_0x4ffbd3=_0x4530a4;try{_0x483a56=this['_cleanUpData'](_0x181db6),_0x5d077f='';}catch{_0x5d077f=_0x181db6;continue;}_0x3ba6dc+=_0x483a56,!_0x4ffbd3&&this['_isBufferIncomplete'](_0x3ba6dc)||_0x3ba6dc&&(_0x95feb9+=_0x3ba6dc,_0x3ba6dc='',_0x323a4a(_0x95feb9));}return Promise['resolve']();}async['_readStaticResponse'](_0x3145ea,_0x1a2216){return _0x1a2216((await _0x3145ea['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x32ed94){const _0x345283=_0x32ed94['split']('<')['length']!==_0x32ed94['split']('>')['length'],_0x306ad8=_0x32ed94['length']<0x1e;return _0x345283&&_0x306ad8;}['_cleanUpData'](_0xcb6195){return _0xcb6195['split'](/\n(?![^{]*\})/g)['map'](_0x52c012=>_0x52c012['replace']('data:\x20',''))['filter'](_0x2e6c10=>_0x2e6c10&&_0x2e6c10['length']>0x0&&'[DONE]'!==_0x2e6c10)['map'](_0x13e1ed=>{const {choices:_0x22aaf4}=JSON['parse'](_0x13e1ed);if(_0x22aaf4[0x0]?.['delta']?.['content'])return _0x22aaf4[0x0]['delta']['content'];})['filter'](_0x2b9f18=>_0x2b9f18)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x50dc42){super(_0x50dc42),_0x50dc42['config']['get']('ai.aws.requestParameters')||_0x50dc42['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']=_0x50dc42['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x50dc42['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x50dc42['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x50dc42['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x3e6c04,context:_0x5cb296,onData:_0x8540e4,actionId:_0x5706fa}){const {model:_0x17006d,stream:_0x51e1fe,..._0x5e0096}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x5706fa),_0x1b4140={'prompt':await this['preparePrompt'](_0x3e6c04,_0x5cb296,_0x17006d,_0x5706fa),..._0x5e0096};this['_apiUrl']?await this['_processProxyRequest'](_0x1b4140,_0x17006d,_0x51e1fe,_0x8540e4,_0x5706fa):await this['_processAWSRequest'](_0x1b4140,_0x17006d,_0x51e1fe,_0x8540e4);}async['preparePrompt'](_0x127eff,_0x424e05,_0x167d22,_0x49b511){let _0x5e5afa,_0x392708;return _0x424e05?(_0x5e5afa='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.',_0x392708='Instruction:\x0a'+_0x127eff+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x424e05):(_0x5e5afa='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.',_0x392708=_0x127eff),'meta.llama'==this['getModelFamily'](_0x167d22)?'<<SYS>>\x0a'+_0x5e5afa+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x392708+'\x0a[/INST]':'Human:\x0a'+_0x5e5afa+'\x0a'+_0x392708+'\x0a\x0aAssistant:';}['getModelFamily'](_0xc7b1fe){if(/^anthropic\.claude/['test'](_0xc7b1fe))return'anthropic.claude';if(/^ai21\.j2/['test'](_0xc7b1fe))return'ai21.j2';if(/^cohere\.command/['test'](_0xc7b1fe))return'cohere.command';if(/^meta\.llama/['test'](_0xc7b1fe))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0xc7b1fe));}async['_processProxyRequest'](_0x57b788,_0x592113,_0x3542ce,_0x2c285a,_0xc60aba){const _0x27e98f={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0xc60aba),'body':JSON['stringify']({..._0x57b788,'model':_0x592113,'stream':_0x3542ce}),'signal':this['abortController']['signal']},_0x513027=await fetch(this['_apiUrl'],_0x27e98f);_0x3542ce?await this['_readStreamableResponse'](_0x513027,_0x592113,_0x2c285a):await this['_readStaticResponse'](_0x513027,_0x592113,_0x2c285a);}async['_processAWSRequest'](_0x5bb951,_0x4da80d,_0x5800e6,_0x10323c){const _0x39e75b=new _0x541bb0(this['_bedrockClientConfig']),_0x4f3980={'body':JSON['stringify'](_0x5bb951),'contentType':'application/json','accept':'application/json','modelId':_0x4da80d};let _0x163ab7;if(_0x5800e6){const _0x587ae0=new _0xf413eb(_0x4f3980);_0x163ab7=await _0x39e75b['send'](_0x587ae0,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x163ab7,_0x4da80d,_0x10323c);}else{const _0xf65e90=new _0x1f1126(_0x4f3980);_0x163ab7=await _0x39e75b['send'](_0xf65e90,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x163ab7,_0x4da80d,_0x10323c);}}async['_readAsyncIterableResponse'](_0xd237e7,_0x56da0b,_0x5bc15d){const _0x213e08=_0xd237e7['body'],_0x5c8003=new TextDecoder('utf-8');let _0x5777e2='';for await(const _0x3a2aa0 of _0x213e08)if(_0x3a2aa0['chunk']){const _0x285196=_0x5c8003['decode'](_0x3a2aa0['chunk']['bytes']),_0x12102b=JSON['parse'](_0x285196);_0x5777e2+=this['_getGeneratedText'](_0x12102b,_0x56da0b),_0x5bc15d(_0x5777e2);}return Promise['resolve']();}async['_readStreamableResponse'](_0xfdbea3,_0x3e1d78,_0x5a5b4c){const _0xabc20d=_0xfdbea3['body'],_0x53bc8f=new TextDecoder('utf-8'),_0x228b23=_0xabc20d['getReader']();let _0x3cdecd='',_0x30d3fb='',_0x5b20e4=!0x1;for(;!_0x5b20e4;){const {done:_0x509053,value:_0x14078c}=await _0x228b23['read']();if(_0x5b20e4=_0x509053,_0x5b20e4)break;const _0x345cbb=(_0x3cdecd+_0x53bc8f['decode'](_0x14078c))['split']('\x0a')['map'](_0x231390=>{try{return _0x3cdecd='',JSON['parse'](_0x231390);}catch{return _0x3cdecd=_0x231390,null;}})['filter'](_0x35af97=>null!==_0x35af97);_0x345cbb['length']&&(_0x30d3fb+=_0x345cbb['map'](_0x30df60=>this['_getGeneratedText'](_0x30df60,_0x3e1d78))['join'](''),_0x5a5b4c(_0x30d3fb));}return Promise['resolve']();}async['_readStaticResponse'](_0x12138c,_0x5104be,_0x338bdd){let _0x5c74dc;return _0x5c74dc=_0x12138c instanceof Response?await _0x12138c['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x12138c['body'])),(_0x338bdd(this['_getGeneratedText'](_0x5c74dc,_0x5104be)),Promise['resolve']());}['_getGeneratedText'](_0x343dc4,_0x1ac654){switch(this['getModelFamily'](_0x1ac654)){case'anthropic.claude':return _0x343dc4['completion'];case'ai21.j2':return _0x343dc4['completions'][0x0]['data']['text'];case'cohere.command':return _0x343dc4['generations'][0x0]['text'];case'meta.llama':return _0x343dc4['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x227ef4=>0x1!=_0x227ef4}};
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':_0x5315d0=>0x1!=_0x5315d0}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x42b884=>{const {af:{dictionary:_0x56e2d5,getPluralForm:_0x5ce0ad}}={'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':_0x53ed2f=>0x1!=_0x53ed2f}};_0x42b884['af']||={'dictionary':{},'getPluralForm':null},_0x42b884['af']['dictionary']=Object['assign'](_0x42b884['af']['dictionary'],_0x56e2d5),_0x42b884['af']['getPluralForm']=_0x5ce0ad;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x2f72a8=>{const {af:{dictionary:_0x12e372,getPluralForm:_0x108806}}={'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':_0x194407=>0x1!=_0x194407}};_0x2f72a8['af']||={'dictionary':{},'getPluralForm':null},_0x2f72a8['af']['dictionary']=Object['assign'](_0x2f72a8['af']['dictionary'],_0x12e372),_0x2f72a8['af']['getPluralForm']=_0x108806;})(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':_0xbdb587=>0x0==_0xbdb587?0x0:0x1==_0xbdb587?0x1:0x2==_0xbdb587?0x2:_0xbdb587%0x64>=0x3&&_0xbdb587%0x64<=0xa?0x3:_0xbdb587%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':_0x439e5f=>0x0==_0x439e5f?0x0:0x1==_0x439e5f?0x1:0x2==_0x439e5f?0x2:_0x439e5f%0x64>=0x3&&_0x439e5f%0x64<=0xa?0x3:_0x439e5f%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x8fa686=>{const {ar:{dictionary:_0x4334f6,getPluralForm:_0x452460}}={'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':_0x1599a2=>0x0==_0x1599a2?0x0:0x1==_0x1599a2?0x1:0x2==_0x1599a2?0x2:_0x1599a2%0x64>=0x3&&_0x1599a2%0x64<=0xa?0x3:_0x1599a2%0x64>=0xb?0x4:0x5}};_0x8fa686['ar']||={'dictionary':{},'getPluralForm':null},_0x8fa686['ar']['dictionary']=Object['assign'](_0x8fa686['ar']['dictionary'],_0x4334f6),_0x8fa686['ar']['getPluralForm']=_0x452460;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x2bf3e4=>{const {ar:{dictionary:_0x3f904e,getPluralForm:_0xb2acab}}={'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':_0x247feb=>0x0==_0x247feb?0x0:0x1==_0x247feb?0x1:0x2==_0x247feb?0x2:_0x247feb%0x64>=0x3&&_0x247feb%0x64<=0xa?0x3:_0x247feb%0x64>=0xb?0x4:0x5}};_0x2bf3e4['ar']||={'dictionary':{},'getPluralForm':null},_0x2bf3e4['ar']['dictionary']=Object['assign'](_0x2bf3e4['ar']['dictionary'],_0x3f904e),_0x2bf3e4['ar']['getPluralForm']=_0xb2acab;})(window['CKEDITOR_TRANSLATIONS']||={});