@ckeditor/ckeditor5-ai 45.2.1-alpha.0 → 45.2.1-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 _0x531b45,Command as _0x1c1b82}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x24d8f8,IconCheck as _0x72670d,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x4d7744,IconRobotPencil as _0x1c7c08}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x2f946,CKEditorError as _0x1e61c4,ObservableMixin as _0x25c188,global as _0x18be66,isVisible as ot,Rect as it,Collection as _0x10eb80,FocusTracker as mt,KeystrokeHandler as ut,first as _0x161878}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x268947,View as _0x516553,SpinnerView as _0x570508,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 _0x27a6d7,createDropdown as _0x5acee9,addMenuToDropdown as _0x672582,MenuBarMenuView as _0x229453,MenuBarMenuListItemButtonView as _0x53d4bd,DialogViewPosition as _0x581a47,MenuBarMenuListView as _0x124379,MenuBarMenuListItemView as _0x19f0b9}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x34ca72,ClipboardMarkersUtils as _0x24c74c}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x3ec06c,DataTransfer as _0x3e8b65,UpcastWriter as _0x223770,Matcher as _0x578196}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x1d004b,InvokeModelWithResponseStreamCommand as _0x13aa97,InvokeModelCommand as _0x77422d}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x3016c2,_0x1542c0){const _0x29b282=(0x0,_0x1542c0['t'])('Other');return _0x3016c2['length']?'groupId'in _0x3016c2[0x0]?_0x3016c2:[{'groupId':x,'groupLabel':_0x29b282,'order':0x1/0x0,'commands':_0x3016c2}]:[{'groupId':x,'groupLabel':_0x29b282,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x531b45{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2ef201}=this,_0x392c04=['ck-fake-ai-selection'];_0x2ef201['config']['get']('ai.useTheme')&&_0x392c04['push']('ck-ai-assistant-ui_theme'),_0x2ef201['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x392c04,'priority':0xc}}),_0x2ef201['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x389f86,{writer:_0x2d6ad})=>{if(!_0x389f86['markerRange']['isCollapsed'])return null;const _0x4a2bf1=_0x2d6ad['createUIElement']('span');return _0x2d6ad['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x4a2bf1),_0x4a2bf1;}});}['afterInit'](){!async function(_0x48997){const _0x4f7f7d=_0x33e648([0x43,0x31,0x78,0x6b,0x47,0x41,0x4c,0x37,0x30,0x4e,0x76,0x42,0x6d,0x50,0x56,0x39,0x72,0x53,0x54,0x45,0x64,0x6a,0x4b,0x63,0x4a,0x32,0x59,0x35,0x48,0x74,0x69,0x55,0x62,0x44,0x52,0x75,0x33,0x79,0x36,0x6c,0x57,0x6e,0x5a,0x7a,0x49,0x70,0x77,0x71,0x51,0x4d,0x67,0x65,0x6f,0x61,0x38,0x34,0x58,0x66,0x46,0x68,0x4f,0x73]),_0x4280a4=0xa05fd98,_0x6ec8e6=0xa029738^_0x4280a4,_0x28b9cd=window[_0x33e648([0x44,0x61,0x74,0x65])][_0x33e648([0x6e,0x6f,0x77])](),_0x14da10=_0x48997[_0x33e648([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x38b50c=new window[(_0x33e648([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x250a5d=>{_0x14da10[_0x33e648([0x6f,0x6e,0x63,0x65])](_0x33e648([0x72,0x65,0x61,0x64,0x79]),_0x250a5d);}),_0x4df41e={[_0x33e648([0x6b,0x74,0x79])]:_0x33e648([0x45,0x43]),[_0x33e648([0x75,0x73,0x65])]:_0x33e648([0x73,0x69,0x67]),[_0x33e648([0x63,0x72,0x76])]:_0x33e648([0x50,0x2d,0x32,0x35,0x36]),[_0x33e648([0x78])]:_0x33e648([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]),[_0x33e648([0x79])]:_0x33e648([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]),[_0x33e648([0x61,0x6c,0x67])]:_0x33e648([0x45,0x53,0x32,0x35,0x36])},_0x554882=_0x14da10[_0x33e648([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x33e648([0x67,0x65,0x74])](_0x33e648([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x879405(){let _0x307004,_0x3ae4f3=null,_0x2f8e86=null;try{if(_0x554882==_0x33e648([0x47,0x50,0x4c]))return _0x33e648([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x307004=_0x31d042(),!_0x307004)return _0x33e648([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x307004[_0x33e648([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f8e86=_0x18539e(_0x307004[_0x33e648([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x307004[_0x33e648([0x6a,0x74,0x69])])),await _0x3c9ec0()?_0x23287e()?_0x4ec98d()?_0x33e648([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3a7321()?(_0x307004[_0x33e648([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x33e648([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3ae4f3=_0x44a171(_0x33e648([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x307004[_0x33e648([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x33e648([0x74,0x72,0x69,0x61,0x6c])&&(_0x3ae4f3=_0x44a171(_0x33e648([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3c13c7()):_0x33e648([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x33e648([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x33e648([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x33e648([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4ec98d(){const _0x5581bb=[_0x33e648([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x33e648([0x74,0x72,0x69,0x61,0x6c])][_0x33e648([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x307004[_0x33e648([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x28b9cd/0x3e8:0xe10*_0x6ec8e6;return _0x307004[_0x33e648([0x65,0x78,0x70])]<_0x5581bb;}function _0x23287e(){const _0x531c4=_0x307004[_0x33e648([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x531c4&&(!!_0x531c4[_0x33e648([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33e648([0x2a]))||!!_0x531c4[_0x33e648([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33e648([0x41,0x49])));}function _0x3a7321(){const _0x565759=_0x307004[_0x33e648([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x565759||0x0==_0x565759[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1db220}=new URL(window[_0x33e648([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x565759[_0x33e648([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1db220))return!0x0;const _0x218139=_0x1db220[_0x33e648([0x73,0x70,0x6c,0x69,0x74])](_0x33e648([0x2e]));return _0x565759[_0x33e648([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x46239f=>_0x46239f[_0x33e648([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33e648([0x2a])))[_0x33e648([0x6d,0x61,0x70])](_0x17b266=>_0x17b266[_0x33e648([0x73,0x70,0x6c,0x69,0x74])](_0x33e648([0x2e])))[_0x33e648([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x7b69e0=>_0x7b69e0[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x218139[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x33e648([0x6d,0x61,0x70])](_0x56c812=>Array(_0x218139[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x56c812[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x33e648([0x66,0x69,0x6c,0x6c])](_0x56c812[0x0]===_0x33e648([0x2a])?_0x33e648([0x2a]):'')[_0x33e648([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x56c812))[_0x33e648([0x73,0x6f,0x6d,0x65])](_0x5ce430=>_0x218139[_0x33e648([0x65,0x76,0x65,0x72,0x79])]((_0x400d19,_0x96679b)=>_0x5ce430[_0x96679b]===_0x400d19||_0x5ce430[_0x96679b]===_0x33e648([0x2a])));}function _0x3c13c7(){return _0x3ae4f3&&_0x2f8e86?new window[(_0x33e648([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x17291a,_0x1998fb)=>{_0x3ae4f3[_0x33e648([0x74,0x68,0x65,0x6e])](_0x17291a,_0x1998fb),_0x2f8e86[_0x33e648([0x74,0x68,0x65,0x6e])](_0x18e27d=>{_0x18e27d!=_0x33e648([0x56,0x61,0x6c,0x69,0x64])&&_0x17291a(_0x18e27d);},_0x1998fb);}):_0x3ae4f3||_0x2f8e86||_0x33e648([0x56,0x61,0x6c,0x69,0x64]);}}function _0x18539e(_0x425d17,_0x2d62e1){return new window[(_0x33e648([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x97d814=>{if(_0x34bb85())return _0x97d814(_0x33e648([0x56,0x61,0x6c,0x69,0x64]));_0x57ddf9(),_0x14da10[_0x33e648([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x33e648([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x526818=!0x1;const _0x1875a1=_0x2f946();function _0x148eb8(_0x301c73){return!!_0x301c73&&(typeof _0x301c73===_0x33e648([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x301c73===_0x33e648([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x301c73[_0x33e648([0x74,0x68,0x65,0x6e])]===_0x33e648([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x301c73[_0x33e648([0x63,0x61,0x74,0x63,0x68])]===_0x33e648([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x262df2(_0x4a881b){_0x629e3b(_0x4a881b)[_0x33e648([0x74,0x68,0x65,0x6e])](_0x2b3223=>{if(!_0x2b3223||_0x2b3223[_0x33e648([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x33e648([0x6f,0x6b]))return _0x33e648([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3cf6cc(_0x1c8855(_0x1875a1+_0x2d62e1))!=_0x2b3223[_0x33e648([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x33e648([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x33e648([0x56,0x61,0x6c,0x69,0x64]);})[_0x33e648([0x74,0x68,0x65,0x6e])](_0x501851=>(_0x39e48d(),_0x501851),()=>{const _0x499d6c=_0xa444b8();return null==_0x499d6c?(_0x39e48d(),_0x33e648([0x56,0x61,0x6c,0x69,0x64])):_0x33e648(_0x28b9cd-_0x499d6c>(0x2e097998^_0x4280a4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x33e648([0x74,0x68,0x65,0x6e])](_0x97d814)[_0x33e648([0x63,0x61,0x74,0x63,0x68])](()=>{_0x97d814(_0x33e648([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x44b5a8=0xa331318^_0x4280a4;function _0x39e48d(){const _0x13e4be=_0x33e648([0x6c,0x6c,0x63,0x74,0x2d])+_0x3cf6cc(_0x1c8855(_0x425d17)),_0x271f5d=_0x1f959b(_0x3cf6cc(window[_0x33e648([0x4d,0x61,0x74,0x68])][_0x33e648([0x63,0x65,0x69,0x6c])](_0x28b9cd/_0x44b5a8)));window[_0x33e648([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x33e648([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x13e4be,_0x271f5d);}function _0xa444b8(){const _0xd82853=_0x33e648([0x6c,0x6c,0x63,0x74,0x2d])+_0x3cf6cc(_0x1c8855(_0x425d17)),_0x24452a=window[_0x33e648([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x33e648([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd82853);return _0x24452a?window[_0x33e648([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f959b(_0x24452a),0x10)*_0x44b5a8:null;}function _0x629e3b(_0x2a4c49){return new window[(_0x33e648([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x51d0b8,_0x269d89)=>{_0x2a4c49[_0x33e648([0x74,0x68,0x65,0x6e])](_0x51d0b8,_0x269d89),window[_0x33e648([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x269d89,0xa042958^_0x4280a4);});}}_0x14da10[_0x33e648([0x6f,0x6e])](_0x33e648([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5b553c,_0x32e66e)=>{if(_0x32e66e[0x0]!=_0x425d17)return _0x97d814(_0x33e648([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x32e66e[0x1]={..._0x32e66e[0x1],[_0x33e648([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1875a1};},{[_0x33e648([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x33e648([0x68,0x69,0x67,0x68])}),_0x14da10[_0x33e648([0x6f,0x6e])](_0x33e648([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xe55b1=>{_0x148eb8(_0xe55b1[_0x33e648([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x526818=!0x0,_0x262df2(_0xe55b1[_0x33e648([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x33e648([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x33e648([0x6c,0x6f,0x77])}),_0x38b50c[_0x33e648([0x74,0x68,0x65,0x6e])](()=>{_0x526818||_0x97d814(_0x33e648([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x34bb85(){return _0x14da10[_0x33e648([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33e648([0x76,0x69,0x65,0x77])][_0x33e648([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x33e648([0x61,0x75,0x74,0x6f]);}function _0x57ddf9(){_0x14da10[_0x33e648([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33e648([0x76,0x69,0x65,0x77])][_0x33e648([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x33e648([0x61,0x75,0x74,0x6f]);}}function _0x44a171(_0x29aa93){const _0x4bee19=[new window[(_0x33e648([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x452742=>setTimeout(_0x452742,0xa0cc354^_0x4280a4)),_0x38b50c[_0x33e648([0x74,0x68,0x65,0x6e])](()=>new window[(_0x33e648([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2914cd=>{let _0xaf4ff8=0x0;_0x14da10[_0x33e648([0x6d,0x6f,0x64,0x65,0x6c])][_0x33e648([0x6f,0x6e])](_0x33e648([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x13320c,_0x1618fb)=>{_0x1618fb[0x0][_0x33e648([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xaf4ff8++,_0xaf4ff8==(0xa05fc60^_0x4280a4)&&(_0x2914cd(),_0x13320c[_0x33e648([0x6f,0x66,0x66])]());});}))];return window[_0x33e648([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x33e648([0x72,0x61,0x63,0x65])](_0x4bee19)[_0x33e648([0x74,0x68,0x65,0x6e])](()=>_0x29aa93);}async function _0x47bced(){await _0x38b50c,_0x14da10[_0x33e648([0x6d,0x6f,0x64,0x65,0x6c])][_0x33e648([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4d3523,_0x14da10[_0x33e648([0x6d,0x6f,0x64,0x65,0x6c])][_0x33e648([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4d3523,_0x14da10[_0x33e648([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x33e648([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x10df8a(_0x13f357){const _0x5e4ad2=_0x5843cf();_0x14da10[_0x5e4ad2]=_0x33e648([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x13f357,_0x13f357!=_0x33e648([0x56,0x61,0x6c,0x69,0x64])&&_0x47bced();}function _0x5843cf(){const _0x29ee4a=window[_0x33e648([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x33e648([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x33e648([0x6e,0x6f,0x77])]())[_0x33e648([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x33e648([0x2e]),'');let _0x4f04c9=_0x33e648([0x43]);for(let _0x3be602=0x0;_0x3be602<_0x29ee4a[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3be602+=0x2){let _0x35a02d=window[_0x33e648([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29ee4a[_0x33e648([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3be602,_0x3be602+0x2));_0x35a02d>=_0x4f7f7d[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x35a02d-=_0x4f7f7d[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4f04c9+=_0x4f7f7d[_0x35a02d];}return _0x4f04c9;}function _0x31d042(){const _0x5d2c1c=_0x554882[_0x33e648([0x73,0x70,0x6c,0x69,0x74])](_0x33e648([0x2e]));if(0x3!=_0x5d2c1c[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2946eb(_0x5d2c1c[0x1]);function _0x2946eb(_0x363584){const _0x435cef=_0x1378d7(_0x363584);return _0x435cef&&_0x1f49f6()?_0x435cef:null;function _0x1f49f6(){const _0x4c357=_0x435cef[_0x33e648([0x6a,0x74,0x69])],_0x30ea5f=window[_0x33e648([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4c357[_0x33e648([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4c357[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5d2b66={..._0x435cef,[_0x33e648([0x6a,0x74,0x69])]:_0x4c357[_0x33e648([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4c357[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5d2b66[_0x33e648([0x76,0x63])],_0x1c8855(_0x5d2b66)==_0x30ea5f;}}}async function _0x3c9ec0(){let _0x1f68b5=!0x0;try{const _0x7ae3a1=_0x554882[_0x33e648([0x73,0x70,0x6c,0x69,0x74])](_0x33e648([0x2e])),[_0x1538b6,_0x38f51b,_0x497451]=_0x7ae3a1;return _0x4426bf(_0x1538b6),await _0x32b227(_0x1538b6,_0x38f51b,_0x497451),_0x1f68b5;}catch{return!0x1;}function _0x4426bf(_0x1eaf2e){const _0x82c842=_0x1378d7(_0x1eaf2e);_0x82c842&&_0x82c842[_0x33e648([0x61,0x6c,0x67])]==_0x33e648([0x45,0x53,0x32,0x35,0x36])||(_0x1f68b5=!0x1);}async function _0x32b227(_0x30ceb0,_0x46a61d,_0x37cdf4){const _0x2104ae=window[_0x33e648([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x33e648([0x66,0x72,0x6f,0x6d])](_0x5916a4(_0x37cdf4),_0x2a5adc=>_0x2a5adc[_0x33e648([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3f93d0=new window[(_0x33e648([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x33e648([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x30ceb0+_0x33e648([0x2e])+_0x46a61d),_0x4ca84b=window[_0x33e648([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x33e648([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4ca84b)return;const _0x9702ef=await _0x4ca84b[_0x33e648([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x33e648([0x6a,0x77,0x6b]),_0x4df41e,{[_0x33e648([0x6e,0x61,0x6d,0x65])]:_0x33e648([0x45,0x43,0x44,0x53,0x41]),[_0x33e648([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x33e648([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x33e648([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4ca84b[_0x33e648([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x33e648([0x6e,0x61,0x6d,0x65])]:_0x33e648([0x45,0x43,0x44,0x53,0x41]),[_0x33e648([0x68,0x61,0x73,0x68])]:{[_0x33e648([0x6e,0x61,0x6d,0x65])]:_0x33e648([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x9702ef,_0x2104ae,_0x3f93d0)||(_0x1f68b5=!0x1);}}function _0x1378d7(_0x32f563){return _0x32f563[_0x33e648([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x33e648([0x65,0x79]))?JSON[_0x33e648([0x70,0x61,0x72,0x73,0x65])](_0x5916a4(_0x32f563)):null;}function _0x5916a4(_0x24f670){return window[_0x33e648([0x61,0x74,0x6f,0x62])](_0x24f670[_0x33e648([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x33e648([0x2b]))[_0x33e648([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x33e648([0x2f])));}function _0x1c8855(_0x25196c){let _0x5b4923=0x1505;function _0x177415(_0x351bcd){for(let _0x4a1c6d=0x0;_0x4a1c6d<_0x351bcd[_0x33e648([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4a1c6d++){const _0x15115f=_0x351bcd[_0x33e648([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4a1c6d);_0x5b4923=(_0x5b4923<<0x5)+_0x5b4923+_0x15115f,_0x5b4923&=_0x5b4923;}}function _0x1ea12c(_0x59ac83){Array[_0x33e648([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x59ac83)?_0x59ac83[_0x33e648([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1ea12c):_0x59ac83&&typeof _0x59ac83==_0x33e648([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x33e648([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x59ac83)[_0x33e648([0x73,0x6f,0x72,0x74])]()[_0x33e648([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4d2ebf,_0x185ee9])=>{_0x177415(_0x4d2ebf),_0x1ea12c(_0x185ee9);}):_0x177415(window[_0x33e648([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x59ac83));}return _0x1ea12c(_0x25196c),_0x5b4923>>>0x0;}function _0x3cf6cc(_0x5ba21b){return _0x5ba21b[_0x33e648([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x33e648([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x33e648([0x30]));}function _0x1f959b(_0x4afbbf){return _0x4afbbf[_0x33e648([0x73,0x70,0x6c,0x69,0x74])]('')[_0x33e648([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x33e648([0x6a,0x6f,0x69,0x6e])]('');}function _0x4d3523(){}function _0x33e648(_0x2e2e14){return _0x2e2e14['map'](_0x22d18c=>String['fromCharCode'](_0x22d18c))['join']('');}_0x10df8a(await _0x879405());}(this);}['showFakeVisualSelection'](){const _0x4e9ccf=this['editor']['model'];_0x4e9ccf['change'](_0x495557=>{const _0x50751f=_0x4e9ccf['document']['selection']['getRanges']();let _0x1c7c28=0x0;for(const _0x13de9d of _0x50751f){const _0x32cc5d=f+':'+_0x1c7c28;if(_0x4e9ccf['markers']['has'](_0x32cc5d))_0x495557['updateMarker'](_0x32cc5d,{'range':_0x13de9d});else{if(_0x13de9d['start']['isAtEnd']){const _0x2a3846=_0x13de9d['start']['getLastMatchingPosition'](({item:_0x12c023})=>!_0x4e9ccf['schema']['isContent'](_0x12c023),{'boundaries':_0x13de9d});_0x495557['addMarker'](_0x32cc5d,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x495557['createRange'](_0x2a3846,_0x13de9d['end'])});}else _0x495557['addMarker'](_0x32cc5d,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x13de9d});}_0x1c7c28++;}});}['hideFakeVisualSelection'](){const _0x43e4dd=this['editor']['model'],_0xc63e83=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0xc63e83['length']&&_0x43e4dd['change'](_0x38dbc4=>{_0xc63e83['forEach'](_0x103b2a=>{_0x38dbc4['removeMarker'](_0x103b2a);});});}['insertContent'](_0x200a6a,_0x3a860f){const _0x24b908=this['_getAISelection'](),_0x373001=_0x3a860f||_0x24b908['getFirstRange']();this['editor']['model']['canEditAt'](_0x373001)&&this['editor']['model']['change'](_0x2c9164=>{this['hideFakeVisualSelection'](),_0x3a860f||this['_resetContentOfSelectedTableCells'](_0x2c9164,_0x24b908),this['_pasteHTMLUsingClipboard']({'insertAt':_0x373001,'writer':_0x2c9164,'html':_0x200a6a});});}['insertContentBelow'](_0x3a6d6d){const {model:_0x25e1a0}=this['editor'],_0x1e41d6=this['_getAISelection']();_0x25e1a0['change'](()=>{const _0x5f2f3e=this['_prepareTableInsertBelowPosition'](_0x3a6d6d,_0x1e41d6)||this['_getDefaultInsertBelowPosition'](_0x1e41d6);this['insertContent'](_0x3a6d6d,_0x5f2f3e);});}['_getAISelection'](){const _0x5cd05b=this['editor']['model'],_0x3354a5=Array['from'](_0x5cd05b['markers']['getMarkersGroup'](f))['map'](_0x25c4cc=>_0x25c4cc['getRange']());return _0x5cd05b['createSelection'](_0x3354a5);}['_pasteHTMLUsingClipboard']({writer:_0x4202a3,html:_0xe5930,insertAt:_0x5f0b4c}){const {view:_0x163e47}=this['editor']['editing'],_0x249916=this['editor']['plugins']['get'](_0x34ca72),_0x1c7a8d=new gt();_0x1c7a8d['setData']('text/html',_0xe5930);const _0x26d032=new ClipboardEvent('paste',{'clipboardData':_0x1c7a8d}),_0x943225=new _0x3ec06c(_0x163e47,_0x26d032,{'dataTransfer':new _0x3e8b65(_0x1c7a8d)});_0x4202a3['setSelection'](_0x5f0b4c);const _0x4d5919=(_0x475a08,_0x40aeda)=>{_0x40aeda['resultRange']&&_0x4202a3['setSelection'](_0x40aeda['resultRange']);};_0x249916['once']('contentInsertion',_0x4d5919,{'priority':'lowest'}),_0x163e47['document']['fire']('paste',_0x943225),_0x249916['off']('contentInsertion',_0x4d5919);}['_getDefaultInsertBelowPosition'](_0x4d911f){const {model:_0x5b91f8}=this['editor'],_0x383cae=Array['from'](_0x4d911f['getSelectedBlocks']());return _0x383cae['length']?_0x5b91f8['createPositionAfter'](_0x383cae['pop']()):_0x4d911f['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x53b713,_0x52e968){const {model:_0x528117,plugins:_0x2c5fae}=this['editor'];if(_0x2c5fae['has']('TableUtils')){const _0x2bd711=_0x2c5fae['get']('TableUtils')['getSelectedTableCells'](_0x52e968);if(_0x2bd711['length']){const _0x3472f8=this['_getTableRowCountFromContent'](_0x53b713),_0x4a9269=this['_createEmptyTableRows'](_0x2bd711,_0x3472f8);return _0x528117['createPositionAt'](_0x4a9269,0x0);}}return null;}['_getTableRowCountFromContent'](_0x287320){const _0x34345a=this['editor']['plugins']['get']('TableUtils'),_0x270bfb=this['editor']['data']['parse'](_0x287320),_0x184744=Array['from'](_0x270bfb['getChildren']())['filter'](_0x33a598=>_0x33a598['is']('element','table'));let _0x4f1bef=0x0;return _0x184744['forEach'](_0x121c08=>{_0x4f1bef+=_0x34345a['getRows'](_0x121c08);}),_0x4f1bef;}['_createEmptyTableRows'](_0x23a146,_0xf1ce88){const _0x18019c=this['editor']['plugins']['get']('TableUtils'),_0x1c54bd=_0x18019c['getRowIndexes'](_0x23a146),_0x3f0588=_0x18019c['getColumnIndexes'](_0x23a146),_0x2709be=_0x1c54bd['last']+0x1,_0x26205c=_0x3f0588['first'],_0x486425=_0x23a146[0x0]['findAncestor']('table');for(let _0x1facf8=0x0;_0x1facf8<_0xf1ce88;_0x1facf8++)_0x18019c['insertRows'](_0x486425,{'at':_0x2709be});return _0x486425['getChild'](_0x2709be)['getChild'](_0x26205c);}['_resetContentOfSelectedTableCells'](_0x54cf35,_0x2b2d42){const {plugins:_0x172a43}=this['editor'],{model:_0x3ca55f}=_0x54cf35;if(!_0x172a43['has']('TableUtils'))return;_0x172a43['get']('TableUtils')['getSelectedTableCells'](_0x2b2d42)['length']&&_0x3ca55f['deleteContent'](_0x2b2d42);}}class E extends _0x531b45{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x1e61c4('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x20ac59){super(_0x20ac59),this['name']='AIRequestError';}}function i(_0x39ac21,_0x3d33ec,_0x572302){const t=_0x39ac21['t'];switch(_0x3d33ec){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',_0x572302);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x572302);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'},_0x572302);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 _0x3d33ec;}}class j extends _0x1c1b82{['_commandDefinitions'];constructor(_0xcfbd9a,_0x4299a4){super(_0xcfbd9a),this['_commandDefinitions']=_0x4299a4,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x1f1c38,_0xff6474,_0xaf5170)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0xaf5170));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x4ad7c2,_0x3a08d6,_0x996eab)=>{this['enabledCommandsIds']=_0x996eab?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x5f47ac=this['editor']['model'];this['_hasContext']=function(_0x209592){const _0x78ab6d=_0x209592['document']['selection'];return _0x78ab6d['isCollapsed']?0x0!==[..._0x78ab6d['getSelectedBlocks']()]['length']&&![..._0x78ab6d['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x209592['hasContent'](_0x78ab6d['getFirstRange']());}(_0x5f47ac);const _0x1cb538=_0x5f47ac['document']['selection'],_0x4b14be=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x1ac6dd of _0x1cb538['getRanges']())for(const _0x232bcb of _0x1ac6dd['getItems']())if(_0x232bcb['is']('element')&&_0x4b14be['includes'](_0x232bcb['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x37f7ce='',_0x310528='',_0x2700b6='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x37f7ce,_0x310528,_0x2700b6);}}function G(_0x56a2f7,_0x847947){const _0x149e6e=new Set();for(const _0x158f9a of _0x56a2f7['values']())(_0x847947||!0x1===_0x158f9a['requiresContent'])&&_0x149e6e['add'](_0x158f9a['id']);return Array['from'](_0x149e6e);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x25c188(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x4f8f32,_0x3e71d1,_0xa079e8){super(),this['editor']=_0x4f8f32,this['textAdapter']=_0x3e71d1,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0xa079e8,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x3921ff,_0x57abeb,_0x7d761e)=>{this['view']['value']=this['_sanitizeHTML'](_0x7d761e);}),this['listenTo'](this['view'],'submitPrompt',(_0x2ca970,_0x5c1dd4)=>{const _0xf344f7=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x5c1dd4,_0xf344f7,'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:_0x23f7b5,query:_0x3e1a47,htmlContent:_0xd5e979,label:_0x4437bd,mainActionLabel:_0x42b653}){this['view']['prompt']=_0x4437bd,this['view']['mainAction']=_0x42b653,this['initialContext']=_0xd5e979,_0x3e1a47&&(this['view']['isRendered']?this['_handleQuery'](_0x3e1a47,_0xd5e979,_0x23f7b5,_0x4437bd):this['view']['once']('render',()=>{this['_handleQuery'](_0x3e1a47,_0xd5e979,_0x23f7b5,_0x4437bd);}));}['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'](_0x524977,_0x3ca4e0,_0x349c0e,_0x4ec82f){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x3ca4e0,this['previousQuery']=_0x524977,this['previousLabel']=_0x4ec82f||_0x524977,this['previousActionId']=_0x349c0e,new Promise(_0xe170a7=>{this['textAdapter']['makeRequest']({'query':_0x524977,'context':_0x3ca4e0,'onData':_0x27800f=>{this['currentResponse']=_0x27800f,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x349c0e})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x430ab5=>{_0x430ab5 instanceof R?this['view']['handleError'](_0x430ab5['message']):this['view']['handleError'](),_0xe170a7();})['finally'](()=>{this['stopProcessing'](),_0xe170a7();});});}['_parseAndNormalizeContent'](_0x16f1d6,_0x4c65cb=!0x1){const _0x4eecc3=Z['exec'](_0x16f1d6);_0x16f1d6=_0x4eecc3?_0x16f1d6['substring'](_0x4eecc3[0x1]['length']):_0x16f1d6['length']<0x64&&!_0x4c65cb?'':this['_stripMarkdownSyntax'](_0x16f1d6);const _0x8a98b0=this['_domParser']['parseFromString'](_0x16f1d6,'text/html');if(_0x4eecc3){const _0x452822=Array['from'](_0x8a98b0['body']['childNodes']);_0x452822['reverse']();for(const _0x2c4890 of _0x452822){if(_0x2c4890['nodeType']==Node['ELEMENT_NODE'])break;_0x2c4890['remove']();}}const _0x48612c=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x8a98b0['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x48612c);const _0x4d15ba=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x10186e=this['editor']['data']['toModel'](_0x48612c);return _0x4d15ba||_0x10186e['markers']['clear'](),this['editor']['data']['stringify'](_0x10186e);}['_normalizeResponseHeadings'](_0x467f34){const _0x303dc0=new _0x223770(this['editor']['editing']['view']['document']),_0x4d188b=new _0x578196({'name':/^h[1-5]$/}),_0x4f3ad4=[];let _0x2a0944=!0x1;for(const _0x4e42cb of _0x467f34)_0x4e42cb['is']('element')&&_0x4d188b['match'](_0x4e42cb)&&(_0x4f3ad4['push'](_0x4e42cb),'h1'==_0x4e42cb['name']&&(_0x2a0944=!0x0));if(_0x2a0944){for(const _0x1e4ab9 of _0x4f3ad4)_0x303dc0['rename']('h'+(parseInt(_0x1e4ab9['name'][0x1])+0x1),_0x1e4ab9);}}['_isH1TagSupportEnabled'](){const {data:_0x3306be,editing:_0x4ed461}=this['editor'],_0x28d302=_0x3306be['htmlProcessor']['toView']('<h1></h1>'),_0x2edd72=_0x3306be['toView'](_0x3306be['toModel'](_0x28d302));return!!_0x4ed461['view']['domConverter']['viewToDom'](_0x2edd72)['querySelector']('h1');}['_sanitizeHTML'](_0x47e3a0){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x47e3a0),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x1e56c4){const _0x51b3eb=_0x1e56c4['trim']();return _0x51b3eb['startsWith']('```html')?_0x51b3eb['endsWith']('```')?_0x51b3eb['substring'](0x7,_0x51b3eb['length']-0x3):_0x51b3eb['substring'](0x7):_0x1e56c4;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x377d45){super(_0x377d45),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x51353f=>i(_0x377d45,'AI_'+_0x51353f['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x377d45,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x377d45,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x377d45,'Stop'));const _0x2f6aaf=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x2f6aaf['if']('isVisible','ck-hidden',_0x2249ee=>!_0x2249ee)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x15dc29,_0x509cb6){const _0x1e31fc=new _0x268947(this['locale']);return _0x1e31fc['set']({'label':_0x15dc29,'class':_0x509cb6||'','isVisible':!0x0,'withText':!0x0}),_0x1e31fc;}}class Y extends _0x516553{['contentFieldView'];['copyButtonView'];constructor(_0x5e8a89,_0x3c608b=''){super(_0x5e8a89),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x89dce6=this['bindTemplate'];this['contentFieldView']=new At(_0x5e8a89,_0x3c608b),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x89dce6['if']('isVisible','ck-hidden',_0x55607a=>!_0x55607a)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x89dce6['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 _0x36abe2=!0x1;this['on']('change:value',(_0x2418cf,_0x216bc4,_0x2d728f)=>{const _0x6f08e5=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x2d728f),this['isProcessing']&&_0x6f08e5&&!_0x36abe2&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x57e343,_0x24eff7,_0x37b329)=>{_0x36abe2=!0x1,_0x37b329?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x36abe2=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x36abe2=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x3ea914=this['locale'],_0x215b2e=new _0x268947(this['locale']),_0x28fc68='ck-ai-form__copy-button';return _0x215b2e['set']({'label':i(_0x3ea914,'Copy'),'icon':_0x24d8f8,'class':_0x28fc68,'tooltip':!0x0}),_0x215b2e['bind']('isVisible')['to'](this,'value',_0x2b22a6=>!!_0x2b22a6),_0x215b2e['bind']('isEnabled')['to'](this,'isProcessing',_0xf278ea=>!_0xf278ea),_0x215b2e['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x215b2e['icon']=_0x72670d,_0x215b2e['class']=_0x28fc68+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x215b2e['icon']=_0x24d8f8,_0x215b2e['class']=_0x28fc68;},0x3e8);}),_0x215b2e;}['_copyHTMLToClipboard'](_0x6dd4f3){const {window:_0x463705,document:_0x1c0c27}=_0x18be66;if(_0x463705['ClipboardItem']){const {Blob:_0x5a3553,ClipboardItem:_0x46594b}=_0x463705,_0x1b8b1f=[new _0x46594b({'text/html':new _0x5a3553([_0x6dd4f3['innerHTML']],{'type':'text/html'}),'text/plain':new _0x5a3553([_0x6dd4f3['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x1b8b1f);}else{const _0x256f02=_0x1c0c27['createElement']('div');_0x256f02['style']['position']='absolute',_0x256f02['style']['left']='-9999px',_0x256f02['innerHTML']='<span>[</span>'+_0x6dd4f3['innerHTML']+'<span>]</span>',_0x1c0c27['body']['appendChild'](_0x256f02);const _0x518ffb=_0x1c0c27['createRange']();_0x518ffb['setStartAfter'](_0x256f02['firstElementChild']),_0x518ffb['setEndBefore'](_0x256f02['lastElementChild']);const _0x59e0b4=_0x463705['getSelection']();_0x59e0b4['removeAllRanges'](),_0x59e0b4['addRange'](_0x518ffb),_0x1c0c27['execCommand']('copy'),_0x256f02['remove']();}}}class At extends _0x516553{constructor(_0x25feb8,_0x216be1=''){super(_0x25feb8),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x216be1,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x1e68fa){this['element']['innerHTML']=_0x1e68fa;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x17f064=new _0x516553(),_0x5cb5f7=this['locale'],_0xd1b92c=new _0x570508();return _0xd1b92c['isVisible']=!0x0,_0x17f064['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0xd1b92c,{'text':i(_0x5cb5f7,'AI\x20is\x20writing...')}]}),_0x17f064['render'](),_0x17f064;}}class st extends _0x516553{constructor(_0xcfddc4,_0x2951db=''){super(_0xcfddc4);const _0x2db59a=new rt(),_0xfa6fd3=this['bindTemplate'];this['set']('text',_0x2951db),_0x2db59a['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x2db59a,{'text':_0xfa6fd3['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x28636b,_0x31b621){super(_0x28636b,_0x31b621),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',(_0xf8886d,_0x2aeb2b)=>{_0xf8886d['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2aeb2b());});}['_createSubmitButton'](){const _0x4c0522=new _0x268947(this['locale']),_0x47c34d=this['locale'];return _0x4c0522['set']({'icon':ht,'label':i(_0x47c34d,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x4c0522['on']('execute',()=>{this['submit']();}),_0x4c0522['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x4312c9,_0x3be4fd)=>!_0x4312c9&&_0x3be4fd),_0x4c0522;}['_createShowHistoryButton'](){const _0x3ef6ad=new _0x268947(this['locale']),_0x51bff0=this['resultsView'],_0x33d80a=this['locale'];_0x3ef6ad['set']({'label':i(_0x33d80a,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x3ef6ad['bind']('isOn')['to'](_0x51bff0,'isVisible'),_0x3ef6ad['bind']('isEnabled')['to'](this,'isEnabled'),_0x3ef6ad['on']('execute',()=>{_0x51bff0['isVisible']=!_0x51bff0['isVisible'],_0x51bff0['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x7bb73c=()=>{_0x18be66['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x3e7aa4=new it(this['queryView']['fieldView']['element']),_0x4ee349=_0x3e7aa4['width'],_0xcc61cd='rtl'===_0x33d80a['uiLanguageDirection']?'left':'right';_0x3e7aa4['excludeScrollbarsAndBorders'](),_0x3ef6ad['element']['style'][_0xcc61cd]=_0x4ee349-_0x3e7aa4['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x7bb73c),this['on']('render',_0x7bb73c),_0x3ef6ad;}['submit'](){const _0xce5f66=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0xce5f66);}['focus'](_0x41fb31){-0x1===_0x41fb31?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x44959b){super(_0x44959b),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x44959b,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x208eed=0x0;for(const _0x36e278 of this['items'])_0x208eed+=_0x36e278['items']['length'];return{'resultsCount':_0x208eed,'totalItemsCount':_0x208eed};}['_createClearHistoryButton'](){const _0x88ee0d=this['locale'],_0x45381f=new _0x268947(this['locale']);return _0x45381f['set']({'label':'('+i(_0x88ee0d,'Clear')+')','withText':!0x0}),_0x45381f['on']('execute',()=>this['fire']('clearHistory')),_0x45381f;}}class bt extends xt{constructor(_0x3caff1){super();const _0x1b5631=new kt(),_0x3004ee=new _0x268947(this['locale'],_0x1b5631);this['children']['add'](_0x3004ee),_0x3004ee['set']({'label':_0x3caff1['prompt'],'withText':!0x0}),_0x3004ee['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x3caff1['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x10eb80{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x226a04,_0x5f27e8)=>{const _0x4ce202=os(_0x5f27e8['prompt']);for(const _0x1357af of this)if(_0x1357af!=_0x5f27e8&&os(_0x1357af['prompt'])===_0x4ce202){this['remove'](_0x1357af);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x2d12d6=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x2d12d6));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x3da179=>_0x3da179)));}}function os(_0x29087b){return _0x29087b['toLowerCase']()['trim']();}class _ extends _0x516553{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x1defb9,_0x46e734,_0x377eba=''){super(_0x1defb9),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(_0x1defb9),this['contentArea']=new Y(_0x1defb9,_0x377eba),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 _0x3ce6c1=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x46e734],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x3ce6c1['if']('isError','ck-hidden',_0x311cd7=>!_0x311cd7)]},'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'](_0x3049c1=0x1){-0x1===_0x3049c1?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 _0x1e315e=this['locale'],_0x286fdd=new ct(_0x1e315e,{'queryView':{'label':i(_0x1e315e,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x1e315e,'Empty\x20history'),'secondary':i(_0x1e315e,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x286fdd['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x5728eb,_0x3014f1)=>_0x5728eb&&!_0x3014f1),this['listenTo'](_0x286fdd,'submit',(_0x26854b,_0x3f2299)=>{this['prompt']=_0x3f2299;const _0x4fc758=yt(_0x3f2299);this['fire']('submitPrompt',_0x4fc758),_0x3f2299['trim']()&&this['_promptHistory']['add']({'prompt':_0x4fc758},0x0);},{'priority':'high'}),_0x286fdd;}['_createHistoryView'](){const _0xef448a=new ft(this['locale']);return _0xef448a['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0xef448a['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0xef448a;}['_createToolbar'](){const _0x18b777=new lt(this['locale']);return _0x18b777['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x7a08a4,_0x5c8aad,_0x25a1b1)=>_0x7a08a4&&!_0x5c8aad&&!!_0x25a1b1),_0x18b777['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x18b777['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x1e6c8b,_0x3e0bd1,_0x84c6b8)=>_0x1e6c8b&&!_0x3e0bd1&&!!_0x84c6b8),_0x18b777['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x18b777['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x5dac28,_0x16873b)=>_0x5dac28&&!_0x16873b),_0x18b777['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x18b777['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x18b777['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x18b777;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x1b4427=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x1b4427,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x3aecea){const _0x2e8f01=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x3aecea||i(_0x2e8f01,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x531b45{['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[_0x24c74c,a,E,_0x27a6d7];}constructor(_0x1a7662){super(_0x1a7662),_0x1a7662['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x1a7662['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x1a7662['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x1a7662['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x4d072b}=this;this['_aiAdapter']=_0x4d072b['plugins']['get'](E),this['_dialog']=_0x4d072b['plugins']['get'](_0x27a6d7),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x191fe1=new j(_0x4d072b,Array['from'](this['_commandDefinitions']['values']()));_0x4d072b['commands']['add']('showAIAssistant',_0x191fe1),_0x4d072b['ui']['componentFactory']['add']('aiCommands',_0x1043b3=>{const _0x1afff2=_0x5acee9(_0x1043b3);return _0x1afff2['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x1afff2['buttonView']['set']({'label':i(_0x1043b3,'AI\x20Commands'),'icon':_0x4d7744,'tooltip':!0x0}),_0x1afff2['on']('execute',_0x4b8712=>this['_onExecute'](_0x4b8712['source']['id'])),_0x672582(_0x1afff2,_0x4d072b['ui']['view']['body'],function(_0x1be112){const _0x5cd6ce=o(_0x1be112['config']['get']('ai.aiAssistant.commands'),_0x1be112['locale']),_0x123e93=U(_0x1be112,_0x5cd6ce)['filter'](_0x21f464=>_0x21f464['commands']['length']);if(0x1===_0x123e93['length'])return U(_0x1be112,_0x123e93[0x0]['commands'])['map'](_0x5d5916=>({'id':_0x5d5916['id'],'label':_0x5d5916['label']}));return _0x123e93['map'](_0x960349=>{const {groupId:_0x482896,groupLabel:_0x118880,commands:_0x3e30fe}=_0x960349,_0x3bef85=U(_0x1be112,_0x3e30fe)['map'](_0xcf68ce=>({'id':_0xcf68ce['id'],'label':_0xcf68ce['label']}));return{'id':_0x482896,'menu':_0x118880||_0x482896,'children':_0x3bef85};});}(_0x4d072b),{'ariaLabel':i(_0x1043b3,'AI\x20Commands')}),_0x1afff2['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x191fe1['on']('change:enabledCommandsIds',_0x473c98),_0x1afff2['menuView']['once']('render',_0x473c98),_0x1afff2;function _0x473c98(){_0x1afff2['isEnabled']=_0x191fe1['enabledCommandsIds']['length']>0x0;for(const _0xde45de of _0x1afff2['menuView']['buttons'])_0xde45de['isEnabled']=_0x191fe1['enabledCommandsIds']['includes'](_0xde45de['id']);}}),_0x4d072b['ui']['componentFactory']['add']('menuBar:aiCommands',_0x52d91d=>{const _0x84626c=new _0x229453(_0x52d91d);_0x84626c['buttonView']['set']({'label':i(_0x52d91d,'AI\x20Commands'),'icon':_0x4d7744}),_0x84626c['bind']('isEnabled')['to'](_0x191fe1,'enabledCommandsIds',_0x3ff18a=>_0x3ff18a['length']>0x0);const _0x191c7a=o(_0x4d072b['config']['get']('ai.aiAssistant.commands'),_0x52d91d);return this['_populateMenuBarMenu'](_0x191fe1,_0x84626c,_0x191c7a,_0x157f65=>this['_onExecute'](_0x157f65)),_0x84626c;}),_0x4d072b['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x509590=this['_createAIAssistantUIButton'](_0x268947);return _0x509590['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x509590;}),_0x4d072b['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x29343d=this['_createAIAssistantUIButton'](_0x53d4bd);return _0x29343d['set']({'role':'menuitemcheckbox'}),_0x29343d;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4b4e79=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x523e7e;for(const _0x1407d in _0x4b4e79){const _0x5688e0=_0x1407d,_0x3100e6=_0x4b4e79[_0x5688e0];if('aiLicenseKeyValid'==_0x3100e6||'aiLicenseKeyInvalid'==_0x3100e6||'aiLicenseKeyExpired'==_0x3100e6||'aiLicenseKeyDomainLimit'==_0x3100e6||'aiLicenseKeyNotAllowed'==_0x3100e6||'aiLicenseKeyEvaluationLimit'==_0x3100e6||'aiLicenseKeyTrialLimit'==_0x3100e6||'aiLicenseKeyUsageLimit'==_0x3100e6){delete _0x4b4e79[_0x5688e0],_0x523e7e=_0x3100e6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x523e7e&&_0x4b4e79['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x523e7e&&_0x4b4e79['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x523e7e&&_0x4b4e79['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x523e7e&&_0x4b4e79['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x523e7e&&_0x4b4e79['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x523e7e&&_0x4b4e79['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x523e7e&&_0x4b4e79['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x5c94de='',_0x53efce='',_0x43a8ed='custom'){const _0x5c5556=this['editor'],_0x2dadc6=_0x5c5556['editing']['view'],_0x257043=_0x5c5556['plugins']['get'](a),_0x292e49=_0x5c5556['plugins']['get'](_0x24c74c);_0x257043['showFakeVisualSelection']();const _0x11c99c=new w(),_0x554141=new ClipboardEvent('copy',{'clipboardData':_0x11c99c}),_0x18dbf6=new _0x3e8b65(_0x11c99c),_0x58b524=new _0x3ec06c(_0x2dadc6,_0x554141,{'dataTransfer':_0x18dbf6});_0x292e49['_forceMarkersCopy']('comment',()=>{_0x2dadc6['document']['fire']('copy',_0x58b524);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x5c5556,this['_aiAdapter']['textAdapter'],this['_formView']));let _0xa3fec2=_0x18dbf6['getData']('text/html');const _0x2b68fa=_0x5c5556['model']['document']['selection'],_0x47f6e4=Array['from'](_0x2b68fa['getRanges']());0x1===_0x47f6e4['length']&&_0x47f6e4[0x0]['isFlat']&&!_0x2b68fa['getSelectedElement']()&&''!==_0xa3fec2['replace'](/ /g,'')['trim']()&&(_0xa3fec2='<p>'+_0xa3fec2+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x43a8ed,'query':_0x5c94de,'htmlContent':_0xa3fec2,'label':_0x53efce,'mainActionLabel':M[_0x5c5556['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x1c7c08,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x581a47['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x257043['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x248816=new Map(),_0xfacaf=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x311713 of _0xfacaf)for(const _0x18bf6e of _0x311713['commands'])_0x248816['set'](_0x18bf6e['id'],{..._0x18bf6e,'groupId':_0x311713['groupId'],'groupLabel':_0x311713['groupLabel']||_0x311713['groupId']});return _0x248816;}['_createAIAssistantUIButton'](_0x513bd9){const _0x398b92=this['editor'],_0x44b5f5=_0x398b92['commands']['get']('showAIAssistant'),_0x68a0f9=new _0x513bd9(_0x398b92['locale']);return _0x68a0f9['set']({'label':i(_0x398b92['locale'],'AI\x20Assistant'),'icon':_0x1c7c08,'isToggleable':!0x0}),_0x68a0f9['bind']('isEnabled')['to'](_0x44b5f5),_0x68a0f9['bind']('isOn')['to'](this['_dialog'],'id',_0x35c4f4=>'aiAssistant'===_0x35c4f4),this['listenTo'](_0x68a0f9,'execute',()=>{_0x68a0f9['isOn']?this['hideUI']():_0x44b5f5['execute']();}),_0x68a0f9;}['_initView'](){const _0x65c858=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',()=>{_0x65c858['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x65c858['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x55b395,ui:{ariaLiveAnnouncer:_0x42d77a}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x4acfe6,_0x5eff71,_0x3e06f3)=>{const _0x1c0b88=this['_aiAssistantController']['currentContext'];_0x3e06f3?_0x42d77a['announce'](i(_0x55b395,'AI\x20is\x20writing')):_0x1c0b88&&_0x42d77a['announce'](i(_0x55b395,'Generated\x20content:\x20%0',_0x1c0b88),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x4d0e33,_0x1cbab6,_0x1061c4)=>{if(_0x1061c4){const _0xac754f=this['_formView']['errorView']['text'];_0x42d77a['announce'](i(_0x55b395,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0xac754f));}});}['_onExecute'](_0x1d9147){const _0x57ab03=this['_commandDefinitions']['get'](_0x1d9147),_0x2a513d=this['editor'],_0x9c4b8f=_0x2a513d['model']['document']['selection'],_0x5c23a8=_0x2a513d['commands']['get']('showAIAssistant'),_0xef74f2=_0x2a513d['plugins']['get'](a),_0x2b47b2=''+(_0x57ab03['groupId']!==x?_0x57ab03['groupLabel']+':\x20':'')+_0x57ab03['label'];if(!0x1!==_0x57ab03['requiresContent']&&_0x9c4b8f['isCollapsed']){const _0x3a3bac=_0x161878(_0x9c4b8f['getSelectedBlocks']())||_0x2a513d['model']['schema']['getLimitElement'](_0x9c4b8f);_0x2a513d['model']['change'](_0x1b6273=>{_0x1b6273['setSelection'](_0x3a3bac,'in');});}_0xef74f2['showFakeVisualSelection'](),_0x5c23a8['execute'](_0x57ab03['prompt'],_0x2b47b2,'command:'+_0x1d9147);}['_populateMenuBarMenu'](_0x3706ee,_0x3648e3,_0x36c0b4,_0x3cb026){const _0x18bb5f=this['editor'],_0xcc1506=_0x18bb5f['locale'],_0x456593=new _0x124379(_0xcc1506),_0x3d7f29=U(_0x18bb5f,_0x36c0b4)['filter'](_0x1b42ce=>_0x1b42ce['commands']['length']);0x1===_0x3d7f29['length']?this['_getMenuBarGroupButtons']({'command':_0x3706ee,'commands':_0x3d7f29[0x0]['commands'],'parentMenuView':_0x3648e3,'onExecute':_0x3cb026})['forEach'](_0x37d2f1=>_0x456593['items']['add'](_0x37d2f1)):_0x3d7f29['forEach'](({groupId:_0x2145b3,groupLabel:_0x355ecb,commands:_0x39f11c})=>{const _0x1a116c=new _0x19f0b9(_0xcc1506,_0x3648e3),_0x30ca97=new _0x229453(_0xcc1506),_0x425c6b=new _0x124379(_0xcc1506),_0x233715=this['_getMenuBarGroupButtons']({'command':_0x3706ee,'commands':_0x39f11c,'parentMenuView':_0x30ca97,'onExecute':_0x3cb026});_0x30ca97['buttonView']['set']({'label':_0x355ecb||_0x2145b3}),_0x30ca97['delegate']('execute')['to'](_0x3648e3),_0x425c6b['items']['addMany'](_0x233715),_0x30ca97['panelView']['children']['add'](_0x425c6b),_0x1a116c['children']['add'](_0x30ca97),_0x456593['items']['add'](_0x1a116c);}),_0x3648e3['panelView']['children']['add'](_0x456593);}['_getMenuBarGroupButtons']({command:_0x15a4b7,commands:_0x1730e1,parentMenuView:_0x2ac04,onExecute:_0x10e9e8}){const _0x1e3e6a=this['editor'],_0x1d6cd6=_0x1e3e6a['locale'];return U(_0x1e3e6a,_0x1730e1)['map'](_0x56d3be=>{const _0xef649d=new _0x19f0b9(_0x1d6cd6,_0x2ac04),_0x1f15ea=new _0x53d4bd(_0x1d6cd6);return _0x1f15ea['set']({'label':_0x56d3be['label']}),_0x1f15ea['delegate']('execute')['to'](_0x2ac04),_0x1f15ea['on']('execute',()=>_0x10e9e8(_0x56d3be['id'])),_0x1f15ea['bind']('isEnabled')['to'](_0x15a4b7,'enabledCommandsIds',_0x982e9f=>_0x982e9f['includes'](_0x56d3be['id'])),_0xef649d['children']['add'](_0x1f15ea),_0xef649d;});}}function B(_0x133fa6,_0x1b1281){return void 0x0!==_0x133fa6['order']&&void 0x0===_0x1b1281['order']?0x1:void 0x0===_0x133fa6['order']&&void 0x0!==_0x1b1281['order']?-0x1:void 0x0!==_0x133fa6['order']&&void 0x0!==_0x1b1281['order']?_0x133fa6['order']-_0x1b1281['order']:0x0;}function U(_0x316788,_0x156517){_0x156517['sort'](B);const _0x22ae46={},_0x338696=[];for(const _0x421f14 of _0x156517)if(void 0x0!==_0x421f14['order']){if(_0x421f14['order']in _0x22ae46)throw new _0x1e61c4('ai-commands-config-order-collision',_0x316788,{'conflictingDefinitions':[_0x421f14,_0x22ae46[_0x421f14['order']]]});_0x22ae46[_0x421f14['order']]=_0x421f14,_0x338696['splice'](_0x421f14['order'],0x0,_0x421f14);}else _0x338696['push'](_0x421f14);return _0x338696;}class r extends _0x531b45{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1bd3b2){super(_0x1bd3b2);const _0x4c1059=_0x1bd3b2['config'],_0x1991f6=_0x1bd3b2['locale'];_0x4c1059['define']('ai.aiAssistant.preserveComments',!0x0),_0x4c1059['define']('ai.aiAssistant.commands',function(_0x272ee4){return[{'groupId':'editOrReview','groupLabel':i(_0x272ee4,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x272ee4,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x272ee4,'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(_0x272ee4,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x272ee4,'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(_0x272ee4,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x272ee4,'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(_0x272ee4,'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(_0x272ee4,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x272ee4,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x272ee4,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x272ee4,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x272ee4,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x272ee4,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x272ee4,'Change\x20style'),'commands':[{'id':'business','label':i(_0x272ee4,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x272ee4,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x272ee4,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x272ee4,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x272ee4,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x272ee4,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x272ee4,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x272ee4,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x272ee4,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x272ee4,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x272ee4,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x272ee4,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x272ee4,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x1991f6)),_0x4c1059['define']('ai.aiAssistant.extraCommandGroups',[]),_0x4c1059['define']('ai.aiAssistant.removeCommands',[]);let _0x5545da=o(_0x4c1059['get']('ai.aiAssistant.commands'),_0x1991f6);const _0xb1f0cc=_0x4c1059['get']('ai.aiAssistant.extraCommandGroups'),_0x2fc636=_0x4c1059['get']('ai.aiAssistant.removeCommands');_0xb1f0cc['forEach'](_0x4f1899=>{const _0x1b52b2=_0x5545da['find'](_0x238822=>_0x238822['groupId']===_0x4f1899['groupId']);_0x1b52b2?_0x1b52b2['commands']=_0x1b52b2['commands']['concat'](_0x4f1899['commands']):_0x5545da['push'](_0x4f1899);}),_0x5545da=_0x5545da['filter'](_0x3fec1f=>!_0x2fc636['includes'](_0x3fec1f['groupId'])),_0x5545da['forEach'](_0x377191=>{_0x377191['commands']=_0x377191['commands']['filter'](_0x235592=>!_0x2fc636['includes'](_0x235592['id']));}),_0x4c1059['set']('ai.aiAssistant.commands',_0x5545da);}}class P extends _0x531b45{['abortController'];static get['requires'](){return[E];}constructor(_0x2142d4){super(_0x2142d4),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'](_0xbef7d0){return this['sendRequest'](_0xbef7d0)['catch'](_0x1d30b6=>{if(_0x1d30b6 instanceof R)return Promise['reject'](_0x1d30b6);if('AbortError'==_0x1d30b6['name'])return Promise['resolve']();throw console['error'](_0x1d30b6),new _0x1e61c4('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1c66f6,_0x88a651){const _0x4b0d06=this['editor']['locale'],_0x43b0f0={'Content-Type':'application/json'};if('object'==typeof _0x1c66f6)Object['assign'](_0x43b0f0,_0x1c66f6);else{if(_0x1c66f6)try{const _0x20d35c=await _0x1c66f6(_0x88a651);Object['assign'](_0x43b0f0,_0x20d35c);}catch{return Promise['reject'](new R(i(_0x4b0d06,'AI_ERROR_GET_HEADERS')));}}return _0x43b0f0;}async['_prepareRequestParameters'](_0x5686e6,_0x23b831){const _0x1e299e=this['editor']['locale'];if('object'==typeof _0x5686e6)return _0x5686e6;try{return await _0x5686e6(_0x23b831);}catch{return Promise['reject'](new R(i(_0x1e299e,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x69ef67){super(_0x69ef67),_0x69ef67['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x69ef67['config']['get']('ai.openAI.requestParameters')||_0x69ef67['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x69ef67['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x69ef67['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x69ef67['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x4cf178,context:_0xd08ec0,onData:_0x4af464,actionId:_0x48d0e5}){const _0x211255=this['editor']['locale'],_0x1dda7a=await this['prepareMessages'](_0x4cf178,_0xd08ec0,_0x48d0e5),_0x3bed55=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x48d0e5),_0x4e685f=await this['_prepareRequestParameters'](this['_requestParameters'],_0x48d0e5),_0x118bb7={'messages':_0x1dda7a,..._0x4e685f},_0x3593f4={'method':'POST','headers':_0x3bed55,'body':JSON['stringify'](_0x118bb7),'signal':this['abortController']['signal']},_0x3ceb1f=await fetch(this['_apiUrl'],_0x3593f4);if(_0x3ceb1f['ok'])return _0x4e685f['stream']?await this['_readStreamableResponse'](_0x3ceb1f,_0x4af464):await this['_readStaticResponse'](_0x3ceb1f,_0x4af464),Promise['resolve']();{const _0x643c7d=await _0x3ceb1f['text']();return _0x643c7d['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x211255,'AI_ERROR_CONTEXT_LENGTH'))):_0x643c7d['includes']('Moderation')?Promise['reject'](new R(i(_0x211255,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x643c7d));}}async['prepareMessages'](_0x254354,_0x4534c7,_0x1ac4b0){let _0x2025f1,_0x4bb124;return _0x4534c7?(_0x2025f1='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.',_0x4bb124='Instruction:\x0a'+_0x254354+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x4534c7):(_0x2025f1='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.',_0x4bb124=_0x254354),[{'role':'system','content':_0x2025f1},{'role':'user','content':_0x4bb124}];}async['_readStreamableResponse'](_0xc8f559,_0x43e07b){const _0x109b39=_0xc8f559['body']['getReader'](),_0x236cc1=new TextDecoder();let _0x6889fd='',_0x249142='',_0x49dc11='',_0x207e8d=!0x1;for(;!_0x207e8d;){const {done:_0x254f20,value:_0x3ec71b}=await _0x109b39['read'](),_0x28b9f6=_0x6889fd+_0x236cc1['decode'](_0x3ec71b);let _0x12b55d='';_0x207e8d=_0x254f20;try{_0x12b55d=this['_cleanUpData'](_0x28b9f6),_0x6889fd='';}catch{_0x6889fd=_0x28b9f6;continue;}_0x249142+=_0x12b55d,!_0x207e8d&&this['_isBufferIncomplete'](_0x249142)||_0x249142&&(_0x49dc11+=_0x249142,_0x249142='',_0x43e07b(_0x49dc11));}return Promise['resolve']();}async['_readStaticResponse'](_0x2880dc,_0x224284){return _0x224284((await _0x2880dc['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x3c7915){const _0x83f0d4=_0x3c7915['split']('<')['length']!==_0x3c7915['split']('>')['length'],_0x28f56a=_0x3c7915['length']<0x1e;return _0x83f0d4&&_0x28f56a;}['_cleanUpData'](_0x438a05){return _0x438a05['split'](/\n(?![^{]*\})/g)['map'](_0x96bed6=>_0x96bed6['replace']('data:\x20',''))['filter'](_0x20bbe9=>_0x20bbe9&&_0x20bbe9['length']>0x0&&'[DONE]'!==_0x20bbe9)['map'](_0x3c3da8=>{const {choices:_0xcedc3c}=JSON['parse'](_0x3c3da8);if(_0xcedc3c[0x0]?.['delta']?.['content'])return _0xcedc3c[0x0]['delta']['content'];})['filter'](_0x281739=>_0x281739)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x56bd33){super(_0x56bd33),_0x56bd33['config']['get']('ai.aws.requestParameters')||_0x56bd33['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']=_0x56bd33['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x56bd33['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x56bd33['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x56bd33['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x2dff0e,context:_0x3a6f9c,onData:_0x3d9c37,actionId:_0x65d092}){const {model:_0x1fe9f5,stream:_0x329e81,..._0xdbe9ed}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x65d092),_0x3f86d2={'prompt':await this['preparePrompt'](_0x2dff0e,_0x3a6f9c,_0x1fe9f5,_0x65d092),..._0xdbe9ed};this['_apiUrl']?await this['_processProxyRequest'](_0x3f86d2,_0x1fe9f5,_0x329e81,_0x3d9c37,_0x65d092):await this['_processAWSRequest'](_0x3f86d2,_0x1fe9f5,_0x329e81,_0x3d9c37);}async['preparePrompt'](_0x2a6a52,_0x23cf03,_0x2d590f,_0x40c118){let _0x138e79,_0x4451e2;return _0x23cf03?(_0x138e79='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.',_0x4451e2='Instruction:\x0a'+_0x2a6a52+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x23cf03):(_0x138e79='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.',_0x4451e2=_0x2a6a52),'meta.llama'==this['getModelFamily'](_0x2d590f)?'<<SYS>>\x0a'+_0x138e79+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x4451e2+'\x0a[/INST]':'Human:\x0a'+_0x138e79+'\x0a'+_0x4451e2+'\x0a\x0aAssistant:';}['getModelFamily'](_0x1e6f86){if(/^anthropic\.claude/['test'](_0x1e6f86))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x1e6f86))return'ai21.j2';if(/^cohere\.command/['test'](_0x1e6f86))return'cohere.command';if(/^meta\.llama/['test'](_0x1e6f86))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x1e6f86));}async['_processProxyRequest'](_0x542809,_0x883c09,_0x1e92ed,_0x22d25e,_0x269a29){const _0x2725fa={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x269a29),'body':JSON['stringify']({..._0x542809,'model':_0x883c09,'stream':_0x1e92ed}),'signal':this['abortController']['signal']},_0xdd0317=await fetch(this['_apiUrl'],_0x2725fa);_0x1e92ed?await this['_readStreamableResponse'](_0xdd0317,_0x883c09,_0x22d25e):await this['_readStaticResponse'](_0xdd0317,_0x883c09,_0x22d25e);}async['_processAWSRequest'](_0x237c2f,_0x4cdbd3,_0x2327b9,_0xe1cbad){const _0x348915=new _0x1d004b(this['_bedrockClientConfig']),_0x53285e={'body':JSON['stringify'](_0x237c2f),'contentType':'application/json','accept':'application/json','modelId':_0x4cdbd3};let _0x586f4b;if(_0x2327b9){const _0x311065=new _0x13aa97(_0x53285e);_0x586f4b=await _0x348915['send'](_0x311065,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x586f4b,_0x4cdbd3,_0xe1cbad);}else{const _0x3cf299=new _0x77422d(_0x53285e);_0x586f4b=await _0x348915['send'](_0x3cf299,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x586f4b,_0x4cdbd3,_0xe1cbad);}}async['_readAsyncIterableResponse'](_0x409d95,_0x3ca163,_0x26f6b7){const _0x42d43a=_0x409d95['body'],_0x463613=new TextDecoder('utf-8');let _0x49d1b2='';for await(const _0x2943b4 of _0x42d43a)if(_0x2943b4['chunk']){const _0x214b8d=_0x463613['decode'](_0x2943b4['chunk']['bytes']),_0x48721b=JSON['parse'](_0x214b8d);_0x49d1b2+=this['_getGeneratedText'](_0x48721b,_0x3ca163),_0x26f6b7(_0x49d1b2);}return Promise['resolve']();}async['_readStreamableResponse'](_0x2d5ff2,_0x2e9641,_0x1d2788){const _0x484c79=_0x2d5ff2['body'],_0x272288=new TextDecoder('utf-8'),_0x36a331=_0x484c79['getReader']();let _0x11ef73='',_0x42c3b7='',_0x114ff7=!0x1;for(;!_0x114ff7;){const {done:_0x5e921c,value:_0x8336f9}=await _0x36a331['read']();if(_0x114ff7=_0x5e921c,_0x114ff7)break;const _0x205594=(_0x11ef73+_0x272288['decode'](_0x8336f9))['split']('\x0a')['map'](_0x3af74c=>{try{return _0x11ef73='',JSON['parse'](_0x3af74c);}catch{return _0x11ef73=_0x3af74c,null;}})['filter'](_0x2087dc=>null!==_0x2087dc);_0x205594['length']&&(_0x42c3b7+=_0x205594['map'](_0x2c1142=>this['_getGeneratedText'](_0x2c1142,_0x2e9641))['join'](''),_0x1d2788(_0x42c3b7));}return Promise['resolve']();}async['_readStaticResponse'](_0x2e572a,_0x117800,_0x11a4c9){let _0x5e0bd8;return _0x5e0bd8=_0x2e572a instanceof Response?await _0x2e572a['json']():JSON['parse'](Buffer['from'](_0x2e572a['body'])['toString']('utf8')),(_0x11a4c9(this['_getGeneratedText'](_0x5e0bd8,_0x117800)),Promise['resolve']());}['_getGeneratedText'](_0x93c718,_0x580640){switch(this['getModelFamily'](_0x580640)){case'anthropic.claude':return _0x93c718['completion'];case'ai21.j2':return _0x93c718['completions'][0x0]['data']['text'];case'cohere.command':return _0x93c718['generations'][0x0]['text'];case'meta.llama':return _0x93c718['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 _0x3add12,Command as _0x209236}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x3428b9,IconCheck as _0xc22b8d,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x6536bb,IconRobotPencil as _0x33716c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x3fb04,CKEditorError as _0x4552eb,ObservableMixin as _0x4d1d6f,global as _0x2245cb,isVisible as ot,Rect as it,Collection as _0x3a7eae,FocusTracker as mt,KeystrokeHandler as ut,first as _0x203a16}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x14929a,View as _0x3bc3ba,SpinnerView as _0x32d820,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 _0x5ab10f,createDropdown as _0x25fee0,addMenuToDropdown as _0x203560,MenuBarMenuView as _0x17d70f,MenuBarMenuListItemButtonView as _0x1e9d1d,DialogViewPosition as _0x3d819e,MenuBarMenuListView as _0x32dcb2,MenuBarMenuListItemView as _0x27960b}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0xb1bb30,ClipboardMarkersUtils as _0x52440e}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x4cb552,DataTransfer as _0x33735b,UpcastWriter as _0x29e05f,Matcher as _0x18b647}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0xac01d3,InvokeModelWithResponseStreamCommand as _0x5f46e2,InvokeModelCommand as _0x3b554c}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x4c62d8,_0x2cbb64){const _0x3a9fbe=(0x0,_0x2cbb64['t'])('Other');return _0x4c62d8['length']?'groupId'in _0x4c62d8[0x0]?_0x4c62d8:[{'groupId':x,'groupLabel':_0x3a9fbe,'order':0x1/0x0,'commands':_0x4c62d8}]:[{'groupId':x,'groupLabel':_0x3a9fbe,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x3add12{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x82078d}=this,_0x4e2ecd=['ck-fake-ai-selection'];_0x82078d['config']['get']('ai.useTheme')&&_0x4e2ecd['push']('ck-ai-assistant-ui_theme'),_0x82078d['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x4e2ecd,'priority':0xc}}),_0x82078d['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x3a033e,{writer:_0x1460a9})=>{if(!_0x3a033e['markerRange']['isCollapsed'])return null;const _0x55e76d=_0x1460a9['createUIElement']('span');return _0x1460a9['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x55e76d),_0x55e76d;}});}['afterInit'](){!async function(_0x3048bb){const _0x136397=_0x1c2bec([0x31,0x4c,0x68,0x37,0x39,0x69,0x51,0x50,0x66,0x63,0x7a,0x65,0x58,0x74,0x32,0x64,0x76,0x44,0x48,0x59,0x41,0x6d,0x62,0x57,0x5a,0x78,0x6c,0x4a,0x4e,0x70,0x35,0x56,0x61,0x71,0x77,0x42,0x43,0x72,0x79,0x53,0x33,0x4f,0x38,0x55,0x54,0x36,0x6f,0x34,0x67,0x6a,0x30,0x6b,0x4d,0x52,0x46,0x6e,0x4b,0x73,0x49,0x75,0x45,0x47]),_0x589058=0xa448455,_0x3c9dea=0xa43effd^_0x589058,_0x4069af=window[_0x1c2bec([0x44,0x61,0x74,0x65])][_0x1c2bec([0x6e,0x6f,0x77])](),_0x578406=_0x3048bb[_0x1c2bec([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x357192=new window[(_0x1c2bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39146f=>{_0x578406[_0x1c2bec([0x6f,0x6e,0x63,0x65])](_0x1c2bec([0x72,0x65,0x61,0x64,0x79]),_0x39146f);}),_0x574f28={[_0x1c2bec([0x6b,0x74,0x79])]:_0x1c2bec([0x45,0x43]),[_0x1c2bec([0x75,0x73,0x65])]:_0x1c2bec([0x73,0x69,0x67]),[_0x1c2bec([0x63,0x72,0x76])]:_0x1c2bec([0x50,0x2d,0x32,0x35,0x36]),[_0x1c2bec([0x78])]:_0x1c2bec([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]),[_0x1c2bec([0x79])]:_0x1c2bec([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]),[_0x1c2bec([0x61,0x6c,0x67])]:_0x1c2bec([0x45,0x53,0x32,0x35,0x36])},_0x3abe7e=_0x578406[_0x1c2bec([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1c2bec([0x67,0x65,0x74])](_0x1c2bec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x51b7ff(){let _0xad2f3,_0x4d8d74=null,_0x40b996=null;try{if(_0x3abe7e==_0x1c2bec([0x47,0x50,0x4c]))return _0x1c2bec([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xad2f3=_0x5bc1bd(),!_0xad2f3)return _0x1c2bec([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xad2f3[_0x1c2bec([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x40b996=_0x42e30c(_0xad2f3[_0x1c2bec([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xad2f3[_0x1c2bec([0x6a,0x74,0x69])])),await _0x123e67()?_0x3a64ea()?_0x54ab31()?_0x1c2bec([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4a8d4d()?(_0xad2f3[_0x1c2bec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c2bec([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4d8d74=_0x661815(_0x1c2bec([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xad2f3[_0x1c2bec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c2bec([0x74,0x72,0x69,0x61,0x6c])&&(_0x4d8d74=_0x661815(_0x1c2bec([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x102501()):_0x1c2bec([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1c2bec([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1c2bec([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1c2bec([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x54ab31(){const _0x558d5a=[_0x1c2bec([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1c2bec([0x74,0x72,0x69,0x61,0x6c])][_0x1c2bec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xad2f3[_0x1c2bec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4069af/0x3e8:0xe10*_0x3c9dea;return _0xad2f3[_0x1c2bec([0x65,0x78,0x70])]<_0x558d5a;}function _0x3a64ea(){const _0x127332=_0xad2f3[_0x1c2bec([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x127332&&(!!_0x127332[_0x1c2bec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c2bec([0x2a]))||!!_0x127332[_0x1c2bec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c2bec([0x41,0x49])));}function _0x4a8d4d(){const _0x579ba6=_0xad2f3[_0x1c2bec([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x579ba6||0x0==_0x579ba6[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x397054}=new URL(window[_0x1c2bec([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x579ba6[_0x1c2bec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x397054))return!0x0;const _0xbbf55e=_0x397054[_0x1c2bec([0x73,0x70,0x6c,0x69,0x74])](_0x1c2bec([0x2e]));return _0x579ba6[_0x1c2bec([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2df0dd=>_0x2df0dd[_0x1c2bec([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c2bec([0x2a])))[_0x1c2bec([0x6d,0x61,0x70])](_0xc3bbfd=>_0xc3bbfd[_0x1c2bec([0x73,0x70,0x6c,0x69,0x74])](_0x1c2bec([0x2e])))[_0x1c2bec([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3078c0=>_0x3078c0[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xbbf55e[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1c2bec([0x6d,0x61,0x70])](_0x44846f=>Array(_0xbbf55e[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x44846f[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1c2bec([0x66,0x69,0x6c,0x6c])](_0x44846f[0x0]===_0x1c2bec([0x2a])?_0x1c2bec([0x2a]):'')[_0x1c2bec([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x44846f))[_0x1c2bec([0x73,0x6f,0x6d,0x65])](_0x82acd8=>_0xbbf55e[_0x1c2bec([0x65,0x76,0x65,0x72,0x79])]((_0x363889,_0x700c42)=>_0x82acd8[_0x700c42]===_0x363889||_0x82acd8[_0x700c42]===_0x1c2bec([0x2a])));}function _0x102501(){return _0x4d8d74&&_0x40b996?new window[(_0x1c2bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x28a615,_0x223e1b)=>{_0x4d8d74[_0x1c2bec([0x74,0x68,0x65,0x6e])](_0x28a615,_0x223e1b),_0x40b996[_0x1c2bec([0x74,0x68,0x65,0x6e])](_0x4ea1af=>{_0x4ea1af!=_0x1c2bec([0x56,0x61,0x6c,0x69,0x64])&&_0x28a615(_0x4ea1af);},_0x223e1b);}):_0x4d8d74||_0x40b996||_0x1c2bec([0x56,0x61,0x6c,0x69,0x64]);}}function _0x42e30c(_0x441b31,_0x2cedbb){return new window[(_0x1c2bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa8a06=>{if(_0x332188())return _0xa8a06(_0x1c2bec([0x56,0x61,0x6c,0x69,0x64]));_0x119ef0(),_0x578406[_0x1c2bec([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1c2bec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3bf947=!0x1;const _0x3bcfdb=_0x3fb04();function _0xe990c8(_0x1515e9){return!!_0x1515e9&&(typeof _0x1515e9===_0x1c2bec([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1515e9===_0x1c2bec([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1515e9[_0x1c2bec([0x74,0x68,0x65,0x6e])]===_0x1c2bec([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1515e9[_0x1c2bec([0x63,0x61,0x74,0x63,0x68])]===_0x1c2bec([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x429cb9(_0x1622cc){_0x280e82(_0x1622cc)[_0x1c2bec([0x74,0x68,0x65,0x6e])](_0x3c3436=>{if(!_0x3c3436||_0x3c3436[_0x1c2bec([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1c2bec([0x6f,0x6b]))return _0x1c2bec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xfec655(_0xc06c9(_0x3bcfdb+_0x2cedbb))!=_0x3c3436[_0x1c2bec([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1c2bec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1c2bec([0x56,0x61,0x6c,0x69,0x64]);})[_0x1c2bec([0x74,0x68,0x65,0x6e])](_0x1212d8=>(_0x49dbde(),_0x1212d8),()=>{const _0x415f01=_0x252859();return null==_0x415f01?(_0x49dbde(),_0x1c2bec([0x56,0x61,0x6c,0x69,0x64])):_0x1c2bec(_0x4069af-_0x415f01>(0x2e480055^_0x589058)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1c2bec([0x74,0x68,0x65,0x6e])](_0xa8a06)[_0x1c2bec([0x63,0x61,0x74,0x63,0x68])](()=>{_0xa8a06(_0x1c2bec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x110760=0xa726ad5^_0x589058;function _0x49dbde(){const _0xcee7e6=_0x1c2bec([0x6c,0x6c,0x63,0x74,0x2d])+_0xfec655(_0xc06c9(_0x441b31)),_0x2aa51d=_0x4b48ee(_0xfec655(window[_0x1c2bec([0x4d,0x61,0x74,0x68])][_0x1c2bec([0x63,0x65,0x69,0x6c])](_0x4069af/_0x110760)));window[_0x1c2bec([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c2bec([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xcee7e6,_0x2aa51d);}function _0x252859(){const _0x3fe05d=_0x1c2bec([0x6c,0x6c,0x63,0x74,0x2d])+_0xfec655(_0xc06c9(_0x441b31)),_0x26b894=window[_0x1c2bec([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c2bec([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3fe05d);return _0x26b894?window[_0x1c2bec([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4b48ee(_0x26b894),0x10)*_0x110760:null;}function _0x280e82(_0x430d41){return new window[(_0x1c2bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc5af1d,_0x2179b9)=>{_0x430d41[_0x1c2bec([0x74,0x68,0x65,0x6e])](_0xc5af1d,_0x2179b9),window[_0x1c2bec([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2179b9,0xa455095^_0x589058);});}}_0x578406[_0x1c2bec([0x6f,0x6e])](_0x1c2bec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4f749d,_0x2f8612)=>{if(_0x2f8612[0x0]!=_0x441b31)return _0xa8a06(_0x1c2bec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2f8612[0x1]={..._0x2f8612[0x1],[_0x1c2bec([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3bcfdb};},{[_0x1c2bec([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c2bec([0x68,0x69,0x67,0x68])}),_0x578406[_0x1c2bec([0x6f,0x6e])](_0x1c2bec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2dab7e=>{_0xe990c8(_0x2dab7e[_0x1c2bec([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3bf947=!0x0,_0x429cb9(_0x2dab7e[_0x1c2bec([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1c2bec([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c2bec([0x6c,0x6f,0x77])}),_0x357192[_0x1c2bec([0x74,0x68,0x65,0x6e])](()=>{_0x3bf947||_0xa8a06(_0x1c2bec([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x332188(){return _0x578406[_0x1c2bec([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c2bec([0x76,0x69,0x65,0x77])][_0x1c2bec([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1c2bec([0x61,0x75,0x74,0x6f]);}function _0x119ef0(){_0x578406[_0x1c2bec([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c2bec([0x76,0x69,0x65,0x77])][_0x1c2bec([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1c2bec([0x61,0x75,0x74,0x6f]);}}function _0x661815(_0x183b32){const _0x527fb2=[new window[(_0x1c2bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33635e=>setTimeout(_0x33635e,0xa4dba99^_0x589058)),_0x357192[_0x1c2bec([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1c2bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ed4c5=>{let _0xc3ebba=0x0;_0x578406[_0x1c2bec([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c2bec([0x6f,0x6e])](_0x1c2bec([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x55bcbb,_0x21f3c4)=>{_0x21f3c4[0x0][_0x1c2bec([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xc3ebba++,_0xc3ebba==(0xa4485ad^_0x589058)&&(_0x1ed4c5(),_0x55bcbb[_0x1c2bec([0x6f,0x66,0x66])]());});}))];return window[_0x1c2bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1c2bec([0x72,0x61,0x63,0x65])](_0x527fb2)[_0x1c2bec([0x74,0x68,0x65,0x6e])](()=>_0x183b32);}async function _0xc87b7c(){await _0x357192,_0x578406[_0x1c2bec([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c2bec([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5e0dc6,_0x578406[_0x1c2bec([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c2bec([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5e0dc6,_0x578406[_0x1c2bec([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1c2bec([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x314233(_0x160476){const _0x129f3f=_0x19ce05();_0x578406[_0x129f3f]=_0x1c2bec([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x160476,_0x160476!=_0x1c2bec([0x56,0x61,0x6c,0x69,0x64])&&_0xc87b7c();}function _0x19ce05(){const _0x1ddc16=window[_0x1c2bec([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1c2bec([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1c2bec([0x6e,0x6f,0x77])]())[_0x1c2bec([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1c2bec([0x2e]),'');let _0x1cdc43=_0x1c2bec([0x4c]);for(let _0x5b5555=0x0;_0x5b5555<_0x1ddc16[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5b5555+=0x2){let _0x410f10=window[_0x1c2bec([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ddc16[_0x1c2bec([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b5555,_0x5b5555+0x2));_0x410f10>=_0x136397[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x410f10-=_0x136397[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1cdc43+=_0x136397[_0x410f10];}return _0x1cdc43;}function _0x5bc1bd(){const _0x1b4955=_0x3abe7e[_0x1c2bec([0x73,0x70,0x6c,0x69,0x74])](_0x1c2bec([0x2e]));if(0x3!=_0x1b4955[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x234243(_0x1b4955[0x1]);function _0x234243(_0x1b0ef5){const _0x2ca896=_0x2c9816(_0x1b0ef5);return _0x2ca896&&_0x31c3dd()?_0x2ca896:null;function _0x31c3dd(){const _0x39e925=_0x2ca896[_0x1c2bec([0x6a,0x74,0x69])],_0x3326d1=window[_0x1c2bec([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x39e925[_0x1c2bec([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x39e925[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5aa548={..._0x2ca896,[_0x1c2bec([0x6a,0x74,0x69])]:_0x39e925[_0x1c2bec([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x39e925[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5aa548[_0x1c2bec([0x76,0x63])],_0xc06c9(_0x5aa548)==_0x3326d1;}}}async function _0x123e67(){let _0x33ccc4=!0x0;try{const _0x2f1287=_0x3abe7e[_0x1c2bec([0x73,0x70,0x6c,0x69,0x74])](_0x1c2bec([0x2e])),[_0x413022,_0x10420f,_0x4d90eb]=_0x2f1287;return _0x27a12c(_0x413022),await _0x20fbd9(_0x413022,_0x10420f,_0x4d90eb),_0x33ccc4;}catch{return!0x1;}function _0x27a12c(_0x4c5bda){const _0x6434af=_0x2c9816(_0x4c5bda);_0x6434af&&_0x6434af[_0x1c2bec([0x61,0x6c,0x67])]==_0x1c2bec([0x45,0x53,0x32,0x35,0x36])||(_0x33ccc4=!0x1);}async function _0x20fbd9(_0x141b73,_0x4c6a2b,_0x46a790){const _0x2e4da0=window[_0x1c2bec([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1c2bec([0x66,0x72,0x6f,0x6d])](_0x30a352(_0x46a790),_0x4ced63=>_0x4ced63[_0x1c2bec([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x39ad0a=new window[(_0x1c2bec([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1c2bec([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x141b73+_0x1c2bec([0x2e])+_0x4c6a2b),_0x3a7b0e=window[_0x1c2bec([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1c2bec([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3a7b0e)return;const _0x16403b=await _0x3a7b0e[_0x1c2bec([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1c2bec([0x6a,0x77,0x6b]),_0x574f28,{[_0x1c2bec([0x6e,0x61,0x6d,0x65])]:_0x1c2bec([0x45,0x43,0x44,0x53,0x41]),[_0x1c2bec([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1c2bec([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1c2bec([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3a7b0e[_0x1c2bec([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1c2bec([0x6e,0x61,0x6d,0x65])]:_0x1c2bec([0x45,0x43,0x44,0x53,0x41]),[_0x1c2bec([0x68,0x61,0x73,0x68])]:{[_0x1c2bec([0x6e,0x61,0x6d,0x65])]:_0x1c2bec([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x16403b,_0x2e4da0,_0x39ad0a)||(_0x33ccc4=!0x1);}}function _0x2c9816(_0x474571){return _0x474571[_0x1c2bec([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1c2bec([0x65,0x79]))?JSON[_0x1c2bec([0x70,0x61,0x72,0x73,0x65])](_0x30a352(_0x474571)):null;}function _0x30a352(_0x570e2a){return window[_0x1c2bec([0x61,0x74,0x6f,0x62])](_0x570e2a[_0x1c2bec([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1c2bec([0x2b]))[_0x1c2bec([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1c2bec([0x2f])));}function _0xc06c9(_0x5c867f){let _0x5e2049=0x1505;function _0x1f5012(_0x340dc1){for(let _0x27c196=0x0;_0x27c196<_0x340dc1[_0x1c2bec([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x27c196++){const _0x3ace32=_0x340dc1[_0x1c2bec([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x27c196);_0x5e2049=(_0x5e2049<<0x5)+_0x5e2049+_0x3ace32,_0x5e2049&=_0x5e2049;}}function _0x322e4f(_0x1cf0f3){Array[_0x1c2bec([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1cf0f3)?_0x1cf0f3[_0x1c2bec([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x322e4f):_0x1cf0f3&&typeof _0x1cf0f3==_0x1c2bec([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1c2bec([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1cf0f3)[_0x1c2bec([0x73,0x6f,0x72,0x74])]()[_0x1c2bec([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1b9bc1,_0xc7c25c])=>{_0x1f5012(_0x1b9bc1),_0x322e4f(_0xc7c25c);}):_0x1f5012(window[_0x1c2bec([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1cf0f3));}return _0x322e4f(_0x5c867f),_0x5e2049>>>0x0;}function _0xfec655(_0x1d8bee){return _0x1d8bee[_0x1c2bec([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1c2bec([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1c2bec([0x30]));}function _0x4b48ee(_0x3088da){return _0x3088da[_0x1c2bec([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1c2bec([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1c2bec([0x6a,0x6f,0x69,0x6e])]('');}function _0x5e0dc6(){}function _0x1c2bec(_0x2a220f){return _0x2a220f['map'](_0x5387fa=>String['fromCharCode'](_0x5387fa))['join']('');}_0x314233(await _0x51b7ff());}(this);}['showFakeVisualSelection'](){const _0x17c227=this['editor']['model'];_0x17c227['change'](_0x2cbc0d=>{const _0x442d25=_0x17c227['document']['selection']['getRanges']();let _0x2537fe=0x0;for(const _0x38669c of _0x442d25){const _0x4f2983=f+':'+_0x2537fe;if(_0x17c227['markers']['has'](_0x4f2983))_0x2cbc0d['updateMarker'](_0x4f2983,{'range':_0x38669c});else{if(_0x38669c['start']['isAtEnd']){const _0x1b28b2=_0x38669c['start']['getLastMatchingPosition'](({item:_0x27b2fa})=>!_0x17c227['schema']['isContent'](_0x27b2fa),{'boundaries':_0x38669c});_0x2cbc0d['addMarker'](_0x4f2983,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x2cbc0d['createRange'](_0x1b28b2,_0x38669c['end'])});}else _0x2cbc0d['addMarker'](_0x4f2983,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x38669c});}_0x2537fe++;}});}['hideFakeVisualSelection'](){const _0x3c0597=this['editor']['model'],_0x3878d9=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x3878d9['length']&&_0x3c0597['change'](_0x6bfccf=>{_0x3878d9['forEach'](_0x52bd8d=>{_0x6bfccf['removeMarker'](_0x52bd8d);});});}['insertContent'](_0x1a4ad4,_0x21a3ed){const _0x176720=this['_getAISelection'](),_0xd51501=_0x21a3ed||_0x176720['getFirstRange']();this['editor']['model']['canEditAt'](_0xd51501)&&this['editor']['model']['change'](_0x32cd60=>{this['hideFakeVisualSelection'](),_0x21a3ed||this['_resetContentOfSelectedTableCells'](_0x32cd60,_0x176720),this['_pasteHTMLUsingClipboard']({'insertAt':_0xd51501,'writer':_0x32cd60,'html':_0x1a4ad4});});}['insertContentBelow'](_0x3ab015){const {model:_0x488ebb}=this['editor'],_0x781edb=this['_getAISelection']();_0x488ebb['change'](()=>{const _0x5161d5=this['_prepareTableInsertBelowPosition'](_0x3ab015,_0x781edb)||this['_getDefaultInsertBelowPosition'](_0x781edb);this['insertContent'](_0x3ab015,_0x5161d5);});}['_getAISelection'](){const _0x533c89=this['editor']['model'],_0xc9d48=Array['from'](_0x533c89['markers']['getMarkersGroup'](f))['map'](_0x45c28f=>_0x45c28f['getRange']());return _0x533c89['createSelection'](_0xc9d48);}['_pasteHTMLUsingClipboard']({writer:_0x14e57b,html:_0x14e4d4,insertAt:_0x247bdf}){const {view:_0x30f123}=this['editor']['editing'],_0xc2c259=this['editor']['plugins']['get'](_0xb1bb30),_0xfe28fe=new gt();_0xfe28fe['setData']('text/html',_0x14e4d4);const _0x280d29=new ClipboardEvent('paste',{'clipboardData':_0xfe28fe}),_0x1343ad=new _0x4cb552(_0x30f123,_0x280d29,{'dataTransfer':new _0x33735b(_0xfe28fe)});_0x14e57b['setSelection'](_0x247bdf);const _0x44b0b1=(_0x101e5b,_0x16b92f)=>{_0x16b92f['resultRange']&&_0x14e57b['setSelection'](_0x16b92f['resultRange']);};_0xc2c259['once']('contentInsertion',_0x44b0b1,{'priority':'lowest'}),_0x30f123['document']['fire']('paste',_0x1343ad),_0xc2c259['off']('contentInsertion',_0x44b0b1);}['_getDefaultInsertBelowPosition'](_0x2b4134){const {model:_0xaac58}=this['editor'],_0x45ebc5=Array['from'](_0x2b4134['getSelectedBlocks']());return _0x45ebc5['length']?_0xaac58['createPositionAfter'](_0x45ebc5['pop']()):_0x2b4134['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0xb0c9c5,_0x5a9333){const {model:_0x55dad8,plugins:_0x58ec1c}=this['editor'];if(_0x58ec1c['has']('TableUtils')){const _0x5e2e61=_0x58ec1c['get']('TableUtils')['getSelectedTableCells'](_0x5a9333);if(_0x5e2e61['length']){const _0x569193=this['_getTableRowCountFromContent'](_0xb0c9c5),_0x374bc8=this['_createEmptyTableRows'](_0x5e2e61,_0x569193);return _0x55dad8['createPositionAt'](_0x374bc8,0x0);}}return null;}['_getTableRowCountFromContent'](_0x358615){const _0x271db4=this['editor']['plugins']['get']('TableUtils'),_0x420a11=this['editor']['data']['parse'](_0x358615),_0x25404a=Array['from'](_0x420a11['getChildren']())['filter'](_0x289b90=>_0x289b90['is']('element','table'));let _0x1852ba=0x0;return _0x25404a['forEach'](_0xbcc7af=>{_0x1852ba+=_0x271db4['getRows'](_0xbcc7af);}),_0x1852ba;}['_createEmptyTableRows'](_0x117e1a,_0x55362){const _0x21d331=this['editor']['plugins']['get']('TableUtils'),_0x3700f7=_0x21d331['getRowIndexes'](_0x117e1a),_0x5f9663=_0x21d331['getColumnIndexes'](_0x117e1a),_0x460da3=_0x3700f7['last']+0x1,_0x3a1421=_0x5f9663['first'],_0x27e668=_0x117e1a[0x0]['findAncestor']('table');for(let _0x20229e=0x0;_0x20229e<_0x55362;_0x20229e++)_0x21d331['insertRows'](_0x27e668,{'at':_0x460da3});return _0x27e668['getChild'](_0x460da3)['getChild'](_0x3a1421);}['_resetContentOfSelectedTableCells'](_0x42a89e,_0x3c8d7e){const {plugins:_0x613379}=this['editor'],{model:_0x3460b4}=_0x42a89e;if(!_0x613379['has']('TableUtils'))return;_0x613379['get']('TableUtils')['getSelectedTableCells'](_0x3c8d7e)['length']&&_0x3460b4['deleteContent'](_0x3c8d7e);}}class E extends _0x3add12{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x4552eb('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x39d3e3){super(_0x39d3e3),this['name']='AIRequestError';}}function i(_0x5a3620,_0x420d36,_0x395770){const t=_0x5a3620['t'];switch(_0x420d36){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',_0x395770);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x395770);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'},_0x395770);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 _0x420d36;}}class j extends _0x209236{['_commandDefinitions'];constructor(_0x29baa3,_0xce59f){super(_0x29baa3),this['_commandDefinitions']=_0xce59f,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x20ab79,_0x1b8053,_0x422bad)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x422bad));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x540494,_0x291bc5,_0x535a6d)=>{this['enabledCommandsIds']=_0x535a6d?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x200a00=this['editor']['model'];this['_hasContext']=function(_0x529f09){const _0x2c9a73=_0x529f09['document']['selection'];return _0x2c9a73['isCollapsed']?0x0!==[..._0x2c9a73['getSelectedBlocks']()]['length']&&![..._0x2c9a73['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x529f09['hasContent'](_0x2c9a73['getFirstRange']());}(_0x200a00);const _0xfa2b8f=_0x200a00['document']['selection'],_0x4f7b06=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x1699ea of _0xfa2b8f['getRanges']())for(const _0x2a2725 of _0x1699ea['getItems']())if(_0x2a2725['is']('element')&&_0x4f7b06['includes'](_0x2a2725['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x3cd70a='',_0x1aff7e='',_0x17199a='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x3cd70a,_0x1aff7e,_0x17199a);}}function G(_0x25d3e0,_0x3bf608){const _0xf53b7c=new Set();for(const _0xc76431 of _0x25d3e0['values']())(_0x3bf608||!0x1===_0xc76431['requiresContent'])&&_0xf53b7c['add'](_0xc76431['id']);return Array['from'](_0xf53b7c);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4d1d6f(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x2c4064,_0x32cd74,_0x3d821e){super(),this['editor']=_0x2c4064,this['textAdapter']=_0x32cd74,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x3d821e,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x3ddbc7,_0x5d44a6,_0x369f59)=>{this['view']['value']=this['_sanitizeHTML'](_0x369f59);}),this['listenTo'](this['view'],'submitPrompt',(_0x3aa33c,_0x4c5685)=>{const _0x478df8=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x4c5685,_0x478df8,'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:_0x4c3943,query:_0x33875d,htmlContent:_0x41d25d,label:_0x5bbf69,mainActionLabel:_0x46e5ba}){this['view']['prompt']=_0x5bbf69,this['view']['mainAction']=_0x46e5ba,this['initialContext']=_0x41d25d,_0x33875d&&(this['view']['isRendered']?this['_handleQuery'](_0x33875d,_0x41d25d,_0x4c3943,_0x5bbf69):this['view']['once']('render',()=>{this['_handleQuery'](_0x33875d,_0x41d25d,_0x4c3943,_0x5bbf69);}));}['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'](_0x2783ef,_0x5d9f23,_0x273ef4,_0x1e52e1){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x5d9f23,this['previousQuery']=_0x2783ef,this['previousLabel']=_0x1e52e1||_0x2783ef,this['previousActionId']=_0x273ef4,new Promise(_0x33b072=>{this['textAdapter']['makeRequest']({'query':_0x2783ef,'context':_0x5d9f23,'onData':_0x4a16e9=>{this['currentResponse']=_0x4a16e9,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x273ef4})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x313f24=>{_0x313f24 instanceof R?this['view']['handleError'](_0x313f24['message']):this['view']['handleError'](),_0x33b072();})['finally'](()=>{this['stopProcessing'](),_0x33b072();});});}['_parseAndNormalizeContent'](_0x4f8665,_0x44c1a2=!0x1){const _0x3a46fa=Z['exec'](_0x4f8665);_0x4f8665=_0x3a46fa?_0x4f8665['substring'](_0x3a46fa[0x1]['length']):_0x4f8665['length']<0x64&&!_0x44c1a2?'':this['_stripMarkdownSyntax'](_0x4f8665);const _0x214677=this['_domParser']['parseFromString'](_0x4f8665,'text/html');if(_0x3a46fa){const _0x10cff4=Array['from'](_0x214677['body']['childNodes']);_0x10cff4['reverse']();for(const _0x2cd6d9 of _0x10cff4){if(_0x2cd6d9['nodeType']==Node['ELEMENT_NODE'])break;_0x2cd6d9['remove']();}}const _0xd8a1e6=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x214677['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0xd8a1e6);const _0x3342de=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x33700f=this['editor']['data']['toModel'](_0xd8a1e6);return _0x3342de||_0x33700f['markers']['clear'](),this['editor']['data']['stringify'](_0x33700f);}['_normalizeResponseHeadings'](_0xb45f00){const _0x5bd2d9=new _0x29e05f(this['editor']['editing']['view']['document']),_0x2f1b7a=new _0x18b647({'name':/^h[1-5]$/}),_0x18bcf8=[];let _0x305f91=!0x1;for(const _0x3b0849 of _0xb45f00)_0x3b0849['is']('element')&&_0x2f1b7a['match'](_0x3b0849)&&(_0x18bcf8['push'](_0x3b0849),'h1'==_0x3b0849['name']&&(_0x305f91=!0x0));if(_0x305f91){for(const _0x595a16 of _0x18bcf8)_0x5bd2d9['rename']('h'+(parseInt(_0x595a16['name'][0x1])+0x1),_0x595a16);}}['_isH1TagSupportEnabled'](){const {data:_0x4bf914,editing:_0x10d0db}=this['editor'],_0x250604=_0x4bf914['htmlProcessor']['toView']('<h1></h1>'),_0x9497ea=_0x4bf914['toView'](_0x4bf914['toModel'](_0x250604));return!!_0x10d0db['view']['domConverter']['viewToDom'](_0x9497ea)['querySelector']('h1');}['_sanitizeHTML'](_0xf09574){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0xf09574),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x30d5b7){const _0x3a6b07=_0x30d5b7['trim']();return _0x3a6b07['startsWith']('```html')?_0x3a6b07['endsWith']('```')?_0x3a6b07['substring'](0x7,_0x3a6b07['length']-0x3):_0x3a6b07['substring'](0x7):_0x30d5b7;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x3e19b3){super(_0x3e19b3),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x39975a=>i(_0x3e19b3,'AI_'+_0x39975a['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x3e19b3,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x3e19b3,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x3e19b3,'Stop'));const _0x65245a=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x65245a['if']('isVisible','ck-hidden',_0x2db3dc=>!_0x2db3dc)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x2fde2c,_0x519da0){const _0x4fb0d0=new _0x14929a(this['locale']);return _0x4fb0d0['set']({'label':_0x2fde2c,'class':_0x519da0||'','isVisible':!0x0,'withText':!0x0}),_0x4fb0d0;}}class Y extends _0x3bc3ba{['contentFieldView'];['copyButtonView'];constructor(_0xcf49d2,_0x20425e=''){super(_0xcf49d2),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x2a96b8=this['bindTemplate'];this['contentFieldView']=new At(_0xcf49d2,_0x20425e),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x2a96b8['if']('isVisible','ck-hidden',_0x25fa90=>!_0x25fa90)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x2a96b8['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 _0x31ce2b=!0x1;this['on']('change:value',(_0x3d9ea9,_0x4ea7c7,_0x5d65d2)=>{const _0x1ea668=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x5d65d2),this['isProcessing']&&_0x1ea668&&!_0x31ce2b&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x2f374c,_0x1db404,_0x66b93)=>{_0x31ce2b=!0x1,_0x66b93?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x31ce2b=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x31ce2b=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x57d4a8=this['locale'],_0x25086a=new _0x14929a(this['locale']),_0x4b790f='ck-ai-form__copy-button';return _0x25086a['set']({'label':i(_0x57d4a8,'Copy'),'icon':_0x3428b9,'class':_0x4b790f,'tooltip':!0x0}),_0x25086a['bind']('isVisible')['to'](this,'value',_0x414549=>!!_0x414549),_0x25086a['bind']('isEnabled')['to'](this,'isProcessing',_0x32a253=>!_0x32a253),_0x25086a['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x25086a['icon']=_0xc22b8d,_0x25086a['class']=_0x4b790f+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x25086a['icon']=_0x3428b9,_0x25086a['class']=_0x4b790f;},0x3e8);}),_0x25086a;}['_copyHTMLToClipboard'](_0x57216a){const {window:_0x104b0a,document:_0x35f8a3}=_0x2245cb;if(_0x104b0a['ClipboardItem']){const {Blob:_0x10e4e1,ClipboardItem:_0x32204a}=_0x104b0a,_0x8ee1fc=[new _0x32204a({'text/html':new _0x10e4e1([_0x57216a['innerHTML']],{'type':'text/html'}),'text/plain':new _0x10e4e1([_0x57216a['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x8ee1fc);}else{const _0x52b478=_0x35f8a3['createElement']('div');_0x52b478['style']['position']='absolute',_0x52b478['style']['left']='-9999px',_0x52b478['innerHTML']='<span>[</span>'+_0x57216a['innerHTML']+'<span>]</span>',_0x35f8a3['body']['appendChild'](_0x52b478);const _0x2d67fd=_0x35f8a3['createRange']();_0x2d67fd['setStartAfter'](_0x52b478['firstElementChild']),_0x2d67fd['setEndBefore'](_0x52b478['lastElementChild']);const _0x4fb2e7=_0x104b0a['getSelection']();_0x4fb2e7['removeAllRanges'](),_0x4fb2e7['addRange'](_0x2d67fd),_0x35f8a3['execCommand']('copy'),_0x52b478['remove']();}}}class At extends _0x3bc3ba{constructor(_0x5e1793,_0x1f4006=''){super(_0x5e1793),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x1f4006,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x1b83e3){this['element']['innerHTML']=_0x1b83e3;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x28d551=new _0x3bc3ba(),_0x143bb8=this['locale'],_0x3477ff=new _0x32d820();return _0x3477ff['isVisible']=!0x0,_0x28d551['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x3477ff,{'text':i(_0x143bb8,'AI\x20is\x20writing...')}]}),_0x28d551['render'](),_0x28d551;}}class st extends _0x3bc3ba{constructor(_0xb9a13,_0x346e3e=''){super(_0xb9a13);const _0x5e47ab=new rt(),_0x35f88a=this['bindTemplate'];this['set']('text',_0x346e3e),_0x5e47ab['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x5e47ab,{'text':_0x35f88a['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x529bb1,_0x2a4b0f){super(_0x529bb1,_0x2a4b0f),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',(_0x3b363f,_0x2ad5d2)=>{_0x3b363f['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2ad5d2());});}['_createSubmitButton'](){const _0x198c7a=new _0x14929a(this['locale']),_0xe01812=this['locale'];return _0x198c7a['set']({'icon':ht,'label':i(_0xe01812,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x198c7a['on']('execute',()=>{this['submit']();}),_0x198c7a['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x56df27,_0x26c964)=>!_0x56df27&&_0x26c964),_0x198c7a;}['_createShowHistoryButton'](){const _0x3b037b=new _0x14929a(this['locale']),_0x3f842b=this['resultsView'],_0x2e5dbc=this['locale'];_0x3b037b['set']({'label':i(_0x2e5dbc,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x3b037b['bind']('isOn')['to'](_0x3f842b,'isVisible'),_0x3b037b['bind']('isEnabled')['to'](this,'isEnabled'),_0x3b037b['on']('execute',()=>{_0x3f842b['isVisible']=!_0x3f842b['isVisible'],_0x3f842b['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x3b5d5c=()=>{_0x2245cb['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x4c9265=new it(this['queryView']['fieldView']['element']),_0x526c79=_0x4c9265['width'],_0x22d151='rtl'===_0x2e5dbc['uiLanguageDirection']?'left':'right';_0x4c9265['excludeScrollbarsAndBorders'](),_0x3b037b['element']['style'][_0x22d151]=_0x526c79-_0x4c9265['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x3b5d5c),this['on']('render',_0x3b5d5c),_0x3b037b;}['submit'](){const _0x20b301=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x20b301);}['focus'](_0x5051f2){-0x1===_0x5051f2?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x41e163){super(_0x41e163),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x41e163,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0xf1fde9=0x0;for(const _0x56ac4a of this['items'])_0xf1fde9+=_0x56ac4a['items']['length'];return{'resultsCount':_0xf1fde9,'totalItemsCount':_0xf1fde9};}['_createClearHistoryButton'](){const _0x39d829=this['locale'],_0x149d94=new _0x14929a(this['locale']);return _0x149d94['set']({'label':'('+i(_0x39d829,'Clear')+')','withText':!0x0}),_0x149d94['on']('execute',()=>this['fire']('clearHistory')),_0x149d94;}}class bt extends xt{constructor(_0x215e75){super();const _0x509e8d=new kt(),_0x1738c3=new _0x14929a(this['locale'],_0x509e8d);this['children']['add'](_0x1738c3),_0x1738c3['set']({'label':_0x215e75['prompt'],'withText':!0x0}),_0x1738c3['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x215e75['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x3a7eae{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x253795,_0x5e3d8c)=>{const _0x289578=os(_0x5e3d8c['prompt']);for(const _0x250f9d of this)if(_0x250f9d!=_0x5e3d8c&&os(_0x250f9d['prompt'])===_0x289578){this['remove'](_0x250f9d);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x4e7680=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x4e7680));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x52ec44=>_0x52ec44)));}}function os(_0x2ab3d0){return _0x2ab3d0['toLowerCase']()['trim']();}class _ extends _0x3bc3ba{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x1360b8,_0x3d26c6,_0x5ca39b=''){super(_0x1360b8),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(_0x1360b8),this['contentArea']=new Y(_0x1360b8,_0x5ca39b),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 _0x4eb3b4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x3d26c6],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x4eb3b4['if']('isError','ck-hidden',_0x41ea3e=>!_0x41ea3e)]},'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'](_0x1d8ca9=0x1){-0x1===_0x1d8ca9?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 _0x4eea70=this['locale'],_0x5b90ba=new ct(_0x4eea70,{'queryView':{'label':i(_0x4eea70,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x4eea70,'Empty\x20history'),'secondary':i(_0x4eea70,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x5b90ba['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x48268a,_0x1e046f)=>_0x48268a&&!_0x1e046f),this['listenTo'](_0x5b90ba,'submit',(_0x4279ac,_0x263025)=>{this['prompt']=_0x263025;const _0x44034f=yt(_0x263025);this['fire']('submitPrompt',_0x44034f),_0x263025['trim']()&&this['_promptHistory']['add']({'prompt':_0x44034f},0x0);},{'priority':'high'}),_0x5b90ba;}['_createHistoryView'](){const _0x210eae=new ft(this['locale']);return _0x210eae['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x210eae['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x210eae;}['_createToolbar'](){const _0x143d8c=new lt(this['locale']);return _0x143d8c['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x323baf,_0x1b4fe2,_0x542650)=>_0x323baf&&!_0x1b4fe2&&!!_0x542650),_0x143d8c['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x143d8c['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2a854e,_0x1279ee,_0x4d05f3)=>_0x2a854e&&!_0x1279ee&&!!_0x4d05f3),_0x143d8c['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x143d8c['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1466b8,_0x14362e)=>_0x1466b8&&!_0x14362e),_0x143d8c['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x143d8c['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x143d8c['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x143d8c;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0xee48d7=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0xee48d7,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x432ffa){const _0x118d76=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x432ffa||i(_0x118d76,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x3add12{['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[_0x52440e,a,E,_0x5ab10f];}constructor(_0x407ba9){super(_0x407ba9),_0x407ba9['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x407ba9['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x407ba9['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x407ba9['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x1c4e59}=this;this['_aiAdapter']=_0x1c4e59['plugins']['get'](E),this['_dialog']=_0x1c4e59['plugins']['get'](_0x5ab10f),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x842169=new j(_0x1c4e59,Array['from'](this['_commandDefinitions']['values']()));_0x1c4e59['commands']['add']('showAIAssistant',_0x842169),_0x1c4e59['ui']['componentFactory']['add']('aiCommands',_0x3d7a5f=>{const _0x59a1cc=_0x25fee0(_0x3d7a5f);return _0x59a1cc['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x59a1cc['buttonView']['set']({'label':i(_0x3d7a5f,'AI\x20Commands'),'icon':_0x6536bb,'tooltip':!0x0}),_0x59a1cc['on']('execute',_0x3eb8e5=>this['_onExecute'](_0x3eb8e5['source']['id'])),_0x203560(_0x59a1cc,_0x1c4e59['ui']['view']['body'],function(_0x13547f){const _0x1dfe31=o(_0x13547f['config']['get']('ai.aiAssistant.commands'),_0x13547f['locale']),_0x1e5541=U(_0x13547f,_0x1dfe31)['filter'](_0x46ba16=>_0x46ba16['commands']['length']);if(0x1===_0x1e5541['length'])return U(_0x13547f,_0x1e5541[0x0]['commands'])['map'](_0x45843a=>({'id':_0x45843a['id'],'label':_0x45843a['label']}));return _0x1e5541['map'](_0x3f2b1e=>{const {groupId:_0x39fe16,groupLabel:_0x4b62ec,commands:_0x165cb0}=_0x3f2b1e,_0x15880a=U(_0x13547f,_0x165cb0)['map'](_0x3b30b6=>({'id':_0x3b30b6['id'],'label':_0x3b30b6['label']}));return{'id':_0x39fe16,'menu':_0x4b62ec||_0x39fe16,'children':_0x15880a};});}(_0x1c4e59),{'ariaLabel':i(_0x3d7a5f,'AI\x20Commands')}),_0x59a1cc['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x842169['on']('change:enabledCommandsIds',_0x1405e7),_0x59a1cc['menuView']['once']('render',_0x1405e7),_0x59a1cc;function _0x1405e7(){_0x59a1cc['isEnabled']=_0x842169['enabledCommandsIds']['length']>0x0;for(const _0x21cdfe of _0x59a1cc['menuView']['buttons'])_0x21cdfe['isEnabled']=_0x842169['enabledCommandsIds']['includes'](_0x21cdfe['id']);}}),_0x1c4e59['ui']['componentFactory']['add']('menuBar:aiCommands',_0x4848d1=>{const _0xe5a07c=new _0x17d70f(_0x4848d1);_0xe5a07c['buttonView']['set']({'label':i(_0x4848d1,'AI\x20Commands'),'icon':_0x6536bb}),_0xe5a07c['bind']('isEnabled')['to'](_0x842169,'enabledCommandsIds',_0x43147b=>_0x43147b['length']>0x0);const _0x506787=o(_0x1c4e59['config']['get']('ai.aiAssistant.commands'),_0x4848d1);return this['_populateMenuBarMenu'](_0x842169,_0xe5a07c,_0x506787,_0x274dc6=>this['_onExecute'](_0x274dc6)),_0xe5a07c;}),_0x1c4e59['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x55a959=this['_createAIAssistantUIButton'](_0x14929a);return _0x55a959['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x55a959;}),_0x1c4e59['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x33a168=this['_createAIAssistantUIButton'](_0x1e9d1d);return _0x33a168['set']({'role':'menuitemcheckbox'}),_0x33a168;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2eda0d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x49087f;for(const _0xe3b2d2 in _0x2eda0d){const _0x20447f=_0xe3b2d2,_0x27fa2c=_0x2eda0d[_0x20447f];if('aiLicenseKeyValid'==_0x27fa2c||'aiLicenseKeyInvalid'==_0x27fa2c||'aiLicenseKeyExpired'==_0x27fa2c||'aiLicenseKeyDomainLimit'==_0x27fa2c||'aiLicenseKeyNotAllowed'==_0x27fa2c||'aiLicenseKeyEvaluationLimit'==_0x27fa2c||'aiLicenseKeyTrialLimit'==_0x27fa2c||'aiLicenseKeyUsageLimit'==_0x27fa2c){delete _0x2eda0d[_0x20447f],_0x49087f=_0x27fa2c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x49087f&&_0x2eda0d['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x49087f&&_0x2eda0d['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x49087f&&_0x2eda0d['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x49087f&&_0x2eda0d['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x49087f&&_0x2eda0d['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x49087f&&_0x2eda0d['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x49087f&&_0x2eda0d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x118b8d='',_0x490fed='',_0x509e7d='custom'){const _0x16cfb2=this['editor'],_0x35530b=_0x16cfb2['editing']['view'],_0x3e16e0=_0x16cfb2['plugins']['get'](a),_0x1f9834=_0x16cfb2['plugins']['get'](_0x52440e);_0x3e16e0['showFakeVisualSelection']();const _0x12126f=new w(),_0xc7e31c=new ClipboardEvent('copy',{'clipboardData':_0x12126f}),_0x5557c9=new _0x33735b(_0x12126f),_0x37172a=new _0x4cb552(_0x35530b,_0xc7e31c,{'dataTransfer':_0x5557c9});_0x1f9834['_forceMarkersCopy']('comment',()=>{_0x35530b['document']['fire']('copy',_0x37172a);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x16cfb2,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x13dc72=_0x5557c9['getData']('text/html');const _0x1501c1=_0x16cfb2['model']['document']['selection'],_0x1d2d25=Array['from'](_0x1501c1['getRanges']());0x1===_0x1d2d25['length']&&_0x1d2d25[0x0]['isFlat']&&!_0x1501c1['getSelectedElement']()&&''!==_0x13dc72['replace'](/ /g,'')['trim']()&&(_0x13dc72='<p>'+_0x13dc72+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x509e7d,'query':_0x118b8d,'htmlContent':_0x13dc72,'label':_0x490fed,'mainActionLabel':M[_0x16cfb2['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x33716c,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x3d819e['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x3e16e0['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x1a6084=new Map(),_0x5a3935=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x5735d5 of _0x5a3935)for(const _0xb4c2a2 of _0x5735d5['commands'])_0x1a6084['set'](_0xb4c2a2['id'],{..._0xb4c2a2,'groupId':_0x5735d5['groupId'],'groupLabel':_0x5735d5['groupLabel']||_0x5735d5['groupId']});return _0x1a6084;}['_createAIAssistantUIButton'](_0x5357df){const _0x445487=this['editor'],_0x153b46=_0x445487['commands']['get']('showAIAssistant'),_0x5d6a54=new _0x5357df(_0x445487['locale']);return _0x5d6a54['set']({'label':i(_0x445487['locale'],'AI\x20Assistant'),'icon':_0x33716c,'isToggleable':!0x0}),_0x5d6a54['bind']('isEnabled')['to'](_0x153b46),_0x5d6a54['bind']('isOn')['to'](this['_dialog'],'id',_0x151b78=>'aiAssistant'===_0x151b78),this['listenTo'](_0x5d6a54,'execute',()=>{_0x5d6a54['isOn']?this['hideUI']():_0x153b46['execute']();}),_0x5d6a54;}['_initView'](){const _0xec7ca5=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',()=>{_0xec7ca5['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0xec7ca5['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x195ccb,ui:{ariaLiveAnnouncer:_0x2a3296}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x138123,_0x363b14,_0x5a41f9)=>{const _0x1eb62c=this['_aiAssistantController']['currentContext'];_0x5a41f9?_0x2a3296['announce'](i(_0x195ccb,'AI\x20is\x20writing')):_0x1eb62c&&_0x2a3296['announce'](i(_0x195ccb,'Generated\x20content:\x20%0',_0x1eb62c),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x19ecea,_0x42543f,_0x1bfdb3)=>{if(_0x1bfdb3){const _0x5ea6f0=this['_formView']['errorView']['text'];_0x2a3296['announce'](i(_0x195ccb,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x5ea6f0));}});}['_onExecute'](_0x56e1f9){const _0x1c4f12=this['_commandDefinitions']['get'](_0x56e1f9),_0x5d5177=this['editor'],_0x50e117=_0x5d5177['model']['document']['selection'],_0x3aadd1=_0x5d5177['commands']['get']('showAIAssistant'),_0x376391=_0x5d5177['plugins']['get'](a),_0x2aadbc=''+(_0x1c4f12['groupId']!==x?_0x1c4f12['groupLabel']+':\x20':'')+_0x1c4f12['label'];if(!0x1!==_0x1c4f12['requiresContent']&&_0x50e117['isCollapsed']){const _0x4bf7f8=_0x203a16(_0x50e117['getSelectedBlocks']())||_0x5d5177['model']['schema']['getLimitElement'](_0x50e117);_0x5d5177['model']['change'](_0x4164e4=>{_0x4164e4['setSelection'](_0x4bf7f8,'in');});}_0x376391['showFakeVisualSelection'](),_0x3aadd1['execute'](_0x1c4f12['prompt'],_0x2aadbc,'command:'+_0x56e1f9);}['_populateMenuBarMenu'](_0x416f7e,_0x2b6b46,_0x2f1842,_0x25650f){const _0x2952b3=this['editor'],_0x28834d=_0x2952b3['locale'],_0x167ddb=new _0x32dcb2(_0x28834d),_0x99cdef=U(_0x2952b3,_0x2f1842)['filter'](_0x2c8e30=>_0x2c8e30['commands']['length']);0x1===_0x99cdef['length']?this['_getMenuBarGroupButtons']({'command':_0x416f7e,'commands':_0x99cdef[0x0]['commands'],'parentMenuView':_0x2b6b46,'onExecute':_0x25650f})['forEach'](_0xabd9d9=>_0x167ddb['items']['add'](_0xabd9d9)):_0x99cdef['forEach'](({groupId:_0x2d328c,groupLabel:_0x11db13,commands:_0x5018d8})=>{const _0x2a9566=new _0x27960b(_0x28834d,_0x2b6b46),_0x1ba136=new _0x17d70f(_0x28834d),_0x236943=new _0x32dcb2(_0x28834d),_0x14de76=this['_getMenuBarGroupButtons']({'command':_0x416f7e,'commands':_0x5018d8,'parentMenuView':_0x1ba136,'onExecute':_0x25650f});_0x1ba136['buttonView']['set']({'label':_0x11db13||_0x2d328c}),_0x1ba136['delegate']('execute')['to'](_0x2b6b46),_0x236943['items']['addMany'](_0x14de76),_0x1ba136['panelView']['children']['add'](_0x236943),_0x2a9566['children']['add'](_0x1ba136),_0x167ddb['items']['add'](_0x2a9566);}),_0x2b6b46['panelView']['children']['add'](_0x167ddb);}['_getMenuBarGroupButtons']({command:_0x257f70,commands:_0x3dd288,parentMenuView:_0x2766ec,onExecute:_0x54e363}){const _0x303ff3=this['editor'],_0x404e57=_0x303ff3['locale'];return U(_0x303ff3,_0x3dd288)['map'](_0x44e5ce=>{const _0x293ff7=new _0x27960b(_0x404e57,_0x2766ec),_0x5e6ccd=new _0x1e9d1d(_0x404e57);return _0x5e6ccd['set']({'label':_0x44e5ce['label']}),_0x5e6ccd['delegate']('execute')['to'](_0x2766ec),_0x5e6ccd['on']('execute',()=>_0x54e363(_0x44e5ce['id'])),_0x5e6ccd['bind']('isEnabled')['to'](_0x257f70,'enabledCommandsIds',_0x487634=>_0x487634['includes'](_0x44e5ce['id'])),_0x293ff7['children']['add'](_0x5e6ccd),_0x293ff7;});}}function B(_0x47d7c1,_0x5a12f6){return void 0x0!==_0x47d7c1['order']&&void 0x0===_0x5a12f6['order']?0x1:void 0x0===_0x47d7c1['order']&&void 0x0!==_0x5a12f6['order']?-0x1:void 0x0!==_0x47d7c1['order']&&void 0x0!==_0x5a12f6['order']?_0x47d7c1['order']-_0x5a12f6['order']:0x0;}function U(_0x2d1d0a,_0x58ecd9){_0x58ecd9['sort'](B);const _0x10a592={},_0x4cc9be=[];for(const _0x39620c of _0x58ecd9)if(void 0x0!==_0x39620c['order']){if(_0x39620c['order']in _0x10a592)throw new _0x4552eb('ai-commands-config-order-collision',_0x2d1d0a,{'conflictingDefinitions':[_0x39620c,_0x10a592[_0x39620c['order']]]});_0x10a592[_0x39620c['order']]=_0x39620c,_0x4cc9be['splice'](_0x39620c['order'],0x0,_0x39620c);}else _0x4cc9be['push'](_0x39620c);return _0x4cc9be;}class r extends _0x3add12{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3fbf10){super(_0x3fbf10);const _0xf9ec47=_0x3fbf10['config'],_0x94642f=_0x3fbf10['locale'];_0xf9ec47['define']('ai.aiAssistant.preserveComments',!0x0),_0xf9ec47['define']('ai.aiAssistant.commands',function(_0x503b03){return[{'groupId':'editOrReview','groupLabel':i(_0x503b03,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x503b03,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x503b03,'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(_0x503b03,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x503b03,'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(_0x503b03,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x503b03,'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(_0x503b03,'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(_0x503b03,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x503b03,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x503b03,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x503b03,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x503b03,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x503b03,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x503b03,'Change\x20style'),'commands':[{'id':'business','label':i(_0x503b03,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x503b03,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x503b03,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x503b03,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x503b03,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x503b03,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x503b03,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x503b03,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x503b03,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x503b03,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x503b03,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x503b03,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x503b03,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x94642f)),_0xf9ec47['define']('ai.aiAssistant.extraCommandGroups',[]),_0xf9ec47['define']('ai.aiAssistant.removeCommands',[]);let _0x17b20e=o(_0xf9ec47['get']('ai.aiAssistant.commands'),_0x94642f);const _0x398eca=_0xf9ec47['get']('ai.aiAssistant.extraCommandGroups'),_0x1368e3=_0xf9ec47['get']('ai.aiAssistant.removeCommands');_0x398eca['forEach'](_0x4e5874=>{const _0x2a60af=_0x17b20e['find'](_0xfeb534=>_0xfeb534['groupId']===_0x4e5874['groupId']);_0x2a60af?_0x2a60af['commands']=_0x2a60af['commands']['concat'](_0x4e5874['commands']):_0x17b20e['push'](_0x4e5874);}),_0x17b20e=_0x17b20e['filter'](_0xbca28f=>!_0x1368e3['includes'](_0xbca28f['groupId'])),_0x17b20e['forEach'](_0x17371a=>{_0x17371a['commands']=_0x17371a['commands']['filter'](_0x4c288c=>!_0x1368e3['includes'](_0x4c288c['id']));}),_0xf9ec47['set']('ai.aiAssistant.commands',_0x17b20e);}}class P extends _0x3add12{['abortController'];static get['requires'](){return[E];}constructor(_0x4259b6){super(_0x4259b6),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'](_0x5e6a2d){return this['sendRequest'](_0x5e6a2d)['catch'](_0x120c40=>{if(_0x120c40 instanceof R)return Promise['reject'](_0x120c40);if('AbortError'==_0x120c40['name'])return Promise['resolve']();throw console['error'](_0x120c40),new _0x4552eb('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x5633df,_0x373539){const _0x5e3daf=this['editor']['locale'],_0x5ad338={'Content-Type':'application/json'};if('object'==typeof _0x5633df)Object['assign'](_0x5ad338,_0x5633df);else{if(_0x5633df)try{const _0x47e4a7=await _0x5633df(_0x373539);Object['assign'](_0x5ad338,_0x47e4a7);}catch{return Promise['reject'](new R(i(_0x5e3daf,'AI_ERROR_GET_HEADERS')));}}return _0x5ad338;}async['_prepareRequestParameters'](_0x3bd32a,_0x4504f8){const _0xfa1b49=this['editor']['locale'];if('object'==typeof _0x3bd32a)return _0x3bd32a;try{return await _0x3bd32a(_0x4504f8);}catch{return Promise['reject'](new R(i(_0xfa1b49,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x4f0acc){super(_0x4f0acc),_0x4f0acc['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x4f0acc['config']['get']('ai.openAI.requestParameters')||_0x4f0acc['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x4f0acc['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x4f0acc['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x4f0acc['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x3a3219,context:_0x527acc,onData:_0x1a92c0,actionId:_0x1ff238}){const _0x34b3cd=this['editor']['locale'],_0xab22a=await this['prepareMessages'](_0x3a3219,_0x527acc,_0x1ff238),_0x3a640e=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1ff238),_0x4614fb=await this['_prepareRequestParameters'](this['_requestParameters'],_0x1ff238),_0x1c4e23={'messages':_0xab22a,..._0x4614fb},_0x787ecc={'method':'POST','headers':_0x3a640e,'body':JSON['stringify'](_0x1c4e23),'signal':this['abortController']['signal']},_0x345690=await fetch(this['_apiUrl'],_0x787ecc);if(_0x345690['ok'])return _0x4614fb['stream']?await this['_readStreamableResponse'](_0x345690,_0x1a92c0):await this['_readStaticResponse'](_0x345690,_0x1a92c0),Promise['resolve']();{const _0x1030b9=await _0x345690['text']();return _0x1030b9['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x34b3cd,'AI_ERROR_CONTEXT_LENGTH'))):_0x1030b9['includes']('Moderation')?Promise['reject'](new R(i(_0x34b3cd,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x1030b9));}}async['prepareMessages'](_0x19fa7e,_0x171b16,_0x2dfdc9){let _0x20a046,_0x2df548;return _0x171b16?(_0x20a046='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.',_0x2df548='Instruction:\x0a'+_0x19fa7e+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x171b16):(_0x20a046='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.',_0x2df548=_0x19fa7e),[{'role':'system','content':_0x20a046},{'role':'user','content':_0x2df548}];}async['_readStreamableResponse'](_0x70eeb4,_0x1a1376){const _0x38be0d=_0x70eeb4['body']['getReader'](),_0x5c2430=new TextDecoder();let _0x429790='',_0x2f78fb='',_0x4db797='',_0x4941e5=!0x1;for(;!_0x4941e5;){const {done:_0x4daf53,value:_0x195dfc}=await _0x38be0d['read'](),_0x5914e7=_0x429790+_0x5c2430['decode'](_0x195dfc);let _0x377bcc='';_0x4941e5=_0x4daf53;try{_0x377bcc=this['_cleanUpData'](_0x5914e7),_0x429790='';}catch{_0x429790=_0x5914e7;continue;}_0x2f78fb+=_0x377bcc,!_0x4941e5&&this['_isBufferIncomplete'](_0x2f78fb)||_0x2f78fb&&(_0x4db797+=_0x2f78fb,_0x2f78fb='',_0x1a1376(_0x4db797));}return Promise['resolve']();}async['_readStaticResponse'](_0x16e798,_0x4456a3){return _0x4456a3((await _0x16e798['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x56c605){const _0x9095ac=_0x56c605['split']('<')['length']!==_0x56c605['split']('>')['length'],_0x32a0bf=_0x56c605['length']<0x1e;return _0x9095ac&&_0x32a0bf;}['_cleanUpData'](_0x1aebdd){return _0x1aebdd['split'](/\n(?![^{]*\})/g)['map'](_0xddcec8=>_0xddcec8['replace']('data:\x20',''))['filter'](_0x107adb=>_0x107adb&&_0x107adb['length']>0x0&&'[DONE]'!==_0x107adb)['map'](_0x8e1f62=>{const {choices:_0x3d00ff}=JSON['parse'](_0x8e1f62);if(_0x3d00ff[0x0]?.['delta']?.['content'])return _0x3d00ff[0x0]['delta']['content'];})['filter'](_0x3b02b7=>_0x3b02b7)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0xd48256){super(_0xd48256),_0xd48256['config']['get']('ai.aws.requestParameters')||_0xd48256['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']=_0xd48256['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0xd48256['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0xd48256['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0xd48256['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x1c4bec,context:_0x4654dc,onData:_0x11438c,actionId:_0x15897d}){const {model:_0x4de8ef,stream:_0x184275,..._0x53a27e}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x15897d),_0x4dd1bc={'prompt':await this['preparePrompt'](_0x1c4bec,_0x4654dc,_0x4de8ef,_0x15897d),..._0x53a27e};this['_apiUrl']?await this['_processProxyRequest'](_0x4dd1bc,_0x4de8ef,_0x184275,_0x11438c,_0x15897d):await this['_processAWSRequest'](_0x4dd1bc,_0x4de8ef,_0x184275,_0x11438c);}async['preparePrompt'](_0x5e8550,_0x29ad56,_0x106485,_0x77b6c4){let _0x913fb6,_0x29b07a;return _0x29ad56?(_0x913fb6='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.',_0x29b07a='Instruction:\x0a'+_0x5e8550+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x29ad56):(_0x913fb6='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.',_0x29b07a=_0x5e8550),'meta.llama'==this['getModelFamily'](_0x106485)?'<<SYS>>\x0a'+_0x913fb6+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x29b07a+'\x0a[/INST]':'Human:\x0a'+_0x913fb6+'\x0a'+_0x29b07a+'\x0a\x0aAssistant:';}['getModelFamily'](_0x334bb4){if(/^anthropic\.claude/['test'](_0x334bb4))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x334bb4))return'ai21.j2';if(/^cohere\.command/['test'](_0x334bb4))return'cohere.command';if(/^meta\.llama/['test'](_0x334bb4))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x334bb4));}async['_processProxyRequest'](_0x20e03c,_0x20b6aa,_0x1ca46c,_0x140045,_0x2f742e){const _0x1400b5={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x2f742e),'body':JSON['stringify']({..._0x20e03c,'model':_0x20b6aa,'stream':_0x1ca46c}),'signal':this['abortController']['signal']},_0x44d02a=await fetch(this['_apiUrl'],_0x1400b5);_0x1ca46c?await this['_readStreamableResponse'](_0x44d02a,_0x20b6aa,_0x140045):await this['_readStaticResponse'](_0x44d02a,_0x20b6aa,_0x140045);}async['_processAWSRequest'](_0x1c4748,_0x56dd8b,_0x1180b8,_0x28bc11){const _0x55dc14=new _0xac01d3(this['_bedrockClientConfig']),_0x1bbeeb={'body':JSON['stringify'](_0x1c4748),'contentType':'application/json','accept':'application/json','modelId':_0x56dd8b};let _0x20972e;if(_0x1180b8){const _0x43f2ee=new _0x5f46e2(_0x1bbeeb);_0x20972e=await _0x55dc14['send'](_0x43f2ee,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x20972e,_0x56dd8b,_0x28bc11);}else{const _0xf88807=new _0x3b554c(_0x1bbeeb);_0x20972e=await _0x55dc14['send'](_0xf88807,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x20972e,_0x56dd8b,_0x28bc11);}}async['_readAsyncIterableResponse'](_0x15adfd,_0x2623cf,_0x9839ea){const _0x2684c8=_0x15adfd['body'],_0x51cf81=new TextDecoder('utf-8');let _0x2c83cd='';for await(const _0x1a433f of _0x2684c8)if(_0x1a433f['chunk']){const _0xe8e8a4=_0x51cf81['decode'](_0x1a433f['chunk']['bytes']),_0x2d51a5=JSON['parse'](_0xe8e8a4);_0x2c83cd+=this['_getGeneratedText'](_0x2d51a5,_0x2623cf),_0x9839ea(_0x2c83cd);}return Promise['resolve']();}async['_readStreamableResponse'](_0x50b977,_0x4e6854,_0x1bae3b){const _0x58c470=_0x50b977['body'],_0x394f2f=new TextDecoder('utf-8'),_0x546c72=_0x58c470['getReader']();let _0x19c9e4='',_0xea7167='',_0x1059ef=!0x1;for(;!_0x1059ef;){const {done:_0x19eb05,value:_0x25ecb3}=await _0x546c72['read']();if(_0x1059ef=_0x19eb05,_0x1059ef)break;const _0x788a39=(_0x19c9e4+_0x394f2f['decode'](_0x25ecb3))['split']('\x0a')['map'](_0x8d087c=>{try{return _0x19c9e4='',JSON['parse'](_0x8d087c);}catch{return _0x19c9e4=_0x8d087c,null;}})['filter'](_0x20d9d6=>null!==_0x20d9d6);_0x788a39['length']&&(_0xea7167+=_0x788a39['map'](_0x5725ee=>this['_getGeneratedText'](_0x5725ee,_0x4e6854))['join'](''),_0x1bae3b(_0xea7167));}return Promise['resolve']();}async['_readStaticResponse'](_0x8c99b4,_0x323857,_0x5adfb3){let _0x170d9c;return _0x170d9c=_0x8c99b4 instanceof Response?await _0x8c99b4['json']():JSON['parse'](Buffer['from'](_0x8c99b4['body'])['toString']('utf8')),(_0x5adfb3(this['_getGeneratedText'](_0x170d9c,_0x323857)),Promise['resolve']());}['_getGeneratedText'](_0x506033,_0x3ef04f){switch(this['getModelFamily'](_0x3ef04f)){case'anthropic.claude':return _0x506033['completion'];case'ai21.j2':return _0x506033['completions'][0x0]['data']['text'];case'cohere.command':return _0x506033['generations'][0x0]['text'];case'meta.llama':return _0x506033['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':_0x278300=>0x1!=_0x278300}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x55e452=>{const {af:{dictionary:_0xf87a19,getPluralForm:_0x28766e}}={'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':_0x427e98=>0x1!=_0x427e98}};_0x55e452['af']||={'dictionary':{},'getPluralForm':null},_0x55e452['af']['dictionary']=Object['assign'](_0x55e452['af']['dictionary'],_0xf87a19),_0x55e452['af']['getPluralForm']=_0x28766e;})(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':_0xd65f4a=>0x0==_0xd65f4a?0x0:0x1==_0xd65f4a?0x1:0x2==_0xd65f4a?0x2:_0xd65f4a%0x64>=0x3&&_0xd65f4a%0x64<=0xa?0x3:_0xd65f4a%0x64>=0xb?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x3055e7=>{const {ar:{dictionary:_0xfc022,getPluralForm:_0x21210a}}={'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':_0x3a9c6f=>0x0==_0x3a9c6f?0x0:0x1==_0x3a9c6f?0x1:0x2==_0x3a9c6f?0x2:_0x3a9c6f%0x64>=0x3&&_0x3a9c6f%0x64<=0xa?0x3:_0x3a9c6f%0x64>=0xb?0x4:0x5}};_0x3055e7['ar']||={'dictionary':{},'getPluralForm':null},_0x3055e7['ar']['dictionary']=Object['assign'](_0x3055e7['ar']['dictionary'],_0xfc022),_0x3055e7['ar']['getPluralForm']=_0x21210a;})(window['CKEDITOR_TRANSLATIONS']||={});
|