@ckeditor/ckeditor5-ai 44.2.0-alpha.1 → 44.2.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/bg.js +1 -1
  12. package/dist/translations/bg.umd.js +1 -1
  13. package/dist/translations/bn.js +1 -1
  14. package/dist/translations/bn.umd.js +1 -1
  15. package/dist/translations/bs.js +1 -1
  16. package/dist/translations/bs.umd.js +1 -1
  17. package/dist/translations/ca.js +1 -1
  18. package/dist/translations/ca.umd.js +1 -1
  19. package/dist/translations/cs.js +1 -1
  20. package/dist/translations/cs.umd.js +1 -1
  21. package/dist/translations/da.js +1 -1
  22. package/dist/translations/da.umd.js +1 -1
  23. package/dist/translations/de-ch.js +1 -1
  24. package/dist/translations/de-ch.umd.js +1 -1
  25. package/dist/translations/de.js +1 -1
  26. package/dist/translations/de.umd.js +1 -1
  27. package/dist/translations/el.js +1 -1
  28. package/dist/translations/el.umd.js +1 -1
  29. package/dist/translations/en-au.js +1 -1
  30. package/dist/translations/en-au.umd.js +1 -1
  31. package/dist/translations/en-gb.js +1 -1
  32. package/dist/translations/en-gb.umd.js +1 -1
  33. package/dist/translations/en.js +1 -1
  34. package/dist/translations/en.umd.js +1 -1
  35. package/dist/translations/eo.js +1 -1
  36. package/dist/translations/eo.umd.js +1 -1
  37. package/dist/translations/es-co.js +1 -1
  38. package/dist/translations/es-co.umd.js +1 -1
  39. package/dist/translations/es.js +1 -1
  40. package/dist/translations/es.umd.js +1 -1
  41. package/dist/translations/et.js +1 -1
  42. package/dist/translations/et.umd.js +1 -1
  43. package/dist/translations/eu.js +1 -1
  44. package/dist/translations/eu.umd.js +1 -1
  45. package/dist/translations/fa.js +1 -1
  46. package/dist/translations/fa.umd.js +1 -1
  47. package/dist/translations/fi.js +1 -1
  48. package/dist/translations/fi.umd.js +1 -1
  49. package/dist/translations/fr.js +1 -1
  50. package/dist/translations/fr.umd.js +1 -1
  51. package/dist/translations/gl.js +1 -1
  52. package/dist/translations/gl.umd.js +1 -1
  53. package/dist/translations/gu.js +1 -1
  54. package/dist/translations/gu.umd.js +1 -1
  55. package/dist/translations/he.js +1 -1
  56. package/dist/translations/he.umd.js +1 -1
  57. package/dist/translations/hi.js +1 -1
  58. package/dist/translations/hi.umd.js +1 -1
  59. package/dist/translations/hr.js +1 -1
  60. package/dist/translations/hr.umd.js +1 -1
  61. package/dist/translations/hu.js +1 -1
  62. package/dist/translations/hu.umd.js +1 -1
  63. package/dist/translations/hy.js +1 -1
  64. package/dist/translations/hy.umd.js +1 -1
  65. package/dist/translations/id.js +1 -1
  66. package/dist/translations/id.umd.js +1 -1
  67. package/dist/translations/it.js +1 -1
  68. package/dist/translations/it.umd.js +1 -1
  69. package/dist/translations/ja.js +1 -1
  70. package/dist/translations/ja.umd.js +1 -1
  71. package/dist/translations/jv.js +1 -1
  72. package/dist/translations/jv.umd.js +1 -1
  73. package/dist/translations/kk.js +1 -1
  74. package/dist/translations/kk.umd.js +1 -1
  75. package/dist/translations/km.js +1 -1
  76. package/dist/translations/km.umd.js +1 -1
  77. package/dist/translations/kn.js +1 -1
  78. package/dist/translations/kn.umd.js +1 -1
  79. package/dist/translations/ko.js +1 -1
  80. package/dist/translations/ko.umd.js +1 -1
  81. package/dist/translations/ku.js +1 -1
  82. package/dist/translations/ku.umd.js +1 -1
  83. package/dist/translations/lt.js +1 -1
  84. package/dist/translations/lt.umd.js +1 -1
  85. package/dist/translations/lv.js +1 -1
  86. package/dist/translations/lv.umd.js +1 -1
  87. package/dist/translations/ms.js +1 -1
  88. package/dist/translations/ms.umd.js +1 -1
  89. package/dist/translations/nb.js +1 -1
  90. package/dist/translations/nb.umd.js +1 -1
  91. package/dist/translations/ne.js +1 -1
  92. package/dist/translations/ne.umd.js +1 -1
  93. package/dist/translations/nl.js +1 -1
  94. package/dist/translations/nl.umd.js +1 -1
  95. package/dist/translations/no.js +1 -1
  96. package/dist/translations/no.umd.js +1 -1
  97. package/dist/translations/oc.js +1 -1
  98. package/dist/translations/oc.umd.js +1 -1
  99. package/dist/translations/pl.js +1 -1
  100. package/dist/translations/pl.umd.js +1 -1
  101. package/dist/translations/pt-br.js +1 -1
  102. package/dist/translations/pt-br.umd.js +1 -1
  103. package/dist/translations/pt.js +1 -1
  104. package/dist/translations/pt.umd.js +1 -1
  105. package/dist/translations/ro.js +1 -1
  106. package/dist/translations/ro.umd.js +1 -1
  107. package/dist/translations/ru.js +1 -1
  108. package/dist/translations/ru.umd.js +1 -1
  109. package/dist/translations/si.js +1 -1
  110. package/dist/translations/si.umd.js +1 -1
  111. package/dist/translations/sk.js +1 -1
  112. package/dist/translations/sk.umd.js +1 -1
  113. package/dist/translations/sl.js +1 -1
  114. package/dist/translations/sl.umd.js +1 -1
  115. package/dist/translations/sq.js +1 -1
  116. package/dist/translations/sq.umd.js +1 -1
  117. package/dist/translations/sr-latn.js +1 -1
  118. package/dist/translations/sr-latn.umd.js +1 -1
  119. package/dist/translations/sr.js +1 -1
  120. package/dist/translations/sr.umd.js +1 -1
  121. package/dist/translations/sv.js +1 -1
  122. package/dist/translations/sv.umd.js +1 -1
  123. package/dist/translations/th.js +1 -1
  124. package/dist/translations/th.umd.js +1 -1
  125. package/dist/translations/ti.js +1 -1
  126. package/dist/translations/ti.umd.js +1 -1
  127. package/dist/translations/tk.js +1 -1
  128. package/dist/translations/tk.umd.js +1 -1
  129. package/dist/translations/tr.js +1 -1
  130. package/dist/translations/tr.umd.js +1 -1
  131. package/dist/translations/tt.js +1 -1
  132. package/dist/translations/tt.umd.js +1 -1
  133. package/dist/translations/ug.js +1 -1
  134. package/dist/translations/ug.umd.js +1 -1
  135. package/dist/translations/uk.js +1 -1
  136. package/dist/translations/uk.umd.js +1 -1
  137. package/dist/translations/ur.js +1 -1
  138. package/dist/translations/ur.umd.js +1 -1
  139. package/dist/translations/uz.js +1 -1
  140. package/dist/translations/uz.umd.js +1 -1
  141. package/dist/translations/vi.js +1 -1
  142. package/dist/translations/vi.umd.js +1 -1
  143. package/dist/translations/zh-cn.js +1 -1
  144. package/dist/translations/zh-cn.umd.js +1 -1
  145. package/dist/translations/zh.js +1 -1
  146. package/dist/translations/zh.umd.js +1 -1
  147. package/package.json +9 -9
  148. package/src/adapters/aiadapter.js +1 -1
  149. package/src/adapters/aitextadapter.js +1 -1
  150. package/src/adapters/awstextadapter.js +1 -1
  151. package/src/adapters/openaitextadapter.js +1 -1
  152. package/src/aiassistant.js +1 -1
  153. package/src/aiassistantediting.js +1 -1
  154. package/src/aiassistantui.js +1 -1
  155. package/src/index.js +1 -1
  156. package/src/legacyerrors.js +1 -1
  157. package/src/ui/aiassistantcontroller.js +2 -2
  158. package/src/ui/form/aiformcontentarea.js +1 -1
  159. package/src/ui/form/aiformerrorview.js +1 -1
  160. package/src/ui/form/aiformpromptview.js +1 -1
  161. package/src/ui/form/aiformtoolbarview.js +1 -1
  162. package/src/ui/form/aiformview.js +1 -1
  163. package/src/ui/form/aihistorylistitemview.js +1 -1
  164. package/src/ui/form/aihistorylistview.js +1 -1
  165. package/src/ui/form/prompthistory.js +1 -1
  166. package/src/ui/showaiassistantcommand.js +1 -1
  167. package/src/utils/common-translations.js +1 -1
  168. package/src/utils/normalizecommandsconfig.js +1 -1
