@ckeditor/ckeditor5-ai 45.0.0-alpha.1 → 45.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +1 -1
- package/dist/index.js +2 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/index.js +1 -1
- package/src/legacyerrors.js +1 -1
- package/src/ui/aiassistantcontroller.js +2 -2
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
- 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 _0x467d45,Command as _0x479ba8}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x2cc872,IconCheck as _0x34a4d9,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0xadecb0,IconRobotPencil as _0x714a09}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x5ad51b,CKEditorError as _0x59bea8,ObservableMixin as _0x559280,global as _0x72bb09,isVisible as ot,Rect as it,Collection as _0x3b2aac,FocusTracker as mt,KeystrokeHandler as ut,first as _0x48cea6}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x15ad79,View as _0x5bb98c,SpinnerView as _0x217001,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0x1b3490,createDropdown as _0x78e007,addMenuToDropdown as _0x226bc8,MenuBarMenuView as _0x1a84df,MenuBarMenuListItemButtonView as _0xd05241,DialogViewPosition as _0x2b6266,MenuBarMenuListView as _0x21ab1c,MenuBarMenuListItemView as _0x5f0fdc}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x5a65c6,ClipboardMarkersUtils as _0x2d31ac}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x3b357b,DataTransfer as _0x29944c,UpcastWriter as _0x565325,Matcher as _0x4f18de}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x3c2f07,InvokeModelWithResponseStreamCommand as _0x51ab8,InvokeModelCommand as _0x37abfa}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x165a94,_0x2e5f58){const _0x57d657=(0x0,_0x2e5f58['t'])('Other');return _0x165a94['length']?'groupId'in _0x165a94[0x0]?_0x165a94:[{'groupId':x,'groupLabel':_0x57d657,'order':0x1/0x0,'commands':_0x165a94}]:[{'groupId':x,'groupLabel':_0x57d657,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x467d45{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x347752}=this,_0xe4231a=['ck-fake-ai-selection'];_0x347752['config']['get']('ai.useTheme')&&_0xe4231a['push']('ck-ai-assistant-ui_theme'),_0x347752['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0xe4231a,'priority':0xc}}),_0x347752['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x3edcd0,{writer:_0x3d70cc})=>{if(!_0x3edcd0['markerRange']['isCollapsed'])return null;const _0x5d3b43=_0x3d70cc['createUIElement']('span');return _0x3d70cc['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x5d3b43),_0x5d3b43;}});}['afterInit'](){!async function(_0x392e19){const _0x2d7864=_0x522948([0x46,0x30,0x38,0x56,0x77,0x61,0x63,0x6c,0x34,0x73,0x39,0x4c,0x6f,0x65,0x4a,0x47,0x54,0x70,0x6d,0x33,0x6b,0x31,0x69,0x76,0x57,0x52,0x4f,0x68,0x66,0x4b,0x67,0x78,0x37,0x32,0x4d,0x48,0x55,0x64,0x72,0x45,0x50,0x44,0x53,0x5a,0x59,0x62,0x41,0x36,0x79,0x43,0x6e,0x74,0x6a,0x7a,0x42,0x51,0x49,0x35,0x58,0x75,0x71,0x4e]),_0x6b68a0=0x28a79a7,_0xacc11e=0x28d1af7^_0x6b68a0,_0x2deda0=window[_0x522948([0x44,0x61,0x74,0x65])][_0x522948([0x6e,0x6f,0x77])](),_0x1b2ae8=_0x392e19[_0x522948([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4cc86e=new window[(_0x522948([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ae9a9=>{_0x1b2ae8[_0x522948([0x6f,0x6e,0x63,0x65])](_0x522948([0x72,0x65,0x61,0x64,0x79]),_0x5ae9a9);}),_0x40dd01={[_0x522948([0x6b,0x74,0x79])]:_0x522948([0x45,0x43]),[_0x522948([0x75,0x73,0x65])]:_0x522948([0x73,0x69,0x67]),[_0x522948([0x63,0x72,0x76])]:_0x522948([0x50,0x2d,0x32,0x35,0x36]),[_0x522948([0x78])]:_0x522948([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]),[_0x522948([0x79])]:_0x522948([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]),[_0x522948([0x61,0x6c,0x67])]:_0x522948([0x45,0x53,0x32,0x35,0x36])},_0x3914db=_0x1b2ae8[_0x522948([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x522948([0x67,0x65,0x74])](_0x522948([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x133275(){let _0x4b46e3,_0x4dc210=null,_0x3a2ef6=null;try{if(_0x3914db==_0x522948([0x47,0x50,0x4c]))return _0x522948([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4b46e3=_0x10f671(),!_0x4b46e3)return _0x522948([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4b46e3[_0x522948([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3a2ef6=_0x288050(_0x4b46e3[_0x522948([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4b46e3[_0x522948([0x6a,0x74,0x69])])),await _0x6ead1f()?_0x260dd2()?_0x423c47()?_0x522948([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2842a0()?(_0x4b46e3[_0x522948([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x522948([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4dc210=_0x4d7589(_0x522948([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4b46e3[_0x522948([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x522948([0x74,0x72,0x69,0x61,0x6c])&&(_0x4dc210=_0x4d7589(_0x522948([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a0058()):_0x522948([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x522948([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x522948([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x5119be){return _0x522948([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x423c47(){const _0x5bf4fd=[_0x522948([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x522948([0x74,0x72,0x69,0x61,0x6c])][_0x522948([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b46e3[_0x522948([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2deda0/0x3e8:0xe10*_0xacc11e;return _0x4b46e3[_0x522948([0x65,0x78,0x70])]<_0x5bf4fd;}function _0x260dd2(){const _0x3cb1f6=_0x4b46e3[_0x522948([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3cb1f6&&(!!_0x3cb1f6[_0x522948([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x522948([0x2a]))||!!_0x3cb1f6[_0x522948([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x522948([0x41,0x49])));}function _0x2842a0(){const _0x577f54=_0x4b46e3[_0x522948([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x577f54||0x0==_0x577f54[_0x522948([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x290356}=new URL(window[_0x522948([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x577f54[_0x522948([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x290356))return!0x0;const _0x3b1c32=_0x290356[_0x522948([0x73,0x70,0x6c,0x69,0x74])](_0x522948([0x2e]));return _0x577f54[_0x522948([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5801fb=>_0x5801fb[_0x522948([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x522948([0x2a])))[_0x522948([0x6d,0x61,0x70])](_0x489eaf=>_0x489eaf[_0x522948([0x73,0x70,0x6c,0x69,0x74])](_0x522948([0x2e])))[_0x522948([0x73,0x6f,0x6d,0x65])](_0x31af34=>_0x3b1c32[_0x522948([0x65,0x76,0x65,0x72,0x79])]((_0x15b9c1,_0x407953)=>_0x31af34[_0x407953]===_0x15b9c1||_0x31af34[_0x407953]===_0x522948([0x2a])));}function _0x5a0058(){return _0x4dc210&&_0x3a2ef6?new window[(_0x522948([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x575939,_0x773c0d)=>{_0x4dc210[_0x522948([0x74,0x68,0x65,0x6e])](_0x575939,_0x773c0d),_0x3a2ef6[_0x522948([0x74,0x68,0x65,0x6e])](_0x1da74f=>{_0x1da74f!=_0x522948([0x56,0x61,0x6c,0x69,0x64])&&_0x575939(_0x1da74f);},_0x773c0d);}):_0x4dc210||_0x3a2ef6||_0x522948([0x56,0x61,0x6c,0x69,0x64]);}}function _0x288050(_0x142000,_0x3eccc6){return new window[(_0x522948([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x416b4b=>{if(_0x2994bc())return _0x416b4b(_0x522948([0x56,0x61,0x6c,0x69,0x64]));_0xea909a(),_0x1b2ae8[_0x522948([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x522948([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x552e4f=!0x1;const _0x21786c=_0x5ad51b();function _0x262330(_0x20e23f){return!!_0x20e23f&&(typeof _0x20e23f===_0x522948([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x20e23f===_0x522948([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x20e23f[_0x522948([0x74,0x68,0x65,0x6e])]===_0x522948([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x20e23f[_0x522948([0x63,0x61,0x74,0x63,0x68])]===_0x522948([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x25c29c(_0x3205da){_0xa275e5(_0x3205da)[_0x522948([0x74,0x68,0x65,0x6e])](_0x2c97ff=>{if(!_0x2c97ff||_0x2c97ff[_0x522948([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x522948([0x6f,0x6b]))return _0x522948([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x19e0e6(_0x3f8db0(_0x21786c+_0x3eccc6))!=_0x2c97ff[_0x522948([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x522948([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x522948([0x56,0x61,0x6c,0x69,0x64]);})[_0x522948([0x74,0x68,0x65,0x6e])](_0x4c1ebd=>(_0x16db68(),_0x4c1ebd),()=>{const _0x35d3f1=_0x1385ba();return null==_0x35d3f1?(_0x16db68(),_0x522948([0x56,0x61,0x6c,0x69,0x64])):_0x522948(_0x2deda0-_0x35d3f1>(0x2686fda7^_0x6b68a0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x522948([0x74,0x68,0x65,0x6e])](_0x416b4b)[_0x522948([0x63,0x61,0x74,0x63,0x68])](()=>{_0x416b4b(_0x522948([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2c9cd2=0x2bc9727^_0x6b68a0;function _0x16db68(){const _0x423bc0=_0x522948([0x6c,0x6c,0x63,0x74,0x2d])+_0x19e0e6(_0x3f8db0(_0x142000)),_0x4922a1=_0x405e47(_0x19e0e6(window[_0x522948([0x4d,0x61,0x74,0x68])][_0x522948([0x63,0x65,0x69,0x6c])](_0x2deda0/_0x2c9cd2)));window[_0x522948([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x522948([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x423bc0,_0x4922a1);}function _0x1385ba(){const _0x321c53=_0x522948([0x6c,0x6c,0x63,0x74,0x2d])+_0x19e0e6(_0x3f8db0(_0x142000)),_0x408eb3=window[_0x522948([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x522948([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x321c53);return _0x408eb3?window[_0x522948([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x405e47(_0x408eb3),0x10)*_0x2c9cd2:null;}function _0xa275e5(_0x2ccd0c){return new window[(_0x522948([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x405def,_0x388d01)=>{_0x2ccd0c[_0x522948([0x74,0x68,0x65,0x6e])](_0x405def,_0x388d01),window[_0x522948([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x388d01,0x28bad67^_0x6b68a0);});}}_0x1b2ae8[_0x522948([0x6f,0x6e])](_0x522948([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x286ebf,_0x94c928)=>{if(_0x94c928[0x0]!=_0x142000)return _0x416b4b(_0x522948([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x94c928[0x1]={..._0x94c928[0x1],[_0x522948([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x21786c};},{[_0x522948([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x522948([0x68,0x69,0x67,0x68])}),_0x1b2ae8[_0x522948([0x6f,0x6e])](_0x522948([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x444208=>{_0x262330(_0x444208[_0x522948([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x552e4f=!0x0,_0x25c29c(_0x444208[_0x522948([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x522948([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x522948([0x6c,0x6f,0x77])}),_0x4cc86e[_0x522948([0x74,0x68,0x65,0x6e])](()=>{_0x552e4f||_0x416b4b(_0x522948([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2994bc(){return _0x1b2ae8[_0x522948([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x522948([0x76,0x69,0x65,0x77])][_0x522948([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x522948([0x61,0x75,0x74,0x6f]);}function _0xea909a(){_0x1b2ae8[_0x522948([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x522948([0x76,0x69,0x65,0x77])][_0x522948([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x522948([0x61,0x75,0x74,0x6f]);}}function _0x4d7589(_0x49c688){const _0x267771=[new window[(_0x522948([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x104fdc=>setTimeout(_0x104fdc,0x283476b^_0x6b68a0)),_0x4cc86e[_0x522948([0x74,0x68,0x65,0x6e])](()=>new window[(_0x522948([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xeff25e=>{let _0x441543=0x0;_0x1b2ae8[_0x522948([0x6d,0x6f,0x64,0x65,0x6c])][_0x522948([0x6f,0x6e])](_0x522948([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x552a6e,_0x589b3e)=>{_0x589b3e[0x0][_0x522948([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x441543++,_0x441543==(0x28a785f^_0x6b68a0)&&(_0xeff25e(),_0x552a6e[_0x522948([0x6f,0x66,0x66])]());});}))];return window[_0x522948([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x522948([0x72,0x61,0x63,0x65])](_0x267771)[_0x522948([0x74,0x68,0x65,0x6e])](()=>_0x49c688);}async function _0x375200(){await _0x4cc86e,_0x1b2ae8[_0x522948([0x6d,0x6f,0x64,0x65,0x6c])][_0x522948([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x53400e,_0x1b2ae8[_0x522948([0x6d,0x6f,0x64,0x65,0x6c])][_0x522948([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x53400e,_0x1b2ae8[_0x522948([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x522948([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x18623c(_0xa6131e){const _0x1f8684=_0x56b832();_0x1b2ae8[_0x1f8684]=_0x522948([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xa6131e,_0xa6131e!=_0x522948([0x56,0x61,0x6c,0x69,0x64])&&_0x375200();}function _0x56b832(){const _0xb196e4=window[_0x522948([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x522948([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x522948([0x6e,0x6f,0x77])]())[_0x522948([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x522948([0x2e]),'');let _0x53d2cc=_0x522948([0x46]);for(let _0x2e3929=0x0;_0x2e3929<_0xb196e4[_0x522948([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e3929+=0x2){let _0x45b069=window[_0x522948([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb196e4[_0x522948([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2e3929,_0x2e3929+0x2));_0x45b069>=_0x2d7864[_0x522948([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x45b069-=_0x2d7864[_0x522948([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x53d2cc+=_0x2d7864[_0x45b069];}return _0x53d2cc;}function _0x10f671(){const _0x29d8c1=_0x3914db[_0x522948([0x73,0x70,0x6c,0x69,0x74])](_0x522948([0x2e]));if(0x3!=_0x29d8c1[_0x522948([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1e7905(_0x29d8c1[0x1]);function _0x1e7905(_0x337c0d){const _0x1319d2=_0x323f55(_0x337c0d);return _0x1319d2&&_0x2e8259()?_0x1319d2:null;function _0x2e8259(){const _0x5713c0=_0x1319d2[_0x522948([0x6a,0x74,0x69])],_0x249b51=window[_0x522948([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5713c0[_0x522948([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5713c0[_0x522948([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3ceffc={..._0x1319d2,[_0x522948([0x6a,0x74,0x69])]:_0x5713c0[_0x522948([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5713c0[_0x522948([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3ceffc[_0x522948([0x76,0x63])],_0x3f8db0(_0x3ceffc)==_0x249b51;}}}async function _0x6ead1f(){let _0x43a60d=!0x0;try{const _0x9fc473=_0x3914db[_0x522948([0x73,0x70,0x6c,0x69,0x74])](_0x522948([0x2e])),[_0x393d33,_0x1ccba7,_0x4386ab]=_0x9fc473;return _0x3250bf(_0x393d33),await _0x15b565(_0x393d33,_0x1ccba7,_0x4386ab),_0x43a60d;}catch(_0x2ff113){return!0x1;}function _0x3250bf(_0x519520){const _0x2f6ba8=_0x323f55(_0x519520);_0x2f6ba8&&_0x2f6ba8[_0x522948([0x61,0x6c,0x67])]==_0x522948([0x45,0x53,0x32,0x35,0x36])||(_0x43a60d=!0x1);}async function _0x15b565(_0x2b5ded,_0x4e7d82,_0x6820c0){const _0x4cb03c=window[_0x522948([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x522948([0x66,0x72,0x6f,0x6d])](_0x487afd(_0x6820c0),_0x4ae6d2=>_0x4ae6d2[_0x522948([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x41c672=new window[(_0x522948([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x522948([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2b5ded+_0x522948([0x2e])+_0x4e7d82),_0x25d462=window[_0x522948([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x522948([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x25d462)return;const _0x24b085=await _0x25d462[_0x522948([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x522948([0x6a,0x77,0x6b]),_0x40dd01,{[_0x522948([0x6e,0x61,0x6d,0x65])]:_0x522948([0x45,0x43,0x44,0x53,0x41]),[_0x522948([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x522948([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x522948([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x25d462[_0x522948([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x522948([0x6e,0x61,0x6d,0x65])]:_0x522948([0x45,0x43,0x44,0x53,0x41]),[_0x522948([0x68,0x61,0x73,0x68])]:{[_0x522948([0x6e,0x61,0x6d,0x65])]:_0x522948([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x24b085,_0x4cb03c,_0x41c672)||(_0x43a60d=!0x1);}}function _0x323f55(_0x23d296){return _0x23d296[_0x522948([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x522948([0x65,0x79]))?JSON[_0x522948([0x70,0x61,0x72,0x73,0x65])](_0x487afd(_0x23d296)):null;}function _0x487afd(_0x37f50a){return window[_0x522948([0x61,0x74,0x6f,0x62])](_0x37f50a[_0x522948([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x522948([0x2b]))[_0x522948([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x522948([0x2f])));}function _0x3f8db0(_0x455287){let _0x4cab0c=0x1505;function _0x269338(_0x2f3531){for(let _0x52d8da=0x0;_0x52d8da<_0x2f3531[_0x522948([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x52d8da++){const _0x3436f8=_0x2f3531[_0x522948([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x52d8da);_0x4cab0c=(_0x4cab0c<<0x5)+_0x4cab0c+_0x3436f8,_0x4cab0c&=_0x4cab0c;}}function _0x39bc68(_0x2c816d){Array[_0x522948([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2c816d)?_0x2c816d[_0x522948([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39bc68):_0x2c816d&&typeof _0x2c816d==_0x522948([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x522948([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2c816d)[_0x522948([0x73,0x6f,0x72,0x74])]()[_0x522948([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2a8e46,_0x30ca1a])=>{_0x269338(_0x2a8e46),_0x39bc68(_0x30ca1a);}):_0x269338(window[_0x522948([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2c816d));}return _0x39bc68(_0x455287),_0x4cab0c>>>0x0;}function _0x19e0e6(_0x74c375){return _0x74c375[_0x522948([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x522948([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x522948([0x30]));}function _0x405e47(_0x388d29){return _0x388d29[_0x522948([0x73,0x70,0x6c,0x69,0x74])]('')[_0x522948([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x522948([0x6a,0x6f,0x69,0x6e])]('');}function _0x53400e(){}function _0x522948(_0x3d0884){return _0x3d0884['map'](_0x140792=>String['fromCharCode'](_0x140792))['join']('');}_0x18623c(await _0x133275());}(this);}['showFakeVisualSelection'](){const _0x969ce6=this['editor']['model'];_0x969ce6['change'](_0x20fe60=>{const _0x336ea0=_0x969ce6['document']['selection']['getRanges']();let _0x5a2914=0x0;for(const _0x5a3a8a of _0x336ea0){const _0x1a7d65=f+':'+_0x5a2914;if(_0x969ce6['markers']['has'](_0x1a7d65))_0x20fe60['updateMarker'](_0x1a7d65,{'range':_0x5a3a8a});else{if(_0x5a3a8a['start']['isAtEnd']){const _0x404c76=_0x5a3a8a['start']['getLastMatchingPosition'](({item:_0x15c1c9})=>!_0x969ce6['schema']['isContent'](_0x15c1c9),{'boundaries':_0x5a3a8a});_0x20fe60['addMarker'](_0x1a7d65,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x20fe60['createRange'](_0x404c76,_0x5a3a8a['end'])});}else _0x20fe60['addMarker'](_0x1a7d65,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5a3a8a});}_0x5a2914++;}});}['hideFakeVisualSelection'](){const _0x4ad70e=this['editor']['model'],_0x5777dd=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x5777dd['length']&&_0x4ad70e['change'](_0x92ee8d=>{_0x5777dd['forEach'](_0x2a12d7=>{_0x92ee8d['removeMarker'](_0x2a12d7);});});}['insertContent'](_0x44fee4,_0x276029){const _0x1885a6=this['_getAISelection'](),_0x5d4f68=_0x276029||_0x1885a6['getFirstRange']();this['editor']['model']['canEditAt'](_0x5d4f68)&&this['editor']['model']['change'](_0x5123ce=>{this['hideFakeVisualSelection'](),_0x276029||this['_resetContentOfSelectedTableCells'](_0x5123ce,_0x1885a6),this['_pasteHTMLUsingClipboard']({'insertAt':_0x5d4f68,'writer':_0x5123ce,'html':_0x44fee4});});}['insertContentBelow'](_0x444bf5){const {model:_0x5b39dc}=this['editor'],_0x51ff9e=this['_getAISelection']();_0x5b39dc['change'](()=>{const _0x59eba5=this['_prepareTableInsertBelowPosition'](_0x444bf5,_0x51ff9e)||this['_getDefaultInsertBelowPosition'](_0x51ff9e);this['insertContent'](_0x444bf5,_0x59eba5);});}['_getAISelection'](){const _0x6da212=this['editor']['model'],_0x1e796e=Array['from'](_0x6da212['markers']['getMarkersGroup'](f))['map'](_0xa26746=>_0xa26746['getRange']());return _0x6da212['createSelection'](_0x1e796e);}['_pasteHTMLUsingClipboard']({writer:_0x1a8c21,html:_0x582e8f,insertAt:_0x29aa2c}){const {view:_0x5af491}=this['editor']['editing'],_0x4e3dad=this['editor']['plugins']['get'](_0x5a65c6),_0x32baf8=new gt();_0x32baf8['setData']('text/html',_0x582e8f);const _0x5b4147=new ClipboardEvent('paste',{'clipboardData':_0x32baf8}),_0x57abaf=new _0x3b357b(_0x5af491,_0x5b4147,{'dataTransfer':new _0x29944c(_0x32baf8)});_0x1a8c21['setSelection'](_0x29aa2c);const _0x2c9849=(_0x2ce5e5,_0x447dde)=>{_0x447dde['resultRange']&&_0x1a8c21['setSelection'](_0x447dde['resultRange']);};_0x4e3dad['once']('contentInsertion',_0x2c9849,{'priority':'lowest'}),_0x5af491['document']['fire']('paste',_0x57abaf),_0x4e3dad['off']('contentInsertion',_0x2c9849);}['_getDefaultInsertBelowPosition'](_0x556175){const {model:_0x2e11d2}=this['editor'],_0x5a3ccd=Array['from'](_0x556175['getSelectedBlocks']());return _0x5a3ccd['length']?_0x2e11d2['createPositionAfter'](_0x5a3ccd['pop']()):_0x556175['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x202cce,_0x185100){const {model:_0x2fce35,plugins:_0x4f4314}=this['editor'];if(_0x4f4314['has']('TableUtils')){const _0xd23152=_0x4f4314['get']('TableUtils')['getSelectedTableCells'](_0x185100);if(_0xd23152['length']){const _0x3d3a5f=this['_getTableRowCountFromContent'](_0x202cce),_0x3a7ca3=this['_createEmptyTableRows'](_0xd23152,_0x3d3a5f);return _0x2fce35['createPositionAt'](_0x3a7ca3,0x0);}}return null;}['_getTableRowCountFromContent'](_0x5851e6){const _0x3cd1be=this['editor']['plugins']['get']('TableUtils'),_0x2f4570=this['editor']['data']['parse'](_0x5851e6),_0x54473a=Array['from'](_0x2f4570['getChildren']())['filter'](_0x3c1625=>_0x3c1625['is']('element','table'));let _0x172d73=0x0;return _0x54473a['forEach'](_0xe8fc02=>{_0x172d73+=_0x3cd1be['getRows'](_0xe8fc02);}),_0x172d73;}['_createEmptyTableRows'](_0x539379,_0x64b7f2){const _0x10ff6f=this['editor']['plugins']['get']('TableUtils'),_0x33cea6=_0x10ff6f['getRowIndexes'](_0x539379),_0x2a1a9c=_0x10ff6f['getColumnIndexes'](_0x539379),_0x5df9e7=_0x33cea6['last']+0x1,_0x562463=_0x2a1a9c['first'],_0x39bd85=_0x539379[0x0]['findAncestor']('table');for(let _0x28b26a=0x0;_0x28b26a<_0x64b7f2;_0x28b26a++)_0x10ff6f['insertRows'](_0x39bd85,{'at':_0x5df9e7});return _0x39bd85['getChild'](_0x5df9e7)['getChild'](_0x562463);}['_resetContentOfSelectedTableCells'](_0x34fdff,_0x2c0a55){const {plugins:_0x415cf1}=this['editor'],{model:_0x1b63c5}=_0x34fdff;if(!_0x415cf1['has']('TableUtils'))return;_0x415cf1['get']('TableUtils')['getSelectedTableCells'](_0x2c0a55)['length']&&_0x1b63c5['deleteContent'](_0x2c0a55);}}class E extends _0x467d45{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x59bea8('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x54fe49){super(_0x54fe49),this['name']='AIRequestError';}}function i(_0x377ed5,_0x18745e,_0x587759){const t=_0x377ed5['t'];switch(_0x18745e){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',_0x587759);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x587759);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'},_0x587759);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 _0x18745e;}}class j extends _0x479ba8{['_commandDefinitions'];constructor(_0x1f73a6,_0x3a61d3){super(_0x1f73a6),this['_commandDefinitions']=_0x3a61d3,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x3bc998,_0x8fefa1,_0xa61e7d)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0xa61e7d));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0xce9cc9,_0x51888d,_0x3cb458)=>{this['enabledCommandsIds']=_0x3cb458?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x4c74c2=this['editor']['model'];this['_hasContext']=function(_0x4a8aad){const _0x3c2cba=_0x4a8aad['document']['selection'];return _0x3c2cba['isCollapsed']?0x0!==[..._0x3c2cba['getSelectedBlocks']()]['length']&&![..._0x3c2cba['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x4a8aad['hasContent'](_0x3c2cba['getFirstRange']());}(_0x4c74c2);const _0x595e6b=_0x4c74c2['document']['selection'],_0x43da2e=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0xd4cc4c of _0x595e6b['getRanges']())for(const _0x39f1fd of _0xd4cc4c['getItems']())if(_0x39f1fd['is']('element')&&_0x43da2e['includes'](_0x39f1fd['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x88adb1='',_0x58fe0b='',_0x5463e4='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x88adb1,_0x58fe0b,_0x5463e4);}}function G(_0xae5f36,_0x4bc0d0){const _0x34cd62=new Set();for(const _0x52dc2b of _0xae5f36['values']())(_0x4bc0d0||!0x1===_0x52dc2b['requiresContent'])&&_0x34cd62['add'](_0x52dc2b['id']);return Array['from'](_0x34cd62);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x559280(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x32b994,_0x28f24f,_0x200f65){super(),this['editor']=_0x32b994,this['textAdapter']=_0x28f24f,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x200f65,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x1ac3b7,_0x5bdd31,_0x38d543)=>{this['view']['value']=this['_sanitizeHTML'](_0x38d543);}),this['listenTo'](this['view'],'submitPrompt',(_0x39bf02,_0x3db311)=>{const _0x499a8a=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x3db311,_0x499a8a,'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:_0xe346f8,query:_0x1eef6a,htmlContent:_0x68f71a,label:_0x14d6ed,mainActionLabel:_0x4476b3}){this['view']['prompt']=_0x14d6ed,this['view']['mainAction']=_0x4476b3,this['initialContext']=_0x68f71a,_0x1eef6a&&(this['view']['isRendered']?this['_handleQuery'](_0x1eef6a,_0x68f71a,_0xe346f8,_0x14d6ed):this['view']['once']('render',()=>{this['_handleQuery'](_0x1eef6a,_0x68f71a,_0xe346f8,_0x14d6ed);}));}['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'](_0x5ddf5c,_0x5cda5a,_0x819cbb,_0x114656){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x5cda5a,this['previousQuery']=_0x5ddf5c,this['previousLabel']=_0x114656||_0x5ddf5c,this['previousActionId']=_0x819cbb,new Promise(_0x1d2a04=>{this['textAdapter']['makeRequest']({'query':_0x5ddf5c,'context':_0x5cda5a,'onData':_0x51f474=>{this['currentResponse']=_0x51f474,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x819cbb})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x29ae2e=>{_0x29ae2e instanceof R?this['view']['handleError'](_0x29ae2e['message']):this['view']['handleError'](),_0x1d2a04();})['finally'](()=>{this['stopProcessing'](),_0x1d2a04();});});}['_parseAndNormalizeContent'](_0x1e6ef8,_0x4c2b5b=!0x1){const _0x1ca5e6=Z['exec'](_0x1e6ef8);_0x1e6ef8=_0x1ca5e6?_0x1e6ef8['substring'](_0x1ca5e6[0x1]['length']):_0x1e6ef8['length']<0x64&&!_0x4c2b5b?'':this['_stripMarkdownSyntax'](_0x1e6ef8);const _0x45c55d=this['_domParser']['parseFromString'](_0x1e6ef8,'text/html');if(_0x1ca5e6){const _0x2d6cc7=Array['from'](_0x45c55d['body']['childNodes']);_0x2d6cc7['reverse']();for(const _0x5e22f2 of _0x2d6cc7){if(_0x5e22f2['nodeType']==Node['ELEMENT_NODE'])break;_0x5e22f2['remove']();}}const _0xf2f1c9=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x45c55d['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0xf2f1c9);const _0x5c5515=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x1bc173=this['editor']['data']['toModel'](_0xf2f1c9);return _0x5c5515||_0x1bc173['markers']['clear'](),this['editor']['data']['stringify'](_0x1bc173);}['_normalizeResponseHeadings'](_0xd727ba){const _0x3fa98d=new _0x565325(this['editor']['editing']['view']['document']),_0x268823=new _0x4f18de({'name':/^h[1-5]$/}),_0x32a196=[];let _0x198633=!0x1;for(const _0x202c31 of _0xd727ba)_0x202c31['is']('element')&&_0x268823['match'](_0x202c31)&&(_0x32a196['push'](_0x202c31),'h1'==_0x202c31['name']&&(_0x198633=!0x0));if(_0x198633){for(const _0x446fee of _0x32a196)_0x3fa98d['rename']('h'+(parseInt(_0x446fee['name'][0x1])+0x1),_0x446fee);}}['_isH1TagSupportEnabled'](){const {data:_0x466fee,editing:_0x3a9e5b}=this['editor'],_0x2ab28e=_0x466fee['htmlProcessor']['toView']('<h1></h1>'),_0xaeab2a=_0x466fee['toView'](_0x466fee['toModel'](_0x2ab28e));return!!_0x3a9e5b['view']['domConverter']['viewToDom'](_0xaeab2a)['querySelector']('h1');}['_sanitizeHTML'](_0x2a26ee){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x2a26ee),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x317071){const _0x14bb2e=_0x317071['trim']();return _0x14bb2e['startsWith']('```html')?_0x14bb2e['endsWith']('```')?_0x14bb2e['substring'](0x7,_0x14bb2e['length']-0x3):_0x14bb2e['substring'](0x7):_0x317071;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x33a07){super(_0x33a07),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x131ae7=>i(_0x33a07,'AI_'+_0x131ae7['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x33a07,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x33a07,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x33a07,'Stop'));const _0x3d3755=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x3d3755['if']('isVisible','ck-hidden',_0x3270b9=>!_0x3270b9)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x46ec89,_0x594715){const _0x587957=new _0x15ad79(this['locale']);return _0x587957['set']({'label':_0x46ec89,'class':_0x594715||'','isVisible':!0x0,'withText':!0x0}),_0x587957;}}class Y extends _0x5bb98c{['contentFieldView'];['copyButtonView'];constructor(_0x141a91,_0x10c3b5=''){super(_0x141a91),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x559060=this['bindTemplate'];this['contentFieldView']=new At(_0x141a91,_0x10c3b5),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x559060['if']('isVisible','ck-hidden',_0x4b6363=>!_0x4b6363)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x559060['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 _0x2ddb43=!0x1;this['on']('change:value',(_0x8ea13d,_0x1c37eb,_0xef61d)=>{const _0x34ab1b=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0xef61d),this['isProcessing']&&_0x34ab1b&&!_0x2ddb43&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x3cffc4,_0x45f089,_0x3cfc09)=>{_0x2ddb43=!0x1,_0x3cfc09?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x2ddb43=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x2ddb43=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x51a326=this['locale'],_0x8a197=new _0x15ad79(this['locale']),_0x2d15de='ck-ai-form__copy-button';return _0x8a197['set']({'label':i(_0x51a326,'Copy'),'icon':_0x2cc872,'class':_0x2d15de,'tooltip':!0x0}),_0x8a197['bind']('isVisible')['to'](this,'value',_0x5bf90f=>!!_0x5bf90f),_0x8a197['bind']('isEnabled')['to'](this,'isProcessing',_0x12af0d=>!_0x12af0d),_0x8a197['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x8a197['icon']=_0x34a4d9,_0x8a197['class']=_0x2d15de+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x8a197['icon']=_0x2cc872,_0x8a197['class']=_0x2d15de;},0x3e8);}),_0x8a197;}['_copyHTMLToClipboard'](_0x261dc){const {window:_0x418aa6,document:_0x231f13}=_0x72bb09;if(_0x418aa6['ClipboardItem']){const {Blob:_0x3c413b,ClipboardItem:_0x58c840}=_0x418aa6,_0x3553ec=[new _0x58c840({'text/html':new _0x3c413b([_0x261dc['innerHTML']],{'type':'text/html'}),'text/plain':new _0x3c413b([_0x261dc['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x3553ec);}else{const _0x5c45e4=_0x231f13['createElement']('div');_0x5c45e4['style']['position']='absolute',_0x5c45e4['style']['left']='-9999px',_0x5c45e4['innerHTML']='<span>[</span>'+_0x261dc['innerHTML']+'<span>]</span>',_0x231f13['body']['appendChild'](_0x5c45e4);const _0x2de3cd=_0x231f13['createRange']();_0x2de3cd['setStartAfter'](_0x5c45e4['firstElementChild']),_0x2de3cd['setEndBefore'](_0x5c45e4['lastElementChild']);const _0x59660d=_0x418aa6['getSelection']();_0x59660d['removeAllRanges'](),_0x59660d['addRange'](_0x2de3cd),_0x231f13['execCommand']('copy'),_0x5c45e4['remove']();}}}class At extends _0x5bb98c{constructor(_0x221700,_0x5ab759=''){super(_0x221700),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x5ab759,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x1202bf){this['element']['innerHTML']=_0x1202bf;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x111b85=new _0x5bb98c(),_0x5c3d3d=this['locale'],_0x44ef3c=new _0x217001();return _0x44ef3c['isVisible']=!0x0,_0x111b85['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x44ef3c,{'text':i(_0x5c3d3d,'AI\x20is\x20writing...')}]}),_0x111b85['render'](),_0x111b85;}}class st extends _0x5bb98c{constructor(_0x3b9c4b,_0x1db712=''){super(_0x3b9c4b);const _0x90c270=new rt(),_0x45d339=this['bindTemplate'];this['set']('text',_0x1db712),_0x90c270['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x90c270,{'text':_0x45d339['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x3c87c6,_0x58d808){super(_0x3c87c6,_0x58d808),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',(_0x2be253,_0x2102b3)=>{_0x2be253['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2102b3());});}['_createSubmitButton'](){const _0x57ca02=new _0x15ad79(this['locale']),_0xd11541=this['locale'];return _0x57ca02['set']({'icon':ht,'label':i(_0xd11541,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x57ca02['on']('execute',()=>{this['submit']();}),_0x57ca02['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x2e8af9,_0x5d36e6)=>!_0x2e8af9&&_0x5d36e6),_0x57ca02;}['_createShowHistoryButton'](){const _0x213147=new _0x15ad79(this['locale']),_0x191cd1=this['resultsView'],_0xfd148f=this['locale'];_0x213147['set']({'label':i(_0xfd148f,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x213147['bind']('isOn')['to'](_0x191cd1,'isVisible'),_0x213147['bind']('isEnabled')['to'](this,'isEnabled'),_0x213147['on']('execute',()=>{_0x191cd1['isVisible']=!_0x191cd1['isVisible'],_0x191cd1['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x35023c=()=>{_0x72bb09['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x2ea4a3=new it(this['queryView']['fieldView']['element']),_0x89ad4a=_0x2ea4a3['width'],_0xb88b18='rtl'===_0xfd148f['uiLanguageDirection']?'left':'right';_0x2ea4a3['excludeScrollbarsAndBorders'](),_0x213147['element']['style'][_0xb88b18]=_0x89ad4a-_0x2ea4a3['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x35023c),this['on']('render',_0x35023c),_0x213147;}['submit'](){const _0x40489c=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x40489c);}['focus'](_0x54ae12){-0x1===_0x54ae12?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x4d0e59){super(_0x4d0e59),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x4d0e59,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x1ba19a=0x0;for(const _0x518377 of this['items'])_0x1ba19a+=_0x518377['items']['length'];return{'resultsCount':_0x1ba19a,'totalItemsCount':_0x1ba19a};}['_createClearHistoryButton'](){const _0x279c5b=this['locale'],_0x3afe6c=new _0x15ad79(this['locale']);return _0x3afe6c['set']({'label':'('+i(_0x279c5b,'Clear')+')','withText':!0x0}),_0x3afe6c['on']('execute',()=>this['fire']('clearHistory')),_0x3afe6c;}}class bt extends xt{constructor(_0xfa134d){super();const _0x484313=new kt(),_0x4f75cf=new _0x15ad79(this['locale'],_0x484313);this['children']['add'](_0x4f75cf),_0x4f75cf['set']({'label':_0xfa134d['prompt'],'withText':!0x0}),_0x4f75cf['on']('execute',()=>{this['fire']('execute',{'value':jt(_0xfa134d['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x3b2aac{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x3b7fa3,_0x269100)=>{const _0x87b65b=os(_0x269100['prompt']);for(const _0x9bc582 of this)if(_0x9bc582!=_0x269100&&os(_0x9bc582['prompt'])===_0x87b65b){this['remove'](_0x9bc582);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x1c639d=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x1c639d));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x27d97d=>_0x27d97d)));}}function os(_0x31ab2b){return _0x31ab2b['toLowerCase']()['trim']();}class _ extends _0x5bb98c{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x233400,_0x1a07fd,_0x2f473f=''){super(_0x233400),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 wt(),this['errorView']=new st(_0x233400),this['contentArea']=new Y(_0x233400,_0x2f473f),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 mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'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 _0x57b1e6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x1a07fd],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x57b1e6['if']('isError','ck-hidden',_0x3c176c=>!_0x3c176c)]},'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'](_0x4e072c=0x1){-0x1===_0x4e072c?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 _0x19753f=this['locale'],_0x50f3c0=new ct(_0x19753f,{'queryView':{'label':i(_0x19753f,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x19753f,'Empty\x20history'),'secondary':i(_0x19753f,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x50f3c0['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x2adbf8,_0x5289af)=>_0x2adbf8&&!_0x5289af),this['listenTo'](_0x50f3c0,'submit',(_0x2fdfba,_0x39d81f)=>{this['prompt']=_0x39d81f;const _0x3b2ec9=yt(_0x39d81f);this['fire']('submitPrompt',_0x3b2ec9),_0x39d81f['trim']()&&this['_promptHistory']['add']({'prompt':_0x3b2ec9},0x0);},{'priority':'high'}),_0x50f3c0;}['_createHistoryView'](){const _0xd73a3b=new ft(this['locale']);return _0xd73a3b['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0xd73a3b['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0xd73a3b;}['_createToolbar'](){const _0x51054f=new lt(this['locale']);return _0x51054f['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x273489,_0x542884,_0x1183b9)=>_0x273489&&!_0x542884&&!!_0x1183b9),_0x51054f['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x51054f['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x173ccb,_0x132e92,_0x241d0f)=>_0x173ccb&&!_0x132e92&&!!_0x241d0f),_0x51054f['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x51054f['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x5e4199,_0x1e58bc)=>_0x5e4199&&!_0x1e58bc),_0x51054f['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x51054f['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x51054f['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x51054f;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x84632a=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x84632a,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x3e1e95){const _0x11f211=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x3e1e95||i(_0x11f211,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x467d45{['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[_0x2d31ac,a,E,_0x1b3490];}constructor(_0x54420c){super(_0x54420c),_0x54420c['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x54420c['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x54420c['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x54420c['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x192169}=this;this['_aiAdapter']=_0x192169['plugins']['get'](E),this['_dialog']=_0x192169['plugins']['get'](_0x1b3490),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x41ad8c=new j(_0x192169,Array['from'](this['_commandDefinitions']['values']()));_0x192169['commands']['add']('showAIAssistant',_0x41ad8c),_0x192169['ui']['componentFactory']['add']('aiCommands',_0x46c09e=>{const _0x3f97d0=_0x78e007(_0x46c09e);return _0x3f97d0['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x3f97d0['buttonView']['set']({'label':i(_0x46c09e,'AI\x20Commands'),'icon':_0xadecb0,'tooltip':!0x0}),_0x3f97d0['on']('execute',_0x43877b=>this['_onExecute'](_0x43877b['source']['id'])),_0x226bc8(_0x3f97d0,_0x192169['ui']['view']['body'],function(_0x2a105c){const _0x20876f=o(_0x2a105c['config']['get']('ai.aiAssistant.commands'),_0x2a105c['locale']),_0x272caf=U(_0x2a105c,_0x20876f)['filter'](_0x4a6ca3=>_0x4a6ca3['commands']['length']);if(0x1===_0x272caf['length'])return U(_0x2a105c,_0x272caf[0x0]['commands'])['map'](_0x311d53=>({'id':_0x311d53['id'],'label':_0x311d53['label']}));return _0x272caf['map'](_0x414b77=>{const {groupId:_0x303389,groupLabel:_0x1705df,commands:_0x429e63}=_0x414b77,_0x76e1d7=U(_0x2a105c,_0x429e63)['map'](_0x4929ed=>({'id':_0x4929ed['id'],'label':_0x4929ed['label']}));return{'id':_0x303389,'menu':_0x1705df||_0x303389,'children':_0x76e1d7};});}(_0x192169),{'ariaLabel':i(_0x46c09e,'AI\x20Commands')}),_0x3f97d0['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x41ad8c['on']('change:enabledCommandsIds',_0x1d3f12),_0x3f97d0['menuView']['once']('render',_0x1d3f12),_0x3f97d0;function _0x1d3f12(){_0x3f97d0['isEnabled']=_0x41ad8c['enabledCommandsIds']['length']>0x0;for(const _0x448760 of _0x3f97d0['menuView']['buttons'])_0x448760['isEnabled']=_0x41ad8c['enabledCommandsIds']['includes'](_0x448760['id']);}}),_0x192169['ui']['componentFactory']['add']('menuBar:aiCommands',_0x3f69a9=>{const _0x1d4f31=new _0x1a84df(_0x3f69a9);_0x1d4f31['buttonView']['set']({'label':i(_0x3f69a9,'AI\x20Commands'),'icon':_0xadecb0}),_0x1d4f31['bind']('isEnabled')['to'](_0x41ad8c,'enabledCommandsIds',_0x40a4e9=>_0x40a4e9['length']>0x0);const _0x50110d=o(_0x192169['config']['get']('ai.aiAssistant.commands'),_0x3f69a9);return this['_populateMenuBarMenu'](_0x41ad8c,_0x1d4f31,_0x50110d,_0x5334ed=>this['_onExecute'](_0x5334ed)),_0x1d4f31;}),_0x192169['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x1f2aea=this['_createAIAssistantUIButton'](_0x15ad79);return _0x1f2aea['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x1f2aea;}),_0x192169['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x40e3bd=this['_createAIAssistantUIButton'](_0xd05241);return _0x40e3bd['set']({'role':'menuitemcheckbox'}),_0x40e3bd;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x204970=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1c263f;for(const _0x2436b7 in _0x204970){const _0x28998d=_0x2436b7,_0x1ac2f6=_0x204970[_0x28998d];if('aiLicenseKeyValid'==_0x1ac2f6||'aiLicenseKeyInvalid'==_0x1ac2f6||'aiLicenseKeyExpired'==_0x1ac2f6||'aiLicenseKeyDomainLimit'==_0x1ac2f6||'aiLicenseKeyNotAllowed'==_0x1ac2f6||'aiLicenseKeyEvaluationLimit'==_0x1ac2f6||'aiLicenseKeyTrialLimit'==_0x1ac2f6||'aiLicenseKeyUsageLimit'==_0x1ac2f6){delete _0x204970[_0x28998d],_0x1c263f=_0x1ac2f6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x1c263f&&_0x204970['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x1c263f&&_0x204970['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x1c263f&&_0x204970['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x1c263f&&_0x204970['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x1c263f&&_0x204970['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x1c263f&&_0x204970['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x1c263f&&_0x204970['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x21b8d6='',_0x4bd261='',_0x4b2506='custom'){const _0x325788=this['editor'],_0x38a68a=_0x325788['editing']['view'],_0x25af83=_0x325788['plugins']['get'](a),_0x523611=_0x325788['plugins']['get'](_0x2d31ac);_0x25af83['showFakeVisualSelection']();const _0x9166b7=new w(),_0x214500=new ClipboardEvent('copy',{'clipboardData':_0x9166b7}),_0x1df002=new _0x29944c(_0x9166b7),_0x32be6b=new _0x3b357b(_0x38a68a,_0x214500,{'dataTransfer':_0x1df002});_0x523611['_forceMarkersCopy']('comment',()=>{_0x38a68a['document']['fire']('copy',_0x32be6b);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x325788,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x79252b=_0x1df002['getData']('text/html');const _0x43f7d4=_0x325788['model']['document']['selection'],_0x21d65=Array['from'](_0x43f7d4['getRanges']());0x1===_0x21d65['length']&&_0x21d65[0x0]['isFlat']&&!_0x43f7d4['getSelectedElement']()&&''!==_0x79252b['replace'](/ /g,'')['trim']()&&(_0x79252b='<p>'+_0x79252b+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x4b2506,'query':_0x21b8d6,'htmlContent':_0x79252b,'label':_0x4bd261,'mainActionLabel':M[_0x325788['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x714a09,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x2b6266['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x25af83['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x63ed94=new Map(),_0x20ae78=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x2bb3dc of _0x20ae78)for(const _0x2eb588 of _0x2bb3dc['commands'])_0x63ed94['set'](_0x2eb588['id'],{..._0x2eb588,'groupId':_0x2bb3dc['groupId'],'groupLabel':_0x2bb3dc['groupLabel']||_0x2bb3dc['groupId']});return _0x63ed94;}['_createAIAssistantUIButton'](_0x36260f){const _0x4431fd=this['editor'],_0x196645=_0x4431fd['commands']['get']('showAIAssistant'),_0x30fc63=new _0x36260f(_0x4431fd['locale']);return _0x30fc63['set']({'label':i(_0x4431fd['locale'],'AI\x20Assistant'),'icon':_0x714a09,'isToggleable':!0x0}),_0x30fc63['bind']('isEnabled')['to'](_0x196645),_0x30fc63['bind']('isOn')['to'](this['_dialog'],'id',_0x457549=>'aiAssistant'===_0x457549),this['listenTo'](_0x30fc63,'execute',()=>{_0x30fc63['isOn']?this['hideUI']():_0x196645['execute']();}),_0x30fc63;}['_initView'](){const _0x1b7363=this['editor']['plugins']['get'](a);this['_formView']=new _(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',()=>{_0x1b7363['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x1b7363['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x17dacd,ui:{ariaLiveAnnouncer:_0x1b4b9f}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x5cfa43,_0x1f10b4,_0x3dbe06)=>{const _0x112f19=this['_aiAssistantController']['currentContext'];_0x3dbe06?_0x1b4b9f['announce'](i(_0x17dacd,'AI\x20is\x20writing')):_0x112f19&&_0x1b4b9f['announce'](i(_0x17dacd,'Generated\x20content:\x20%0',_0x112f19),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x1340b6,_0xf9d725,_0xec73a0)=>{if(_0xec73a0){const _0x4fc5c9=this['_formView']['errorView']['text'];_0x1b4b9f['announce'](i(_0x17dacd,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x4fc5c9));}});}['_onExecute'](_0x3d06e5){const _0x4704ba=this['_commandDefinitions']['get'](_0x3d06e5),_0x1ac026=this['editor'],_0x3ea07a=_0x1ac026['model']['document']['selection'],_0x1c5946=_0x1ac026['commands']['get']('showAIAssistant'),_0x2661f5=_0x1ac026['plugins']['get'](a),_0x3eb7d0=''+(_0x4704ba['groupId']!==x?_0x4704ba['groupLabel']+':\x20':'')+_0x4704ba['label'];if(!0x1!==_0x4704ba['requiresContent']&&_0x3ea07a['isCollapsed']){const _0x3cf5e8=_0x48cea6(_0x3ea07a['getSelectedBlocks']())||_0x1ac026['model']['schema']['getLimitElement'](_0x3ea07a);_0x1ac026['model']['change'](_0xcb8176=>{_0xcb8176['setSelection'](_0x3cf5e8,'in');});}_0x2661f5['showFakeVisualSelection'](),_0x1c5946['execute'](_0x4704ba['prompt'],_0x3eb7d0,'command:'+_0x3d06e5);}['_populateMenuBarMenu'](_0x346dcf,_0x23f3de,_0x170fbb,_0x189b16){const _0xfe62f=this['editor'],_0x419ac9=_0xfe62f['locale'],_0x62944f=new _0x21ab1c(_0x419ac9),_0x31e6ec=U(_0xfe62f,_0x170fbb)['filter'](_0x4fb291=>_0x4fb291['commands']['length']);0x1===_0x31e6ec['length']?this['_getMenuBarGroupButtons']({'command':_0x346dcf,'commands':_0x31e6ec[0x0]['commands'],'parentMenuView':_0x23f3de,'onExecute':_0x189b16})['forEach'](_0x2458bc=>_0x62944f['items']['add'](_0x2458bc)):_0x31e6ec['forEach'](({groupId:_0x2edc56,groupLabel:_0x5086c9,commands:_0x588a8f})=>{const _0xc309a4=new _0x5f0fdc(_0x419ac9,_0x23f3de),_0xe93e44=new _0x1a84df(_0x419ac9),_0x105e82=new _0x21ab1c(_0x419ac9),_0x36bf2a=this['_getMenuBarGroupButtons']({'command':_0x346dcf,'commands':_0x588a8f,'parentMenuView':_0xe93e44,'onExecute':_0x189b16});_0xe93e44['buttonView']['set']({'label':_0x5086c9||_0x2edc56}),_0xe93e44['delegate']('execute')['to'](_0x23f3de),_0x105e82['items']['addMany'](_0x36bf2a),_0xe93e44['panelView']['children']['add'](_0x105e82),_0xc309a4['children']['add'](_0xe93e44),_0x62944f['items']['add'](_0xc309a4);}),_0x23f3de['panelView']['children']['add'](_0x62944f);}['_getMenuBarGroupButtons']({command:_0x2531f3,commands:_0x3963be,parentMenuView:_0x55e0e9,onExecute:_0x5cbb0a}){const _0x1039b1=this['editor'],_0x38de1c=_0x1039b1['locale'];return U(_0x1039b1,_0x3963be)['map'](_0x5d0e7b=>{const _0x4df748=new _0x5f0fdc(_0x38de1c,_0x55e0e9),_0x184403=new _0xd05241(_0x38de1c);return _0x184403['set']({'label':_0x5d0e7b['label']}),_0x184403['delegate']('execute')['to'](_0x55e0e9),_0x184403['on']('execute',()=>_0x5cbb0a(_0x5d0e7b['id'])),_0x184403['bind']('isEnabled')['to'](_0x2531f3,'enabledCommandsIds',_0x229d39=>_0x229d39['includes'](_0x5d0e7b['id'])),_0x4df748['children']['add'](_0x184403),_0x4df748;});}}function B(_0x3d56a6,_0x1767ea){return void 0x0!==_0x3d56a6['order']&&void 0x0===_0x1767ea['order']?0x1:void 0x0===_0x3d56a6['order']&&void 0x0!==_0x1767ea['order']?-0x1:void 0x0!==_0x3d56a6['order']&&void 0x0!==_0x1767ea['order']?_0x3d56a6['order']-_0x1767ea['order']:0x0;}function U(_0x5b2cfa,_0xd9d736){_0xd9d736['sort'](B);const _0x159fbc={},_0x543532=[];for(const _0x4ec3cd of _0xd9d736)if(void 0x0!==_0x4ec3cd['order']){if(_0x4ec3cd['order']in _0x159fbc)throw new _0x59bea8('ai-commands-config-order-collision',_0x5b2cfa,{'conflictingDefinitions':[_0x4ec3cd,_0x159fbc[_0x4ec3cd['order']]]});_0x159fbc[_0x4ec3cd['order']]=_0x4ec3cd,_0x543532['splice'](_0x4ec3cd['order'],0x0,_0x4ec3cd);}else _0x543532['push'](_0x4ec3cd);return _0x543532;}class r extends _0x467d45{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3983f5){super(_0x3983f5);const _0x16be74=_0x3983f5['config'],_0x21214d=_0x3983f5['locale'];_0x16be74['define']('ai.aiAssistant.preserveComments',!0x0),_0x16be74['define']('ai.aiAssistant.commands',function(_0x5cbfd5){return[{'groupId':'editOrReview','groupLabel':i(_0x5cbfd5,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x5cbfd5,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x5cbfd5,'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(_0x5cbfd5,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x5cbfd5,'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(_0x5cbfd5,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x5cbfd5,'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(_0x5cbfd5,'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(_0x5cbfd5,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x5cbfd5,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x5cbfd5,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x5cbfd5,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x5cbfd5,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x5cbfd5,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x5cbfd5,'Change\x20style'),'commands':[{'id':'business','label':i(_0x5cbfd5,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x5cbfd5,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x5cbfd5,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x5cbfd5,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x5cbfd5,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x5cbfd5,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x5cbfd5,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x5cbfd5,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x5cbfd5,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x5cbfd5,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x5cbfd5,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x5cbfd5,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x5cbfd5,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x21214d)),_0x16be74['define']('ai.aiAssistant.extraCommandGroups',[]),_0x16be74['define']('ai.aiAssistant.removeCommands',[]);let _0x76e69=o(_0x16be74['get']('ai.aiAssistant.commands'),_0x21214d);const _0x2ca945=_0x16be74['get']('ai.aiAssistant.extraCommandGroups'),_0x4e5ee8=_0x16be74['get']('ai.aiAssistant.removeCommands');_0x2ca945['forEach'](_0x4c097e=>{const _0x403e12=_0x76e69['find'](_0x579bbf=>_0x579bbf['groupId']===_0x4c097e['groupId']);_0x403e12?_0x403e12['commands']=_0x403e12['commands']['concat'](_0x4c097e['commands']):_0x76e69['push'](_0x4c097e);}),_0x76e69=_0x76e69['filter'](_0x124b8a=>!_0x4e5ee8['includes'](_0x124b8a['groupId'])),_0x76e69['forEach'](_0x2399b3=>{_0x2399b3['commands']=_0x2399b3['commands']['filter'](_0x532a7c=>!_0x4e5ee8['includes'](_0x532a7c['id']));}),_0x16be74['set']('ai.aiAssistant.commands',_0x76e69);}}class P extends _0x467d45{['abortController'];static get['requires'](){return[E];}constructor(_0xc86865){super(_0xc86865),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x549379){return this['sendRequest'](_0x549379)['catch'](_0x1f5b6b=>{if(_0x1f5b6b instanceof R)return Promise['reject'](_0x1f5b6b);if('AbortError'==_0x1f5b6b['name'])return Promise['resolve']();throw console['error'](_0x1f5b6b),new _0x59bea8('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x526dd6,_0x441db4){const _0x5b8f81=this['editor']['locale'],_0x13e096={'Content-Type':'application/json'};if('object'==typeof _0x526dd6)Object['assign'](_0x13e096,_0x526dd6);else{if(_0x526dd6)try{const _0x2d3f38=await _0x526dd6(_0x441db4);Object['assign'](_0x13e096,_0x2d3f38);}catch(_0x4bdb51){return Promise['reject'](new R(i(_0x5b8f81,'AI_ERROR_GET_HEADERS')));}}return _0x13e096;}async['_prepareRequestParameters'](_0x353c0d,_0x3ff6f2){const _0x3645fa=this['editor']['locale'];if('object'==typeof _0x353c0d)return _0x353c0d;try{return await _0x353c0d(_0x3ff6f2);}catch(_0x1f2ea0){return Promise['reject'](new R(i(_0x3645fa,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x1d8aaa){super(_0x1d8aaa),_0x1d8aaa['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x1d8aaa['config']['get']('ai.openAI.requestParameters')||_0x1d8aaa['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x1d8aaa['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x1d8aaa['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x1d8aaa['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x1ab4d2,context:_0x1e81bc,onData:_0x4745ce,actionId:_0x30549a}){const _0x4b1748=this['editor']['locale'],_0x1e9cb4=await this['prepareMessages'](_0x1ab4d2,_0x1e81bc,_0x30549a),_0x2a48a7=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x30549a),_0x2c20b4=await this['_prepareRequestParameters'](this['_requestParameters'],_0x30549a),_0x2ce157={'messages':_0x1e9cb4,..._0x2c20b4},_0x48dd31={'method':'POST','headers':_0x2a48a7,'body':JSON['stringify'](_0x2ce157),'signal':this['abortController']['signal']},_0x5c44eb=await fetch(this['_apiUrl'],_0x48dd31);if(_0x5c44eb['ok'])return _0x2c20b4['stream']?await this['_readStreamableResponse'](_0x5c44eb,_0x4745ce):await this['_readStaticResponse'](_0x5c44eb,_0x4745ce),Promise['resolve']();{const _0xfaec3c=await _0x5c44eb['text']();return _0xfaec3c['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x4b1748,'AI_ERROR_CONTEXT_LENGTH'))):_0xfaec3c['includes']('Moderation')?Promise['reject'](new R(i(_0x4b1748,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0xfaec3c));}}async['prepareMessages'](_0x544d4f,_0x228d58,_0x2bdf6a){let _0x1de9fa,_0x2528a8;return _0x228d58?(_0x1de9fa='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.',_0x2528a8='Instruction:\x0a'+_0x544d4f+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x228d58):(_0x1de9fa='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.',_0x2528a8=_0x544d4f),[{'role':'system','content':_0x1de9fa},{'role':'user','content':_0x2528a8}];}async['_readStreamableResponse'](_0x553586,_0x5c3471){const _0x1b70f8=_0x553586['body']['getReader'](),_0xdf87d4=new TextDecoder();let _0x3c932b='',_0xd4941c='',_0x26edc7='',_0x5d5d2f=!0x1;for(;!_0x5d5d2f;){const {done:_0xa2c64,value:_0x107eee}=await _0x1b70f8['read'](),_0x4ef49d=_0x3c932b+_0xdf87d4['decode'](_0x107eee);let _0x4bd8f4='';_0x5d5d2f=_0xa2c64;try{_0x4bd8f4=this['_cleanUpData'](_0x4ef49d),_0x3c932b='';}catch(_0x3ea2df){_0x3c932b=_0x4ef49d;continue;}_0xd4941c+=_0x4bd8f4,!_0x5d5d2f&&this['_isBufferIncomplete'](_0xd4941c)||_0xd4941c&&(_0x26edc7+=_0xd4941c,_0xd4941c='',_0x5c3471(_0x26edc7));}return Promise['resolve']();}async['_readStaticResponse'](_0xd55a65,_0x5020fa){return _0x5020fa((await _0xd55a65['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x30f0f7){const _0x39c082=_0x30f0f7['split']('<')['length']!==_0x30f0f7['split']('>')['length'],_0x5267d0=_0x30f0f7['length']<0x1e;return _0x39c082&&_0x5267d0;}['_cleanUpData'](_0x21ebe1){return _0x21ebe1['split'](/\n(?![^{]*\})/g)['map'](_0x376a0d=>_0x376a0d['replace']('data:\x20',''))['filter'](_0x3c4d70=>_0x3c4d70&&_0x3c4d70['length']>0x0&&'[DONE]'!==_0x3c4d70)['map'](_0x208aa2=>{const {choices:_0x28d874}=JSON['parse'](_0x208aa2);if(_0x28d874[0x0]?.['delta']?.['content'])return _0x28d874[0x0]['delta']['content'];})['filter'](_0x3042d2=>_0x3042d2)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x58a62c){super(_0x58a62c),_0x58a62c['config']['get']('ai.aws.requestParameters')||_0x58a62c['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']=_0x58a62c['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x58a62c['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x58a62c['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x58a62c['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0xa3834f,context:_0x5ef712,onData:_0x287d18,actionId:_0x396c6b}){const {model:_0x493b1e,stream:_0x5ae896,..._0x2d2d71}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x396c6b),_0xe1186f={'prompt':await this['preparePrompt'](_0xa3834f,_0x5ef712,_0x493b1e,_0x396c6b),..._0x2d2d71};this['_apiUrl']?await this['_processProxyRequest'](_0xe1186f,_0x493b1e,_0x5ae896,_0x287d18,_0x396c6b):await this['_processAWSRequest'](_0xe1186f,_0x493b1e,_0x5ae896,_0x287d18);}async['preparePrompt'](_0x13f96a,_0x3cb67e,_0x9ab3b6,_0x276ea3){let _0x3e9730,_0x5db64c;return _0x3cb67e?(_0x3e9730='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.',_0x5db64c='Instruction:\x0a'+_0x13f96a+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x3cb67e):(_0x3e9730='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.',_0x5db64c=_0x13f96a),'meta.llama'==this['getModelFamily'](_0x9ab3b6)?'<<SYS>>\x0a'+_0x3e9730+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x5db64c+'\x0a[/INST]':'Human:\x0a'+_0x3e9730+'\x0a'+_0x5db64c+'\x0a\x0aAssistant:';}['getModelFamily'](_0x2056f1){if(/^anthropic\.claude/['test'](_0x2056f1))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x2056f1))return'ai21.j2';if(/^cohere\.command/['test'](_0x2056f1))return'cohere.command';if(/^meta\.llama/['test'](_0x2056f1))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x2056f1));}async['_processProxyRequest'](_0x22aaba,_0x6d6278,_0x4b8ede,_0x4d330d,_0x2c68a0){const _0x314a8a={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x2c68a0),'body':JSON['stringify']({..._0x22aaba,'model':_0x6d6278,'stream':_0x4b8ede}),'signal':this['abortController']['signal']},_0x26078e=await fetch(this['_apiUrl'],_0x314a8a);_0x4b8ede?await this['_readStreamableResponse'](_0x26078e,_0x6d6278,_0x4d330d):await this['_readStaticResponse'](_0x26078e,_0x6d6278,_0x4d330d);}async['_processAWSRequest'](_0x45dcdc,_0x4a5ee8,_0x3731b5,_0x2f7da3){const _0x1975bd=new _0x3c2f07(this['_bedrockClientConfig']),_0x4880cf={'body':JSON['stringify'](_0x45dcdc),'contentType':'application/json','accept':'application/json','modelId':_0x4a5ee8};let _0x12fbf7;if(_0x3731b5){const _0x5c9abc=new _0x51ab8(_0x4880cf);_0x12fbf7=await _0x1975bd['send'](_0x5c9abc,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x12fbf7,_0x4a5ee8,_0x2f7da3);}else{const _0x480381=new _0x37abfa(_0x4880cf);_0x12fbf7=await _0x1975bd['send'](_0x480381,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x12fbf7,_0x4a5ee8,_0x2f7da3);}}async['_readAsyncIterableResponse'](_0x26073f,_0x15d8a5,_0x3eb225){const _0x2982a2=_0x26073f['body'],_0x5c6d9c=new TextDecoder('utf-8');let _0x16fd5a='';for await(const _0x4bc85c of _0x2982a2)if(_0x4bc85c['chunk']){const _0x277cf9=_0x5c6d9c['decode'](_0x4bc85c['chunk']['bytes']),_0x180e9a=JSON['parse'](_0x277cf9);_0x16fd5a+=this['_getGeneratedText'](_0x180e9a,_0x15d8a5),_0x3eb225(_0x16fd5a);}return Promise['resolve']();}async['_readStreamableResponse'](_0x1ec131,_0x400491,_0x1ab78e){const _0x428181=_0x1ec131['body'],_0x33d48c=new TextDecoder('utf-8'),_0x407ea6=_0x428181['getReader']();let _0x47c3a5='',_0x5d1150='',_0x4066a8=!0x1;for(;!_0x4066a8;){const {done:_0x1a902e,value:_0xe00540}=await _0x407ea6['read']();if(_0x4066a8=_0x1a902e,_0x4066a8)break;const _0xeaa2a8=(_0x47c3a5+_0x33d48c['decode'](_0xe00540))['split']('\x0a')['map'](_0x103923=>{try{return _0x47c3a5='',JSON['parse'](_0x103923);}catch(_0x406cba){return _0x47c3a5=_0x103923,null;}})['filter'](_0x331fae=>null!==_0x331fae);_0xeaa2a8['length']&&(_0x5d1150+=_0xeaa2a8['map'](_0x3153e1=>this['_getGeneratedText'](_0x3153e1,_0x400491))['join'](''),_0x1ab78e(_0x5d1150));}return Promise['resolve']();}async['_readStaticResponse'](_0x33a916,_0x4ff1f8,_0x3ac320){let _0x49913c;return _0x49913c=_0x33a916 instanceof Response?await _0x33a916['json']():JSON['parse'](Buffer['from'](_0x33a916['body'])['toString']('utf8')),(_0x3ac320(this['_getGeneratedText'](_0x49913c,_0x4ff1f8)),Promise['resolve']());}['_getGeneratedText'](_0x5b0066,_0x1c6a7b){switch(this['getModelFamily'](_0x1c6a7b)){case'anthropic.claude':return _0x5b0066['completion'];case'ai21.j2':return _0x5b0066['completions'][0x0]['data']['text'];case'cohere.command':return _0x5b0066['generations'][0x0]['text'];case'meta.llama':return _0x5b0066['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O as OpenAITextAdapter};
|
|
23
|
+
import{Plugin as _0x7adea3,Command as _0x3b6a8a}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x873a7d,IconCheck as _0x4303e4,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x2afa0d,IconRobotPencil as _0x119fc9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x8fe8bc,CKEditorError as _0x4b94b4,ObservableMixin as _0x17517c,global as _0x39d775,isVisible as ot,Rect as it,Collection as _0x2f43ce,FocusTracker as mt,KeystrokeHandler as ut,first as _0x54b721}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x2ec46c,View as _0x1264d7,SpinnerView as _0x408141,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0x3be14e,createDropdown as _0x14394a,addMenuToDropdown as _0x40ab7a,MenuBarMenuView as _0x1e3ae5,MenuBarMenuListItemButtonView as _0x5a418d,DialogViewPosition as _0x11e7de,MenuBarMenuListView as _0x1152d8,MenuBarMenuListItemView as _0x127ed8}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x407e93,ClipboardMarkersUtils as _0x978a8f}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x4a5fa8,DataTransfer as _0x1e961d,UpcastWriter as _0x3a80d0,Matcher as _0x10d983}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x2214ed,InvokeModelWithResponseStreamCommand as _0x64cc60,InvokeModelCommand as _0x247505}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x4d05a1,_0x526e89){const _0x2dcf2f=(0x0,_0x526e89['t'])('Other');return _0x4d05a1['length']?'groupId'in _0x4d05a1[0x0]?_0x4d05a1:[{'groupId':x,'groupLabel':_0x2dcf2f,'order':0x1/0x0,'commands':_0x4d05a1}]:[{'groupId':x,'groupLabel':_0x2dcf2f,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x7adea3{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4f41bc}=this,_0x53b95d=['ck-fake-ai-selection'];_0x4f41bc['config']['get']('ai.useTheme')&&_0x53b95d['push']('ck-ai-assistant-ui_theme'),_0x4f41bc['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x53b95d,'priority':0xc}}),_0x4f41bc['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x2b5824,{writer:_0x2eccb4})=>{if(!_0x2b5824['markerRange']['isCollapsed'])return null;const _0x1c5c89=_0x2eccb4['createUIElement']('span');return _0x2eccb4['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x1c5c89),_0x1c5c89;}});}['afterInit'](){!async function(_0x1abe08){const _0x44cc75=_0x33c8d6([0x4b,0x64,0x7a,0x30,0x35,0x54,0x45,0x66,0x4d,0x74,0x75,0x49,0x44,0x61,0x69,0x48,0x52,0x47,0x50,0x65,0x51,0x71,0x79,0x77,0x67,0x5a,0x6d,0x68,0x62,0x73,0x31,0x39,0x6a,0x6b,0x4a,0x33,0x6e,0x53,0x6f,0x56,0x46,0x59,0x36,0x43,0x4f,0x41,0x63,0x37,0x34,0x4c,0x76,0x72,0x32,0x70,0x78,0x38,0x55,0x42,0x58,0x6c,0x4e,0x57]),_0x1d5aab=0x4805dd58,_0xd6f14=0x4802be30^_0x1d5aab,_0x36fc87=window[_0x33c8d6([0x44,0x61,0x74,0x65])][_0x33c8d6([0x6e,0x6f,0x77])](),_0x450b6f=_0x1abe08[_0x33c8d6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5c13ba=new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x393711=>{_0x450b6f[_0x33c8d6([0x6f,0x6e,0x63,0x65])](_0x33c8d6([0x72,0x65,0x61,0x64,0x79]),_0x393711);}),_0x4b50bb={[_0x33c8d6([0x6b,0x74,0x79])]:_0x33c8d6([0x45,0x43]),[_0x33c8d6([0x75,0x73,0x65])]:_0x33c8d6([0x73,0x69,0x67]),[_0x33c8d6([0x63,0x72,0x76])]:_0x33c8d6([0x50,0x2d,0x32,0x35,0x36]),[_0x33c8d6([0x78])]:_0x33c8d6([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]),[_0x33c8d6([0x79])]:_0x33c8d6([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]),[_0x33c8d6([0x61,0x6c,0x67])]:_0x33c8d6([0x45,0x53,0x32,0x35,0x36])},_0x440c5b=_0x450b6f[_0x33c8d6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x33c8d6([0x67,0x65,0x74])](_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x29a51e(){let _0x28d787,_0x5e8c88=null,_0x4ba666=null;try{if(_0x440c5b==_0x33c8d6([0x47,0x50,0x4c]))return _0x33c8d6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x28d787=_0x407d14(),!_0x28d787)return _0x33c8d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x28d787[_0x33c8d6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4ba666=_0x120095(_0x28d787[_0x33c8d6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x28d787[_0x33c8d6([0x6a,0x74,0x69])])),await _0x56e76a()?_0x208af7()?_0x2232ee()?_0x33c8d6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x16a401()?(_0x28d787[_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x33c8d6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5e8c88=_0x13932a(_0x33c8d6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x28d787[_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x33c8d6([0x74,0x72,0x69,0x61,0x6c])&&(_0x5e8c88=_0x13932a(_0x33c8d6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1badd7()):_0x33c8d6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x33c8d6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x33c8d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x124ca8){return _0x33c8d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2232ee(){const _0x2c863a=[_0x33c8d6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x33c8d6([0x74,0x72,0x69,0x61,0x6c])][_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28d787[_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x36fc87/0x3e8:0xe10*_0xd6f14;return _0x28d787[_0x33c8d6([0x65,0x78,0x70])]<_0x2c863a;}function _0x208af7(){const _0x4f975d=_0x28d787[_0x33c8d6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4f975d&&(!!_0x4f975d[_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33c8d6([0x2a]))||!!_0x4f975d[_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33c8d6([0x41,0x49])));}function _0x16a401(){const _0x2168c5=_0x28d787[_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2168c5||0x0==_0x2168c5[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x254929}=new URL(window[_0x33c8d6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2168c5[_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x254929))return!0x0;const _0x519c3b=_0x254929[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])](_0x33c8d6([0x2e]));return _0x2168c5[_0x33c8d6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x577605=>_0x577605[_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33c8d6([0x2a])))[_0x33c8d6([0x6d,0x61,0x70])](_0xe3e9b8=>_0xe3e9b8[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])](_0x33c8d6([0x2e])))[_0x33c8d6([0x73,0x6f,0x6d,0x65])](_0xfc3c2e=>_0x519c3b[_0x33c8d6([0x65,0x76,0x65,0x72,0x79])]((_0x3867e0,_0x8197cf)=>_0xfc3c2e[_0x8197cf]===_0x3867e0||_0xfc3c2e[_0x8197cf]===_0x33c8d6([0x2a])));}function _0x1badd7(){return _0x5e8c88&&_0x4ba666?new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5657e1,_0x43adaf)=>{_0x5e8c88[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x5657e1,_0x43adaf),_0x4ba666[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x5f5aa4=>{_0x5f5aa4!=_0x33c8d6([0x56,0x61,0x6c,0x69,0x64])&&_0x5657e1(_0x5f5aa4);},_0x43adaf);}):_0x5e8c88||_0x4ba666||_0x33c8d6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x120095(_0x202258,_0x399553){return new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53c24e=>{if(_0x22da28())return _0x53c24e(_0x33c8d6([0x56,0x61,0x6c,0x69,0x64]));_0x29032e(),_0x450b6f[_0x33c8d6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x33c8d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3060de=!0x1;const _0x2bb8e8=_0x8fe8bc();function _0x18622a(_0x213359){return!!_0x213359&&(typeof _0x213359===_0x33c8d6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x213359===_0x33c8d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x213359[_0x33c8d6([0x74,0x68,0x65,0x6e])]===_0x33c8d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x213359[_0x33c8d6([0x63,0x61,0x74,0x63,0x68])]===_0x33c8d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x47d97e(_0x5a138b){_0x1dfba4(_0x5a138b)[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x334076=>{if(!_0x334076||_0x334076[_0x33c8d6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x33c8d6([0x6f,0x6b]))return _0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x16887a(_0x2ba4a2(_0x2bb8e8+_0x399553))!=_0x334076[_0x33c8d6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x33c8d6([0x56,0x61,0x6c,0x69,0x64]);})[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x4db1d5=>(_0x1dbd3f(),_0x4db1d5),()=>{const _0x4fa30b=_0x4e27ed();return null==_0x4fa30b?(_0x1dbd3f(),_0x33c8d6([0x56,0x61,0x6c,0x69,0x64])):_0x33c8d6(_0x36fc87-_0x4fa30b>(0x6c095958^_0x1d5aab)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x53c24e)[_0x33c8d6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x53c24e(_0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x341ce9=0x483333d8^_0x1d5aab;function _0x1dbd3f(){const _0x2f99d6=_0x33c8d6([0x6c,0x6c,0x63,0x74,0x2d])+_0x16887a(_0x2ba4a2(_0x202258)),_0x645a68=_0x56a1e0(_0x16887a(window[_0x33c8d6([0x4d,0x61,0x74,0x68])][_0x33c8d6([0x63,0x65,0x69,0x6c])](_0x36fc87/_0x341ce9)));window[_0x33c8d6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x33c8d6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f99d6,_0x645a68);}function _0x4e27ed(){const _0x58ef78=_0x33c8d6([0x6c,0x6c,0x63,0x74,0x2d])+_0x16887a(_0x2ba4a2(_0x202258)),_0x461263=window[_0x33c8d6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x33c8d6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x58ef78);return _0x461263?window[_0x33c8d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56a1e0(_0x461263),0x10)*_0x341ce9:null;}function _0x1dfba4(_0x5567f4){return new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x103e24,_0x267c03)=>{_0x5567f4[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x103e24,_0x267c03),window[_0x33c8d6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x267c03,0x48040998^_0x1d5aab);});}}_0x450b6f[_0x33c8d6([0x6f,0x6e])](_0x33c8d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x366481,_0x5b87ba)=>{if(_0x5b87ba[0x0]!=_0x202258)return _0x53c24e(_0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5b87ba[0x1]={..._0x5b87ba[0x1],[_0x33c8d6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2bb8e8};},{[_0x33c8d6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x33c8d6([0x68,0x69,0x67,0x68])}),_0x450b6f[_0x33c8d6([0x6f,0x6e])](_0x33c8d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x547a9e=>{_0x18622a(_0x547a9e[_0x33c8d6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3060de=!0x0,_0x47d97e(_0x547a9e[_0x33c8d6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x33c8d6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x33c8d6([0x6c,0x6f,0x77])}),_0x5c13ba[_0x33c8d6([0x74,0x68,0x65,0x6e])](()=>{_0x3060de||_0x53c24e(_0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x22da28(){return _0x450b6f[_0x33c8d6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33c8d6([0x76,0x69,0x65,0x77])][_0x33c8d6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x33c8d6([0x61,0x75,0x74,0x6f]);}function _0x29032e(){_0x450b6f[_0x33c8d6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33c8d6([0x76,0x69,0x65,0x77])][_0x33c8d6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x33c8d6([0x61,0x75,0x74,0x6f]);}}function _0x13932a(_0x30af84){const _0x5af0a8=[new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15a8b5=>setTimeout(_0x15a8b5,0x480ce394^_0x1d5aab)),_0x5c13ba[_0x33c8d6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2bb51b=>{let _0x32aae6=0x0;_0x450b6f[_0x33c8d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x33c8d6([0x6f,0x6e])](_0x33c8d6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1b5d16,_0x4cee19)=>{_0x4cee19[0x0][_0x33c8d6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x32aae6++,_0x32aae6==(0x4805dca0^_0x1d5aab)&&(_0x2bb51b(),_0x1b5d16[_0x33c8d6([0x6f,0x66,0x66])]());});}))];return window[_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x33c8d6([0x72,0x61,0x63,0x65])](_0x5af0a8)[_0x33c8d6([0x74,0x68,0x65,0x6e])](()=>_0x30af84);}async function _0x2d4d2c(){await _0x5c13ba,_0x450b6f[_0x33c8d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x33c8d6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x14ff54,_0x450b6f[_0x33c8d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x33c8d6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x14ff54,_0x450b6f[_0x33c8d6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x33c8d6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x46e235(_0x3fe475){const _0xf8c435=_0x55c1ad();_0x450b6f[_0xf8c435]=_0x33c8d6([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3fe475,_0x3fe475!=_0x33c8d6([0x56,0x61,0x6c,0x69,0x64])&&_0x2d4d2c();}function _0x55c1ad(){const _0x54c1f9=window[_0x33c8d6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x33c8d6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x33c8d6([0x6e,0x6f,0x77])]())[_0x33c8d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x33c8d6([0x2e]),'');let _0x5b2041=_0x33c8d6([0x4b]);for(let _0x37ac12=0x0;_0x37ac12<_0x54c1f9[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x37ac12+=0x2){let _0x91688e=window[_0x33c8d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54c1f9[_0x33c8d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x37ac12,_0x37ac12+0x2));_0x91688e>=_0x44cc75[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x91688e-=_0x44cc75[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5b2041+=_0x44cc75[_0x91688e];}return _0x5b2041;}function _0x407d14(){const _0x2707d3=_0x440c5b[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])](_0x33c8d6([0x2e]));if(0x3!=_0x2707d3[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x23a089(_0x2707d3[0x1]);function _0x23a089(_0x2e24a1){const _0x400bfd=_0x944408(_0x2e24a1);return _0x400bfd&&_0xef1b01()?_0x400bfd:null;function _0xef1b01(){const _0x136410=_0x400bfd[_0x33c8d6([0x6a,0x74,0x69])],_0x474bed=window[_0x33c8d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x136410[_0x33c8d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x136410[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x526300={..._0x400bfd,[_0x33c8d6([0x6a,0x74,0x69])]:_0x136410[_0x33c8d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x136410[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x526300[_0x33c8d6([0x76,0x63])],_0x2ba4a2(_0x526300)==_0x474bed;}}}async function _0x56e76a(){let _0x292ee3=!0x0;try{const _0x32d4f4=_0x440c5b[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])](_0x33c8d6([0x2e])),[_0x3f5606,_0x2cd5ba,_0x35bb30]=_0x32d4f4;return _0x503c61(_0x3f5606),await _0x5133a3(_0x3f5606,_0x2cd5ba,_0x35bb30),_0x292ee3;}catch(_0x9a1512){return!0x1;}function _0x503c61(_0x53546c){const _0xa78140=_0x944408(_0x53546c);_0xa78140&&_0xa78140[_0x33c8d6([0x61,0x6c,0x67])]==_0x33c8d6([0x45,0x53,0x32,0x35,0x36])||(_0x292ee3=!0x1);}async function _0x5133a3(_0x1aee8c,_0x3b4c1e,_0x3e4d0e){const _0x2d570f=window[_0x33c8d6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x33c8d6([0x66,0x72,0x6f,0x6d])](_0x4eb71e(_0x3e4d0e),_0x55d4f6=>_0x55d4f6[_0x33c8d6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1867df=new window[(_0x33c8d6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x33c8d6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1aee8c+_0x33c8d6([0x2e])+_0x3b4c1e),_0x5ed2de=window[_0x33c8d6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x33c8d6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5ed2de)return;const _0x3aa699=await _0x5ed2de[_0x33c8d6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x33c8d6([0x6a,0x77,0x6b]),_0x4b50bb,{[_0x33c8d6([0x6e,0x61,0x6d,0x65])]:_0x33c8d6([0x45,0x43,0x44,0x53,0x41]),[_0x33c8d6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x33c8d6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x33c8d6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5ed2de[_0x33c8d6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x33c8d6([0x6e,0x61,0x6d,0x65])]:_0x33c8d6([0x45,0x43,0x44,0x53,0x41]),[_0x33c8d6([0x68,0x61,0x73,0x68])]:{[_0x33c8d6([0x6e,0x61,0x6d,0x65])]:_0x33c8d6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3aa699,_0x2d570f,_0x1867df)||(_0x292ee3=!0x1);}}function _0x944408(_0x160949){return _0x160949[_0x33c8d6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x33c8d6([0x65,0x79]))?JSON[_0x33c8d6([0x70,0x61,0x72,0x73,0x65])](_0x4eb71e(_0x160949)):null;}function _0x4eb71e(_0x59f508){return window[_0x33c8d6([0x61,0x74,0x6f,0x62])](_0x59f508[_0x33c8d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x33c8d6([0x2b]))[_0x33c8d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x33c8d6([0x2f])));}function _0x2ba4a2(_0x22fb23){let _0x144fc3=0x1505;function _0x549149(_0x2bdbe3){for(let _0x1c879f=0x0;_0x1c879f<_0x2bdbe3[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c879f++){const _0x246558=_0x2bdbe3[_0x33c8d6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c879f);_0x144fc3=(_0x144fc3<<0x5)+_0x144fc3+_0x246558,_0x144fc3&=_0x144fc3;}}function _0x379d69(_0x1bcaac){Array[_0x33c8d6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1bcaac)?_0x1bcaac[_0x33c8d6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x379d69):_0x1bcaac&&typeof _0x1bcaac==_0x33c8d6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x33c8d6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1bcaac)[_0x33c8d6([0x73,0x6f,0x72,0x74])]()[_0x33c8d6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1bf604,_0x36ce07])=>{_0x549149(_0x1bf604),_0x379d69(_0x36ce07);}):_0x549149(window[_0x33c8d6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1bcaac));}return _0x379d69(_0x22fb23),_0x144fc3>>>0x0;}function _0x16887a(_0xdb5699){return _0xdb5699[_0x33c8d6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x33c8d6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x33c8d6([0x30]));}function _0x56a1e0(_0x33e206){return _0x33e206[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x33c8d6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x33c8d6([0x6a,0x6f,0x69,0x6e])]('');}function _0x14ff54(){}function _0x33c8d6(_0x54de2f){return _0x54de2f['map'](_0x50c4e5=>String['fromCharCode'](_0x50c4e5))['join']('');}_0x46e235(await _0x29a51e());}(this);}['showFakeVisualSelection'](){const _0x884bdb=this['editor']['model'];_0x884bdb['change'](_0x3af9cc=>{const _0x1eb03f=_0x884bdb['document']['selection']['getRanges']();let _0x65f6e=0x0;for(const _0x123b2c of _0x1eb03f){const _0x395ae8=f+':'+_0x65f6e;if(_0x884bdb['markers']['has'](_0x395ae8))_0x3af9cc['updateMarker'](_0x395ae8,{'range':_0x123b2c});else{if(_0x123b2c['start']['isAtEnd']){const _0x497cfd=_0x123b2c['start']['getLastMatchingPosition'](({item:_0x456960})=>!_0x884bdb['schema']['isContent'](_0x456960),{'boundaries':_0x123b2c});_0x3af9cc['addMarker'](_0x395ae8,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3af9cc['createRange'](_0x497cfd,_0x123b2c['end'])});}else _0x3af9cc['addMarker'](_0x395ae8,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x123b2c});}_0x65f6e++;}});}['hideFakeVisualSelection'](){const _0x40fa9c=this['editor']['model'],_0x37d83b=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x37d83b['length']&&_0x40fa9c['change'](_0x236e1a=>{_0x37d83b['forEach'](_0x23174c=>{_0x236e1a['removeMarker'](_0x23174c);});});}['insertContent'](_0x25da79,_0x14f0c2){const _0xebb286=this['_getAISelection'](),_0x1d9131=_0x14f0c2||_0xebb286['getFirstRange']();this['editor']['model']['canEditAt'](_0x1d9131)&&this['editor']['model']['change'](_0x431957=>{this['hideFakeVisualSelection'](),_0x14f0c2||this['_resetContentOfSelectedTableCells'](_0x431957,_0xebb286),this['_pasteHTMLUsingClipboard']({'insertAt':_0x1d9131,'writer':_0x431957,'html':_0x25da79});});}['insertContentBelow'](_0x413ee2){const {model:_0x468c51}=this['editor'],_0x367db8=this['_getAISelection']();_0x468c51['change'](()=>{const _0x1246ae=this['_prepareTableInsertBelowPosition'](_0x413ee2,_0x367db8)||this['_getDefaultInsertBelowPosition'](_0x367db8);this['insertContent'](_0x413ee2,_0x1246ae);});}['_getAISelection'](){const _0x20c012=this['editor']['model'],_0x125e7b=Array['from'](_0x20c012['markers']['getMarkersGroup'](f))['map'](_0x4a4474=>_0x4a4474['getRange']());return _0x20c012['createSelection'](_0x125e7b);}['_pasteHTMLUsingClipboard']({writer:_0x3bfbfe,html:_0x5ab2cc,insertAt:_0x101672}){const {view:_0x52c4f7}=this['editor']['editing'],_0x295fe5=this['editor']['plugins']['get'](_0x407e93),_0x5270fd=new gt();_0x5270fd['setData']('text/html',_0x5ab2cc);const _0x1a6b72=new ClipboardEvent('paste',{'clipboardData':_0x5270fd}),_0x4578f1=new _0x4a5fa8(_0x52c4f7,_0x1a6b72,{'dataTransfer':new _0x1e961d(_0x5270fd)});_0x3bfbfe['setSelection'](_0x101672);const _0x35e51e=(_0x414313,_0x5f1fc6)=>{_0x5f1fc6['resultRange']&&_0x3bfbfe['setSelection'](_0x5f1fc6['resultRange']);};_0x295fe5['once']('contentInsertion',_0x35e51e,{'priority':'lowest'}),_0x52c4f7['document']['fire']('paste',_0x4578f1),_0x295fe5['off']('contentInsertion',_0x35e51e);}['_getDefaultInsertBelowPosition'](_0x116230){const {model:_0x2f3754}=this['editor'],_0x5bd9e4=Array['from'](_0x116230['getSelectedBlocks']());return _0x5bd9e4['length']?_0x2f3754['createPositionAfter'](_0x5bd9e4['pop']()):_0x116230['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x2febab,_0x35b0ba){const {model:_0x38d9ce,plugins:_0x4ad64a}=this['editor'];if(_0x4ad64a['has']('TableUtils')){const _0x31e1c3=_0x4ad64a['get']('TableUtils')['getSelectedTableCells'](_0x35b0ba);if(_0x31e1c3['length']){const _0x5bb15f=this['_getTableRowCountFromContent'](_0x2febab),_0x377b82=this['_createEmptyTableRows'](_0x31e1c3,_0x5bb15f);return _0x38d9ce['createPositionAt'](_0x377b82,0x0);}}return null;}['_getTableRowCountFromContent'](_0x3fe835){const _0x3aa461=this['editor']['plugins']['get']('TableUtils'),_0x3d4feb=this['editor']['data']['parse'](_0x3fe835),_0x475556=Array['from'](_0x3d4feb['getChildren']())['filter'](_0x1c5de7=>_0x1c5de7['is']('element','table'));let _0x3a234f=0x0;return _0x475556['forEach'](_0x1bcfde=>{_0x3a234f+=_0x3aa461['getRows'](_0x1bcfde);}),_0x3a234f;}['_createEmptyTableRows'](_0x370f70,_0x213bfc){const _0x5cecb0=this['editor']['plugins']['get']('TableUtils'),_0x233c82=_0x5cecb0['getRowIndexes'](_0x370f70),_0x3ec5cf=_0x5cecb0['getColumnIndexes'](_0x370f70),_0x387587=_0x233c82['last']+0x1,_0x1b05a2=_0x3ec5cf['first'],_0x4fe3ca=_0x370f70[0x0]['findAncestor']('table');for(let _0x54e4c3=0x0;_0x54e4c3<_0x213bfc;_0x54e4c3++)_0x5cecb0['insertRows'](_0x4fe3ca,{'at':_0x387587});return _0x4fe3ca['getChild'](_0x387587)['getChild'](_0x1b05a2);}['_resetContentOfSelectedTableCells'](_0xcdfceb,_0x29dca8){const {plugins:_0x17a8e6}=this['editor'],{model:_0x1c6886}=_0xcdfceb;if(!_0x17a8e6['has']('TableUtils'))return;_0x17a8e6['get']('TableUtils')['getSelectedTableCells'](_0x29dca8)['length']&&_0x1c6886['deleteContent'](_0x29dca8);}}class E extends _0x7adea3{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x4b94b4('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x56b298){super(_0x56b298),this['name']='AIRequestError';}}function i(_0x563116,_0xaf216c,_0x91352e){const t=_0x563116['t'];switch(_0xaf216c){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',_0x91352e);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x91352e);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'},_0x91352e);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 _0xaf216c;}}class j extends _0x3b6a8a{['_commandDefinitions'];constructor(_0x21fe14,_0x3b0771){super(_0x21fe14),this['_commandDefinitions']=_0x3b0771,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x116fd1,_0x48dc68,_0x762801)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x762801));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x52e16c,_0x4c9a9a,_0x2f7cb2)=>{this['enabledCommandsIds']=_0x2f7cb2?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x2de213=this['editor']['model'];this['_hasContext']=function(_0x8d051b){const _0x590f41=_0x8d051b['document']['selection'];return _0x590f41['isCollapsed']?0x0!==[..._0x590f41['getSelectedBlocks']()]['length']&&![..._0x590f41['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x8d051b['hasContent'](_0x590f41['getFirstRange']());}(_0x2de213);const _0x19bfdf=_0x2de213['document']['selection'],_0x91eda6=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x16bbc5 of _0x19bfdf['getRanges']())for(const _0xb9f7d3 of _0x16bbc5['getItems']())if(_0xb9f7d3['is']('element')&&_0x91eda6['includes'](_0xb9f7d3['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x228a5d='',_0xcfa752='',_0x4dbe9b='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x228a5d,_0xcfa752,_0x4dbe9b);}}function G(_0x3cca38,_0x54d503){const _0x160e8a=new Set();for(const _0x21956f of _0x3cca38['values']())(_0x54d503||!0x1===_0x21956f['requiresContent'])&&_0x160e8a['add'](_0x21956f['id']);return Array['from'](_0x160e8a);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x17517c(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x10b9fb,_0x248a5,_0x48bd42){super(),this['editor']=_0x10b9fb,this['textAdapter']=_0x248a5,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x48bd42,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x5bcc91,_0x1d153c,_0x1bebce)=>{this['view']['value']=this['_sanitizeHTML'](_0x1bebce);}),this['listenTo'](this['view'],'submitPrompt',(_0x2be477,_0x5441ab)=>{const _0xafb987=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x5441ab,_0xafb987,'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:_0x141f04,query:_0xb3970e,htmlContent:_0xad8108,label:_0x3ca2e1,mainActionLabel:_0x1c6bb5}){this['view']['prompt']=_0x3ca2e1,this['view']['mainAction']=_0x1c6bb5,this['initialContext']=_0xad8108,_0xb3970e&&(this['view']['isRendered']?this['_handleQuery'](_0xb3970e,_0xad8108,_0x141f04,_0x3ca2e1):this['view']['once']('render',()=>{this['_handleQuery'](_0xb3970e,_0xad8108,_0x141f04,_0x3ca2e1);}));}['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'](_0x3abdfd,_0x342116,_0x3c649f,_0x773618){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x342116,this['previousQuery']=_0x3abdfd,this['previousLabel']=_0x773618||_0x3abdfd,this['previousActionId']=_0x3c649f,new Promise(_0x48599b=>{this['textAdapter']['makeRequest']({'query':_0x3abdfd,'context':_0x342116,'onData':_0x1a6ef0=>{this['currentResponse']=_0x1a6ef0,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x3c649f})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x1718db=>{_0x1718db instanceof R?this['view']['handleError'](_0x1718db['message']):this['view']['handleError'](),_0x48599b();})['finally'](()=>{this['stopProcessing'](),_0x48599b();});});}['_parseAndNormalizeContent'](_0x2bc45a,_0x39d94a=!0x1){const _0x57c131=Z['exec'](_0x2bc45a);_0x2bc45a=_0x57c131?_0x2bc45a['substring'](_0x57c131[0x1]['length']):_0x2bc45a['length']<0x64&&!_0x39d94a?'':this['_stripMarkdownSyntax'](_0x2bc45a);const _0x2e11d0=this['_domParser']['parseFromString'](_0x2bc45a,'text/html');if(_0x57c131){const _0x64eaee=Array['from'](_0x2e11d0['body']['childNodes']);_0x64eaee['reverse']();for(const _0x4aa63d of _0x64eaee){if(_0x4aa63d['nodeType']==Node['ELEMENT_NODE'])break;_0x4aa63d['remove']();}}const _0x41a8cf=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x2e11d0['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x41a8cf);const _0x1b8ca7=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x1ed01e=this['editor']['data']['toModel'](_0x41a8cf);return _0x1b8ca7||_0x1ed01e['markers']['clear'](),this['editor']['data']['stringify'](_0x1ed01e);}['_normalizeResponseHeadings'](_0x381185){const _0x1e3330=new _0x3a80d0(this['editor']['editing']['view']['document']),_0x48372b=new _0x10d983({'name':/^h[1-5]$/}),_0x5a5360=[];let _0x621fef=!0x1;for(const _0x2c8070 of _0x381185)_0x2c8070['is']('element')&&_0x48372b['match'](_0x2c8070)&&(_0x5a5360['push'](_0x2c8070),'h1'==_0x2c8070['name']&&(_0x621fef=!0x0));if(_0x621fef){for(const _0x3843a6 of _0x5a5360)_0x1e3330['rename']('h'+(parseInt(_0x3843a6['name'][0x1])+0x1),_0x3843a6);}}['_isH1TagSupportEnabled'](){const {data:_0x25d4b8,editing:_0x540bcc}=this['editor'],_0x451781=_0x25d4b8['htmlProcessor']['toView']('<h1></h1>'),_0x4607f0=_0x25d4b8['toView'](_0x25d4b8['toModel'](_0x451781));return!!_0x540bcc['view']['domConverter']['viewToDom'](_0x4607f0)['querySelector']('h1');}['_sanitizeHTML'](_0x434229){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x434229),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x5beb19){const _0x4a238f=_0x5beb19['trim']();return _0x4a238f['startsWith']('```html')?_0x4a238f['endsWith']('```')?_0x4a238f['substring'](0x7,_0x4a238f['length']-0x3):_0x4a238f['substring'](0x7):_0x5beb19;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x344837){super(_0x344837),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x163ad8=>i(_0x344837,'AI_'+_0x163ad8['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x344837,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x344837,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x344837,'Stop'));const _0x410af2=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x410af2['if']('isVisible','ck-hidden',_0x7081ef=>!_0x7081ef)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x1a7a09,_0x1f711f){const _0x24769b=new _0x2ec46c(this['locale']);return _0x24769b['set']({'label':_0x1a7a09,'class':_0x1f711f||'','isVisible':!0x0,'withText':!0x0}),_0x24769b;}}class Y extends _0x1264d7{['contentFieldView'];['copyButtonView'];constructor(_0x6e042e,_0x5e654b=''){super(_0x6e042e),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1f83a8=this['bindTemplate'];this['contentFieldView']=new At(_0x6e042e,_0x5e654b),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x1f83a8['if']('isVisible','ck-hidden',_0xac916d=>!_0xac916d)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x1f83a8['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 _0x1683cf=!0x1;this['on']('change:value',(_0x31fcc5,_0x1ea66c,_0x337da4)=>{const _0x40f1bc=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x337da4),this['isProcessing']&&_0x40f1bc&&!_0x1683cf&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x114809,_0x2900ea,_0x1bc6f4)=>{_0x1683cf=!0x1,_0x1bc6f4?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x1683cf=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x1683cf=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x335359=this['locale'],_0x25c513=new _0x2ec46c(this['locale']),_0x53a716='ck-ai-form__copy-button';return _0x25c513['set']({'label':i(_0x335359,'Copy'),'icon':_0x873a7d,'class':_0x53a716,'tooltip':!0x0}),_0x25c513['bind']('isVisible')['to'](this,'value',_0x103c83=>!!_0x103c83),_0x25c513['bind']('isEnabled')['to'](this,'isProcessing',_0x4d2ef4=>!_0x4d2ef4),_0x25c513['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x25c513['icon']=_0x4303e4,_0x25c513['class']=_0x53a716+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x25c513['icon']=_0x873a7d,_0x25c513['class']=_0x53a716;},0x3e8);}),_0x25c513;}['_copyHTMLToClipboard'](_0x3cf4d3){const {window:_0x543bc8,document:_0x8c0a55}=_0x39d775;if(_0x543bc8['ClipboardItem']){const {Blob:_0x39ef5d,ClipboardItem:_0x27a2bc}=_0x543bc8,_0x251095=[new _0x27a2bc({'text/html':new _0x39ef5d([_0x3cf4d3['innerHTML']],{'type':'text/html'}),'text/plain':new _0x39ef5d([_0x3cf4d3['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x251095);}else{const _0x16aa93=_0x8c0a55['createElement']('div');_0x16aa93['style']['position']='absolute',_0x16aa93['style']['left']='-9999px',_0x16aa93['innerHTML']='<span>[</span>'+_0x3cf4d3['innerHTML']+'<span>]</span>',_0x8c0a55['body']['appendChild'](_0x16aa93);const _0x215dc6=_0x8c0a55['createRange']();_0x215dc6['setStartAfter'](_0x16aa93['firstElementChild']),_0x215dc6['setEndBefore'](_0x16aa93['lastElementChild']);const _0x5e09ec=_0x543bc8['getSelection']();_0x5e09ec['removeAllRanges'](),_0x5e09ec['addRange'](_0x215dc6),_0x8c0a55['execCommand']('copy'),_0x16aa93['remove']();}}}class At extends _0x1264d7{constructor(_0x7f6647,_0x473497=''){super(_0x7f6647),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x473497,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x4862be){this['element']['innerHTML']=_0x4862be;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x21c893=new _0x1264d7(),_0x468032=this['locale'],_0x13e595=new _0x408141();return _0x13e595['isVisible']=!0x0,_0x21c893['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x13e595,{'text':i(_0x468032,'AI\x20is\x20writing...')}]}),_0x21c893['render'](),_0x21c893;}}class st extends _0x1264d7{constructor(_0x3b9732,_0x576126=''){super(_0x3b9732);const _0x4bd1f9=new rt(),_0x5a4c95=this['bindTemplate'];this['set']('text',_0x576126),_0x4bd1f9['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4bd1f9,{'text':_0x5a4c95['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x21603d,_0x53ad91){super(_0x21603d,_0x53ad91),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',(_0x4e58be,_0x596e7c)=>{_0x4e58be['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x596e7c());});}['_createSubmitButton'](){const _0x4615a7=new _0x2ec46c(this['locale']),_0x531749=this['locale'];return _0x4615a7['set']({'icon':ht,'label':i(_0x531749,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x4615a7['on']('execute',()=>{this['submit']();}),_0x4615a7['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x11b4f3,_0x1d4dd9)=>!_0x11b4f3&&_0x1d4dd9),_0x4615a7;}['_createShowHistoryButton'](){const _0x3e3fab=new _0x2ec46c(this['locale']),_0x267d3e=this['resultsView'],_0x99a934=this['locale'];_0x3e3fab['set']({'label':i(_0x99a934,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x3e3fab['bind']('isOn')['to'](_0x267d3e,'isVisible'),_0x3e3fab['bind']('isEnabled')['to'](this,'isEnabled'),_0x3e3fab['on']('execute',()=>{_0x267d3e['isVisible']=!_0x267d3e['isVisible'],_0x267d3e['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x8b9f20=()=>{_0x39d775['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x19183b=new it(this['queryView']['fieldView']['element']),_0x346c48=_0x19183b['width'],_0x2c6a6a='rtl'===_0x99a934['uiLanguageDirection']?'left':'right';_0x19183b['excludeScrollbarsAndBorders'](),_0x3e3fab['element']['style'][_0x2c6a6a]=_0x346c48-_0x19183b['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x8b9f20),this['on']('render',_0x8b9f20),_0x3e3fab;}['submit'](){const _0x199a29=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x199a29);}['focus'](_0x157770){-0x1===_0x157770?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x4ad606){super(_0x4ad606),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x4ad606,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x1494b2=0x0;for(const _0x1bcf6f of this['items'])_0x1494b2+=_0x1bcf6f['items']['length'];return{'resultsCount':_0x1494b2,'totalItemsCount':_0x1494b2};}['_createClearHistoryButton'](){const _0x42e8ec=this['locale'],_0x4c598b=new _0x2ec46c(this['locale']);return _0x4c598b['set']({'label':'('+i(_0x42e8ec,'Clear')+')','withText':!0x0}),_0x4c598b['on']('execute',()=>this['fire']('clearHistory')),_0x4c598b;}}class bt extends xt{constructor(_0x481648){super();const _0x5cfbf2=new kt(),_0x3f9a0d=new _0x2ec46c(this['locale'],_0x5cfbf2);this['children']['add'](_0x3f9a0d),_0x3f9a0d['set']({'label':_0x481648['prompt'],'withText':!0x0}),_0x3f9a0d['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x481648['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x2f43ce{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x1b8089,_0x1c8006)=>{const _0x5b6060=os(_0x1c8006['prompt']);for(const _0x444935 of this)if(_0x444935!=_0x1c8006&&os(_0x444935['prompt'])===_0x5b6060){this['remove'](_0x444935);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x209156=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x209156));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x421669=>_0x421669)));}}function os(_0x5b5ae3){return _0x5b5ae3['toLowerCase']()['trim']();}class _ extends _0x1264d7{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x41e1a1,_0x3e3495,_0x3da092=''){super(_0x41e1a1),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 wt(),this['errorView']=new st(_0x41e1a1),this['contentArea']=new Y(_0x41e1a1,_0x3da092),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 mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'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 _0x104d2a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x3e3495],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x104d2a['if']('isError','ck-hidden',_0x568712=>!_0x568712)]},'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'](_0x5e1089=0x1){-0x1===_0x5e1089?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 _0x774d48=this['locale'],_0x50f858=new ct(_0x774d48,{'queryView':{'label':i(_0x774d48,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x774d48,'Empty\x20history'),'secondary':i(_0x774d48,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x50f858['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x28c512,_0x31e094)=>_0x28c512&&!_0x31e094),this['listenTo'](_0x50f858,'submit',(_0x1b4d6f,_0x5e8c38)=>{this['prompt']=_0x5e8c38;const _0x3e58a4=yt(_0x5e8c38);this['fire']('submitPrompt',_0x3e58a4),_0x5e8c38['trim']()&&this['_promptHistory']['add']({'prompt':_0x3e58a4},0x0);},{'priority':'high'}),_0x50f858;}['_createHistoryView'](){const _0x1306c5=new ft(this['locale']);return _0x1306c5['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x1306c5['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x1306c5;}['_createToolbar'](){const _0x16cb46=new lt(this['locale']);return _0x16cb46['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x58ef14,_0x51f38d,_0x44ec20)=>_0x58ef14&&!_0x51f38d&&!!_0x44ec20),_0x16cb46['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x16cb46['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2cd528,_0x5a8a26,_0x91fff8)=>_0x2cd528&&!_0x5a8a26&&!!_0x91fff8),_0x16cb46['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x16cb46['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1750c5,_0x29e486)=>_0x1750c5&&!_0x29e486),_0x16cb46['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x16cb46['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x16cb46['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x16cb46;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x1b9fa0=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x1b9fa0,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x100ea3){const _0x4bfb0b=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x100ea3||i(_0x4bfb0b,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x7adea3{['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[_0x978a8f,a,E,_0x3be14e];}constructor(_0xfa6ac7){super(_0xfa6ac7),_0xfa6ac7['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0xfa6ac7['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0xfa6ac7['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0xfa6ac7['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x804729}=this;this['_aiAdapter']=_0x804729['plugins']['get'](E),this['_dialog']=_0x804729['plugins']['get'](_0x3be14e),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x514b48=new j(_0x804729,Array['from'](this['_commandDefinitions']['values']()));_0x804729['commands']['add']('showAIAssistant',_0x514b48),_0x804729['ui']['componentFactory']['add']('aiCommands',_0x1931b8=>{const _0x2e7682=_0x14394a(_0x1931b8);return _0x2e7682['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x2e7682['buttonView']['set']({'label':i(_0x1931b8,'AI\x20Commands'),'icon':_0x2afa0d,'tooltip':!0x0}),_0x2e7682['on']('execute',_0xd784e2=>this['_onExecute'](_0xd784e2['source']['id'])),_0x40ab7a(_0x2e7682,_0x804729['ui']['view']['body'],function(_0x2b4707){const _0x36dc7a=o(_0x2b4707['config']['get']('ai.aiAssistant.commands'),_0x2b4707['locale']),_0x569bd6=U(_0x2b4707,_0x36dc7a)['filter'](_0x19a689=>_0x19a689['commands']['length']);if(0x1===_0x569bd6['length'])return U(_0x2b4707,_0x569bd6[0x0]['commands'])['map'](_0x13b0e3=>({'id':_0x13b0e3['id'],'label':_0x13b0e3['label']}));return _0x569bd6['map'](_0x5c67e4=>{const {groupId:_0x52bb8c,groupLabel:_0x127614,commands:_0x1d9076}=_0x5c67e4,_0x1d1eb6=U(_0x2b4707,_0x1d9076)['map'](_0x5b4da5=>({'id':_0x5b4da5['id'],'label':_0x5b4da5['label']}));return{'id':_0x52bb8c,'menu':_0x127614||_0x52bb8c,'children':_0x1d1eb6};});}(_0x804729),{'ariaLabel':i(_0x1931b8,'AI\x20Commands')}),_0x2e7682['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x514b48['on']('change:enabledCommandsIds',_0x5dec93),_0x2e7682['menuView']['once']('render',_0x5dec93),_0x2e7682;function _0x5dec93(){_0x2e7682['isEnabled']=_0x514b48['enabledCommandsIds']['length']>0x0;for(const _0xd3010b of _0x2e7682['menuView']['buttons'])_0xd3010b['isEnabled']=_0x514b48['enabledCommandsIds']['includes'](_0xd3010b['id']);}}),_0x804729['ui']['componentFactory']['add']('menuBar:aiCommands',_0x1e1f97=>{const _0x503ba9=new _0x1e3ae5(_0x1e1f97);_0x503ba9['buttonView']['set']({'label':i(_0x1e1f97,'AI\x20Commands'),'icon':_0x2afa0d}),_0x503ba9['bind']('isEnabled')['to'](_0x514b48,'enabledCommandsIds',_0x28108c=>_0x28108c['length']>0x0);const _0x40d7cf=o(_0x804729['config']['get']('ai.aiAssistant.commands'),_0x1e1f97);return this['_populateMenuBarMenu'](_0x514b48,_0x503ba9,_0x40d7cf,_0x3644a3=>this['_onExecute'](_0x3644a3)),_0x503ba9;}),_0x804729['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x1c2975=this['_createAIAssistantUIButton'](_0x2ec46c);return _0x1c2975['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x1c2975;}),_0x804729['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x3036f2=this['_createAIAssistantUIButton'](_0x5a418d);return _0x3036f2['set']({'role':'menuitemcheckbox'}),_0x3036f2;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3e093a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x15d2f6;for(const _0x44e76b in _0x3e093a){const _0x461682=_0x44e76b,_0x465a6c=_0x3e093a[_0x461682];if('aiLicenseKeyValid'==_0x465a6c||'aiLicenseKeyInvalid'==_0x465a6c||'aiLicenseKeyExpired'==_0x465a6c||'aiLicenseKeyDomainLimit'==_0x465a6c||'aiLicenseKeyNotAllowed'==_0x465a6c||'aiLicenseKeyEvaluationLimit'==_0x465a6c||'aiLicenseKeyTrialLimit'==_0x465a6c||'aiLicenseKeyUsageLimit'==_0x465a6c){delete _0x3e093a[_0x461682],_0x15d2f6=_0x465a6c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x15d2f6&&_0x3e093a['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x15d2f6&&_0x3e093a['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x15d2f6&&_0x3e093a['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x15d2f6&&_0x3e093a['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x15d2f6&&_0x3e093a['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x15d2f6&&_0x3e093a['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x15d2f6&&_0x3e093a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0xc5e4b6='',_0x486bb7='',_0x5a38d9='custom'){const _0x309f07=this['editor'],_0x4e9ef1=_0x309f07['editing']['view'],_0x1ea6ed=_0x309f07['plugins']['get'](a),_0x381244=_0x309f07['plugins']['get'](_0x978a8f);_0x1ea6ed['showFakeVisualSelection']();const _0x44205a=new w(),_0x478c75=new ClipboardEvent('copy',{'clipboardData':_0x44205a}),_0x4fcd3a=new _0x1e961d(_0x44205a),_0x4100c6=new _0x4a5fa8(_0x4e9ef1,_0x478c75,{'dataTransfer':_0x4fcd3a});_0x381244['_forceMarkersCopy']('comment',()=>{_0x4e9ef1['document']['fire']('copy',_0x4100c6);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x309f07,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x1a5bf8=_0x4fcd3a['getData']('text/html');const _0x437aed=_0x309f07['model']['document']['selection'],_0x10bd4f=Array['from'](_0x437aed['getRanges']());0x1===_0x10bd4f['length']&&_0x10bd4f[0x0]['isFlat']&&!_0x437aed['getSelectedElement']()&&''!==_0x1a5bf8['replace'](/ /g,'')['trim']()&&(_0x1a5bf8='<p>'+_0x1a5bf8+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x5a38d9,'query':_0xc5e4b6,'htmlContent':_0x1a5bf8,'label':_0x486bb7,'mainActionLabel':M[_0x309f07['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x119fc9,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x11e7de['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x1ea6ed['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x5b4a47=new Map(),_0x239831=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x45629b of _0x239831)for(const _0x3c62b0 of _0x45629b['commands'])_0x5b4a47['set'](_0x3c62b0['id'],{..._0x3c62b0,'groupId':_0x45629b['groupId'],'groupLabel':_0x45629b['groupLabel']||_0x45629b['groupId']});return _0x5b4a47;}['_createAIAssistantUIButton'](_0x1f2cb6){const _0x16817f=this['editor'],_0x3d5242=_0x16817f['commands']['get']('showAIAssistant'),_0x3b9be0=new _0x1f2cb6(_0x16817f['locale']);return _0x3b9be0['set']({'label':i(_0x16817f['locale'],'AI\x20Assistant'),'icon':_0x119fc9,'isToggleable':!0x0}),_0x3b9be0['bind']('isEnabled')['to'](_0x3d5242),_0x3b9be0['bind']('isOn')['to'](this['_dialog'],'id',_0x5eafab=>'aiAssistant'===_0x5eafab),this['listenTo'](_0x3b9be0,'execute',()=>{_0x3b9be0['isOn']?this['hideUI']():_0x3d5242['execute']();}),_0x3b9be0;}['_initView'](){const _0x20dbac=this['editor']['plugins']['get'](a);this['_formView']=new _(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',()=>{_0x20dbac['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x20dbac['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x4e9630,ui:{ariaLiveAnnouncer:_0x2188f6}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x1eeaec,_0x4a32ce,_0x98511c)=>{const _0x776e6f=this['_aiAssistantController']['currentContext'];_0x98511c?_0x2188f6['announce'](i(_0x4e9630,'AI\x20is\x20writing')):_0x776e6f&&_0x2188f6['announce'](i(_0x4e9630,'Generated\x20content:\x20%0',_0x776e6f),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x41f3e7,_0x4e3ef,_0x363481)=>{if(_0x363481){const _0x21ca47=this['_formView']['errorView']['text'];_0x2188f6['announce'](i(_0x4e9630,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x21ca47));}});}['_onExecute'](_0x141822){const _0xf275a5=this['_commandDefinitions']['get'](_0x141822),_0x46d6fe=this['editor'],_0x3e5903=_0x46d6fe['model']['document']['selection'],_0xec3fc=_0x46d6fe['commands']['get']('showAIAssistant'),_0x36f0f4=_0x46d6fe['plugins']['get'](a),_0x17b17d=''+(_0xf275a5['groupId']!==x?_0xf275a5['groupLabel']+':\x20':'')+_0xf275a5['label'];if(!0x1!==_0xf275a5['requiresContent']&&_0x3e5903['isCollapsed']){const _0x1be7aa=_0x54b721(_0x3e5903['getSelectedBlocks']())||_0x46d6fe['model']['schema']['getLimitElement'](_0x3e5903);_0x46d6fe['model']['change'](_0x2b8ea6=>{_0x2b8ea6['setSelection'](_0x1be7aa,'in');});}_0x36f0f4['showFakeVisualSelection'](),_0xec3fc['execute'](_0xf275a5['prompt'],_0x17b17d,'command:'+_0x141822);}['_populateMenuBarMenu'](_0x1c9f0e,_0xac2fc5,_0xf2c620,_0x2dbe9f){const _0x5c6469=this['editor'],_0x4dc98f=_0x5c6469['locale'],_0x223396=new _0x1152d8(_0x4dc98f),_0x36403c=U(_0x5c6469,_0xf2c620)['filter'](_0x13617e=>_0x13617e['commands']['length']);0x1===_0x36403c['length']?this['_getMenuBarGroupButtons']({'command':_0x1c9f0e,'commands':_0x36403c[0x0]['commands'],'parentMenuView':_0xac2fc5,'onExecute':_0x2dbe9f})['forEach'](_0x54fefa=>_0x223396['items']['add'](_0x54fefa)):_0x36403c['forEach'](({groupId:_0x1c5f94,groupLabel:_0x5de442,commands:_0x4cb296})=>{const _0x173bdd=new _0x127ed8(_0x4dc98f,_0xac2fc5),_0x23ad3b=new _0x1e3ae5(_0x4dc98f),_0x290ce1=new _0x1152d8(_0x4dc98f),_0x71638e=this['_getMenuBarGroupButtons']({'command':_0x1c9f0e,'commands':_0x4cb296,'parentMenuView':_0x23ad3b,'onExecute':_0x2dbe9f});_0x23ad3b['buttonView']['set']({'label':_0x5de442||_0x1c5f94}),_0x23ad3b['delegate']('execute')['to'](_0xac2fc5),_0x290ce1['items']['addMany'](_0x71638e),_0x23ad3b['panelView']['children']['add'](_0x290ce1),_0x173bdd['children']['add'](_0x23ad3b),_0x223396['items']['add'](_0x173bdd);}),_0xac2fc5['panelView']['children']['add'](_0x223396);}['_getMenuBarGroupButtons']({command:_0x16ae19,commands:_0x1daa04,parentMenuView:_0x33474f,onExecute:_0x2beeae}){const _0x5b3b41=this['editor'],_0x28a8c8=_0x5b3b41['locale'];return U(_0x5b3b41,_0x1daa04)['map'](_0x299699=>{const _0x4db381=new _0x127ed8(_0x28a8c8,_0x33474f),_0x5d1c34=new _0x5a418d(_0x28a8c8);return _0x5d1c34['set']({'label':_0x299699['label']}),_0x5d1c34['delegate']('execute')['to'](_0x33474f),_0x5d1c34['on']('execute',()=>_0x2beeae(_0x299699['id'])),_0x5d1c34['bind']('isEnabled')['to'](_0x16ae19,'enabledCommandsIds',_0x1d4664=>_0x1d4664['includes'](_0x299699['id'])),_0x4db381['children']['add'](_0x5d1c34),_0x4db381;});}}function B(_0x12f1df,_0x3377bf){return void 0x0!==_0x12f1df['order']&&void 0x0===_0x3377bf['order']?0x1:void 0x0===_0x12f1df['order']&&void 0x0!==_0x3377bf['order']?-0x1:void 0x0!==_0x12f1df['order']&&void 0x0!==_0x3377bf['order']?_0x12f1df['order']-_0x3377bf['order']:0x0;}function U(_0x414aef,_0xbf674e){_0xbf674e['sort'](B);const _0x45f497={},_0x304dee=[];for(const _0x40a1c3 of _0xbf674e)if(void 0x0!==_0x40a1c3['order']){if(_0x40a1c3['order']in _0x45f497)throw new _0x4b94b4('ai-commands-config-order-collision',_0x414aef,{'conflictingDefinitions':[_0x40a1c3,_0x45f497[_0x40a1c3['order']]]});_0x45f497[_0x40a1c3['order']]=_0x40a1c3,_0x304dee['splice'](_0x40a1c3['order'],0x0,_0x40a1c3);}else _0x304dee['push'](_0x40a1c3);return _0x304dee;}class r extends _0x7adea3{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x138bcb){super(_0x138bcb);const _0x385fa1=_0x138bcb['config'],_0x594e4e=_0x138bcb['locale'];_0x385fa1['define']('ai.aiAssistant.preserveComments',!0x0),_0x385fa1['define']('ai.aiAssistant.commands',function(_0x121688){return[{'groupId':'editOrReview','groupLabel':i(_0x121688,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x121688,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x121688,'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(_0x121688,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x121688,'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(_0x121688,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x121688,'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(_0x121688,'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(_0x121688,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x121688,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x121688,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x121688,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x121688,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x121688,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x121688,'Change\x20style'),'commands':[{'id':'business','label':i(_0x121688,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x121688,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x121688,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x121688,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x121688,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x121688,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x121688,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x121688,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x121688,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x121688,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x121688,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x121688,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x121688,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x594e4e)),_0x385fa1['define']('ai.aiAssistant.extraCommandGroups',[]),_0x385fa1['define']('ai.aiAssistant.removeCommands',[]);let _0x716cec=o(_0x385fa1['get']('ai.aiAssistant.commands'),_0x594e4e);const _0x5146df=_0x385fa1['get']('ai.aiAssistant.extraCommandGroups'),_0x194f7b=_0x385fa1['get']('ai.aiAssistant.removeCommands');_0x5146df['forEach'](_0x80b0b6=>{const _0x590898=_0x716cec['find'](_0x37eef5=>_0x37eef5['groupId']===_0x80b0b6['groupId']);_0x590898?_0x590898['commands']=_0x590898['commands']['concat'](_0x80b0b6['commands']):_0x716cec['push'](_0x80b0b6);}),_0x716cec=_0x716cec['filter'](_0x6cfe8e=>!_0x194f7b['includes'](_0x6cfe8e['groupId'])),_0x716cec['forEach'](_0x2d75b3=>{_0x2d75b3['commands']=_0x2d75b3['commands']['filter'](_0x2e1898=>!_0x194f7b['includes'](_0x2e1898['id']));}),_0x385fa1['set']('ai.aiAssistant.commands',_0x716cec);}}class P extends _0x7adea3{['abortController'];static get['requires'](){return[E];}constructor(_0x47a4ca){super(_0x47a4ca),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x20dfb8){return this['sendRequest'](_0x20dfb8)['catch'](_0x36ae97=>{if(_0x36ae97 instanceof R)return Promise['reject'](_0x36ae97);if('AbortError'==_0x36ae97['name'])return Promise['resolve']();throw console['error'](_0x36ae97),new _0x4b94b4('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1a153f,_0xc1224a){const _0xe4d0af=this['editor']['locale'],_0x43e188={'Content-Type':'application/json'};if('object'==typeof _0x1a153f)Object['assign'](_0x43e188,_0x1a153f);else{if(_0x1a153f)try{const _0x23daba=await _0x1a153f(_0xc1224a);Object['assign'](_0x43e188,_0x23daba);}catch(_0x4f2ae3){return Promise['reject'](new R(i(_0xe4d0af,'AI_ERROR_GET_HEADERS')));}}return _0x43e188;}async['_prepareRequestParameters'](_0x16be38,_0xa6173a){const _0x37eb32=this['editor']['locale'];if('object'==typeof _0x16be38)return _0x16be38;try{return await _0x16be38(_0xa6173a);}catch(_0x140879){return Promise['reject'](new R(i(_0x37eb32,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x5cb773){super(_0x5cb773),_0x5cb773['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x5cb773['config']['get']('ai.openAI.requestParameters')||_0x5cb773['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x5cb773['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x5cb773['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x5cb773['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x55150a,context:_0x35cf97,onData:_0x252017,actionId:_0x19a90d}){const _0x48bc52=this['editor']['locale'],_0x2075bf=await this['prepareMessages'](_0x55150a,_0x35cf97,_0x19a90d),_0x444293=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x19a90d),_0xcaf265=await this['_prepareRequestParameters'](this['_requestParameters'],_0x19a90d),_0x27a67a={'messages':_0x2075bf,..._0xcaf265},_0x10fc35={'method':'POST','headers':_0x444293,'body':JSON['stringify'](_0x27a67a),'signal':this['abortController']['signal']},_0x5a4b2c=await fetch(this['_apiUrl'],_0x10fc35);if(_0x5a4b2c['ok'])return _0xcaf265['stream']?await this['_readStreamableResponse'](_0x5a4b2c,_0x252017):await this['_readStaticResponse'](_0x5a4b2c,_0x252017),Promise['resolve']();{const _0x2855e1=await _0x5a4b2c['text']();return _0x2855e1['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x48bc52,'AI_ERROR_CONTEXT_LENGTH'))):_0x2855e1['includes']('Moderation')?Promise['reject'](new R(i(_0x48bc52,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x2855e1));}}async['prepareMessages'](_0xbbaca7,_0x1f1c7e,_0x1efb89){let _0x29fefd,_0x589dcf;return _0x1f1c7e?(_0x29fefd='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.',_0x589dcf='Instruction:\x0a'+_0xbbaca7+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x1f1c7e):(_0x29fefd='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.',_0x589dcf=_0xbbaca7),[{'role':'system','content':_0x29fefd},{'role':'user','content':_0x589dcf}];}async['_readStreamableResponse'](_0x2001a3,_0x57b263){const _0x4ad512=_0x2001a3['body']['getReader'](),_0x1293a6=new TextDecoder();let _0x55d570='',_0x9590cd='',_0xc8de50='',_0x142c3b=!0x1;for(;!_0x142c3b;){const {done:_0x28cb3e,value:_0x43696b}=await _0x4ad512['read'](),_0x9819d2=_0x55d570+_0x1293a6['decode'](_0x43696b);let _0x5e8bfe='';_0x142c3b=_0x28cb3e;try{_0x5e8bfe=this['_cleanUpData'](_0x9819d2),_0x55d570='';}catch(_0x5b89b0){_0x55d570=_0x9819d2;continue;}_0x9590cd+=_0x5e8bfe,!_0x142c3b&&this['_isBufferIncomplete'](_0x9590cd)||_0x9590cd&&(_0xc8de50+=_0x9590cd,_0x9590cd='',_0x57b263(_0xc8de50));}return Promise['resolve']();}async['_readStaticResponse'](_0x1a7d44,_0x429636){return _0x429636((await _0x1a7d44['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x1eaa18){const _0x1dc34d=_0x1eaa18['split']('<')['length']!==_0x1eaa18['split']('>')['length'],_0x4cbe1b=_0x1eaa18['length']<0x1e;return _0x1dc34d&&_0x4cbe1b;}['_cleanUpData'](_0x2515f1){return _0x2515f1['split'](/\n(?![^{]*\})/g)['map'](_0xc5745=>_0xc5745['replace']('data:\x20',''))['filter'](_0x1eb384=>_0x1eb384&&_0x1eb384['length']>0x0&&'[DONE]'!==_0x1eb384)['map'](_0xe78d13=>{const {choices:_0x56a85c}=JSON['parse'](_0xe78d13);if(_0x56a85c[0x0]?.['delta']?.['content'])return _0x56a85c[0x0]['delta']['content'];})['filter'](_0x1d6720=>_0x1d6720)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x2d1ebb){super(_0x2d1ebb),_0x2d1ebb['config']['get']('ai.aws.requestParameters')||_0x2d1ebb['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']=_0x2d1ebb['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x2d1ebb['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x2d1ebb['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x2d1ebb['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x3803f5,context:_0x3562de,onData:_0x1b57f0,actionId:_0x2f2d25}){const {model:_0x56092a,stream:_0x3d0134,..._0x53bbe4}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x2f2d25),_0x2401ea={'prompt':await this['preparePrompt'](_0x3803f5,_0x3562de,_0x56092a,_0x2f2d25),..._0x53bbe4};this['_apiUrl']?await this['_processProxyRequest'](_0x2401ea,_0x56092a,_0x3d0134,_0x1b57f0,_0x2f2d25):await this['_processAWSRequest'](_0x2401ea,_0x56092a,_0x3d0134,_0x1b57f0);}async['preparePrompt'](_0x1092af,_0x155361,_0x43e61f,_0x31e58e){let _0x66c790,_0x544ea4;return _0x155361?(_0x66c790='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.',_0x544ea4='Instruction:\x0a'+_0x1092af+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x155361):(_0x66c790='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.',_0x544ea4=_0x1092af),'meta.llama'==this['getModelFamily'](_0x43e61f)?'<<SYS>>\x0a'+_0x66c790+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x544ea4+'\x0a[/INST]':'Human:\x0a'+_0x66c790+'\x0a'+_0x544ea4+'\x0a\x0aAssistant:';}['getModelFamily'](_0x4c9ca2){if(/^anthropic\.claude/['test'](_0x4c9ca2))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x4c9ca2))return'ai21.j2';if(/^cohere\.command/['test'](_0x4c9ca2))return'cohere.command';if(/^meta\.llama/['test'](_0x4c9ca2))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x4c9ca2));}async['_processProxyRequest'](_0x23b4de,_0x22c719,_0x5932ab,_0x2d853f,_0x1c5b9d){const _0x2bbc6f={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1c5b9d),'body':JSON['stringify']({..._0x23b4de,'model':_0x22c719,'stream':_0x5932ab}),'signal':this['abortController']['signal']},_0x43652e=await fetch(this['_apiUrl'],_0x2bbc6f);_0x5932ab?await this['_readStreamableResponse'](_0x43652e,_0x22c719,_0x2d853f):await this['_readStaticResponse'](_0x43652e,_0x22c719,_0x2d853f);}async['_processAWSRequest'](_0x4db2f1,_0x41848d,_0x3d5cc6,_0x50fdb9){const _0x210d7b=new _0x2214ed(this['_bedrockClientConfig']),_0x11aded={'body':JSON['stringify'](_0x4db2f1),'contentType':'application/json','accept':'application/json','modelId':_0x41848d};let _0x1011cf;if(_0x3d5cc6){const _0xa5bd80=new _0x64cc60(_0x11aded);_0x1011cf=await _0x210d7b['send'](_0xa5bd80,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x1011cf,_0x41848d,_0x50fdb9);}else{const _0x24ec29=new _0x247505(_0x11aded);_0x1011cf=await _0x210d7b['send'](_0x24ec29,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x1011cf,_0x41848d,_0x50fdb9);}}async['_readAsyncIterableResponse'](_0x4153fb,_0x3ea3f6,_0x11ccdf){const _0x3ffd3a=_0x4153fb['body'],_0x17d5b5=new TextDecoder('utf-8');let _0x1b0f0f='';for await(const _0x35ce3e of _0x3ffd3a)if(_0x35ce3e['chunk']){const _0x38352c=_0x17d5b5['decode'](_0x35ce3e['chunk']['bytes']),_0x19d40c=JSON['parse'](_0x38352c);_0x1b0f0f+=this['_getGeneratedText'](_0x19d40c,_0x3ea3f6),_0x11ccdf(_0x1b0f0f);}return Promise['resolve']();}async['_readStreamableResponse'](_0x2047e2,_0x28fa99,_0x1354f1){const _0x5eae15=_0x2047e2['body'],_0x19d615=new TextDecoder('utf-8'),_0x49a6a3=_0x5eae15['getReader']();let _0x2a8854='',_0x3a89dc='',_0x46995e=!0x1;for(;!_0x46995e;){const {done:_0x30e138,value:_0x47c2aa}=await _0x49a6a3['read']();if(_0x46995e=_0x30e138,_0x46995e)break;const _0x2f13da=(_0x2a8854+_0x19d615['decode'](_0x47c2aa))['split']('\x0a')['map'](_0x1b6c04=>{try{return _0x2a8854='',JSON['parse'](_0x1b6c04);}catch(_0x49c9c3){return _0x2a8854=_0x1b6c04,null;}})['filter'](_0x3acb75=>null!==_0x3acb75);_0x2f13da['length']&&(_0x3a89dc+=_0x2f13da['map'](_0x5def85=>this['_getGeneratedText'](_0x5def85,_0x28fa99))['join'](''),_0x1354f1(_0x3a89dc));}return Promise['resolve']();}async['_readStaticResponse'](_0x3001dd,_0x27c656,_0x8c81b4){let _0x1e3285;return _0x1e3285=_0x3001dd instanceof Response?await _0x3001dd['json']():JSON['parse'](Buffer['from'](_0x3001dd['body'])['toString']('utf8')),(_0x8c81b4(this['_getGeneratedText'](_0x1e3285,_0x27c656)),Promise['resolve']());}['_getGeneratedText'](_0x368536,_0x3b9e3e){switch(this['getModelFamily'](_0x3b9e3e)){case'anthropic.claude':return _0x368536['completion'];case'ai21.j2':return _0x368536['completions'][0x0]['data']['text'];case'cohere.command':return _0x368536['generations'][0x0]['text'];case'meta.llama':return _0x368536['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O as OpenAITextAdapter};
|
package/dist/translations/af.js
CHANGED
|
@@ -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':
|
|
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':_0x329444=>0x1!=_0x329444}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x39fb85=>{const {af:{dictionary:_0x506cb8,getPluralForm:_0x1aed18}}={'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':_0x3b0952=>0x1!=_0x3b0952}};_0x39fb85['af']||={'dictionary':{},'getPluralForm':null},_0x39fb85['af']['dictionary']=Object['assign'](_0x39fb85['af']['dictionary'],_0x506cb8),_0x39fb85['af']['getPluralForm']=_0x1aed18;})(window['CKEDITOR_TRANSLATIONS']||={});
|
package/dist/translations/ar.js
CHANGED
|
@@ -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':
|
|
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':_0x2032c2=>0x0==_0x2032c2?0x0:0x1==_0x2032c2?0x1:0x2==_0x2032c2?0x2:_0x2032c2%0x64>=0x3&&_0x2032c2%0x64<=0xa?0x3:_0x2032c2%0x64>=0xb?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x33cab5=>{const {ar:{dictionary:_0x189093,getPluralForm:_0x40bd7c}}={'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':_0x440c9d=>0x0==_0x440c9d?0x0:0x1==_0x440c9d?0x1:0x2==_0x440c9d?0x2:_0x440c9d%0x64>=0x3&&_0x440c9d%0x64<=0xa?0x3:_0x440c9d%0x64>=0xb?0x4:0x5}};_0x33cab5['ar']||={'dictionary':{},'getPluralForm':null},_0x33cab5['ar']['dictionary']=Object['assign'](_0x33cab5['ar']['dictionary'],_0x189093),_0x33cab5['ar']['getPluralForm']=_0x40bd7c;})(window['CKEDITOR_TRANSLATIONS']||={});
|