@ckeditor/ckeditor5-ai 0.0.0-nightly-20231219.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.
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4d05=['focusCycler','render','rtl','showHistoryButtonView','requestAnimationFrame','enter','queryView','minRows','isEnabled','right','maxRows','window','set','bind','ck-ai-form__submit','execute','isEmpty','excludeScrollbarsAndBorders','resultsView','_createShowHistoryButton','width','add','focusableChildren','submit','isVisible','update','left','fieldView','element','submitButtonView','history','filteredView','ck-ai-form__toggle-history','uiLanguageDirection','locale','focus','fieldWrapperChildren','style'];(function(_0x3871a2,_0x4d051e){const _0x51a60b=function(_0x501207){while(--_0x501207){_0x3871a2['push'](_0x3871a2['shift']());}};_0x51a60b(++_0x4d051e);}(_0x4d05,0x151));const _0x51a6=function(_0x3871a2,_0x4d051e){_0x3871a2=_0x3871a2-0x0;let _0x51a60b=_0x4d05[_0x3871a2];return _0x51a60b;};import{Rect as _0x293d28,global as _0x466960,isVisible as _0x5e192d}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x18e358,ButtonView as _0x24e415}from'ckeditor5/src/ui.js';import{icons as _0x4a69a6}from'ckeditor5/src/core.js';import{getTranslation as _0x2a64b3}from'../../utils/common-translations.js';import _0xeceddd from'../../../theme/icons/submit.svg';export default class ht extends _0x18e358{constructor(_0x55cd69,_0x43c59d){super(_0x55cd69,_0x43c59d),this['queryView'][_0x51a6('0x20')][_0x51a6('0xc')]=0x1,this['queryView'][_0x51a6('0x20')][_0x51a6('0xf')]=0x3,this['submitButtonView']=this['_createSubmitButton'](),this[_0x51a6('0x8')]=this['_createShowHistoryButton'](),this[_0x51a6('0x1b')][_0x51a6('0x1a')](this[_0x51a6('0x8')],0x1),this['focusableChildren'][_0x51a6('0x1a')](this[_0x51a6('0x22')]);}[_0x51a6('0x6')](){super['render'](),this['queryView'][_0x51a6('0x3')][_0x51a6('0x1a')](this[_0x51a6('0x8')]),this['children'][_0x51a6('0x1a')](this[_0x51a6('0x22')]),this['keystrokes'][_0x51a6('0x11')](_0x51a6('0xa'),(_0x50e13c,_0x4dfe0a)=>{_0x50e13c['target']==this['queryView'][_0x51a6('0x20')][_0x51a6('0x21')]&&(this['submit'](),_0x4dfe0a());});}['_createSubmitButton'](){const _0x3b4eb2=new _0x24e415(this[_0x51a6('0x1')]),_0x168ce5=this['locale'];return _0x3b4eb2['set']({'icon':_0xeceddd,'label':_0x2a64b3(_0x168ce5,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':_0x51a6('0x13')}),_0x3b4eb2['on'](_0x51a6('0x14'),()=>{this[_0x51a6('0x1c')]();}),_0x3b4eb2[_0x51a6('0x12')](_0x51a6('0xd'))['to'](this[_0x51a6('0xb')][_0x51a6('0x20')],_0x51a6('0x15'),this,_0x51a6('0xd'),(_0x29d530,_0x532130)=>!_0x29d530&&_0x532130),_0x3b4eb2;}[_0x51a6('0x18')](){const _0x5ef713=new _0x24e415(this[_0x51a6('0x1')]),_0x2946a2=this[_0x51a6('0x17')],_0x2a0abf=this['locale'];_0x5ef713['set']({'label':_0x2a64b3(_0x2a0abf,'History'),'withText':!0x1,'icon':_0x4a69a6[_0x51a6('0x23')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x51a6('0x25')}),_0x5ef713[_0x51a6('0x12')]('isOn')['to'](_0x2946a2,_0x51a6('0x1d')),_0x5ef713[_0x51a6('0x12')](_0x51a6('0xd'))['to'](this,'isEnabled'),_0x5ef713['on']('execute',()=>{_0x2946a2[_0x51a6('0x1d')]=!_0x2946a2[_0x51a6('0x1d')],_0x2946a2[_0x51a6('0x1d')]?this[_0x51a6('0x24')][_0x51a6('0x2')]():this[_0x51a6('0x2')]();});const _0x5e9518=()=>{_0x466960[_0x51a6('0x10')][_0x51a6('0x9')](()=>{if(_0x5e192d(this[_0x51a6('0x21')])){const _0xb43802=new _0x293d28(this[_0x51a6('0xb')]['fieldView'][_0x51a6('0x21')]),_0x42b7eb=_0xb43802[_0x51a6('0x19')],_0x362f97=_0x51a6('0x7')===_0x2a0abf[_0x51a6('0x0')]?_0x51a6('0x1f'):_0x51a6('0xe');_0xb43802[_0x51a6('0x16')](),_0x5ef713['element'][_0x51a6('0x4')][_0x362f97]=_0x42b7eb-_0xb43802[_0x51a6('0x19')]+0x1+'px';}});};return this[_0x51a6('0xb')][_0x51a6('0x20')]['on'](_0x51a6('0x1e'),_0x5e9518),this['on'](_0x51a6('0x6'),_0x5e9518),_0x5ef713;}[_0x51a6('0x1c')](){const _0xc9e6d5=this[_0x51a6('0xb')][_0x51a6('0x20')]['element']['value'];this['fire']('submit',_0xc9e6d5);}[_0x51a6('0x2')](_0x4254e7){-0x1===_0x4254e7?this[_0x51a6('0x5')]['focusLast']():this['focusCycler']['focusFirst']();}}
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 _0x1662=['label','ck-button-action','_createButton','isVisible','Insert\x20below','addMany','Try\x20again','_CONTENT','insertButton','bind','items','tryAgainButton','REPLACE','INSERT','replace','locale','replaceButton','bindTemplate','stopButton','toUpperCase','set','insert','extendTemplate','ck-ai-form__toolbar'];(function(_0x31d825,_0x16627b){const _0x29d438=function(_0x498ec1){while(--_0x498ec1){_0x31d825['push'](_0x31d825['shift']());}};_0x29d438(++_0x16627b);}(_0x1662,0x135));const _0x29d4=function(_0x31d825,_0x16627b){_0x31d825=_0x31d825-0x0;let _0x29d438=_0x1662[_0x31d825];return _0x29d438;};import{ToolbarView as _0x38c639,ButtonView as _0x535cfe}from'ckeditor5/src/ui.js';import{getTranslation as _0x1c3eed}from'../../utils/common-translations.js';export var AIFormToolbarViewMainActionLabel;!function(_0x1683ee){_0x1683ee[_0x29d4('0xf')]=_0x29d4('0x11'),_0x1683ee[_0x29d4('0x10')]=_0x29d4('0x0');}(AIFormToolbarViewMainActionLabel||(AIFormToolbarViewMainActionLabel={}));export default class ti extends _0x38c639{constructor(_0x30a512){super(_0x30a512),this['set'](_0x29d4('0x6'),!0x1),this[_0x29d4('0x17')]('mainAction',AIFormToolbarViewMainActionLabel[_0x29d4('0xf')]),this[_0x29d4('0x13')]=this['_createButton']('',_0x29d4('0x4')),this[_0x29d4('0x13')][_0x29d4('0xc')](_0x29d4('0x3'))['to'](this,'mainAction',_0x3f0c55=>_0x1c3eed(_0x30a512,'AI_'+_0x3f0c55[_0x29d4('0x16')]()+_0x29d4('0xa'))),this[_0x29d4('0xb')]=this[_0x29d4('0x5')](_0x1c3eed(_0x30a512,_0x29d4('0x7'))),this[_0x29d4('0xe')]=this['_createButton'](_0x1c3eed(_0x30a512,_0x29d4('0x9'))),this[_0x29d4('0x15')]=this[_0x29d4('0x5')](_0x1c3eed(_0x30a512,'Stop'));const _0x26666b=this[_0x29d4('0x14')];this[_0x29d4('0x1')]({'attributes':{'class':[_0x29d4('0x2'),_0x26666b['if'](_0x29d4('0x6'),'ck-hidden',_0xfaa859=>!_0xfaa859)]}}),this[_0x29d4('0xd')][_0x29d4('0x8')]([this[_0x29d4('0x13')],this[_0x29d4('0xb')],this[_0x29d4('0xe')],this[_0x29d4('0x15')]]);}[_0x29d4('0x5')](_0x4ee36a,_0x3cb987){const _0x3b9140=new _0x535cfe(this[_0x29d4('0x12')]);return _0x3b9140[_0x29d4('0x17')]({'label':_0x4ee36a,'class':_0x3cb987||'','isVisible':!0x0,'withText':!0x0}),_0x3b9140;}}
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 _0x16bc=['clear','Empty\x20history','isEnabled','locale','reset','promptView','ck-ai-form','clearHistory','focus','startProcessing','execute','stopProcessing','items','_createToolbar','delegate','label','div','AI\x20Assistant','text','Ask\x20AI\x20to\x20improve\x20generated\x20text','handleError','listenTo','element','add','isError','toolbar','historyGroupView','tryAgainEvent','focusCycler','submitPrompt','bindTo','REPLACE','set','_promptHistory','insertButton','_focusables','focusPrevious','replaceContent','_createPromptView','keystrokes','replaceButton','ck-hidden','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','errorView','focusTracker','high','forwardCycle','copyButtonView','submit','contentArea','mainAction','tab','Ask\x20AI\x20to\x20edit\x20or\x20generate','_focusCycler','ck-ai-form-content','setTemplate','prompt','header','isProcessing','AI_ERROR_FAILED','focusNext','bindTemplate','fieldView','value','bind','stopButton','createCollection','backwardCycle','search','shift\x20+\x20tab','stop','tryAgainButton','fire','queryView','isVisible','finishProcessing','trim'];(function(_0x4b377e,_0x16bce7){const _0x435b1a=function(_0x54f358){while(--_0x54f358){_0x4b377e['push'](_0x4b377e['shift']());}};_0x435b1a(++_0x16bce7);}(_0x16bc,0x1a0));const _0x435b=function(_0x4b377e,_0x16bce7){_0x4b377e=_0x4b377e-0x0;let _0x435b1a=_0x16bc[_0x4b377e];return _0x435b1a;};import{FocusTracker as _0x27aa5b,KeystrokeHandler as _0x441e8f}from'ckeditor5/src/utils.js';import{View as _0x37b29f,FocusCycler as _0x41b0e9,createLabeledTextarea as _0x1515c3,FormHeaderView as _0x597e6e}from'ckeditor5/src/ui.js';import _0x3105c9,{AIFormToolbarViewMainActionLabel as _0x9f60f1}from'./aiformtoolbarview.js';import _0x28a901 from'./aiformcontentarea.js';import _0x2bf552 from'./aiformerrorview.js';import _0x3f0237 from'./aiformpromptview.js';import _0x183f18 from'./aihistorylistview.js';import _0x4e8a13 from'./aihistorylistitemview.js';import _0x247839 from'./prompthistory.js';import{getTranslation as _0x861c55}from'../../utils/common-translations.js';import{escape as _0x4970fd}from'lodash-es';import _0x531217 from'../../../theme/icons/robot-pencil.svg';export default class v extends _0x37b29f{constructor(_0x12afab,_0x47fc84,_0x53aa5f=''){super(_0x12afab),this[_0x435b('0x1')]('isEnabled',!0x0),this[_0x435b('0x1')](_0x435b('0x1b'),!0x1),this[_0x435b('0x1')](_0x435b('0x19'),''),this[_0x435b('0x1')](_0x435b('0x20'),''),this[_0x435b('0x1')]('isError',!0x1),this['set'](_0x435b('0x13'),_0x9f60f1[_0x435b('0x0')]),this[_0x435b('0x2')]=new _0x247839(),this[_0x435b('0xc')]=new _0x2bf552(_0x12afab),this[_0x435b('0x1a')]=new _0x597e6e(_0x12afab,{'label':_0x861c55(_0x12afab,_0x435b('0x3f')),'icon':_0x531217}),this[_0x435b('0x12')]=new _0x28a901(_0x12afab,_0x53aa5f),this['contentArea']['bind'](_0x435b('0x1b'))['to'](this),this['contentArea'][_0x435b('0x21')](_0x435b('0x20'))['to'](this),this[_0x435b('0x47')]=this[_0x435b('0x3b')](),this[_0x435b('0x47')][_0x435b('0x21')](_0x435b('0x13'))['to'](this),this[_0x435b('0x33')]=this[_0x435b('0x7')](),this[_0x435b('0xd')]=new _0x27aa5b(),this[_0x435b('0x8')]=new _0x441e8f(),this[_0x435b('0x4')]=this[_0x435b('0x23')]([this[_0x435b('0x12')],this['contentArea'][_0x435b('0x10')],this[_0x435b('0x47')],this['promptView']]),this[_0x435b('0x16')]=new _0x41b0e9({'focusables':this[_0x435b('0x4')],'focusTracker':this[_0x435b('0xd')],'keystrokeHandler':this[_0x435b('0x8')],'actions':{'focusPrevious':_0x435b('0x26'),'focusNext':_0x435b('0x14')}}),this[_0x435b('0x33')][_0x435b('0x4a')]['on'](_0x435b('0xf'),_0xcdc61e=>{this[_0x435b('0x16')][_0x435b('0x1d')](),_0xcdc61e[_0x435b('0x27')]();}),this[_0x435b('0x33')][_0x435b('0x4a')]['on'](_0x435b('0x24'),_0x5e5742=>{this[_0x435b('0x16')][_0x435b('0x5')](),_0x5e5742[_0x435b('0x27')]();}),this[_0x435b('0x33')][_0x435b('0x2a')][_0x435b('0x1f')][_0x435b('0x21')]('value')['to'](this,_0x435b('0x19'));const _0x471d27=this[_0x435b('0x1e')];this[_0x435b('0x18')]({'tag':_0x435b('0x3e'),'attributes':{'class':['ck',_0x435b('0x34'),_0x47fc84],'tabindex':'-1'},'children':[this['header'],{'tag':'div','attributes':{'class':['ck',_0x435b('0x17')]},'children':[{'tag':_0x435b('0x3e'),'attributes':{'class':[_0x471d27['if']('isError',_0x435b('0xa'),_0x4e7ca4=>!_0x4e7ca4)]},'children':[this[_0x435b('0xc')]]},this[_0x435b('0x12')],this['toolbar'],this[_0x435b('0x33')]]}]});}['render'](){super['render'](),this[_0x435b('0xd')][_0x435b('0x45')](this[_0x435b('0x12')]['element']),this[_0x435b('0xd')][_0x435b('0x45')](this[_0x435b('0x12')][_0x435b('0x10')][_0x435b('0x44')]),this[_0x435b('0xd')][_0x435b('0x45')](this[_0x435b('0x47')][_0x435b('0x44')]),this[_0x435b('0xd')]['add'](this['promptView'][_0x435b('0x44')]),this[_0x435b('0x8')][_0x435b('0x43')](this[_0x435b('0x44')]);}[_0x435b('0x36')](){this[_0x435b('0x16')]['focusFirst']();}[_0x435b('0x32')](){this[_0x435b('0x19')]='',this[_0x435b('0x20')]='',this[_0x435b('0x46')]=!0x1,this[_0x435b('0x33')][_0x435b('0x32')](),this['contentArea']['isVisible']=!0x1,this[_0x435b('0x47')][_0x435b('0x2b')]=!0x1;}[_0x435b('0x7')](){const _0xfd6dc4=this[_0x435b('0x31')],_0x30a541=new _0x3f0237(_0xfd6dc4,{'queryView':{'label':_0x861c55(_0xfd6dc4,_0x435b('0x15')),'creator':_0x1515c3,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x861c55(_0xfd6dc4,_0x435b('0x2f')),'secondary':_0x861c55(_0xfd6dc4,_0x435b('0xb'))}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x30a541[_0x435b('0x21')](_0x435b('0x30'))['to'](this,'isEnabled',this,_0x435b('0x1b'),(_0x353240,_0x574b06)=>_0x353240&&!_0x574b06),this[_0x435b('0x43')](_0x30a541,_0x435b('0x11'),(_0x20583d,_0x4f7af3)=>{this[_0x435b('0x19')]=_0x4f7af3;const _0x5621ea=_0x4970fd(_0x4f7af3);this[_0x435b('0x29')](_0x435b('0x4b'),_0x5621ea),_0x4f7af3[_0x435b('0x2d')]()&&this[_0x435b('0x2')]['add']({'prompt':_0x5621ea},0x0);},{'priority':_0x435b('0xe')}),_0x30a541;}['_createHistoryView'](){const _0x48fac8=new _0x183f18(this[_0x435b('0x31')]);return _0x48fac8[_0x435b('0x48')][_0x435b('0x3a')][_0x435b('0x4c')](this[_0x435b('0x2')])['as'](_0x4e8a13),_0x48fac8['on'](_0x435b('0x35'),()=>{this['_promptHistory'][_0x435b('0x2e')](),this[_0x435b('0x33')][_0x435b('0x25')](''),this['promptView']['focus']();}),_0x48fac8;}[_0x435b('0x3b')](){const _0xfdcacb=new _0x3105c9(this['locale']);return _0xfdcacb[_0x435b('0x9')][_0x435b('0x21')](_0x435b('0x30'))['to'](this,_0x435b('0x30'),this,'isProcessing',this,_0x435b('0x20'),(_0x1d111a,_0x5540f1,_0x28c65d)=>_0x1d111a&&!_0x5540f1&&!!_0x28c65d),_0xfdcacb[_0x435b('0x9')][_0x435b('0x3c')](_0x435b('0x38'))['to'](this,_0x435b('0x6')),_0xfdcacb[_0x435b('0x3')][_0x435b('0x21')]('isEnabled')['to'](this,_0x435b('0x30'),this,'isProcessing',this,'value',(_0x128c8e,_0x2bc622,_0x18a478)=>_0x128c8e&&!_0x2bc622&&!!_0x18a478),_0xfdcacb[_0x435b('0x3')][_0x435b('0x3c')](_0x435b('0x38'))['to'](this,'insertContentBelow'),_0xfdcacb[_0x435b('0x28')][_0x435b('0x21')](_0x435b('0x30'))['to'](this,_0x435b('0x30'),this,_0x435b('0x1b'),(_0x1c0eb0,_0x4deefc)=>_0x1c0eb0&&!_0x4deefc),_0xfdcacb[_0x435b('0x28')][_0x435b('0x3c')](_0x435b('0x38'))['to'](this,_0x435b('0x49')),_0xfdcacb['stopButton']['bind']('isEnabled')['to'](this,_0x435b('0x1b')),_0xfdcacb[_0x435b('0x22')][_0x435b('0x3c')](_0x435b('0x38'))['to'](this,_0x435b('0x39')),_0xfdcacb;}[_0x435b('0x37')](){this[_0x435b('0x20')]='',this['isError']=!0x1,this[_0x435b('0x1b')]=!0x0,this[_0x435b('0x12')][_0x435b('0x2b')]=!0x0,this[_0x435b('0x47')]['isVisible']=!0x0,this[_0x435b('0x12')][_0x435b('0x36')]();}['finishProcessing'](){const _0x3f3096=this[_0x435b('0x31')];this[_0x435b('0x1b')]=!0x1,this[_0x435b('0x19')]='',this[_0x435b('0x33')][_0x435b('0x32')](),this[_0x435b('0x20')]&&(this[_0x435b('0x33')]['queryView'][_0x435b('0x3d')]=_0x861c55(_0x3f3096,_0x435b('0x41')));}[_0x435b('0x42')](_0x12e6d4){const _0x5232fa=this['locale'];this[_0x435b('0x2c')](),this[_0x435b('0x46')]=!0x0,this[_0x435b('0xc')][_0x435b('0x40')]=_0x12e6d4||_0x861c55(_0x5232fa,_0x435b('0x1c')),this[_0x435b('0x20')]||(this['contentArea'][_0x435b('0x2b')]=!0x1);}}
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 _0x1636=['prompt','add','children','fire','locale','execute','set'];(function(_0x150a23,_0x1636d1){const _0x36e097=function(_0x3f389a){while(--_0x3f389a){_0x150a23['push'](_0x150a23['shift']());}};_0x36e097(++_0x1636d1);}(_0x1636,0x69));const _0x36e0=function(_0x150a23,_0x1636d1){_0x150a23=_0x150a23-0x0;let _0x36e097=_0x1636[_0x150a23];return _0x36e097;};import{ListItemView as _0x96b59a,ButtonView as _0x3d883a}from'ckeditor5/src/ui.js';import _0xd4776d from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0x5977c9}from'lodash-es';export default class os extends _0x96b59a{constructor(_0x35ca90){super();const _0xe043de=new _0xd4776d(),_0x577a5a=new _0x3d883a(this[_0x36e0('0x4')],_0xe043de);this[_0x36e0('0x2')][_0x36e0('0x1')](_0x577a5a),_0x577a5a[_0x36e0('0x6')]({'label':_0x35ca90[_0x36e0('0x0')],'withText':!0x0}),_0x577a5a['on']('execute',()=>{this[_0x36e0('0x3')](_0x36e0('0x5'),{'value':_0x5977c9(_0x35ca90['prompt'])});});}}
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 _0x5988=['Prompt\x20history','add','_createClearHistoryButton','delegate','items','children','length','filter','clearHistoryButton','fire','historyGroupView','label','clearHistory','locale'];(function(_0x402e44,_0x598877){const _0x656b36=function(_0x38475f){while(--_0x38475f){_0x402e44['push'](_0x402e44['shift']());}};_0x656b36(++_0x598877);}(_0x5988,0x171));const _0x656b=function(_0x402e44,_0x598877){_0x402e44=_0x402e44-0x0;let _0x656b36=_0x5988[_0x402e44];return _0x656b36;};import{ListView as _0x39ab4f,ListItemGroupView as _0x1aab47,ButtonView as _0x3cfe53}from'ckeditor5/src/ui.js';import{getTranslation as _0x1ab027}from'../../utils/common-translations.js';export default class hs extends _0x39ab4f{constructor(_0x8c2e57){super(_0x8c2e57),this[_0x656b('0x3')]=this[_0x656b('0xb')](),this[_0x656b('0x5')]=new _0x1aab47(),this[_0x656b('0x5')][_0x656b('0x0')][_0x656b('0xa')](this[_0x656b('0x3')],0x1),this['historyGroupView'][_0x656b('0x6')]=_0x1ab027(_0x8c2e57,_0x656b('0x9')),this[_0x656b('0x5')][_0x656b('0xd')][_0x656b('0xc')]('execute')['to'](this),this['items'][_0x656b('0xa')](this['historyGroupView']);}[_0x656b('0x2')](){let _0x437605=0x0;for(const _0x2e57fd of this['items'])_0x437605+=_0x2e57fd[_0x656b('0xd')][_0x656b('0x1')];return{'resultsCount':_0x437605,'totalItemsCount':_0x437605};}['_createClearHistoryButton'](){const _0x4b488f=this[_0x656b('0x8')],_0x30b905=new _0x3cfe53(this[_0x656b('0x8')]);return _0x30b905['set']({'label':'('+_0x1ab027(_0x4b488f,'Clear')+')','withText':!0x0}),_0x30b905['on']('execute',()=>this[_0x656b('0x4')](_0x656b('0x7'))),_0x30b905;}}
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 _0x5bbe=['setItem','addMany','add','trim','parse','last','getItem','length','map','prompt','remove','stringify','toLowerCase','_saveToSessionStorage'];(function(_0x47fd66,_0x5bbe21){const _0x4d7be0=function(_0x3a1b65){while(--_0x3a1b65){_0x47fd66['push'](_0x47fd66['shift']());}};_0x4d7be0(++_0x5bbe21);}(_0x5bbe,0x192));const _0x4d7b=function(_0x47fd66,_0x5bbe21){_0x47fd66=_0x47fd66-0x0;let _0x4d7be0=_0x5bbe[_0x47fd66];return _0x4d7be0;};import{Collection as _0x7fe4b8}from'ckeditor5/src/utils.js';const Ss='CKEditor/AIFormView/PromptHistory';export default class ns extends _0x7fe4b8{constructor(){super(),this['_loadFromSessionStorage'](),this['on'](_0x4d7b('0x6'),(_0x5f1f81,_0x50c1c2)=>{const _0x430f15=ds(_0x50c1c2[_0x4d7b('0xd')]);for(const _0xeada01 of this)if(_0xeada01!=_0x50c1c2&&ds(_0xeada01[_0x4d7b('0xd')])===_0x430f15){this[_0x4d7b('0x0')](_0xeada01);break;}this[_0x4d7b('0xb')]>0x14&&this[_0x4d7b('0x0')](this[_0x4d7b('0x9')]),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this[_0x4d7b('0x3')]();});}['_loadFromSessionStorage'](){const _0x51f5dc=sessionStorage[_0x4d7b('0xa')](Ss)||'[]';this[_0x4d7b('0x5')](JSON[_0x4d7b('0x8')](_0x51f5dc));}[_0x4d7b('0x3')](){sessionStorage[_0x4d7b('0x4')](Ss,JSON[_0x4d7b('0x1')](this[_0x4d7b('0xc')](_0x487e41=>_0x487e41)));}}function ds(_0x464d07){return _0x464d07[_0x4d7b('0x2')]()[_0x4d7b('0x7')]();}
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 _0x3a56=['config','refresh','getRanges','model','name','includes','getItems','editor','isEnabled','showUI','element','custom','execute','selection'];(function(_0x50eade,_0x3a562c){const _0x520f69=function(_0x5a8ee7){while(--_0x5a8ee7){_0x50eade['push'](_0x50eade['shift']());}};_0x520f69(++_0x3a562c);}(_0x3a56,0x1b8));const _0x520f=function(_0x50eade,_0x3a562c){_0x50eade=_0x50eade-0x0;let _0x520f69=_0x3a56[_0x50eade];return _0x520f69;};import{Command as _0x128fe8}from'ckeditor5/src/core.js';import _0x141326 from'../aiassistantui.js';export default class I extends _0x128fe8{[_0x520f('0x9')](){const _0x150156=this['editor'][_0x520f('0xb')]['document'][_0x520f('0x7')],_0xc042c9=this[_0x520f('0x1')][_0x520f('0x8')]['get']('ai.aiAssistant.disabledElements');for(const _0xc5fb2c of _0x150156[_0x520f('0xa')]())for(const _0x1f4779 of _0xc5fb2c[_0x520f('0x0')]())if(_0x1f4779['is'](_0x520f('0x4'))&&_0xc042c9[_0x520f('0xd')](_0x1f4779[_0x520f('0xc')]))return void(this[_0x520f('0x2')]=!0x1);this[_0x520f('0x2')]=!0x0;}[_0x520f('0x6')](_0x283a7c='',_0x1cdf15='',_0x276626=_0x520f('0x5')){this['editor']['plugins']['get'](_0x141326)[_0x520f('0x3')](_0x283a7c,_0x1cdf15,_0x276626);}}
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(_0x2f6204,_0x5f31aa,_0x11c002){const t=_0x2f6204['t'];switch(_0x5f31aa){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',_0x11c002);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'},_0x11c002);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 _0x5f31aa;}}
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;}}