@ckeditor/ckeditor5-ai 0.0.0-nightly-20231218.0 → 0.0.0-nightly-20231220.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +1 -1
- package/package.json +3 -3
- 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/ui/aiassistantcontroller.js +1 -1
- package/src/ui/dropdown/aicommandslistview.js +1 -1
- package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
- package/src/ui/dropdown/labelwithhighlightview.js +1 -1
- 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
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2ac5=['style','submit','showHistoryButtonView','isEmpty','fieldView','children','focus','uiLanguageDirection','_createSubmitButton','left','queryView','keystrokes','add','fire','update','rtl','fieldWrapperChildren','maxRows','value','isEnabled','excludeScrollbarsAndBorders','bind','focusLast','render','enter','focusFirst','history','submitButtonView','filteredView','width','window','resultsView','History','isVisible','ck-ai-form__submit','isOn','execute','ck-ai-form__toggle-history','_createShowHistoryButton','focusableChildren','set','locale','focusCycler','element','requestAnimationFrame'];(function(_0x7c4029,_0x2ac540){const _0xa1843=function(_0x4819cd){while(--_0x4819cd){_0x7c4029['push'](_0x7c4029['shift']());}};_0xa1843(++_0x2ac540);}(_0x2ac5,0x84));const _0xa184=function(_0x7c4029,_0x2ac540){_0x7c4029=_0x7c4029-0x0;let _0xa1843=_0x2ac5[_0x7c4029];return _0xa1843;};import{Rect as _0x558696,global as _0x18a536,isVisible as _0x3ac839}from'ckeditor5/src/utils.js';import{AutocompleteView as _0xf8a8da,ButtonView as _0x370a7f}from'ckeditor5/src/ui.js';import{icons as _0x6f1dd7}from'ckeditor5/src/core.js';import{getTranslation as _0x5acc85}from'../../utils/common-translations.js';import _0x3d58b0 from'../../../theme/icons/submit.svg';export default class ht extends _0xf8a8da{constructor(_0x4748f0,_0x5cf5a9){super(_0x4748f0,_0x5cf5a9),this['queryView']['fieldView']['minRows']=0x1,this[_0xa184('0xd')][_0xa184('0x7')][_0xa184('0x14')]=0x3,this[_0xa184('0x1e')]=this[_0xa184('0xb')](),this[_0xa184('0x5')]=this[_0xa184('0x29')](),this[_0xa184('0x2a')]['add'](this['showHistoryButtonView'],0x1),this[_0xa184('0x2a')]['add'](this[_0xa184('0x1e')]);}[_0xa184('0x1a')](){super[_0xa184('0x1a')](),this[_0xa184('0xd')][_0xa184('0x13')][_0xa184('0xf')](this['showHistoryButtonView']),this[_0xa184('0x8')][_0xa184('0xf')](this['submitButtonView']),this[_0xa184('0xe')][_0xa184('0x2b')](_0xa184('0x1b'),(_0x119b8b,_0x351c9e)=>{_0x119b8b['target']==this[_0xa184('0xd')]['fieldView'][_0xa184('0x1')]&&(this[_0xa184('0x4')](),_0x351c9e());});}[_0xa184('0xb')](){const _0x34dc93=new _0x370a7f(this[_0xa184('0x2c')]),_0x2906d3=this[_0xa184('0x2c')];return _0x34dc93[_0xa184('0x2b')]({'icon':_0x3d58b0,'label':_0x5acc85(_0x2906d3,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':_0xa184('0x25')}),_0x34dc93['on']('execute',()=>{this[_0xa184('0x4')]();}),_0x34dc93[_0xa184('0x18')](_0xa184('0x16'))['to'](this[_0xa184('0xd')][_0xa184('0x7')],_0xa184('0x6'),this,_0xa184('0x16'),(_0x5397e5,_0x17e99d)=>!_0x5397e5&&_0x17e99d),_0x34dc93;}['_createShowHistoryButton'](){const _0x18d7d3=new _0x370a7f(this[_0xa184('0x2c')]),_0x20fa91=this[_0xa184('0x22')],_0x1ac504=this[_0xa184('0x2c')];_0x18d7d3[_0xa184('0x2b')]({'label':_0x5acc85(_0x1ac504,_0xa184('0x23')),'withText':!0x1,'icon':_0x6f1dd7[_0xa184('0x1d')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0xa184('0x28')}),_0x18d7d3[_0xa184('0x18')](_0xa184('0x26'))['to'](_0x20fa91,_0xa184('0x24')),_0x18d7d3[_0xa184('0x18')](_0xa184('0x16'))['to'](this,_0xa184('0x16')),_0x18d7d3['on'](_0xa184('0x27'),()=>{_0x20fa91['isVisible']=!_0x20fa91[_0xa184('0x24')],_0x20fa91[_0xa184('0x24')]?this[_0xa184('0x1f')][_0xa184('0x9')]():this['focus']();});const _0x10e981=()=>{_0x18a536[_0xa184('0x21')][_0xa184('0x2')](()=>{if(_0x3ac839(this[_0xa184('0x1')])){const _0x30c0d6=new _0x558696(this['queryView'][_0xa184('0x7')][_0xa184('0x1')]),_0x51c942=_0x30c0d6['width'],_0x423477=_0xa184('0x12')===_0x1ac504[_0xa184('0xa')]?_0xa184('0xc'):'right';_0x30c0d6[_0xa184('0x17')](),_0x18d7d3['element'][_0xa184('0x3')][_0x423477]=_0x51c942-_0x30c0d6[_0xa184('0x20')]+0x1+'px';}});};return this[_0xa184('0xd')][_0xa184('0x7')]['on'](_0xa184('0x11'),_0x10e981),this['on']('render',_0x10e981),_0x18d7d3;}['submit'](){const _0x159ad2=this[_0xa184('0xd')][_0xa184('0x7')][_0xa184('0x1')][_0xa184('0x15')];this[_0xa184('0x10')](_0xa184('0x4'),_0x159ad2);}[_0xa184('0x9')](_0x5a5ffc){-0x1===_0x5a5ffc?this['focusCycler'][_0xa184('0x19')]():this[_0xa184('0x0')][_0xa184('0x1c')]();}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xf1f9=['AI_','REPLACE','bindTemplate','stopButton','replace','items','locale','ck-ai-form__toolbar','_CONTENT','toUpperCase','ck-button-action','Try\x20again','bind','set','insertButton','_createButton','Insert\x20below','label','Stop','replaceButton','extendTemplate','tryAgainButton','mainAction','isVisible','insert'];(function(_0x2c6b8e,_0xf1f904){const _0x3d3001=function(_0x262bb1){while(--_0x262bb1){_0x2c6b8e['push'](_0x2c6b8e['shift']());}};_0x3d3001(++_0xf1f904);}(_0xf1f9,0x11e));const _0x3d30=function(_0x2c6b8e,_0xf1f904){_0x2c6b8e=_0x2c6b8e-0x0;let _0x3d3001=_0xf1f9[_0x2c6b8e];return _0x3d3001;};import{ToolbarView as _0x447092,ButtonView as _0x456384}from'ckeditor5/src/ui.js';import{getTranslation as _0x134334}from'../../utils/common-translations.js';export var AIFormToolbarViewMainActionLabel;!function(_0x358bbc){_0x358bbc['REPLACE']=_0x3d30('0x12'),_0x358bbc['INSERT']=_0x3d30('0xd');}(AIFormToolbarViewMainActionLabel||(AIFormToolbarViewMainActionLabel={}));export default class ti extends _0x447092{constructor(_0x4b98fa){super(_0x4b98fa),this[_0x3d30('0x2')](_0x3d30('0xc'),!0x1),this['set'](_0x3d30('0xb'),AIFormToolbarViewMainActionLabel[_0x3d30('0xf')]),this['replaceButton']=this[_0x3d30('0x4')]('',_0x3d30('0x18')),this[_0x3d30('0x8')][_0x3d30('0x1')](_0x3d30('0x6'))['to'](this,_0x3d30('0xb'),_0x2d6835=>_0x134334(_0x4b98fa,_0x3d30('0xe')+_0x2d6835[_0x3d30('0x17')]()+_0x3d30('0x16'))),this[_0x3d30('0x3')]=this[_0x3d30('0x4')](_0x134334(_0x4b98fa,_0x3d30('0x5'))),this[_0x3d30('0xa')]=this[_0x3d30('0x4')](_0x134334(_0x4b98fa,_0x3d30('0x0'))),this[_0x3d30('0x11')]=this[_0x3d30('0x4')](_0x134334(_0x4b98fa,_0x3d30('0x7')));const _0x2c8f48=this[_0x3d30('0x10')];this[_0x3d30('0x9')]({'attributes':{'class':[_0x3d30('0x15'),_0x2c8f48['if'](_0x3d30('0xc'),'ck-hidden',_0x203f7b=>!_0x203f7b)]}}),this[_0x3d30('0x13')]['addMany']([this[_0x3d30('0x8')],this['insertButton'],this['tryAgainButton'],this[_0x3d30('0x11')]]);}['_createButton'](_0x55dcec,_0x4729f9){const _0x7aad6a=new _0x456384(this[_0x3d30('0x14')]);return _0x7aad6a[_0x3d30('0x2')]({'label':_0x55dcec,'class':_0x4729f9||'','isVisible':!0x0,'withText':!0x0}),_0x7aad6a;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3036=['copyButtonView','createCollection','startProcessing','label','focus','ck-ai-form-content','promptView','element','keystrokes','items','tryAgainEvent','div','prompt','contentArea','value','focusTracker','toolbar','_focusCycler','set','insertContentBelow','add','forwardCycle','handleError','stopButton','text','ck-ai-form','shift\x20+\x20tab','historyGroupView','_createToolbar','Empty\x20history','isError','replaceContent','reset','search','REPLACE','insertButton','focusNext','stopProcessing','header','tryAgainButton','mainAction','fieldView','fire','ck-hidden','_focusables','focusCycler','isEnabled','high','queryView','submitPrompt','bind','replaceButton','stop','Ask\x20AI\x20to\x20edit\x20or\x20generate','isProcessing','listenTo','isVisible','finishProcessing','_createHistoryView','delegate','clear','locale','_promptHistory','bindTemplate','backwardCycle','bindTo','render','errorView','execute'];(function(_0x11a219,_0x303629){const _0x1b2ea7=function(_0x4bcabf){while(--_0x4bcabf){_0x11a219['push'](_0x11a219['shift']());}};_0x1b2ea7(++_0x303629);}(_0x3036,0xae));const _0x1b2e=function(_0x11a219,_0x303629){_0x11a219=_0x11a219-0x0;let _0x1b2ea7=_0x3036[_0x11a219];return _0x1b2ea7;};import{FocusTracker as _0x401b1b,KeystrokeHandler as _0xe1aa1a}from'ckeditor5/src/utils.js';import{View as _0xc71a3f,FocusCycler as _0x30eec3,createLabeledTextarea as _0x235368,FormHeaderView as _0x308697}from'ckeditor5/src/ui.js';import _0x51fcbe,{AIFormToolbarViewMainActionLabel as _0x32e7e3}from'./aiformtoolbarview.js';import _0xf8c146 from'./aiformcontentarea.js';import _0x26ae80 from'./aiformerrorview.js';import _0x266657 from'./aiformpromptview.js';import _0x1f85a1 from'./aihistorylistview.js';import _0x12c1ab from'./aihistorylistitemview.js';import _0x1b9472 from'./prompthistory.js';import{getTranslation as _0x5cccb5}from'../../utils/common-translations.js';import{escape as _0x47f229}from'lodash-es';import _0x595602 from'../../../theme/icons/robot-pencil.svg';export default class v extends _0xc71a3f{constructor(_0xd54f12,_0x575898,_0x311c35=''){super(_0xd54f12),this[_0x1b2e('0x33')](_0x1b2e('0xa'),!0x0),this['set'](_0x1b2e('0x12'),!0x1),this[_0x1b2e('0x33')](_0x1b2e('0x2d'),''),this[_0x1b2e('0x33')](_0x1b2e('0x2f'),''),this[_0x1b2e('0x33')](_0x1b2e('0x3f'),!0x1),this[_0x1b2e('0x33')](_0x1b2e('0x4'),_0x32e7e3[_0x1b2e('0x43')]),this[_0x1b2e('0x1a')]=new _0x1b9472(),this['errorView']=new _0x26ae80(_0xd54f12),this['header']=new _0x308697(_0xd54f12,{'label':_0x5cccb5(_0xd54f12,'AI\x20Assistant'),'icon':_0x595602}),this['contentArea']=new _0xf8c146(_0xd54f12,_0x311c35),this[_0x1b2e('0x2e')][_0x1b2e('0xe')](_0x1b2e('0x12'))['to'](this),this[_0x1b2e('0x2e')][_0x1b2e('0xe')](_0x1b2e('0x2f'))['to'](this),this[_0x1b2e('0x31')]=this[_0x1b2e('0x3d')](),this['toolbar'][_0x1b2e('0xe')]('mainAction')['to'](this),this[_0x1b2e('0x27')]=this['_createPromptView'](),this[_0x1b2e('0x30')]=new _0x401b1b(),this[_0x1b2e('0x29')]=new _0xe1aa1a(),this[_0x1b2e('0x8')]=this[_0x1b2e('0x22')]([this['contentArea'],this[_0x1b2e('0x2e')][_0x1b2e('0x21')],this[_0x1b2e('0x31')],this[_0x1b2e('0x27')]]),this[_0x1b2e('0x32')]=new _0x30eec3({'focusables':this[_0x1b2e('0x8')],'focusTracker':this[_0x1b2e('0x30')],'keystrokeHandler':this[_0x1b2e('0x29')],'actions':{'focusPrevious':_0x1b2e('0x3b'),'focusNext':'tab'}}),this[_0x1b2e('0x27')][_0x1b2e('0x9')]['on'](_0x1b2e('0x36'),_0x1dadab=>{this[_0x1b2e('0x32')][_0x1b2e('0x0')](),_0x1dadab[_0x1b2e('0x10')]();}),this[_0x1b2e('0x27')][_0x1b2e('0x9')]['on'](_0x1b2e('0x1c'),_0x580392=>{this[_0x1b2e('0x32')]['focusPrevious'](),_0x580392['stop']();}),this[_0x1b2e('0x27')]['queryView'][_0x1b2e('0x5')]['bind'](_0x1b2e('0x2f'))['to'](this,_0x1b2e('0x2d'));const _0x313b84=this[_0x1b2e('0x1b')];this['setTemplate']({'tag':_0x1b2e('0x2c'),'attributes':{'class':['ck',_0x1b2e('0x3a'),_0x575898],'tabindex':'-1'},'children':[this[_0x1b2e('0x2')],{'tag':_0x1b2e('0x2c'),'attributes':{'class':['ck',_0x1b2e('0x26')]},'children':[{'tag':'div','attributes':{'class':[_0x313b84['if'](_0x1b2e('0x3f'),_0x1b2e('0x7'),_0x1ceeb0=>!_0x1ceeb0)]},'children':[this[_0x1b2e('0x1f')]]},this[_0x1b2e('0x2e')],this[_0x1b2e('0x31')],this[_0x1b2e('0x27')]]}]});}[_0x1b2e('0x1e')](){super[_0x1b2e('0x1e')](),this[_0x1b2e('0x30')][_0x1b2e('0x35')](this[_0x1b2e('0x2e')]['element']),this[_0x1b2e('0x30')]['add'](this[_0x1b2e('0x2e')][_0x1b2e('0x21')][_0x1b2e('0x28')]),this[_0x1b2e('0x30')][_0x1b2e('0x35')](this[_0x1b2e('0x31')][_0x1b2e('0x28')]),this[_0x1b2e('0x30')]['add'](this['promptView'][_0x1b2e('0x28')]),this['keystrokes'][_0x1b2e('0x13')](this[_0x1b2e('0x28')]);}['focus'](){this['_focusCycler']['focusFirst']();}[_0x1b2e('0x41')](){this['prompt']='',this[_0x1b2e('0x2f')]='',this[_0x1b2e('0x3f')]=!0x1,this['promptView'][_0x1b2e('0x41')](),this['contentArea'][_0x1b2e('0x14')]=!0x1,this[_0x1b2e('0x31')][_0x1b2e('0x14')]=!0x1;}['_createPromptView'](){const _0x439fd0=this[_0x1b2e('0x19')],_0x4b1dd1=new _0x266657(_0x439fd0,{'queryView':{'label':_0x5cccb5(_0x439fd0,_0x1b2e('0x11')),'creator':_0x235368,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x5cccb5(_0x439fd0,_0x1b2e('0x3e')),'secondary':_0x5cccb5(_0x439fd0,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this[_0x1b2e('0x16')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x4b1dd1[_0x1b2e('0xe')](_0x1b2e('0xa'))['to'](this,_0x1b2e('0xa'),this,_0x1b2e('0x12'),(_0x176320,_0x4bdc10)=>_0x176320&&!_0x4bdc10),this[_0x1b2e('0x13')](_0x4b1dd1,'submit',(_0x58eb4a,_0x5cb111)=>{this[_0x1b2e('0x2d')]=_0x5cb111;const _0x3a873=_0x47f229(_0x5cb111);this[_0x1b2e('0x6')](_0x1b2e('0xd'),_0x3a873),_0x5cb111['trim']()&&this[_0x1b2e('0x1a')][_0x1b2e('0x35')]({'prompt':_0x3a873},0x0);},{'priority':_0x1b2e('0xb')}),_0x4b1dd1;}['_createHistoryView'](){const _0x3217b1=new _0x1f85a1(this[_0x1b2e('0x19')]);return _0x3217b1[_0x1b2e('0x3c')][_0x1b2e('0x2a')][_0x1b2e('0x1d')](this[_0x1b2e('0x1a')])['as'](_0x12c1ab),_0x3217b1['on']('clearHistory',()=>{this['_promptHistory'][_0x1b2e('0x18')](),this[_0x1b2e('0x27')][_0x1b2e('0x42')](''),this[_0x1b2e('0x27')][_0x1b2e('0x25')]();}),_0x3217b1;}[_0x1b2e('0x3d')](){const _0x443f00=new _0x51fcbe(this[_0x1b2e('0x19')]);return _0x443f00[_0x1b2e('0xf')][_0x1b2e('0xe')](_0x1b2e('0xa'))['to'](this,_0x1b2e('0xa'),this,_0x1b2e('0x12'),this,_0x1b2e('0x2f'),(_0x3755a6,_0xed5f55,_0x486e43)=>_0x3755a6&&!_0xed5f55&&!!_0x486e43),_0x443f00[_0x1b2e('0xf')]['delegate'](_0x1b2e('0x20'))['to'](this,_0x1b2e('0x40')),_0x443f00[_0x1b2e('0x44')]['bind'](_0x1b2e('0xa'))['to'](this,_0x1b2e('0xa'),this,_0x1b2e('0x12'),this,_0x1b2e('0x2f'),(_0x52425b,_0x3ad703,_0x2cde71)=>_0x52425b&&!_0x3ad703&&!!_0x2cde71),_0x443f00[_0x1b2e('0x44')][_0x1b2e('0x17')]('execute')['to'](this,_0x1b2e('0x34')),_0x443f00[_0x1b2e('0x3')][_0x1b2e('0xe')]('isEnabled')['to'](this,_0x1b2e('0xa'),this,_0x1b2e('0x12'),(_0x27714d,_0x594a74)=>_0x27714d&&!_0x594a74),_0x443f00['tryAgainButton']['delegate']('execute')['to'](this,_0x1b2e('0x2b')),_0x443f00[_0x1b2e('0x38')]['bind'](_0x1b2e('0xa'))['to'](this,_0x1b2e('0x12')),_0x443f00[_0x1b2e('0x38')][_0x1b2e('0x17')]('execute')['to'](this,_0x1b2e('0x1')),_0x443f00;}[_0x1b2e('0x23')](){this[_0x1b2e('0x2f')]='',this[_0x1b2e('0x3f')]=!0x1,this['isProcessing']=!0x0,this['contentArea'][_0x1b2e('0x14')]=!0x0,this[_0x1b2e('0x31')][_0x1b2e('0x14')]=!0x0,this[_0x1b2e('0x2e')][_0x1b2e('0x25')]();}[_0x1b2e('0x15')](){const _0x3bc68e=this[_0x1b2e('0x19')];this['isProcessing']=!0x1,this[_0x1b2e('0x2d')]='',this['promptView'][_0x1b2e('0x41')](),this['value']&&(this['promptView'][_0x1b2e('0xc')][_0x1b2e('0x24')]=_0x5cccb5(_0x3bc68e,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}[_0x1b2e('0x37')](_0x21d096){const _0x2bd7ba=this[_0x1b2e('0x19')];this[_0x1b2e('0x15')](),this['isError']=!0x0,this[_0x1b2e('0x1f')][_0x1b2e('0x39')]=_0x21d096||_0x5cccb5(_0x2bd7ba,'AI_ERROR_FAILED'),this['value']||(this[_0x1b2e('0x2e')]['isVisible']=!0x1);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2baa=['fire','prompt','locale','execute'];(function(_0x30bc41,_0x2baa24){const _0x81ec3d=function(_0x5ec3be){while(--_0x5ec3be){_0x30bc41['push'](_0x30bc41['shift']());}};_0x81ec3d(++_0x2baa24);}(_0x2baa,0x130));const _0x81ec=function(_0x30bc41,_0x2baa24){_0x30bc41=_0x30bc41-0x0;let _0x81ec3d=_0x2baa[_0x30bc41];return _0x81ec3d;};import{ListItemView as _0x4b0e68,ButtonView as _0x34b9ca}from'ckeditor5/src/ui.js';import _0x53de77 from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0x522ed5}from'lodash-es';export default class os extends _0x4b0e68{constructor(_0x276691){super();const _0x2f24ef=new _0x53de77(),_0x5c839b=new _0x34b9ca(this[_0x81ec('0x2')],_0x2f24ef);this['children']['add'](_0x5c839b),_0x5c839b['set']({'label':_0x276691[_0x81ec('0x1')],'withText':!0x0}),_0x5c839b['on'](_0x81ec('0x3'),()=>{this[_0x81ec('0x0')](_0x81ec('0x3'),{'value':_0x522ed5(_0x276691[_0x81ec('0x1')])});});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4b60=['length','label','historyGroupView','set','execute','clearHistory','_createClearHistoryButton','Clear','items','locale','clearHistoryButton','Prompt\x20history','delegate'];(function(_0x427271,_0x4b606b){const _0x3e856b=function(_0xee094a){while(--_0xee094a){_0x427271['push'](_0x427271['shift']());}};_0x3e856b(++_0x4b606b);}(_0x4b60,0x17b));const _0x3e85=function(_0x427271,_0x4b606b){_0x427271=_0x427271-0x0;let _0x3e856b=_0x4b60[_0x427271];return _0x3e856b;};import{ListView as _0x582f77,ListItemGroupView as _0xa6823a,ButtonView as _0x3eee36}from'ckeditor5/src/ui.js';import{getTranslation as _0x48f8a6}from'../../utils/common-translations.js';export default class hs extends _0x582f77{constructor(_0x3602a9){super(_0x3602a9),this[_0x3e85('0x8')]=this['_createClearHistoryButton'](),this[_0x3e85('0x0')]=new _0xa6823a(),this[_0x3e85('0x0')]['children']['add'](this[_0x3e85('0x8')],0x1),this[_0x3e85('0x0')][_0x3e85('0xc')]=_0x48f8a6(_0x3602a9,_0x3e85('0x9')),this['historyGroupView'][_0x3e85('0x6')][_0x3e85('0xa')](_0x3e85('0x2'))['to'](this),this[_0x3e85('0x6')]['add'](this[_0x3e85('0x0')]);}['filter'](){let _0x234879=0x0;for(const _0x4d7eda of this['items'])_0x234879+=_0x4d7eda[_0x3e85('0x6')][_0x3e85('0xb')];return{'resultsCount':_0x234879,'totalItemsCount':_0x234879};}[_0x3e85('0x4')](){const _0x1305ea=this['locale'],_0x1da0c3=new _0x3eee36(this[_0x3e85('0x7')]);return _0x1da0c3[_0x3e85('0x1')]({'label':'('+_0x48f8a6(_0x1305ea,_0x3e85('0x5'))+')','withText':!0x0}),_0x1da0c3['on'](_0x3e85('0x2'),()=>this['fire'](_0x3e85('0x3'))),_0x1da0c3;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3f88=['parse','_saveToSessionStorage','map','_loadFromSessionStorage','getItem','CKEditor/AIFormView/PromptHistory','length','stringify','remove','setItem'];(function(_0x528630,_0x3f8896){const _0x3b78bc=function(_0x4f1c63){while(--_0x4f1c63){_0x528630['push'](_0x528630['shift']());}};_0x3b78bc(++_0x3f8896);}(_0x3f88,0x1be));const _0x3b78=function(_0x528630,_0x3f8896){_0x528630=_0x528630-0x0;let _0x3b78bc=_0x3f88[_0x528630];return _0x3b78bc;};import{Collection as _0x555e9c}from'ckeditor5/src/utils.js';const Ss=_0x3b78('0x9');export default class ns extends _0x555e9c{constructor(){super(),this[_0x3b78('0x7')](),this['on']('add',(_0x26b08c,_0x35ec37)=>{const _0xdcc905=ds(_0x35ec37['prompt']);for(const _0x374002 of this)if(_0x374002!=_0x35ec37&&ds(_0x374002['prompt'])===_0xdcc905){this['remove'](_0x374002);break;}this[_0x3b78('0x0')]>0x14&&this[_0x3b78('0x2')](this['last']),this[_0x3b78('0x5')]();}),this['on'](_0x3b78('0x2'),()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x31b062=sessionStorage[_0x3b78('0x8')](Ss)||'[]';this['addMany'](JSON[_0x3b78('0x4')](_0x31b062));}[_0x3b78('0x5')](){sessionStorage[_0x3b78('0x3')](Ss,JSON[_0x3b78('0x1')](this[_0x3b78('0x6')](_0x106eb2=>_0x106eb2)));}}function ds(_0x1eeec9){return _0x1eeec9['toLowerCase']()['trim']();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4292=['document','showUI','getRanges','getItems','selection','config','editor','isEnabled','element','custom','refresh','name','execute'];(function(_0x7e7bee,_0x4292f2){const _0x5ab71b=function(_0x51609f){while(--_0x51609f){_0x7e7bee['push'](_0x7e7bee['shift']());}};_0x5ab71b(++_0x4292f2);}(_0x4292,0x85));const _0x5ab7=function(_0x7e7bee,_0x4292f2){_0x7e7bee=_0x7e7bee-0x0;let _0x5ab71b=_0x4292[_0x7e7bee];return _0x5ab71b;};import{Command as _0x4f4986}from'ckeditor5/src/core.js';import _0x590a78 from'../aiassistantui.js';export default class I extends _0x4f4986{[_0x5ab7('0x7')](){const _0x19297b=this[_0x5ab7('0x3')]['model'][_0x5ab7('0xa')][_0x5ab7('0x1')],_0x1739c8=this[_0x5ab7('0x3')][_0x5ab7('0x2')]['get']('ai.aiAssistant.disabledElements');for(const _0x5e2fc2 of _0x19297b[_0x5ab7('0xc')]())for(const _0x4b9d04 of _0x5e2fc2[_0x5ab7('0x0')]())if(_0x4b9d04['is'](_0x5ab7('0x5'))&&_0x1739c8['includes'](_0x4b9d04[_0x5ab7('0x8')]))return void(this[_0x5ab7('0x4')]=!0x1);this['isEnabled']=!0x0;}[_0x5ab7('0x9')](_0x2079e4='',_0x5cffe9='',_0xefdfd1=_0x5ab7('0x6')){this['editor']['plugins']['get'](_0x590a78)[_0x5ab7('0xb')](_0x2079e4,_0x5cffe9,_0xefdfd1);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export function getTranslation(
|
|
23
|
+
export function getTranslation(_0x36da9f,_0x29a392,_0x562b5b){const t=_0x36da9f['t'];switch(_0x29a392){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'Translate\x20to\x20%0':return t('Translate\x20to\x20%0',_0x562b5b);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'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'Search\x20AI\x20command':return t('Search\x20AI\x20command');case'No\x20commands\x20found':return t('No\x20commands\x20found');case'No\x20commands\x20available':return t('No\x20commands\x20available');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'},_0x562b5b);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 _0x29a392;}}
|