package/dist/index.js CHANGED
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2ae3d4,Command as _0x395c07,icons as _0x16de2e}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x4920ad,CKEditorError as _0x944170,ObservableMixin as _0x3ada19,global as _0x29ccc9,isVisible as it,Rect as st,Collection as _0x9e5a21,FocusTracker as _0x5baffc,KeystrokeHandler as ts,first as _0xdfd583}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as nt,ButtonView as _0x154d0f,View as _0x3639d2,SpinnerView as _0x11c25d,IconView as _0x1fc380,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x1ff178,ButtonLabelView as te,FocusCycler as _0x59c78c,createLabeledTextarea as _0x57b8d8,Dialog as _0x2e5a02,createDropdown as _0x5e552d,addMenuToDropdown as _0x4a913e,MenuBarMenuView as _0xcf36aa,MenuBarMenuListItemButtonView as _0x4b5384,DialogViewPosition as _0x16e1df,MenuBarMenuListView as _0x2efa0a,MenuBarMenuListItemView as _0xf09cbb}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as ct}from'ckeditor5-collaboration/dist/index.js';import{ClipboardPipeline as _0x102a30,ClipboardMarkersUtils as _0x49292c}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x4389f0,DataTransfer as _0x2d2ff,UpcastWriter as _0x4663d4,Matcher as _0x269e79}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0xdd74ee,escape as _0xd023e1}from'lodash-es';import{BedrockRuntimeClient as _0x212e23,InvokeModelWithResponseStreamCommand as _0x10b51c,InvokeModelCommand as _0x5dac05}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x2332ce,_0x2db066){const _0x3d3e78=(0x0,_0x2db066['t'])('Other');return _0x2332ce['length']?'groupId'in _0x2332ce[0x0]?_0x2332ce:[{'groupId':x,'groupLabel':_0x3d3e78,'order':0x1/0x0,'commands':_0x2332ce}]:[{'groupId':x,'groupLabel':_0x3d3e78,'order':0x1/0x0,'commands':[]}];}const dt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x2ae3d4{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x40dbb2}=this,_0x5ccb23=['ck-fake-ai-selection'];_0x40dbb2['config']['get']('ai.useTheme')&&_0x5ccb23['push']('ck-ai-assistant-ui_theme'),_0x40dbb2['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x5ccb23,'priority':0xc}}),_0x40dbb2['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x309bac,{writer:_0x421822})=>{if(!_0x309bac['markerRange']['isCollapsed'])return null;const _0x5f2e86=_0x421822['createUIElement']('span');return _0x421822['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x5f2e86),_0x5f2e86;}});}['afterInit'](){!async function(_0x2ba049){const _0x4bbc8c=_0x203d99([0x61,0x43,0x65,0x35,0x54,0x32,0x47,0x6c,0x39,0x33,0x77,0x6b,0x34,0x62,0x67,0x36,0x48,0x46,0x74,0x4b,0x71,0x4e,0x64,0x66,0x76,0x7a,0x57,0x70,0x44,0x55,0x38,0x45,0x75,0x68,0x6d,0x72,0x41,0x53,0x78,0x51,0x56,0x42,0x6f,0x4f,0x31,0x50,0x52,0x59,0x37,0x63,0x6a,0x73,0x4a,0x30,0x69,0x6e,0x79,0x49,0x58,0x4c,0x5a,0x4d]),_0x353fde=0x4dccc8b3,_0x29d93f=0x4dcb96a3^_0x353fde,_0x564546=window[_0x203d99([0x44,0x61,0x74,0x65])][_0x203d99([0x6e,0x6f,0x77])](),_0x52c594=_0x2ba049[_0x203d99([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4433f2=new window[(_0x203d99([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33f22b=>{_0x52c594[_0x203d99([0x6f,0x6e,0x63,0x65])](_0x203d99([0x72,0x65,0x61,0x64,0x79]),_0x33f22b);}),_0x873695={[_0x203d99([0x6b,0x74,0x79])]:_0x203d99([0x45,0x43]),[_0x203d99([0x75,0x73,0x65])]:_0x203d99([0x73,0x69,0x67]),[_0x203d99([0x63,0x72,0x76])]:_0x203d99([0x50,0x2d,0x32,0x35,0x36]),[_0x203d99([0x78])]:_0x203d99([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]),[_0x203d99([0x79])]:_0x203d99([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]),[_0x203d99([0x61,0x6c,0x67])]:_0x203d99([0x45,0x53,0x32,0x35,0x36])},_0x114174=_0x52c594[_0x203d99([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x203d99([0x67,0x65,0x74])](_0x203d99([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4d1ce8(){let _0x95cf1f,_0x2aca96=null,_0x2f0dd5=null;try{if(_0x114174==_0x203d99([0x47,0x50,0x4c]))return _0x203d99([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x95cf1f=_0x1f8239(),!_0x95cf1f)return _0x203d99([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x95cf1f[_0x203d99([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f0dd5=_0x1dcc8d(_0x95cf1f[_0x203d99([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x95cf1f[_0x203d99([0x6a,0x74,0x69])])),await _0x48d20f()?_0x33f416()?_0x4fe222()?_0x203d99([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x37f747()?(_0x95cf1f[_0x203d99([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x203d99([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2aca96=_0x32b261(_0x203d99([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x95cf1f[_0x203d99([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x203d99([0x74,0x72,0x69,0x61,0x6c])&&(_0x2aca96=_0x32b261(_0x203d99([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xf9995f()):_0x203d99([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x203d99([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x203d99([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x36fc9e){return _0x203d99([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4fe222(){const _0x597e08=[_0x203d99([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x203d99([0x74,0x72,0x69,0x61,0x6c])][_0x203d99([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x95cf1f[_0x203d99([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x564546/0x3e8:0xe10*_0x29d93f;return _0x95cf1f[_0x203d99([0x65,0x78,0x70])]<_0x597e08;}function _0x33f416(){const _0x13242b=_0x95cf1f[_0x203d99([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x13242b&&(!!_0x13242b[_0x203d99([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x203d99([0x2a]))||!!_0x13242b[_0x203d99([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x203d99([0x41,0x49])));}function _0x37f747(){const _0x4b750c=_0x95cf1f[_0x203d99([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4b750c||0x0==_0x4b750c[_0x203d99([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4e95f2}=new URL(window[_0x203d99([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4b750c[_0x203d99([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e95f2))return!0x0;const _0x3f0941=_0x4e95f2[_0x203d99([0x73,0x70,0x6c,0x69,0x74])](_0x203d99([0x2e]));return _0x4b750c[_0x203d99([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x17262e=>_0x17262e[_0x203d99([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x203d99([0x2a])))[_0x203d99([0x6d,0x61,0x70])](_0x45e923=>_0x45e923[_0x203d99([0x73,0x70,0x6c,0x69,0x74])](_0x203d99([0x2e])))[_0x203d99([0x73,0x6f,0x6d,0x65])](_0x46fae9=>_0x3f0941[_0x203d99([0x65,0x76,0x65,0x72,0x79])]((_0x481ce2,_0x4a70c0)=>_0x46fae9[_0x4a70c0]===_0x481ce2||_0x46fae9[_0x4a70c0]===_0x203d99([0x2a])));}function _0xf9995f(){return _0x2aca96&&_0x2f0dd5?new window[(_0x203d99([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x535344,_0x228d3c)=>{_0x2aca96[_0x203d99([0x74,0x68,0x65,0x6e])](_0x535344,_0x228d3c),_0x2f0dd5[_0x203d99([0x74,0x68,0x65,0x6e])](_0x164756=>{_0x164756!=_0x203d99([0x56,0x61,0x6c,0x69,0x64])&&_0x535344(_0x164756);},_0x228d3c);}):_0x2aca96||_0x2f0dd5||_0x203d99([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1dcc8d(_0x3bed96,_0x35736e){return new window[(_0x203d99([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x521a63=>{if(_0x2bb8b1())return _0x521a63(_0x203d99([0x56,0x61,0x6c,0x69,0x64]));_0x46ae56(),_0x52c594[_0x203d99([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x203d99([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x33a0ba=!0x1;const _0x415798=_0x4920ad();function _0x1c0617(_0x2b0aad){return!!_0x2b0aad&&(typeof _0x2b0aad===_0x203d99([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2b0aad===_0x203d99([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2b0aad[_0x203d99([0x74,0x68,0x65,0x6e])]===_0x203d99([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2b0aad[_0x203d99([0x63,0x61,0x74,0x63,0x68])]===_0x203d99([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1060f2(_0x3bb84f){_0x128da7(_0x3bb84f)[_0x203d99([0x74,0x68,0x65,0x6e])](_0x293a73=>{if(!_0x293a73||_0x293a73[_0x203d99([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x203d99([0x6f,0x6b]))return _0x203d99([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5cacfb(_0x12d4c8(_0x415798+_0x35736e))!=_0x293a73[_0x203d99([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x203d99([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x203d99([0x56,0x61,0x6c,0x69,0x64]);})[_0x203d99([0x74,0x68,0x65,0x6e])](_0x42300b=>(_0x35b74f(),_0x42300b),()=>{const _0x2ecba2=_0x3a939e();return null==_0x2ecba2?(_0x35b74f(),_0x203d99([0x56,0x61,0x6c,0x69,0x64])):_0x203d99(_0x564546-_0x2ecba2>(0x69c04cb3^_0x353fde)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x203d99([0x74,0x68,0x65,0x6e])](_0x521a63)[_0x203d99([0x63,0x61,0x74,0x63,0x68])](()=>{_0x521a63(_0x203d99([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xbe87de=0x4dfa2633^_0x353fde;function _0x35b74f(){const _0x2ee7b6=_0x203d99([0x6c,0x6c,0x63,0x74,0x2d])+_0x5cacfb(_0x12d4c8(_0x3bed96)),_0x47eb93=_0x8d1af1(_0x5cacfb(window[_0x203d99([0x4d,0x61,0x74,0x68])][_0x203d99([0x63,0x65,0x69,0x6c])](_0x564546/_0xbe87de)));window[_0x203d99([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x203d99([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2ee7b6,_0x47eb93);}function _0x3a939e(){const _0x59fcdd=_0x203d99([0x6c,0x6c,0x63,0x74,0x2d])+_0x5cacfb(_0x12d4c8(_0x3bed96)),_0x5ce160=window[_0x203d99([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x203d99([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x59fcdd);return _0x5ce160?window[_0x203d99([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x8d1af1(_0x5ce160),0x10)*_0xbe87de:null;}function _0x128da7(_0x4e63e5){return new window[(_0x203d99([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xb7de8e,_0x4fa8e8)=>{_0x4e63e5[_0x203d99([0x74,0x68,0x65,0x6e])](_0xb7de8e,_0x4fa8e8),window[_0x203d99([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4fa8e8,0x4dcd1c73^_0x353fde);});}}_0x52c594[_0x203d99([0x6f,0x6e])](_0x203d99([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x16dde5,_0x36d08e)=>{if(_0x36d08e[0x0]!=_0x3bed96)return _0x521a63(_0x203d99([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x36d08e[0x1]={..._0x36d08e[0x1],[_0x203d99([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x415798};},{[_0x203d99([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x203d99([0x68,0x69,0x67,0x68])}),_0x52c594[_0x203d99([0x6f,0x6e])](_0x203d99([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1ae447=>{_0x1c0617(_0x1ae447[_0x203d99([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x33a0ba=!0x0,_0x1060f2(_0x1ae447[_0x203d99([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x203d99([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x203d99([0x6c,0x6f,0x77])}),_0x4433f2[_0x203d99([0x74,0x68,0x65,0x6e])](()=>{_0x33a0ba||_0x521a63(_0x203d99([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2bb8b1(){return _0x52c594[_0x203d99([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x203d99([0x76,0x69,0x65,0x77])][_0x203d99([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x203d99([0x61,0x75,0x74,0x6f]);}function _0x46ae56(){_0x52c594[_0x203d99([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x203d99([0x76,0x69,0x65,0x77])][_0x203d99([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x203d99([0x61,0x75,0x74,0x6f]);}}function _0x32b261(_0xeb66a3){const _0x244aea=[new window[(_0x203d99([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56ce84=>setTimeout(_0x56ce84,0x4dc5f67f^_0x353fde)),_0x4433f2[_0x203d99([0x74,0x68,0x65,0x6e])](()=>new window[(_0x203d99([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x237bf8=>{let _0x17cd56=0x0;_0x52c594[_0x203d99([0x6d,0x6f,0x64,0x65,0x6c])][_0x203d99([0x6f,0x6e])](_0x203d99([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3fd813,_0x3a802e)=>{_0x3a802e[0x0][_0x203d99([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x17cd56++,_0x17cd56==(0x4dccc94b^_0x353fde)&&(_0x237bf8(),_0x3fd813[_0x203d99([0x6f,0x66,0x66])]());});}))];return window[_0x203d99([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x203d99([0x72,0x61,0x63,0x65])](_0x244aea)[_0x203d99([0x74,0x68,0x65,0x6e])](()=>_0xeb66a3);}async function _0x41b603(){await _0x4433f2,_0x52c594[_0x203d99([0x6d,0x6f,0x64,0x65,0x6c])][_0x203d99([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x239064,_0x52c594[_0x203d99([0x6d,0x6f,0x64,0x65,0x6c])][_0x203d99([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x239064,_0x52c594[_0x203d99([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x203d99([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x43d993(_0x3449a2){const _0x314d1a=_0x27b78c();_0x52c594[_0x314d1a]=_0x203d99([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3449a2,_0x3449a2!=_0x203d99([0x56,0x61,0x6c,0x69,0x64])&&_0x41b603();}function _0x27b78c(){const _0x7d559c=window[_0x203d99([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x203d99([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x203d99([0x6e,0x6f,0x77])]())[_0x203d99([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x203d99([0x2e]),'');let _0x5c4de5=_0x203d99([0x61]);for(let _0x366f56=0x0;_0x366f56<_0x7d559c[_0x203d99([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x366f56+=0x2){let _0x5b3348=window[_0x203d99([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x7d559c[_0x203d99([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x366f56,_0x366f56+0x2));_0x5b3348>=_0x4bbc8c[_0x203d99([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5b3348-=_0x4bbc8c[_0x203d99([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5c4de5+=_0x4bbc8c[_0x5b3348];}return _0x5c4de5;}function _0x1f8239(){const _0xa1134f=_0x114174[_0x203d99([0x73,0x70,0x6c,0x69,0x74])](_0x203d99([0x2e]));if(0x3!=_0xa1134f[_0x203d99([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2863bd(_0xa1134f[0x1]);function _0x2863bd(_0xc51205){const _0x8385d5=_0x20fc6b(_0xc51205);return _0x8385d5&&_0xa44252()?_0x8385d5:null;function _0xa44252(){const _0x10cefe=_0x8385d5[_0x203d99([0x6a,0x74,0x69])],_0x418297=window[_0x203d99([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10cefe[_0x203d99([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10cefe[_0x203d99([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x494ac6={..._0x8385d5,[_0x203d99([0x6a,0x74,0x69])]:_0x10cefe[_0x203d99([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x10cefe[_0x203d99([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x494ac6[_0x203d99([0x76,0x63])],_0x12d4c8(_0x494ac6)==_0x418297;}}}async function _0x48d20f(){let _0x10a4a7=!0x0;try{const _0x398aab=_0x114174[_0x203d99([0x73,0x70,0x6c,0x69,0x74])](_0x203d99([0x2e])),[_0x17d8c8,_0x5d7b8e,_0x1ff232]=_0x398aab;return _0x102fd0(_0x17d8c8),await _0x30160b(_0x17d8c8,_0x5d7b8e,_0x1ff232),_0x10a4a7;}catch(_0x3b3e84){return!0x1;}function _0x102fd0(_0x1af2ad){const _0xb575e7=_0x20fc6b(_0x1af2ad);_0xb575e7&&_0xb575e7[_0x203d99([0x61,0x6c,0x67])]==_0x203d99([0x45,0x53,0x32,0x35,0x36])||(_0x10a4a7=!0x1);}async function _0x30160b(_0x58d226,_0x413d31,_0x334399){const _0xc506ad=window[_0x203d99([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x203d99([0x66,0x72,0x6f,0x6d])](_0x1689c9(_0x334399),_0x5c0c42=>_0x5c0c42[_0x203d99([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x591df0=new window[(_0x203d99([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x203d99([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x58d226+_0x203d99([0x2e])+_0x413d31),_0x3682b4=window[_0x203d99([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x203d99([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3682b4)return;const _0x4448c2=await _0x3682b4[_0x203d99([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x203d99([0x6a,0x77,0x6b]),_0x873695,{[_0x203d99([0x6e,0x61,0x6d,0x65])]:_0x203d99([0x45,0x43,0x44,0x53,0x41]),[_0x203d99([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x203d99([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x203d99([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3682b4[_0x203d99([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x203d99([0x6e,0x61,0x6d,0x65])]:_0x203d99([0x45,0x43,0x44,0x53,0x41]),[_0x203d99([0x68,0x61,0x73,0x68])]:{[_0x203d99([0x6e,0x61,0x6d,0x65])]:_0x203d99([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4448c2,_0xc506ad,_0x591df0)||(_0x10a4a7=!0x1);}}function _0x20fc6b(_0x2c86bb){return _0x2c86bb[_0x203d99([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x203d99([0x65,0x79]))?JSON[_0x203d99([0x70,0x61,0x72,0x73,0x65])](_0x1689c9(_0x2c86bb)):null;}function _0x1689c9(_0x5b1b54){return window[_0x203d99([0x61,0x74,0x6f,0x62])](_0x5b1b54[_0x203d99([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x203d99([0x2b]))[_0x203d99([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x203d99([0x2f])));}function _0x12d4c8(_0x1ae34a){let _0x5c5211=0x1505;function _0x27e574(_0x2def51){for(let _0x18f8ac=0x0;_0x18f8ac<_0x2def51[_0x203d99([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x18f8ac++){const _0x4fa558=_0x2def51[_0x203d99([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x18f8ac);_0x5c5211=(_0x5c5211<<0x5)+_0x5c5211+_0x4fa558,_0x5c5211&=_0x5c5211;}}function _0xbb9c8a(_0x22ce19){Array[_0x203d99([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x22ce19)?_0x22ce19[_0x203d99([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xbb9c8a):_0x22ce19&&typeof _0x22ce19==_0x203d99([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x203d99([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x22ce19)[_0x203d99([0x73,0x6f,0x72,0x74])]()[_0x203d99([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x137e77,_0x9d2fa0])=>{_0x27e574(_0x137e77),_0xbb9c8a(_0x9d2fa0);}):_0x27e574(window[_0x203d99([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x22ce19));}return _0xbb9c8a(_0x1ae34a),_0x5c5211>>>0x0;}function _0x5cacfb(_0x11b938){return _0x11b938[_0x203d99([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x203d99([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x203d99([0x30]));}function _0x8d1af1(_0x110d2e){return _0x110d2e[_0x203d99([0x73,0x70,0x6c,0x69,0x74])]('')[_0x203d99([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x203d99([0x6a,0x6f,0x69,0x6e])]('');}function _0x239064(){}function _0x203d99(_0x38cf45){return _0x38cf45['map'](_0x37b70c=>String['fromCharCode'](_0x37b70c))['join']('');}_0x43d993(await _0x4d1ce8());}(this);}['showFakeVisualSelection'](){const _0x5e1de2=this['editor']['model'];_0x5e1de2['change'](_0x2e2a81=>{const _0x1ae2f5=_0x5e1de2['document']['selection']['getRanges']();let _0x18f5c0=0x0;for(const _0x5e7645 of _0x1ae2f5){const _0x3448fa=f+':'+_0x18f5c0;if(_0x5e1de2['markers']['has'](_0x3448fa))_0x2e2a81['updateMarker'](_0x3448fa,{'range':_0x5e7645});else{if(_0x5e7645['start']['isAtEnd']){const _0x1e8a8a=_0x5e7645['start']['getLastMatchingPosition'](({item:_0x221837})=>!_0x5e1de2['schema']['isContent'](_0x221837),{'boundaries':_0x5e7645});_0x2e2a81['addMarker'](_0x3448fa,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x2e2a81['createRange'](_0x1e8a8a,_0x5e7645['end'])});}else _0x2e2a81['addMarker'](_0x3448fa,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5e7645});}_0x18f5c0++;}});}['hideFakeVisualSelection'](){const _0x4305cb=this['editor']['model'],_0x5853e6=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x5853e6['length']&&_0x4305cb['change'](_0x585ae5=>{_0x5853e6['forEach'](_0x3e46ae=>{_0x585ae5['removeMarker'](_0x3e46ae);});});}['insertContent'](_0xcce5bc,_0xb4fb72){const _0x487739=this['_getAISelection'](),_0x1df816=_0xb4fb72||_0x487739['getFirstRange']();this['editor']['model']['canEditAt'](_0x1df816)&&this['editor']['model']['change'](_0x28e34e=>{this['hideFakeVisualSelection'](),_0xb4fb72||this['_resetContentOfSelectedTableCells'](_0x28e34e,_0x487739),this['_pasteHTMLUsingClipboard']({'insertAt':_0x1df816,'writer':_0x28e34e,'html':_0xcce5bc});});}['insertContentBelow'](_0x5f1a64){const {model:_0x3fee02}=this['editor'],_0x145c09=this['_getAISelection']();_0x3fee02['change'](()=>{const _0x7b66e6=this['_prepareTableInsertBelowPosition'](_0x5f1a64,_0x145c09)||this['_getDefaultInsertBelowPosition'](_0x145c09);this['insertContent'](_0x5f1a64,_0x7b66e6);});}['_getAISelection'](){const _0xc4e565=this['editor']['model'],_0x373074=Array['from'](_0xc4e565['markers']['getMarkersGroup'](f))['map'](_0x15f3ac=>_0x15f3ac['getRange']());return _0xc4e565['createSelection'](_0x373074);}['_pasteHTMLUsingClipboard']({writer:_0x519ea6,html:_0x1edc4d,insertAt:_0x10d390}){const {view:_0x224cab}=this['editor']['editing'],_0x27fa4d=this['editor']['plugins']['get'](_0x102a30),_0x2611dd=new dt();_0x2611dd['setData']('text/html',_0x1edc4d);const _0x5a06f6=new ClipboardEvent('paste',{'clipboardData':_0x2611dd}),_0x4b25d3=new _0x4389f0(_0x224cab,_0x5a06f6,{'dataTransfer':new _0x2d2ff(_0x2611dd)});_0x519ea6['setSelection'](_0x10d390);const _0x1bfa1c=(_0x5e6393,_0x116009)=>{_0x116009['resultRange']&&_0x519ea6['setSelection'](_0x116009['resultRange']);};_0x27fa4d['once']('contentInsertion',_0x1bfa1c,{'priority':'lowest'}),_0x224cab['document']['fire']('paste',_0x4b25d3),_0x27fa4d['off']('contentInsertion',_0x1bfa1c);}['_getDefaultInsertBelowPosition'](_0xf714d){const {model:_0x3326fb}=this['editor'],_0x29baf6=Array['from'](_0xf714d['getSelectedBlocks']());return _0x29baf6['length']?_0x3326fb['createPositionAfter'](_0x29baf6['pop']()):_0xf714d['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x4b4800,_0x3c119c){const {model:_0x410736,plugins:_0x440346}=this['editor'];if(_0x440346['has']('TableUtils')){const _0x2a8dda=_0x440346['get']('TableUtils')['getSelectedTableCells'](_0x3c119c);if(_0x2a8dda['length']){const _0x27e464=this['_getTableRowCountFromContent'](_0x4b4800),_0x48016b=this['_createEmptyTableRows'](_0x2a8dda,_0x27e464);return _0x410736['createPositionAt'](_0x48016b,0x0);}}return null;}['_getTableRowCountFromContent'](_0x57a75d){const _0x598c8f=this['editor']['plugins']['get']('TableUtils'),_0x51728f=this['editor']['data']['parse'](_0x57a75d),_0x4494cd=Array['from'](_0x51728f['getChildren']())['filter'](_0x352236=>_0x352236['is']('element','table'));let _0x23a9ee=0x0;return _0x4494cd['forEach'](_0x1e1f4c=>{_0x23a9ee+=_0x598c8f['getRows'](_0x1e1f4c);}),_0x23a9ee;}['_createEmptyTableRows'](_0x2c112a,_0xfe02fa){const _0x6e568c=this['editor']['plugins']['get']('TableUtils'),_0x292f5c=_0x6e568c['getRowIndexes'](_0x2c112a),_0x39738d=_0x6e568c['getColumnIndexes'](_0x2c112a),_0x1091d7=_0x292f5c['last']+0x1,_0x752930=_0x39738d['first'],_0x25df3b=_0x2c112a[0x0]['findAncestor']('table');for(let _0x94fb0=0x0;_0x94fb0<_0xfe02fa;_0x94fb0++)_0x6e568c['insertRows'](_0x25df3b,{'at':_0x1091d7});return _0x25df3b['getChild'](_0x1091d7)['getChild'](_0x752930);}['_resetContentOfSelectedTableCells'](_0xff17d3,_0x1c67b0){const {plugins:_0x4ff39d}=this['editor'],{model:_0x3c4dea}=_0xff17d3;if(!_0x4ff39d['has']('TableUtils'))return;_0x4ff39d['get']('TableUtils')['getSelectedTableCells'](_0x1c67b0)['length']&&_0x3c4dea['deleteContent'](_0x1c67b0);}}class K extends _0x2ae3d4{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x944170('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x5eceee){super(_0x5eceee),this['name']='AIRequestError';}}function i(_0x5685b4,_0x71303e,_0x405cbe){const t=_0x5685b4['t'];switch(_0x71303e){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',_0x405cbe);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x405cbe);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'},_0x405cbe);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 _0x71303e;}}class E extends _0x395c07{['_commandDefinitions'];constructor(_0x3af010,_0x458f7a){super(_0x3af010),this['_commandDefinitions']=_0x458f7a,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x5973b4,_0x94372,_0x52ed74)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x52ed74));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x386c52,_0x574784,_0x35f572)=>{this['enabledCommandsIds']=_0x35f572?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x575d14=this['editor']['model'];this['_hasContext']=function(_0x3584b4){const _0x3bf161=_0x3584b4['document']['selection'];return _0x3bf161['isCollapsed']?0x0!==[..._0x3bf161['getSelectedBlocks']()]['length']&&![..._0x3bf161['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x3584b4['hasContent'](_0x3bf161['getFirstRange']());}(_0x575d14);const _0x2a847e=_0x575d14['document']['selection'],_0x4d9e5d=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x7123a8 of _0x2a847e['getRanges']())for(const _0x49e560 of _0x7123a8['getItems']())if(_0x49e560['is']('element')&&_0x4d9e5d['includes'](_0x49e560['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x3fad7b='',_0x5ba76c='',_0x2c1e7a='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x3fad7b,_0x5ba76c,_0x2c1e7a);}}function G(_0x535dbc,_0x485aa4){const _0x5c3262=new Set();for(const _0x2a148e of _0x535dbc['values']())(_0x485aa4||!0x1===_0x2a148e['requiresContent'])&&_0x5c3262['add'](_0x2a148e['id']);return Array['from'](_0x5c3262);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
- _0x3ada19(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x20eaa,_0x3faf8c,_0x20e88b){super(),this['editor']=_0x20eaa,this['textAdapter']=_0x3faf8c,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x20e88b,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x28966a,_0x214d70,_0x2b8ab4)=>{this['view']['value']=this['_sanitizeHTML'](_0x2b8ab4);}),this['listenTo'](this['view'],'submitPrompt',(_0x457e78,_0x375210)=>{const _0xaa6a84=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x375210,_0xaa6a84,'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:_0x1bdc5c,query:_0x5ab34e,htmlContent:_0x5391d8,label:_0x59502a,mainActionLabel:_0x11cc1a}){this['view']['prompt']=_0x59502a,this['view']['mainAction']=_0x11cc1a,this['initialContext']=_0x5391d8,_0x5ab34e&&(this['view']['isRendered']?this['_handleQuery'](_0x5ab34e,_0x5391d8,_0x1bdc5c,_0x59502a):this['view']['once']('render',()=>{this['_handleQuery'](_0x5ab34e,_0x5391d8,_0x1bdc5c,_0x59502a);}));}['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'](_0x2cb28b,_0x5a5a8b,_0x6dd3ee,_0x65b6a5){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x5a5a8b,this['previousQuery']=_0x2cb28b,this['previousLabel']=_0x65b6a5||_0x2cb28b,this['previousActionId']=_0x6dd3ee,new Promise(_0x356072=>{this['textAdapter']['makeRequest']({'query':_0x2cb28b,'context':_0x5a5a8b,'onData':_0x5c1d59=>{this['currentResponse']=_0x5c1d59,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x6dd3ee})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x19aee1=>{_0x19aee1 instanceof R?this['view']['handleError'](_0x19aee1['message']):this['view']['handleError'](),_0x356072();})['finally'](()=>{this['stopProcessing'](),_0x356072();});});}['_parseAndNormalizeContent'](_0x4505e2,_0x25c787=!0x1){const _0x17784b=Z['exec'](_0x4505e2);_0x4505e2=_0x17784b?_0x4505e2['substring'](_0x17784b[0x1]['length']):_0x4505e2['length']<0x64&&!_0x25c787?'':this['_stripMarkdownSyntax'](_0x4505e2);const _0xe44f28=this['_domParser']['parseFromString'](_0x4505e2,'text/html');if(_0x17784b){const _0x5289dc=Array['from'](_0xe44f28['body']['childNodes']);_0x5289dc['reverse']();for(const _0x4fad01 of _0x5289dc){if(_0x4fad01['nodeType']==Node['ELEMENT_NODE'])break;_0x4fad01['remove']();}}const _0x51a5e8=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0xe44f28['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x51a5e8);const _0x55133b=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x3a008f=this['editor']['data']['toModel'](_0x51a5e8);return _0x55133b||_0x3a008f['markers']['clear'](),this['editor']['data']['stringify'](_0x3a008f);}['_normalizeResponseHeadings'](_0x27abf4){const _0x11ff8f=new _0x4663d4(this['editor']['editing']['view']['document']),_0x4ea1e4=new _0x269e79({'name':/^h[1-5]$/}),_0x2e39a2=[];let _0x4fb989=!0x1;for(const _0x583959 of _0x27abf4)_0x583959['is']('element')&&_0x4ea1e4['match'](_0x583959)&&(_0x2e39a2['push'](_0x583959),'h1'==_0x583959['name']&&(_0x4fb989=!0x0));if(_0x4fb989){for(const _0xc5b9f6 of _0x2e39a2)_0x11ff8f['rename']('h'+(parseInt(_0xc5b9f6['name'][0x1])+0x1),_0xc5b9f6);}}['_isH1TagSupportEnabled'](){const {data:_0x3ed2f7,editing:_0x3c1f04}=this['editor'],_0x3e2949=_0x3ed2f7['htmlProcessor']['toView']('<h1></h1>'),_0x552860=_0x3ed2f7['toView'](_0x3ed2f7['toModel'](_0x3e2949));return!!_0x3c1f04['view']['domConverter']['viewToDom'](_0x552860)['querySelector']('h1');}['_sanitizeHTML'](_0x30205){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x30205),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x196b8f){const _0xd62ce2=_0x196b8f['trim']();return _0xd62ce2['startsWith']('```html')?_0xd62ce2['endsWith']('```')?_0xd62ce2['substring'](0x7,_0xd62ce2['length']-0x3):_0xd62ce2['substring'](0x7):_0x196b8f;}}const M={'REPLACE':'replace','INSERT':'insert'};class at extends nt{constructor(_0x299255){super(_0x299255),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x330448=>i(_0x299255,'AI_'+_0x330448['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x299255,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x299255,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x299255,'Stop'));const _0x11ec97=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x11ec97['if']('isVisible','ck-hidden',_0x4ac69d=>!_0x4ac69d)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x2928cf,_0x1a4494){const _0x2de2cc=new _0x154d0f(this['locale']);return _0x2de2cc['set']({'label':_0x2928cf,'class':_0x1a4494||'','isVisible':!0x0,'withText':!0x0}),_0x2de2cc;}}var W='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class X extends _0x3639d2{['contentFieldView'];['copyButtonView'];constructor(_0x2950e2,_0x482fe0=''){super(_0x2950e2),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x5b09f7=this['bindTemplate'];this['contentFieldView']=new mt(_0x2950e2,_0x482fe0),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x5b09f7['if']('isVisible','ck-hidden',_0x4b17a9=>!_0x4b17a9)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x5b09f7['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 _0x32e2e4=!0x1;this['on']('change:value',(_0xca197,_0x54667c,_0x5534b4)=>{const _0x87fad=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x5534b4),this['isProcessing']&&_0x87fad&&!_0x32e2e4&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x2663f6,_0x5bb2d6,_0x10e536)=>{_0x32e2e4=!0x1,_0x10e536?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x32e2e4=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x32e2e4=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x20007c=this['locale'],_0x3e8ea9=new _0x154d0f(this['locale']),_0x2d8762='ck-ai-form__copy-button';return _0x3e8ea9['set']({'label':i(_0x20007c,'Copy'),'icon':W,'class':_0x2d8762,'tooltip':!0x0}),_0x3e8ea9['bind']('isVisible')['to'](this,'value',_0x41baff=>!!_0x41baff),_0x3e8ea9['bind']('isEnabled')['to'](this,'isProcessing',_0x15edb0=>!_0x15edb0),_0x3e8ea9['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x3e8ea9['icon']=_0x16de2e['check'],_0x3e8ea9['class']=_0x2d8762+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x3e8ea9['icon']=W,_0x3e8ea9['class']=_0x2d8762;},0x3e8);}),_0x3e8ea9;}['_copyHTMLToClipboard'](_0x215dec){const {window:_0x556539,document:_0x3c6c44}=_0x29ccc9;if(_0x556539['ClipboardItem']){const {Blob:_0x32ceeb,ClipboardItem:_0xccbbf0}=_0x556539,_0x479639=[new _0xccbbf0({'text/html':new _0x32ceeb([_0x215dec['innerHTML']],{'type':'text/html'}),'text/plain':new _0x32ceeb([_0x215dec['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x479639);}else{const _0x342f14=_0x3c6c44['createElement']('div');_0x342f14['style']['position']='absolute',_0x342f14['style']['left']='-9999px',_0x342f14['innerHTML']='<span>[</span>'+_0x215dec['innerHTML']+'<span>]</span>',_0x3c6c44['body']['appendChild'](_0x342f14);const _0x57ed5a=_0x3c6c44['createRange']();_0x57ed5a['setStartAfter'](_0x342f14['firstElementChild']),_0x57ed5a['setEndBefore'](_0x342f14['lastElementChild']);const _0x455fe9=_0x556539['getSelection']();_0x455fe9['removeAllRanges'](),_0x455fe9['addRange'](_0x57ed5a),_0x3c6c44['execCommand']('copy'),_0x342f14['remove']();}}}class mt extends _0x3639d2{constructor(_0x52a998,_0x295baa=''){super(_0x52a998),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x295baa,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x420b1a){this['element']['innerHTML']=_0x420b1a;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x24c75a=new _0x3639d2(),_0x56e82f=this['locale'],_0x164f8b=new _0x11c25d();return _0x164f8b['isVisible']=!0x0,_0x24c75a['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x164f8b,{'text':i(_0x56e82f,'AI\x20is\x20writing...')}]}),_0x24c75a['render'](),_0x24c75a;}}class rt extends _0x3639d2{constructor(_0x2c3c80,_0x32ccf4=''){super(_0x2c3c80);const _0xd80be9=new _0x1fc380(),_0x26962d=this['bindTemplate'];this['set']('text',_0x32ccf4),_0xd80be9['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0xd80be9,{'text':_0x26962d['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x3cd170,_0x362f40){super(_0x3cd170,_0x362f40),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',(_0x1740f8,_0x58f600)=>{_0x1740f8['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x58f600());});}['_createSubmitButton'](){const _0x4b941d=new _0x154d0f(this['locale']),_0x5387a2=this['locale'];return _0x4b941d['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x5387a2,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x4b941d['on']('execute',()=>{this['submit']();}),_0x4b941d['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x3d48ac,_0x4e8fb5)=>!_0x3d48ac&&_0x4e8fb5),_0x4b941d;}['_createShowHistoryButton'](){const _0x592fe4=new _0x154d0f(this['locale']),_0x207e85=this['resultsView'],_0x1e3ca5=this['locale'];_0x592fe4['set']({'label':i(_0x1e3ca5,'History'),'withText':!0x1,'icon':_0x16de2e['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x592fe4['bind']('isOn')['to'](_0x207e85,'isVisible'),_0x592fe4['bind']('isEnabled')['to'](this,'isEnabled'),_0x592fe4['on']('execute',()=>{_0x207e85['isVisible']=!_0x207e85['isVisible'],_0x207e85['isVisible']?this['filteredView']['focus']():this['focus']();});const _0xaf61d0=()=>{_0x29ccc9['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x453648=new st(this['queryView']['fieldView']['element']),_0x2d8e04=_0x453648['width'],_0xac20bb='rtl'===_0x1e3ca5['uiLanguageDirection']?'left':'right';_0x453648['excludeScrollbarsAndBorders'](),_0x592fe4['element']['style'][_0xac20bb]=_0x2d8e04-_0x453648['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0xaf61d0),this['on']('render',_0xaf61d0),_0x592fe4;}['submit'](){const _0x6e6538=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x6e6538);}['focus'](_0x423ada){-0x1===_0x423ada?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x38ed33){super(_0x38ed33),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x38ed33,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x4f0662=0x0;for(const _0x101cec of this['items'])_0x4f0662+=_0x101cec['items']['length'];return{'resultsCount':_0x4f0662,'totalItemsCount':_0x4f0662};}['_createClearHistoryButton'](){const _0x9bb94a=this['locale'],_0x555393=new _0x154d0f(this['locale']);return _0x555393['set']({'label':'('+i(_0x9bb94a,'Clear')+')','withText':!0x0}),_0x555393['on']('execute',()=>this['fire']('clearHistory')),_0x555393;}}class hs extends _0x1ff178{constructor(_0xd56f1f){super();const _0x40f8ce=new te(),_0x2225fe=new _0x154d0f(this['locale'],_0x40f8ce);this['children']['add'](_0x2225fe),_0x2225fe['set']({'label':_0xd56f1f['prompt'],'withText':!0x0}),_0x2225fe['on']('execute',()=>{this['fire']('execute',{'value':_0xdd74ee(_0xd56f1f['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x9e5a21{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x2dfa19,_0x1a3c72)=>{const _0x15040d=Ss(_0x1a3c72['prompt']);for(const _0x4ccdab of this)if(_0x4ccdab!=_0x1a3c72&&Ss(_0x4ccdab['prompt'])===_0x15040d){this['remove'](_0x4ccdab);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x3acb92=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x3acb92));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x9a33c9=>_0x9a33c9)));}}function Ss(_0x34d627){return _0x34d627['toLowerCase']()['trim']();}class k extends _0x3639d2{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x30b60c,_0x2f96ff,_0xd2f035=''){super(_0x30b60c),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new os(),this['errorView']=new rt(_0x30b60c),this['contentArea']=new X(_0x30b60c,_0xd2f035),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 _0x5baffc(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0x59c78c({'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 _0xd1fc4a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x2f96ff],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0xd1fc4a['if']('isError','ck-hidden',_0x391880=>!_0x391880)]},'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'](_0x1924f7=0x1){-0x1===_0x1924f7?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 _0xbe7d84=this['locale'],_0x421048=new ht(_0xbe7d84,{'queryView':{'label':i(_0xbe7d84,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x57b8d8,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0xbe7d84,'Empty\x20history'),'secondary':i(_0xbe7d84,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x421048['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1f098f,_0x545dbb)=>_0x1f098f&&!_0x545dbb),this['listenTo'](_0x421048,'submit',(_0x34277c,_0x1b669c)=>{this['prompt']=_0x1b669c;const _0xa1239e=_0xd023e1(_0x1b669c);this['fire']('submitPrompt',_0xa1239e),_0x1b669c['trim']()&&this['_promptHistory']['add']({'prompt':_0xa1239e},0x0);},{'priority':'high'}),_0x421048;}['_createHistoryView'](){const _0x56aacb=new rs(this['locale']);return _0x56aacb['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x56aacb['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x56aacb;}['_createToolbar'](){const _0x215778=new at(this['locale']);return _0x215778['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x170dc6,_0x2d00ac,_0x2e167d)=>_0x170dc6&&!_0x2d00ac&&!!_0x2e167d),_0x215778['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x215778['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x3aef5e,_0xe2ab20,_0x42a866)=>_0x3aef5e&&!_0xe2ab20&&!!_0x42a866),_0x215778['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x215778['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1faf38,_0x238ba5)=>_0x1faf38&&!_0x238ba5),_0x215778['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x215778['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x215778['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x215778;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x5b892d=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x5b892d,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x37b39b){const _0x5d16cb=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x37b39b||i(_0x5d16cb,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var T='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const w=globalThis['DataTransfer'];class n extends _0x2ae3d4{['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[_0x49292c,a,K,_0x2e5a02];}constructor(_0x1d2075){super(_0x1d2075),_0x1d2075['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x1d2075['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x1d2075['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x1d2075['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x3dd6e7}=this;this['_aiAdapter']=_0x3dd6e7['plugins']['get'](K),this['_dialog']=_0x3dd6e7['plugins']['get'](_0x2e5a02),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x1caf93=new E(_0x3dd6e7,Array['from'](this['_commandDefinitions']['values']()));_0x3dd6e7['commands']['add']('showAIAssistant',_0x1caf93),_0x3dd6e7['ui']['componentFactory']['add']('aiCommands',_0x2bdef5=>{const _0x4eb4dc=_0x5e552d(_0x2bdef5);return _0x4eb4dc['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x4eb4dc['buttonView']['set']({'label':i(_0x2bdef5,'AI\x20Commands'),'icon':T,'tooltip':!0x0}),_0x4eb4dc['on']('execute',_0x2a9d8c=>this['_onExecute'](_0x2a9d8c['source']['id'])),_0x4a913e(_0x4eb4dc,_0x3dd6e7['ui']['view']['body'],function(_0x3dd35f){const _0x40746f=o(_0x3dd35f['config']['get']('ai.aiAssistant.commands'),_0x3dd35f['locale']),_0x3c1717=U(_0x3dd35f,_0x40746f)['filter'](_0x3dfd90=>_0x3dfd90['commands']['length']);if(0x1===_0x3c1717['length'])return U(_0x3dd35f,_0x3c1717[0x0]['commands'])['map'](_0x4e551a=>({'id':_0x4e551a['id'],'label':_0x4e551a['label']}));return _0x3c1717['map'](_0x1e2bc5=>{const {groupId:_0x541cb1,groupLabel:_0x23766d,commands:_0x520e96}=_0x1e2bc5,_0x2b86f4=U(_0x3dd35f,_0x520e96)['map'](_0x1aa05e=>({'id':_0x1aa05e['id'],'label':_0x1aa05e['label']}));return{'id':_0x541cb1,'menu':_0x23766d||_0x541cb1,'children':_0x2b86f4};});}(_0x3dd6e7),{'ariaLabel':i(_0x2bdef5,'AI\x20Commands')}),_0x4eb4dc['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x1caf93['on']('change:enabledCommandsIds',_0x2ef131),_0x4eb4dc['menuView']['once']('render',_0x2ef131),_0x4eb4dc;function _0x2ef131(){_0x4eb4dc['isEnabled']=_0x1caf93['enabledCommandsIds']['length']>0x0;for(const _0x1680fd of _0x4eb4dc['menuView']['buttons'])_0x1680fd['isEnabled']=_0x1caf93['enabledCommandsIds']['includes'](_0x1680fd['id']);}}),_0x3dd6e7['ui']['componentFactory']['add']('menuBar:aiCommands',_0x1b5008=>{const _0x5939f1=new _0xcf36aa(_0x1b5008);_0x5939f1['buttonView']['set']({'label':i(_0x1b5008,'AI\x20Commands'),'icon':T}),_0x5939f1['bind']('isEnabled')['to'](_0x1caf93,'enabledCommandsIds',_0x346bac=>_0x346bac['length']>0x0);const _0xd15ec5=o(_0x3dd6e7['config']['get']('ai.aiAssistant.commands'),_0x1b5008);return this['_populateMenuBarMenu'](_0x1caf93,_0x5939f1,_0xd15ec5,_0x6b03dc=>this['_onExecute'](_0x6b03dc)),_0x5939f1;}),_0x3dd6e7['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x232719=this['_createAIAssistantUIButton'](_0x154d0f);return _0x232719['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x232719;}),_0x3dd6e7['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x1d5920=this['_createAIAssistantUIButton'](_0x4b5384);return _0x1d5920['set']({'role':'menuitemcheckbox'}),_0x1d5920;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4d5b33=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x12cb61;for(const _0x40d850 in _0x4d5b33){const _0x2a9a41=_0x40d850,_0x4db3e7=_0x4d5b33[_0x2a9a41];if('aiLicenseKeyValid'==_0x4db3e7||'aiLicenseKeyInvalid'==_0x4db3e7||'aiLicenseKeyExpired'==_0x4db3e7||'aiLicenseKeyDomainLimit'==_0x4db3e7||'aiLicenseKeyNotAllowed'==_0x4db3e7||'aiLicenseKeyEvaluationLimit'==_0x4db3e7||'aiLicenseKeyTrialLimit'==_0x4db3e7||'aiLicenseKeyUsageLimit'==_0x4db3e7){delete _0x4d5b33[_0x2a9a41],_0x12cb61=_0x4db3e7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x12cb61&&_0x4d5b33['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x12cb61&&_0x4d5b33['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x12cb61&&_0x4d5b33['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x12cb61&&_0x4d5b33['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x12cb61&&_0x4d5b33['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x12cb61&&_0x4d5b33['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x12cb61&&_0x4d5b33['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x252611='',_0x5c9190='',_0x1bfdfd='custom'){const _0x4cf5d9=this['editor'],_0x2c39c0=_0x4cf5d9['editing']['view'],_0x290a52=_0x4cf5d9['plugins']['get'](a),_0x4931d9=_0x4cf5d9['plugins']['get'](_0x49292c);_0x290a52['showFakeVisualSelection']();const _0x10fae0=new w(),_0x3670e2=new ClipboardEvent('copy',{'clipboardData':_0x10fae0}),_0x2eb3e3=new _0x2d2ff(_0x10fae0),_0x3acaa6=new _0x4389f0(_0x2c39c0,_0x3670e2,{'dataTransfer':_0x2eb3e3});_0x4931d9['_forceMarkersCopy']('comment',()=>{_0x2c39c0['document']['fire']('copy',_0x3acaa6);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x4cf5d9,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x2b1445=_0x2eb3e3['getData']('text/html');const _0x48bc9a=_0x4cf5d9['model']['document']['selection'],_0x32ce41=Array['from'](_0x48bc9a['getRanges']());0x1===_0x32ce41['length']&&_0x32ce41[0x0]['isFlat']&&!_0x48bc9a['getSelectedElement']()&&''!==_0x2b1445['replace'](/&nbsp;/g,'')['trim']()&&(_0x2b1445='<p>'+_0x2b1445+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x1bfdfd,'query':_0x252611,'htmlContent':_0x2b1445,'label':_0x5c9190,'mainActionLabel':M[_0x4cf5d9['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':ct['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x16e1df['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x290a52['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x38d72a=new Map(),_0x496dc3=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x89df8f of _0x496dc3)for(const _0x2c70b0 of _0x89df8f['commands'])_0x38d72a['set'](_0x2c70b0['id'],{..._0x2c70b0,'groupId':_0x89df8f['groupId'],'groupLabel':_0x89df8f['groupLabel']||_0x89df8f['groupId']});return _0x38d72a;}['_createAIAssistantUIButton'](_0x119842){const _0x16b534=this['editor'],_0x425020=_0x16b534['commands']['get']('showAIAssistant'),_0x3f7a66=new _0x119842(_0x16b534['locale']);return _0x3f7a66['set']({'label':i(_0x16b534['locale'],'AI\x20Assistant'),'icon':ct['robotPencil'],'isToggleable':!0x0}),_0x3f7a66['bind']('isEnabled')['to'](_0x425020),_0x3f7a66['bind']('isOn')['to'](this['_dialog'],'id',_0xe58d21=>'aiAssistant'===_0xe58d21),this['listenTo'](_0x3f7a66,'execute',()=>{_0x3f7a66['isOn']?this['hideUI']():_0x425020['execute']();}),_0x3f7a66;}['_initView'](){const _0x212ced=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',()=>{_0x212ced['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x212ced['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x181c3d,ui:{ariaLiveAnnouncer:_0x556a9e}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x53444a,_0xdda510,_0x32a8ad)=>{const _0x9022c4=this['_aiAssistantController']['currentContext'];_0x32a8ad?_0x556a9e['announce'](i(_0x181c3d,'AI\x20is\x20writing')):_0x9022c4&&_0x556a9e['announce'](i(_0x181c3d,'Generated\x20content:\x20%0',_0x9022c4),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x47ef28,_0x219549,_0x30441f)=>{if(_0x30441f){const _0x502cde=this['_formView']['errorView']['text'];_0x556a9e['announce'](i(_0x181c3d,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x502cde));}});}['_onExecute'](_0x58a44f){const _0x11d529=this['_commandDefinitions']['get'](_0x58a44f),_0x25f0c2=this['editor'],_0x266e1d=_0x25f0c2['model']['document']['selection'],_0x456e5d=_0x25f0c2['commands']['get']('showAIAssistant'),_0x5c7d11=_0x25f0c2['plugins']['get'](a),_0x3fd0b9=''+(_0x11d529['groupId']!==x?_0x11d529['groupLabel']+':\x20':'')+_0x11d529['label'];if(!0x1!==_0x11d529['requiresContent']&&_0x266e1d['isCollapsed']){const _0x557a9a=_0xdfd583(_0x266e1d['getSelectedBlocks']())||_0x25f0c2['model']['schema']['getLimitElement'](_0x266e1d);_0x25f0c2['model']['change'](_0xd374e5=>{_0xd374e5['setSelection'](_0x557a9a,'in');});}_0x5c7d11['showFakeVisualSelection'](),_0x456e5d['execute'](_0x11d529['prompt'],_0x3fd0b9,'command:'+_0x58a44f);}['_populateMenuBarMenu'](_0x4523d6,_0x11941c,_0x1dff66,_0x4a13ea){const _0x44b0a7=this['editor'],_0xcf327e=_0x44b0a7['locale'],_0x1bc778=new _0x2efa0a(_0xcf327e),_0xa14eda=U(_0x44b0a7,_0x1dff66)['filter'](_0x36f480=>_0x36f480['commands']['length']);0x1===_0xa14eda['length']?this['_getMenuBarGroupButtons']({'command':_0x4523d6,'commands':_0xa14eda[0x0]['commands'],'parentMenuView':_0x11941c,'onExecute':_0x4a13ea})['forEach'](_0x146d73=>_0x1bc778['items']['add'](_0x146d73)):_0xa14eda['forEach'](({groupId:_0x3721a5,groupLabel:_0x454089,commands:_0x4a6f31})=>{const _0x2c9c94=new _0xf09cbb(_0xcf327e,_0x11941c),_0x543b7e=new _0xcf36aa(_0xcf327e),_0x4d5203=new _0x2efa0a(_0xcf327e),_0x18e10c=this['_getMenuBarGroupButtons']({'command':_0x4523d6,'commands':_0x4a6f31,'parentMenuView':_0x543b7e,'onExecute':_0x4a13ea});_0x543b7e['buttonView']['set']({'label':_0x454089||_0x3721a5}),_0x543b7e['delegate']('execute')['to'](_0x11941c),_0x4d5203['items']['addMany'](_0x18e10c),_0x543b7e['panelView']['children']['add'](_0x4d5203),_0x2c9c94['children']['add'](_0x543b7e),_0x1bc778['items']['add'](_0x2c9c94);}),_0x11941c['panelView']['children']['add'](_0x1bc778);}['_getMenuBarGroupButtons']({command:_0x427dc4,commands:_0x4f93cb,parentMenuView:_0x1af0d0,onExecute:_0x46153d}){const _0xcdfebf=this['editor'],_0x4ba54a=_0xcdfebf['locale'];return U(_0xcdfebf,_0x4f93cb)['map'](_0x5e197b=>{const _0xae39d6=new _0xf09cbb(_0x4ba54a,_0x1af0d0),_0x5fd28=new _0x4b5384(_0x4ba54a);return _0x5fd28['set']({'label':_0x5e197b['label']}),_0x5fd28['delegate']('execute')['to'](_0x1af0d0),_0x5fd28['on']('execute',()=>_0x46153d(_0x5e197b['id'])),_0x5fd28['bind']('isEnabled')['to'](_0x427dc4,'enabledCommandsIds',_0x468e5e=>_0x468e5e['includes'](_0x5e197b['id'])),_0xae39d6['children']['add'](_0x5fd28),_0xae39d6;});}}function B(_0x2be309,_0x1473d5){return void 0x0!==_0x2be309['order']&&void 0x0===_0x1473d5['order']?0x1:void 0x0===_0x2be309['order']&&void 0x0!==_0x1473d5['order']?-0x1:void 0x0!==_0x2be309['order']&&void 0x0!==_0x1473d5['order']?_0x2be309['order']-_0x1473d5['order']:0x0;}function U(_0x2b76df,_0x39c083){_0x39c083['sort'](B);const _0x48796e={},_0x3115c2=[];for(const _0x2d0f4c of _0x39c083)if(void 0x0!==_0x2d0f4c['order']){if(_0x2d0f4c['order']in _0x48796e)throw new _0x944170('ai-commands-config-order-collision',_0x2b76df,{'conflictingDefinitions':[_0x2d0f4c,_0x48796e[_0x2d0f4c['order']]]});_0x48796e[_0x2d0f4c['order']]=_0x2d0f4c,_0x3115c2['splice'](_0x2d0f4c['order'],0x0,_0x2d0f4c);}else _0x3115c2['push'](_0x2d0f4c);return _0x3115c2;}class r extends _0x2ae3d4{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e6bee){super(_0x1e6bee);const _0x260efd=_0x1e6bee['config'],_0x2a780c=_0x1e6bee['locale'];_0x260efd['define']('ai.aiAssistant.preserveComments',!0x0),_0x260efd['define']('ai.aiAssistant.commands',function(_0x532596){return[{'groupId':'editOrReview','groupLabel':i(_0x532596,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x532596,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x532596,'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(_0x532596,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x532596,'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(_0x532596,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x532596,'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(_0x532596,'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(_0x532596,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x532596,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x532596,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x532596,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x532596,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x532596,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x532596,'Change\x20style'),'commands':[{'id':'business','label':i(_0x532596,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x532596,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x532596,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x532596,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x532596,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x532596,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x532596,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x532596,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x532596,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x532596,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x532596,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x532596,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x532596,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x2a780c)),_0x260efd['define']('ai.aiAssistant.extraCommandGroups',[]),_0x260efd['define']('ai.aiAssistant.removeCommands',[]);let _0x4baa4f=o(_0x260efd['get']('ai.aiAssistant.commands'),_0x2a780c);const _0x18d4ea=_0x260efd['get']('ai.aiAssistant.extraCommandGroups'),_0x2e368a=_0x260efd['get']('ai.aiAssistant.removeCommands');_0x18d4ea['forEach'](_0x29e291=>{const _0x572a71=_0x4baa4f['find'](_0x15b0c7=>_0x15b0c7['groupId']===_0x29e291['groupId']);_0x572a71?_0x572a71['commands']=_0x572a71['commands']['concat'](_0x29e291['commands']):_0x4baa4f['push'](_0x29e291);}),_0x4baa4f=_0x4baa4f['filter'](_0x59da5e=>!_0x2e368a['includes'](_0x59da5e['groupId'])),_0x4baa4f['forEach'](_0x2ebfa5=>{_0x2ebfa5['commands']=_0x2ebfa5['commands']['filter'](_0x49588d=>!_0x2e368a['includes'](_0x49588d['id']));}),_0x260efd['set']('ai.aiAssistant.commands',_0x4baa4f);}}class P extends _0x2ae3d4{['abortController'];static get['requires'](){return[K];}constructor(_0x1ce8f6){super(_0x1ce8f6),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](K)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x1abf4a){return this['sendRequest'](_0x1abf4a)['catch'](_0x1c515a=>{if(_0x1c515a instanceof R)return Promise['reject'](_0x1c515a);if('AbortError'==_0x1c515a['name'])return Promise['resolve']();throw console['error'](_0x1c515a),new _0x944170('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1f7ab2,_0x4a5779){const _0x101cb7=this['editor']['locale'],_0x1a2751={'Content-Type':'application/json'};if('object'==typeof _0x1f7ab2)Object['assign'](_0x1a2751,_0x1f7ab2);else{if(_0x1f7ab2)try{const _0x5beb34=await _0x1f7ab2(_0x4a5779);Object['assign'](_0x1a2751,_0x5beb34);}catch(_0x472c42){return Promise['reject'](new R(i(_0x101cb7,'AI_ERROR_GET_HEADERS')));}}return _0x1a2751;}async['_prepareRequestParameters'](_0x1fb504,_0x4328d0){const _0x375ab6=this['editor']['locale'];if('object'==typeof _0x1fb504)return _0x1fb504;try{return await _0x1fb504(_0x4328d0);}catch(_0x5d9e8f){return Promise['reject'](new R(i(_0x375ab6,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x5090bb){super(_0x5090bb),_0x5090bb['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x5090bb['config']['get']('ai.openAI.requestParameters')||_0x5090bb['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x5090bb['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x5090bb['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x5090bb['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x18e639,context:_0x3fcfed,onData:_0x51770f,actionId:_0xa8512d}){const _0x1cdcfb=this['editor']['locale'],_0x27ecb1=await this['prepareMessages'](_0x18e639,_0x3fcfed,_0xa8512d),_0xa00d53=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0xa8512d),_0x224305=await this['_prepareRequestParameters'](this['_requestParameters'],_0xa8512d),_0x3a6435={'messages':_0x27ecb1,..._0x224305},_0x4d6b7b={'method':'POST','headers':_0xa00d53,'body':JSON['stringify'](_0x3a6435),'signal':this['abortController']['signal']},_0x175017=await fetch(this['_apiUrl'],_0x4d6b7b);if(_0x175017['ok'])return _0x224305['stream']?await this['_readStreamableResponse'](_0x175017,_0x51770f):await this['_readStaticResponse'](_0x175017,_0x51770f),Promise['resolve']();{const _0x392c74=await _0x175017['text']();return _0x392c74['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x1cdcfb,'AI_ERROR_CONTEXT_LENGTH'))):_0x392c74['includes']('Moderation')?Promise['reject'](new R(i(_0x1cdcfb,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x392c74));}}async['prepareMessages'](_0x50247a,_0x551ced,_0x26cade){let _0x4ec79f,_0x4ed2f8;return _0x551ced?(_0x4ec79f='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.',_0x4ed2f8='Instruction:\x0a'+_0x50247a+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x551ced):(_0x4ec79f='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.',_0x4ed2f8=_0x50247a),[{'role':'system','content':_0x4ec79f},{'role':'user','content':_0x4ed2f8}];}async['_readStreamableResponse'](_0x418052,_0x254039){const _0x530bff=_0x418052['body']['getReader'](),_0x54abdb=new TextDecoder();let _0x2fbe9b='',_0xb61507='',_0x3a64bb='',_0x445835=!0x1;for(;!_0x445835;){const {done:_0x53d0e9,value:_0x4a52ce}=await _0x530bff['read'](),_0x1eac41=_0x2fbe9b+_0x54abdb['decode'](_0x4a52ce);let _0x431089='';_0x445835=_0x53d0e9;try{_0x431089=this['_cleanUpData'](_0x1eac41),_0x2fbe9b='';}catch(_0x57c23a){_0x2fbe9b=_0x1eac41;continue;}_0xb61507+=_0x431089,!_0x445835&&this['_isBufferIncomplete'](_0xb61507)||_0xb61507&&(_0x3a64bb+=_0xb61507,_0xb61507='',_0x254039(_0x3a64bb));}return Promise['resolve']();}async['_readStaticResponse'](_0x36d560,_0x1ab6f1){return _0x1ab6f1((await _0x36d560['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x54ae21){const _0x785162=_0x54ae21['split']('<')['length']!==_0x54ae21['split']('>')['length'],_0x11f7ef=_0x54ae21['length']<0x1e;return _0x785162&&_0x11f7ef;}['_cleanUpData'](_0x2f47fd){return _0x2f47fd['split'](/\n(?![^{]*\})/g)['map'](_0x3d72eb=>_0x3d72eb['replace']('data:\x20',''))['filter'](_0x5ace96=>_0x5ace96&&_0x5ace96['length']>0x0&&'[DONE]'!==_0x5ace96)['map'](_0x2de526=>{const {choices:_0x19affd}=JSON['parse'](_0x2de526);if(_0x19affd[0x0]&&_0x19affd[0x0]['delta']&&_0x19affd[0x0]['delta']['content'])return _0x19affd[0x0]['delta']['content'];})['filter'](_0x1d1f13=>_0x1d1f13)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x239ce1){super(_0x239ce1),_0x239ce1['config']['get']('ai.aws.requestParameters')||_0x239ce1['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']=_0x239ce1['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x239ce1['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x239ce1['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x239ce1['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x423f0e,context:_0x57496a,onData:_0x38175c,actionId:_0x9390ec}){const {model:_0x152afc,stream:_0x24dff8,..._0x5eb13c}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x9390ec),_0x59474d={'prompt':await this['preparePrompt'](_0x423f0e,_0x57496a,_0x152afc,_0x9390ec),..._0x5eb13c};this['_apiUrl']?await this['_processProxyRequest'](_0x59474d,_0x152afc,_0x24dff8,_0x38175c,_0x9390ec):await this['_processAWSRequest'](_0x59474d,_0x152afc,_0x24dff8,_0x38175c);}async['preparePrompt'](_0x51f208,_0x4189e3,_0x43af20,_0x5f236d){let _0x1a7f6c,_0x2b7dea;return _0x4189e3?(_0x1a7f6c='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.',_0x2b7dea='Instruction:\x0a'+_0x51f208+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x4189e3):(_0x1a7f6c='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.',_0x2b7dea=_0x51f208),'meta.llama'==this['getModelFamily'](_0x43af20)?'<<SYS>>\x0a'+_0x1a7f6c+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x2b7dea+'\x0a[/INST]':'Human:\x0a'+_0x1a7f6c+'\x0a'+_0x2b7dea+'\x0a\x0aAssistant:';}['getModelFamily'](_0x49a995){if(/^anthropic\.claude/['test'](_0x49a995))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x49a995))return'ai21.j2';if(/^cohere\.command/['test'](_0x49a995))return'cohere.command';if(/^meta\.llama/['test'](_0x49a995))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x49a995));}async['_processProxyRequest'](_0x4e5493,_0x20ee21,_0x529f16,_0xffc99e,_0x4e7065){const _0x51effb={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x4e7065),'body':JSON['stringify']({..._0x4e5493,'model':_0x20ee21,'stream':_0x529f16}),'signal':this['abortController']['signal']},_0x38496d=await fetch(this['_apiUrl'],_0x51effb);_0x529f16?await this['_readStreamableResponse'](_0x38496d,_0x20ee21,_0xffc99e):await this['_readStaticResponse'](_0x38496d,_0x20ee21,_0xffc99e);}async['_processAWSRequest'](_0x3e3a7d,_0x3766b7,_0x412a3a,_0x2ed014){const _0x15a634=new _0x212e23(this['_bedrockClientConfig']),_0x2a9feb={'body':JSON['stringify'](_0x3e3a7d),'contentType':'application/json','accept':'application/json','modelId':_0x3766b7};let _0x291409;if(_0x412a3a){const _0x2596b3=new _0x10b51c(_0x2a9feb);_0x291409=await _0x15a634['send'](_0x2596b3,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x291409,_0x3766b7,_0x2ed014);}else{const _0x48f146=new _0x5dac05(_0x2a9feb);_0x291409=await _0x15a634['send'](_0x48f146,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x291409,_0x3766b7,_0x2ed014);}}async['_readAsyncIterableResponse'](_0xbcb921,_0x18a1d7,_0x2197dd){const _0x3c1948=_0xbcb921['body'],_0xb7b8c6=new TextDecoder('utf-8');let _0x287486='';for await(const _0x491838 of _0x3c1948)if(_0x491838['chunk']){const _0x36c883=_0xb7b8c6['decode'](_0x491838['chunk']['bytes']),_0x463b02=JSON['parse'](_0x36c883);_0x287486+=this['_getGeneratedText'](_0x463b02,_0x18a1d7),_0x2197dd(_0x287486);}return Promise['resolve']();}async['_readStreamableResponse'](_0x16f459,_0x59c9cf,_0x192c39){const _0x5d17cb=_0x16f459['body'],_0x3c0803=new TextDecoder('utf-8'),_0x20bcc6=_0x5d17cb['getReader']();let _0x571c55='',_0x1e938d='',_0x3d4444=!0x1;for(;!_0x3d4444;){const {done:_0x3f3548,value:_0x3c138e}=await _0x20bcc6['read']();if(_0x3d4444=_0x3f3548,_0x3d4444)break;const _0x18c2bb=(_0x571c55+_0x3c0803['decode'](_0x3c138e))['split']('\x0a')['map'](_0x198770=>{try{return _0x571c55='',JSON['parse'](_0x198770);}catch(_0xe1c1bd){return _0x571c55=_0x198770,null;}})['filter'](_0x5d677c=>null!==_0x5d677c);_0x18c2bb['length']&&(_0x1e938d+=_0x18c2bb['map'](_0x1c73a7=>this['_getGeneratedText'](_0x1c73a7,_0x59c9cf))['join'](''),_0x192c39(_0x1e938d));}return Promise['resolve']();}async['_readStaticResponse'](_0x28792c,_0x5745ca,_0x4c80da){let _0x2eb62e;return _0x2eb62e=_0x28792c instanceof Response?await _0x28792c['json']():JSON['parse'](Buffer['from'](_0x28792c['body'])['toString']('utf8')),(_0x4c80da(this['_getGeneratedText'](_0x2eb62e,_0x5745ca)),Promise['resolve']());}['_getGeneratedText'](_0x5e7db7,_0x58abff){switch(this['getModelFamily'](_0x58abff)){case'anthropic.claude':return _0x5e7db7['completion'];case'ai21.j2':return _0x5e7db7['completions'][0x0]['data']['text'];case'cohere.command':return _0x5e7db7['generations'][0x0]['text'];case'meta.llama':return _0x5e7db7['generation'];}}}export{K as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
23
+ import{Plugin as _0x3e4802,Command as _0x1cb3a3,icons as _0x2849a5}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x703bc4,CKEditorError as _0x42e059,ObservableMixin as _0x64c604,global as _0x12335e,isVisible as it,Rect as st,Collection as _0x32ecc6,FocusTracker as _0x3c81c3,KeystrokeHandler as ts,first as _0xb9e0fe}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as nt,ButtonView as _0x373ae0,View as _0x5a82d7,SpinnerView as _0x4f9d73,IconView as _0x36b559,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x4dee73,ButtonLabelView as te,FocusCycler as _0x21ee9c,createLabeledTextarea as _0x23cca1,Dialog as _0x5b7299,createDropdown as _0x38d76b,addMenuToDropdown as _0x58b685,MenuBarMenuView as _0x31cd35,MenuBarMenuListItemButtonView as _0x2845fd,DialogViewPosition as _0x3b1261,MenuBarMenuListView as _0x10ce47,MenuBarMenuListItemView as _0x168830}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as ct}from'ckeditor5-collaboration/dist/index.js';import{ClipboardPipeline as _0x1b6d4e,ClipboardMarkersUtils as _0x47a66e}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x1c05d7,DataTransfer as _0x4449b9,UpcastWriter as _0x3f8251,Matcher as _0x321281}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x3af785,escape as _0x1d39a5}from'lodash-es';import{BedrockRuntimeClient as _0xa90f4a,InvokeModelWithResponseStreamCommand as _0x3365da,InvokeModelCommand as _0x3dfb61}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x533a6f,_0x5a2743){const _0x121c0f=(0x0,_0x5a2743['t'])('Other');return _0x533a6f['length']?'groupId'in _0x533a6f[0x0]?_0x533a6f:[{'groupId':x,'groupLabel':_0x121c0f,'order':0x1/0x0,'commands':_0x533a6f}]:[{'groupId':x,'groupLabel':_0x121c0f,'order':0x1/0x0,'commands':[]}];}const dt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x3e4802{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x6a2655}=this,_0x1d838e=['ck-fake-ai-selection'];_0x6a2655['config']['get']('ai.useTheme')&&_0x1d838e['push']('ck-ai-assistant-ui_theme'),_0x6a2655['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x1d838e,'priority':0xc}}),_0x6a2655['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x324529,{writer:_0x5a3db6})=>{if(!_0x324529['markerRange']['isCollapsed'])return null;const _0x5e75ed=_0x5a3db6['createUIElement']('span');return _0x5a3db6['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x5e75ed),_0x5e75ed;}});}['afterInit'](){!async function(_0x55fc66){const _0x3b7798=_0x5c0f98([0x67,0x48,0x6d,0x39,0x6b,0x7a,0x37,0x50,0x6a,0x33,0x45,0x51,0x70,0x63,0x66,0x4f,0x71,0x55,0x5a,0x68,0x65,0x77,0x6c,0x79,0x72,0x57,0x43,0x4b,0x56,0x58,0x53,0x4d,0x4e,0x75,0x30,0x74,0x59,0x44,0x52,0x64,0x31,0x46,0x41,0x61,0x62,0x47,0x38,0x36,0x49,0x54,0x69,0x6f,0x73,0x32,0x78,0x35,0x4c,0x4a,0x34,0x42,0x6e,0x76]),_0x18bf16=0x502dc8d7,_0x10b9ec=0x502a966f^_0x18bf16,_0x487dc3=window[_0x5c0f98([0x44,0x61,0x74,0x65])][_0x5c0f98([0x6e,0x6f,0x77])](),_0x3341b1=_0x55fc66[_0x5c0f98([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3913a6=new window[(_0x5c0f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3eeec7=>{_0x3341b1[_0x5c0f98([0x6f,0x6e,0x63,0x65])](_0x5c0f98([0x72,0x65,0x61,0x64,0x79]),_0x3eeec7);}),_0x32f240={[_0x5c0f98([0x6b,0x74,0x79])]:_0x5c0f98([0x45,0x43]),[_0x5c0f98([0x75,0x73,0x65])]:_0x5c0f98([0x73,0x69,0x67]),[_0x5c0f98([0x63,0x72,0x76])]:_0x5c0f98([0x50,0x2d,0x32,0x35,0x36]),[_0x5c0f98([0x78])]:_0x5c0f98([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]),[_0x5c0f98([0x79])]:_0x5c0f98([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]),[_0x5c0f98([0x61,0x6c,0x67])]:_0x5c0f98([0x45,0x53,0x32,0x35,0x36])},_0xff57e4=_0x3341b1[_0x5c0f98([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5c0f98([0x67,0x65,0x74])](_0x5c0f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x48da56(){let _0x4ab1bb,_0x1f698b=null,_0x40cc11=null;try{if(_0xff57e4==_0x5c0f98([0x47,0x50,0x4c]))return _0x5c0f98([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4ab1bb=_0x2c3110(),!_0x4ab1bb)return _0x5c0f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4ab1bb[_0x5c0f98([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x40cc11=_0x44ff8d(_0x4ab1bb[_0x5c0f98([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4ab1bb[_0x5c0f98([0x6a,0x74,0x69])])),await _0x1a454a()?_0x4d1670()?_0x5bf87f()?_0x5c0f98([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x35f2be()?(_0x4ab1bb[_0x5c0f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5c0f98([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1f698b=_0x28ad20(_0x5c0f98([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4ab1bb[_0x5c0f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5c0f98([0x74,0x72,0x69,0x61,0x6c])&&(_0x1f698b=_0x28ad20(_0x5c0f98([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3a568d()):_0x5c0f98([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5c0f98([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5c0f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3198bd){return _0x5c0f98([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5bf87f(){const _0x200908=[_0x5c0f98([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5c0f98([0x74,0x72,0x69,0x61,0x6c])][_0x5c0f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ab1bb[_0x5c0f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x487dc3/0x3e8:0xe10*_0x10b9ec;return _0x4ab1bb[_0x5c0f98([0x65,0x78,0x70])]<_0x200908;}function _0x4d1670(){const _0x1a7d51=_0x4ab1bb[_0x5c0f98([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1a7d51&&(!!_0x1a7d51[_0x5c0f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c0f98([0x2a]))||!!_0x1a7d51[_0x5c0f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c0f98([0x41,0x49])));}function _0x35f2be(){const _0x3d8caa=_0x4ab1bb[_0x5c0f98([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3d8caa||0x0==_0x3d8caa[_0x5c0f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4a8251}=new URL(window[_0x5c0f98([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3d8caa[_0x5c0f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a8251))return!0x0;const _0xb0f0a0=_0x4a8251[_0x5c0f98([0x73,0x70,0x6c,0x69,0x74])](_0x5c0f98([0x2e]));return _0x3d8caa[_0x5c0f98([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4cd847=>_0x4cd847[_0x5c0f98([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c0f98([0x2a])))[_0x5c0f98([0x6d,0x61,0x70])](_0x111c68=>_0x111c68[_0x5c0f98([0x73,0x70,0x6c,0x69,0x74])](_0x5c0f98([0x2e])))[_0x5c0f98([0x73,0x6f,0x6d,0x65])](_0x4cdfb4=>_0xb0f0a0[_0x5c0f98([0x65,0x76,0x65,0x72,0x79])]((_0x4e7ee0,_0x486b6e)=>_0x4cdfb4[_0x486b6e]===_0x4e7ee0||_0x4cdfb4[_0x486b6e]===_0x5c0f98([0x2a])));}function _0x3a568d(){return _0x1f698b&&_0x40cc11?new window[(_0x5c0f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23545a,_0x3aca6e)=>{_0x1f698b[_0x5c0f98([0x74,0x68,0x65,0x6e])](_0x23545a,_0x3aca6e),_0x40cc11[_0x5c0f98([0x74,0x68,0x65,0x6e])](_0x3c8632=>{_0x3c8632!=_0x5c0f98([0x56,0x61,0x6c,0x69,0x64])&&_0x23545a(_0x3c8632);},_0x3aca6e);}):_0x1f698b||_0x40cc11||_0x5c0f98([0x56,0x61,0x6c,0x69,0x64]);}}function _0x44ff8d(_0x34197d,_0xcb2b64){return new window[(_0x5c0f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3dfb67=>{if(_0xa56bcb())return _0x3dfb67(_0x5c0f98([0x56,0x61,0x6c,0x69,0x64]));_0x36be5d(),_0x3341b1[_0x5c0f98([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5c0f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x22c7b7=!0x1;const _0x11011a=_0x703bc4();function _0xb341e7(_0x422e0b){return!!_0x422e0b&&(typeof _0x422e0b===_0x5c0f98([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x422e0b===_0x5c0f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x422e0b[_0x5c0f98([0x74,0x68,0x65,0x6e])]===_0x5c0f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x422e0b[_0x5c0f98([0x63,0x61,0x74,0x63,0x68])]===_0x5c0f98([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1c69d2(_0x5a3dc3){_0x4ea844(_0x5a3dc3)[_0x5c0f98([0x74,0x68,0x65,0x6e])](_0xfe8ee9=>{if(!_0xfe8ee9||_0xfe8ee9[_0x5c0f98([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5c0f98([0x6f,0x6b]))return _0x5c0f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x39904f(_0x4b2f9b(_0x11011a+_0xcb2b64))!=_0xfe8ee9[_0x5c0f98([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5c0f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5c0f98([0x56,0x61,0x6c,0x69,0x64]);})[_0x5c0f98([0x74,0x68,0x65,0x6e])](_0x2ec105=>(_0x478e55(),_0x2ec105),()=>{const _0x1a29b9=_0x33aa6b();return null==_0x1a29b9?(_0x478e55(),_0x5c0f98([0x56,0x61,0x6c,0x69,0x64])):_0x5c0f98(_0x487dc3-_0x1a29b9>(0x74214cd7^_0x18bf16)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5c0f98([0x74,0x68,0x65,0x6e])](_0x3dfb67)[_0x5c0f98([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3dfb67(_0x5c0f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5de0e1=0x501b2657^_0x18bf16;function _0x478e55(){const _0x387b71=_0x5c0f98([0x6c,0x6c,0x63,0x74,0x2d])+_0x39904f(_0x4b2f9b(_0x34197d)),_0x51e8a5=_0x307b4c(_0x39904f(window[_0x5c0f98([0x4d,0x61,0x74,0x68])][_0x5c0f98([0x63,0x65,0x69,0x6c])](_0x487dc3/_0x5de0e1)));window[_0x5c0f98([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5c0f98([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x387b71,_0x51e8a5);}function _0x33aa6b(){const _0x212bed=_0x5c0f98([0x6c,0x6c,0x63,0x74,0x2d])+_0x39904f(_0x4b2f9b(_0x34197d)),_0x22b9e2=window[_0x5c0f98([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5c0f98([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x212bed);return _0x22b9e2?window[_0x5c0f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x307b4c(_0x22b9e2),0x10)*_0x5de0e1:null;}function _0x4ea844(_0x524092){return new window[(_0x5c0f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f3507,_0x1080c8)=>{_0x524092[_0x5c0f98([0x74,0x68,0x65,0x6e])](_0x4f3507,_0x1080c8),window[_0x5c0f98([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1080c8,0x502c1c17^_0x18bf16);});}}_0x3341b1[_0x5c0f98([0x6f,0x6e])](_0x5c0f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x149582,_0x3a45d1)=>{if(_0x3a45d1[0x0]!=_0x34197d)return _0x3dfb67(_0x5c0f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3a45d1[0x1]={..._0x3a45d1[0x1],[_0x5c0f98([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x11011a};},{[_0x5c0f98([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5c0f98([0x68,0x69,0x67,0x68])}),_0x3341b1[_0x5c0f98([0x6f,0x6e])](_0x5c0f98([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x46d95b=>{_0xb341e7(_0x46d95b[_0x5c0f98([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x22c7b7=!0x0,_0x1c69d2(_0x46d95b[_0x5c0f98([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5c0f98([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5c0f98([0x6c,0x6f,0x77])}),_0x3913a6[_0x5c0f98([0x74,0x68,0x65,0x6e])](()=>{_0x22c7b7||_0x3dfb67(_0x5c0f98([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xa56bcb(){return _0x3341b1[_0x5c0f98([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5c0f98([0x76,0x69,0x65,0x77])][_0x5c0f98([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5c0f98([0x61,0x75,0x74,0x6f]);}function _0x36be5d(){_0x3341b1[_0x5c0f98([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5c0f98([0x76,0x69,0x65,0x77])][_0x5c0f98([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5c0f98([0x61,0x75,0x74,0x6f]);}}function _0x28ad20(_0x2095d6){const _0x4b4d46=[new window[(_0x5c0f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4cea21=>setTimeout(_0x4cea21,0x5024f61b^_0x18bf16)),_0x3913a6[_0x5c0f98([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5c0f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42154e=>{let _0x4c1dca=0x0;_0x3341b1[_0x5c0f98([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c0f98([0x6f,0x6e])](_0x5c0f98([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x11939a,_0x50a1b4)=>{_0x50a1b4[0x0][_0x5c0f98([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4c1dca++,_0x4c1dca==(0x502dc92f^_0x18bf16)&&(_0x42154e(),_0x11939a[_0x5c0f98([0x6f,0x66,0x66])]());});}))];return window[_0x5c0f98([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5c0f98([0x72,0x61,0x63,0x65])](_0x4b4d46)[_0x5c0f98([0x74,0x68,0x65,0x6e])](()=>_0x2095d6);}async function _0x2cd853(){await _0x3913a6,_0x3341b1[_0x5c0f98([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c0f98([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2cbd81,_0x3341b1[_0x5c0f98([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c0f98([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2cbd81,_0x3341b1[_0x5c0f98([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5c0f98([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x320ea1(_0x2179f4){const _0x23bb40=_0x3ad716();_0x3341b1[_0x23bb40]=_0x5c0f98([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2179f4,_0x2179f4!=_0x5c0f98([0x56,0x61,0x6c,0x69,0x64])&&_0x2cd853();}function _0x3ad716(){const _0x2309ef=window[_0x5c0f98([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5c0f98([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5c0f98([0x6e,0x6f,0x77])]())[_0x5c0f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5c0f98([0x2e]),'');let _0x45a49d=_0x5c0f98([0x67]);for(let _0x355442=0x0;_0x355442<_0x2309ef[_0x5c0f98([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x355442+=0x2){let _0x379077=window[_0x5c0f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2309ef[_0x5c0f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x355442,_0x355442+0x2));_0x379077>=_0x3b7798[_0x5c0f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x379077-=_0x3b7798[_0x5c0f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x45a49d+=_0x3b7798[_0x379077];}return _0x45a49d;}function _0x2c3110(){const _0x22cf13=_0xff57e4[_0x5c0f98([0x73,0x70,0x6c,0x69,0x74])](_0x5c0f98([0x2e]));if(0x3!=_0x22cf13[_0x5c0f98([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3e9bcc(_0x22cf13[0x1]);function _0x3e9bcc(_0x4fbf21){const _0x471edc=_0x45f94d(_0x4fbf21);return _0x471edc&&_0x54d2da()?_0x471edc:null;function _0x54d2da(){const _0x2f851d=_0x471edc[_0x5c0f98([0x6a,0x74,0x69])],_0x58fc4b=window[_0x5c0f98([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f851d[_0x5c0f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2f851d[_0x5c0f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x42cb08={..._0x471edc,[_0x5c0f98([0x6a,0x74,0x69])]:_0x2f851d[_0x5c0f98([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2f851d[_0x5c0f98([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x42cb08[_0x5c0f98([0x76,0x63])],_0x4b2f9b(_0x42cb08)==_0x58fc4b;}}}async function _0x1a454a(){let _0x751680=!0x0;try{const _0x57e0f9=_0xff57e4[_0x5c0f98([0x73,0x70,0x6c,0x69,0x74])](_0x5c0f98([0x2e])),[_0x470e94,_0x1ccb34,_0x43088e]=_0x57e0f9;return _0x4975f5(_0x470e94),await _0x10389d(_0x470e94,_0x1ccb34,_0x43088e),_0x751680;}catch(_0xbbb585){return!0x1;}function _0x4975f5(_0x428480){const _0xd96916=_0x45f94d(_0x428480);_0xd96916&&_0xd96916[_0x5c0f98([0x61,0x6c,0x67])]==_0x5c0f98([0x45,0x53,0x32,0x35,0x36])||(_0x751680=!0x1);}async function _0x10389d(_0x44e62a,_0x295c39,_0x38b1cb){const _0xca1ad1=window[_0x5c0f98([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5c0f98([0x66,0x72,0x6f,0x6d])](_0x17abe9(_0x38b1cb),_0x43ff7e=>_0x43ff7e[_0x5c0f98([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x9de3fe=new window[(_0x5c0f98([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5c0f98([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x44e62a+_0x5c0f98([0x2e])+_0x295c39),_0x50738e=window[_0x5c0f98([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5c0f98([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x50738e)return;const _0x58214d=await _0x50738e[_0x5c0f98([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5c0f98([0x6a,0x77,0x6b]),_0x32f240,{[_0x5c0f98([0x6e,0x61,0x6d,0x65])]:_0x5c0f98([0x45,0x43,0x44,0x53,0x41]),[_0x5c0f98([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5c0f98([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5c0f98([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x50738e[_0x5c0f98([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5c0f98([0x6e,0x61,0x6d,0x65])]:_0x5c0f98([0x45,0x43,0x44,0x53,0x41]),[_0x5c0f98([0x68,0x61,0x73,0x68])]:{[_0x5c0f98([0x6e,0x61,0x6d,0x65])]:_0x5c0f98([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x58214d,_0xca1ad1,_0x9de3fe)||(_0x751680=!0x1);}}function _0x45f94d(_0xb35583){return _0xb35583[_0x5c0f98([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5c0f98([0x65,0x79]))?JSON[_0x5c0f98([0x70,0x61,0x72,0x73,0x65])](_0x17abe9(_0xb35583)):null;}function _0x17abe9(_0x13be88){return window[_0x5c0f98([0x61,0x74,0x6f,0x62])](_0x13be88[_0x5c0f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5c0f98([0x2b]))[_0x5c0f98([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5c0f98([0x2f])));}function _0x4b2f9b(_0x4a9fc8){let _0x5123bc=0x1505;function _0x4c7a28(_0x453c25){for(let _0x5e1ea7=0x0;_0x5e1ea7<_0x453c25[_0x5c0f98([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5e1ea7++){const _0x21e670=_0x453c25[_0x5c0f98([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5e1ea7);_0x5123bc=(_0x5123bc<<0x5)+_0x5123bc+_0x21e670,_0x5123bc&=_0x5123bc;}}function _0x53197b(_0x76a020){Array[_0x5c0f98([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x76a020)?_0x76a020[_0x5c0f98([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x53197b):_0x76a020&&typeof _0x76a020==_0x5c0f98([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5c0f98([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x76a020)[_0x5c0f98([0x73,0x6f,0x72,0x74])]()[_0x5c0f98([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x38069e,_0x182a7a])=>{_0x4c7a28(_0x38069e),_0x53197b(_0x182a7a);}):_0x4c7a28(window[_0x5c0f98([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x76a020));}return _0x53197b(_0x4a9fc8),_0x5123bc>>>0x0;}function _0x39904f(_0x203958){return _0x203958[_0x5c0f98([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5c0f98([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5c0f98([0x30]));}function _0x307b4c(_0x24fcda){return _0x24fcda[_0x5c0f98([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5c0f98([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5c0f98([0x6a,0x6f,0x69,0x6e])]('');}function _0x2cbd81(){}function _0x5c0f98(_0x532e90){return _0x532e90['map'](_0x364f07=>String['fromCharCode'](_0x364f07))['join']('');}_0x320ea1(await _0x48da56());}(this);}['showFakeVisualSelection'](){const _0x5e3cb1=this['editor']['model'];_0x5e3cb1['change'](_0x2ee6a9=>{const _0x2196e2=_0x5e3cb1['document']['selection']['getRanges']();let _0x1bc0bb=0x0;for(const _0x216776 of _0x2196e2){const _0x3a98c8=f+':'+_0x1bc0bb;if(_0x5e3cb1['markers']['has'](_0x3a98c8))_0x2ee6a9['updateMarker'](_0x3a98c8,{'range':_0x216776});else{if(_0x216776['start']['isAtEnd']){const _0x9aa67e=_0x216776['start']['getLastMatchingPosition'](({item:_0x3cd994})=>!_0x5e3cb1['schema']['isContent'](_0x3cd994),{'boundaries':_0x216776});_0x2ee6a9['addMarker'](_0x3a98c8,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x2ee6a9['createRange'](_0x9aa67e,_0x216776['end'])});}else _0x2ee6a9['addMarker'](_0x3a98c8,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x216776});}_0x1bc0bb++;}});}['hideFakeVisualSelection'](){const _0x3ef71e=this['editor']['model'],_0x5a9cfa=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x5a9cfa['length']&&_0x3ef71e['change'](_0x3d0207=>{_0x5a9cfa['forEach'](_0x2e1bae=>{_0x3d0207['removeMarker'](_0x2e1bae);});});}['insertContent'](_0x4e849e,_0x2f5e43){const _0xec609e=this['_getAISelection'](),_0x5f43f9=_0x2f5e43||_0xec609e['getFirstRange']();this['editor']['model']['canEditAt'](_0x5f43f9)&&this['editor']['model']['change'](_0x3b9af8=>{this['hideFakeVisualSelection'](),_0x2f5e43||this['_resetContentOfSelectedTableCells'](_0x3b9af8,_0xec609e),this['_pasteHTMLUsingClipboard']({'insertAt':_0x5f43f9,'writer':_0x3b9af8,'html':_0x4e849e});});}['insertContentBelow'](_0x42ef84){const {model:_0xc9a54d}=this['editor'],_0x4a9e6d=this['_getAISelection']();_0xc9a54d['change'](()=>{const _0x54afae=this['_prepareTableInsertBelowPosition'](_0x42ef84,_0x4a9e6d)||this['_getDefaultInsertBelowPosition'](_0x4a9e6d);this['insertContent'](_0x42ef84,_0x54afae);});}['_getAISelection'](){const _0x237e7c=this['editor']['model'],_0x220e7c=Array['from'](_0x237e7c['markers']['getMarkersGroup'](f))['map'](_0x267770=>_0x267770['getRange']());return _0x237e7c['createSelection'](_0x220e7c);}['_pasteHTMLUsingClipboard']({writer:_0x39c82a,html:_0x54e76e,insertAt:_0x34683c}){const {view:_0x14c4ce}=this['editor']['editing'],_0x2ed956=this['editor']['plugins']['get'](_0x1b6d4e),_0x2496c9=new dt();_0x2496c9['setData']('text/html',_0x54e76e);const _0x1d9aaa=new ClipboardEvent('paste',{'clipboardData':_0x2496c9}),_0xa9cb4b=new _0x1c05d7(_0x14c4ce,_0x1d9aaa,{'dataTransfer':new _0x4449b9(_0x2496c9)});_0x39c82a['setSelection'](_0x34683c);const _0x2b2963=(_0x73d7a,_0x2372e4)=>{_0x2372e4['resultRange']&&_0x39c82a['setSelection'](_0x2372e4['resultRange']);};_0x2ed956['once']('contentInsertion',_0x2b2963,{'priority':'lowest'}),_0x14c4ce['document']['fire']('paste',_0xa9cb4b),_0x2ed956['off']('contentInsertion',_0x2b2963);}['_getDefaultInsertBelowPosition'](_0x48a03f){const {model:_0x2c720c}=this['editor'],_0x42eb3d=Array['from'](_0x48a03f['getSelectedBlocks']());return _0x42eb3d['length']?_0x2c720c['createPositionAfter'](_0x42eb3d['pop']()):_0x48a03f['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x201253,_0x43804c){const {model:_0x1e92f3,plugins:_0x1acf1d}=this['editor'];if(_0x1acf1d['has']('TableUtils')){const _0x31fa73=_0x1acf1d['get']('TableUtils')['getSelectedTableCells'](_0x43804c);if(_0x31fa73['length']){const _0x5bb054=this['_getTableRowCountFromContent'](_0x201253),_0x988d70=this['_createEmptyTableRows'](_0x31fa73,_0x5bb054);return _0x1e92f3['createPositionAt'](_0x988d70,0x0);}}return null;}['_getTableRowCountFromContent'](_0x78025c){const _0x383a4a=this['editor']['plugins']['get']('TableUtils'),_0x46239f=this['editor']['data']['parse'](_0x78025c),_0x16eca2=Array['from'](_0x46239f['getChildren']())['filter'](_0x1b7840=>_0x1b7840['is']('element','table'));let _0x2e6e9f=0x0;return _0x16eca2['forEach'](_0x3145f9=>{_0x2e6e9f+=_0x383a4a['getRows'](_0x3145f9);}),_0x2e6e9f;}['_createEmptyTableRows'](_0x5f288e,_0x31cabb){const _0x4b5c35=this['editor']['plugins']['get']('TableUtils'),_0x2778e7=_0x4b5c35['getRowIndexes'](_0x5f288e),_0x31983a=_0x4b5c35['getColumnIndexes'](_0x5f288e),_0x3bbe68=_0x2778e7['last']+0x1,_0x5bf5fc=_0x31983a['first'],_0x36bd88=_0x5f288e[0x0]['findAncestor']('table');for(let _0x2315ea=0x0;_0x2315ea<_0x31cabb;_0x2315ea++)_0x4b5c35['insertRows'](_0x36bd88,{'at':_0x3bbe68});return _0x36bd88['getChild'](_0x3bbe68)['getChild'](_0x5bf5fc);}['_resetContentOfSelectedTableCells'](_0x3dc34a,_0x36fc96){const {plugins:_0x4cb9af}=this['editor'],{model:_0x439893}=_0x3dc34a;if(!_0x4cb9af['has']('TableUtils'))return;_0x4cb9af['get']('TableUtils')['getSelectedTableCells'](_0x36fc96)['length']&&_0x439893['deleteContent'](_0x36fc96);}}class K extends _0x3e4802{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x42e059('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x39cbe8){super(_0x39cbe8),this['name']='AIRequestError';}}function i(_0x5e832e,_0x4abd57,_0x15e116){const t=_0x5e832e['t'];switch(_0x4abd57){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',_0x15e116);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x15e116);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'},_0x15e116);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 _0x4abd57;}}class E extends _0x1cb3a3{['_commandDefinitions'];constructor(_0x50cea0,_0x314143){super(_0x50cea0),this['_commandDefinitions']=_0x314143,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x326f5a,_0x20519a,_0x2480a4)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x2480a4));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x357ca7,_0x11162f,_0x5eab0f)=>{this['enabledCommandsIds']=_0x5eab0f?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x1883e7=this['editor']['model'];this['_hasContext']=function(_0x19db6a){const _0x1a5f9f=_0x19db6a['document']['selection'];return _0x1a5f9f['isCollapsed']?0x0!==[..._0x1a5f9f['getSelectedBlocks']()]['length']&&![..._0x1a5f9f['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x19db6a['hasContent'](_0x1a5f9f['getFirstRange']());}(_0x1883e7);const _0x22577f=_0x1883e7['document']['selection'],_0x1f3f5d=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x28077e of _0x22577f['getRanges']())for(const _0x2f278d of _0x28077e['getItems']())if(_0x2f278d['is']('element')&&_0x1f3f5d['includes'](_0x2f278d['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x2daa7c='',_0x47c7c0='',_0x2e8a31='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x2daa7c,_0x47c7c0,_0x2e8a31);}}function G(_0x405ea8,_0x488184){const _0x854a6f=new Set();for(const _0x202b64 of _0x405ea8['values']())(_0x488184||!0x1===_0x202b64['requiresContent'])&&_0x854a6f['add'](_0x202b64['id']);return Array['from'](_0x854a6f);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0x64c604(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0xe767e7,_0x4fffb7,_0x43d345){super(),this['editor']=_0xe767e7,this['textAdapter']=_0x4fffb7,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x43d345,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x523b71,_0x4c7207,_0x351da5)=>{this['view']['value']=this['_sanitizeHTML'](_0x351da5);}),this['listenTo'](this['view'],'submitPrompt',(_0x43a7f4,_0x315c25)=>{const _0x4ee439=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x315c25,_0x4ee439,'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:_0x23ee8f,query:_0x3e65c8,htmlContent:_0x3a249b,label:_0xc77fa8,mainActionLabel:_0x32f1bb}){this['view']['prompt']=_0xc77fa8,this['view']['mainAction']=_0x32f1bb,this['initialContext']=_0x3a249b,_0x3e65c8&&(this['view']['isRendered']?this['_handleQuery'](_0x3e65c8,_0x3a249b,_0x23ee8f,_0xc77fa8):this['view']['once']('render',()=>{this['_handleQuery'](_0x3e65c8,_0x3a249b,_0x23ee8f,_0xc77fa8);}));}['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'](_0x1202a8,_0x1b6de2,_0x390627,_0x1f4aef){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x1b6de2,this['previousQuery']=_0x1202a8,this['previousLabel']=_0x1f4aef||_0x1202a8,this['previousActionId']=_0x390627,new Promise(_0x122a97=>{this['textAdapter']['makeRequest']({'query':_0x1202a8,'context':_0x1b6de2,'onData':_0x145164=>{this['currentResponse']=_0x145164,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x390627})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x36da95=>{_0x36da95 instanceof R?this['view']['handleError'](_0x36da95['message']):this['view']['handleError'](),_0x122a97();})['finally'](()=>{this['stopProcessing'](),_0x122a97();});});}['_parseAndNormalizeContent'](_0x5b3d86,_0x48102c=!0x1){const _0x5d1080=Z['exec'](_0x5b3d86);_0x5b3d86=_0x5d1080?_0x5b3d86['substring'](_0x5d1080[0x1]['length']):_0x5b3d86['length']<0x64&&!_0x48102c?'':this['_stripMarkdownSyntax'](_0x5b3d86);const _0x14c71b=this['_domParser']['parseFromString'](_0x5b3d86,'text/html');if(_0x5d1080){const _0x5ae287=Array['from'](_0x14c71b['body']['childNodes']);_0x5ae287['reverse']();for(const _0x6af464 of _0x5ae287){if(_0x6af464['nodeType']==Node['ELEMENT_NODE'])break;_0x6af464['remove']();}}const _0x4ef829=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x14c71b['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x4ef829);const _0x3a3803=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x15c314=this['editor']['data']['toModel'](_0x4ef829);return _0x3a3803||_0x15c314['markers']['clear'](),this['editor']['data']['stringify'](_0x15c314);}['_normalizeResponseHeadings'](_0x4f77c2){const _0x2a89f0=new _0x3f8251(this['editor']['editing']['view']['document']),_0x2cd089=new _0x321281({'name':/^h[1-5]$/}),_0x45767d=[];let _0x47b7e7=!0x1;for(const _0x4a98e7 of _0x4f77c2)_0x4a98e7['is']('element')&&_0x2cd089['match'](_0x4a98e7)&&(_0x45767d['push'](_0x4a98e7),'h1'==_0x4a98e7['name']&&(_0x47b7e7=!0x0));if(_0x47b7e7){for(const _0x5b5ca9 of _0x45767d)_0x2a89f0['rename']('h'+(parseInt(_0x5b5ca9['name'][0x1])+0x1),_0x5b5ca9);}}['_isH1TagSupportEnabled'](){const {data:_0xa4131d,editing:_0x5783a5}=this['editor'],_0x5294b3=_0xa4131d['htmlProcessor']['toView']('<h1></h1>'),_0x25b12a=_0xa4131d['toView'](_0xa4131d['toModel'](_0x5294b3));return!!_0x5783a5['view']['domConverter']['viewToDom'](_0x25b12a)['querySelector']('h1');}['_sanitizeHTML'](_0x304ec7){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x304ec7),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x1644f2){const _0x2e1b2c=_0x1644f2['trim']();return _0x2e1b2c['startsWith']('```html')?_0x2e1b2c['endsWith']('```')?_0x2e1b2c['substring'](0x7,_0x2e1b2c['length']-0x3):_0x2e1b2c['substring'](0x7):_0x1644f2;}}const M={'REPLACE':'replace','INSERT':'insert'};class at extends nt{constructor(_0x4885ae){super(_0x4885ae),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x415b92=>i(_0x4885ae,'AI_'+_0x415b92['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x4885ae,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x4885ae,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x4885ae,'Stop'));const _0x39688b=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x39688b['if']('isVisible','ck-hidden',_0x456156=>!_0x456156)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x114c6c,_0x1362a4){const _0x5582c2=new _0x373ae0(this['locale']);return _0x5582c2['set']({'label':_0x114c6c,'class':_0x1362a4||'','isVisible':!0x0,'withText':!0x0}),_0x5582c2;}}var W='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class X extends _0x5a82d7{['contentFieldView'];['copyButtonView'];constructor(_0x1e428f,_0x58dc9a=''){super(_0x1e428f),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x40a2ab=this['bindTemplate'];this['contentFieldView']=new mt(_0x1e428f,_0x58dc9a),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x40a2ab['if']('isVisible','ck-hidden',_0x5cd7b2=>!_0x5cd7b2)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x40a2ab['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 _0xec1440=!0x1;this['on']('change:value',(_0x618778,_0x59e6af,_0x56296f)=>{const _0x2ba714=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x56296f),this['isProcessing']&&_0x2ba714&&!_0xec1440&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x20af15,_0x1d736e,_0x28cb58)=>{_0xec1440=!0x1,_0x28cb58?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0xec1440=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0xec1440=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x2941=this['locale'],_0x2b6111=new _0x373ae0(this['locale']),_0x492817='ck-ai-form__copy-button';return _0x2b6111['set']({'label':i(_0x2941,'Copy'),'icon':W,'class':_0x492817,'tooltip':!0x0}),_0x2b6111['bind']('isVisible')['to'](this,'value',_0x3cff92=>!!_0x3cff92),_0x2b6111['bind']('isEnabled')['to'](this,'isProcessing',_0x289d4b=>!_0x289d4b),_0x2b6111['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x2b6111['icon']=_0x2849a5['check'],_0x2b6111['class']=_0x492817+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x2b6111['icon']=W,_0x2b6111['class']=_0x492817;},0x3e8);}),_0x2b6111;}['_copyHTMLToClipboard'](_0x3eebd7){const {window:_0x46442b,document:_0x151595}=_0x12335e;if(_0x46442b['ClipboardItem']){const {Blob:_0x59370f,ClipboardItem:_0x33b518}=_0x46442b,_0x553a61=[new _0x33b518({'text/html':new _0x59370f([_0x3eebd7['innerHTML']],{'type':'text/html'}),'text/plain':new _0x59370f([_0x3eebd7['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x553a61);}else{const _0xb61ccd=_0x151595['createElement']('div');_0xb61ccd['style']['position']='absolute',_0xb61ccd['style']['left']='-9999px',_0xb61ccd['innerHTML']='<span>[</span>'+_0x3eebd7['innerHTML']+'<span>]</span>',_0x151595['body']['appendChild'](_0xb61ccd);const _0x43d9ae=_0x151595['createRange']();_0x43d9ae['setStartAfter'](_0xb61ccd['firstElementChild']),_0x43d9ae['setEndBefore'](_0xb61ccd['lastElementChild']);const _0x598152=_0x46442b['getSelection']();_0x598152['removeAllRanges'](),_0x598152['addRange'](_0x43d9ae),_0x151595['execCommand']('copy'),_0xb61ccd['remove']();}}}class mt extends _0x5a82d7{constructor(_0x4c0abe,_0x1ad84c=''){super(_0x4c0abe),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x1ad84c,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x1240e7){this['element']['innerHTML']=_0x1240e7;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x4aef0c=new _0x5a82d7(),_0x2a7aed=this['locale'],_0x136e39=new _0x4f9d73();return _0x136e39['isVisible']=!0x0,_0x4aef0c['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x136e39,{'text':i(_0x2a7aed,'AI\x20is\x20writing...')}]}),_0x4aef0c['render'](),_0x4aef0c;}}class rt extends _0x5a82d7{constructor(_0x2339e5,_0x5f5953=''){super(_0x2339e5);const _0x7a260a=new _0x36b559(),_0x22b730=this['bindTemplate'];this['set']('text',_0x5f5953),_0x7a260a['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x7a260a,{'text':_0x22b730['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x4c0c93,_0x4619cd){super(_0x4c0c93,_0x4619cd),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',(_0x492abe,_0x33d310)=>{_0x492abe['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x33d310());});}['_createSubmitButton'](){const _0x421345=new _0x373ae0(this['locale']),_0x4d42ad=this['locale'];return _0x421345['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x4d42ad,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x421345['on']('execute',()=>{this['submit']();}),_0x421345['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x4b9c6e,_0x19feaf)=>!_0x4b9c6e&&_0x19feaf),_0x421345;}['_createShowHistoryButton'](){const _0x13c49e=new _0x373ae0(this['locale']),_0x300efa=this['resultsView'],_0x1dc6e8=this['locale'];_0x13c49e['set']({'label':i(_0x1dc6e8,'History'),'withText':!0x1,'icon':_0x2849a5['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x13c49e['bind']('isOn')['to'](_0x300efa,'isVisible'),_0x13c49e['bind']('isEnabled')['to'](this,'isEnabled'),_0x13c49e['on']('execute',()=>{_0x300efa['isVisible']=!_0x300efa['isVisible'],_0x300efa['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x5bf4ea=()=>{_0x12335e['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x56b331=new st(this['queryView']['fieldView']['element']),_0x11aec9=_0x56b331['width'],_0x29b30f='rtl'===_0x1dc6e8['uiLanguageDirection']?'left':'right';_0x56b331['excludeScrollbarsAndBorders'](),_0x13c49e['element']['style'][_0x29b30f]=_0x11aec9-_0x56b331['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x5bf4ea),this['on']('render',_0x5bf4ea),_0x13c49e;}['submit'](){const _0x55c430=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x55c430);}['focus'](_0x101570){-0x1===_0x101570?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x14f6cb){super(_0x14f6cb),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x14f6cb,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x4ea19d=0x0;for(const _0x507c91 of this['items'])_0x4ea19d+=_0x507c91['items']['length'];return{'resultsCount':_0x4ea19d,'totalItemsCount':_0x4ea19d};}['_createClearHistoryButton'](){const _0x6fd65e=this['locale'],_0x2d0fc3=new _0x373ae0(this['locale']);return _0x2d0fc3['set']({'label':'('+i(_0x6fd65e,'Clear')+')','withText':!0x0}),_0x2d0fc3['on']('execute',()=>this['fire']('clearHistory')),_0x2d0fc3;}}class hs extends _0x4dee73{constructor(_0x1c4d19){super();const _0x251ec7=new te(),_0x37dddd=new _0x373ae0(this['locale'],_0x251ec7);this['children']['add'](_0x37dddd),_0x37dddd['set']({'label':_0x1c4d19['prompt'],'withText':!0x0}),_0x37dddd['on']('execute',()=>{this['fire']('execute',{'value':_0x3af785(_0x1c4d19['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x32ecc6{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x53f8d0,_0x4c91e0)=>{const _0x223f6f=Ss(_0x4c91e0['prompt']);for(const _0x1b65f3 of this)if(_0x1b65f3!=_0x4c91e0&&Ss(_0x1b65f3['prompt'])===_0x223f6f){this['remove'](_0x1b65f3);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x1bf0f2=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x1bf0f2));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x13009a=>_0x13009a)));}}function Ss(_0x5d36bf){return _0x5d36bf['toLowerCase']()['trim']();}class k extends _0x5a82d7{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x407971,_0x53e1b2,_0x53ce67=''){super(_0x407971),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new os(),this['errorView']=new rt(_0x407971),this['contentArea']=new X(_0x407971,_0x53ce67),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 _0x3c81c3(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0x21ee9c({'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 _0x1962c6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x53e1b2],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x1962c6['if']('isError','ck-hidden',_0x579137=>!_0x579137)]},'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'](_0x7e8a1e=0x1){-0x1===_0x7e8a1e?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 _0x96c911=this['locale'],_0x5e4d12=new ht(_0x96c911,{'queryView':{'label':i(_0x96c911,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x23cca1,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x96c911,'Empty\x20history'),'secondary':i(_0x96c911,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x5e4d12['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x55206e,_0x532c00)=>_0x55206e&&!_0x532c00),this['listenTo'](_0x5e4d12,'submit',(_0x142d76,_0x32f12e)=>{this['prompt']=_0x32f12e;const _0x594ff0=_0x1d39a5(_0x32f12e);this['fire']('submitPrompt',_0x594ff0),_0x32f12e['trim']()&&this['_promptHistory']['add']({'prompt':_0x594ff0},0x0);},{'priority':'high'}),_0x5e4d12;}['_createHistoryView'](){const _0x382899=new rs(this['locale']);return _0x382899['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x382899['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x382899;}['_createToolbar'](){const _0x1b0e2d=new at(this['locale']);return _0x1b0e2d['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2037dc,_0x131f6a,_0x1a451e)=>_0x2037dc&&!_0x131f6a&&!!_0x1a451e),_0x1b0e2d['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x1b0e2d['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x45d514,_0x3df2f9,_0x32f456)=>_0x45d514&&!_0x3df2f9&&!!_0x32f456),_0x1b0e2d['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x1b0e2d['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0xcb335f,_0x17b886)=>_0xcb335f&&!_0x17b886),_0x1b0e2d['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x1b0e2d['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x1b0e2d['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x1b0e2d;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x5222a7=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x5222a7,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x22a5f5){const _0x2446ce=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x22a5f5||i(_0x2446ce,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var T='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const w=globalThis['DataTransfer'];class n extends _0x3e4802{['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[_0x47a66e,a,K,_0x5b7299];}constructor(_0x19bc26){super(_0x19bc26),_0x19bc26['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x19bc26['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x19bc26['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x19bc26['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x19a4c8}=this;this['_aiAdapter']=_0x19a4c8['plugins']['get'](K),this['_dialog']=_0x19a4c8['plugins']['get'](_0x5b7299),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x17dc59=new E(_0x19a4c8,Array['from'](this['_commandDefinitions']['values']()));_0x19a4c8['commands']['add']('showAIAssistant',_0x17dc59),_0x19a4c8['ui']['componentFactory']['add']('aiCommands',_0xcca6e5=>{const _0x2147d7=_0x38d76b(_0xcca6e5);return _0x2147d7['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x2147d7['buttonView']['set']({'label':i(_0xcca6e5,'AI\x20Commands'),'icon':T,'tooltip':!0x0}),_0x2147d7['on']('execute',_0x25271=>this['_onExecute'](_0x25271['source']['id'])),_0x58b685(_0x2147d7,_0x19a4c8['ui']['view']['body'],function(_0x20b2d9){const _0x3b1090=o(_0x20b2d9['config']['get']('ai.aiAssistant.commands'),_0x20b2d9['locale']),_0x1c027a=U(_0x20b2d9,_0x3b1090)['filter'](_0x152b74=>_0x152b74['commands']['length']);if(0x1===_0x1c027a['length'])return U(_0x20b2d9,_0x1c027a[0x0]['commands'])['map'](_0x593591=>({'id':_0x593591['id'],'label':_0x593591['label']}));return _0x1c027a['map'](_0x5c6082=>{const {groupId:_0x3bb9f8,groupLabel:_0x4732b5,commands:_0x3020d1}=_0x5c6082,_0x16d4c4=U(_0x20b2d9,_0x3020d1)['map'](_0x836246=>({'id':_0x836246['id'],'label':_0x836246['label']}));return{'id':_0x3bb9f8,'menu':_0x4732b5||_0x3bb9f8,'children':_0x16d4c4};});}(_0x19a4c8),{'ariaLabel':i(_0xcca6e5,'AI\x20Commands')}),_0x2147d7['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x17dc59['on']('change:enabledCommandsIds',_0x1ede9f),_0x2147d7['menuView']['once']('render',_0x1ede9f),_0x2147d7;function _0x1ede9f(){_0x2147d7['isEnabled']=_0x17dc59['enabledCommandsIds']['length']>0x0;for(const _0x4af7ac of _0x2147d7['menuView']['buttons'])_0x4af7ac['isEnabled']=_0x17dc59['enabledCommandsIds']['includes'](_0x4af7ac['id']);}}),_0x19a4c8['ui']['componentFactory']['add']('menuBar:aiCommands',_0x419215=>{const _0x1ac24b=new _0x31cd35(_0x419215);_0x1ac24b['buttonView']['set']({'label':i(_0x419215,'AI\x20Commands'),'icon':T}),_0x1ac24b['bind']('isEnabled')['to'](_0x17dc59,'enabledCommandsIds',_0xf175d0=>_0xf175d0['length']>0x0);const _0x1db710=o(_0x19a4c8['config']['get']('ai.aiAssistant.commands'),_0x419215);return this['_populateMenuBarMenu'](_0x17dc59,_0x1ac24b,_0x1db710,_0x2eafb9=>this['_onExecute'](_0x2eafb9)),_0x1ac24b;}),_0x19a4c8['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x5d325b=this['_createAIAssistantUIButton'](_0x373ae0);return _0x5d325b['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x5d325b;}),_0x19a4c8['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x40d17f=this['_createAIAssistantUIButton'](_0x2845fd);return _0x40d17f['set']({'role':'menuitemcheckbox'}),_0x40d17f;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5c06f8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x11c540;for(const _0x4a51e8 in _0x5c06f8){const _0x284712=_0x4a51e8,_0x37ea2a=_0x5c06f8[_0x284712];if('aiLicenseKeyValid'==_0x37ea2a||'aiLicenseKeyInvalid'==_0x37ea2a||'aiLicenseKeyExpired'==_0x37ea2a||'aiLicenseKeyDomainLimit'==_0x37ea2a||'aiLicenseKeyNotAllowed'==_0x37ea2a||'aiLicenseKeyEvaluationLimit'==_0x37ea2a||'aiLicenseKeyTrialLimit'==_0x37ea2a||'aiLicenseKeyUsageLimit'==_0x37ea2a){delete _0x5c06f8[_0x284712],_0x11c540=_0x37ea2a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x11c540&&_0x5c06f8['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x11c540&&_0x5c06f8['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x11c540&&_0x5c06f8['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x11c540&&_0x5c06f8['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x11c540&&_0x5c06f8['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x11c540&&_0x5c06f8['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x11c540&&_0x5c06f8['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x21428b='',_0xea20ec='',_0x280350='custom'){const _0x4e0a4a=this['editor'],_0x4be3e9=_0x4e0a4a['editing']['view'],_0x1a5f7b=_0x4e0a4a['plugins']['get'](a),_0x2d648e=_0x4e0a4a['plugins']['get'](_0x47a66e);_0x1a5f7b['showFakeVisualSelection']();const _0x35a154=new w(),_0x1d272a=new ClipboardEvent('copy',{'clipboardData':_0x35a154}),_0x501123=new _0x4449b9(_0x35a154),_0x1b64ed=new _0x1c05d7(_0x4be3e9,_0x1d272a,{'dataTransfer':_0x501123});_0x2d648e['_forceMarkersCopy']('comment',()=>{_0x4be3e9['document']['fire']('copy',_0x1b64ed);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x4e0a4a,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x3c8761=_0x501123['getData']('text/html');const _0x3a4ecf=_0x4e0a4a['model']['document']['selection'],_0x126494=Array['from'](_0x3a4ecf['getRanges']());0x1===_0x126494['length']&&_0x126494[0x0]['isFlat']&&!_0x3a4ecf['getSelectedElement']()&&''!==_0x3c8761['replace'](/&nbsp;/g,'')['trim']()&&(_0x3c8761='<p>'+_0x3c8761+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x280350,'query':_0x21428b,'htmlContent':_0x3c8761,'label':_0xea20ec,'mainActionLabel':M[_0x4e0a4a['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':ct['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x3b1261['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x1a5f7b['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x17ea25=new Map(),_0x242a95=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x550ac0 of _0x242a95)for(const _0x559d27 of _0x550ac0['commands'])_0x17ea25['set'](_0x559d27['id'],{..._0x559d27,'groupId':_0x550ac0['groupId'],'groupLabel':_0x550ac0['groupLabel']||_0x550ac0['groupId']});return _0x17ea25;}['_createAIAssistantUIButton'](_0x447da2){const _0x2e97d3=this['editor'],_0xb73690=_0x2e97d3['commands']['get']('showAIAssistant'),_0x3e8795=new _0x447da2(_0x2e97d3['locale']);return _0x3e8795['set']({'label':i(_0x2e97d3['locale'],'AI\x20Assistant'),'icon':ct['robotPencil'],'isToggleable':!0x0}),_0x3e8795['bind']('isEnabled')['to'](_0xb73690),_0x3e8795['bind']('isOn')['to'](this['_dialog'],'id',_0x3d9fdf=>'aiAssistant'===_0x3d9fdf),this['listenTo'](_0x3e8795,'execute',()=>{_0x3e8795['isOn']?this['hideUI']():_0xb73690['execute']();}),_0x3e8795;}['_initView'](){const _0x59cb43=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',()=>{_0x59cb43['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x59cb43['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x70c5d6,ui:{ariaLiveAnnouncer:_0x2842af}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x125858,_0x445fe3,_0x193d07)=>{const _0x546891=this['_aiAssistantController']['currentContext'];_0x193d07?_0x2842af['announce'](i(_0x70c5d6,'AI\x20is\x20writing')):_0x546891&&_0x2842af['announce'](i(_0x70c5d6,'Generated\x20content:\x20%0',_0x546891),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x4bf037,_0x2018d2,_0x2510a6)=>{if(_0x2510a6){const _0x583e13=this['_formView']['errorView']['text'];_0x2842af['announce'](i(_0x70c5d6,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x583e13));}});}['_onExecute'](_0x17781d){const _0x369e10=this['_commandDefinitions']['get'](_0x17781d),_0x292672=this['editor'],_0x58afd9=_0x292672['model']['document']['selection'],_0x2c11d2=_0x292672['commands']['get']('showAIAssistant'),_0x21f5b5=_0x292672['plugins']['get'](a),_0x2753bc=''+(_0x369e10['groupId']!==x?_0x369e10['groupLabel']+':\x20':'')+_0x369e10['label'];if(!0x1!==_0x369e10['requiresContent']&&_0x58afd9['isCollapsed']){const _0x1271ed=_0xb9e0fe(_0x58afd9['getSelectedBlocks']())||_0x292672['model']['schema']['getLimitElement'](_0x58afd9);_0x292672['model']['change'](_0x22d52c=>{_0x22d52c['setSelection'](_0x1271ed,'in');});}_0x21f5b5['showFakeVisualSelection'](),_0x2c11d2['execute'](_0x369e10['prompt'],_0x2753bc,'command:'+_0x17781d);}['_populateMenuBarMenu'](_0x37905f,_0x1c8647,_0x499b22,_0x3e8f36){const _0x18ce7a=this['editor'],_0x53f25a=_0x18ce7a['locale'],_0x87e62=new _0x10ce47(_0x53f25a),_0x296d57=U(_0x18ce7a,_0x499b22)['filter'](_0x4b06a6=>_0x4b06a6['commands']['length']);0x1===_0x296d57['length']?this['_getMenuBarGroupButtons']({'command':_0x37905f,'commands':_0x296d57[0x0]['commands'],'parentMenuView':_0x1c8647,'onExecute':_0x3e8f36})['forEach'](_0x73db4f=>_0x87e62['items']['add'](_0x73db4f)):_0x296d57['forEach'](({groupId:_0x552184,groupLabel:_0x88f409,commands:_0x5a4aa8})=>{const _0x390a1a=new _0x168830(_0x53f25a,_0x1c8647),_0x3cb2dd=new _0x31cd35(_0x53f25a),_0x235465=new _0x10ce47(_0x53f25a),_0x52ca6a=this['_getMenuBarGroupButtons']({'command':_0x37905f,'commands':_0x5a4aa8,'parentMenuView':_0x3cb2dd,'onExecute':_0x3e8f36});_0x3cb2dd['buttonView']['set']({'label':_0x88f409||_0x552184}),_0x3cb2dd['delegate']('execute')['to'](_0x1c8647),_0x235465['items']['addMany'](_0x52ca6a),_0x3cb2dd['panelView']['children']['add'](_0x235465),_0x390a1a['children']['add'](_0x3cb2dd),_0x87e62['items']['add'](_0x390a1a);}),_0x1c8647['panelView']['children']['add'](_0x87e62);}['_getMenuBarGroupButtons']({command:_0xdb0595,commands:_0x216d18,parentMenuView:_0x342013,onExecute:_0x312dcf}){const _0xcc5c8b=this['editor'],_0x5a623d=_0xcc5c8b['locale'];return U(_0xcc5c8b,_0x216d18)['map'](_0x17710d=>{const _0x34b5f4=new _0x168830(_0x5a623d,_0x342013),_0x4a014b=new _0x2845fd(_0x5a623d);return _0x4a014b['set']({'label':_0x17710d['label']}),_0x4a014b['delegate']('execute')['to'](_0x342013),_0x4a014b['on']('execute',()=>_0x312dcf(_0x17710d['id'])),_0x4a014b['bind']('isEnabled')['to'](_0xdb0595,'enabledCommandsIds',_0x481b19=>_0x481b19['includes'](_0x17710d['id'])),_0x34b5f4['children']['add'](_0x4a014b),_0x34b5f4;});}}function B(_0x27b71c,_0x5ad744){return void 0x0!==_0x27b71c['order']&&void 0x0===_0x5ad744['order']?0x1:void 0x0===_0x27b71c['order']&&void 0x0!==_0x5ad744['order']?-0x1:void 0x0!==_0x27b71c['order']&&void 0x0!==_0x5ad744['order']?_0x27b71c['order']-_0x5ad744['order']:0x0;}function U(_0x51a13f,_0x52b77d){_0x52b77d['sort'](B);const _0x370e2a={},_0x21465a=[];for(const _0x148908 of _0x52b77d)if(void 0x0!==_0x148908['order']){if(_0x148908['order']in _0x370e2a)throw new _0x42e059('ai-commands-config-order-collision',_0x51a13f,{'conflictingDefinitions':[_0x148908,_0x370e2a[_0x148908['order']]]});_0x370e2a[_0x148908['order']]=_0x148908,_0x21465a['splice'](_0x148908['order'],0x0,_0x148908);}else _0x21465a['push'](_0x148908);return _0x21465a;}class r extends _0x3e4802{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53280a){super(_0x53280a);const _0x5ba5de=_0x53280a['config'],_0x54f82b=_0x53280a['locale'];_0x5ba5de['define']('ai.aiAssistant.preserveComments',!0x0),_0x5ba5de['define']('ai.aiAssistant.commands',function(_0x55f6e3){return[{'groupId':'editOrReview','groupLabel':i(_0x55f6e3,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x55f6e3,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x55f6e3,'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(_0x55f6e3,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x55f6e3,'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(_0x55f6e3,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x55f6e3,'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(_0x55f6e3,'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(_0x55f6e3,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x55f6e3,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x55f6e3,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x55f6e3,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x55f6e3,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x55f6e3,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x55f6e3,'Change\x20style'),'commands':[{'id':'business','label':i(_0x55f6e3,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x55f6e3,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x55f6e3,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x55f6e3,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x55f6e3,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x55f6e3,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x55f6e3,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x55f6e3,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x55f6e3,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x55f6e3,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x55f6e3,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x55f6e3,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x55f6e3,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x54f82b)),_0x5ba5de['define']('ai.aiAssistant.extraCommandGroups',[]),_0x5ba5de['define']('ai.aiAssistant.removeCommands',[]);let _0x16cbb7=o(_0x5ba5de['get']('ai.aiAssistant.commands'),_0x54f82b);const _0x81aa5=_0x5ba5de['get']('ai.aiAssistant.extraCommandGroups'),_0x150d19=_0x5ba5de['get']('ai.aiAssistant.removeCommands');_0x81aa5['forEach'](_0x32e6e5=>{const _0x2537d5=_0x16cbb7['find'](_0x5c996a=>_0x5c996a['groupId']===_0x32e6e5['groupId']);_0x2537d5?_0x2537d5['commands']=_0x2537d5['commands']['concat'](_0x32e6e5['commands']):_0x16cbb7['push'](_0x32e6e5);}),_0x16cbb7=_0x16cbb7['filter'](_0x236423=>!_0x150d19['includes'](_0x236423['groupId'])),_0x16cbb7['forEach'](_0x2362b8=>{_0x2362b8['commands']=_0x2362b8['commands']['filter'](_0x3b69c9=>!_0x150d19['includes'](_0x3b69c9['id']));}),_0x5ba5de['set']('ai.aiAssistant.commands',_0x16cbb7);}}class P extends _0x3e4802{['abortController'];static get['requires'](){return[K];}constructor(_0xa5cf21){super(_0xa5cf21),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](K)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x10526a){return this['sendRequest'](_0x10526a)['catch'](_0x16e6d7=>{if(_0x16e6d7 instanceof R)return Promise['reject'](_0x16e6d7);if('AbortError'==_0x16e6d7['name'])return Promise['resolve']();throw console['error'](_0x16e6d7),new _0x42e059('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x3f4209,_0x1c12a5){const _0x25c2a5=this['editor']['locale'],_0x36b2bb={'Content-Type':'application/json'};if('object'==typeof _0x3f4209)Object['assign'](_0x36b2bb,_0x3f4209);else{if(_0x3f4209)try{const _0x47627a=await _0x3f4209(_0x1c12a5);Object['assign'](_0x36b2bb,_0x47627a);}catch(_0x53c6f2){return Promise['reject'](new R(i(_0x25c2a5,'AI_ERROR_GET_HEADERS')));}}return _0x36b2bb;}async['_prepareRequestParameters'](_0x437d82,_0x25f595){const _0x167c3a=this['editor']['locale'];if('object'==typeof _0x437d82)return _0x437d82;try{return await _0x437d82(_0x25f595);}catch(_0x4dea9b){return Promise['reject'](new R(i(_0x167c3a,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x55ccf4){super(_0x55ccf4),_0x55ccf4['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x55ccf4['config']['get']('ai.openAI.requestParameters')||_0x55ccf4['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x55ccf4['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x55ccf4['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x55ccf4['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x2d5228,context:_0x4c93f9,onData:_0x5a9546,actionId:_0x3f1c14}){const _0x19862e=this['editor']['locale'],_0x2f8b98=await this['prepareMessages'](_0x2d5228,_0x4c93f9,_0x3f1c14),_0x1aa14c=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3f1c14),_0x147f86=await this['_prepareRequestParameters'](this['_requestParameters'],_0x3f1c14),_0x2d243f={'messages':_0x2f8b98,..._0x147f86},_0x186bc={'method':'POST','headers':_0x1aa14c,'body':JSON['stringify'](_0x2d243f),'signal':this['abortController']['signal']},_0x2bd2ae=await fetch(this['_apiUrl'],_0x186bc);if(_0x2bd2ae['ok'])return _0x147f86['stream']?await this['_readStreamableResponse'](_0x2bd2ae,_0x5a9546):await this['_readStaticResponse'](_0x2bd2ae,_0x5a9546),Promise['resolve']();{const _0x4700ac=await _0x2bd2ae['text']();return _0x4700ac['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x19862e,'AI_ERROR_CONTEXT_LENGTH'))):_0x4700ac['includes']('Moderation')?Promise['reject'](new R(i(_0x19862e,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x4700ac));}}async['prepareMessages'](_0x544b32,_0x476688,_0x1ffd75){let _0x147dd0,_0x33377a;return _0x476688?(_0x147dd0='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.',_0x33377a='Instruction:\x0a'+_0x544b32+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x476688):(_0x147dd0='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.',_0x33377a=_0x544b32),[{'role':'system','content':_0x147dd0},{'role':'user','content':_0x33377a}];}async['_readStreamableResponse'](_0x12da35,_0x43fa66){const _0x1b5e85=_0x12da35['body']['getReader'](),_0x53005d=new TextDecoder();let _0x3f0661='',_0x5abc9e='',_0xa53df6='',_0x2da87=!0x1;for(;!_0x2da87;){const {done:_0x52f864,value:_0x3468f1}=await _0x1b5e85['read'](),_0x4cb644=_0x3f0661+_0x53005d['decode'](_0x3468f1);let _0x127e22='';_0x2da87=_0x52f864;try{_0x127e22=this['_cleanUpData'](_0x4cb644),_0x3f0661='';}catch(_0x48eceb){_0x3f0661=_0x4cb644;continue;}_0x5abc9e+=_0x127e22,!_0x2da87&&this['_isBufferIncomplete'](_0x5abc9e)||_0x5abc9e&&(_0xa53df6+=_0x5abc9e,_0x5abc9e='',_0x43fa66(_0xa53df6));}return Promise['resolve']();}async['_readStaticResponse'](_0x3e6bf0,_0x7f89c){return _0x7f89c((await _0x3e6bf0['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x406db3){const _0x3ea4ce=_0x406db3['split']('<')['length']!==_0x406db3['split']('>')['length'],_0xf3389e=_0x406db3['length']<0x1e;return _0x3ea4ce&&_0xf3389e;}['_cleanUpData'](_0x46d566){return _0x46d566['split'](/\n(?![^{]*\})/g)['map'](_0x5015ad=>_0x5015ad['replace']('data:\x20',''))['filter'](_0x244c9f=>_0x244c9f&&_0x244c9f['length']>0x0&&'[DONE]'!==_0x244c9f)['map'](_0xdc61a4=>{const {choices:_0x443df7}=JSON['parse'](_0xdc61a4);if(_0x443df7[0x0]&&_0x443df7[0x0]['delta']&&_0x443df7[0x0]['delta']['content'])return _0x443df7[0x0]['delta']['content'];})['filter'](_0xf127e4=>_0xf127e4)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x4fdd97){super(_0x4fdd97),_0x4fdd97['config']['get']('ai.aws.requestParameters')||_0x4fdd97['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']=_0x4fdd97['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x4fdd97['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x4fdd97['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x4fdd97['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x5bb646,context:_0x110950,onData:_0x5cf396,actionId:_0x581bcf}){const {model:_0x3f7fe3,stream:_0x1dcb2a,..._0x563fc6}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x581bcf),_0x1c03d0={'prompt':await this['preparePrompt'](_0x5bb646,_0x110950,_0x3f7fe3,_0x581bcf),..._0x563fc6};this['_apiUrl']?await this['_processProxyRequest'](_0x1c03d0,_0x3f7fe3,_0x1dcb2a,_0x5cf396,_0x581bcf):await this['_processAWSRequest'](_0x1c03d0,_0x3f7fe3,_0x1dcb2a,_0x5cf396);}async['preparePrompt'](_0x49446f,_0x133fbd,_0x52bd49,_0x1fdc04){let _0x1242e0,_0x45dbd1;return _0x133fbd?(_0x1242e0='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.',_0x45dbd1='Instruction:\x0a'+_0x49446f+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x133fbd):(_0x1242e0='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.',_0x45dbd1=_0x49446f),'meta.llama'==this['getModelFamily'](_0x52bd49)?'<<SYS>>\x0a'+_0x1242e0+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x45dbd1+'\x0a[/INST]':'Human:\x0a'+_0x1242e0+'\x0a'+_0x45dbd1+'\x0a\x0aAssistant:';}['getModelFamily'](_0x2e0125){if(/^anthropic\.claude/['test'](_0x2e0125))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x2e0125))return'ai21.j2';if(/^cohere\.command/['test'](_0x2e0125))return'cohere.command';if(/^meta\.llama/['test'](_0x2e0125))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x2e0125));}async['_processProxyRequest'](_0x54da28,_0x3d0611,_0x417c78,_0x261cce,_0x5326ca){const _0x2cb6d2={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x5326ca),'body':JSON['stringify']({..._0x54da28,'model':_0x3d0611,'stream':_0x417c78}),'signal':this['abortController']['signal']},_0x4b91bc=await fetch(this['_apiUrl'],_0x2cb6d2);_0x417c78?await this['_readStreamableResponse'](_0x4b91bc,_0x3d0611,_0x261cce):await this['_readStaticResponse'](_0x4b91bc,_0x3d0611,_0x261cce);}async['_processAWSRequest'](_0x4319f9,_0x93ecfa,_0x3ddb5a,_0x1cb1d7){const _0x3eac84=new _0xa90f4a(this['_bedrockClientConfig']),_0x329e0b={'body':JSON['stringify'](_0x4319f9),'contentType':'application/json','accept':'application/json','modelId':_0x93ecfa};let _0x8b99c2;if(_0x3ddb5a){const _0xe946fc=new _0x3365da(_0x329e0b);_0x8b99c2=await _0x3eac84['send'](_0xe946fc,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x8b99c2,_0x93ecfa,_0x1cb1d7);}else{const _0x29cb8c=new _0x3dfb61(_0x329e0b);_0x8b99c2=await _0x3eac84['send'](_0x29cb8c,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x8b99c2,_0x93ecfa,_0x1cb1d7);}}async['_readAsyncIterableResponse'](_0x36c8d5,_0x4c009b,_0x35a02f){const _0x5d3cab=_0x36c8d5['body'],_0x308a38=new TextDecoder('utf-8');let _0x499664='';for await(const _0x5d3f53 of _0x5d3cab)if(_0x5d3f53['chunk']){const _0x3c805c=_0x308a38['decode'](_0x5d3f53['chunk']['bytes']),_0x16fe1f=JSON['parse'](_0x3c805c);_0x499664+=this['_getGeneratedText'](_0x16fe1f,_0x4c009b),_0x35a02f(_0x499664);}return Promise['resolve']();}async['_readStreamableResponse'](_0xbcf2bc,_0x362daf,_0x3f4422){const _0x57fce=_0xbcf2bc['body'],_0x29c8dd=new TextDecoder('utf-8'),_0x5164bd=_0x57fce['getReader']();let _0x12e365='',_0xc12373='',_0x387137=!0x1;for(;!_0x387137;){const {done:_0x54a71c,value:_0x5ddcc9}=await _0x5164bd['read']();if(_0x387137=_0x54a71c,_0x387137)break;const _0x1d0ed6=(_0x12e365+_0x29c8dd['decode'](_0x5ddcc9))['split']('\x0a')['map'](_0x72820f=>{try{return _0x12e365='',JSON['parse'](_0x72820f);}catch(_0x1d52cc){return _0x12e365=_0x72820f,null;}})['filter'](_0x5368c4=>null!==_0x5368c4);_0x1d0ed6['length']&&(_0xc12373+=_0x1d0ed6['map'](_0x22a61d=>this['_getGeneratedText'](_0x22a61d,_0x362daf))['join'](''),_0x3f4422(_0xc12373));}return Promise['resolve']();}async['_readStaticResponse'](_0x3afee8,_0x40f24e,_0x5f0f13){let _0xb211ec;return _0xb211ec=_0x3afee8 instanceof Response?await _0x3afee8['json']():JSON['parse'](Buffer['from'](_0x3afee8['body'])['toString']('utf8')),(_0x5f0f13(this['_getGeneratedText'](_0xb211ec,_0x40f24e)),Promise['resolve']());}['_getGeneratedText'](_0x2432ee,_0x259c7d){switch(this['getModelFamily'](_0x259c7d)){case'anthropic.claude':return _0x2432ee['completion'];case'ai21.j2':return _0x2432ee['completions'][0x0]['data']['text'];case'cohere.command':return _0x2432ee['generations'][0x0]['text'];case'meta.llama':return _0x2432ee['generation'];}}}export{K as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x108e00=>0x1!=_0x108e00}};
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':_0xad2be2=>0x1!=_0xad2be2}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x33f717=>{const {af:{dictionary:_0x27a70b,getPluralForm:_0xebc8a1}}={'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':_0x214fac=>0x1!=_0x214fac}};_0x33f717['af']||={'dictionary':{},'getPluralForm':null},_0x33f717['af']['dictionary']=Object['assign'](_0x33f717['af']['dictionary'],_0x27a70b),_0x33f717['af']['getPluralForm']=_0xebc8a1;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x44ae34=>{const {af:{dictionary:_0x4301a2,getPluralForm:_0x3a116a}}={'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':_0x54ca85=>0x1!=_0x54ca85}};_0x44ae34['af']||={'dictionary':{},'getPluralForm':null},_0x44ae34['af']['dictionary']=Object['assign'](_0x44ae34['af']['dictionary'],_0x4301a2),_0x44ae34['af']['getPluralForm']=_0x3a116a;})(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':_0x539ca2=>0x0==_0x539ca2?0x0:0x1==_0x539ca2?0x1:0x2==_0x539ca2?0x2:_0x539ca2%0x64>=0x3&&_0x539ca2%0x64<=0xa?0x3:_0x539ca2%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':_0x4ec25a=>0x0==_0x4ec25a?0x0:0x1==_0x4ec25a?0x1:0x2==_0x4ec25a?0x2:_0x4ec25a%0x64>=0x3&&_0x4ec25a%0x64<=0xa?0x3:_0x4ec25a%0x64>=0xb?0x4:0x5}};