@ckeditor/ckeditor5-ai 46.1.0-alpha.1 → 46.1.0-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 _0x443adc,Command as _0x1685d3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x2737fc,IconCheck as _0x26aec3,IconError as _0x3cc690,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x5e1e0e,IconRobotPencil as _0x196726}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x184693,CKEditorError as _0x1adb01,ObservableMixin as _0x5f4525,global as _0x56076d,isVisible as _0x11c64c,Rect as _0x558749,Collection as _0x32d571,FocusTracker as et,KeystrokeHandler as rt,first as _0x2dfd84}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x4967ca,View as _0x8e7cbe,SpinnerView as _0x5f0dd3,IconView as _0x5d9c88,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x3a4118,createDropdown as _0x5b544d,addMenuToDropdown as _0xfc202c,MenuBarMenuView as _0x5b79ba,MenuBarMenuListItemButtonView as _0x1af9c7,DialogViewPosition as _0x5772d5,MenuBarMenuListView as _0x5614ca,MenuBarMenuListItemView as _0x3c4287}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x4e14ed,ClipboardMarkersUtils as _0x19a578}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x1c58fc,ViewDataTransfer as _0x35f253,ViewUpcastWriter as _0x3099c0,Matcher as _0x583335}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x412014,InvokeModelWithResponseStreamCommand as _0x37a045,InvokeModelCommand as _0x4d7356}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x24dd4f,_0x5480b0){const _0x23ad82=(0x0,_0x5480b0['t'])('Other');return _0x24dd4f['length']?'groupId'in _0x24dd4f[0x0]?_0x24dd4f:[{'groupId':K,'groupLabel':_0x23ad82,'order':0x1/0x0,'commands':_0x24dd4f}]:[{'groupId':K,'groupLabel':_0x23ad82,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x443adc{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3d5064}=this,_0x370969=['ck-fake-ai-selection'];_0x3d5064['config']['get']('ai.useTheme')&&_0x370969['push']('ck-ai-assistant-ui_theme'),_0x3d5064['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x370969,'priority':0xc}}),_0x3d5064['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x747251,{writer:_0x572394})=>{if(!_0x747251['markerRange']['isCollapsed'])return null;const _0x3dfb96=_0x572394['createUIElement']('span');return _0x572394['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x3dfb96),_0x3dfb96;}});}['afterInit'](){!async function(_0x1b7ee6){const _0x19deca=_0x1c0490([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]),_0x219175=0x3dffc4e1,_0x5469af=0x3df8b601^_0x219175,_0xe43d15=window[_0x1c0490([0x44,0x61,0x74,0x65])][_0x1c0490([0x6e,0x6f,0x77])](),_0x369fba=_0x1b7ee6[_0x1c0490([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x74a3fc=new window[(_0x1c0490([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3dd5cd=>{_0x369fba[_0x1c0490([0x6f,0x6e,0x63,0x65])](_0x1c0490([0x72,0x65,0x61,0x64,0x79]),_0x3dd5cd);}),_0xae713b={[_0x1c0490([0x6b,0x74,0x79])]:_0x1c0490([0x45,0x43]),[_0x1c0490([0x75,0x73,0x65])]:_0x1c0490([0x73,0x69,0x67]),[_0x1c0490([0x63,0x72,0x76])]:_0x1c0490([0x50,0x2d,0x32,0x35,0x36]),[_0x1c0490([0x78])]:_0x1c0490([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]),[_0x1c0490([0x79])]:_0x1c0490([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]),[_0x1c0490([0x61,0x6c,0x67])]:_0x1c0490([0x45,0x53,0x32,0x35,0x36])},_0x8dbba=_0x369fba[_0x1c0490([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1c0490([0x67,0x65,0x74])](_0x1c0490([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x430051(){let _0x3bf174,_0x23f828=null,_0x358b2b=null;try{if(_0x8dbba==_0x1c0490([0x47,0x50,0x4c]))return _0x1c0490([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3bf174=_0x42102b(),!_0x3bf174)return _0x1c0490([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3bf174[_0x1c0490([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x358b2b=_0x5ca8ae(_0x3bf174[_0x1c0490([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3bf174[_0x1c0490([0x6a,0x74,0x69])])),await _0x1aef01()?_0x531db2()?_0x50a906()?_0x1c0490([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xa2be79()?(_0x3bf174[_0x1c0490([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c0490([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x23f828=_0x567667(_0x1c0490([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3bf174[_0x1c0490([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c0490([0x74,0x72,0x69,0x61,0x6c])&&(_0x23f828=_0x567667(_0x1c0490([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5df6b5()):_0x1c0490([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1c0490([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1c0490([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1c0490([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x50a906(){const _0xc7b204=[_0x1c0490([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1c0490([0x74,0x72,0x69,0x61,0x6c])][_0x1c0490([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bf174[_0x1c0490([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe43d15/0x3e8:0xe10*_0x5469af;return _0x3bf174[_0x1c0490([0x65,0x78,0x70])]<_0xc7b204;}function _0x531db2(){const _0x3edf3d=_0x3bf174[_0x1c0490([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3edf3d&&(!!_0x3edf3d[_0x1c0490([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c0490([0x2a]))||!!_0x3edf3d[_0x1c0490([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c0490([0x41,0x49])));}function _0xa2be79(){const _0x53b54b=_0x3bf174[_0x1c0490([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x53b54b||0x0==_0x53b54b[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x55216b}=new URL(window[_0x1c0490([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x53b54b[_0x1c0490([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55216b))return!0x0;const _0x3c5285=_0x55216b[_0x1c0490([0x73,0x70,0x6c,0x69,0x74])](_0x1c0490([0x2e]));return _0x53b54b[_0x1c0490([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xa13c64=>_0xa13c64[_0x1c0490([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c0490([0x2a])))[_0x1c0490([0x6d,0x61,0x70])](_0x19e0ee=>_0x19e0ee[_0x1c0490([0x73,0x70,0x6c,0x69,0x74])](_0x1c0490([0x2e])))[_0x1c0490([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3a0db9=>_0x3a0db9[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3c5285[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1c0490([0x6d,0x61,0x70])](_0x2284b8=>Array(_0x3c5285[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2284b8[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1c0490([0x66,0x69,0x6c,0x6c])](_0x2284b8[0x0]===_0x1c0490([0x2a])?_0x1c0490([0x2a]):'')[_0x1c0490([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2284b8))[_0x1c0490([0x73,0x6f,0x6d,0x65])](_0x1113ad=>_0x3c5285[_0x1c0490([0x65,0x76,0x65,0x72,0x79])]((_0x5cb321,_0x4cf704)=>_0x1113ad[_0x4cf704]===_0x5cb321||_0x1113ad[_0x4cf704]===_0x1c0490([0x2a])));}function _0x5df6b5(){return _0x23f828&&_0x358b2b?new window[(_0x1c0490([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42d9ff,_0x5942ff)=>{_0x23f828[_0x1c0490([0x74,0x68,0x65,0x6e])](_0x42d9ff,_0x5942ff),_0x358b2b[_0x1c0490([0x74,0x68,0x65,0x6e])](_0x4b8b10=>{_0x4b8b10!=_0x1c0490([0x56,0x61,0x6c,0x69,0x64])&&_0x42d9ff(_0x4b8b10);},_0x5942ff);}):_0x23f828||_0x358b2b||_0x1c0490([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5ca8ae(_0x1210be,_0x1c9afa){return new window[(_0x1c0490([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x491f3f=>{if(_0x10e639())return _0x491f3f(_0x1c0490([0x56,0x61,0x6c,0x69,0x64]));_0x414f5e(),_0x369fba[_0x1c0490([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1c0490([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1efa32=!0x1;const _0x522712=_0x184693();function _0x4ca9e1(_0xd1846f){return!!_0xd1846f&&(typeof _0xd1846f===_0x1c0490([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xd1846f===_0x1c0490([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xd1846f[_0x1c0490([0x74,0x68,0x65,0x6e])]===_0x1c0490([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xd1846f[_0x1c0490([0x63,0x61,0x74,0x63,0x68])]===_0x1c0490([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5cb2d8(_0x127eb9){_0x4f3cbd(_0x127eb9)[_0x1c0490([0x74,0x68,0x65,0x6e])](_0x195fb6=>{if(!_0x195fb6||_0x195fb6[_0x1c0490([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1c0490([0x6f,0x6b]))return _0x1c0490([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x52e6a3(_0x57f384(_0x522712+_0x1c9afa))!=_0x195fb6[_0x1c0490([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1c0490([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1c0490([0x56,0x61,0x6c,0x69,0x64]);})[_0x1c0490([0x74,0x68,0x65,0x6e])](_0x4bb8e9=>(_0x299b3f(),_0x4bb8e9),()=>{const _0x11ab77=_0x21a69b();return null==_0x11ab77?(_0x299b3f(),_0x1c0490([0x56,0x61,0x6c,0x69,0x64])):_0x1c0490(_0xe43d15-_0x11ab77>(0x19f340e1^_0x219175)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1c0490([0x74,0x68,0x65,0x6e])](_0x491f3f)[_0x1c0490([0x63,0x61,0x74,0x63,0x68])](()=>{_0x491f3f(_0x1c0490([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3ddec1=0x3dc92a61^_0x219175;function _0x299b3f(){const _0x19ac8c=_0x1c0490([0x6c,0x6c,0x63,0x74,0x2d])+_0x52e6a3(_0x57f384(_0x1210be)),_0x1fd009=_0x30542f(_0x52e6a3(window[_0x1c0490([0x4d,0x61,0x74,0x68])][_0x1c0490([0x63,0x65,0x69,0x6c])](_0xe43d15/_0x3ddec1)));window[_0x1c0490([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c0490([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x19ac8c,_0x1fd009);}function _0x21a69b(){const _0x21528f=_0x1c0490([0x6c,0x6c,0x63,0x74,0x2d])+_0x52e6a3(_0x57f384(_0x1210be)),_0x308c70=window[_0x1c0490([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c0490([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x21528f);return _0x308c70?window[_0x1c0490([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x30542f(_0x308c70),0x10)*_0x3ddec1:null;}function _0x4f3cbd(_0x397467){return new window[(_0x1c0490([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c5af9,_0x24d0b0)=>{_0x397467[_0x1c0490([0x74,0x68,0x65,0x6e])](_0x5c5af9,_0x24d0b0),window[_0x1c0490([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x24d0b0,0x3dfe1021^_0x219175);});}}_0x369fba[_0x1c0490([0x6f,0x6e])](_0x1c0490([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5487e1,_0x53e0cb)=>{if(_0x53e0cb[0x0]!=_0x1210be)return _0x491f3f(_0x1c0490([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x53e0cb[0x1]={..._0x53e0cb[0x1],[_0x1c0490([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x522712};},{[_0x1c0490([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c0490([0x68,0x69,0x67,0x68])}),_0x369fba[_0x1c0490([0x6f,0x6e])](_0x1c0490([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1200f5=>{_0x4ca9e1(_0x1200f5[_0x1c0490([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1efa32=!0x0,_0x5cb2d8(_0x1200f5[_0x1c0490([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1c0490([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c0490([0x6c,0x6f,0x77])}),_0x74a3fc[_0x1c0490([0x74,0x68,0x65,0x6e])](()=>{_0x1efa32||_0x491f3f(_0x1c0490([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x10e639(){return _0x369fba[_0x1c0490([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c0490([0x76,0x69,0x65,0x77])][_0x1c0490([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1c0490([0x61,0x75,0x74,0x6f]);}function _0x414f5e(){_0x369fba[_0x1c0490([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c0490([0x76,0x69,0x65,0x77])][_0x1c0490([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1c0490([0x61,0x75,0x74,0x6f]);}}function _0x567667(_0x306a1e){const _0x49b31b=[new window[(_0x1c0490([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x258203=>setTimeout(_0x258203,0x3df6fa2d^_0x219175)),_0x74a3fc[_0x1c0490([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1c0490([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc01316=>{let _0x3e8b2b=0x0;_0x369fba[_0x1c0490([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c0490([0x6f,0x6e])](_0x1c0490([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3e498e,_0x2e780a)=>{_0x2e780a[0x0][_0x1c0490([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3e8b2b++,_0x3e8b2b==(0x3dffc519^_0x219175)&&(_0xc01316(),_0x3e498e[_0x1c0490([0x6f,0x66,0x66])]());});}))];return window[_0x1c0490([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1c0490([0x72,0x61,0x63,0x65])](_0x49b31b)[_0x1c0490([0x74,0x68,0x65,0x6e])](()=>_0x306a1e);}async function _0x396666(){await _0x74a3fc,_0x369fba[_0x1c0490([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c0490([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x29b4d1,_0x369fba[_0x1c0490([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c0490([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x29b4d1,_0x369fba[_0x1c0490([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1c0490([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x49b81f(_0x20eebd){const _0x16e7a1=_0x25fe52();_0x369fba[_0x16e7a1]=_0x1c0490([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x20eebd,_0x20eebd!=_0x1c0490([0x56,0x61,0x6c,0x69,0x64])&&_0x396666();}function _0x25fe52(){const _0x344119=window[_0x1c0490([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1c0490([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1c0490([0x6e,0x6f,0x77])]())[_0x1c0490([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1c0490([0x2e]),'');let _0x176755=_0x1c0490([0x6e]);for(let _0x1c8439=0x0;_0x1c8439<_0x344119[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c8439+=0x2){let _0x48f04f=window[_0x1c0490([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x344119[_0x1c0490([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1c8439,_0x1c8439+0x2));_0x48f04f>=_0x19deca[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x48f04f-=_0x19deca[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x176755+=_0x19deca[_0x48f04f];}return _0x176755;}function _0x42102b(){const _0x89c537=_0x8dbba[_0x1c0490([0x73,0x70,0x6c,0x69,0x74])](_0x1c0490([0x2e]));if(0x3!=_0x89c537[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2c14b4(_0x89c537[0x1]);function _0x2c14b4(_0x38915d){const _0x3aa6b5=_0x26bf34(_0x38915d);return _0x3aa6b5&&_0x58be79()?_0x3aa6b5:null;function _0x58be79(){const _0x22dc79=_0x3aa6b5[_0x1c0490([0x6a,0x74,0x69])],_0x3177d8=window[_0x1c0490([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x22dc79[_0x1c0490([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x22dc79[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3a81b6={..._0x3aa6b5,[_0x1c0490([0x6a,0x74,0x69])]:_0x22dc79[_0x1c0490([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x22dc79[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3a81b6[_0x1c0490([0x76,0x63])],_0x57f384(_0x3a81b6)==_0x3177d8;}}}async function _0x1aef01(){let _0x3e5c4a=!0x0;try{const _0x867305=_0x8dbba[_0x1c0490([0x73,0x70,0x6c,0x69,0x74])](_0x1c0490([0x2e])),[_0x27654e,_0x2e86a4,_0x39b6fb]=_0x867305;return _0x43635b(_0x27654e),await _0x35e530(_0x27654e,_0x2e86a4,_0x39b6fb),_0x3e5c4a;}catch{return!0x1;}function _0x43635b(_0x2fee01){const _0x5e89ce=_0x26bf34(_0x2fee01);_0x5e89ce&&_0x5e89ce[_0x1c0490([0x61,0x6c,0x67])]==_0x1c0490([0x45,0x53,0x32,0x35,0x36])||(_0x3e5c4a=!0x1);}async function _0x35e530(_0x3a60c9,_0x38b071,_0x254c0a){const _0x13f659=window[_0x1c0490([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1c0490([0x66,0x72,0x6f,0x6d])](_0x1a0640(_0x254c0a),_0xd29faa=>_0xd29faa[_0x1c0490([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x42be86=new window[(_0x1c0490([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1c0490([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3a60c9+_0x1c0490([0x2e])+_0x38b071),_0x257a29=window[_0x1c0490([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1c0490([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x257a29)return;const _0x1c6a0a=await _0x257a29[_0x1c0490([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1c0490([0x6a,0x77,0x6b]),_0xae713b,{[_0x1c0490([0x6e,0x61,0x6d,0x65])]:_0x1c0490([0x45,0x43,0x44,0x53,0x41]),[_0x1c0490([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1c0490([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1c0490([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x257a29[_0x1c0490([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1c0490([0x6e,0x61,0x6d,0x65])]:_0x1c0490([0x45,0x43,0x44,0x53,0x41]),[_0x1c0490([0x68,0x61,0x73,0x68])]:{[_0x1c0490([0x6e,0x61,0x6d,0x65])]:_0x1c0490([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1c6a0a,_0x13f659,_0x42be86)||(_0x3e5c4a=!0x1);}}function _0x26bf34(_0x561bd8){return _0x561bd8[_0x1c0490([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1c0490([0x65,0x79]))?JSON[_0x1c0490([0x70,0x61,0x72,0x73,0x65])](_0x1a0640(_0x561bd8)):null;}function _0x1a0640(_0x258dc9){return window[_0x1c0490([0x61,0x74,0x6f,0x62])](_0x258dc9[_0x1c0490([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1c0490([0x2b]))[_0x1c0490([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1c0490([0x2f])));}function _0x57f384(_0x3e32fc){let _0x8140e1=0x1505;function _0xfd469d(_0x3536e3){for(let _0x8acaa4=0x0;_0x8acaa4<_0x3536e3[_0x1c0490([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x8acaa4++){const _0x12d45d=_0x3536e3[_0x1c0490([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x8acaa4);_0x8140e1=(_0x8140e1<<0x5)+_0x8140e1+_0x12d45d,_0x8140e1&=_0x8140e1;}}function _0x3f67e1(_0x8936f){Array[_0x1c0490([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x8936f)?_0x8936f[_0x1c0490([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3f67e1):_0x8936f&&typeof _0x8936f==_0x1c0490([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1c0490([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x8936f)[_0x1c0490([0x73,0x6f,0x72,0x74])]()[_0x1c0490([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2aece3,_0x1bc7cf])=>{_0xfd469d(_0x2aece3),_0x3f67e1(_0x1bc7cf);}):_0xfd469d(window[_0x1c0490([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x8936f));}return _0x3f67e1(_0x3e32fc),_0x8140e1>>>0x0;}function _0x52e6a3(_0x4c7cdf){return _0x4c7cdf[_0x1c0490([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1c0490([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1c0490([0x30]));}function _0x30542f(_0xb19417){return _0xb19417[_0x1c0490([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1c0490([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1c0490([0x6a,0x6f,0x69,0x6e])]('');}function _0x29b4d1(){}function _0x1c0490(_0x185ac0){return _0x185ac0['map'](_0x408315=>String['fromCharCode'](_0x408315))['join']('');}_0x49b81f(await _0x430051());}(this);}['showFakeVisualSelection'](){const _0x480e58=this['editor']['model'];_0x480e58['change'](_0xb4fbb8=>{const _0x2ceda5=_0x480e58['document']['selection']['getRanges']();let _0x34df51=0x0;for(const _0x349b28 of _0x2ceda5){const _0x49772a=w+':'+_0x34df51;if(_0x480e58['markers']['has'](_0x49772a))_0xb4fbb8['updateMarker'](_0x49772a,{'range':_0x349b28});else{if(_0x349b28['start']['isAtEnd']){const _0x128dcc=_0x349b28['start']['getLastMatchingPosition'](({item:_0x3ba42b})=>!_0x480e58['schema']['isContent'](_0x3ba42b),{'boundaries':_0x349b28});_0xb4fbb8['addMarker'](_0x49772a,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xb4fbb8['createRange'](_0x128dcc,_0x349b28['end'])});}else _0xb4fbb8['addMarker'](_0x49772a,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x349b28});}_0x34df51++;}});}['hideFakeVisualSelection'](){const _0x51eb4b=this['editor']['model'],_0x432d8e=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x432d8e['length']&&_0x51eb4b['change'](_0x2972da=>{_0x432d8e['forEach'](_0x10393f=>{_0x2972da['removeMarker'](_0x10393f);});});}['insertContent'](_0x5a04d9,_0x4960d9){const _0x5c7e32=this['_getAISelection'](),_0x346a44=_0x4960d9||_0x5c7e32['getFirstRange']();this['editor']['model']['canEditAt'](_0x346a44)&&this['editor']['model']['change'](_0x5a93f7=>{this['hideFakeVisualSelection'](),_0x4960d9||this['_resetContentOfSelectedTableCells'](_0x5a93f7,_0x5c7e32),this['_pasteHTMLUsingClipboard']({'insertAt':_0x346a44,'writer':_0x5a93f7,'html':_0x5a04d9});});}['insertContentBelow'](_0x2b75cf){const {model:_0x5e9ed0}=this['editor'],_0x5bd32d=this['_getAISelection']();_0x5e9ed0['change'](()=>{const _0x35e795=this['_prepareTableInsertBelowPosition'](_0x2b75cf,_0x5bd32d)||this['_getDefaultInsertBelowPosition'](_0x5bd32d);this['insertContent'](_0x2b75cf,_0x35e795);});}['_getAISelection'](){const _0x503f68=this['editor']['model'],_0x268915=Array['from'](_0x503f68['markers']['getMarkersGroup'](w))['map'](_0x55d09a=>_0x55d09a['getRange']());return _0x503f68['createSelection'](_0x268915);}['_pasteHTMLUsingClipboard']({writer:_0x1c2b18,html:_0x58bceb,insertAt:_0x27e2cd}){const {view:_0x41a81d}=this['editor']['editing'],_0x393fa=this['editor']['plugins']['get'](_0x4e14ed),_0x350934=new gt();_0x350934['setData']('text/html',_0x58bceb);const _0x28a82b=new ClipboardEvent('paste',{'clipboardData':_0x350934}),_0x2420e0=new _0x1c58fc(_0x41a81d,_0x28a82b,{'dataTransfer':new _0x35f253(_0x350934)});_0x1c2b18['setSelection'](_0x27e2cd);const _0x2380b3=(_0x208e66,_0x4099fd)=>{_0x4099fd['resultRange']&&_0x1c2b18['setSelection'](_0x4099fd['resultRange']);};_0x393fa['once']('contentInsertion',_0x2380b3,{'priority':'lowest'}),_0x41a81d['document']['fire']('paste',_0x2420e0),_0x393fa['off']('contentInsertion',_0x2380b3);}['_getDefaultInsertBelowPosition'](_0x40af2d){const {model:_0x43557c}=this['editor'],_0x35b947=Array['from'](_0x40af2d['getSelectedBlocks']());return _0x35b947['length']?_0x43557c['createPositionAfter'](_0x35b947['pop']()):_0x40af2d['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x7aaece,_0x5d829a){const {model:_0x5ebd48,plugins:_0x2bd516}=this['editor'];if(_0x2bd516['has']('TableUtils')){const _0x4f36f2=_0x2bd516['get']('TableUtils')['getSelectedTableCells'](_0x5d829a);if(_0x4f36f2['length']){const _0x1a6e71=this['_getTableRowCountFromContent'](_0x7aaece),_0x384f36=this['_createEmptyTableRows'](_0x4f36f2,_0x1a6e71);return _0x5ebd48['createPositionAt'](_0x384f36,0x0);}}return null;}['_getTableRowCountFromContent'](_0x2bee5a){const _0x672158=this['editor']['plugins']['get']('TableUtils'),_0x4cbeb8=this['editor']['data']['parse'](_0x2bee5a),_0x234c1c=Array['from'](_0x4cbeb8['getChildren']())['filter'](_0x4efbcb=>_0x4efbcb['is']('element','table'));let _0x261ee0=0x0;return _0x234c1c['forEach'](_0x23be3f=>{_0x261ee0+=_0x672158['getRows'](_0x23be3f);}),_0x261ee0;}['_createEmptyTableRows'](_0x2cdd8d,_0x16a06e){const _0xb6ae67=this['editor']['plugins']['get']('TableUtils'),_0x2247c2=_0xb6ae67['getRowIndexes'](_0x2cdd8d),_0x28a826=_0xb6ae67['getColumnIndexes'](_0x2cdd8d),_0xd509da=_0x2247c2['last']+0x1,_0x535ec=_0x28a826['first'],_0x129521=_0x2cdd8d[0x0]['findAncestor']('table');for(let _0xbb9b79=0x0;_0xbb9b79<_0x16a06e;_0xbb9b79++)_0xb6ae67['insertRows'](_0x129521,{'at':_0xd509da});return _0x129521['getChild'](_0xd509da)['getChild'](_0x535ec);}['_resetContentOfSelectedTableCells'](_0x20a57c,_0x1282cb){const {plugins:_0x3bedc6}=this['editor'],{model:_0x525fe9}=_0x20a57c;if(!_0x3bedc6['has']('TableUtils'))return;_0x3bedc6['get']('TableUtils')['getSelectedTableCells'](_0x1282cb)['length']&&_0x525fe9['deleteContent'](_0x1282cb);}}class x extends _0x443adc{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x1adb01('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x1947cb){super(_0x1947cb),this['name']='AIRequestError';}}function i(_0x221b51,_0x46a3da,_0x52ad09){const t=_0x221b51['t'];switch(_0x46a3da){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',_0x52ad09);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x52ad09);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'},_0x52ad09);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 _0x46a3da;}}class E extends _0x1685d3{['_commandDefinitions'];constructor(_0x57075e,_0x5b491d){super(_0x57075e),this['_commandDefinitions']=_0x5b491d,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x1df140,_0x4e35fe,_0x3aa072)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x3aa072));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x32af74,_0x4c58f3,_0x234b55)=>{this['enabledCommandsIds']=_0x234b55?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x32f44c=this['editor']['model'];this['_hasContext']=function(_0x4ad463){const _0x40b218=_0x4ad463['document']['selection'];return _0x40b218['isCollapsed']?0x0!==[..._0x40b218['getSelectedBlocks']()]['length']&&![..._0x40b218['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x4ad463['hasContent'](_0x40b218['getFirstRange']());}(_0x32f44c);const _0x158e4b=_0x32f44c['document']['selection'],_0x54b61c=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x23f466 of _0x158e4b['getRanges']())for(const _0x5b9131 of _0x23f466['getItems']())if(_0x5b9131['is']('element')&&_0x54b61c['includes'](_0x5b9131['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x452a53='',_0xc48f87='',_0x435e78='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x452a53,_0xc48f87,_0x435e78);}}function F(_0x87778e,_0x4bc6bc){const _0x8adb82=new Set();for(const _0x486eab of _0x87778e['values']())(_0x4bc6bc||!0x1===_0x486eab['requiresContent'])&&_0x8adb82['add'](_0x486eab['id']);return Array['from'](_0x8adb82);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
- _0x5f4525(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0xdf5914,_0x32b172,_0x12b2d8){super(),this['editor']=_0xdf5914,this['textAdapter']=_0x32b172,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x12b2d8,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x2cd3b3,_0x1169ae,_0x4289b9)=>{this['view']['value']=this['_sanitizeHTML'](_0x4289b9);}),this['listenTo'](this['view'],'submitPrompt',(_0x467cfa,_0xaa4328)=>{const _0x3172f6=this['currentContext']||this['initialContext'];this['_handleQuery'](_0xaa4328,_0x3172f6,'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:_0x39aef9,query:_0x3cec44,htmlContent:_0x5cba64,label:_0x27eea0,mainActionLabel:_0x465a91}){this['view']['prompt']=_0x27eea0,this['view']['mainAction']=_0x465a91,this['initialContext']=_0x5cba64,_0x3cec44&&(this['view']['isRendered']?this['_handleQuery'](_0x3cec44,_0x5cba64,_0x39aef9,_0x27eea0):this['view']['once']('render',()=>{this['_handleQuery'](_0x3cec44,_0x5cba64,_0x39aef9,_0x27eea0);}));}['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'](_0x5f4f6f,_0x61278e,_0x5baf4d,_0x36e679){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x61278e,this['previousQuery']=_0x5f4f6f,this['previousLabel']=_0x36e679||_0x5f4f6f,this['previousActionId']=_0x5baf4d,new Promise(_0x39d127=>{this['textAdapter']['makeRequest']({'query':_0x5f4f6f,'context':_0x61278e,'onData':_0x233dc5=>{this['currentResponse']=_0x233dc5,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x5baf4d})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x3581e5=>{_0x3581e5 instanceof R?this['view']['handleError'](_0x3581e5['message']):this['view']['handleError'](),_0x39d127();})['finally'](()=>{this['stopProcessing'](),_0x39d127();});});}['_parseAndNormalizeContent'](_0x3443a3,_0x5cc62c=!0x1){const _0x6496ba=Q['exec'](_0x3443a3);_0x3443a3=_0x6496ba?_0x3443a3['substring'](_0x6496ba[0x1]['length']):_0x3443a3['length']<0x64&&!_0x5cc62c?'':this['_stripMarkdownSyntax'](_0x3443a3);const _0x5a1d1f=this['_domParser']['parseFromString'](_0x3443a3,'text/html');if(_0x6496ba){const _0x51d708=Array['from'](_0x5a1d1f['body']['childNodes']);_0x51d708['reverse']();for(const _0x32de25 of _0x51d708){if(_0x32de25['nodeType']==Node['ELEMENT_NODE'])break;_0x32de25['remove']();}}const _0xd585da=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x5a1d1f['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0xd585da);const _0x4febf6=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x316331=this['editor']['data']['toModel'](_0xd585da);return _0x4febf6||_0x316331['markers']['clear'](),this['editor']['data']['stringify'](_0x316331);}['_normalizeResponseHeadings'](_0x37c9bb){const _0x30f457=new _0x3099c0(this['editor']['editing']['view']['document']),_0x4d2e7b=new _0x583335({'name':/^h[1-5]$/}),_0x22c910=[];let _0x251fb7=!0x1;for(const _0x342736 of _0x37c9bb)_0x342736['is']('element')&&_0x4d2e7b['match'](_0x342736)&&(_0x22c910['push'](_0x342736),'h1'==_0x342736['name']&&(_0x251fb7=!0x0));if(_0x251fb7){for(const _0x42bd97 of _0x22c910)_0x30f457['rename']('h'+(parseInt(_0x42bd97['name'][0x1])+0x1),_0x42bd97);}}['_isH1TagSupportEnabled'](){const {data:_0x251163,editing:_0x3422ca}=this['editor'],_0x5c7c79=_0x251163['htmlProcessor']['toView']('<h1></h1>'),_0x3cb700=_0x251163['toView'](_0x251163['toModel'](_0x5c7c79));return!!_0x3422ca['view']['domConverter']['viewToDom'](_0x3cb700)['querySelector']('h1');}['_sanitizeHTML'](_0x1457d5){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x1457d5),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x13c9ab){const _0xe276c2=_0x13c9ab['trim']();return _0xe276c2['startsWith']('```html')?_0xe276c2['endsWith']('```')?_0xe276c2['substring'](0x7,_0xe276c2['length']-0x3):_0xe276c2['substring'](0x7):_0x13c9ab;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x14e7e5){super(_0x14e7e5),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x5155c4=>i(_0x14e7e5,'AI_'+_0x5155c4['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x14e7e5,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x14e7e5,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x14e7e5,'Stop'));const _0x35fc90=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x35fc90['if']('isVisible','ck-hidden',_0x554bea=>!_0x554bea)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x2f0053,_0x49cff5){const _0x49a3ba=new _0x4967ca(this['locale']);return _0x49a3ba['set']({'label':_0x2f0053,'class':_0x49cff5||'','isVisible':!0x0,'withText':!0x0}),_0x49a3ba;}}class ct extends _0x8e7cbe{['contentFieldView'];['copyButtonView'];constructor(_0x504635,_0x14b411=''){super(_0x504635),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1ea12e=this['bindTemplate'];this['contentFieldView']=new bt(_0x504635,_0x14b411),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x1ea12e['if']('isVisible','ck-hidden',_0x56e486=>!_0x56e486)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x1ea12e['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 _0x1dec3b=!0x1;this['on']('change:value',(_0x194e25,_0xbcb49d,_0x477306)=>{const _0x1e9daa=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x477306),this['isProcessing']&&_0x1e9daa&&!_0x1dec3b&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x28c267,_0x1ec478,_0x5e44f5)=>{_0x1dec3b=!0x1,_0x5e44f5?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x1dec3b=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x1dec3b=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x37a41d=this['locale'],_0x3a4f6d=new _0x4967ca(this['locale']),_0x347e53='ck-ai-form__copy-button';return _0x3a4f6d['set']({'label':i(_0x37a41d,'Copy'),'icon':_0x2737fc,'class':_0x347e53,'tooltip':!0x0}),_0x3a4f6d['bind']('isVisible')['to'](this,'value',_0x532f55=>!!_0x532f55),_0x3a4f6d['bind']('isEnabled')['to'](this,'isProcessing',_0x49a051=>!_0x49a051),_0x3a4f6d['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x3a4f6d['icon']=_0x26aec3,_0x3a4f6d['class']=_0x347e53+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x3a4f6d['icon']=_0x2737fc,_0x3a4f6d['class']=_0x347e53;},0x3e8);}),_0x3a4f6d;}['_copyHTMLToClipboard'](_0x4283d7){const {window:_0x1bfe24,document:_0x34d057}=_0x56076d;if(_0x1bfe24['ClipboardItem']){const {Blob:_0x2c0190,ClipboardItem:_0x1c6043}=_0x1bfe24,_0x33b1fc=[new _0x1c6043({'text/html':new _0x2c0190([_0x4283d7['innerHTML']],{'type':'text/html'}),'text/plain':new _0x2c0190([_0x4283d7['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x33b1fc);}else{const _0x37d888=_0x34d057['createElement']('div');_0x37d888['style']['position']='absolute',_0x37d888['style']['left']='-9999px',_0x37d888['innerHTML']='<span>[</span>'+_0x4283d7['innerHTML']+'<span>]</span>',_0x34d057['body']['appendChild'](_0x37d888);const _0x1360c2=_0x34d057['createRange']();_0x1360c2['setStartAfter'](_0x37d888['firstElementChild']),_0x1360c2['setEndBefore'](_0x37d888['lastElementChild']);const _0x3d1b8b=_0x1bfe24['getSelection']();_0x3d1b8b['removeAllRanges'](),_0x3d1b8b['addRange'](_0x1360c2),_0x34d057['execCommand']('copy'),_0x37d888['remove']();}}}class bt extends _0x8e7cbe{constructor(_0xedb7c6,_0x47ab32=''){super(_0xedb7c6),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x47ab32,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x27fba9){this['element']['innerHTML']=_0x27fba9;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x5cf391=new _0x8e7cbe(),_0x37885d=this['locale'],_0x1b0e9b=new _0x5f0dd3();return _0x1b0e9b['isVisible']=!0x0,_0x5cf391['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x1b0e9b,{'text':i(_0x37885d,'AI\x20is\x20writing...')}]}),_0x5cf391['render'](),_0x5cf391;}}class mt extends _0x8e7cbe{constructor(_0x253778,_0x523b56=''){super(_0x253778);const _0x7f6b8c=new _0x5d9c88(),_0x348ead=this['bindTemplate'];this['set']('text',_0x523b56),_0x7f6b8c['content']=_0x3cc690,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x7f6b8c,{'text':_0x348ead['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x14f3c6,_0x8371f1){super(_0x14f3c6,_0x8371f1),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',(_0x3c49ce,_0x4b938f)=>{_0x3c49ce['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x4b938f());});}['_createSubmitButton'](){const _0x1b8c50=new _0x4967ca(this['locale']),_0x283350=this['locale'];return _0x1b8c50['set']({'icon':it,'label':i(_0x283350,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x1b8c50['on']('execute',()=>{this['submit']();}),_0x1b8c50['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x3691de,_0x28b028)=>!_0x3691de&&_0x28b028),_0x1b8c50;}['_createShowHistoryButton'](){const _0x92bd8d=new _0x4967ca(this['locale']),_0x1488f2=this['resultsView'],_0x313c4b=this['locale'];_0x92bd8d['set']({'label':i(_0x313c4b,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x92bd8d['bind']('isOn')['to'](_0x1488f2,'isVisible'),_0x92bd8d['bind']('isEnabled')['to'](this,'isEnabled'),_0x92bd8d['on']('execute',()=>{_0x1488f2['isVisible']=!_0x1488f2['isVisible'],_0x1488f2['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x4a1a96=()=>{_0x56076d['window']['requestAnimationFrame'](()=>{if(_0x11c64c(this['element'])){const _0x412ee5=new _0x558749(this['queryView']['fieldView']['element']),_0x3c8bd6=_0x412ee5['width'],_0x497f16='rtl'===_0x313c4b['uiLanguageDirection']?'left':'right';_0x412ee5['excludeScrollbarsAndBorders'](),_0x92bd8d['element']['style'][_0x497f16]=_0x3c8bd6-_0x412ee5['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x4a1a96),this['on']('render',_0x4a1a96),_0x92bd8d;}['submit'](){const _0xb30341=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0xb30341);}['focus'](_0x4e10bd){-0x1===_0x4e10bd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x3696dd){super(_0x3696dd),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x3696dd,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x290110=0x0;for(const _0x4fedc5 of this['items'])_0x290110+=_0x4fedc5['items']['length'];return{'resultsCount':_0x290110,'totalItemsCount':_0x290110};}['_createClearHistoryButton'](){const _0x34e95f=this['locale'],_0xf7a0b2=new _0x4967ca(this['locale']);return _0xf7a0b2['set']({'label':'('+i(_0x34e95f,'Clear')+')','withText':!0x0}),_0xf7a0b2['on']('execute',()=>this['fire']('clearHistory')),_0xf7a0b2;}}class ut extends xt{constructor(_0x3a5394){super();const _0x444a3e=new wt(),_0x3a5936=new _0x4967ca(this['locale'],_0x444a3e);this['children']['add'](_0x3a5936),_0x3a5936['set']({'label':_0x3a5394['prompt'],'withText':!0x0}),_0x3a5936['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x3a5394['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x32d571{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x2295d3,_0x2784a4)=>{const _0xb225a7=os(_0x2784a4['prompt']);for(const _0x3faa7e of this)if(_0x3faa7e!=_0x2784a4&&os(_0x3faa7e['prompt'])===_0xb225a7){this['remove'](_0x3faa7e);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x45862f=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x45862f));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x289201=>_0x289201)));}}function os(_0x5bcfc6){return _0x5bcfc6['toLowerCase']()['trim']();}class k extends _0x8e7cbe{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x34cd00,_0x4f8941,_0x595f8a=''){super(_0x34cd00),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(_0x34cd00),this['contentArea']=new ct(_0x34cd00,_0x595f8a),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 _0xcb3096=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x4f8941],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0xcb3096['if']('isError','ck-hidden',_0x5d1957=>!_0x5d1957)]},'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'](_0x2e458e=0x1){-0x1===_0x2e458e?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 _0xcac38d=this['locale'],_0xf178a9=new lt(_0xcac38d,{'queryView':{'label':i(_0xcac38d,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0xcac38d,'Empty\x20history'),'secondary':i(_0xcac38d,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0xf178a9['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x554cb,_0x411ec2)=>_0x554cb&&!_0x411ec2),this['listenTo'](_0xf178a9,'submit',(_0x1a6783,_0x561bea)=>{this['prompt']=_0x561bea;const _0x202081=ft(_0x561bea);this['fire']('submitPrompt',_0x202081),_0x561bea['trim']()&&this['_promptHistory']['add']({'prompt':_0x202081},0x0);},{'priority':'high'}),_0xf178a9;}['_createHistoryView'](){const _0xacd64=new pt(this['locale']);return _0xacd64['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0xacd64['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0xacd64;}['_createToolbar'](){const _0x31ab4f=new at(this['locale']);return _0x31ab4f['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x302ebe,_0x4f785f,_0x4f7592)=>_0x302ebe&&!_0x4f785f&&!!_0x4f7592),_0x31ab4f['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x31ab4f['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0xeba25,_0x137817,_0x23f6a8)=>_0xeba25&&!_0x137817&&!!_0x23f6a8),_0x31ab4f['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x31ab4f['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x4f02e0,_0xff47d9)=>_0x4f02e0&&!_0xff47d9),_0x31ab4f['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x31ab4f['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x31ab4f['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x31ab4f;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x583446=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x583446,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x35ed32){const _0x44031d=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x35ed32||i(_0x44031d,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x443adc{['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[_0x19a578,a,x,_0x3a4118];}constructor(_0x1372ce){super(_0x1372ce),_0x1372ce['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x1372ce['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x1372ce['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x1372ce['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x4012e5}=this;this['_aiAdapter']=_0x4012e5['plugins']['get'](x),this['_dialog']=_0x4012e5['plugins']['get'](_0x3a4118),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x5617c6=new E(_0x4012e5,Array['from'](this['_commandDefinitions']['values']()));_0x4012e5['commands']['add']('showAIAssistant',_0x5617c6),_0x4012e5['ui']['componentFactory']['add']('aiCommands',_0x20728b=>{const _0x154aa0=_0x5b544d(_0x20728b);return _0x154aa0['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x154aa0['buttonView']['set']({'label':i(_0x20728b,'AI\x20Commands'),'icon':_0x5e1e0e,'tooltip':!0x0}),_0x154aa0['on']('execute',_0x4a2cd3=>this['_onExecute'](_0x4a2cd3['source']['id'])),_0xfc202c(_0x154aa0,_0x4012e5['ui']['view']['body'],function(_0x44c4a5){const _0x4d81f7=o(_0x44c4a5['config']['get']('ai.aiAssistant.commands'),_0x44c4a5['locale']),_0x55247f=U(_0x44c4a5,_0x4d81f7)['filter'](_0x3f0506=>_0x3f0506['commands']['length']);if(0x1===_0x55247f['length'])return U(_0x44c4a5,_0x55247f[0x0]['commands'])['map'](_0xacc8c5=>({'id':_0xacc8c5['id'],'label':_0xacc8c5['label']}));return _0x55247f['map'](_0x487f4f=>{const {groupId:_0x281632,groupLabel:_0x2d206d,commands:_0x581ade}=_0x487f4f,_0x1a2f5b=U(_0x44c4a5,_0x581ade)['map'](_0x1ecfe3=>({'id':_0x1ecfe3['id'],'label':_0x1ecfe3['label']}));return{'id':_0x281632,'menu':_0x2d206d||_0x281632,'children':_0x1a2f5b};});}(_0x4012e5),{'ariaLabel':i(_0x20728b,'AI\x20Commands')}),_0x154aa0['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x5617c6['on']('change:enabledCommandsIds',_0x4d67d6),_0x154aa0['menuView']['once']('render',_0x4d67d6),_0x154aa0;function _0x4d67d6(){_0x154aa0['isEnabled']=_0x5617c6['enabledCommandsIds']['length']>0x0;for(const _0xac71e0 of _0x154aa0['menuView']['buttons'])_0xac71e0['isEnabled']=_0x5617c6['enabledCommandsIds']['includes'](_0xac71e0['id']);}}),_0x4012e5['ui']['componentFactory']['add']('menuBar:aiCommands',_0x5239d2=>{const _0x9eecda=new _0x5b79ba(_0x5239d2);_0x9eecda['buttonView']['set']({'label':i(_0x5239d2,'AI\x20Commands'),'icon':_0x5e1e0e}),_0x9eecda['bind']('isEnabled')['to'](_0x5617c6,'enabledCommandsIds',_0x4185a5=>_0x4185a5['length']>0x0);const _0x327d27=o(_0x4012e5['config']['get']('ai.aiAssistant.commands'),_0x5239d2);return this['_populateMenuBarMenu'](_0x5617c6,_0x9eecda,_0x327d27,_0xead418=>this['_onExecute'](_0xead418)),_0x9eecda;}),_0x4012e5['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x29d6c4=this['_createAIAssistantUIButton'](_0x4967ca);return _0x29d6c4['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x29d6c4;}),_0x4012e5['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x423735=this['_createAIAssistantUIButton'](_0x1af9c7);return _0x423735['set']({'role':'menuitemcheckbox'}),_0x423735;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x22a7fc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x248e03;for(const _0x25c36b in _0x22a7fc){const _0x5badcb=_0x25c36b,_0x5129c5=_0x22a7fc[_0x5badcb];if('aiLicenseKeyValid'==_0x5129c5||'aiLicenseKeyInvalid'==_0x5129c5||'aiLicenseKeyExpired'==_0x5129c5||'aiLicenseKeyDomainLimit'==_0x5129c5||'aiLicenseKeyNotAllowed'==_0x5129c5||'aiLicenseKeyEvaluationLimit'==_0x5129c5||'aiLicenseKeyTrialLimit'==_0x5129c5||'aiLicenseKeyUsageLimit'==_0x5129c5){delete _0x22a7fc[_0x5badcb],_0x248e03=_0x5129c5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x248e03&&_0x22a7fc['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x248e03&&_0x22a7fc['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x248e03&&_0x22a7fc['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x248e03&&_0x22a7fc['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x248e03&&_0x22a7fc['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x248e03&&_0x22a7fc['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x248e03&&_0x22a7fc['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x522f1c='',_0x3000b2='',_0x533ca6='custom'){const _0x13db2f=this['editor'],_0x1bca4f=_0x13db2f['editing']['view'],_0x5eb06d=_0x13db2f['plugins']['get'](a),_0x418d62=_0x13db2f['plugins']['get'](_0x19a578);_0x5eb06d['showFakeVisualSelection']();const _0x29ea1d=new l(),_0x38e561=new ClipboardEvent('copy',{'clipboardData':_0x29ea1d}),_0x210889=new _0x35f253(_0x29ea1d),_0x30e2a4=new _0x1c58fc(_0x1bca4f,_0x38e561,{'dataTransfer':_0x210889});_0x418d62['_forceMarkersCopy']('comment',()=>{_0x1bca4f['document']['fire']('copy',_0x30e2a4);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x13db2f,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x20f649=_0x210889['getData']('text/html');const _0x4fd6a4=_0x13db2f['model']['document']['selection'],_0x4496fd=Array['from'](_0x4fd6a4['getRanges']());0x1===_0x4496fd['length']&&_0x4496fd[0x0]['isFlat']&&!_0x4fd6a4['getSelectedElement']()&&''!==_0x20f649['replace'](/&nbsp;/g,'')['trim']()&&(_0x20f649='<p>'+_0x20f649+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x533ca6,'query':_0x522f1c,'htmlContent':_0x20f649,'label':_0x3000b2,'mainActionLabel':_[_0x13db2f['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x196726,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x5772d5['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x5eb06d['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x23023f=new Map(),_0x55a9dd=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x23de4e of _0x55a9dd)for(const _0x4a44b3 of _0x23de4e['commands'])_0x23023f['set'](_0x4a44b3['id'],{..._0x4a44b3,'groupId':_0x23de4e['groupId'],'groupLabel':_0x23de4e['groupLabel']||_0x23de4e['groupId']});return _0x23023f;}['_createAIAssistantUIButton'](_0xb8b040){const _0x76b72c=this['editor'],_0x20a503=_0x76b72c['commands']['get']('showAIAssistant'),_0x5536ec=new _0xb8b040(_0x76b72c['locale']);return _0x5536ec['set']({'label':i(_0x76b72c['locale'],'AI\x20Assistant'),'icon':_0x196726,'isToggleable':!0x0}),_0x5536ec['bind']('isEnabled')['to'](_0x20a503),_0x5536ec['bind']('isOn')['to'](this['_dialog'],'id',_0x1780b4=>'aiAssistant'===_0x1780b4),this['listenTo'](_0x5536ec,'execute',()=>{_0x5536ec['isOn']?this['hideUI']():_0x20a503['execute']();}),_0x5536ec;}['_initView'](){const _0x40b153=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',()=>{_0x40b153['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x40b153['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x1283dd,ui:{ariaLiveAnnouncer:_0x4264a9}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0xd9c97b,_0x5698f4,_0xb73ddc)=>{const _0x3863f6=this['_aiAssistantController']['currentContext'];_0xb73ddc?_0x4264a9['announce'](i(_0x1283dd,'AI\x20is\x20writing')):_0x3863f6&&_0x4264a9['announce'](i(_0x1283dd,'Generated\x20content:\x20%0',_0x3863f6),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x5efee4,_0x166ba7,_0x438071)=>{if(_0x438071){const _0x6a788e=this['_formView']['errorView']['text'];_0x4264a9['announce'](i(_0x1283dd,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x6a788e));}});}['_onExecute'](_0x3f844a){const _0x434368=this['_commandDefinitions']['get'](_0x3f844a),_0x550b58=this['editor'],_0x565d13=_0x550b58['model']['document']['selection'],_0x111901=_0x550b58['commands']['get']('showAIAssistant'),_0x213254=_0x550b58['plugins']['get'](a),_0x4257e7=''+(_0x434368['groupId']!==K?_0x434368['groupLabel']+':\x20':'')+_0x434368['label'];if(!0x1!==_0x434368['requiresContent']&&_0x565d13['isCollapsed']){const _0x5ebba3=_0x2dfd84(_0x565d13['getSelectedBlocks']())||_0x550b58['model']['schema']['getLimitElement'](_0x565d13);_0x550b58['model']['change'](_0x4f46da=>{_0x4f46da['setSelection'](_0x5ebba3,'in');});}_0x213254['showFakeVisualSelection'](),_0x111901['execute'](_0x434368['prompt'],_0x4257e7,'command:'+_0x3f844a);}['_populateMenuBarMenu'](_0x13a00a,_0x386264,_0x387b2e,_0x17c021){const _0x54e913=this['editor'],_0xb44244=_0x54e913['locale'],_0x1ff460=new _0x5614ca(_0xb44244),_0xdb2e85=U(_0x54e913,_0x387b2e)['filter'](_0x27606a=>_0x27606a['commands']['length']);0x1===_0xdb2e85['length']?this['_getMenuBarGroupButtons']({'command':_0x13a00a,'commands':_0xdb2e85[0x0]['commands'],'parentMenuView':_0x386264,'onExecute':_0x17c021})['forEach'](_0x5f0390=>_0x1ff460['items']['add'](_0x5f0390)):_0xdb2e85['forEach'](({groupId:_0x5d07ec,groupLabel:_0x4f306a,commands:_0x5f395a})=>{const _0x4b92ae=new _0x3c4287(_0xb44244,_0x386264),_0x17bc65=new _0x5b79ba(_0xb44244),_0x3ee969=new _0x5614ca(_0xb44244),_0x3c1e19=this['_getMenuBarGroupButtons']({'command':_0x13a00a,'commands':_0x5f395a,'parentMenuView':_0x17bc65,'onExecute':_0x17c021});_0x17bc65['buttonView']['set']({'label':_0x4f306a||_0x5d07ec}),_0x17bc65['delegate']('execute')['to'](_0x386264),_0x3ee969['items']['addMany'](_0x3c1e19),_0x17bc65['panelView']['children']['add'](_0x3ee969),_0x4b92ae['children']['add'](_0x17bc65),_0x1ff460['items']['add'](_0x4b92ae);}),_0x386264['panelView']['children']['add'](_0x1ff460);}['_getMenuBarGroupButtons']({command:_0x1a1149,commands:_0x633848,parentMenuView:_0x75d915,onExecute:_0x5e5bf5}){const _0x4e27a9=this['editor'],_0x2ff5cd=_0x4e27a9['locale'];return U(_0x4e27a9,_0x633848)['map'](_0x1be444=>{const _0x369623=new _0x3c4287(_0x2ff5cd,_0x75d915),_0x41bbc2=new _0x1af9c7(_0x2ff5cd);return _0x41bbc2['set']({'label':_0x1be444['label']}),_0x41bbc2['delegate']('execute')['to'](_0x75d915),_0x41bbc2['on']('execute',()=>_0x5e5bf5(_0x1be444['id'])),_0x41bbc2['bind']('isEnabled')['to'](_0x1a1149,'enabledCommandsIds',_0x23f37d=>_0x23f37d['includes'](_0x1be444['id'])),_0x369623['children']['add'](_0x41bbc2),_0x369623;});}}function T(_0x529c1e,_0x5590df){return void 0x0!==_0x529c1e['order']&&void 0x0===_0x5590df['order']?0x1:void 0x0===_0x529c1e['order']&&void 0x0!==_0x5590df['order']?-0x1:void 0x0!==_0x529c1e['order']&&void 0x0!==_0x5590df['order']?_0x529c1e['order']-_0x5590df['order']:0x0;}function U(_0x3024a6,_0x11f3bc){_0x11f3bc['sort'](T);const _0xcba2bb={},_0x4ea957=[];for(const _0x27afa9 of _0x11f3bc)if(void 0x0!==_0x27afa9['order']){if(_0x27afa9['order']in _0xcba2bb)throw new _0x1adb01('ai-commands-config-order-collision',_0x3024a6,{'conflictingDefinitions':[_0x27afa9,_0xcba2bb[_0x27afa9['order']]]});_0xcba2bb[_0x27afa9['order']]=_0x27afa9,_0x4ea957['splice'](_0x27afa9['order'],0x0,_0x27afa9);}else _0x4ea957['push'](_0x27afa9);return _0x4ea957;}class At extends _0x443adc{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e1b82){super(_0x4e1b82);const _0x389ff7=_0x4e1b82['config'],_0x427aee=_0x4e1b82['locale'];_0x389ff7['define']('ai.aiAssistant.preserveComments',!0x0),_0x389ff7['define']('ai.aiAssistant.commands',_t(_0x427aee)),_0x389ff7['define']('ai.aiAssistant.extraCommandGroups',[]),_0x389ff7['define']('ai.aiAssistant.removeCommands',[]);let _0x565daa=o(_0x389ff7['get']('ai.aiAssistant.commands'),_0x427aee);const _0x1e147b=_0x389ff7['get']('ai.aiAssistant.extraCommandGroups'),_0x40b199=_0x389ff7['get']('ai.aiAssistant.removeCommands');_0x1e147b['forEach'](_0x3f43d4=>{const _0x5abc45=_0x565daa['find'](_0x248054=>_0x248054['groupId']===_0x3f43d4['groupId']);_0x5abc45?_0x5abc45['commands']=_0x5abc45['commands']['concat'](_0x3f43d4['commands']):_0x565daa['push'](_0x3f43d4);}),_0x565daa=_0x565daa['filter'](_0x5af0e8=>!_0x40b199['includes'](_0x5af0e8['groupId'])),_0x565daa['forEach'](_0x3816e2=>{_0x3816e2['commands']=_0x3816e2['commands']['filter'](_0x1a1a67=>!_0x40b199['includes'](_0x1a1a67['id']));}),_0x389ff7['set']('ai.aiAssistant.commands',_0x565daa);}}function _t(_0xed335e){return[{'groupId':'editOrReview','groupLabel':i(_0xed335e,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0xed335e,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0xed335e,'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(_0xed335e,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0xed335e,'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(_0xed335e,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0xed335e,'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(_0xed335e,'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(_0xed335e,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0xed335e,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0xed335e,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0xed335e,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0xed335e,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0xed335e,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0xed335e,'Change\x20style'),'commands':[{'id':'business','label':i(_0xed335e,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0xed335e,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0xed335e,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0xed335e,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0xed335e,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0xed335e,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0xed335e,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0xed335e,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0xed335e,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0xed335e,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0xed335e,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0xed335e,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0xed335e,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x443adc{['abortController'];static get['requires'](){return[x];}constructor(_0x231701){super(_0x231701),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'](_0x47bec1){return this['sendRequest'](_0x47bec1)['catch'](_0x5ca798=>{if(_0x5ca798 instanceof R)return Promise['reject'](_0x5ca798);if('AbortError'==_0x5ca798['name'])return Promise['resolve']();throw console['error'](_0x5ca798),new _0x1adb01('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x5742e2,_0x5f2c9a){const _0x457baf=this['editor']['locale'],_0x8170ed={'Content-Type':'application/json'};if('object'==typeof _0x5742e2)Object['assign'](_0x8170ed,_0x5742e2);else{if(_0x5742e2)try{const _0x447a4f=await _0x5742e2(_0x5f2c9a);Object['assign'](_0x8170ed,_0x447a4f);}catch{return Promise['reject'](new R(i(_0x457baf,'AI_ERROR_GET_HEADERS')));}}return _0x8170ed;}async['_prepareRequestParameters'](_0x26d38c,_0x1600c3){const _0x382a4c=this['editor']['locale'];if('object'==typeof _0x26d38c)return _0x26d38c;try{return await _0x26d38c(_0x1600c3);}catch{return Promise['reject'](new R(i(_0x382a4c,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x37affe){super(_0x37affe),_0x37affe['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x37affe['config']['get']('ai.openAI.requestParameters')||_0x37affe['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x37affe['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x37affe['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x37affe['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x1d4f9f,context:_0x3d3071,onData:_0x1e78a3,actionId:_0x731f71}){const _0x153889=this['editor']['locale'],_0x42c737=await this['prepareMessages'](_0x1d4f9f,_0x3d3071,_0x731f71),_0x467050=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x731f71),_0x4b9213=await this['_prepareRequestParameters'](this['_requestParameters'],_0x731f71),_0x26ecce={'messages':_0x42c737,..._0x4b9213},_0x59ca3d={'method':'POST','headers':_0x467050,'body':JSON['stringify'](_0x26ecce),'signal':this['abortController']['signal']},_0x2108a3=await fetch(this['_apiUrl'],_0x59ca3d);if(_0x2108a3['ok'])return _0x4b9213['stream']?await this['_readStreamableResponse'](_0x2108a3,_0x1e78a3):await this['_readStaticResponse'](_0x2108a3,_0x1e78a3),Promise['resolve']();{const _0x3be6da=await _0x2108a3['text']();return _0x3be6da['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x153889,'AI_ERROR_CONTEXT_LENGTH'))):_0x3be6da['includes']('Moderation')?Promise['reject'](new R(i(_0x153889,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x3be6da));}}async['prepareMessages'](_0x6090e4,_0x339620,_0x46a466){let _0x3171c7,_0xf9a91d;return _0x339620?(_0x3171c7='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.',_0xf9a91d='Instruction:\x0a'+_0x6090e4+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x339620):(_0x3171c7='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.',_0xf9a91d=_0x6090e4),[{'role':'system','content':_0x3171c7},{'role':'user','content':_0xf9a91d}];}async['_readStreamableResponse'](_0x37d713,_0x11f75c){const _0x19255e=_0x37d713['body']['getReader'](),_0x1f7674=new TextDecoder();let _0x377c6a='',_0x50e735='',_0x111c55='',_0x4c9c5e=!0x1;for(;!_0x4c9c5e;){const {done:_0x48e846,value:_0x5d4534}=await _0x19255e['read'](),_0x52d28c=_0x377c6a+_0x1f7674['decode'](_0x5d4534);let _0x3aebbd='';_0x4c9c5e=_0x48e846;try{_0x3aebbd=this['_cleanUpData'](_0x52d28c),_0x377c6a='';}catch{_0x377c6a=_0x52d28c;continue;}_0x50e735+=_0x3aebbd,!_0x4c9c5e&&this['_isBufferIncomplete'](_0x50e735)||_0x50e735&&(_0x111c55+=_0x50e735,_0x50e735='',_0x11f75c(_0x111c55));}return Promise['resolve']();}async['_readStaticResponse'](_0x946954,_0x5f1f8b){return _0x5f1f8b((await _0x946954['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x2d6864){const _0x2600ce=_0x2d6864['split']('<')['length']!==_0x2d6864['split']('>')['length'],_0x610066=_0x2d6864['length']<0x1e;return _0x2600ce&&_0x610066;}['_cleanUpData'](_0x32c1c7){return _0x32c1c7['split'](/\n(?![^{]*\})/g)['map'](_0x2f8335=>_0x2f8335['replace']('data:\x20',''))['filter'](_0x227d1a=>_0x227d1a&&_0x227d1a['length']>0x0&&'[DONE]'!==_0x227d1a)['map'](_0x4fdf4c=>{const {choices:_0x13c115}=JSON['parse'](_0x4fdf4c);if(_0x13c115[0x0]?.['delta']?.['content'])return _0x13c115[0x0]['delta']['content'];})['filter'](_0x506f91=>_0x506f91)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x2fbf46){super(_0x2fbf46),_0x2fbf46['config']['get']('ai.aws.requestParameters')||_0x2fbf46['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']=_0x2fbf46['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x2fbf46['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x2fbf46['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x2fbf46['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x4a337e,context:_0x57308f,onData:_0x346f56,actionId:_0x1e0ed3}){const {model:_0x488cb1,stream:_0x2459d1,..._0x3a41b8}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x1e0ed3),_0x1d2db8={'prompt':await this['preparePrompt'](_0x4a337e,_0x57308f,_0x488cb1,_0x1e0ed3),..._0x3a41b8};this['_apiUrl']?await this['_processProxyRequest'](_0x1d2db8,_0x488cb1,_0x2459d1,_0x346f56,_0x1e0ed3):await this['_processAWSRequest'](_0x1d2db8,_0x488cb1,_0x2459d1,_0x346f56);}async['preparePrompt'](_0x57e1ca,_0x3efa97,_0x596ae7,_0x3234b6){let _0x20fda0,_0x2748ac;return _0x3efa97?(_0x20fda0='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.',_0x2748ac='Instruction:\x0a'+_0x57e1ca+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x3efa97):(_0x20fda0='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.',_0x2748ac=_0x57e1ca),'meta.llama'==this['getModelFamily'](_0x596ae7)?'<<SYS>>\x0a'+_0x20fda0+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x2748ac+'\x0a[/INST]':'Human:\x0a'+_0x20fda0+'\x0a'+_0x2748ac+'\x0a\x0aAssistant:';}['getModelFamily'](_0x373187){if(/^anthropic\.claude/['test'](_0x373187))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x373187))return'ai21.j2';if(/^cohere\.command/['test'](_0x373187))return'cohere.command';if(/^meta\.llama/['test'](_0x373187))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x373187));}async['_processProxyRequest'](_0x7665fa,_0x567818,_0x933a9,_0x516e93,_0x33b5fe){const _0x288c9d={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x33b5fe),'body':JSON['stringify']({..._0x7665fa,'model':_0x567818,'stream':_0x933a9}),'signal':this['abortController']['signal']},_0x48aec6=await fetch(this['_apiUrl'],_0x288c9d);_0x933a9?await this['_readStreamableResponse'](_0x48aec6,_0x567818,_0x516e93):await this['_readStaticResponse'](_0x48aec6,_0x567818,_0x516e93);}async['_processAWSRequest'](_0x154d11,_0x2c9afd,_0x23df45,_0x4d5f07){const _0x5d2a8d=new _0x412014(this['_bedrockClientConfig']),_0x30357e={'body':JSON['stringify'](_0x154d11),'contentType':'application/json','accept':'application/json','modelId':_0x2c9afd};let _0x209eee;if(_0x23df45){const _0x369fc1=new _0x37a045(_0x30357e);_0x209eee=await _0x5d2a8d['send'](_0x369fc1,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x209eee,_0x2c9afd,_0x4d5f07);}else{const _0x288e6f=new _0x4d7356(_0x30357e);_0x209eee=await _0x5d2a8d['send'](_0x288e6f,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x209eee,_0x2c9afd,_0x4d5f07);}}async['_readAsyncIterableResponse'](_0xbb6d0f,_0xf61d7,_0x11160f){const _0xcf95c1=_0xbb6d0f['body'],_0x1bc8cd=new TextDecoder('utf-8');let _0x48c024='';for await(const _0x292cbc of _0xcf95c1)if(_0x292cbc['chunk']){const _0x21675a=_0x1bc8cd['decode'](_0x292cbc['chunk']['bytes']),_0x106579=JSON['parse'](_0x21675a);_0x48c024+=this['_getGeneratedText'](_0x106579,_0xf61d7),_0x11160f(_0x48c024);}return Promise['resolve']();}async['_readStreamableResponse'](_0x4f8531,_0x59d8f1,_0x5e8291){const _0x511e91=_0x4f8531['body'],_0x394b0b=new TextDecoder('utf-8'),_0x5c3d8d=_0x511e91['getReader']();let _0x208952='',_0x4f80ec='',_0x328ae9=!0x1;for(;!_0x328ae9;){const {done:_0x226544,value:_0x356ec5}=await _0x5c3d8d['read']();if(_0x328ae9=_0x226544,_0x328ae9)break;const _0x160fe3=(_0x208952+_0x394b0b['decode'](_0x356ec5))['split']('\x0a')['map'](_0x4f975e=>{try{return _0x208952='',JSON['parse'](_0x4f975e);}catch{return _0x208952=_0x4f975e,null;}})['filter'](_0x4ae098=>null!==_0x4ae098);_0x160fe3['length']&&(_0x4f80ec+=_0x160fe3['map'](_0x504482=>this['_getGeneratedText'](_0x504482,_0x59d8f1))['join'](''),_0x5e8291(_0x4f80ec));}return Promise['resolve']();}async['_readStaticResponse'](_0x45c1a1,_0x289b67,_0x104c26){let _0x4615d7;return _0x4615d7=_0x45c1a1 instanceof Response?await _0x45c1a1['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x45c1a1['body'])),(_0x104c26(this['_getGeneratedText'](_0x4615d7,_0x289b67)),Promise['resolve']());}['_getGeneratedText'](_0xb7fd3d,_0x176ee5){switch(this['getModelFamily'](_0x176ee5)){case'anthropic.claude':return _0xb7fd3d['completion'];case'ai21.j2':return _0xb7fd3d['completions'][0x0]['data']['text'];case'cohere.command':return _0xb7fd3d['generations'][0x0]['text'];case'meta.llama':return _0xb7fd3d['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 _0x24734d,Command as _0x1a64db}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x1febbe,IconCheck as _0x3c8b90,IconError as _0x7b8a9b,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x1a3b9,IconRobotPencil as _0x28e28c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x2089d9,CKEditorError as _0x5b9dec,ObservableMixin as _0x49c043,global as _0x422fd6,isVisible as _0x29765a,Rect as _0x4b0d15,Collection as _0x5b2855,FocusTracker as et,KeystrokeHandler as rt,first as _0xe7a622}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x43272b,View as _0xb82e36,SpinnerView as _0x3d9409,IconView as _0x4d8ff1,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x31cab6,createDropdown as _0x54b3a3,addMenuToDropdown as _0x25e819,MenuBarMenuView as _0x10b136,MenuBarMenuListItemButtonView as _0x5dd0d4,DialogViewPosition as _0xbf5535,MenuBarMenuListView as _0xb1ab97,MenuBarMenuListItemView as _0x5e1342}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0xfece6f,ClipboardMarkersUtils as _0x5c8a72}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x7b3f,ViewDataTransfer as _0x1cb27b,ViewUpcastWriter as _0x22a190,Matcher as _0x2d0e51}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x5bed83,InvokeModelWithResponseStreamCommand as _0x7f951c,InvokeModelCommand as _0x124e7c}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x4fe7b6,_0xdbc8a9){const _0x7e93a=(0x0,_0xdbc8a9['t'])('Other');return _0x4fe7b6['length']?'groupId'in _0x4fe7b6[0x0]?_0x4fe7b6:[{'groupId':K,'groupLabel':_0x7e93a,'order':0x1/0x0,'commands':_0x4fe7b6}]:[{'groupId':K,'groupLabel':_0x7e93a,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x24734d{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xf0dbc6}=this,_0x57714d=['ck-fake-ai-selection'];_0xf0dbc6['config']['get']('ai.useTheme')&&_0x57714d['push']('ck-ai-assistant-ui_theme'),_0xf0dbc6['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x57714d,'priority':0xc}}),_0xf0dbc6['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x102369,{writer:_0xd365d})=>{if(!_0x102369['markerRange']['isCollapsed'])return null;const _0x3136c4=_0xd365d['createUIElement']('span');return _0xd365d['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x3136c4),_0x3136c4;}});}['afterInit'](){!async function(_0x1f302a){const _0x4f2ec2=_0x2c2f6c([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]),_0x2f822c=0x3dffc4e1,_0x409ebf=0x3df8b619^_0x2f822c,_0x2fdb41=window[_0x2c2f6c([0x44,0x61,0x74,0x65])][_0x2c2f6c([0x6e,0x6f,0x77])](),_0xde50e=_0x1f302a[_0x2c2f6c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xaee212=new window[(_0x2c2f6c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e344c=>{_0xde50e[_0x2c2f6c([0x6f,0x6e,0x63,0x65])](_0x2c2f6c([0x72,0x65,0x61,0x64,0x79]),_0x4e344c);}),_0x2856ac={[_0x2c2f6c([0x6b,0x74,0x79])]:_0x2c2f6c([0x45,0x43]),[_0x2c2f6c([0x75,0x73,0x65])]:_0x2c2f6c([0x73,0x69,0x67]),[_0x2c2f6c([0x63,0x72,0x76])]:_0x2c2f6c([0x50,0x2d,0x32,0x35,0x36]),[_0x2c2f6c([0x78])]:_0x2c2f6c([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]),[_0x2c2f6c([0x79])]:_0x2c2f6c([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]),[_0x2c2f6c([0x61,0x6c,0x67])]:_0x2c2f6c([0x45,0x53,0x32,0x35,0x36])},_0x5d7d8a=_0xde50e[_0x2c2f6c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2c2f6c([0x67,0x65,0x74])](_0x2c2f6c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1af879(){let _0x42295f,_0xf79858=null,_0x27360d=null;try{if(_0x5d7d8a==_0x2c2f6c([0x47,0x50,0x4c]))return _0x2c2f6c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x42295f=_0x55e937(),!_0x42295f)return _0x2c2f6c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x42295f[_0x2c2f6c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x27360d=_0x353dc1(_0x42295f[_0x2c2f6c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x42295f[_0x2c2f6c([0x6a,0x74,0x69])])),await _0x7de3b8()?_0x21f7ce()?_0x2c7e8()?_0x2c2f6c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x541748()?(_0x42295f[_0x2c2f6c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2c2f6c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xf79858=_0x1684b7(_0x2c2f6c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x42295f[_0x2c2f6c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2c2f6c([0x74,0x72,0x69,0x61,0x6c])&&(_0xf79858=_0x1684b7(_0x2c2f6c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x43bbed()):_0x2c2f6c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2c2f6c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2c2f6c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2c2f6c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2c7e8(){const _0x437799=[_0x2c2f6c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2c2f6c([0x74,0x72,0x69,0x61,0x6c])][_0x2c2f6c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42295f[_0x2c2f6c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2fdb41/0x3e8:0xe10*_0x409ebf;return _0x42295f[_0x2c2f6c([0x65,0x78,0x70])]<_0x437799;}function _0x21f7ce(){const _0xe836d8=_0x42295f[_0x2c2f6c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xe836d8&&(!!_0xe836d8[_0x2c2f6c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c2f6c([0x2a]))||!!_0xe836d8[_0x2c2f6c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c2f6c([0x41,0x49])));}function _0x541748(){const _0x13d165=_0x42295f[_0x2c2f6c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x13d165||0x0==_0x13d165[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x16cded}=new URL(window[_0x2c2f6c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x13d165[_0x2c2f6c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16cded))return!0x0;const _0x3a5a2a=_0x16cded[_0x2c2f6c([0x73,0x70,0x6c,0x69,0x74])](_0x2c2f6c([0x2e]));return _0x13d165[_0x2c2f6c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1566fd=>_0x1566fd[_0x2c2f6c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c2f6c([0x2a])))[_0x2c2f6c([0x6d,0x61,0x70])](_0x389529=>_0x389529[_0x2c2f6c([0x73,0x70,0x6c,0x69,0x74])](_0x2c2f6c([0x2e])))[_0x2c2f6c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4dae5b=>_0x4dae5b[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3a5a2a[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2c2f6c([0x6d,0x61,0x70])](_0x44e8ef=>Array(_0x3a5a2a[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x44e8ef[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2c2f6c([0x66,0x69,0x6c,0x6c])](_0x44e8ef[0x0]===_0x2c2f6c([0x2a])?_0x2c2f6c([0x2a]):'')[_0x2c2f6c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x44e8ef))[_0x2c2f6c([0x73,0x6f,0x6d,0x65])](_0x8d1b72=>_0x3a5a2a[_0x2c2f6c([0x65,0x76,0x65,0x72,0x79])]((_0x54dd3e,_0xe47bb2)=>_0x8d1b72[_0xe47bb2]===_0x54dd3e||_0x8d1b72[_0xe47bb2]===_0x2c2f6c([0x2a])));}function _0x43bbed(){return _0xf79858&&_0x27360d?new window[(_0x2c2f6c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xda83c6,_0xc88c7c)=>{_0xf79858[_0x2c2f6c([0x74,0x68,0x65,0x6e])](_0xda83c6,_0xc88c7c),_0x27360d[_0x2c2f6c([0x74,0x68,0x65,0x6e])](_0x58f248=>{_0x58f248!=_0x2c2f6c([0x56,0x61,0x6c,0x69,0x64])&&_0xda83c6(_0x58f248);},_0xc88c7c);}):_0xf79858||_0x27360d||_0x2c2f6c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x353dc1(_0x2d7843,_0x517a79){return new window[(_0x2c2f6c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x484758=>{if(_0x538eea())return _0x484758(_0x2c2f6c([0x56,0x61,0x6c,0x69,0x64]));_0x4f96cd(),_0xde50e[_0x2c2f6c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2c2f6c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x13a715=!0x1;const _0x2af8e7=_0x2089d9();function _0x3f741c(_0x22677f){return!!_0x22677f&&(typeof _0x22677f===_0x2c2f6c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x22677f===_0x2c2f6c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x22677f[_0x2c2f6c([0x74,0x68,0x65,0x6e])]===_0x2c2f6c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x22677f[_0x2c2f6c([0x63,0x61,0x74,0x63,0x68])]===_0x2c2f6c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x223283(_0x13fd8d){_0xfefa0b(_0x13fd8d)[_0x2c2f6c([0x74,0x68,0x65,0x6e])](_0x2c6309=>{if(!_0x2c6309||_0x2c6309[_0x2c2f6c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2c2f6c([0x6f,0x6b]))return _0x2c2f6c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x42631e(_0x13f489(_0x2af8e7+_0x517a79))!=_0x2c6309[_0x2c2f6c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2c2f6c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2c2f6c([0x56,0x61,0x6c,0x69,0x64]);})[_0x2c2f6c([0x74,0x68,0x65,0x6e])](_0xde3f54=>(_0x4e7ce4(),_0xde3f54),()=>{const _0x524ed7=_0x4bd897();return null==_0x524ed7?(_0x4e7ce4(),_0x2c2f6c([0x56,0x61,0x6c,0x69,0x64])):_0x2c2f6c(_0x2fdb41-_0x524ed7>(0x19f340e1^_0x2f822c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2c2f6c([0x74,0x68,0x65,0x6e])](_0x484758)[_0x2c2f6c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x484758(_0x2c2f6c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x52788e=0x3dc92a61^_0x2f822c;function _0x4e7ce4(){const _0x54624c=_0x2c2f6c([0x6c,0x6c,0x63,0x74,0x2d])+_0x42631e(_0x13f489(_0x2d7843)),_0x31ac95=_0x256d1b(_0x42631e(window[_0x2c2f6c([0x4d,0x61,0x74,0x68])][_0x2c2f6c([0x63,0x65,0x69,0x6c])](_0x2fdb41/_0x52788e)));window[_0x2c2f6c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2c2f6c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x54624c,_0x31ac95);}function _0x4bd897(){const _0x11ba85=_0x2c2f6c([0x6c,0x6c,0x63,0x74,0x2d])+_0x42631e(_0x13f489(_0x2d7843)),_0x541835=window[_0x2c2f6c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2c2f6c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x11ba85);return _0x541835?window[_0x2c2f6c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x256d1b(_0x541835),0x10)*_0x52788e:null;}function _0xfefa0b(_0x45550a){return new window[(_0x2c2f6c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x37a7ce,_0x58e46e)=>{_0x45550a[_0x2c2f6c([0x74,0x68,0x65,0x6e])](_0x37a7ce,_0x58e46e),window[_0x2c2f6c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x58e46e,0x3dfe1021^_0x2f822c);});}}_0xde50e[_0x2c2f6c([0x6f,0x6e])](_0x2c2f6c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1041fe,_0x49e1e4)=>{if(_0x49e1e4[0x0]!=_0x2d7843)return _0x484758(_0x2c2f6c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x49e1e4[0x1]={..._0x49e1e4[0x1],[_0x2c2f6c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2af8e7};},{[_0x2c2f6c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2c2f6c([0x68,0x69,0x67,0x68])}),_0xde50e[_0x2c2f6c([0x6f,0x6e])](_0x2c2f6c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4514a9=>{_0x3f741c(_0x4514a9[_0x2c2f6c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x13a715=!0x0,_0x223283(_0x4514a9[_0x2c2f6c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2c2f6c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2c2f6c([0x6c,0x6f,0x77])}),_0xaee212[_0x2c2f6c([0x74,0x68,0x65,0x6e])](()=>{_0x13a715||_0x484758(_0x2c2f6c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x538eea(){return _0xde50e[_0x2c2f6c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c2f6c([0x76,0x69,0x65,0x77])][_0x2c2f6c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2c2f6c([0x61,0x75,0x74,0x6f]);}function _0x4f96cd(){_0xde50e[_0x2c2f6c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c2f6c([0x76,0x69,0x65,0x77])][_0x2c2f6c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2c2f6c([0x61,0x75,0x74,0x6f]);}}function _0x1684b7(_0x7c85df){const _0x5586a4=[new window[(_0x2c2f6c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x400db7=>setTimeout(_0x400db7,0x3df6fa2d^_0x2f822c)),_0xaee212[_0x2c2f6c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2c2f6c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a0432=>{let _0x1d763f=0x0;_0xde50e[_0x2c2f6c([0x6d,0x6f,0x64,0x65,0x6c])][_0x2c2f6c([0x6f,0x6e])](_0x2c2f6c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x219d02,_0x2b85b6)=>{_0x2b85b6[0x0][_0x2c2f6c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1d763f++,_0x1d763f==(0x3dffc519^_0x2f822c)&&(_0x2a0432(),_0x219d02[_0x2c2f6c([0x6f,0x66,0x66])]());});}))];return window[_0x2c2f6c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2c2f6c([0x72,0x61,0x63,0x65])](_0x5586a4)[_0x2c2f6c([0x74,0x68,0x65,0x6e])](()=>_0x7c85df);}async function _0x1a13e8(){await _0xaee212,_0xde50e[_0x2c2f6c([0x6d,0x6f,0x64,0x65,0x6c])][_0x2c2f6c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x495534,_0xde50e[_0x2c2f6c([0x6d,0x6f,0x64,0x65,0x6c])][_0x2c2f6c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x495534,_0xde50e[_0x2c2f6c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2c2f6c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1587ec(_0x27af6d){const _0x542228=_0x138170();_0xde50e[_0x542228]=_0x2c2f6c([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x27af6d,_0x27af6d!=_0x2c2f6c([0x56,0x61,0x6c,0x69,0x64])&&_0x1a13e8();}function _0x138170(){const _0x36a315=window[_0x2c2f6c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2c2f6c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2c2f6c([0x6e,0x6f,0x77])]())[_0x2c2f6c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2c2f6c([0x2e]),'');let _0x3b7e19=_0x2c2f6c([0x6e]);for(let _0x355dc3=0x0;_0x355dc3<_0x36a315[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x355dc3+=0x2){let _0x2d6ac3=window[_0x2c2f6c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36a315[_0x2c2f6c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x355dc3,_0x355dc3+0x2));_0x2d6ac3>=_0x4f2ec2[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2d6ac3-=_0x4f2ec2[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b7e19+=_0x4f2ec2[_0x2d6ac3];}return _0x3b7e19;}function _0x55e937(){const _0x2fc298=_0x5d7d8a[_0x2c2f6c([0x73,0x70,0x6c,0x69,0x74])](_0x2c2f6c([0x2e]));if(0x3!=_0x2fc298[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x418d31(_0x2fc298[0x1]);function _0x418d31(_0x838c14){const _0x46b6bd=_0x3d297f(_0x838c14);return _0x46b6bd&&_0x5831bf()?_0x46b6bd:null;function _0x5831bf(){const _0x59565e=_0x46b6bd[_0x2c2f6c([0x6a,0x74,0x69])],_0x5b9c20=window[_0x2c2f6c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59565e[_0x2c2f6c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x59565e[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x19153c={..._0x46b6bd,[_0x2c2f6c([0x6a,0x74,0x69])]:_0x59565e[_0x2c2f6c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x59565e[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x19153c[_0x2c2f6c([0x76,0x63])],_0x13f489(_0x19153c)==_0x5b9c20;}}}async function _0x7de3b8(){let _0x5aa6e4=!0x0;try{const _0x398859=_0x5d7d8a[_0x2c2f6c([0x73,0x70,0x6c,0x69,0x74])](_0x2c2f6c([0x2e])),[_0x53c0ce,_0x4840f0,_0x3f4916]=_0x398859;return _0x4467cb(_0x53c0ce),await _0x2cb32f(_0x53c0ce,_0x4840f0,_0x3f4916),_0x5aa6e4;}catch{return!0x1;}function _0x4467cb(_0x2236e7){const _0x261774=_0x3d297f(_0x2236e7);_0x261774&&_0x261774[_0x2c2f6c([0x61,0x6c,0x67])]==_0x2c2f6c([0x45,0x53,0x32,0x35,0x36])||(_0x5aa6e4=!0x1);}async function _0x2cb32f(_0x52ac8a,_0x72b141,_0x18487d){const _0x4da105=window[_0x2c2f6c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2c2f6c([0x66,0x72,0x6f,0x6d])](_0x647e17(_0x18487d),_0x5ea42d=>_0x5ea42d[_0x2c2f6c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x77333f=new window[(_0x2c2f6c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2c2f6c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x52ac8a+_0x2c2f6c([0x2e])+_0x72b141),_0x47bec2=window[_0x2c2f6c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2c2f6c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x47bec2)return;const _0x36fa73=await _0x47bec2[_0x2c2f6c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2c2f6c([0x6a,0x77,0x6b]),_0x2856ac,{[_0x2c2f6c([0x6e,0x61,0x6d,0x65])]:_0x2c2f6c([0x45,0x43,0x44,0x53,0x41]),[_0x2c2f6c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2c2f6c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2c2f6c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x47bec2[_0x2c2f6c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2c2f6c([0x6e,0x61,0x6d,0x65])]:_0x2c2f6c([0x45,0x43,0x44,0x53,0x41]),[_0x2c2f6c([0x68,0x61,0x73,0x68])]:{[_0x2c2f6c([0x6e,0x61,0x6d,0x65])]:_0x2c2f6c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x36fa73,_0x4da105,_0x77333f)||(_0x5aa6e4=!0x1);}}function _0x3d297f(_0x111e8d){return _0x111e8d[_0x2c2f6c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2c2f6c([0x65,0x79]))?JSON[_0x2c2f6c([0x70,0x61,0x72,0x73,0x65])](_0x647e17(_0x111e8d)):null;}function _0x647e17(_0x341e7a){return window[_0x2c2f6c([0x61,0x74,0x6f,0x62])](_0x341e7a[_0x2c2f6c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2c2f6c([0x2b]))[_0x2c2f6c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2c2f6c([0x2f])));}function _0x13f489(_0x5b235a){let _0x352e12=0x1505;function _0x529b26(_0x3b5412){for(let _0x2e5252=0x0;_0x2e5252<_0x3b5412[_0x2c2f6c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e5252++){const _0x315e11=_0x3b5412[_0x2c2f6c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2e5252);_0x352e12=(_0x352e12<<0x5)+_0x352e12+_0x315e11,_0x352e12&=_0x352e12;}}function _0x18e1a1(_0x5b6de5){Array[_0x2c2f6c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b6de5)?_0x5b6de5[_0x2c2f6c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x18e1a1):_0x5b6de5&&typeof _0x5b6de5==_0x2c2f6c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2c2f6c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b6de5)[_0x2c2f6c([0x73,0x6f,0x72,0x74])]()[_0x2c2f6c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xfa8d97,_0x33b0fb])=>{_0x529b26(_0xfa8d97),_0x18e1a1(_0x33b0fb);}):_0x529b26(window[_0x2c2f6c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b6de5));}return _0x18e1a1(_0x5b235a),_0x352e12>>>0x0;}function _0x42631e(_0x5c5130){return _0x5c5130[_0x2c2f6c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2c2f6c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2c2f6c([0x30]));}function _0x256d1b(_0x10350e){return _0x10350e[_0x2c2f6c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2c2f6c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2c2f6c([0x6a,0x6f,0x69,0x6e])]('');}function _0x495534(){}function _0x2c2f6c(_0x1d368b){return _0x1d368b['map'](_0xc5422b=>String['fromCharCode'](_0xc5422b))['join']('');}_0x1587ec(await _0x1af879());}(this);}['showFakeVisualSelection'](){const _0x5aca47=this['editor']['model'];_0x5aca47['change'](_0x5a3ce2=>{const _0x1b55b2=_0x5aca47['document']['selection']['getRanges']();let _0x9a1a0e=0x0;for(const _0x44dbbd of _0x1b55b2){const _0x24da6b=w+':'+_0x9a1a0e;if(_0x5aca47['markers']['has'](_0x24da6b))_0x5a3ce2['updateMarker'](_0x24da6b,{'range':_0x44dbbd});else{if(_0x44dbbd['start']['isAtEnd']){const _0x45beba=_0x44dbbd['start']['getLastMatchingPosition'](({item:_0x2cc3ae})=>!_0x5aca47['schema']['isContent'](_0x2cc3ae),{'boundaries':_0x44dbbd});_0x5a3ce2['addMarker'](_0x24da6b,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5a3ce2['createRange'](_0x45beba,_0x44dbbd['end'])});}else _0x5a3ce2['addMarker'](_0x24da6b,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x44dbbd});}_0x9a1a0e++;}});}['hideFakeVisualSelection'](){const _0x10c187=this['editor']['model'],_0x5dd97=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x5dd97['length']&&_0x10c187['change'](_0x119edb=>{_0x5dd97['forEach'](_0x5f4483=>{_0x119edb['removeMarker'](_0x5f4483);});});}['insertContent'](_0xce7949,_0x462820){const _0x521b9c=this['_getAISelection'](),_0x22137e=_0x462820||_0x521b9c['getFirstRange']();this['editor']['model']['canEditAt'](_0x22137e)&&this['editor']['model']['change'](_0x1cdb41=>{this['hideFakeVisualSelection'](),_0x462820||this['_resetContentOfSelectedTableCells'](_0x1cdb41,_0x521b9c),this['_pasteHTMLUsingClipboard']({'insertAt':_0x22137e,'writer':_0x1cdb41,'html':_0xce7949});});}['insertContentBelow'](_0x4159dc){const {model:_0x283357}=this['editor'],_0x27259a=this['_getAISelection']();_0x283357['change'](()=>{const _0x28ca87=this['_prepareTableInsertBelowPosition'](_0x4159dc,_0x27259a)||this['_getDefaultInsertBelowPosition'](_0x27259a);this['insertContent'](_0x4159dc,_0x28ca87);});}['_getAISelection'](){const _0x3218cc=this['editor']['model'],_0x3d0716=Array['from'](_0x3218cc['markers']['getMarkersGroup'](w))['map'](_0x572c1f=>_0x572c1f['getRange']());return _0x3218cc['createSelection'](_0x3d0716);}['_pasteHTMLUsingClipboard']({writer:_0x556156,html:_0x47cb4c,insertAt:_0x3c95fc}){const {view:_0x2b2405}=this['editor']['editing'],_0x3df44c=this['editor']['plugins']['get'](_0xfece6f),_0x5c4f27=new gt();_0x5c4f27['setData']('text/html',_0x47cb4c);const _0x24d5d7=new ClipboardEvent('paste',{'clipboardData':_0x5c4f27}),_0x1e9b9d=new _0x7b3f(_0x2b2405,_0x24d5d7,{'dataTransfer':new _0x1cb27b(_0x5c4f27)});_0x556156['setSelection'](_0x3c95fc);const _0x15424e=(_0x4f01d6,_0x2e202c)=>{_0x2e202c['resultRange']&&_0x556156['setSelection'](_0x2e202c['resultRange']);};_0x3df44c['once']('contentInsertion',_0x15424e,{'priority':'lowest'}),_0x2b2405['document']['fire']('paste',_0x1e9b9d),_0x3df44c['off']('contentInsertion',_0x15424e);}['_getDefaultInsertBelowPosition'](_0x36fd55){const {model:_0x1bc59a}=this['editor'],_0x217e2e=Array['from'](_0x36fd55['getSelectedBlocks']());return _0x217e2e['length']?_0x1bc59a['createPositionAfter'](_0x217e2e['pop']()):_0x36fd55['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x35d783,_0x1b8c48){const {model:_0x1aa685,plugins:_0x2383a9}=this['editor'];if(_0x2383a9['has']('TableUtils')){const _0x3ae343=_0x2383a9['get']('TableUtils')['getSelectedTableCells'](_0x1b8c48);if(_0x3ae343['length']){const _0x38959c=this['_getTableRowCountFromContent'](_0x35d783),_0x21e686=this['_createEmptyTableRows'](_0x3ae343,_0x38959c);return _0x1aa685['createPositionAt'](_0x21e686,0x0);}}return null;}['_getTableRowCountFromContent'](_0x10da3a){const _0x4f52e9=this['editor']['plugins']['get']('TableUtils'),_0x3dc1af=this['editor']['data']['parse'](_0x10da3a),_0x3d3956=Array['from'](_0x3dc1af['getChildren']())['filter'](_0x315a4d=>_0x315a4d['is']('element','table'));let _0x2c481e=0x0;return _0x3d3956['forEach'](_0x4df0d7=>{_0x2c481e+=_0x4f52e9['getRows'](_0x4df0d7);}),_0x2c481e;}['_createEmptyTableRows'](_0x3378d2,_0x10c83e){const _0x1abad9=this['editor']['plugins']['get']('TableUtils'),_0x5752c9=_0x1abad9['getRowIndexes'](_0x3378d2),_0x1e9e0f=_0x1abad9['getColumnIndexes'](_0x3378d2),_0x5a658a=_0x5752c9['last']+0x1,_0x557865=_0x1e9e0f['first'],_0x2ef9fa=_0x3378d2[0x0]['findAncestor']('table');for(let _0x23b2c0=0x0;_0x23b2c0<_0x10c83e;_0x23b2c0++)_0x1abad9['insertRows'](_0x2ef9fa,{'at':_0x5a658a});return _0x2ef9fa['getChild'](_0x5a658a)['getChild'](_0x557865);}['_resetContentOfSelectedTableCells'](_0x1d0809,_0x25ae79){const {plugins:_0x2d6dac}=this['editor'],{model:_0x49418f}=_0x1d0809;if(!_0x2d6dac['has']('TableUtils'))return;_0x2d6dac['get']('TableUtils')['getSelectedTableCells'](_0x25ae79)['length']&&_0x49418f['deleteContent'](_0x25ae79);}}class x extends _0x24734d{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x5b9dec('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x58fc79){super(_0x58fc79),this['name']='AIRequestError';}}function i(_0x12aba6,_0x1a49bc,_0xb69666){const t=_0x12aba6['t'];switch(_0x1a49bc){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',_0xb69666);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0xb69666);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'},_0xb69666);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 _0x1a49bc;}}class E extends _0x1a64db{['_commandDefinitions'];constructor(_0x4af7cb,_0x39678d){super(_0x4af7cb),this['_commandDefinitions']=_0x39678d,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x1f239a,_0x54b604,_0x2830c4)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x2830c4));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x52977b,_0x368a8b,_0x2c0dcf)=>{this['enabledCommandsIds']=_0x2c0dcf?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x5642ee=this['editor']['model'];this['_hasContext']=function(_0x2c9912){const _0x54c7e3=_0x2c9912['document']['selection'];return _0x54c7e3['isCollapsed']?0x0!==[..._0x54c7e3['getSelectedBlocks']()]['length']&&![..._0x54c7e3['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x2c9912['hasContent'](_0x54c7e3['getFirstRange']());}(_0x5642ee);const _0x2252dd=_0x5642ee['document']['selection'],_0x595aad=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x44e919 of _0x2252dd['getRanges']())for(const _0x20a8aa of _0x44e919['getItems']())if(_0x20a8aa['is']('element')&&_0x595aad['includes'](_0x20a8aa['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x82a366='',_0xc6de87='',_0x15a00e='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x82a366,_0xc6de87,_0x15a00e);}}function F(_0x46069e,_0x18a30){const _0x556412=new Set();for(const _0x257c2b of _0x46069e['values']())(_0x18a30||!0x1===_0x257c2b['requiresContent'])&&_0x556412['add'](_0x257c2b['id']);return Array['from'](_0x556412);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0x49c043(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0xbc4547,_0x1aefb4,_0x334216){super(),this['editor']=_0xbc4547,this['textAdapter']=_0x1aefb4,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x334216,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x84eaa9,_0x137938,_0x48c2ad)=>{this['view']['value']=this['_sanitizeHTML'](_0x48c2ad);}),this['listenTo'](this['view'],'submitPrompt',(_0x5e16fa,_0x578bfe)=>{const _0x4c3b23=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x578bfe,_0x4c3b23,'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:_0x4897ed,query:_0x1c87a5,htmlContent:_0x4d00d6,label:_0x166734,mainActionLabel:_0x4b5e92}){this['view']['prompt']=_0x166734,this['view']['mainAction']=_0x4b5e92,this['initialContext']=_0x4d00d6,_0x1c87a5&&(this['view']['isRendered']?this['_handleQuery'](_0x1c87a5,_0x4d00d6,_0x4897ed,_0x166734):this['view']['once']('render',()=>{this['_handleQuery'](_0x1c87a5,_0x4d00d6,_0x4897ed,_0x166734);}));}['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'](_0x545ae3,_0x5c54ff,_0x53cadd,_0x2dcc3c){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x5c54ff,this['previousQuery']=_0x545ae3,this['previousLabel']=_0x2dcc3c||_0x545ae3,this['previousActionId']=_0x53cadd,new Promise(_0x1acb4d=>{this['textAdapter']['makeRequest']({'query':_0x545ae3,'context':_0x5c54ff,'onData':_0x257d95=>{this['currentResponse']=_0x257d95,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x53cadd})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x2157fb=>{_0x2157fb instanceof R?this['view']['handleError'](_0x2157fb['message']):this['view']['handleError'](),_0x1acb4d();})['finally'](()=>{this['stopProcessing'](),_0x1acb4d();});});}['_parseAndNormalizeContent'](_0x8393ef,_0x201c56=!0x1){const _0x4b5e69=Q['exec'](_0x8393ef);_0x8393ef=_0x4b5e69?_0x8393ef['substring'](_0x4b5e69[0x1]['length']):_0x8393ef['length']<0x64&&!_0x201c56?'':this['_stripMarkdownSyntax'](_0x8393ef);const _0x16e2fe=this['_domParser']['parseFromString'](_0x8393ef,'text/html');if(_0x4b5e69){const _0xb7d516=Array['from'](_0x16e2fe['body']['childNodes']);_0xb7d516['reverse']();for(const _0x2aae10 of _0xb7d516){if(_0x2aae10['nodeType']==Node['ELEMENT_NODE'])break;_0x2aae10['remove']();}}const _0x51d444=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x16e2fe['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x51d444);const _0x19ffba=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x2c74dd=this['editor']['data']['toModel'](_0x51d444);return _0x19ffba||_0x2c74dd['markers']['clear'](),this['editor']['data']['stringify'](_0x2c74dd);}['_normalizeResponseHeadings'](_0x4a1a21){const _0x1f58a4=new _0x22a190(this['editor']['editing']['view']['document']),_0x270f93=new _0x2d0e51({'name':/^h[1-5]$/}),_0x27fff2=[];let _0x79a224=!0x1;for(const _0x3b974b of _0x4a1a21)_0x3b974b['is']('element')&&_0x270f93['match'](_0x3b974b)&&(_0x27fff2['push'](_0x3b974b),'h1'==_0x3b974b['name']&&(_0x79a224=!0x0));if(_0x79a224){for(const _0x170e20 of _0x27fff2)_0x1f58a4['rename']('h'+(parseInt(_0x170e20['name'][0x1])+0x1),_0x170e20);}}['_isH1TagSupportEnabled'](){const {data:_0x1a6f2a,editing:_0x4faeee}=this['editor'],_0x30687d=_0x1a6f2a['htmlProcessor']['toView']('<h1></h1>'),_0x3e0790=_0x1a6f2a['toView'](_0x1a6f2a['toModel'](_0x30687d));return!!_0x4faeee['view']['domConverter']['viewToDom'](_0x3e0790)['querySelector']('h1');}['_sanitizeHTML'](_0xc68f4f){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0xc68f4f),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x1df9a6){const _0x5dc4e5=_0x1df9a6['trim']();return _0x5dc4e5['startsWith']('```html')?_0x5dc4e5['endsWith']('```')?_0x5dc4e5['substring'](0x7,_0x5dc4e5['length']-0x3):_0x5dc4e5['substring'](0x7):_0x1df9a6;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x1847fd){super(_0x1847fd),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x5794a0=>i(_0x1847fd,'AI_'+_0x5794a0['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x1847fd,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x1847fd,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x1847fd,'Stop'));const _0x6f7d03=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x6f7d03['if']('isVisible','ck-hidden',_0x44edfd=>!_0x44edfd)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x3445a4,_0xf6f5d6){const _0x490e61=new _0x43272b(this['locale']);return _0x490e61['set']({'label':_0x3445a4,'class':_0xf6f5d6||'','isVisible':!0x0,'withText':!0x0}),_0x490e61;}}class ct extends _0xb82e36{['contentFieldView'];['copyButtonView'];constructor(_0x2c769f,_0x58d2a3=''){super(_0x2c769f),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x4a5f7c=this['bindTemplate'];this['contentFieldView']=new bt(_0x2c769f,_0x58d2a3),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x4a5f7c['if']('isVisible','ck-hidden',_0x5f55bc=>!_0x5f55bc)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x4a5f7c['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 _0x44b78c=!0x1;this['on']('change:value',(_0x586e39,_0x5a12b5,_0x3a0850)=>{const _0x57c2ad=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x3a0850),this['isProcessing']&&_0x57c2ad&&!_0x44b78c&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x47c212,_0x2e35dc,_0x3d9dfa)=>{_0x44b78c=!0x1,_0x3d9dfa?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x44b78c=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x44b78c=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x454876=this['locale'],_0x427e50=new _0x43272b(this['locale']),_0x539ef0='ck-ai-form__copy-button';return _0x427e50['set']({'label':i(_0x454876,'Copy'),'icon':_0x1febbe,'class':_0x539ef0,'tooltip':!0x0}),_0x427e50['bind']('isVisible')['to'](this,'value',_0x35fcae=>!!_0x35fcae),_0x427e50['bind']('isEnabled')['to'](this,'isProcessing',_0x12ebb1=>!_0x12ebb1),_0x427e50['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x427e50['icon']=_0x3c8b90,_0x427e50['class']=_0x539ef0+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x427e50['icon']=_0x1febbe,_0x427e50['class']=_0x539ef0;},0x3e8);}),_0x427e50;}['_copyHTMLToClipboard'](_0x2d664b){const {window:_0x33a995,document:_0x317d97}=_0x422fd6;if(_0x33a995['ClipboardItem']){const {Blob:_0x56841a,ClipboardItem:_0x51b1a4}=_0x33a995,_0x32a821=[new _0x51b1a4({'text/html':new _0x56841a([_0x2d664b['innerHTML']],{'type':'text/html'}),'text/plain':new _0x56841a([_0x2d664b['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x32a821);}else{const _0x5b3187=_0x317d97['createElement']('div');_0x5b3187['style']['position']='absolute',_0x5b3187['style']['left']='-9999px',_0x5b3187['innerHTML']='<span>[</span>'+_0x2d664b['innerHTML']+'<span>]</span>',_0x317d97['body']['appendChild'](_0x5b3187);const _0x571caa=_0x317d97['createRange']();_0x571caa['setStartAfter'](_0x5b3187['firstElementChild']),_0x571caa['setEndBefore'](_0x5b3187['lastElementChild']);const _0x4cdb8f=_0x33a995['getSelection']();_0x4cdb8f['removeAllRanges'](),_0x4cdb8f['addRange'](_0x571caa),_0x317d97['execCommand']('copy'),_0x5b3187['remove']();}}}class bt extends _0xb82e36{constructor(_0x3dfecc,_0x43990a=''){super(_0x3dfecc),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x43990a,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0xfe5ac1){this['element']['innerHTML']=_0xfe5ac1;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x3a38c1=new _0xb82e36(),_0x41f111=this['locale'],_0x49b7e0=new _0x3d9409();return _0x49b7e0['isVisible']=!0x0,_0x3a38c1['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x49b7e0,{'text':i(_0x41f111,'AI\x20is\x20writing...')}]}),_0x3a38c1['render'](),_0x3a38c1;}}class mt extends _0xb82e36{constructor(_0x4f627f,_0x207240=''){super(_0x4f627f);const _0x4bc043=new _0x4d8ff1(),_0x4fecec=this['bindTemplate'];this['set']('text',_0x207240),_0x4bc043['content']=_0x7b8a9b,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4bc043,{'text':_0x4fecec['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x153c29,_0x358d66){super(_0x153c29,_0x358d66),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',(_0x5357f7,_0x29a61a)=>{_0x5357f7['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x29a61a());});}['_createSubmitButton'](){const _0x3e0ef1=new _0x43272b(this['locale']),_0x28a411=this['locale'];return _0x3e0ef1['set']({'icon':it,'label':i(_0x28a411,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x3e0ef1['on']('execute',()=>{this['submit']();}),_0x3e0ef1['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x2466db,_0x252676)=>!_0x2466db&&_0x252676),_0x3e0ef1;}['_createShowHistoryButton'](){const _0x1fa274=new _0x43272b(this['locale']),_0x56e376=this['resultsView'],_0x48f558=this['locale'];_0x1fa274['set']({'label':i(_0x48f558,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x1fa274['bind']('isOn')['to'](_0x56e376,'isVisible'),_0x1fa274['bind']('isEnabled')['to'](this,'isEnabled'),_0x1fa274['on']('execute',()=>{_0x56e376['isVisible']=!_0x56e376['isVisible'],_0x56e376['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x7b4b2=()=>{_0x422fd6['window']['requestAnimationFrame'](()=>{if(_0x29765a(this['element'])){const _0x26b073=new _0x4b0d15(this['queryView']['fieldView']['element']),_0x414c20=_0x26b073['width'],_0x90a775='rtl'===_0x48f558['uiLanguageDirection']?'left':'right';_0x26b073['excludeScrollbarsAndBorders'](),_0x1fa274['element']['style'][_0x90a775]=_0x414c20-_0x26b073['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x7b4b2),this['on']('render',_0x7b4b2),_0x1fa274;}['submit'](){const _0x435822=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x435822);}['focus'](_0x1830a2){-0x1===_0x1830a2?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x67ee68){super(_0x67ee68),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x67ee68,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x51033c=0x0;for(const _0x52cee5 of this['items'])_0x51033c+=_0x52cee5['items']['length'];return{'resultsCount':_0x51033c,'totalItemsCount':_0x51033c};}['_createClearHistoryButton'](){const _0x4b12d5=this['locale'],_0x264348=new _0x43272b(this['locale']);return _0x264348['set']({'label':'('+i(_0x4b12d5,'Clear')+')','withText':!0x0}),_0x264348['on']('execute',()=>this['fire']('clearHistory')),_0x264348;}}class ut extends xt{constructor(_0x4804f3){super();const _0x4b1000=new wt(),_0x3ab45a=new _0x43272b(this['locale'],_0x4b1000);this['children']['add'](_0x3ab45a),_0x3ab45a['set']({'label':_0x4804f3['prompt'],'withText':!0x0}),_0x3ab45a['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x4804f3['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x5b2855{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x37d792,_0x490294)=>{const _0x3bcc72=os(_0x490294['prompt']);for(const _0x45ff13 of this)if(_0x45ff13!=_0x490294&&os(_0x45ff13['prompt'])===_0x3bcc72){this['remove'](_0x45ff13);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x125822=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x125822));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x471459=>_0x471459)));}}function os(_0x16be1f){return _0x16be1f['toLowerCase']()['trim']();}class k extends _0xb82e36{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x323805,_0x246855,_0x414f4a=''){super(_0x323805),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(_0x323805),this['contentArea']=new ct(_0x323805,_0x414f4a),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 _0x97f45d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x246855],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x97f45d['if']('isError','ck-hidden',_0x5c8c4a=>!_0x5c8c4a)]},'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'](_0x57860f=0x1){-0x1===_0x57860f?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 _0xd8caa5=this['locale'],_0x363322=new lt(_0xd8caa5,{'queryView':{'label':i(_0xd8caa5,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0xd8caa5,'Empty\x20history'),'secondary':i(_0xd8caa5,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x363322['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x49a6a7,_0x18ac7e)=>_0x49a6a7&&!_0x18ac7e),this['listenTo'](_0x363322,'submit',(_0x4e6d64,_0x54438b)=>{this['prompt']=_0x54438b;const _0x419f1a=ft(_0x54438b);this['fire']('submitPrompt',_0x419f1a),_0x54438b['trim']()&&this['_promptHistory']['add']({'prompt':_0x419f1a},0x0);},{'priority':'high'}),_0x363322;}['_createHistoryView'](){const _0x428855=new pt(this['locale']);return _0x428855['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x428855['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x428855;}['_createToolbar'](){const _0x3e3d31=new at(this['locale']);return _0x3e3d31['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x5a0e1e,_0x87a12c,_0x59513f)=>_0x5a0e1e&&!_0x87a12c&&!!_0x59513f),_0x3e3d31['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x3e3d31['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x305f84,_0x9bf95b,_0xec50a3)=>_0x305f84&&!_0x9bf95b&&!!_0xec50a3),_0x3e3d31['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x3e3d31['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x45c6aa,_0x409145)=>_0x45c6aa&&!_0x409145),_0x3e3d31['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x3e3d31['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x3e3d31['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x3e3d31;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x40bcb8=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x40bcb8,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x56e31d){const _0x9d295b=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x56e31d||i(_0x9d295b,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x24734d{['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[_0x5c8a72,a,x,_0x31cab6];}constructor(_0x2d4628){super(_0x2d4628),_0x2d4628['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x2d4628['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x2d4628['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x2d4628['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x31b616}=this;this['_aiAdapter']=_0x31b616['plugins']['get'](x),this['_dialog']=_0x31b616['plugins']['get'](_0x31cab6),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x1b34e6=new E(_0x31b616,Array['from'](this['_commandDefinitions']['values']()));_0x31b616['commands']['add']('showAIAssistant',_0x1b34e6),_0x31b616['ui']['componentFactory']['add']('aiCommands',_0x94bf8c=>{const _0x5dd43=_0x54b3a3(_0x94bf8c);return _0x5dd43['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x5dd43['buttonView']['set']({'label':i(_0x94bf8c,'AI\x20Commands'),'icon':_0x1a3b9,'tooltip':!0x0}),_0x5dd43['on']('execute',_0x3e5d59=>this['_onExecute'](_0x3e5d59['source']['id'])),_0x25e819(_0x5dd43,_0x31b616['ui']['view']['body'],function(_0x354761){const _0x192ab3=o(_0x354761['config']['get']('ai.aiAssistant.commands'),_0x354761['locale']),_0x5787a0=U(_0x354761,_0x192ab3)['filter'](_0x1f8cb3=>_0x1f8cb3['commands']['length']);if(0x1===_0x5787a0['length'])return U(_0x354761,_0x5787a0[0x0]['commands'])['map'](_0xe6f2ad=>({'id':_0xe6f2ad['id'],'label':_0xe6f2ad['label']}));return _0x5787a0['map'](_0x2e19c3=>{const {groupId:_0x2dac66,groupLabel:_0x1f5cab,commands:_0x4789d4}=_0x2e19c3,_0x3a679a=U(_0x354761,_0x4789d4)['map'](_0xf9ef9b=>({'id':_0xf9ef9b['id'],'label':_0xf9ef9b['label']}));return{'id':_0x2dac66,'menu':_0x1f5cab||_0x2dac66,'children':_0x3a679a};});}(_0x31b616),{'ariaLabel':i(_0x94bf8c,'AI\x20Commands')}),_0x5dd43['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x1b34e6['on']('change:enabledCommandsIds',_0x3ee19b),_0x5dd43['menuView']['once']('render',_0x3ee19b),_0x5dd43;function _0x3ee19b(){_0x5dd43['isEnabled']=_0x1b34e6['enabledCommandsIds']['length']>0x0;for(const _0x13d853 of _0x5dd43['menuView']['buttons'])_0x13d853['isEnabled']=_0x1b34e6['enabledCommandsIds']['includes'](_0x13d853['id']);}}),_0x31b616['ui']['componentFactory']['add']('menuBar:aiCommands',_0x49bf26=>{const _0x1cc3f2=new _0x10b136(_0x49bf26);_0x1cc3f2['buttonView']['set']({'label':i(_0x49bf26,'AI\x20Commands'),'icon':_0x1a3b9}),_0x1cc3f2['bind']('isEnabled')['to'](_0x1b34e6,'enabledCommandsIds',_0x5b91af=>_0x5b91af['length']>0x0);const _0x4afefa=o(_0x31b616['config']['get']('ai.aiAssistant.commands'),_0x49bf26);return this['_populateMenuBarMenu'](_0x1b34e6,_0x1cc3f2,_0x4afefa,_0x446843=>this['_onExecute'](_0x446843)),_0x1cc3f2;}),_0x31b616['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x42f3c9=this['_createAIAssistantUIButton'](_0x43272b);return _0x42f3c9['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x42f3c9;}),_0x31b616['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x4a5f0c=this['_createAIAssistantUIButton'](_0x5dd0d4);return _0x4a5f0c['set']({'role':'menuitemcheckbox'}),_0x4a5f0c;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4f75ca=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3d62cc;for(const _0x2a98ed in _0x4f75ca){const _0x38b699=_0x2a98ed,_0x5b9a2d=_0x4f75ca[_0x38b699];if('aiLicenseKeyValid'==_0x5b9a2d||'aiLicenseKeyInvalid'==_0x5b9a2d||'aiLicenseKeyExpired'==_0x5b9a2d||'aiLicenseKeyDomainLimit'==_0x5b9a2d||'aiLicenseKeyNotAllowed'==_0x5b9a2d||'aiLicenseKeyEvaluationLimit'==_0x5b9a2d||'aiLicenseKeyTrialLimit'==_0x5b9a2d||'aiLicenseKeyUsageLimit'==_0x5b9a2d){delete _0x4f75ca[_0x38b699],_0x3d62cc=_0x5b9a2d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x3d62cc&&_0x4f75ca['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x3d62cc&&_0x4f75ca['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x3d62cc&&_0x4f75ca['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x3d62cc&&_0x4f75ca['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x3d62cc&&_0x4f75ca['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x3d62cc&&_0x4f75ca['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x3d62cc&&_0x4f75ca['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x2f280e='',_0x245cb0='',_0x30c025='custom'){const _0x4c9768=this['editor'],_0x1d4149=_0x4c9768['editing']['view'],_0x5360d3=_0x4c9768['plugins']['get'](a),_0x7282f8=_0x4c9768['plugins']['get'](_0x5c8a72);_0x5360d3['showFakeVisualSelection']();const _0xa434e8=new l(),_0x546231=new ClipboardEvent('copy',{'clipboardData':_0xa434e8}),_0x1aacbb=new _0x1cb27b(_0xa434e8),_0x66faa0=new _0x7b3f(_0x1d4149,_0x546231,{'dataTransfer':_0x1aacbb});_0x7282f8['_forceMarkersCopy']('comment',()=>{_0x1d4149['document']['fire']('copy',_0x66faa0);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x4c9768,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x1ede99=_0x1aacbb['getData']('text/html');const _0x19d9ea=_0x4c9768['model']['document']['selection'],_0x9d5c45=Array['from'](_0x19d9ea['getRanges']());0x1===_0x9d5c45['length']&&_0x9d5c45[0x0]['isFlat']&&!_0x19d9ea['getSelectedElement']()&&''!==_0x1ede99['replace'](/&nbsp;/g,'')['trim']()&&(_0x1ede99='<p>'+_0x1ede99+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x30c025,'query':_0x2f280e,'htmlContent':_0x1ede99,'label':_0x245cb0,'mainActionLabel':_[_0x4c9768['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x28e28c,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0xbf5535['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x5360d3['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x252922=new Map(),_0x46ba82=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x164657 of _0x46ba82)for(const _0x394b61 of _0x164657['commands'])_0x252922['set'](_0x394b61['id'],{..._0x394b61,'groupId':_0x164657['groupId'],'groupLabel':_0x164657['groupLabel']||_0x164657['groupId']});return _0x252922;}['_createAIAssistantUIButton'](_0x16d6b1){const _0x359865=this['editor'],_0xd75b39=_0x359865['commands']['get']('showAIAssistant'),_0x5ec290=new _0x16d6b1(_0x359865['locale']);return _0x5ec290['set']({'label':i(_0x359865['locale'],'AI\x20Assistant'),'icon':_0x28e28c,'isToggleable':!0x0}),_0x5ec290['bind']('isEnabled')['to'](_0xd75b39),_0x5ec290['bind']('isOn')['to'](this['_dialog'],'id',_0x569f92=>'aiAssistant'===_0x569f92),this['listenTo'](_0x5ec290,'execute',()=>{_0x5ec290['isOn']?this['hideUI']():_0xd75b39['execute']();}),_0x5ec290;}['_initView'](){const _0x115c3d=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',()=>{_0x115c3d['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x115c3d['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x5e09b0,ui:{ariaLiveAnnouncer:_0x2bdbe3}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x58d789,_0x41680d,_0x37b3de)=>{const _0x58464a=this['_aiAssistantController']['currentContext'];_0x37b3de?_0x2bdbe3['announce'](i(_0x5e09b0,'AI\x20is\x20writing')):_0x58464a&&_0x2bdbe3['announce'](i(_0x5e09b0,'Generated\x20content:\x20%0',_0x58464a),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x299dca,_0x13dd14,_0x54cd2d)=>{if(_0x54cd2d){const _0x254416=this['_formView']['errorView']['text'];_0x2bdbe3['announce'](i(_0x5e09b0,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x254416));}});}['_onExecute'](_0xb3fcaa){const _0x3dc5ec=this['_commandDefinitions']['get'](_0xb3fcaa),_0x560b69=this['editor'],_0x283128=_0x560b69['model']['document']['selection'],_0x41e255=_0x560b69['commands']['get']('showAIAssistant'),_0x47f61d=_0x560b69['plugins']['get'](a),_0x344caf=''+(_0x3dc5ec['groupId']!==K?_0x3dc5ec['groupLabel']+':\x20':'')+_0x3dc5ec['label'];if(!0x1!==_0x3dc5ec['requiresContent']&&_0x283128['isCollapsed']){const _0x2915ff=_0xe7a622(_0x283128['getSelectedBlocks']())||_0x560b69['model']['schema']['getLimitElement'](_0x283128);_0x560b69['model']['change'](_0x4725e5=>{_0x4725e5['setSelection'](_0x2915ff,'in');});}_0x47f61d['showFakeVisualSelection'](),_0x41e255['execute'](_0x3dc5ec['prompt'],_0x344caf,'command:'+_0xb3fcaa);}['_populateMenuBarMenu'](_0x84cfe2,_0x38004b,_0x544f26,_0x9308f7){const _0x128a63=this['editor'],_0x35cd8d=_0x128a63['locale'],_0x1184fe=new _0xb1ab97(_0x35cd8d),_0x439415=U(_0x128a63,_0x544f26)['filter'](_0x459979=>_0x459979['commands']['length']);0x1===_0x439415['length']?this['_getMenuBarGroupButtons']({'command':_0x84cfe2,'commands':_0x439415[0x0]['commands'],'parentMenuView':_0x38004b,'onExecute':_0x9308f7})['forEach'](_0x4cda43=>_0x1184fe['items']['add'](_0x4cda43)):_0x439415['forEach'](({groupId:_0x4074be,groupLabel:_0x4e4057,commands:_0x244708})=>{const _0x526dad=new _0x5e1342(_0x35cd8d,_0x38004b),_0x52d1b4=new _0x10b136(_0x35cd8d),_0x31f166=new _0xb1ab97(_0x35cd8d),_0x9a35c6=this['_getMenuBarGroupButtons']({'command':_0x84cfe2,'commands':_0x244708,'parentMenuView':_0x52d1b4,'onExecute':_0x9308f7});_0x52d1b4['buttonView']['set']({'label':_0x4e4057||_0x4074be}),_0x52d1b4['delegate']('execute')['to'](_0x38004b),_0x31f166['items']['addMany'](_0x9a35c6),_0x52d1b4['panelView']['children']['add'](_0x31f166),_0x526dad['children']['add'](_0x52d1b4),_0x1184fe['items']['add'](_0x526dad);}),_0x38004b['panelView']['children']['add'](_0x1184fe);}['_getMenuBarGroupButtons']({command:_0x552f74,commands:_0x16223c,parentMenuView:_0x3d3ec7,onExecute:_0x145ab0}){const _0x27cce1=this['editor'],_0x326968=_0x27cce1['locale'];return U(_0x27cce1,_0x16223c)['map'](_0xa5e470=>{const _0x599a4e=new _0x5e1342(_0x326968,_0x3d3ec7),_0x35d610=new _0x5dd0d4(_0x326968);return _0x35d610['set']({'label':_0xa5e470['label']}),_0x35d610['delegate']('execute')['to'](_0x3d3ec7),_0x35d610['on']('execute',()=>_0x145ab0(_0xa5e470['id'])),_0x35d610['bind']('isEnabled')['to'](_0x552f74,'enabledCommandsIds',_0x363a30=>_0x363a30['includes'](_0xa5e470['id'])),_0x599a4e['children']['add'](_0x35d610),_0x599a4e;});}}function T(_0x18d92a,_0x58df0a){return void 0x0!==_0x18d92a['order']&&void 0x0===_0x58df0a['order']?0x1:void 0x0===_0x18d92a['order']&&void 0x0!==_0x58df0a['order']?-0x1:void 0x0!==_0x18d92a['order']&&void 0x0!==_0x58df0a['order']?_0x18d92a['order']-_0x58df0a['order']:0x0;}function U(_0x2af37a,_0x444205){_0x444205['sort'](T);const _0x20a620={},_0xe44e61=[];for(const _0x103fe5 of _0x444205)if(void 0x0!==_0x103fe5['order']){if(_0x103fe5['order']in _0x20a620)throw new _0x5b9dec('ai-commands-config-order-collision',_0x2af37a,{'conflictingDefinitions':[_0x103fe5,_0x20a620[_0x103fe5['order']]]});_0x20a620[_0x103fe5['order']]=_0x103fe5,_0xe44e61['splice'](_0x103fe5['order'],0x0,_0x103fe5);}else _0xe44e61['push'](_0x103fe5);return _0xe44e61;}class At extends _0x24734d{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x378f37){super(_0x378f37);const _0xd71064=_0x378f37['config'],_0x4cca3c=_0x378f37['locale'];_0xd71064['define']('ai.aiAssistant.preserveComments',!0x0),_0xd71064['define']('ai.aiAssistant.commands',_t(_0x4cca3c)),_0xd71064['define']('ai.aiAssistant.extraCommandGroups',[]),_0xd71064['define']('ai.aiAssistant.removeCommands',[]);let _0x1fa0ed=o(_0xd71064['get']('ai.aiAssistant.commands'),_0x4cca3c);const _0x155b85=_0xd71064['get']('ai.aiAssistant.extraCommandGroups'),_0x2b68da=_0xd71064['get']('ai.aiAssistant.removeCommands');_0x155b85['forEach'](_0x8848a2=>{const _0x5981ae=_0x1fa0ed['find'](_0x41a0b0=>_0x41a0b0['groupId']===_0x8848a2['groupId']);_0x5981ae?_0x5981ae['commands']=_0x5981ae['commands']['concat'](_0x8848a2['commands']):_0x1fa0ed['push'](_0x8848a2);}),_0x1fa0ed=_0x1fa0ed['filter'](_0x200684=>!_0x2b68da['includes'](_0x200684['groupId'])),_0x1fa0ed['forEach'](_0x46a124=>{_0x46a124['commands']=_0x46a124['commands']['filter'](_0x59acee=>!_0x2b68da['includes'](_0x59acee['id']));}),_0xd71064['set']('ai.aiAssistant.commands',_0x1fa0ed);}}function _t(_0x221afd){return[{'groupId':'editOrReview','groupLabel':i(_0x221afd,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x221afd,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x221afd,'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(_0x221afd,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x221afd,'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(_0x221afd,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x221afd,'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(_0x221afd,'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(_0x221afd,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x221afd,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x221afd,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x221afd,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x221afd,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x221afd,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x221afd,'Change\x20style'),'commands':[{'id':'business','label':i(_0x221afd,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x221afd,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x221afd,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x221afd,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x221afd,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x221afd,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x221afd,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x221afd,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x221afd,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x221afd,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x221afd,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x221afd,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x221afd,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x24734d{['abortController'];static get['requires'](){return[x];}constructor(_0x8bf8da){super(_0x8bf8da),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'](_0x4b24da){return this['sendRequest'](_0x4b24da)['catch'](_0x3ddb8d=>{if(_0x3ddb8d instanceof R)return Promise['reject'](_0x3ddb8d);if('AbortError'==_0x3ddb8d['name'])return Promise['resolve']();throw console['error'](_0x3ddb8d),new _0x5b9dec('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x4ee37f,_0x17b3b7){const _0x318004=this['editor']['locale'],_0xf2d07={'Content-Type':'application/json'};if('object'==typeof _0x4ee37f)Object['assign'](_0xf2d07,_0x4ee37f);else{if(_0x4ee37f)try{const _0x2c5dac=await _0x4ee37f(_0x17b3b7);Object['assign'](_0xf2d07,_0x2c5dac);}catch{return Promise['reject'](new R(i(_0x318004,'AI_ERROR_GET_HEADERS')));}}return _0xf2d07;}async['_prepareRequestParameters'](_0x5e2610,_0x244e8e){const _0x104d7b=this['editor']['locale'];if('object'==typeof _0x5e2610)return _0x5e2610;try{return await _0x5e2610(_0x244e8e);}catch{return Promise['reject'](new R(i(_0x104d7b,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x24c137){super(_0x24c137),_0x24c137['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x24c137['config']['get']('ai.openAI.requestParameters')||_0x24c137['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x24c137['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x24c137['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x24c137['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x123cdc,context:_0xc4a8b1,onData:_0x2d252e,actionId:_0x3bbafb}){const _0x561736=this['editor']['locale'],_0x487257=await this['prepareMessages'](_0x123cdc,_0xc4a8b1,_0x3bbafb),_0x2f2554=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3bbafb),_0x5a0529=await this['_prepareRequestParameters'](this['_requestParameters'],_0x3bbafb),_0x2e1128={'messages':_0x487257,..._0x5a0529},_0xfcb233={'method':'POST','headers':_0x2f2554,'body':JSON['stringify'](_0x2e1128),'signal':this['abortController']['signal']},_0x1cfe11=await fetch(this['_apiUrl'],_0xfcb233);if(_0x1cfe11['ok'])return _0x5a0529['stream']?await this['_readStreamableResponse'](_0x1cfe11,_0x2d252e):await this['_readStaticResponse'](_0x1cfe11,_0x2d252e),Promise['resolve']();{const _0x1724a9=await _0x1cfe11['text']();return _0x1724a9['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x561736,'AI_ERROR_CONTEXT_LENGTH'))):_0x1724a9['includes']('Moderation')?Promise['reject'](new R(i(_0x561736,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x1724a9));}}async['prepareMessages'](_0x37a43c,_0x1eeafd,_0xf3c04b){let _0x224883,_0x20a3d2;return _0x1eeafd?(_0x224883='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.',_0x20a3d2='Instruction:\x0a'+_0x37a43c+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x1eeafd):(_0x224883='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.',_0x20a3d2=_0x37a43c),[{'role':'system','content':_0x224883},{'role':'user','content':_0x20a3d2}];}async['_readStreamableResponse'](_0x1fd040,_0x1d0a75){const _0x4882e0=_0x1fd040['body']['getReader'](),_0x5cb0eb=new TextDecoder();let _0x36610e='',_0x19a933='',_0x531508='',_0x352886=!0x1;for(;!_0x352886;){const {done:_0x2b8ecb,value:_0x1a5868}=await _0x4882e0['read'](),_0x20f8a5=_0x36610e+_0x5cb0eb['decode'](_0x1a5868);let _0x240b2a='';_0x352886=_0x2b8ecb;try{_0x240b2a=this['_cleanUpData'](_0x20f8a5),_0x36610e='';}catch{_0x36610e=_0x20f8a5;continue;}_0x19a933+=_0x240b2a,!_0x352886&&this['_isBufferIncomplete'](_0x19a933)||_0x19a933&&(_0x531508+=_0x19a933,_0x19a933='',_0x1d0a75(_0x531508));}return Promise['resolve']();}async['_readStaticResponse'](_0x12f1d8,_0x540968){return _0x540968((await _0x12f1d8['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x4cfa69){const _0x30e570=_0x4cfa69['split']('<')['length']!==_0x4cfa69['split']('>')['length'],_0x5855c4=_0x4cfa69['length']<0x1e;return _0x30e570&&_0x5855c4;}['_cleanUpData'](_0x4ecb56){return _0x4ecb56['split'](/\n(?![^{]*\})/g)['map'](_0x4d33ee=>_0x4d33ee['replace']('data:\x20',''))['filter'](_0xa08639=>_0xa08639&&_0xa08639['length']>0x0&&'[DONE]'!==_0xa08639)['map'](_0x23f99e=>{const {choices:_0x16a201}=JSON['parse'](_0x23f99e);if(_0x16a201[0x0]?.['delta']?.['content'])return _0x16a201[0x0]['delta']['content'];})['filter'](_0x191fc1=>_0x191fc1)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x159aa4){super(_0x159aa4),_0x159aa4['config']['get']('ai.aws.requestParameters')||_0x159aa4['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']=_0x159aa4['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x159aa4['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x159aa4['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x159aa4['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x3e3395,context:_0x96756d,onData:_0x3c8b70,actionId:_0x58c2e5}){const {model:_0x48dd8c,stream:_0x15ceb7,..._0x50a179}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x58c2e5),_0x395d29={'prompt':await this['preparePrompt'](_0x3e3395,_0x96756d,_0x48dd8c,_0x58c2e5),..._0x50a179};this['_apiUrl']?await this['_processProxyRequest'](_0x395d29,_0x48dd8c,_0x15ceb7,_0x3c8b70,_0x58c2e5):await this['_processAWSRequest'](_0x395d29,_0x48dd8c,_0x15ceb7,_0x3c8b70);}async['preparePrompt'](_0x19ffd0,_0x3ebf54,_0x548567,_0x351a4d){let _0x4012d3,_0x4f1564;return _0x3ebf54?(_0x4012d3='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.',_0x4f1564='Instruction:\x0a'+_0x19ffd0+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x3ebf54):(_0x4012d3='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.',_0x4f1564=_0x19ffd0),'meta.llama'==this['getModelFamily'](_0x548567)?'<<SYS>>\x0a'+_0x4012d3+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x4f1564+'\x0a[/INST]':'Human:\x0a'+_0x4012d3+'\x0a'+_0x4f1564+'\x0a\x0aAssistant:';}['getModelFamily'](_0x118354){if(/^anthropic\.claude/['test'](_0x118354))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x118354))return'ai21.j2';if(/^cohere\.command/['test'](_0x118354))return'cohere.command';if(/^meta\.llama/['test'](_0x118354))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x118354));}async['_processProxyRequest'](_0xd9bd24,_0x5c778d,_0x10a35a,_0x1a99ad,_0x3c3951){const _0x45a5bc={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3c3951),'body':JSON['stringify']({..._0xd9bd24,'model':_0x5c778d,'stream':_0x10a35a}),'signal':this['abortController']['signal']},_0x432a2d=await fetch(this['_apiUrl'],_0x45a5bc);_0x10a35a?await this['_readStreamableResponse'](_0x432a2d,_0x5c778d,_0x1a99ad):await this['_readStaticResponse'](_0x432a2d,_0x5c778d,_0x1a99ad);}async['_processAWSRequest'](_0x1d7d15,_0x22d678,_0x589535,_0x971a87){const _0x119b52=new _0x5bed83(this['_bedrockClientConfig']),_0x355d59={'body':JSON['stringify'](_0x1d7d15),'contentType':'application/json','accept':'application/json','modelId':_0x22d678};let _0x224d3b;if(_0x589535){const _0x1fcb8d=new _0x7f951c(_0x355d59);_0x224d3b=await _0x119b52['send'](_0x1fcb8d,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x224d3b,_0x22d678,_0x971a87);}else{const _0x3f715c=new _0x124e7c(_0x355d59);_0x224d3b=await _0x119b52['send'](_0x3f715c,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x224d3b,_0x22d678,_0x971a87);}}async['_readAsyncIterableResponse'](_0x17bbdb,_0x4340c3,_0x3b0da7){const _0x1e350c=_0x17bbdb['body'],_0x22b207=new TextDecoder('utf-8');let _0x5b7708='';for await(const _0x2d9267 of _0x1e350c)if(_0x2d9267['chunk']){const _0x31996c=_0x22b207['decode'](_0x2d9267['chunk']['bytes']),_0x3c3256=JSON['parse'](_0x31996c);_0x5b7708+=this['_getGeneratedText'](_0x3c3256,_0x4340c3),_0x3b0da7(_0x5b7708);}return Promise['resolve']();}async['_readStreamableResponse'](_0x406248,_0x5f39b6,_0x39cfbd){const _0x3c8bbc=_0x406248['body'],_0x3a97fa=new TextDecoder('utf-8'),_0x13859c=_0x3c8bbc['getReader']();let _0x2393f1='',_0x4b5ae8='',_0x38809d=!0x1;for(;!_0x38809d;){const {done:_0x25bea6,value:_0x464302}=await _0x13859c['read']();if(_0x38809d=_0x25bea6,_0x38809d)break;const _0x49f9e3=(_0x2393f1+_0x3a97fa['decode'](_0x464302))['split']('\x0a')['map'](_0x222517=>{try{return _0x2393f1='',JSON['parse'](_0x222517);}catch{return _0x2393f1=_0x222517,null;}})['filter'](_0x2b15bc=>null!==_0x2b15bc);_0x49f9e3['length']&&(_0x4b5ae8+=_0x49f9e3['map'](_0x2a2973=>this['_getGeneratedText'](_0x2a2973,_0x5f39b6))['join'](''),_0x39cfbd(_0x4b5ae8));}return Promise['resolve']();}async['_readStaticResponse'](_0xd72ef1,_0x1f879a,_0x5baf66){let _0x31075f;return _0x31075f=_0xd72ef1 instanceof Response?await _0xd72ef1['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0xd72ef1['body'])),(_0x5baf66(this['_getGeneratedText'](_0x31075f,_0x1f879a)),Promise['resolve']());}['_getGeneratedText'](_0xb2684,_0x45f174){switch(this['getModelFamily'](_0x45f174)){case'anthropic.claude':return _0xb2684['completion'];case'ai21.j2':return _0xb2684['completions'][0x0]['data']['text'];case'cohere.command':return _0xb2684['generations'][0x0]['text'];case'meta.llama':return _0xb2684['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':_0x268f46=>0x1!=_0x268f46}};
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':_0x1a0cef=>0x1!=_0x1a0cef}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x5297f8=>{const {af:{dictionary:_0x4a900f,getPluralForm:_0x4b5180}}={'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':_0x2d9014=>0x1!=_0x2d9014}};_0x5297f8['af']||={'dictionary':{},'getPluralForm':null},_0x5297f8['af']['dictionary']=Object['assign'](_0x5297f8['af']['dictionary'],_0x4a900f),_0x5297f8['af']['getPluralForm']=_0x4b5180;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x160f08=>{const {af:{dictionary:_0x14ada5,getPluralForm:_0x20387a}}={'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':_0x3662e8=>0x1!=_0x3662e8}};_0x160f08['af']||={'dictionary':{},'getPluralForm':null},_0x160f08['af']['dictionary']=Object['assign'](_0x160f08['af']['dictionary'],_0x14ada5),_0x160f08['af']['getPluralForm']=_0x20387a;})(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':_0x39648a=>0x0==_0x39648a?0x0:0x1==_0x39648a?0x1:0x2==_0x39648a?0x2:_0x39648a%0x64>=0x3&&_0x39648a%0x64<=0xa?0x3:_0x39648a%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':_0x206fed=>0x0==_0x206fed?0x0:0x1==_0x206fed?0x1:0x2==_0x206fed?0x2:_0x206fed%0x64>=0x3&&_0x206fed%0x64<=0xa?0x3:_0x206fed%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x12ea6c=>{const {ar:{dictionary:_0x1ff458,getPluralForm:_0x3e0b30}}={'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':_0x20cc05=>0x0==_0x20cc05?0x0:0x1==_0x20cc05?0x1:0x2==_0x20cc05?0x2:_0x20cc05%0x64>=0x3&&_0x20cc05%0x64<=0xa?0x3:_0x20cc05%0x64>=0xb?0x4:0x5}};_0x12ea6c['ar']||={'dictionary':{},'getPluralForm':null},_0x12ea6c['ar']['dictionary']=Object['assign'](_0x12ea6c['ar']['dictionary'],_0x1ff458),_0x12ea6c['ar']['getPluralForm']=_0x3e0b30;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x59542e=>{const {ar:{dictionary:_0x56d552,getPluralForm:_0x4410c8}}={'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':_0x37efe2=>0x0==_0x37efe2?0x0:0x1==_0x37efe2?0x1:0x2==_0x37efe2?0x2:_0x37efe2%0x64>=0x3&&_0x37efe2%0x64<=0xa?0x3:_0x37efe2%0x64>=0xb?0x4:0x5}};_0x59542e['ar']||={'dictionary':{},'getPluralForm':null},_0x59542e['ar']['dictionary']=Object['assign'](_0x59542e['ar']['dictionary'],_0x56d552),_0x59542e['ar']['getPluralForm']=_0x4410c8;})(window['CKEDITOR_TRANSLATIONS']||={});