@ckeditor/ckeditor5-ai 46.0.2 → 46.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 _0x47d13d,Command as _0x3bf151}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x530858,IconCheck as _0x534137,IconError as _0x3145a9,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x4edd52,IconRobotPencil as _0x2e4d83}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x348b23,CKEditorError as _0x18ef2b,ObservableMixin as _0x5733b6,global as _0x542910,isVisible as _0x159f09,Rect as _0x37fb03,Collection as _0x1b4047,FocusTracker as et,KeystrokeHandler as rt,first as _0x43afe3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x2db44c,View as _0x3bf81d,SpinnerView as _0x392235,IconView as _0x33f119,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x3f999e,createDropdown as _0x4275aa,addMenuToDropdown as _0x10381b,MenuBarMenuView as _0x1c05d1,MenuBarMenuListItemButtonView as _0x4151ae,DialogViewPosition as _0x49324c,MenuBarMenuListView as _0x1a8d4b,MenuBarMenuListItemView as _0x2fef60}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x15d4b1,ClipboardMarkersUtils as _0xf4919e}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x26acc9,ViewDataTransfer as _0x144e81,ViewUpcastWriter as _0x5f329a,Matcher as _0x2033b0}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x2408c7,InvokeModelWithResponseStreamCommand as _0xd9b0cc,InvokeModelCommand as _0x314eda}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x2e81c2,_0x19ae3d){const _0x4d67b6=(0x0,_0x19ae3d['t'])('Other');return _0x2e81c2['length']?'groupId'in _0x2e81c2[0x0]?_0x2e81c2:[{'groupId':K,'groupLabel':_0x4d67b6,'order':0x1/0x0,'commands':_0x2e81c2}]:[{'groupId':K,'groupLabel':_0x4d67b6,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x47d13d{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5bd745}=this,_0x392bc8=['ck-fake-ai-selection'];_0x5bd745['config']['get']('ai.useTheme')&&_0x392bc8['push']('ck-ai-assistant-ui_theme'),_0x5bd745['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x392bc8,'priority':0xc}}),_0x5bd745['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x4436c8,{writer:_0x15c347})=>{if(!_0x4436c8['markerRange']['isCollapsed'])return null;const _0x54b9a9=_0x15c347['createUIElement']('span');return _0x15c347['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x54b9a9),_0x54b9a9;}});}['afterInit'](){!async function(_0x34d262){const _0xf2afe3=_0x345c84([0x66,0x65,0x4b,0x59,0x55,0x32,0x51,0x56,0x30,0x53,0x6b,0x68,0x79,0x62,0x6d,0x54,0x69,0x74,0x48,0x4e,0x43,0x78,0x6f,0x4a,0x41,0x6e,0x4d,0x70,0x6c,0x38,0x36,0x4f,0x7a,0x75,0x52,0x39,0x5a,0x42,0x49,0x76,0x71,0x47,0x64,0x46,0x73,0x6a,0x4c,0x45,0x72,0x44,0x33,0x31,0x67,0x77,0x35,0x58,0x61,0x57,0x34,0x63,0x37,0x50]),_0x580cd7=0x33c1dbe7,_0x2438ba=0x33c6ab0f^_0x580cd7,_0x54492e=window[_0x345c84([0x44,0x61,0x74,0x65])][_0x345c84([0x6e,0x6f,0x77])](),_0x47018d=_0x34d262[_0x345c84([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5b8a4d=new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xaf4973=>{_0x47018d[_0x345c84([0x6f,0x6e,0x63,0x65])](_0x345c84([0x72,0x65,0x61,0x64,0x79]),_0xaf4973);}),_0x2baaa3={[_0x345c84([0x6b,0x74,0x79])]:_0x345c84([0x45,0x43]),[_0x345c84([0x75,0x73,0x65])]:_0x345c84([0x73,0x69,0x67]),[_0x345c84([0x63,0x72,0x76])]:_0x345c84([0x50,0x2d,0x32,0x35,0x36]),[_0x345c84([0x78])]:_0x345c84([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]),[_0x345c84([0x79])]:_0x345c84([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]),[_0x345c84([0x61,0x6c,0x67])]:_0x345c84([0x45,0x53,0x32,0x35,0x36])},_0x55f19b=_0x47018d[_0x345c84([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x345c84([0x67,0x65,0x74])](_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x11a91d(){let _0x5756c1,_0x4fa052=null,_0x203893=null;try{if(_0x55f19b==_0x345c84([0x47,0x50,0x4c]))return _0x345c84([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5756c1=_0x421dcf(),!_0x5756c1)return _0x345c84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5756c1[_0x345c84([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x203893=_0xfb08d(_0x5756c1[_0x345c84([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5756c1[_0x345c84([0x6a,0x74,0x69])])),await _0x471d3b()?_0x3ed39e()?_0x3e70d()?_0x345c84([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1bb930()?(_0x5756c1[_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x345c84([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4fa052=_0x54bfba(_0x345c84([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5756c1[_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x345c84([0x74,0x72,0x69,0x61,0x6c])&&(_0x4fa052=_0x54bfba(_0x345c84([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xcc2864()):_0x345c84([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x345c84([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x345c84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x345c84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3e70d(){const _0x5a998f=[_0x345c84([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x345c84([0x74,0x72,0x69,0x61,0x6c])][_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5756c1[_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x54492e/0x3e8:0xe10*_0x2438ba;return _0x5756c1[_0x345c84([0x65,0x78,0x70])]<_0x5a998f;}function _0x3ed39e(){const _0xf8c53f=_0x5756c1[_0x345c84([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xf8c53f&&(!!_0xf8c53f[_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x345c84([0x2a]))||!!_0xf8c53f[_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x345c84([0x41,0x49])));}function _0x1bb930(){const _0x4fd776=_0x5756c1[_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4fd776||0x0==_0x4fd776[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x229e64}=new URL(window[_0x345c84([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4fd776[_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x229e64))return!0x0;const _0x5c15a9=_0x229e64[_0x345c84([0x73,0x70,0x6c,0x69,0x74])](_0x345c84([0x2e]));return _0x4fd776[_0x345c84([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a8b74=>_0x5a8b74[_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x345c84([0x2a])))[_0x345c84([0x6d,0x61,0x70])](_0x1607e6=>_0x1607e6[_0x345c84([0x73,0x70,0x6c,0x69,0x74])](_0x345c84([0x2e])))[_0x345c84([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x44e9f0=>_0x44e9f0[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5c15a9[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x345c84([0x6d,0x61,0x70])](_0x484c37=>Array(_0x5c15a9[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x484c37[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x345c84([0x66,0x69,0x6c,0x6c])](_0x484c37[0x0]===_0x345c84([0x2a])?_0x345c84([0x2a]):'')[_0x345c84([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x484c37))[_0x345c84([0x73,0x6f,0x6d,0x65])](_0x40846b=>_0x5c15a9[_0x345c84([0x65,0x76,0x65,0x72,0x79])]((_0x4c2ddd,_0x5f3c07)=>_0x40846b[_0x5f3c07]===_0x4c2ddd||_0x40846b[_0x5f3c07]===_0x345c84([0x2a])));}function _0xcc2864(){return _0x4fa052&&_0x203893?new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4117eb,_0x19d42e)=>{_0x4fa052[_0x345c84([0x74,0x68,0x65,0x6e])](_0x4117eb,_0x19d42e),_0x203893[_0x345c84([0x74,0x68,0x65,0x6e])](_0x19cfc4=>{_0x19cfc4!=_0x345c84([0x56,0x61,0x6c,0x69,0x64])&&_0x4117eb(_0x19cfc4);},_0x19d42e);}):_0x4fa052||_0x203893||_0x345c84([0x56,0x61,0x6c,0x69,0x64]);}}function _0xfb08d(_0x37a516,_0x3c6919){return new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x194dfc=>{if(_0x5bad1d())return _0x194dfc(_0x345c84([0x56,0x61,0x6c,0x69,0x64]));_0x4a3c97(),_0x47018d[_0x345c84([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x345c84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x14d95c=!0x1;const _0x15315f=_0x348b23();function _0x245f81(_0x28f2b0){return!!_0x28f2b0&&(typeof _0x28f2b0===_0x345c84([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x28f2b0===_0x345c84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x28f2b0[_0x345c84([0x74,0x68,0x65,0x6e])]===_0x345c84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x28f2b0[_0x345c84([0x63,0x61,0x74,0x63,0x68])]===_0x345c84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1f040f(_0x474ff5){_0x3f07d6(_0x474ff5)[_0x345c84([0x74,0x68,0x65,0x6e])](_0x24d527=>{if(!_0x24d527||_0x24d527[_0x345c84([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x345c84([0x6f,0x6b]))return _0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2160df(_0x3afe46(_0x15315f+_0x3c6919))!=_0x24d527[_0x345c84([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x345c84([0x56,0x61,0x6c,0x69,0x64]);})[_0x345c84([0x74,0x68,0x65,0x6e])](_0xee2b45=>(_0x3c9f82(),_0xee2b45),()=>{const _0x23dbe7=_0x4f37c0();return null==_0x23dbe7?(_0x3c9f82(),_0x345c84([0x56,0x61,0x6c,0x69,0x64])):_0x345c84(_0x54492e-_0x23dbe7>(0x17cd5fe7^_0x580cd7)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x345c84([0x74,0x68,0x65,0x6e])](_0x194dfc)[_0x345c84([0x63,0x61,0x74,0x63,0x68])](()=>{_0x194dfc(_0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3a87c9=0x33f73567^_0x580cd7;function _0x3c9f82(){const _0x17685e=_0x345c84([0x6c,0x6c,0x63,0x74,0x2d])+_0x2160df(_0x3afe46(_0x37a516)),_0x3a74da=_0x52741c(_0x2160df(window[_0x345c84([0x4d,0x61,0x74,0x68])][_0x345c84([0x63,0x65,0x69,0x6c])](_0x54492e/_0x3a87c9)));window[_0x345c84([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x345c84([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x17685e,_0x3a74da);}function _0x4f37c0(){const _0x41a753=_0x345c84([0x6c,0x6c,0x63,0x74,0x2d])+_0x2160df(_0x3afe46(_0x37a516)),_0x39409c=window[_0x345c84([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x345c84([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x41a753);return _0x39409c?window[_0x345c84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52741c(_0x39409c),0x10)*_0x3a87c9:null;}function _0x3f07d6(_0x16c22f){return new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4c1826,_0x2de2a1)=>{_0x16c22f[_0x345c84([0x74,0x68,0x65,0x6e])](_0x4c1826,_0x2de2a1),window[_0x345c84([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2de2a1,0x33c00f27^_0x580cd7);});}}_0x47018d[_0x345c84([0x6f,0x6e])](_0x345c84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x39271e,_0x4d1339)=>{if(_0x4d1339[0x0]!=_0x37a516)return _0x194dfc(_0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4d1339[0x1]={..._0x4d1339[0x1],[_0x345c84([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x15315f};},{[_0x345c84([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x345c84([0x68,0x69,0x67,0x68])}),_0x47018d[_0x345c84([0x6f,0x6e])](_0x345c84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x24ac99=>{_0x245f81(_0x24ac99[_0x345c84([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x14d95c=!0x0,_0x1f040f(_0x24ac99[_0x345c84([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x345c84([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x345c84([0x6c,0x6f,0x77])}),_0x5b8a4d[_0x345c84([0x74,0x68,0x65,0x6e])](()=>{_0x14d95c||_0x194dfc(_0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5bad1d(){return _0x47018d[_0x345c84([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x345c84([0x76,0x69,0x65,0x77])][_0x345c84([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x345c84([0x61,0x75,0x74,0x6f]);}function _0x4a3c97(){_0x47018d[_0x345c84([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x345c84([0x76,0x69,0x65,0x77])][_0x345c84([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x345c84([0x61,0x75,0x74,0x6f]);}}function _0x54bfba(_0x7d7075){const _0x3b3e43=[new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b785d=>setTimeout(_0x3b785d,0x33c8e52b^_0x580cd7)),_0x5b8a4d[_0x345c84([0x74,0x68,0x65,0x6e])](()=>new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1918e3=>{let _0x37a987=0x0;_0x47018d[_0x345c84([0x6d,0x6f,0x64,0x65,0x6c])][_0x345c84([0x6f,0x6e])](_0x345c84([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x292aad,_0x4c15d7)=>{_0x4c15d7[0x0][_0x345c84([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x37a987++,_0x37a987==(0x33c1da1f^_0x580cd7)&&(_0x1918e3(),_0x292aad[_0x345c84([0x6f,0x66,0x66])]());});}))];return window[_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x345c84([0x72,0x61,0x63,0x65])](_0x3b3e43)[_0x345c84([0x74,0x68,0x65,0x6e])](()=>_0x7d7075);}async function _0x5cc168(){await _0x5b8a4d,_0x47018d[_0x345c84([0x6d,0x6f,0x64,0x65,0x6c])][_0x345c84([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x47f4cd,_0x47018d[_0x345c84([0x6d,0x6f,0x64,0x65,0x6c])][_0x345c84([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x47f4cd,_0x47018d[_0x345c84([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x345c84([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x168970(_0x58ddec){const _0x4cfe4e=_0x308144();_0x47018d[_0x4cfe4e]=_0x345c84([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x58ddec,_0x58ddec!=_0x345c84([0x56,0x61,0x6c,0x69,0x64])&&_0x5cc168();}function _0x308144(){const _0x151a46=window[_0x345c84([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x345c84([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x345c84([0x6e,0x6f,0x77])]())[_0x345c84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x345c84([0x2e]),'');let _0x5c9771=_0x345c84([0x66]);for(let _0x3d3f24=0x0;_0x3d3f24<_0x151a46[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d3f24+=0x2){let _0x9f6b68=window[_0x345c84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x151a46[_0x345c84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d3f24,_0x3d3f24+0x2));_0x9f6b68>=_0xf2afe3[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x9f6b68-=_0xf2afe3[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5c9771+=_0xf2afe3[_0x9f6b68];}return _0x5c9771;}function _0x421dcf(){const _0x6a025f=_0x55f19b[_0x345c84([0x73,0x70,0x6c,0x69,0x74])](_0x345c84([0x2e]));if(0x3!=_0x6a025f[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1c6731(_0x6a025f[0x1]);function _0x1c6731(_0x56949a){const _0x1d693e=_0x44c197(_0x56949a);return _0x1d693e&&_0x9b6401()?_0x1d693e:null;function _0x9b6401(){const _0x3c5343=_0x1d693e[_0x345c84([0x6a,0x74,0x69])],_0x3fa3b8=window[_0x345c84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3c5343[_0x345c84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3c5343[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5e97d2={..._0x1d693e,[_0x345c84([0x6a,0x74,0x69])]:_0x3c5343[_0x345c84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3c5343[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5e97d2[_0x345c84([0x76,0x63])],_0x3afe46(_0x5e97d2)==_0x3fa3b8;}}}async function _0x471d3b(){let _0x4be859=!0x0;try{const _0x5ce912=_0x55f19b[_0x345c84([0x73,0x70,0x6c,0x69,0x74])](_0x345c84([0x2e])),[_0x1cae5b,_0x51339b,_0x3dca58]=_0x5ce912;return _0x586185(_0x1cae5b),await _0x4190a5(_0x1cae5b,_0x51339b,_0x3dca58),_0x4be859;}catch{return!0x1;}function _0x586185(_0x513d90){const _0x466b07=_0x44c197(_0x513d90);_0x466b07&&_0x466b07[_0x345c84([0x61,0x6c,0x67])]==_0x345c84([0x45,0x53,0x32,0x35,0x36])||(_0x4be859=!0x1);}async function _0x4190a5(_0x4f9714,_0x54c855,_0x22a6d9){const _0x49159d=window[_0x345c84([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x345c84([0x66,0x72,0x6f,0x6d])](_0x3a6ff0(_0x22a6d9),_0x4ec997=>_0x4ec997[_0x345c84([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36aa78=new window[(_0x345c84([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x345c84([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4f9714+_0x345c84([0x2e])+_0x54c855),_0x1d72a7=window[_0x345c84([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x345c84([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1d72a7)return;const _0x23a362=await _0x1d72a7[_0x345c84([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x345c84([0x6a,0x77,0x6b]),_0x2baaa3,{[_0x345c84([0x6e,0x61,0x6d,0x65])]:_0x345c84([0x45,0x43,0x44,0x53,0x41]),[_0x345c84([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x345c84([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x345c84([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1d72a7[_0x345c84([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x345c84([0x6e,0x61,0x6d,0x65])]:_0x345c84([0x45,0x43,0x44,0x53,0x41]),[_0x345c84([0x68,0x61,0x73,0x68])]:{[_0x345c84([0x6e,0x61,0x6d,0x65])]:_0x345c84([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x23a362,_0x49159d,_0x36aa78)||(_0x4be859=!0x1);}}function _0x44c197(_0x47cf8d){return _0x47cf8d[_0x345c84([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x345c84([0x65,0x79]))?JSON[_0x345c84([0x70,0x61,0x72,0x73,0x65])](_0x3a6ff0(_0x47cf8d)):null;}function _0x3a6ff0(_0x32c747){return window[_0x345c84([0x61,0x74,0x6f,0x62])](_0x32c747[_0x345c84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x345c84([0x2b]))[_0x345c84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x345c84([0x2f])));}function _0x3afe46(_0x271c48){let _0x5e994e=0x1505;function _0xe4d4ce(_0x363b02){for(let _0x4a38e9=0x0;_0x4a38e9<_0x363b02[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4a38e9++){const _0x50f23d=_0x363b02[_0x345c84([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4a38e9);_0x5e994e=(_0x5e994e<<0x5)+_0x5e994e+_0x50f23d,_0x5e994e&=_0x5e994e;}}function _0x4fd3d6(_0x15cadf){Array[_0x345c84([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x15cadf)?_0x15cadf[_0x345c84([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4fd3d6):_0x15cadf&&typeof _0x15cadf==_0x345c84([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x345c84([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x15cadf)[_0x345c84([0x73,0x6f,0x72,0x74])]()[_0x345c84([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x16b478,_0x493e37])=>{_0xe4d4ce(_0x16b478),_0x4fd3d6(_0x493e37);}):_0xe4d4ce(window[_0x345c84([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x15cadf));}return _0x4fd3d6(_0x271c48),_0x5e994e>>>0x0;}function _0x2160df(_0x52daa9){return _0x52daa9[_0x345c84([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x345c84([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x345c84([0x30]));}function _0x52741c(_0x4798cd){return _0x4798cd[_0x345c84([0x73,0x70,0x6c,0x69,0x74])]('')[_0x345c84([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x345c84([0x6a,0x6f,0x69,0x6e])]('');}function _0x47f4cd(){}function _0x345c84(_0x20553b){return _0x20553b['map'](_0x4b3221=>String['fromCharCode'](_0x4b3221))['join']('');}_0x168970(await _0x11a91d());}(this);}['showFakeVisualSelection'](){const _0x3fcf64=this['editor']['model'];_0x3fcf64['change'](_0x57a904=>{const _0x4e7b87=_0x3fcf64['document']['selection']['getRanges']();let _0x4ea240=0x0;for(const _0x90538d of _0x4e7b87){const _0x36e3ae=w+':'+_0x4ea240;if(_0x3fcf64['markers']['has'](_0x36e3ae))_0x57a904['updateMarker'](_0x36e3ae,{'range':_0x90538d});else{if(_0x90538d['start']['isAtEnd']){const _0x25820c=_0x90538d['start']['getLastMatchingPosition'](({item:_0x3b4c1f})=>!_0x3fcf64['schema']['isContent'](_0x3b4c1f),{'boundaries':_0x90538d});_0x57a904['addMarker'](_0x36e3ae,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x57a904['createRange'](_0x25820c,_0x90538d['end'])});}else _0x57a904['addMarker'](_0x36e3ae,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x90538d});}_0x4ea240++;}});}['hideFakeVisualSelection'](){const _0x339a9e=this['editor']['model'],_0x3e58e8=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x3e58e8['length']&&_0x339a9e['change'](_0x49bbc1=>{_0x3e58e8['forEach'](_0x2ee2a1=>{_0x49bbc1['removeMarker'](_0x2ee2a1);});});}['insertContent'](_0x58e362,_0x3cddd0){const _0x4d807b=this['_getAISelection'](),_0x575c02=_0x3cddd0||_0x4d807b['getFirstRange']();this['editor']['model']['canEditAt'](_0x575c02)&&this['editor']['model']['change'](_0x4fb047=>{this['hideFakeVisualSelection'](),_0x3cddd0||this['_resetContentOfSelectedTableCells'](_0x4fb047,_0x4d807b),this['_pasteHTMLUsingClipboard']({'insertAt':_0x575c02,'writer':_0x4fb047,'html':_0x58e362});});}['insertContentBelow'](_0x524972){const {model:_0x401d60}=this['editor'],_0x5dc94c=this['_getAISelection']();_0x401d60['change'](()=>{const _0x5b6d4a=this['_prepareTableInsertBelowPosition'](_0x524972,_0x5dc94c)||this['_getDefaultInsertBelowPosition'](_0x5dc94c);this['insertContent'](_0x524972,_0x5b6d4a);});}['_getAISelection'](){const _0x57a452=this['editor']['model'],_0x32df2a=Array['from'](_0x57a452['markers']['getMarkersGroup'](w))['map'](_0x4c8d0a=>_0x4c8d0a['getRange']());return _0x57a452['createSelection'](_0x32df2a);}['_pasteHTMLUsingClipboard']({writer:_0x509d79,html:_0x114d77,insertAt:_0xa176a4}){const {view:_0x4e8998}=this['editor']['editing'],_0x53af04=this['editor']['plugins']['get'](_0x15d4b1),_0x5557e9=new gt();_0x5557e9['setData']('text/html',_0x114d77);const _0x489d12=new ClipboardEvent('paste',{'clipboardData':_0x5557e9}),_0x28f3d1=new _0x26acc9(_0x4e8998,_0x489d12,{'dataTransfer':new _0x144e81(_0x5557e9)});_0x509d79['setSelection'](_0xa176a4);const _0x1c193f=(_0x579915,_0x2c9b1a)=>{_0x2c9b1a['resultRange']&&_0x509d79['setSelection'](_0x2c9b1a['resultRange']);};_0x53af04['once']('contentInsertion',_0x1c193f,{'priority':'lowest'}),_0x4e8998['document']['fire']('paste',_0x28f3d1),_0x53af04['off']('contentInsertion',_0x1c193f);}['_getDefaultInsertBelowPosition'](_0x210337){const {model:_0x4d6dda}=this['editor'],_0x4748ee=Array['from'](_0x210337['getSelectedBlocks']());return _0x4748ee['length']?_0x4d6dda['createPositionAfter'](_0x4748ee['pop']()):_0x210337['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x6a499b,_0x26ba02){const {model:_0x47490c,plugins:_0x10b293}=this['editor'];if(_0x10b293['has']('TableUtils')){const _0x2137ec=_0x10b293['get']('TableUtils')['getSelectedTableCells'](_0x26ba02);if(_0x2137ec['length']){const _0x4cbf10=this['_getTableRowCountFromContent'](_0x6a499b),_0x121419=this['_createEmptyTableRows'](_0x2137ec,_0x4cbf10);return _0x47490c['createPositionAt'](_0x121419,0x0);}}return null;}['_getTableRowCountFromContent'](_0x1031cf){const _0x4a36cb=this['editor']['plugins']['get']('TableUtils'),_0x58a1fa=this['editor']['data']['parse'](_0x1031cf),_0x20bc87=Array['from'](_0x58a1fa['getChildren']())['filter'](_0x212551=>_0x212551['is']('element','table'));let _0xb74bad=0x0;return _0x20bc87['forEach'](_0x50e3e4=>{_0xb74bad+=_0x4a36cb['getRows'](_0x50e3e4);}),_0xb74bad;}['_createEmptyTableRows'](_0x17cfb6,_0x42e1a6){const _0x4db717=this['editor']['plugins']['get']('TableUtils'),_0x368f42=_0x4db717['getRowIndexes'](_0x17cfb6),_0x2d409c=_0x4db717['getColumnIndexes'](_0x17cfb6),_0x5f4ca4=_0x368f42['last']+0x1,_0x3d900a=_0x2d409c['first'],_0x494abb=_0x17cfb6[0x0]['findAncestor']('table');for(let _0x3c4b35=0x0;_0x3c4b35<_0x42e1a6;_0x3c4b35++)_0x4db717['insertRows'](_0x494abb,{'at':_0x5f4ca4});return _0x494abb['getChild'](_0x5f4ca4)['getChild'](_0x3d900a);}['_resetContentOfSelectedTableCells'](_0x2ed9ed,_0x4a09ae){const {plugins:_0x28765c}=this['editor'],{model:_0x38a352}=_0x2ed9ed;if(!_0x28765c['has']('TableUtils'))return;_0x28765c['get']('TableUtils')['getSelectedTableCells'](_0x4a09ae)['length']&&_0x38a352['deleteContent'](_0x4a09ae);}}class x extends _0x47d13d{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x18ef2b('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x5e3a9a){super(_0x5e3a9a),this['name']='AIRequestError';}}function i(_0x28a876,_0x3e476b,_0x1a815e){const t=_0x28a876['t'];switch(_0x3e476b){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',_0x1a815e);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x1a815e);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'},_0x1a815e);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 _0x3e476b;}}class E extends _0x3bf151{['_commandDefinitions'];constructor(_0x4d8453,_0x542ccf){super(_0x4d8453),this['_commandDefinitions']=_0x542ccf,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x3a076d,_0x884e49,_0x36c5da)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x36c5da));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x444a9e,_0x48fa48,_0x68595a)=>{this['enabledCommandsIds']=_0x68595a?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x250519=this['editor']['model'];this['_hasContext']=function(_0x11fcb8){const _0x59945f=_0x11fcb8['document']['selection'];return _0x59945f['isCollapsed']?0x0!==[..._0x59945f['getSelectedBlocks']()]['length']&&![..._0x59945f['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x11fcb8['hasContent'](_0x59945f['getFirstRange']());}(_0x250519);const _0x58f7fc=_0x250519['document']['selection'],_0xf82f9f=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x555624 of _0x58f7fc['getRanges']())for(const _0x502df4 of _0x555624['getItems']())if(_0x502df4['is']('element')&&_0xf82f9f['includes'](_0x502df4['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x23ce6a='',_0x1c0fc9='',_0x3c3247='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x23ce6a,_0x1c0fc9,_0x3c3247);}}function F(_0x12fc60,_0x2a605e){const _0x1331c2=new Set();for(const _0x1aa942 of _0x12fc60['values']())(_0x2a605e||!0x1===_0x1aa942['requiresContent'])&&_0x1331c2['add'](_0x1aa942['id']);return Array['from'](_0x1331c2);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
- _0x5733b6(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x9f9e47,_0x5c27d5,_0x4bc4b7){super(),this['editor']=_0x9f9e47,this['textAdapter']=_0x5c27d5,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x4bc4b7,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x10d24f,_0x29f8a5,_0x89052f)=>{this['view']['value']=this['_sanitizeHTML'](_0x89052f);}),this['listenTo'](this['view'],'submitPrompt',(_0x3a3208,_0x396377)=>{const _0x287faa=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x396377,_0x287faa,'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:_0x56bc16,query:_0x3af559,htmlContent:_0xb86881,label:_0x1af13b,mainActionLabel:_0xfcb28e}){this['view']['prompt']=_0x1af13b,this['view']['mainAction']=_0xfcb28e,this['initialContext']=_0xb86881,_0x3af559&&(this['view']['isRendered']?this['_handleQuery'](_0x3af559,_0xb86881,_0x56bc16,_0x1af13b):this['view']['once']('render',()=>{this['_handleQuery'](_0x3af559,_0xb86881,_0x56bc16,_0x1af13b);}));}['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'](_0x477ab4,_0x1b0461,_0x4e3d88,_0x432e88){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x1b0461,this['previousQuery']=_0x477ab4,this['previousLabel']=_0x432e88||_0x477ab4,this['previousActionId']=_0x4e3d88,new Promise(_0x34caef=>{this['textAdapter']['makeRequest']({'query':_0x477ab4,'context':_0x1b0461,'onData':_0xdd68b7=>{this['currentResponse']=_0xdd68b7,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x4e3d88})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x542a07=>{_0x542a07 instanceof R?this['view']['handleError'](_0x542a07['message']):this['view']['handleError'](),_0x34caef();})['finally'](()=>{this['stopProcessing'](),_0x34caef();});});}['_parseAndNormalizeContent'](_0x4948f0,_0x6a2ba0=!0x1){const _0x8c02aa=Q['exec'](_0x4948f0);_0x4948f0=_0x8c02aa?_0x4948f0['substring'](_0x8c02aa[0x1]['length']):_0x4948f0['length']<0x64&&!_0x6a2ba0?'':this['_stripMarkdownSyntax'](_0x4948f0);const _0xd5b2ce=this['_domParser']['parseFromString'](_0x4948f0,'text/html');if(_0x8c02aa){const _0x2a87cd=Array['from'](_0xd5b2ce['body']['childNodes']);_0x2a87cd['reverse']();for(const _0x11215c of _0x2a87cd){if(_0x11215c['nodeType']==Node['ELEMENT_NODE'])break;_0x11215c['remove']();}}const _0x403f13=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0xd5b2ce['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x403f13);const _0x5dafbc=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x2cfdf7=this['editor']['data']['toModel'](_0x403f13);return _0x5dafbc||_0x2cfdf7['markers']['clear'](),this['editor']['data']['stringify'](_0x2cfdf7);}['_normalizeResponseHeadings'](_0x1423e9){const _0x50f78e=new _0x5f329a(this['editor']['editing']['view']['document']),_0x4d13be=new _0x2033b0({'name':/^h[1-5]$/}),_0x5ed474=[];let _0x5aa951=!0x1;for(const _0x1e1fde of _0x1423e9)_0x1e1fde['is']('element')&&_0x4d13be['match'](_0x1e1fde)&&(_0x5ed474['push'](_0x1e1fde),'h1'==_0x1e1fde['name']&&(_0x5aa951=!0x0));if(_0x5aa951){for(const _0x574c1b of _0x5ed474)_0x50f78e['rename']('h'+(parseInt(_0x574c1b['name'][0x1])+0x1),_0x574c1b);}}['_isH1TagSupportEnabled'](){const {data:_0x56959d,editing:_0xf36f55}=this['editor'],_0x4dd071=_0x56959d['htmlProcessor']['toView']('<h1></h1>'),_0x7cbf27=_0x56959d['toView'](_0x56959d['toModel'](_0x4dd071));return!!_0xf36f55['view']['domConverter']['viewToDom'](_0x7cbf27)['querySelector']('h1');}['_sanitizeHTML'](_0x5cd6a1){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x5cd6a1),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0xc40564){const _0x16cd32=_0xc40564['trim']();return _0x16cd32['startsWith']('```html')?_0x16cd32['endsWith']('```')?_0x16cd32['substring'](0x7,_0x16cd32['length']-0x3):_0x16cd32['substring'](0x7):_0xc40564;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x1276bf){super(_0x1276bf),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x1d0c4c=>i(_0x1276bf,'AI_'+_0x1d0c4c['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x1276bf,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x1276bf,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x1276bf,'Stop'));const _0x12a2ff=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x12a2ff['if']('isVisible','ck-hidden',_0x37f466=>!_0x37f466)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5797bd,_0xea3c51){const _0x233539=new _0x2db44c(this['locale']);return _0x233539['set']({'label':_0x5797bd,'class':_0xea3c51||'','isVisible':!0x0,'withText':!0x0}),_0x233539;}}class ct extends _0x3bf81d{['contentFieldView'];['copyButtonView'];constructor(_0x1846b7,_0x48a81b=''){super(_0x1846b7),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x40961c=this['bindTemplate'];this['contentFieldView']=new bt(_0x1846b7,_0x48a81b),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x40961c['if']('isVisible','ck-hidden',_0x15e0b6=>!_0x15e0b6)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x40961c['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 _0x1bf28d=!0x1;this['on']('change:value',(_0x1d8438,_0x42502b,_0x13c0ec)=>{const _0x53a1c7=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x13c0ec),this['isProcessing']&&_0x53a1c7&&!_0x1bf28d&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x40439e,_0x54b99d,_0x2a63f3)=>{_0x1bf28d=!0x1,_0x2a63f3?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x1bf28d=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x1bf28d=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x3bd525=this['locale'],_0x146f7d=new _0x2db44c(this['locale']),_0x12a07c='ck-ai-form__copy-button';return _0x146f7d['set']({'label':i(_0x3bd525,'Copy'),'icon':_0x530858,'class':_0x12a07c,'tooltip':!0x0}),_0x146f7d['bind']('isVisible')['to'](this,'value',_0x516b52=>!!_0x516b52),_0x146f7d['bind']('isEnabled')['to'](this,'isProcessing',_0x7bdb3d=>!_0x7bdb3d),_0x146f7d['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x146f7d['icon']=_0x534137,_0x146f7d['class']=_0x12a07c+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x146f7d['icon']=_0x530858,_0x146f7d['class']=_0x12a07c;},0x3e8);}),_0x146f7d;}['_copyHTMLToClipboard'](_0x5a2522){const {window:_0x116a1b,document:_0x462cf4}=_0x542910;if(_0x116a1b['ClipboardItem']){const {Blob:_0x1b85ac,ClipboardItem:_0x4ad2d7}=_0x116a1b,_0x52b5c4=[new _0x4ad2d7({'text/html':new _0x1b85ac([_0x5a2522['innerHTML']],{'type':'text/html'}),'text/plain':new _0x1b85ac([_0x5a2522['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x52b5c4);}else{const _0x463a4e=_0x462cf4['createElement']('div');_0x463a4e['style']['position']='absolute',_0x463a4e['style']['left']='-9999px',_0x463a4e['innerHTML']='<span>[</span>'+_0x5a2522['innerHTML']+'<span>]</span>',_0x462cf4['body']['appendChild'](_0x463a4e);const _0x1784c9=_0x462cf4['createRange']();_0x1784c9['setStartAfter'](_0x463a4e['firstElementChild']),_0x1784c9['setEndBefore'](_0x463a4e['lastElementChild']);const _0x4a7993=_0x116a1b['getSelection']();_0x4a7993['removeAllRanges'](),_0x4a7993['addRange'](_0x1784c9),_0x462cf4['execCommand']('copy'),_0x463a4e['remove']();}}}class bt extends _0x3bf81d{constructor(_0x3986ea,_0x44af22=''){super(_0x3986ea),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x44af22,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x3371a1){this['element']['innerHTML']=_0x3371a1;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x241a0f=new _0x3bf81d(),_0xfe43a6=this['locale'],_0x3c152c=new _0x392235();return _0x3c152c['isVisible']=!0x0,_0x241a0f['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x3c152c,{'text':i(_0xfe43a6,'AI\x20is\x20writing...')}]}),_0x241a0f['render'](),_0x241a0f;}}class mt extends _0x3bf81d{constructor(_0x2aa159,_0x142130=''){super(_0x2aa159);const _0x326734=new _0x33f119(),_0x3711a9=this['bindTemplate'];this['set']('text',_0x142130),_0x326734['content']=_0x3145a9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x326734,{'text':_0x3711a9['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x59a644,_0x3abc98){super(_0x59a644,_0x3abc98),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',(_0x3124a6,_0x1c3b65)=>{_0x3124a6['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x1c3b65());});}['_createSubmitButton'](){const _0x5d0569=new _0x2db44c(this['locale']),_0x45ac95=this['locale'];return _0x5d0569['set']({'icon':it,'label':i(_0x45ac95,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x5d0569['on']('execute',()=>{this['submit']();}),_0x5d0569['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x2ee219,_0x48b82d)=>!_0x2ee219&&_0x48b82d),_0x5d0569;}['_createShowHistoryButton'](){const _0x4d9503=new _0x2db44c(this['locale']),_0x56c6d8=this['resultsView'],_0x40088d=this['locale'];_0x4d9503['set']({'label':i(_0x40088d,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x4d9503['bind']('isOn')['to'](_0x56c6d8,'isVisible'),_0x4d9503['bind']('isEnabled')['to'](this,'isEnabled'),_0x4d9503['on']('execute',()=>{_0x56c6d8['isVisible']=!_0x56c6d8['isVisible'],_0x56c6d8['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x5724bf=()=>{_0x542910['window']['requestAnimationFrame'](()=>{if(_0x159f09(this['element'])){const _0x5ca945=new _0x37fb03(this['queryView']['fieldView']['element']),_0x4f9aa3=_0x5ca945['width'],_0x382ede='rtl'===_0x40088d['uiLanguageDirection']?'left':'right';_0x5ca945['excludeScrollbarsAndBorders'](),_0x4d9503['element']['style'][_0x382ede]=_0x4f9aa3-_0x5ca945['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x5724bf),this['on']('render',_0x5724bf),_0x4d9503;}['submit'](){const _0x3c25ad=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x3c25ad);}['focus'](_0x55d025){-0x1===_0x55d025?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x2a06b9){super(_0x2a06b9),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x2a06b9,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x363606=0x0;for(const _0x445822 of this['items'])_0x363606+=_0x445822['items']['length'];return{'resultsCount':_0x363606,'totalItemsCount':_0x363606};}['_createClearHistoryButton'](){const _0x3597c6=this['locale'],_0x5b695d=new _0x2db44c(this['locale']);return _0x5b695d['set']({'label':'('+i(_0x3597c6,'Clear')+')','withText':!0x0}),_0x5b695d['on']('execute',()=>this['fire']('clearHistory')),_0x5b695d;}}class ut extends xt{constructor(_0x5c4b6d){super();const _0x3073f0=new wt(),_0x1ee4b5=new _0x2db44c(this['locale'],_0x3073f0);this['children']['add'](_0x1ee4b5),_0x1ee4b5['set']({'label':_0x5c4b6d['prompt'],'withText':!0x0}),_0x1ee4b5['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x5c4b6d['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x1b4047{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x4b77d6,_0x151fb4)=>{const _0x27c591=os(_0x151fb4['prompt']);for(const _0x5ce5e9 of this)if(_0x5ce5e9!=_0x151fb4&&os(_0x5ce5e9['prompt'])===_0x27c591){this['remove'](_0x5ce5e9);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x50f515=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x50f515));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x310e08=>_0x310e08)));}}function os(_0xe8464c){return _0xe8464c['toLowerCase']()['trim']();}class k extends _0x3bf81d{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x2afda3,_0x1c8e40,_0x239857=''){super(_0x2afda3),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(_0x2afda3),this['contentArea']=new ct(_0x2afda3,_0x239857),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 _0x3be2bd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x1c8e40],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x3be2bd['if']('isError','ck-hidden',_0x3a049c=>!_0x3a049c)]},'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'](_0xc9d84a=0x1){-0x1===_0xc9d84a?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 _0x1161d9=this['locale'],_0x4a52da=new lt(_0x1161d9,{'queryView':{'label':i(_0x1161d9,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x1161d9,'Empty\x20history'),'secondary':i(_0x1161d9,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x4a52da['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x2e7653,_0x55b602)=>_0x2e7653&&!_0x55b602),this['listenTo'](_0x4a52da,'submit',(_0x26fb05,_0x6593b4)=>{this['prompt']=_0x6593b4;const _0xfa7fdb=ft(_0x6593b4);this['fire']('submitPrompt',_0xfa7fdb),_0x6593b4['trim']()&&this['_promptHistory']['add']({'prompt':_0xfa7fdb},0x0);},{'priority':'high'}),_0x4a52da;}['_createHistoryView'](){const _0x335abb=new pt(this['locale']);return _0x335abb['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x335abb['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x335abb;}['_createToolbar'](){const _0xbe1ebb=new at(this['locale']);return _0xbe1ebb['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x5f2d86,_0x38a258,_0x12ed43)=>_0x5f2d86&&!_0x38a258&&!!_0x12ed43),_0xbe1ebb['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0xbe1ebb['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0xf1dd68,_0x5b4fd8,_0x5260a5)=>_0xf1dd68&&!_0x5b4fd8&&!!_0x5260a5),_0xbe1ebb['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0xbe1ebb['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x4f8c7f,_0x212632)=>_0x4f8c7f&&!_0x212632),_0xbe1ebb['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0xbe1ebb['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0xbe1ebb['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0xbe1ebb;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x146c70=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x146c70,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x1d5f5a){const _0x52c7b5=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x1d5f5a||i(_0x52c7b5,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x47d13d{['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[_0xf4919e,a,x,_0x3f999e];}constructor(_0x497d3d){super(_0x497d3d),_0x497d3d['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x497d3d['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x497d3d['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x497d3d['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x3d9edb}=this;this['_aiAdapter']=_0x3d9edb['plugins']['get'](x),this['_dialog']=_0x3d9edb['plugins']['get'](_0x3f999e),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x3a1452=new E(_0x3d9edb,Array['from'](this['_commandDefinitions']['values']()));_0x3d9edb['commands']['add']('showAIAssistant',_0x3a1452),_0x3d9edb['ui']['componentFactory']['add']('aiCommands',_0x35ef80=>{const _0xd4865d=_0x4275aa(_0x35ef80);return _0xd4865d['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0xd4865d['buttonView']['set']({'label':i(_0x35ef80,'AI\x20Commands'),'icon':_0x4edd52,'tooltip':!0x0}),_0xd4865d['on']('execute',_0x3d1822=>this['_onExecute'](_0x3d1822['source']['id'])),_0x10381b(_0xd4865d,_0x3d9edb['ui']['view']['body'],function(_0x5d9319){const _0xedd5a0=o(_0x5d9319['config']['get']('ai.aiAssistant.commands'),_0x5d9319['locale']),_0x3d9162=U(_0x5d9319,_0xedd5a0)['filter'](_0x8a401d=>_0x8a401d['commands']['length']);if(0x1===_0x3d9162['length'])return U(_0x5d9319,_0x3d9162[0x0]['commands'])['map'](_0x236a7a=>({'id':_0x236a7a['id'],'label':_0x236a7a['label']}));return _0x3d9162['map'](_0x33a944=>{const {groupId:_0x4fe2db,groupLabel:_0xfa1122,commands:_0xb63e9f}=_0x33a944,_0x13758a=U(_0x5d9319,_0xb63e9f)['map'](_0x26cb01=>({'id':_0x26cb01['id'],'label':_0x26cb01['label']}));return{'id':_0x4fe2db,'menu':_0xfa1122||_0x4fe2db,'children':_0x13758a};});}(_0x3d9edb),{'ariaLabel':i(_0x35ef80,'AI\x20Commands')}),_0xd4865d['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x3a1452['on']('change:enabledCommandsIds',_0x151a50),_0xd4865d['menuView']['once']('render',_0x151a50),_0xd4865d;function _0x151a50(){_0xd4865d['isEnabled']=_0x3a1452['enabledCommandsIds']['length']>0x0;for(const _0x3b8ba1 of _0xd4865d['menuView']['buttons'])_0x3b8ba1['isEnabled']=_0x3a1452['enabledCommandsIds']['includes'](_0x3b8ba1['id']);}}),_0x3d9edb['ui']['componentFactory']['add']('menuBar:aiCommands',_0x59b6ec=>{const _0xc2fc01=new _0x1c05d1(_0x59b6ec);_0xc2fc01['buttonView']['set']({'label':i(_0x59b6ec,'AI\x20Commands'),'icon':_0x4edd52}),_0xc2fc01['bind']('isEnabled')['to'](_0x3a1452,'enabledCommandsIds',_0x38aaa1=>_0x38aaa1['length']>0x0);const _0x3abd17=o(_0x3d9edb['config']['get']('ai.aiAssistant.commands'),_0x59b6ec);return this['_populateMenuBarMenu'](_0x3a1452,_0xc2fc01,_0x3abd17,_0x464b57=>this['_onExecute'](_0x464b57)),_0xc2fc01;}),_0x3d9edb['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x5e42cd=this['_createAIAssistantUIButton'](_0x2db44c);return _0x5e42cd['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x5e42cd;}),_0x3d9edb['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x401191=this['_createAIAssistantUIButton'](_0x4151ae);return _0x401191['set']({'role':'menuitemcheckbox'}),_0x401191;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xde75d9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2c4b25;for(const _0x4a3353 in _0xde75d9){const _0x2867d5=_0x4a3353,_0x3554ac=_0xde75d9[_0x2867d5];if('aiLicenseKeyValid'==_0x3554ac||'aiLicenseKeyInvalid'==_0x3554ac||'aiLicenseKeyExpired'==_0x3554ac||'aiLicenseKeyDomainLimit'==_0x3554ac||'aiLicenseKeyNotAllowed'==_0x3554ac||'aiLicenseKeyEvaluationLimit'==_0x3554ac||'aiLicenseKeyTrialLimit'==_0x3554ac||'aiLicenseKeyUsageLimit'==_0x3554ac){delete _0xde75d9[_0x2867d5],_0x2c4b25=_0x3554ac,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x2c4b25&&_0xde75d9['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x2c4b25&&_0xde75d9['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x2c4b25&&_0xde75d9['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x2c4b25&&_0xde75d9['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x2c4b25&&_0xde75d9['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x2c4b25&&_0xde75d9['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x2c4b25&&_0xde75d9['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x2f3049='',_0x1ed303='',_0x514334='custom'){const _0x329943=this['editor'],_0xd60c84=_0x329943['editing']['view'],_0x24ba44=_0x329943['plugins']['get'](a),_0x4353ec=_0x329943['plugins']['get'](_0xf4919e);_0x24ba44['showFakeVisualSelection']();const _0x4007e6=new l(),_0x1fae25=new ClipboardEvent('copy',{'clipboardData':_0x4007e6}),_0x10af6e=new _0x144e81(_0x4007e6),_0x1369fa=new _0x26acc9(_0xd60c84,_0x1fae25,{'dataTransfer':_0x10af6e});_0x4353ec['_forceMarkersCopy']('comment',()=>{_0xd60c84['document']['fire']('copy',_0x1369fa);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x329943,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x549473=_0x10af6e['getData']('text/html');const _0x555920=_0x329943['model']['document']['selection'],_0x1dc89c=Array['from'](_0x555920['getRanges']());0x1===_0x1dc89c['length']&&_0x1dc89c[0x0]['isFlat']&&!_0x555920['getSelectedElement']()&&''!==_0x549473['replace'](/&nbsp;/g,'')['trim']()&&(_0x549473='<p>'+_0x549473+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x514334,'query':_0x2f3049,'htmlContent':_0x549473,'label':_0x1ed303,'mainActionLabel':_[_0x329943['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x2e4d83,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x49324c['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x24ba44['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x1ba5e8=new Map(),_0x2ce72a=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x34e5af of _0x2ce72a)for(const _0x25da63 of _0x34e5af['commands'])_0x1ba5e8['set'](_0x25da63['id'],{..._0x25da63,'groupId':_0x34e5af['groupId'],'groupLabel':_0x34e5af['groupLabel']||_0x34e5af['groupId']});return _0x1ba5e8;}['_createAIAssistantUIButton'](_0x52d6a5){const _0x357938=this['editor'],_0x479854=_0x357938['commands']['get']('showAIAssistant'),_0xab2fde=new _0x52d6a5(_0x357938['locale']);return _0xab2fde['set']({'label':i(_0x357938['locale'],'AI\x20Assistant'),'icon':_0x2e4d83,'isToggleable':!0x0}),_0xab2fde['bind']('isEnabled')['to'](_0x479854),_0xab2fde['bind']('isOn')['to'](this['_dialog'],'id',_0xe4b1d3=>'aiAssistant'===_0xe4b1d3),this['listenTo'](_0xab2fde,'execute',()=>{_0xab2fde['isOn']?this['hideUI']():_0x479854['execute']();}),_0xab2fde;}['_initView'](){const _0x28473b=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',()=>{_0x28473b['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x28473b['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x1204bf,ui:{ariaLiveAnnouncer:_0x2f1b0e}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x57dcfe,_0x56a2ba,_0x58f505)=>{const _0x2f1ddb=this['_aiAssistantController']['currentContext'];_0x58f505?_0x2f1b0e['announce'](i(_0x1204bf,'AI\x20is\x20writing')):_0x2f1ddb&&_0x2f1b0e['announce'](i(_0x1204bf,'Generated\x20content:\x20%0',_0x2f1ddb),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x4a81fc,_0x3a78a1,_0x52aec3)=>{if(_0x52aec3){const _0x9bc6aa=this['_formView']['errorView']['text'];_0x2f1b0e['announce'](i(_0x1204bf,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x9bc6aa));}});}['_onExecute'](_0x22630c){const _0x334bbf=this['_commandDefinitions']['get'](_0x22630c),_0x230401=this['editor'],_0x111b0e=_0x230401['model']['document']['selection'],_0x22fdec=_0x230401['commands']['get']('showAIAssistant'),_0x5711cc=_0x230401['plugins']['get'](a),_0x4678cb=''+(_0x334bbf['groupId']!==K?_0x334bbf['groupLabel']+':\x20':'')+_0x334bbf['label'];if(!0x1!==_0x334bbf['requiresContent']&&_0x111b0e['isCollapsed']){const _0x2acea4=_0x43afe3(_0x111b0e['getSelectedBlocks']())||_0x230401['model']['schema']['getLimitElement'](_0x111b0e);_0x230401['model']['change'](_0x26aade=>{_0x26aade['setSelection'](_0x2acea4,'in');});}_0x5711cc['showFakeVisualSelection'](),_0x22fdec['execute'](_0x334bbf['prompt'],_0x4678cb,'command:'+_0x22630c);}['_populateMenuBarMenu'](_0x186664,_0x4e44b3,_0x502937,_0x15b5f3){const _0xebfe44=this['editor'],_0x272a45=_0xebfe44['locale'],_0x735805=new _0x1a8d4b(_0x272a45),_0x9bcd8a=U(_0xebfe44,_0x502937)['filter'](_0x4ac6c4=>_0x4ac6c4['commands']['length']);0x1===_0x9bcd8a['length']?this['_getMenuBarGroupButtons']({'command':_0x186664,'commands':_0x9bcd8a[0x0]['commands'],'parentMenuView':_0x4e44b3,'onExecute':_0x15b5f3})['forEach'](_0x4fe71a=>_0x735805['items']['add'](_0x4fe71a)):_0x9bcd8a['forEach'](({groupId:_0x1677b6,groupLabel:_0x1eb7b4,commands:_0x59bb5f})=>{const _0x12047a=new _0x2fef60(_0x272a45,_0x4e44b3),_0x187460=new _0x1c05d1(_0x272a45),_0x17fb42=new _0x1a8d4b(_0x272a45),_0x243d26=this['_getMenuBarGroupButtons']({'command':_0x186664,'commands':_0x59bb5f,'parentMenuView':_0x187460,'onExecute':_0x15b5f3});_0x187460['buttonView']['set']({'label':_0x1eb7b4||_0x1677b6}),_0x187460['delegate']('execute')['to'](_0x4e44b3),_0x17fb42['items']['addMany'](_0x243d26),_0x187460['panelView']['children']['add'](_0x17fb42),_0x12047a['children']['add'](_0x187460),_0x735805['items']['add'](_0x12047a);}),_0x4e44b3['panelView']['children']['add'](_0x735805);}['_getMenuBarGroupButtons']({command:_0x222a48,commands:_0x61e668,parentMenuView:_0x5caa41,onExecute:_0x5681b2}){const _0x1f074f=this['editor'],_0x1efa33=_0x1f074f['locale'];return U(_0x1f074f,_0x61e668)['map'](_0x466147=>{const _0x57e2cb=new _0x2fef60(_0x1efa33,_0x5caa41),_0x3a6b0e=new _0x4151ae(_0x1efa33);return _0x3a6b0e['set']({'label':_0x466147['label']}),_0x3a6b0e['delegate']('execute')['to'](_0x5caa41),_0x3a6b0e['on']('execute',()=>_0x5681b2(_0x466147['id'])),_0x3a6b0e['bind']('isEnabled')['to'](_0x222a48,'enabledCommandsIds',_0x36558f=>_0x36558f['includes'](_0x466147['id'])),_0x57e2cb['children']['add'](_0x3a6b0e),_0x57e2cb;});}}function T(_0x3ea7d1,_0x36e6df){return void 0x0!==_0x3ea7d1['order']&&void 0x0===_0x36e6df['order']?0x1:void 0x0===_0x3ea7d1['order']&&void 0x0!==_0x36e6df['order']?-0x1:void 0x0!==_0x3ea7d1['order']&&void 0x0!==_0x36e6df['order']?_0x3ea7d1['order']-_0x36e6df['order']:0x0;}function U(_0x23a0ba,_0x1b70c1){_0x1b70c1['sort'](T);const _0xbc2fa1={},_0x1ff5f0=[];for(const _0x32b2e6 of _0x1b70c1)if(void 0x0!==_0x32b2e6['order']){if(_0x32b2e6['order']in _0xbc2fa1)throw new _0x18ef2b('ai-commands-config-order-collision',_0x23a0ba,{'conflictingDefinitions':[_0x32b2e6,_0xbc2fa1[_0x32b2e6['order']]]});_0xbc2fa1[_0x32b2e6['order']]=_0x32b2e6,_0x1ff5f0['splice'](_0x32b2e6['order'],0x0,_0x32b2e6);}else _0x1ff5f0['push'](_0x32b2e6);return _0x1ff5f0;}class At extends _0x47d13d{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2dad37){super(_0x2dad37);const _0x10d5f4=_0x2dad37['config'],_0x16817b=_0x2dad37['locale'];_0x10d5f4['define']('ai.aiAssistant.preserveComments',!0x0),_0x10d5f4['define']('ai.aiAssistant.commands',_t(_0x16817b)),_0x10d5f4['define']('ai.aiAssistant.extraCommandGroups',[]),_0x10d5f4['define']('ai.aiAssistant.removeCommands',[]);let _0x343e07=o(_0x10d5f4['get']('ai.aiAssistant.commands'),_0x16817b);const _0x21f7f8=_0x10d5f4['get']('ai.aiAssistant.extraCommandGroups'),_0x29c9e4=_0x10d5f4['get']('ai.aiAssistant.removeCommands');_0x21f7f8['forEach'](_0x532fd3=>{const _0x292262=_0x343e07['find'](_0x451822=>_0x451822['groupId']===_0x532fd3['groupId']);_0x292262?_0x292262['commands']=_0x292262['commands']['concat'](_0x532fd3['commands']):_0x343e07['push'](_0x532fd3);}),_0x343e07=_0x343e07['filter'](_0x6689b8=>!_0x29c9e4['includes'](_0x6689b8['groupId'])),_0x343e07['forEach'](_0x4e77ca=>{_0x4e77ca['commands']=_0x4e77ca['commands']['filter'](_0xc8a1a6=>!_0x29c9e4['includes'](_0xc8a1a6['id']));}),_0x10d5f4['set']('ai.aiAssistant.commands',_0x343e07);}}function _t(_0x2b0690){return[{'groupId':'editOrReview','groupLabel':i(_0x2b0690,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x2b0690,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x2b0690,'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(_0x2b0690,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x2b0690,'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(_0x2b0690,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x2b0690,'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(_0x2b0690,'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(_0x2b0690,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x2b0690,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x2b0690,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x2b0690,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x2b0690,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x2b0690,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x2b0690,'Change\x20style'),'commands':[{'id':'business','label':i(_0x2b0690,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x2b0690,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x2b0690,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x2b0690,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x2b0690,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x2b0690,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x2b0690,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x2b0690,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x2b0690,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x2b0690,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x2b0690,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x2b0690,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x2b0690,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x47d13d{['abortController'];static get['requires'](){return[x];}constructor(_0x112d01){super(_0x112d01),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'](_0x511eec){return this['sendRequest'](_0x511eec)['catch'](_0x4670fe=>{if(_0x4670fe instanceof R)return Promise['reject'](_0x4670fe);if('AbortError'==_0x4670fe['name'])return Promise['resolve']();throw console['error'](_0x4670fe),new _0x18ef2b('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x5bae8b,_0xd9b3b4){const _0x48f295=this['editor']['locale'],_0xcee2c4={'Content-Type':'application/json'};if('object'==typeof _0x5bae8b)Object['assign'](_0xcee2c4,_0x5bae8b);else{if(_0x5bae8b)try{const _0xaf133f=await _0x5bae8b(_0xd9b3b4);Object['assign'](_0xcee2c4,_0xaf133f);}catch{return Promise['reject'](new R(i(_0x48f295,'AI_ERROR_GET_HEADERS')));}}return _0xcee2c4;}async['_prepareRequestParameters'](_0x44b362,_0x83a9){const _0x10a418=this['editor']['locale'];if('object'==typeof _0x44b362)return _0x44b362;try{return await _0x44b362(_0x83a9);}catch{return Promise['reject'](new R(i(_0x10a418,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x12e4f9){super(_0x12e4f9),_0x12e4f9['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x12e4f9['config']['get']('ai.openAI.requestParameters')||_0x12e4f9['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x12e4f9['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x12e4f9['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x12e4f9['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x354ed9,context:_0x588c23,onData:_0x2176c0,actionId:_0x20382c}){const _0x2b1afd=this['editor']['locale'],_0x20eed2=await this['prepareMessages'](_0x354ed9,_0x588c23,_0x20382c),_0x360a4b=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x20382c),_0x242a23=await this['_prepareRequestParameters'](this['_requestParameters'],_0x20382c),_0x233b97={'messages':_0x20eed2,..._0x242a23},_0x1564d7={'method':'POST','headers':_0x360a4b,'body':JSON['stringify'](_0x233b97),'signal':this['abortController']['signal']},_0x25b82b=await fetch(this['_apiUrl'],_0x1564d7);if(_0x25b82b['ok'])return _0x242a23['stream']?await this['_readStreamableResponse'](_0x25b82b,_0x2176c0):await this['_readStaticResponse'](_0x25b82b,_0x2176c0),Promise['resolve']();{const _0x157adb=await _0x25b82b['text']();return _0x157adb['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x2b1afd,'AI_ERROR_CONTEXT_LENGTH'))):_0x157adb['includes']('Moderation')?Promise['reject'](new R(i(_0x2b1afd,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x157adb));}}async['prepareMessages'](_0x52c5e6,_0x3600a7,_0x504a9c){let _0x7bb93b,_0x878c6e;return _0x3600a7?(_0x7bb93b='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.',_0x878c6e='Instruction:\x0a'+_0x52c5e6+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x3600a7):(_0x7bb93b='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.',_0x878c6e=_0x52c5e6),[{'role':'system','content':_0x7bb93b},{'role':'user','content':_0x878c6e}];}async['_readStreamableResponse'](_0x78caaa,_0x718efc){const _0x123ae2=_0x78caaa['body']['getReader'](),_0x36c165=new TextDecoder();let _0x597650='',_0x4316d9='',_0xac69d8='',_0x52d2d1=!0x1;for(;!_0x52d2d1;){const {done:_0x239a08,value:_0x964e3a}=await _0x123ae2['read'](),_0x3ae962=_0x597650+_0x36c165['decode'](_0x964e3a);let _0x2f9fff='';_0x52d2d1=_0x239a08;try{_0x2f9fff=this['_cleanUpData'](_0x3ae962),_0x597650='';}catch{_0x597650=_0x3ae962;continue;}_0x4316d9+=_0x2f9fff,!_0x52d2d1&&this['_isBufferIncomplete'](_0x4316d9)||_0x4316d9&&(_0xac69d8+=_0x4316d9,_0x4316d9='',_0x718efc(_0xac69d8));}return Promise['resolve']();}async['_readStaticResponse'](_0x4c5192,_0x42288b){return _0x42288b((await _0x4c5192['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x22664c){const _0x40390e=_0x22664c['split']('<')['length']!==_0x22664c['split']('>')['length'],_0x454ad3=_0x22664c['length']<0x1e;return _0x40390e&&_0x454ad3;}['_cleanUpData'](_0x288622){return _0x288622['split'](/\n(?![^{]*\})/g)['map'](_0x319c1d=>_0x319c1d['replace']('data:\x20',''))['filter'](_0x14613b=>_0x14613b&&_0x14613b['length']>0x0&&'[DONE]'!==_0x14613b)['map'](_0x1a17d5=>{const {choices:_0x3a4084}=JSON['parse'](_0x1a17d5);if(_0x3a4084[0x0]?.['delta']?.['content'])return _0x3a4084[0x0]['delta']['content'];})['filter'](_0x5937d7=>_0x5937d7)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x3369fa){super(_0x3369fa),_0x3369fa['config']['get']('ai.aws.requestParameters')||_0x3369fa['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']=_0x3369fa['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x3369fa['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x3369fa['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x3369fa['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x2436d0,context:_0x2ce905,onData:_0x472a18,actionId:_0x31d29e}){const {model:_0x222d95,stream:_0x55b1aa,..._0x33011b}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x31d29e),_0x3e0314={'prompt':await this['preparePrompt'](_0x2436d0,_0x2ce905,_0x222d95,_0x31d29e),..._0x33011b};this['_apiUrl']?await this['_processProxyRequest'](_0x3e0314,_0x222d95,_0x55b1aa,_0x472a18,_0x31d29e):await this['_processAWSRequest'](_0x3e0314,_0x222d95,_0x55b1aa,_0x472a18);}async['preparePrompt'](_0x423234,_0x40f9cf,_0x22df76,_0xcc605){let _0x4e9faa,_0x4b4c3f;return _0x40f9cf?(_0x4e9faa='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.',_0x4b4c3f='Instruction:\x0a'+_0x423234+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x40f9cf):(_0x4e9faa='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.',_0x4b4c3f=_0x423234),'meta.llama'==this['getModelFamily'](_0x22df76)?'<<SYS>>\x0a'+_0x4e9faa+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x4b4c3f+'\x0a[/INST]':'Human:\x0a'+_0x4e9faa+'\x0a'+_0x4b4c3f+'\x0a\x0aAssistant:';}['getModelFamily'](_0x269192){if(/^anthropic\.claude/['test'](_0x269192))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x269192))return'ai21.j2';if(/^cohere\.command/['test'](_0x269192))return'cohere.command';if(/^meta\.llama/['test'](_0x269192))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x269192));}async['_processProxyRequest'](_0x3b4ef9,_0x48c7df,_0x20026a,_0x98fdfc,_0x3422c0){const _0x528ec4={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3422c0),'body':JSON['stringify']({..._0x3b4ef9,'model':_0x48c7df,'stream':_0x20026a}),'signal':this['abortController']['signal']},_0x40be1e=await fetch(this['_apiUrl'],_0x528ec4);_0x20026a?await this['_readStreamableResponse'](_0x40be1e,_0x48c7df,_0x98fdfc):await this['_readStaticResponse'](_0x40be1e,_0x48c7df,_0x98fdfc);}async['_processAWSRequest'](_0x3f52c8,_0x450c68,_0x1f0349,_0x55bc17){const _0x301b8a=new _0x2408c7(this['_bedrockClientConfig']),_0x37d7d5={'body':JSON['stringify'](_0x3f52c8),'contentType':'application/json','accept':'application/json','modelId':_0x450c68};let _0xb7c1d4;if(_0x1f0349){const _0x1ea0ac=new _0xd9b0cc(_0x37d7d5);_0xb7c1d4=await _0x301b8a['send'](_0x1ea0ac,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0xb7c1d4,_0x450c68,_0x55bc17);}else{const _0x776ef=new _0x314eda(_0x37d7d5);_0xb7c1d4=await _0x301b8a['send'](_0x776ef,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0xb7c1d4,_0x450c68,_0x55bc17);}}async['_readAsyncIterableResponse'](_0x4b2fc1,_0x597fca,_0x5c9505){const _0x2d01f3=_0x4b2fc1['body'],_0x19eea2=new TextDecoder('utf-8');let _0x1a17ff='';for await(const _0x3eb997 of _0x2d01f3)if(_0x3eb997['chunk']){const _0x2f30d6=_0x19eea2['decode'](_0x3eb997['chunk']['bytes']),_0x2f42fe=JSON['parse'](_0x2f30d6);_0x1a17ff+=this['_getGeneratedText'](_0x2f42fe,_0x597fca),_0x5c9505(_0x1a17ff);}return Promise['resolve']();}async['_readStreamableResponse'](_0x9653e,_0x259918,_0x2da289){const _0x53c1a=_0x9653e['body'],_0x36c53c=new TextDecoder('utf-8'),_0x318f17=_0x53c1a['getReader']();let _0x44d20c='',_0x5b2419='',_0x19936d=!0x1;for(;!_0x19936d;){const {done:_0xa3a843,value:_0x6de4b8}=await _0x318f17['read']();if(_0x19936d=_0xa3a843,_0x19936d)break;const _0x269a71=(_0x44d20c+_0x36c53c['decode'](_0x6de4b8))['split']('\x0a')['map'](_0xb25217=>{try{return _0x44d20c='',JSON['parse'](_0xb25217);}catch{return _0x44d20c=_0xb25217,null;}})['filter'](_0x13e7a2=>null!==_0x13e7a2);_0x269a71['length']&&(_0x5b2419+=_0x269a71['map'](_0x46085a=>this['_getGeneratedText'](_0x46085a,_0x259918))['join'](''),_0x2da289(_0x5b2419));}return Promise['resolve']();}async['_readStaticResponse'](_0x214c6b,_0x4dc28e,_0x401401){let _0x478de3;return _0x478de3=_0x214c6b instanceof Response?await _0x214c6b['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x214c6b['body'])),(_0x401401(this['_getGeneratedText'](_0x478de3,_0x4dc28e)),Promise['resolve']());}['_getGeneratedText'](_0x229ec0,_0x3ab9d5){switch(this['getModelFamily'](_0x3ab9d5)){case'anthropic.claude':return _0x229ec0['completion'];case'ai21.j2':return _0x229ec0['completions'][0x0]['data']['text'];case'cohere.command':return _0x229ec0['generations'][0x0]['text'];case'meta.llama':return _0x229ec0['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 _0x294d99,Command as _0x53db36}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x2c1bcc,IconCheck as _0x289259,IconError as _0xef93de,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x33af44,IconRobotPencil as _0xe13c72}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x278d67,CKEditorError as _0x295373,ObservableMixin as _0x2a506e,global as _0x557a8b,isVisible as _0x4e3139,Rect as _0x69a6a7,Collection as _0x5524ae,FocusTracker as et,KeystrokeHandler as rt,first as _0x121ccf}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x1f563e,View as _0x314931,SpinnerView as _0x1f006e,IconView as _0x225124,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0xb035ef,createDropdown as _0x25fc23,addMenuToDropdown as _0x375434,MenuBarMenuView as _0x5adad6,MenuBarMenuListItemButtonView as _0x6b7d1a,DialogViewPosition as _0x383c99,MenuBarMenuListView as _0x3f719b,MenuBarMenuListItemView as _0x4652d5}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x1c2a63,ClipboardMarkersUtils as _0x7b2a58}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x3d3f20,ViewDataTransfer as _0x51f47a,ViewUpcastWriter as _0x688801,Matcher as _0x14a03}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x40928f,InvokeModelWithResponseStreamCommand as _0x15c443,InvokeModelCommand as _0x3a274c}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0xd68acb,_0x5c509b){const _0x4bb76c=(0x0,_0x5c509b['t'])('Other');return _0xd68acb['length']?'groupId'in _0xd68acb[0x0]?_0xd68acb:[{'groupId':K,'groupLabel':_0x4bb76c,'order':0x1/0x0,'commands':_0xd68acb}]:[{'groupId':K,'groupLabel':_0x4bb76c,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x294d99{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x582943}=this,_0x3ff3f8=['ck-fake-ai-selection'];_0x582943['config']['get']('ai.useTheme')&&_0x3ff3f8['push']('ck-ai-assistant-ui_theme'),_0x582943['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x3ff3f8,'priority':0xc}}),_0x582943['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x3b0156,{writer:_0xb55aba})=>{if(!_0x3b0156['markerRange']['isCollapsed'])return null;const _0x53f0eb=_0xb55aba['createUIElement']('span');return _0xb55aba['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x53f0eb),_0x53f0eb;}});}['afterInit'](){!async function(_0x3a8003){const _0x36cc62=_0x3cf8e0([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]),_0x379993=0x3dffc4e1,_0x46ee4f=0x3df8b689^_0x379993,_0x120dc5=window[_0x3cf8e0([0x44,0x61,0x74,0x65])][_0x3cf8e0([0x6e,0x6f,0x77])](),_0x13610b=_0x3a8003[_0x3cf8e0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x35fd9c=new window[(_0x3cf8e0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x509d6f=>{_0x13610b[_0x3cf8e0([0x6f,0x6e,0x63,0x65])](_0x3cf8e0([0x72,0x65,0x61,0x64,0x79]),_0x509d6f);}),_0x1e92d0={[_0x3cf8e0([0x6b,0x74,0x79])]:_0x3cf8e0([0x45,0x43]),[_0x3cf8e0([0x75,0x73,0x65])]:_0x3cf8e0([0x73,0x69,0x67]),[_0x3cf8e0([0x63,0x72,0x76])]:_0x3cf8e0([0x50,0x2d,0x32,0x35,0x36]),[_0x3cf8e0([0x78])]:_0x3cf8e0([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]),[_0x3cf8e0([0x79])]:_0x3cf8e0([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]),[_0x3cf8e0([0x61,0x6c,0x67])]:_0x3cf8e0([0x45,0x53,0x32,0x35,0x36])},_0x5aeecf=_0x13610b[_0x3cf8e0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3cf8e0([0x67,0x65,0x74])](_0x3cf8e0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4213fd(){let _0x4598b3,_0x5c9e20=null,_0x2f4d0e=null;try{if(_0x5aeecf==_0x3cf8e0([0x47,0x50,0x4c]))return _0x3cf8e0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4598b3=_0xf54daf(),!_0x4598b3)return _0x3cf8e0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4598b3[_0x3cf8e0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f4d0e=_0x4775b3(_0x4598b3[_0x3cf8e0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4598b3[_0x3cf8e0([0x6a,0x74,0x69])])),await _0x3bd3f2()?_0x4cfba7()?_0x4fea75()?_0x3cf8e0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x38c555()?(_0x4598b3[_0x3cf8e0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3cf8e0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5c9e20=_0x347d62(_0x3cf8e0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4598b3[_0x3cf8e0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3cf8e0([0x74,0x72,0x69,0x61,0x6c])&&(_0x5c9e20=_0x347d62(_0x3cf8e0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x19da2e()):_0x3cf8e0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3cf8e0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3cf8e0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3cf8e0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4fea75(){const _0x4a8e2c=[_0x3cf8e0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3cf8e0([0x74,0x72,0x69,0x61,0x6c])][_0x3cf8e0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4598b3[_0x3cf8e0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x120dc5/0x3e8:0xe10*_0x46ee4f;return _0x4598b3[_0x3cf8e0([0x65,0x78,0x70])]<_0x4a8e2c;}function _0x4cfba7(){const _0x13602e=_0x4598b3[_0x3cf8e0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x13602e&&(!!_0x13602e[_0x3cf8e0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cf8e0([0x2a]))||!!_0x13602e[_0x3cf8e0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cf8e0([0x41,0x49])));}function _0x38c555(){const _0x29900f=_0x4598b3[_0x3cf8e0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x29900f||0x0==_0x29900f[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x340f16}=new URL(window[_0x3cf8e0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x29900f[_0x3cf8e0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x340f16))return!0x0;const _0x5b3aba=_0x340f16[_0x3cf8e0([0x73,0x70,0x6c,0x69,0x74])](_0x3cf8e0([0x2e]));return _0x29900f[_0x3cf8e0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x7b0a09=>_0x7b0a09[_0x3cf8e0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cf8e0([0x2a])))[_0x3cf8e0([0x6d,0x61,0x70])](_0x103d0c=>_0x103d0c[_0x3cf8e0([0x73,0x70,0x6c,0x69,0x74])](_0x3cf8e0([0x2e])))[_0x3cf8e0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x41296e=>_0x41296e[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5b3aba[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3cf8e0([0x6d,0x61,0x70])](_0x5243a4=>Array(_0x5b3aba[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5243a4[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3cf8e0([0x66,0x69,0x6c,0x6c])](_0x5243a4[0x0]===_0x3cf8e0([0x2a])?_0x3cf8e0([0x2a]):'')[_0x3cf8e0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5243a4))[_0x3cf8e0([0x73,0x6f,0x6d,0x65])](_0x1d88bd=>_0x5b3aba[_0x3cf8e0([0x65,0x76,0x65,0x72,0x79])]((_0x44117e,_0x10a3a0)=>_0x1d88bd[_0x10a3a0]===_0x44117e||_0x1d88bd[_0x10a3a0]===_0x3cf8e0([0x2a])));}function _0x19da2e(){return _0x5c9e20&&_0x2f4d0e?new window[(_0x3cf8e0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1e5d8e,_0x1cce00)=>{_0x5c9e20[_0x3cf8e0([0x74,0x68,0x65,0x6e])](_0x1e5d8e,_0x1cce00),_0x2f4d0e[_0x3cf8e0([0x74,0x68,0x65,0x6e])](_0x3de6eb=>{_0x3de6eb!=_0x3cf8e0([0x56,0x61,0x6c,0x69,0x64])&&_0x1e5d8e(_0x3de6eb);},_0x1cce00);}):_0x5c9e20||_0x2f4d0e||_0x3cf8e0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4775b3(_0x1e15cf,_0x21b514){return new window[(_0x3cf8e0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x27d635=>{if(_0x22a4e2())return _0x27d635(_0x3cf8e0([0x56,0x61,0x6c,0x69,0x64]));_0x13b147(),_0x13610b[_0x3cf8e0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3cf8e0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x40e835=!0x1;const _0x365b10=_0x278d67();function _0x1d4be2(_0xba8f2){return!!_0xba8f2&&(typeof _0xba8f2===_0x3cf8e0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xba8f2===_0x3cf8e0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xba8f2[_0x3cf8e0([0x74,0x68,0x65,0x6e])]===_0x3cf8e0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xba8f2[_0x3cf8e0([0x63,0x61,0x74,0x63,0x68])]===_0x3cf8e0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x7bdfb1(_0x3abbbf){_0x307e90(_0x3abbbf)[_0x3cf8e0([0x74,0x68,0x65,0x6e])](_0x3b6b70=>{if(!_0x3b6b70||_0x3b6b70[_0x3cf8e0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3cf8e0([0x6f,0x6b]))return _0x3cf8e0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1d7e9d(_0x5699ff(_0x365b10+_0x21b514))!=_0x3b6b70[_0x3cf8e0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3cf8e0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3cf8e0([0x56,0x61,0x6c,0x69,0x64]);})[_0x3cf8e0([0x74,0x68,0x65,0x6e])](_0x42d855=>(_0x25b474(),_0x42d855),()=>{const _0x359cfc=_0x5f45a4();return null==_0x359cfc?(_0x25b474(),_0x3cf8e0([0x56,0x61,0x6c,0x69,0x64])):_0x3cf8e0(_0x120dc5-_0x359cfc>(0x19f340e1^_0x379993)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3cf8e0([0x74,0x68,0x65,0x6e])](_0x27d635)[_0x3cf8e0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x27d635(_0x3cf8e0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4c7288=0x3dc92a61^_0x379993;function _0x25b474(){const _0x28611b=_0x3cf8e0([0x6c,0x6c,0x63,0x74,0x2d])+_0x1d7e9d(_0x5699ff(_0x1e15cf)),_0xb71f6b=_0x13a7b2(_0x1d7e9d(window[_0x3cf8e0([0x4d,0x61,0x74,0x68])][_0x3cf8e0([0x63,0x65,0x69,0x6c])](_0x120dc5/_0x4c7288)));window[_0x3cf8e0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3cf8e0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x28611b,_0xb71f6b);}function _0x5f45a4(){const _0x2d9d9b=_0x3cf8e0([0x6c,0x6c,0x63,0x74,0x2d])+_0x1d7e9d(_0x5699ff(_0x1e15cf)),_0x4024f1=window[_0x3cf8e0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3cf8e0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2d9d9b);return _0x4024f1?window[_0x3cf8e0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x13a7b2(_0x4024f1),0x10)*_0x4c7288:null;}function _0x307e90(_0x497bb3){return new window[(_0x3cf8e0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a356b,_0x3fe8dd)=>{_0x497bb3[_0x3cf8e0([0x74,0x68,0x65,0x6e])](_0x3a356b,_0x3fe8dd),window[_0x3cf8e0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3fe8dd,0x3dfe1021^_0x379993);});}}_0x13610b[_0x3cf8e0([0x6f,0x6e])](_0x3cf8e0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5b1cef,_0x267973)=>{if(_0x267973[0x0]!=_0x1e15cf)return _0x27d635(_0x3cf8e0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x267973[0x1]={..._0x267973[0x1],[_0x3cf8e0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x365b10};},{[_0x3cf8e0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3cf8e0([0x68,0x69,0x67,0x68])}),_0x13610b[_0x3cf8e0([0x6f,0x6e])](_0x3cf8e0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1b6f93=>{_0x1d4be2(_0x1b6f93[_0x3cf8e0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x40e835=!0x0,_0x7bdfb1(_0x1b6f93[_0x3cf8e0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3cf8e0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3cf8e0([0x6c,0x6f,0x77])}),_0x35fd9c[_0x3cf8e0([0x74,0x68,0x65,0x6e])](()=>{_0x40e835||_0x27d635(_0x3cf8e0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x22a4e2(){return _0x13610b[_0x3cf8e0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3cf8e0([0x76,0x69,0x65,0x77])][_0x3cf8e0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3cf8e0([0x61,0x75,0x74,0x6f]);}function _0x13b147(){_0x13610b[_0x3cf8e0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3cf8e0([0x76,0x69,0x65,0x77])][_0x3cf8e0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3cf8e0([0x61,0x75,0x74,0x6f]);}}function _0x347d62(_0x276515){const _0x1fb6cd=[new window[(_0x3cf8e0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x284fcc=>setTimeout(_0x284fcc,0x3df6fa2d^_0x379993)),_0x35fd9c[_0x3cf8e0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3cf8e0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1706d9=>{let _0x4fdbaf=0x0;_0x13610b[_0x3cf8e0([0x6d,0x6f,0x64,0x65,0x6c])][_0x3cf8e0([0x6f,0x6e])](_0x3cf8e0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x8a74c,_0x53a9c9)=>{_0x53a9c9[0x0][_0x3cf8e0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4fdbaf++,_0x4fdbaf==(0x3dffc519^_0x379993)&&(_0x1706d9(),_0x8a74c[_0x3cf8e0([0x6f,0x66,0x66])]());});}))];return window[_0x3cf8e0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3cf8e0([0x72,0x61,0x63,0x65])](_0x1fb6cd)[_0x3cf8e0([0x74,0x68,0x65,0x6e])](()=>_0x276515);}async function _0x3a424c(){await _0x35fd9c,_0x13610b[_0x3cf8e0([0x6d,0x6f,0x64,0x65,0x6c])][_0x3cf8e0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4e1118,_0x13610b[_0x3cf8e0([0x6d,0x6f,0x64,0x65,0x6c])][_0x3cf8e0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4e1118,_0x13610b[_0x3cf8e0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3cf8e0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2eaa08(_0x19c362){const _0x38f549=_0x380017();_0x13610b[_0x38f549]=_0x3cf8e0([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x19c362,_0x19c362!=_0x3cf8e0([0x56,0x61,0x6c,0x69,0x64])&&_0x3a424c();}function _0x380017(){const _0x23a553=window[_0x3cf8e0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3cf8e0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3cf8e0([0x6e,0x6f,0x77])]())[_0x3cf8e0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3cf8e0([0x2e]),'');let _0x114746=_0x3cf8e0([0x6e]);for(let _0xa789bf=0x0;_0xa789bf<_0x23a553[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xa789bf+=0x2){let _0x8e7b4e=window[_0x3cf8e0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23a553[_0x3cf8e0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xa789bf,_0xa789bf+0x2));_0x8e7b4e>=_0x36cc62[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x8e7b4e-=_0x36cc62[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x114746+=_0x36cc62[_0x8e7b4e];}return _0x114746;}function _0xf54daf(){const _0x5b4215=_0x5aeecf[_0x3cf8e0([0x73,0x70,0x6c,0x69,0x74])](_0x3cf8e0([0x2e]));if(0x3!=_0x5b4215[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3faa0e(_0x5b4215[0x1]);function _0x3faa0e(_0x5dcbd4){const _0x5c4292=_0x37d80b(_0x5dcbd4);return _0x5c4292&&_0x1d300a()?_0x5c4292:null;function _0x1d300a(){const _0x1e60b1=_0x5c4292[_0x3cf8e0([0x6a,0x74,0x69])],_0x1e9751=window[_0x3cf8e0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e60b1[_0x3cf8e0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1e60b1[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x10e00a={..._0x5c4292,[_0x3cf8e0([0x6a,0x74,0x69])]:_0x1e60b1[_0x3cf8e0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1e60b1[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x10e00a[_0x3cf8e0([0x76,0x63])],_0x5699ff(_0x10e00a)==_0x1e9751;}}}async function _0x3bd3f2(){let _0x12baf1=!0x0;try{const _0x41cc47=_0x5aeecf[_0x3cf8e0([0x73,0x70,0x6c,0x69,0x74])](_0x3cf8e0([0x2e])),[_0x49ba55,_0xc350fe,_0x466339]=_0x41cc47;return _0x4836ac(_0x49ba55),await _0x44007d(_0x49ba55,_0xc350fe,_0x466339),_0x12baf1;}catch{return!0x1;}function _0x4836ac(_0xba093d){const _0x488e84=_0x37d80b(_0xba093d);_0x488e84&&_0x488e84[_0x3cf8e0([0x61,0x6c,0x67])]==_0x3cf8e0([0x45,0x53,0x32,0x35,0x36])||(_0x12baf1=!0x1);}async function _0x44007d(_0x4c6b9f,_0x18d19f,_0x2be412){const _0x586c83=window[_0x3cf8e0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3cf8e0([0x66,0x72,0x6f,0x6d])](_0x4acb88(_0x2be412),_0x104768=>_0x104768[_0x3cf8e0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1a1f65=new window[(_0x3cf8e0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3cf8e0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4c6b9f+_0x3cf8e0([0x2e])+_0x18d19f),_0x493243=window[_0x3cf8e0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3cf8e0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x493243)return;const _0x1f5673=await _0x493243[_0x3cf8e0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3cf8e0([0x6a,0x77,0x6b]),_0x1e92d0,{[_0x3cf8e0([0x6e,0x61,0x6d,0x65])]:_0x3cf8e0([0x45,0x43,0x44,0x53,0x41]),[_0x3cf8e0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3cf8e0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3cf8e0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x493243[_0x3cf8e0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3cf8e0([0x6e,0x61,0x6d,0x65])]:_0x3cf8e0([0x45,0x43,0x44,0x53,0x41]),[_0x3cf8e0([0x68,0x61,0x73,0x68])]:{[_0x3cf8e0([0x6e,0x61,0x6d,0x65])]:_0x3cf8e0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1f5673,_0x586c83,_0x1a1f65)||(_0x12baf1=!0x1);}}function _0x37d80b(_0x11e85c){return _0x11e85c[_0x3cf8e0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3cf8e0([0x65,0x79]))?JSON[_0x3cf8e0([0x70,0x61,0x72,0x73,0x65])](_0x4acb88(_0x11e85c)):null;}function _0x4acb88(_0x33e63c){return window[_0x3cf8e0([0x61,0x74,0x6f,0x62])](_0x33e63c[_0x3cf8e0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3cf8e0([0x2b]))[_0x3cf8e0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3cf8e0([0x2f])));}function _0x5699ff(_0x52edab){let _0x2d15f4=0x1505;function _0x2018bb(_0x5928a7){for(let _0x31d06b=0x0;_0x31d06b<_0x5928a7[_0x3cf8e0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x31d06b++){const _0x297629=_0x5928a7[_0x3cf8e0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x31d06b);_0x2d15f4=(_0x2d15f4<<0x5)+_0x2d15f4+_0x297629,_0x2d15f4&=_0x2d15f4;}}function _0x36d385(_0xac897b){Array[_0x3cf8e0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xac897b)?_0xac897b[_0x3cf8e0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x36d385):_0xac897b&&typeof _0xac897b==_0x3cf8e0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3cf8e0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xac897b)[_0x3cf8e0([0x73,0x6f,0x72,0x74])]()[_0x3cf8e0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2e4cb5,_0xdcab97])=>{_0x2018bb(_0x2e4cb5),_0x36d385(_0xdcab97);}):_0x2018bb(window[_0x3cf8e0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xac897b));}return _0x36d385(_0x52edab),_0x2d15f4>>>0x0;}function _0x1d7e9d(_0x57f512){return _0x57f512[_0x3cf8e0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3cf8e0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3cf8e0([0x30]));}function _0x13a7b2(_0x350dcf){return _0x350dcf[_0x3cf8e0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3cf8e0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3cf8e0([0x6a,0x6f,0x69,0x6e])]('');}function _0x4e1118(){}function _0x3cf8e0(_0x40948f){return _0x40948f['map'](_0x5483b0=>String['fromCharCode'](_0x5483b0))['join']('');}_0x2eaa08(await _0x4213fd());}(this);}['showFakeVisualSelection'](){const _0x5c656f=this['editor']['model'];_0x5c656f['change'](_0x400574=>{const _0x488299=_0x5c656f['document']['selection']['getRanges']();let _0x4f3739=0x0;for(const _0x46a41e of _0x488299){const _0x567b15=w+':'+_0x4f3739;if(_0x5c656f['markers']['has'](_0x567b15))_0x400574['updateMarker'](_0x567b15,{'range':_0x46a41e});else{if(_0x46a41e['start']['isAtEnd']){const _0x7926f1=_0x46a41e['start']['getLastMatchingPosition'](({item:_0x1ec091})=>!_0x5c656f['schema']['isContent'](_0x1ec091),{'boundaries':_0x46a41e});_0x400574['addMarker'](_0x567b15,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x400574['createRange'](_0x7926f1,_0x46a41e['end'])});}else _0x400574['addMarker'](_0x567b15,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x46a41e});}_0x4f3739++;}});}['hideFakeVisualSelection'](){const _0x20f68e=this['editor']['model'],_0x615523=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x615523['length']&&_0x20f68e['change'](_0xdab14d=>{_0x615523['forEach'](_0x3f9f38=>{_0xdab14d['removeMarker'](_0x3f9f38);});});}['insertContent'](_0x58cd03,_0x351463){const _0x4251da=this['_getAISelection'](),_0x171427=_0x351463||_0x4251da['getFirstRange']();this['editor']['model']['canEditAt'](_0x171427)&&this['editor']['model']['change'](_0x58bb92=>{this['hideFakeVisualSelection'](),_0x351463||this['_resetContentOfSelectedTableCells'](_0x58bb92,_0x4251da),this['_pasteHTMLUsingClipboard']({'insertAt':_0x171427,'writer':_0x58bb92,'html':_0x58cd03});});}['insertContentBelow'](_0x5f4cc3){const {model:_0x139a2d}=this['editor'],_0x374df4=this['_getAISelection']();_0x139a2d['change'](()=>{const _0x3435e3=this['_prepareTableInsertBelowPosition'](_0x5f4cc3,_0x374df4)||this['_getDefaultInsertBelowPosition'](_0x374df4);this['insertContent'](_0x5f4cc3,_0x3435e3);});}['_getAISelection'](){const _0x1d9158=this['editor']['model'],_0x2aeab9=Array['from'](_0x1d9158['markers']['getMarkersGroup'](w))['map'](_0x1bf6a0=>_0x1bf6a0['getRange']());return _0x1d9158['createSelection'](_0x2aeab9);}['_pasteHTMLUsingClipboard']({writer:_0x115557,html:_0x176097,insertAt:_0x55f216}){const {view:_0x350d5e}=this['editor']['editing'],_0x3415fe=this['editor']['plugins']['get'](_0x1c2a63),_0x592722=new gt();_0x592722['setData']('text/html',_0x176097);const _0x496e3b=new ClipboardEvent('paste',{'clipboardData':_0x592722}),_0x217d0f=new _0x3d3f20(_0x350d5e,_0x496e3b,{'dataTransfer':new _0x51f47a(_0x592722)});_0x115557['setSelection'](_0x55f216);const _0x494b44=(_0x42cd33,_0x5de03c)=>{_0x5de03c['resultRange']&&_0x115557['setSelection'](_0x5de03c['resultRange']);};_0x3415fe['once']('contentInsertion',_0x494b44,{'priority':'lowest'}),_0x350d5e['document']['fire']('paste',_0x217d0f),_0x3415fe['off']('contentInsertion',_0x494b44);}['_getDefaultInsertBelowPosition'](_0x20dc98){const {model:_0xe85014}=this['editor'],_0x3e8485=Array['from'](_0x20dc98['getSelectedBlocks']());return _0x3e8485['length']?_0xe85014['createPositionAfter'](_0x3e8485['pop']()):_0x20dc98['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x38ed3d,_0x17af29){const {model:_0x4e5cc0,plugins:_0x15b974}=this['editor'];if(_0x15b974['has']('TableUtils')){const _0x10fb75=_0x15b974['get']('TableUtils')['getSelectedTableCells'](_0x17af29);if(_0x10fb75['length']){const _0x587007=this['_getTableRowCountFromContent'](_0x38ed3d),_0x58ee69=this['_createEmptyTableRows'](_0x10fb75,_0x587007);return _0x4e5cc0['createPositionAt'](_0x58ee69,0x0);}}return null;}['_getTableRowCountFromContent'](_0x10aec9){const _0x278f8b=this['editor']['plugins']['get']('TableUtils'),_0x512ebf=this['editor']['data']['parse'](_0x10aec9),_0xc7cedb=Array['from'](_0x512ebf['getChildren']())['filter'](_0x528ec8=>_0x528ec8['is']('element','table'));let _0x51f343=0x0;return _0xc7cedb['forEach'](_0x5a07d7=>{_0x51f343+=_0x278f8b['getRows'](_0x5a07d7);}),_0x51f343;}['_createEmptyTableRows'](_0x1b116f,_0xfcdb84){const _0x5c2e0a=this['editor']['plugins']['get']('TableUtils'),_0x285ddb=_0x5c2e0a['getRowIndexes'](_0x1b116f),_0x3cbee6=_0x5c2e0a['getColumnIndexes'](_0x1b116f),_0x341754=_0x285ddb['last']+0x1,_0x5a2a95=_0x3cbee6['first'],_0x2bfbaf=_0x1b116f[0x0]['findAncestor']('table');for(let _0x5c1085=0x0;_0x5c1085<_0xfcdb84;_0x5c1085++)_0x5c2e0a['insertRows'](_0x2bfbaf,{'at':_0x341754});return _0x2bfbaf['getChild'](_0x341754)['getChild'](_0x5a2a95);}['_resetContentOfSelectedTableCells'](_0x487b4d,_0x186fd8){const {plugins:_0x51ad38}=this['editor'],{model:_0x248a6d}=_0x487b4d;if(!_0x51ad38['has']('TableUtils'))return;_0x51ad38['get']('TableUtils')['getSelectedTableCells'](_0x186fd8)['length']&&_0x248a6d['deleteContent'](_0x186fd8);}}class x extends _0x294d99{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x295373('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x17cd87){super(_0x17cd87),this['name']='AIRequestError';}}function i(_0xd75030,_0x3a183f,_0x48d0d6){const t=_0xd75030['t'];switch(_0x3a183f){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',_0x48d0d6);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x48d0d6);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'},_0x48d0d6);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 _0x3a183f;}}class E extends _0x53db36{['_commandDefinitions'];constructor(_0x36c338,_0xfb74e1){super(_0x36c338),this['_commandDefinitions']=_0xfb74e1,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x5ae653,_0x298dcd,_0x1c2afe)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x1c2afe));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x2c029a,_0x1b8790,_0x39f918)=>{this['enabledCommandsIds']=_0x39f918?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x131311=this['editor']['model'];this['_hasContext']=function(_0x30898c){const _0x2d3d2f=_0x30898c['document']['selection'];return _0x2d3d2f['isCollapsed']?0x0!==[..._0x2d3d2f['getSelectedBlocks']()]['length']&&![..._0x2d3d2f['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x30898c['hasContent'](_0x2d3d2f['getFirstRange']());}(_0x131311);const _0x12e448=_0x131311['document']['selection'],_0x4820c5=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0xead2f1 of _0x12e448['getRanges']())for(const _0x3933ce of _0xead2f1['getItems']())if(_0x3933ce['is']('element')&&_0x4820c5['includes'](_0x3933ce['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x22c0f8='',_0x5c7f00='',_0x2d4b63='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x22c0f8,_0x5c7f00,_0x2d4b63);}}function F(_0x53d83a,_0x60b2cc){const _0x34ab36=new Set();for(const _0x5d59cd of _0x53d83a['values']())(_0x60b2cc||!0x1===_0x5d59cd['requiresContent'])&&_0x34ab36['add'](_0x5d59cd['id']);return Array['from'](_0x34ab36);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0x2a506e(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x228b54,_0x3d708a,_0x1b8e30){super(),this['editor']=_0x228b54,this['textAdapter']=_0x3d708a,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x1b8e30,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x181c2c,_0x9a78a2,_0x43f8b0)=>{this['view']['value']=this['_sanitizeHTML'](_0x43f8b0);}),this['listenTo'](this['view'],'submitPrompt',(_0x2cd56e,_0x478b0d)=>{const _0x2d82fa=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x478b0d,_0x2d82fa,'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:_0x3bb429,query:_0x249ef5,htmlContent:_0x5094d6,label:_0x2012bc,mainActionLabel:_0x673f5f}){this['view']['prompt']=_0x2012bc,this['view']['mainAction']=_0x673f5f,this['initialContext']=_0x5094d6,_0x249ef5&&(this['view']['isRendered']?this['_handleQuery'](_0x249ef5,_0x5094d6,_0x3bb429,_0x2012bc):this['view']['once']('render',()=>{this['_handleQuery'](_0x249ef5,_0x5094d6,_0x3bb429,_0x2012bc);}));}['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'](_0x1f6655,_0x461fd4,_0x423c3a,_0x3656db){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x461fd4,this['previousQuery']=_0x1f6655,this['previousLabel']=_0x3656db||_0x1f6655,this['previousActionId']=_0x423c3a,new Promise(_0x1dca60=>{this['textAdapter']['makeRequest']({'query':_0x1f6655,'context':_0x461fd4,'onData':_0x254186=>{this['currentResponse']=_0x254186,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x423c3a})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x3ec5d6=>{_0x3ec5d6 instanceof R?this['view']['handleError'](_0x3ec5d6['message']):this['view']['handleError'](),_0x1dca60();})['finally'](()=>{this['stopProcessing'](),_0x1dca60();});});}['_parseAndNormalizeContent'](_0x30437d,_0x125d7f=!0x1){const _0x538af8=Q['exec'](_0x30437d);_0x30437d=_0x538af8?_0x30437d['substring'](_0x538af8[0x1]['length']):_0x30437d['length']<0x64&&!_0x125d7f?'':this['_stripMarkdownSyntax'](_0x30437d);const _0x8d8293=this['_domParser']['parseFromString'](_0x30437d,'text/html');if(_0x538af8){const _0x4afab9=Array['from'](_0x8d8293['body']['childNodes']);_0x4afab9['reverse']();for(const _0x58ca6a of _0x4afab9){if(_0x58ca6a['nodeType']==Node['ELEMENT_NODE'])break;_0x58ca6a['remove']();}}const _0x3ff279=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x8d8293['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x3ff279);const _0x41362b=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x82557e=this['editor']['data']['toModel'](_0x3ff279);return _0x41362b||_0x82557e['markers']['clear'](),this['editor']['data']['stringify'](_0x82557e);}['_normalizeResponseHeadings'](_0x10f2fc){const _0x1c862a=new _0x688801(this['editor']['editing']['view']['document']),_0x533e80=new _0x14a03({'name':/^h[1-5]$/}),_0x43c0cf=[];let _0xbe415b=!0x1;for(const _0x3a6bac of _0x10f2fc)_0x3a6bac['is']('element')&&_0x533e80['match'](_0x3a6bac)&&(_0x43c0cf['push'](_0x3a6bac),'h1'==_0x3a6bac['name']&&(_0xbe415b=!0x0));if(_0xbe415b){for(const _0x54afdf of _0x43c0cf)_0x1c862a['rename']('h'+(parseInt(_0x54afdf['name'][0x1])+0x1),_0x54afdf);}}['_isH1TagSupportEnabled'](){const {data:_0x3c3997,editing:_0xd66e49}=this['editor'],_0x3fdefa=_0x3c3997['htmlProcessor']['toView']('<h1></h1>'),_0x4fa514=_0x3c3997['toView'](_0x3c3997['toModel'](_0x3fdefa));return!!_0xd66e49['view']['domConverter']['viewToDom'](_0x4fa514)['querySelector']('h1');}['_sanitizeHTML'](_0x52e163){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x52e163),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x163d93){const _0x45f89d=_0x163d93['trim']();return _0x45f89d['startsWith']('```html')?_0x45f89d['endsWith']('```')?_0x45f89d['substring'](0x7,_0x45f89d['length']-0x3):_0x45f89d['substring'](0x7):_0x163d93;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x5d9a2a){super(_0x5d9a2a),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x2e4010=>i(_0x5d9a2a,'AI_'+_0x2e4010['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x5d9a2a,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x5d9a2a,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x5d9a2a,'Stop'));const _0x401ad6=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x401ad6['if']('isVisible','ck-hidden',_0x11b5ac=>!_0x11b5ac)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x448916,_0x422b3f){const _0x13f588=new _0x1f563e(this['locale']);return _0x13f588['set']({'label':_0x448916,'class':_0x422b3f||'','isVisible':!0x0,'withText':!0x0}),_0x13f588;}}class ct extends _0x314931{['contentFieldView'];['copyButtonView'];constructor(_0x390d01,_0x3239d3=''){super(_0x390d01),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1175f2=this['bindTemplate'];this['contentFieldView']=new bt(_0x390d01,_0x3239d3),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x1175f2['if']('isVisible','ck-hidden',_0x4d5a88=>!_0x4d5a88)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x1175f2['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 _0x6ccbca=!0x1;this['on']('change:value',(_0x336b21,_0x1acace,_0x222d35)=>{const _0x441085=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x222d35),this['isProcessing']&&_0x441085&&!_0x6ccbca&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x7df022,_0x58881c,_0x3b93c7)=>{_0x6ccbca=!0x1,_0x3b93c7?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x6ccbca=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x6ccbca=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x2a8640=this['locale'],_0x20fa6c=new _0x1f563e(this['locale']),_0x37fcbf='ck-ai-form__copy-button';return _0x20fa6c['set']({'label':i(_0x2a8640,'Copy'),'icon':_0x2c1bcc,'class':_0x37fcbf,'tooltip':!0x0}),_0x20fa6c['bind']('isVisible')['to'](this,'value',_0x317fc5=>!!_0x317fc5),_0x20fa6c['bind']('isEnabled')['to'](this,'isProcessing',_0x40d396=>!_0x40d396),_0x20fa6c['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x20fa6c['icon']=_0x289259,_0x20fa6c['class']=_0x37fcbf+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x20fa6c['icon']=_0x2c1bcc,_0x20fa6c['class']=_0x37fcbf;},0x3e8);}),_0x20fa6c;}['_copyHTMLToClipboard'](_0x4b8ee1){const {window:_0x2150a3,document:_0x5243d5}=_0x557a8b;if(_0x2150a3['ClipboardItem']){const {Blob:_0x4c4687,ClipboardItem:_0x3dc49f}=_0x2150a3,_0x4081e3=[new _0x3dc49f({'text/html':new _0x4c4687([_0x4b8ee1['innerHTML']],{'type':'text/html'}),'text/plain':new _0x4c4687([_0x4b8ee1['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x4081e3);}else{const _0x28ae4c=_0x5243d5['createElement']('div');_0x28ae4c['style']['position']='absolute',_0x28ae4c['style']['left']='-9999px',_0x28ae4c['innerHTML']='<span>[</span>'+_0x4b8ee1['innerHTML']+'<span>]</span>',_0x5243d5['body']['appendChild'](_0x28ae4c);const _0x5ea7ff=_0x5243d5['createRange']();_0x5ea7ff['setStartAfter'](_0x28ae4c['firstElementChild']),_0x5ea7ff['setEndBefore'](_0x28ae4c['lastElementChild']);const _0x552c39=_0x2150a3['getSelection']();_0x552c39['removeAllRanges'](),_0x552c39['addRange'](_0x5ea7ff),_0x5243d5['execCommand']('copy'),_0x28ae4c['remove']();}}}class bt extends _0x314931{constructor(_0x2f97df,_0x22f8f3=''){super(_0x2f97df),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x22f8f3,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x26c74f){this['element']['innerHTML']=_0x26c74f;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x3415fd=new _0x314931(),_0x1e060b=this['locale'],_0x364a2f=new _0x1f006e();return _0x364a2f['isVisible']=!0x0,_0x3415fd['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x364a2f,{'text':i(_0x1e060b,'AI\x20is\x20writing...')}]}),_0x3415fd['render'](),_0x3415fd;}}class mt extends _0x314931{constructor(_0xf77d7,_0x2ed1ae=''){super(_0xf77d7);const _0x924aa7=new _0x225124(),_0x1aaeee=this['bindTemplate'];this['set']('text',_0x2ed1ae),_0x924aa7['content']=_0xef93de,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x924aa7,{'text':_0x1aaeee['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x55e9f0,_0x4fd70e){super(_0x55e9f0,_0x4fd70e),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',(_0x518b86,_0x629ad5)=>{_0x518b86['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x629ad5());});}['_createSubmitButton'](){const _0x302ee5=new _0x1f563e(this['locale']),_0x56a05e=this['locale'];return _0x302ee5['set']({'icon':it,'label':i(_0x56a05e,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x302ee5['on']('execute',()=>{this['submit']();}),_0x302ee5['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x2d5696,_0x2509c6)=>!_0x2d5696&&_0x2509c6),_0x302ee5;}['_createShowHistoryButton'](){const _0x3c0c53=new _0x1f563e(this['locale']),_0x1f9c45=this['resultsView'],_0x3d17c5=this['locale'];_0x3c0c53['set']({'label':i(_0x3d17c5,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x3c0c53['bind']('isOn')['to'](_0x1f9c45,'isVisible'),_0x3c0c53['bind']('isEnabled')['to'](this,'isEnabled'),_0x3c0c53['on']('execute',()=>{_0x1f9c45['isVisible']=!_0x1f9c45['isVisible'],_0x1f9c45['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x35923e=()=>{_0x557a8b['window']['requestAnimationFrame'](()=>{if(_0x4e3139(this['element'])){const _0xa509e7=new _0x69a6a7(this['queryView']['fieldView']['element']),_0x296beb=_0xa509e7['width'],_0x391b72='rtl'===_0x3d17c5['uiLanguageDirection']?'left':'right';_0xa509e7['excludeScrollbarsAndBorders'](),_0x3c0c53['element']['style'][_0x391b72]=_0x296beb-_0xa509e7['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x35923e),this['on']('render',_0x35923e),_0x3c0c53;}['submit'](){const _0x5367c4=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x5367c4);}['focus'](_0x704479){-0x1===_0x704479?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x415109){super(_0x415109),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x415109,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x5babb6=0x0;for(const _0x4f5c18 of this['items'])_0x5babb6+=_0x4f5c18['items']['length'];return{'resultsCount':_0x5babb6,'totalItemsCount':_0x5babb6};}['_createClearHistoryButton'](){const _0xedcd67=this['locale'],_0x550e58=new _0x1f563e(this['locale']);return _0x550e58['set']({'label':'('+i(_0xedcd67,'Clear')+')','withText':!0x0}),_0x550e58['on']('execute',()=>this['fire']('clearHistory')),_0x550e58;}}class ut extends xt{constructor(_0x55b581){super();const _0x2992b6=new wt(),_0x568167=new _0x1f563e(this['locale'],_0x2992b6);this['children']['add'](_0x568167),_0x568167['set']({'label':_0x55b581['prompt'],'withText':!0x0}),_0x568167['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x55b581['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x5524ae{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x481601,_0x418849)=>{const _0x38560b=os(_0x418849['prompt']);for(const _0x4fdc95 of this)if(_0x4fdc95!=_0x418849&&os(_0x4fdc95['prompt'])===_0x38560b){this['remove'](_0x4fdc95);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x2467a3=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x2467a3));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x100708=>_0x100708)));}}function os(_0x352304){return _0x352304['toLowerCase']()['trim']();}class k extends _0x314931{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x2b5805,_0x365ef9,_0x314d4b=''){super(_0x2b5805),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(_0x2b5805),this['contentArea']=new ct(_0x2b5805,_0x314d4b),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 _0x3ab91f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x365ef9],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x3ab91f['if']('isError','ck-hidden',_0x4851db=>!_0x4851db)]},'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'](_0x75e030=0x1){-0x1===_0x75e030?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 _0x39056b=this['locale'],_0x552bb2=new lt(_0x39056b,{'queryView':{'label':i(_0x39056b,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x39056b,'Empty\x20history'),'secondary':i(_0x39056b,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x552bb2['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1961ef,_0x55a62b)=>_0x1961ef&&!_0x55a62b),this['listenTo'](_0x552bb2,'submit',(_0x2d3f54,_0x2786a5)=>{this['prompt']=_0x2786a5;const _0x1a6587=ft(_0x2786a5);this['fire']('submitPrompt',_0x1a6587),_0x2786a5['trim']()&&this['_promptHistory']['add']({'prompt':_0x1a6587},0x0);},{'priority':'high'}),_0x552bb2;}['_createHistoryView'](){const _0xb2ec6b=new pt(this['locale']);return _0xb2ec6b['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0xb2ec6b['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0xb2ec6b;}['_createToolbar'](){const _0x411ee4=new at(this['locale']);return _0x411ee4['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x5e0539,_0x3943ae,_0x2f0f92)=>_0x5e0539&&!_0x3943ae&&!!_0x2f0f92),_0x411ee4['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x411ee4['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x3b73d5,_0x2ed241,_0x413b66)=>_0x3b73d5&&!_0x2ed241&&!!_0x413b66),_0x411ee4['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x411ee4['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1c22ff,_0x4b6a06)=>_0x1c22ff&&!_0x4b6a06),_0x411ee4['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x411ee4['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x411ee4['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x411ee4;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x248b62=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x248b62,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x35293d){const _0x561f20=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x35293d||i(_0x561f20,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x294d99{['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[_0x7b2a58,a,x,_0xb035ef];}constructor(_0x1cf0bd){super(_0x1cf0bd),_0x1cf0bd['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x1cf0bd['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x1cf0bd['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x1cf0bd['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x5635d2}=this;this['_aiAdapter']=_0x5635d2['plugins']['get'](x),this['_dialog']=_0x5635d2['plugins']['get'](_0xb035ef),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x186461=new E(_0x5635d2,Array['from'](this['_commandDefinitions']['values']()));_0x5635d2['commands']['add']('showAIAssistant',_0x186461),_0x5635d2['ui']['componentFactory']['add']('aiCommands',_0x4a710d=>{const _0x59c22d=_0x25fc23(_0x4a710d);return _0x59c22d['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x59c22d['buttonView']['set']({'label':i(_0x4a710d,'AI\x20Commands'),'icon':_0x33af44,'tooltip':!0x0}),_0x59c22d['on']('execute',_0x2580cd=>this['_onExecute'](_0x2580cd['source']['id'])),_0x375434(_0x59c22d,_0x5635d2['ui']['view']['body'],function(_0x4c1f8c){const _0x1d4ebf=o(_0x4c1f8c['config']['get']('ai.aiAssistant.commands'),_0x4c1f8c['locale']),_0x2e8e0e=U(_0x4c1f8c,_0x1d4ebf)['filter'](_0xa820f6=>_0xa820f6['commands']['length']);if(0x1===_0x2e8e0e['length'])return U(_0x4c1f8c,_0x2e8e0e[0x0]['commands'])['map'](_0x361675=>({'id':_0x361675['id'],'label':_0x361675['label']}));return _0x2e8e0e['map'](_0x1e4293=>{const {groupId:_0x3dc672,groupLabel:_0x394b24,commands:_0x343d8f}=_0x1e4293,_0x520cdd=U(_0x4c1f8c,_0x343d8f)['map'](_0x27ee0a=>({'id':_0x27ee0a['id'],'label':_0x27ee0a['label']}));return{'id':_0x3dc672,'menu':_0x394b24||_0x3dc672,'children':_0x520cdd};});}(_0x5635d2),{'ariaLabel':i(_0x4a710d,'AI\x20Commands')}),_0x59c22d['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x186461['on']('change:enabledCommandsIds',_0x242379),_0x59c22d['menuView']['once']('render',_0x242379),_0x59c22d;function _0x242379(){_0x59c22d['isEnabled']=_0x186461['enabledCommandsIds']['length']>0x0;for(const _0x417ec4 of _0x59c22d['menuView']['buttons'])_0x417ec4['isEnabled']=_0x186461['enabledCommandsIds']['includes'](_0x417ec4['id']);}}),_0x5635d2['ui']['componentFactory']['add']('menuBar:aiCommands',_0x38c764=>{const _0x548fc0=new _0x5adad6(_0x38c764);_0x548fc0['buttonView']['set']({'label':i(_0x38c764,'AI\x20Commands'),'icon':_0x33af44}),_0x548fc0['bind']('isEnabled')['to'](_0x186461,'enabledCommandsIds',_0x468ec0=>_0x468ec0['length']>0x0);const _0x586b7a=o(_0x5635d2['config']['get']('ai.aiAssistant.commands'),_0x38c764);return this['_populateMenuBarMenu'](_0x186461,_0x548fc0,_0x586b7a,_0x49339e=>this['_onExecute'](_0x49339e)),_0x548fc0;}),_0x5635d2['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x391188=this['_createAIAssistantUIButton'](_0x1f563e);return _0x391188['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x391188;}),_0x5635d2['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x583958=this['_createAIAssistantUIButton'](_0x6b7d1a);return _0x583958['set']({'role':'menuitemcheckbox'}),_0x583958;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4a7cad=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2e2a60;for(const _0x4e605d in _0x4a7cad){const _0x12245=_0x4e605d,_0x292e0b=_0x4a7cad[_0x12245];if('aiLicenseKeyValid'==_0x292e0b||'aiLicenseKeyInvalid'==_0x292e0b||'aiLicenseKeyExpired'==_0x292e0b||'aiLicenseKeyDomainLimit'==_0x292e0b||'aiLicenseKeyNotAllowed'==_0x292e0b||'aiLicenseKeyEvaluationLimit'==_0x292e0b||'aiLicenseKeyTrialLimit'==_0x292e0b||'aiLicenseKeyUsageLimit'==_0x292e0b){delete _0x4a7cad[_0x12245],_0x2e2a60=_0x292e0b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x2e2a60&&_0x4a7cad['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x2e2a60&&_0x4a7cad['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x2e2a60&&_0x4a7cad['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x2e2a60&&_0x4a7cad['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x2e2a60&&_0x4a7cad['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x2e2a60&&_0x4a7cad['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x2e2a60&&_0x4a7cad['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0xd071db='',_0x2361cf='',_0x446413='custom'){const _0x1b1f5e=this['editor'],_0x1aaa04=_0x1b1f5e['editing']['view'],_0x29fec7=_0x1b1f5e['plugins']['get'](a),_0x4e10f0=_0x1b1f5e['plugins']['get'](_0x7b2a58);_0x29fec7['showFakeVisualSelection']();const _0x3bbc76=new l(),_0x1cec33=new ClipboardEvent('copy',{'clipboardData':_0x3bbc76}),_0x3dfdbd=new _0x51f47a(_0x3bbc76),_0x222ea3=new _0x3d3f20(_0x1aaa04,_0x1cec33,{'dataTransfer':_0x3dfdbd});_0x4e10f0['_forceMarkersCopy']('comment',()=>{_0x1aaa04['document']['fire']('copy',_0x222ea3);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x1b1f5e,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x2b85ad=_0x3dfdbd['getData']('text/html');const _0x1ddd15=_0x1b1f5e['model']['document']['selection'],_0x17eaae=Array['from'](_0x1ddd15['getRanges']());0x1===_0x17eaae['length']&&_0x17eaae[0x0]['isFlat']&&!_0x1ddd15['getSelectedElement']()&&''!==_0x2b85ad['replace'](/&nbsp;/g,'')['trim']()&&(_0x2b85ad='<p>'+_0x2b85ad+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x446413,'query':_0xd071db,'htmlContent':_0x2b85ad,'label':_0x2361cf,'mainActionLabel':_[_0x1b1f5e['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0xe13c72,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x383c99['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x29fec7['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x527a80=new Map(),_0x2f44c1=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x4006fd of _0x2f44c1)for(const _0x1ad818 of _0x4006fd['commands'])_0x527a80['set'](_0x1ad818['id'],{..._0x1ad818,'groupId':_0x4006fd['groupId'],'groupLabel':_0x4006fd['groupLabel']||_0x4006fd['groupId']});return _0x527a80;}['_createAIAssistantUIButton'](_0x4c361e){const _0x35b978=this['editor'],_0x4beee3=_0x35b978['commands']['get']('showAIAssistant'),_0x4e950f=new _0x4c361e(_0x35b978['locale']);return _0x4e950f['set']({'label':i(_0x35b978['locale'],'AI\x20Assistant'),'icon':_0xe13c72,'isToggleable':!0x0}),_0x4e950f['bind']('isEnabled')['to'](_0x4beee3),_0x4e950f['bind']('isOn')['to'](this['_dialog'],'id',_0x2c8380=>'aiAssistant'===_0x2c8380),this['listenTo'](_0x4e950f,'execute',()=>{_0x4e950f['isOn']?this['hideUI']():_0x4beee3['execute']();}),_0x4e950f;}['_initView'](){const _0x1e7faf=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',()=>{_0x1e7faf['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x1e7faf['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x40fd25,ui:{ariaLiveAnnouncer:_0x586082}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x2c69ca,_0x222cdd,_0x25ff46)=>{const _0x3327ba=this['_aiAssistantController']['currentContext'];_0x25ff46?_0x586082['announce'](i(_0x40fd25,'AI\x20is\x20writing')):_0x3327ba&&_0x586082['announce'](i(_0x40fd25,'Generated\x20content:\x20%0',_0x3327ba),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x46db4f,_0x4a362b,_0x66f67a)=>{if(_0x66f67a){const _0x3fb64b=this['_formView']['errorView']['text'];_0x586082['announce'](i(_0x40fd25,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x3fb64b));}});}['_onExecute'](_0x8c69c9){const _0x5ede26=this['_commandDefinitions']['get'](_0x8c69c9),_0x41aafc=this['editor'],_0x3add97=_0x41aafc['model']['document']['selection'],_0x75d714=_0x41aafc['commands']['get']('showAIAssistant'),_0x1039cc=_0x41aafc['plugins']['get'](a),_0x407115=''+(_0x5ede26['groupId']!==K?_0x5ede26['groupLabel']+':\x20':'')+_0x5ede26['label'];if(!0x1!==_0x5ede26['requiresContent']&&_0x3add97['isCollapsed']){const _0x20d151=_0x121ccf(_0x3add97['getSelectedBlocks']())||_0x41aafc['model']['schema']['getLimitElement'](_0x3add97);_0x41aafc['model']['change'](_0x4c46fe=>{_0x4c46fe['setSelection'](_0x20d151,'in');});}_0x1039cc['showFakeVisualSelection'](),_0x75d714['execute'](_0x5ede26['prompt'],_0x407115,'command:'+_0x8c69c9);}['_populateMenuBarMenu'](_0x253424,_0x5e6417,_0x1e3293,_0x1a0aeb){const _0x545d73=this['editor'],_0x272d70=_0x545d73['locale'],_0x534bd4=new _0x3f719b(_0x272d70),_0x3e45ec=U(_0x545d73,_0x1e3293)['filter'](_0xb8e3e1=>_0xb8e3e1['commands']['length']);0x1===_0x3e45ec['length']?this['_getMenuBarGroupButtons']({'command':_0x253424,'commands':_0x3e45ec[0x0]['commands'],'parentMenuView':_0x5e6417,'onExecute':_0x1a0aeb})['forEach'](_0x3c3e0c=>_0x534bd4['items']['add'](_0x3c3e0c)):_0x3e45ec['forEach'](({groupId:_0x225d04,groupLabel:_0x3f61ed,commands:_0x4613bf})=>{const _0x25d869=new _0x4652d5(_0x272d70,_0x5e6417),_0x30835d=new _0x5adad6(_0x272d70),_0x25142e=new _0x3f719b(_0x272d70),_0x29f694=this['_getMenuBarGroupButtons']({'command':_0x253424,'commands':_0x4613bf,'parentMenuView':_0x30835d,'onExecute':_0x1a0aeb});_0x30835d['buttonView']['set']({'label':_0x3f61ed||_0x225d04}),_0x30835d['delegate']('execute')['to'](_0x5e6417),_0x25142e['items']['addMany'](_0x29f694),_0x30835d['panelView']['children']['add'](_0x25142e),_0x25d869['children']['add'](_0x30835d),_0x534bd4['items']['add'](_0x25d869);}),_0x5e6417['panelView']['children']['add'](_0x534bd4);}['_getMenuBarGroupButtons']({command:_0x24fbee,commands:_0x57064b,parentMenuView:_0x45c857,onExecute:_0x531993}){const _0x1d343d=this['editor'],_0x36d16b=_0x1d343d['locale'];return U(_0x1d343d,_0x57064b)['map'](_0x59a6fc=>{const _0xc4df=new _0x4652d5(_0x36d16b,_0x45c857),_0x2ed548=new _0x6b7d1a(_0x36d16b);return _0x2ed548['set']({'label':_0x59a6fc['label']}),_0x2ed548['delegate']('execute')['to'](_0x45c857),_0x2ed548['on']('execute',()=>_0x531993(_0x59a6fc['id'])),_0x2ed548['bind']('isEnabled')['to'](_0x24fbee,'enabledCommandsIds',_0x3b55a4=>_0x3b55a4['includes'](_0x59a6fc['id'])),_0xc4df['children']['add'](_0x2ed548),_0xc4df;});}}function T(_0xc667e4,_0x5cb161){return void 0x0!==_0xc667e4['order']&&void 0x0===_0x5cb161['order']?0x1:void 0x0===_0xc667e4['order']&&void 0x0!==_0x5cb161['order']?-0x1:void 0x0!==_0xc667e4['order']&&void 0x0!==_0x5cb161['order']?_0xc667e4['order']-_0x5cb161['order']:0x0;}function U(_0x20e8dc,_0x2a5730){_0x2a5730['sort'](T);const _0x5e8a13={},_0x1524af=[];for(const _0x20e64d of _0x2a5730)if(void 0x0!==_0x20e64d['order']){if(_0x20e64d['order']in _0x5e8a13)throw new _0x295373('ai-commands-config-order-collision',_0x20e8dc,{'conflictingDefinitions':[_0x20e64d,_0x5e8a13[_0x20e64d['order']]]});_0x5e8a13[_0x20e64d['order']]=_0x20e64d,_0x1524af['splice'](_0x20e64d['order'],0x0,_0x20e64d);}else _0x1524af['push'](_0x20e64d);return _0x1524af;}class At extends _0x294d99{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf655b0){super(_0xf655b0);const _0x4afa76=_0xf655b0['config'],_0x8a4d58=_0xf655b0['locale'];_0x4afa76['define']('ai.aiAssistant.preserveComments',!0x0),_0x4afa76['define']('ai.aiAssistant.commands',_t(_0x8a4d58)),_0x4afa76['define']('ai.aiAssistant.extraCommandGroups',[]),_0x4afa76['define']('ai.aiAssistant.removeCommands',[]);let _0x27624c=o(_0x4afa76['get']('ai.aiAssistant.commands'),_0x8a4d58);const _0x5b6e60=_0x4afa76['get']('ai.aiAssistant.extraCommandGroups'),_0xa48384=_0x4afa76['get']('ai.aiAssistant.removeCommands');_0x5b6e60['forEach'](_0x4bbcdb=>{const _0x5e7e26=_0x27624c['find'](_0x3f7e13=>_0x3f7e13['groupId']===_0x4bbcdb['groupId']);_0x5e7e26?_0x5e7e26['commands']=_0x5e7e26['commands']['concat'](_0x4bbcdb['commands']):_0x27624c['push'](_0x4bbcdb);}),_0x27624c=_0x27624c['filter'](_0x356616=>!_0xa48384['includes'](_0x356616['groupId'])),_0x27624c['forEach'](_0x4d4219=>{_0x4d4219['commands']=_0x4d4219['commands']['filter'](_0xaba8f=>!_0xa48384['includes'](_0xaba8f['id']));}),_0x4afa76['set']('ai.aiAssistant.commands',_0x27624c);}}function _t(_0x40d663){return[{'groupId':'editOrReview','groupLabel':i(_0x40d663,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x40d663,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x40d663,'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(_0x40d663,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x40d663,'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(_0x40d663,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x40d663,'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(_0x40d663,'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(_0x40d663,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x40d663,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x40d663,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x40d663,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x40d663,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x40d663,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x40d663,'Change\x20style'),'commands':[{'id':'business','label':i(_0x40d663,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x40d663,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x40d663,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x40d663,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x40d663,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x40d663,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x40d663,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x40d663,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x40d663,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x40d663,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x40d663,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x40d663,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x40d663,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x294d99{['abortController'];static get['requires'](){return[x];}constructor(_0x99c398){super(_0x99c398),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'](_0x14f57e){return this['sendRequest'](_0x14f57e)['catch'](_0x5eb56f=>{if(_0x5eb56f instanceof R)return Promise['reject'](_0x5eb56f);if('AbortError'==_0x5eb56f['name'])return Promise['resolve']();throw console['error'](_0x5eb56f),new _0x295373('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x3f8ea6,_0x538ba7){const _0x3e0b84=this['editor']['locale'],_0x143967={'Content-Type':'application/json'};if('object'==typeof _0x3f8ea6)Object['assign'](_0x143967,_0x3f8ea6);else{if(_0x3f8ea6)try{const _0x596737=await _0x3f8ea6(_0x538ba7);Object['assign'](_0x143967,_0x596737);}catch{return Promise['reject'](new R(i(_0x3e0b84,'AI_ERROR_GET_HEADERS')));}}return _0x143967;}async['_prepareRequestParameters'](_0x11378c,_0x188374){const _0x9c621=this['editor']['locale'];if('object'==typeof _0x11378c)return _0x11378c;try{return await _0x11378c(_0x188374);}catch{return Promise['reject'](new R(i(_0x9c621,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x16e5d3){super(_0x16e5d3),_0x16e5d3['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x16e5d3['config']['get']('ai.openAI.requestParameters')||_0x16e5d3['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x16e5d3['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x16e5d3['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x16e5d3['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x45eae3,context:_0x17fb09,onData:_0x3607cf,actionId:_0x543b46}){const _0x2649db=this['editor']['locale'],_0x34c3a2=await this['prepareMessages'](_0x45eae3,_0x17fb09,_0x543b46),_0x6de526=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x543b46),_0x17dd99=await this['_prepareRequestParameters'](this['_requestParameters'],_0x543b46),_0x1fcd19={'messages':_0x34c3a2,..._0x17dd99},_0x3b7564={'method':'POST','headers':_0x6de526,'body':JSON['stringify'](_0x1fcd19),'signal':this['abortController']['signal']},_0x184cb8=await fetch(this['_apiUrl'],_0x3b7564);if(_0x184cb8['ok'])return _0x17dd99['stream']?await this['_readStreamableResponse'](_0x184cb8,_0x3607cf):await this['_readStaticResponse'](_0x184cb8,_0x3607cf),Promise['resolve']();{const _0x46719b=await _0x184cb8['text']();return _0x46719b['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x2649db,'AI_ERROR_CONTEXT_LENGTH'))):_0x46719b['includes']('Moderation')?Promise['reject'](new R(i(_0x2649db,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x46719b));}}async['prepareMessages'](_0x17d3a2,_0x1b68b4,_0x15cb89){let _0x5cbe58,_0x72ac23;return _0x1b68b4?(_0x5cbe58='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.',_0x72ac23='Instruction:\x0a'+_0x17d3a2+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x1b68b4):(_0x5cbe58='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.',_0x72ac23=_0x17d3a2),[{'role':'system','content':_0x5cbe58},{'role':'user','content':_0x72ac23}];}async['_readStreamableResponse'](_0xde4ddb,_0x3c679f){const _0x4ce72e=_0xde4ddb['body']['getReader'](),_0x4b1f8f=new TextDecoder();let _0x5c43b6='',_0x22bb42='',_0x5284db='',_0x5bdd0a=!0x1;for(;!_0x5bdd0a;){const {done:_0x2ed499,value:_0x162bb1}=await _0x4ce72e['read'](),_0x5824df=_0x5c43b6+_0x4b1f8f['decode'](_0x162bb1);let _0x2b5ddc='';_0x5bdd0a=_0x2ed499;try{_0x2b5ddc=this['_cleanUpData'](_0x5824df),_0x5c43b6='';}catch{_0x5c43b6=_0x5824df;continue;}_0x22bb42+=_0x2b5ddc,!_0x5bdd0a&&this['_isBufferIncomplete'](_0x22bb42)||_0x22bb42&&(_0x5284db+=_0x22bb42,_0x22bb42='',_0x3c679f(_0x5284db));}return Promise['resolve']();}async['_readStaticResponse'](_0x3f99e9,_0x15a905){return _0x15a905((await _0x3f99e9['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x194c64){const _0x101005=_0x194c64['split']('<')['length']!==_0x194c64['split']('>')['length'],_0x2117e2=_0x194c64['length']<0x1e;return _0x101005&&_0x2117e2;}['_cleanUpData'](_0x4f1b13){return _0x4f1b13['split'](/\n(?![^{]*\})/g)['map'](_0x55d18=>_0x55d18['replace']('data:\x20',''))['filter'](_0x512ab3=>_0x512ab3&&_0x512ab3['length']>0x0&&'[DONE]'!==_0x512ab3)['map'](_0x2acc2d=>{const {choices:_0x55ff5f}=JSON['parse'](_0x2acc2d);if(_0x55ff5f[0x0]?.['delta']?.['content'])return _0x55ff5f[0x0]['delta']['content'];})['filter'](_0x20f52a=>_0x20f52a)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x5e65e0){super(_0x5e65e0),_0x5e65e0['config']['get']('ai.aws.requestParameters')||_0x5e65e0['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']=_0x5e65e0['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x5e65e0['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x5e65e0['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x5e65e0['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x27ce3e,context:_0x4e4dd0,onData:_0x2007d9,actionId:_0x3a9853}){const {model:_0xe512cf,stream:_0xf5da39,..._0xcd4297}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x3a9853),_0x414189={'prompt':await this['preparePrompt'](_0x27ce3e,_0x4e4dd0,_0xe512cf,_0x3a9853),..._0xcd4297};this['_apiUrl']?await this['_processProxyRequest'](_0x414189,_0xe512cf,_0xf5da39,_0x2007d9,_0x3a9853):await this['_processAWSRequest'](_0x414189,_0xe512cf,_0xf5da39,_0x2007d9);}async['preparePrompt'](_0x528fc9,_0x5a2fe1,_0x952cae,_0x23c58f){let _0x5e4ba6,_0x16be18;return _0x5a2fe1?(_0x5e4ba6='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.',_0x16be18='Instruction:\x0a'+_0x528fc9+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5a2fe1):(_0x5e4ba6='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.',_0x16be18=_0x528fc9),'meta.llama'==this['getModelFamily'](_0x952cae)?'<<SYS>>\x0a'+_0x5e4ba6+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x16be18+'\x0a[/INST]':'Human:\x0a'+_0x5e4ba6+'\x0a'+_0x16be18+'\x0a\x0aAssistant:';}['getModelFamily'](_0x5848af){if(/^anthropic\.claude/['test'](_0x5848af))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x5848af))return'ai21.j2';if(/^cohere\.command/['test'](_0x5848af))return'cohere.command';if(/^meta\.llama/['test'](_0x5848af))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x5848af));}async['_processProxyRequest'](_0x3e4a7b,_0x3e40c6,_0x40e947,_0x311fdd,_0x10088f){const _0x23ee37={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x10088f),'body':JSON['stringify']({..._0x3e4a7b,'model':_0x3e40c6,'stream':_0x40e947}),'signal':this['abortController']['signal']},_0xdea76d=await fetch(this['_apiUrl'],_0x23ee37);_0x40e947?await this['_readStreamableResponse'](_0xdea76d,_0x3e40c6,_0x311fdd):await this['_readStaticResponse'](_0xdea76d,_0x3e40c6,_0x311fdd);}async['_processAWSRequest'](_0xed50b7,_0x11a661,_0x3fb3af,_0x2c7075){const _0xa4ed15=new _0x40928f(this['_bedrockClientConfig']),_0x5ca0fb={'body':JSON['stringify'](_0xed50b7),'contentType':'application/json','accept':'application/json','modelId':_0x11a661};let _0x2fa6a0;if(_0x3fb3af){const _0x3a0a73=new _0x15c443(_0x5ca0fb);_0x2fa6a0=await _0xa4ed15['send'](_0x3a0a73,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x2fa6a0,_0x11a661,_0x2c7075);}else{const _0x4db57e=new _0x3a274c(_0x5ca0fb);_0x2fa6a0=await _0xa4ed15['send'](_0x4db57e,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x2fa6a0,_0x11a661,_0x2c7075);}}async['_readAsyncIterableResponse'](_0x55c1e2,_0x283f9f,_0x5d7c2c){const _0x903a4c=_0x55c1e2['body'],_0x18be39=new TextDecoder('utf-8');let _0xb122e0='';for await(const _0x247bc3 of _0x903a4c)if(_0x247bc3['chunk']){const _0x36b478=_0x18be39['decode'](_0x247bc3['chunk']['bytes']),_0x2d420f=JSON['parse'](_0x36b478);_0xb122e0+=this['_getGeneratedText'](_0x2d420f,_0x283f9f),_0x5d7c2c(_0xb122e0);}return Promise['resolve']();}async['_readStreamableResponse'](_0x2ff467,_0x48ece5,_0x456764){const _0x1f22d5=_0x2ff467['body'],_0x4d7f11=new TextDecoder('utf-8'),_0x5eebb9=_0x1f22d5['getReader']();let _0x15aea7='',_0x4a23c8='',_0x50513c=!0x1;for(;!_0x50513c;){const {done:_0x5836ad,value:_0x23da9b}=await _0x5eebb9['read']();if(_0x50513c=_0x5836ad,_0x50513c)break;const _0x570786=(_0x15aea7+_0x4d7f11['decode'](_0x23da9b))['split']('\x0a')['map'](_0x19bdfe=>{try{return _0x15aea7='',JSON['parse'](_0x19bdfe);}catch{return _0x15aea7=_0x19bdfe,null;}})['filter'](_0x1325e6=>null!==_0x1325e6);_0x570786['length']&&(_0x4a23c8+=_0x570786['map'](_0x4309f8=>this['_getGeneratedText'](_0x4309f8,_0x48ece5))['join'](''),_0x456764(_0x4a23c8));}return Promise['resolve']();}async['_readStaticResponse'](_0x2c262c,_0x1899d5,_0x1f3337){let _0x414f9c;return _0x414f9c=_0x2c262c instanceof Response?await _0x2c262c['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x2c262c['body'])),(_0x1f3337(this['_getGeneratedText'](_0x414f9c,_0x1899d5)),Promise['resolve']());}['_getGeneratedText'](_0x155a68,_0x5540ea){switch(this['getModelFamily'](_0x5540ea)){case'anthropic.claude':return _0x155a68['completion'];case'ai21.j2':return _0x155a68['completions'][0x0]['data']['text'];case'cohere.command':return _0x155a68['generations'][0x0]['text'];case'meta.llama':return _0x155a68['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':_0x475087=>0x1!=_0x475087}};
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':_0x2441be=>0x1!=_0x2441be}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x23e797=>{const {af:{dictionary:_0x42e63d,getPluralForm:_0x31ec0c}}={'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':_0x384741=>0x1!=_0x384741}};_0x23e797['af']||={'dictionary':{},'getPluralForm':null},_0x23e797['af']['dictionary']=Object['assign'](_0x23e797['af']['dictionary'],_0x42e63d),_0x23e797['af']['getPluralForm']=_0x31ec0c;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x4aed80=>{const {af:{dictionary:_0xbe3c35,getPluralForm:_0x3aaf01}}={'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':_0x26ef3f=>0x1!=_0x26ef3f}};_0x4aed80['af']||={'dictionary':{},'getPluralForm':null},_0x4aed80['af']['dictionary']=Object['assign'](_0x4aed80['af']['dictionary'],_0xbe3c35),_0x4aed80['af']['getPluralForm']=_0x3aaf01;})(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':_0x275374=>0x0==_0x275374?0x0:0x1==_0x275374?0x1:0x2==_0x275374?0x2:_0x275374%0x64>=0x3&&_0x275374%0x64<=0xa?0x3:_0x275374%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':_0x4d1f9f=>0x0==_0x4d1f9f?0x0:0x1==_0x4d1f9f?0x1:0x2==_0x4d1f9f?0x2:_0x4d1f9f%0x64>=0x3&&_0x4d1f9f%0x64<=0xa?0x3:_0x4d1f9f%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x25e6e7=>{const {ar:{dictionary:_0x2e506a,getPluralForm:_0x404820}}={'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':_0xf161da=>0x0==_0xf161da?0x0:0x1==_0xf161da?0x1:0x2==_0xf161da?0x2:_0xf161da%0x64>=0x3&&_0xf161da%0x64<=0xa?0x3:_0xf161da%0x64>=0xb?0x4:0x5}};_0x25e6e7['ar']||={'dictionary':{},'getPluralForm':null},_0x25e6e7['ar']['dictionary']=Object['assign'](_0x25e6e7['ar']['dictionary'],_0x2e506a),_0x25e6e7['ar']['getPluralForm']=_0x404820;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0xb465bd=>{const {ar:{dictionary:_0x985b0a,getPluralForm:_0x1b3720}}={'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':_0x2ed4f6=>0x0==_0x2ed4f6?0x0:0x1==_0x2ed4f6?0x1:0x2==_0x2ed4f6?0x2:_0x2ed4f6%0x64>=0x3&&_0x2ed4f6%0x64<=0xa?0x3:_0x2ed4f6%0x64>=0xb?0x4:0x5}};_0xb465bd['ar']||={'dictionary':{},'getPluralForm':null},_0xb465bd['ar']['dictionary']=Object['assign'](_0xb465bd['ar']['dictionary'],_0x985b0a),_0xb465bd['ar']['getPluralForm']=_0x1b3720;})(window['CKEDITOR_TRANSLATIONS']||={});