@ckeditor/ckeditor5-ai 0.0.0-nightly-20240129.0 → 0.0.0-nightly-20240131.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 _0x5bd1=['filteredView','element','focus','window','add','ck-ai-form__toggle-history','queryView','fieldView','history','uiLanguageDirection','width','enter','bind','maxRows','locale','focusLast','focusableChildren','History','resultsView','submitButtonView','execute','isEnabled','Submit','focusCycler','excludeScrollbarsAndBorders','ck-ai-form__submit','isEmpty','style','render','_createShowHistoryButton','minRows','focusFirst','set','submit','fieldWrapperChildren','update','keystrokes','_createSubmitButton','isVisible','showHistoryButtonView'];(function(_0x3bc6a1,_0x5bd1df){const _0x1d1195=function(_0x435a74){while(--_0x435a74){_0x3bc6a1['push'](_0x3bc6a1['shift']());}};_0x1d1195(++_0x5bd1df);}(_0x5bd1,0x15f));const _0x1d11=function(_0x3bc6a1,_0x5bd1df){_0x3bc6a1=_0x3bc6a1-0x0;let _0x1d1195=_0x5bd1[_0x3bc6a1];return _0x1d1195;};import{Rect as _0x3e0515,global as _0xb36f50,isVisible as _0x4d673f}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x1b54c3,ButtonView as _0xbc3e4c}from'ckeditor5/src/ui.js';import{icons as _0x59b6a2}from'ckeditor5/src/core.js';import{getTranslation as _0x32a94b}from'../../utils/common-translations.js';import _0x39bcef from'../../../theme/icons/submit.svg';export default class ht extends _0x1b54c3{constructor(_0x1620f1,_0x4b5c09){super(_0x1620f1,_0x4b5c09),this[_0x1d11('0xf')][_0x1d11('0x10')][_0x1d11('0x27')]=0x1,this[_0x1d11('0xf')]['fieldView'][_0x1d11('0x16')]=0x3,this[_0x1d11('0x1c')]=this[_0x1d11('0x6')](),this['showHistoryButtonView']=this[_0x1d11('0x26')](),this[_0x1d11('0x19')][_0x1d11('0xd')](this[_0x1d11('0x8')],0x1),this['focusableChildren'][_0x1d11('0xd')](this[_0x1d11('0x1c')]);}[_0x1d11('0x25')](){super[_0x1d11('0x25')](),this[_0x1d11('0xf')][_0x1d11('0x3')][_0x1d11('0xd')](this[_0x1d11('0x8')]),this['children']['add'](this[_0x1d11('0x1c')]),this[_0x1d11('0x5')][_0x1d11('0x1')](_0x1d11('0x14'),(_0x588abf,_0x36c8ad)=>{_0x588abf['target']==this[_0x1d11('0xf')]['fieldView'][_0x1d11('0xa')]&&(this[_0x1d11('0x2')](),_0x36c8ad());});}[_0x1d11('0x6')](){const _0x55049f=new _0xbc3e4c(this['locale']),_0x4636e7=this[_0x1d11('0x17')];return _0x55049f[_0x1d11('0x1')]({'icon':_0x39bcef,'label':_0x32a94b(_0x4636e7,_0x1d11('0x1f')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x1d11('0x22')}),_0x55049f['on']('execute',()=>{this[_0x1d11('0x2')]();}),_0x55049f['bind'](_0x1d11('0x1e'))['to'](this[_0x1d11('0xf')]['fieldView'],_0x1d11('0x23'),this,_0x1d11('0x1e'),(_0x35a944,_0x52068b)=>!_0x35a944&&_0x52068b),_0x55049f;}[_0x1d11('0x26')](){const _0x391743=new _0xbc3e4c(this[_0x1d11('0x17')]),_0x5c1551=this[_0x1d11('0x1b')],_0x4b5fbd=this['locale'];_0x391743[_0x1d11('0x1')]({'label':_0x32a94b(_0x4b5fbd,_0x1d11('0x1a')),'withText':!0x1,'icon':_0x59b6a2[_0x1d11('0x11')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x1d11('0xe')}),_0x391743[_0x1d11('0x15')]('isOn')['to'](_0x5c1551,_0x1d11('0x7')),_0x391743[_0x1d11('0x15')]('isEnabled')['to'](this,_0x1d11('0x1e')),_0x391743['on'](_0x1d11('0x1d'),()=>{_0x5c1551[_0x1d11('0x7')]=!_0x5c1551[_0x1d11('0x7')],_0x5c1551['isVisible']?this[_0x1d11('0x9')][_0x1d11('0xb')]():this['focus']();});const _0x1d535a=()=>{_0xb36f50[_0x1d11('0xc')]['requestAnimationFrame'](()=>{if(_0x4d673f(this[_0x1d11('0xa')])){const _0x7a62b9=new _0x3e0515(this[_0x1d11('0xf')][_0x1d11('0x10')][_0x1d11('0xa')]),_0x512116=_0x7a62b9[_0x1d11('0x13')],_0x1c6dee='rtl'===_0x4b5fbd[_0x1d11('0x12')]?'left':'right';_0x7a62b9[_0x1d11('0x21')](),_0x391743[_0x1d11('0xa')][_0x1d11('0x24')][_0x1c6dee]=_0x512116-_0x7a62b9['width']+0x1+'px';}});};return this['queryView']['fieldView']['on'](_0x1d11('0x4'),_0x1d535a),this['on'](_0x1d11('0x25'),_0x1d535a),_0x391743;}[_0x1d11('0x2')](){const _0x33d3f5=this['queryView'][_0x1d11('0x10')][_0x1d11('0xa')]['value'];this['fire'](_0x1d11('0x2'),_0x33d3f5);}[_0x1d11('0xb')](_0xce3c8d){-0x1===_0xce3c8d?this[_0x1d11('0x20')][_0x1d11('0x18')]():this[_0x1d11('0x20')][_0x1d11('0x0')]();}}
23
+ const _0x265c=['value','isEmpty','excludeScrollbarsAndBorders','requestAnimationFrame','locale','focusFirst','_createSubmitButton','focusCycler','ck-ai-form__submit','focusLast','window','submit','render','left','filteredView','minRows','resultsView','submitButtonView','add','history','execute','fieldWrapperChildren','set','enter','fieldView','focus','ck-ai-form__toggle-history','style','isEnabled','_createShowHistoryButton','fire','focusableChildren','maxRows','isVisible','children','update','width','History','element','bind','keystrokes','queryView'];(function(_0x45bf93,_0x265cd9){const _0x3a75f7=function(_0x9a0fbf){while(--_0x9a0fbf){_0x45bf93['push'](_0x45bf93['shift']());}};_0x3a75f7(++_0x265cd9);}(_0x265c,0x189));const _0x3a75=function(_0x45bf93,_0x265cd9){_0x45bf93=_0x45bf93-0x0;let _0x3a75f7=_0x265c[_0x45bf93];return _0x3a75f7;};import{Rect as _0x28e68e,global as _0x3efedf,isVisible as _0xc8d8e5}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x26bb08,ButtonView as _0x14c592}from'ckeditor5/src/ui.js';import{icons as _0x287e28}from'ckeditor5/src/core.js';import{getTranslation as _0x177925}from'../../utils/common-translations.js';import _0x50bfd9 from'../../../theme/icons/submit.svg';export default class ht extends _0x26bb08{constructor(_0x32c6c5,_0x15749d){super(_0x32c6c5,_0x15749d),this[_0x3a75('0x1a')]['fieldView'][_0x3a75('0x0')]=0x1,this[_0x3a75('0x1a')]['fieldView'][_0x3a75('0x11')]=0x3,this[_0x3a75('0x2')]=this[_0x3a75('0x21')](),this['showHistoryButtonView']=this[_0x3a75('0xe')](),this[_0x3a75('0x10')][_0x3a75('0x3')](this['showHistoryButtonView'],0x1),this[_0x3a75('0x10')][_0x3a75('0x3')](this[_0x3a75('0x2')]);}[_0x3a75('0x27')](){super[_0x3a75('0x27')](),this['queryView'][_0x3a75('0x6')]['add'](this['showHistoryButtonView']),this[_0x3a75('0x13')][_0x3a75('0x3')](this['submitButtonView']),this[_0x3a75('0x19')][_0x3a75('0x7')](_0x3a75('0x8'),(_0x2fc54c,_0x850b0)=>{_0x2fc54c['target']==this[_0x3a75('0x1a')][_0x3a75('0x9')][_0x3a75('0x17')]&&(this[_0x3a75('0x26')](),_0x850b0());});}[_0x3a75('0x21')](){const _0x216c70=new _0x14c592(this[_0x3a75('0x1f')]),_0xbac477=this[_0x3a75('0x1f')];return _0x216c70[_0x3a75('0x7')]({'icon':_0x50bfd9,'label':_0x177925(_0xbac477,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':_0x3a75('0x23')}),_0x216c70['on'](_0x3a75('0x5'),()=>{this['submit']();}),_0x216c70[_0x3a75('0x18')]('isEnabled')['to'](this[_0x3a75('0x1a')]['fieldView'],_0x3a75('0x1c'),this,_0x3a75('0xd'),(_0x40c49d,_0xed012a)=>!_0x40c49d&&_0xed012a),_0x216c70;}[_0x3a75('0xe')](){const _0x11cde2=new _0x14c592(this[_0x3a75('0x1f')]),_0x917efd=this[_0x3a75('0x1')],_0x4e2cb3=this[_0x3a75('0x1f')];_0x11cde2[_0x3a75('0x7')]({'label':_0x177925(_0x4e2cb3,_0x3a75('0x16')),'withText':!0x1,'icon':_0x287e28[_0x3a75('0x4')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x3a75('0xb')}),_0x11cde2[_0x3a75('0x18')]('isOn')['to'](_0x917efd,_0x3a75('0x12')),_0x11cde2[_0x3a75('0x18')]('isEnabled')['to'](this,_0x3a75('0xd')),_0x11cde2['on']('execute',()=>{_0x917efd['isVisible']=!_0x917efd[_0x3a75('0x12')],_0x917efd[_0x3a75('0x12')]?this[_0x3a75('0x29')][_0x3a75('0xa')]():this[_0x3a75('0xa')]();});const _0xb3688=()=>{_0x3efedf[_0x3a75('0x25')][_0x3a75('0x1e')](()=>{if(_0xc8d8e5(this[_0x3a75('0x17')])){const _0x3449cc=new _0x28e68e(this['queryView'][_0x3a75('0x9')]['element']),_0x302e8f=_0x3449cc[_0x3a75('0x15')],_0x50dcdc='rtl'===_0x4e2cb3['uiLanguageDirection']?_0x3a75('0x28'):'right';_0x3449cc[_0x3a75('0x1d')](),_0x11cde2['element'][_0x3a75('0xc')][_0x50dcdc]=_0x302e8f-_0x3449cc[_0x3a75('0x15')]+0x1+'px';}});};return this[_0x3a75('0x1a')]['fieldView']['on'](_0x3a75('0x14'),_0xb3688),this['on']('render',_0xb3688),_0x11cde2;}['submit'](){const _0x54e4f5=this[_0x3a75('0x1a')][_0x3a75('0x9')]['element'][_0x3a75('0x1b')];this[_0x3a75('0xf')](_0x3a75('0x26'),_0x54e4f5);}['focus'](_0x95caa9){-0x1===_0x95caa9?this[_0x3a75('0x22')][_0x3a75('0x24')]():this['focusCycler'][_0x3a75('0x20')]();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3ba5=['insertButton','mainAction','locale','set','bind','items','extendTemplate','replaceButton','Try\x20again','replace','tryAgainButton','addMany','_CONTENT','ck-hidden','label','REPLACE','stopButton','_createButton','insert','AI_','isVisible'];(function(_0x32ae3e,_0x3ba5ed){const _0x484fb8=function(_0xb22a6d){while(--_0xb22a6d){_0x32ae3e['push'](_0x32ae3e['shift']());}};_0x484fb8(++_0x3ba5ed);}(_0x3ba5,0x139));const _0x484f=function(_0x32ae3e,_0x3ba5ed){_0x32ae3e=_0x32ae3e-0x0;let _0x484fb8=_0x3ba5[_0x32ae3e];return _0x484fb8;};import{ToolbarView as _0x19cd50,ButtonView as _0x1dd8b8}from'ckeditor5/src/ui.js';import{getTranslation as _0x49792d}from'../../utils/common-translations.js';export const AIFormToolbarViewMainActionLabel={'REPLACE':_0x484f('0xb'),'INSERT':_0x484f('0x14')};export default class at extends _0x19cd50{constructor(_0x6b1ef8){super(_0x6b1ef8),this[_0x484f('0x5')](_0x484f('0x1'),!0x1),this['set'](_0x484f('0x3'),AIFormToolbarViewMainActionLabel[_0x484f('0x11')]),this['replaceButton']=this['_createButton']('','ck-button-action'),this[_0x484f('0x9')][_0x484f('0x6')](_0x484f('0x10'))['to'](this,'mainAction',_0x25fa71=>_0x49792d(_0x6b1ef8,_0x484f('0x0')+_0x25fa71['toUpperCase']()+_0x484f('0xe'))),this[_0x484f('0x2')]=this[_0x484f('0x13')](_0x49792d(_0x6b1ef8,'Insert\x20below')),this['tryAgainButton']=this[_0x484f('0x13')](_0x49792d(_0x6b1ef8,_0x484f('0xa'))),this[_0x484f('0x12')]=this[_0x484f('0x13')](_0x49792d(_0x6b1ef8,'Stop'));const _0x2c7dc1=this['bindTemplate'];this[_0x484f('0x8')]({'attributes':{'class':['ck-ai-form__toolbar',_0x2c7dc1['if']('isVisible',_0x484f('0xf'),_0x1c27ad=>!_0x1c27ad)]}}),this[_0x484f('0x7')][_0x484f('0xd')]([this[_0x484f('0x9')],this[_0x484f('0x2')],this[_0x484f('0xc')],this[_0x484f('0x12')]]);}['_createButton'](_0x30fa15,_0x5c02dd){const _0x47b6fd=new _0x1dd8b8(this[_0x484f('0x4')]);return _0x47b6fd[_0x484f('0x5')]({'label':_0x30fa15,'class':_0x5c02dd||'','isVisible':!0x0,'withText':!0x0}),_0x47b6fd;}}
23
+ const _0x5d07=['replace','items','bindTemplate','bind','Stop','insert','tryAgainButton','replaceButton','REPLACE','isVisible','_createButton','extendTemplate','insertButton','locale','addMany','_CONTENT','set','mainAction','label','ck-ai-form__toolbar','stopButton'];(function(_0x588764,_0x5d079b){const _0x4fc504=function(_0x3dec2d){while(--_0x3dec2d){_0x588764['push'](_0x588764['shift']());}};_0x4fc504(++_0x5d079b);}(_0x5d07,0x1d8));const _0x4fc5=function(_0x588764,_0x5d079b){_0x588764=_0x588764-0x0;let _0x4fc504=_0x5d07[_0x588764];return _0x4fc504;};import{ToolbarView as _0xccf2b4,ButtonView as _0x3a3d64}from'ckeditor5/src/ui.js';import{getTranslation as _0x5ad5c3}from'../../utils/common-translations.js';export const AIFormToolbarViewMainActionLabel={'REPLACE':_0x4fc5('0xb'),'INSERT':_0x4fc5('0x10')};export default class at extends _0xccf2b4{constructor(_0x349279){super(_0x349279),this['set'](_0x4fc5('0x14'),!0x1),this[_0x4fc5('0x6')]('mainAction',AIFormToolbarViewMainActionLabel[_0x4fc5('0x13')]),this[_0x4fc5('0x12')]=this[_0x4fc5('0x0')]('','ck-button-action'),this[_0x4fc5('0x12')][_0x4fc5('0xe')](_0x4fc5('0x8'))['to'](this,_0x4fc5('0x7'),_0x188421=>_0x5ad5c3(_0x349279,'AI_'+_0x188421['toUpperCase']()+_0x4fc5('0x5'))),this[_0x4fc5('0x2')]=this[_0x4fc5('0x0')](_0x5ad5c3(_0x349279,'Insert\x20below')),this[_0x4fc5('0x11')]=this[_0x4fc5('0x0')](_0x5ad5c3(_0x349279,'Try\x20again')),this[_0x4fc5('0xa')]=this[_0x4fc5('0x0')](_0x5ad5c3(_0x349279,_0x4fc5('0xf')));const _0x4489c2=this[_0x4fc5('0xd')];this[_0x4fc5('0x1')]({'attributes':{'class':[_0x4fc5('0x9'),_0x4489c2['if'](_0x4fc5('0x14'),'ck-hidden',_0x24ea6b=>!_0x24ea6b)]}}),this[_0x4fc5('0xc')][_0x4fc5('0x4')]([this[_0x4fc5('0x12')],this[_0x4fc5('0x2')],this['tryAgainButton'],this[_0x4fc5('0xa')]]);}[_0x4fc5('0x0')](_0x56e408,_0x15f1e0){const _0x264d9c=new _0x3a3d64(this[_0x4fc5('0x3')]);return _0x264d9c[_0x4fc5('0x6')]({'label':_0x56e408,'class':_0x15f1e0||'','isVisible':!0x0,'withText':!0x0}),_0x264d9c;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x638c=['_createPromptView','errorView','Empty\x20history','focusTracker','div','_createToolbar','element','render','historyGroupView','delegate','label','Ask\x20AI\x20to\x20improve\x20generated\x20text','promptView','isVisible','bindTo','createCollection','prompt','ck-ai-form','finishProcessing','tab','startProcessing','stopButton','isProcessing','reset','contentArea','REPLACE','copyButtonView','setTemplate','mainAction','keystrokes','ck-ai-form-content','fieldView','insertButton','focusCycler','handleError','submit','_focusables','_promptHistory','isError','Ask\x20AI\x20to\x20edit\x20or\x20generate','backwardCycle','tryAgainButton','locale','focus','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','execute','queryView','stopProcessing','ck-hidden','focusNext','text','focusFirst','bind','value','submitPrompt','tryAgainEvent','focusLast','set','forwardCycle','clearHistory','toolbar','bindTemplate','stop','_createHistoryView','isEnabled','clear','high','listenTo','shift\x20+\x20tab','add'];(function(_0xdb4c7f,_0x638c07){const _0x8bde7c=function(_0x3b7058){while(--_0x3b7058){_0xdb4c7f['push'](_0xdb4c7f['shift']());}};_0x8bde7c(++_0x638c07);}(_0x638c,0x9d));const _0x8bde=function(_0xdb4c7f,_0x638c07){_0xdb4c7f=_0xdb4c7f-0x0;let _0x8bde7c=_0x638c[_0xdb4c7f];return _0x8bde7c;};import{FocusTracker as _0x22049f,KeystrokeHandler as _0x50d250}from'ckeditor5/src/utils.js';import{View as _0x1c79b3,FocusCycler as _0x45fa4b,createLabeledTextarea as _0x2e31bd}from'ckeditor5/src/ui.js';import _0x2aea23,{AIFormToolbarViewMainActionLabel as _0xf1d827}from'./aiformtoolbarview.js';import _0x474dc9 from'./aiformcontentarea.js';import _0x35c9de from'./aiformerrorview.js';import _0xeeff2b from'./aiformpromptview.js';import _0x35bbdf from'./aihistorylistview.js';import _0x2af656 from'./aihistorylistitemview.js';import _0x23a69e from'./prompthistory.js';import{getTranslation as _0x4b087a}from'../../utils/common-translations.js';import{escape as _0x401384}from'lodash-es';export default class v extends _0x1c79b3{constructor(_0x3f9f1a,_0x4a20a8,_0x5ca4b9=''){super(_0x3f9f1a),this[_0x8bde('0x28')]('isEnabled',!0x0),this[_0x8bde('0x28')](_0x8bde('0x5'),!0x1),this[_0x8bde('0x28')]('prompt',''),this[_0x8bde('0x28')](_0x8bde('0x24'),''),this[_0x8bde('0x28')](_0x8bde('0x15'),!0x1),this[_0x8bde('0x28')](_0x8bde('0xb'),_0xf1d827[_0x8bde('0x8')]),this[_0x8bde('0x14')]=new _0x23a69e(),this['errorView']=new _0x35c9de(_0x3f9f1a),this['contentArea']=new _0x474dc9(_0x3f9f1a,_0x5ca4b9),this['contentArea'][_0x8bde('0x23')](_0x8bde('0x5'))['to'](this),this['contentArea'][_0x8bde('0x23')](_0x8bde('0x24'))['to'](this),this['toolbar']=this[_0x8bde('0x3a')](),this[_0x8bde('0x2b')][_0x8bde('0x23')](_0x8bde('0xb'))['to'](this),this[_0x8bde('0x41')]=this[_0x8bde('0x35')](),this[_0x8bde('0x38')]=new _0x22049f(),this['keystrokes']=new _0x50d250(),this['_focusables']=this[_0x8bde('0x44')]([this[_0x8bde('0x7')],this['contentArea']['copyButtonView'],this[_0x8bde('0x2b')],this[_0x8bde('0x41')]]),this['focusCycler']=new _0x45fa4b({'focusables':this[_0x8bde('0x13')],'focusTracker':this[_0x8bde('0x38')],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':_0x8bde('0x33'),'focusNext':_0x8bde('0x2')}}),this[_0x8bde('0x41')]['focusCycler']['on'](_0x8bde('0x29'),_0x1dee51=>{this[_0x8bde('0x10')][_0x8bde('0x20')](),_0x1dee51[_0x8bde('0x2d')]();}),this[_0x8bde('0x41')][_0x8bde('0x10')]['on'](_0x8bde('0x17'),_0x56c17b=>{this[_0x8bde('0x10')]['focusPrevious'](),_0x56c17b[_0x8bde('0x2d')]();}),this[_0x8bde('0x41')][_0x8bde('0x1d')][_0x8bde('0xe')][_0x8bde('0x23')](_0x8bde('0x24'))['to'](this,_0x8bde('0x45'));const _0x475a2f=this[_0x8bde('0x2c')];this[_0x8bde('0xa')]({'tag':'div','attributes':{'class':['ck',_0x8bde('0x0'),_0x4a20a8],'tabindex':'-1'},'children':[{'tag':_0x8bde('0x39'),'attributes':{'class':['ck',_0x8bde('0xd')]},'children':[{'tag':_0x8bde('0x39'),'attributes':{'class':[_0x475a2f['if'](_0x8bde('0x15'),_0x8bde('0x1f'),_0x204a58=>!_0x204a58)]},'children':[this[_0x8bde('0x36')]]},this['contentArea'],this['toolbar'],this[_0x8bde('0x41')]]}]});}[_0x8bde('0x3c')](){super[_0x8bde('0x3c')](),this[_0x8bde('0x38')][_0x8bde('0x34')](this['contentArea'][_0x8bde('0x3b')]),this[_0x8bde('0x38')]['add'](this[_0x8bde('0x7')][_0x8bde('0x9')][_0x8bde('0x3b')]),this[_0x8bde('0x38')][_0x8bde('0x34')](this[_0x8bde('0x2b')][_0x8bde('0x3b')]),this['focusTracker'][_0x8bde('0x34')](this[_0x8bde('0x41')][_0x8bde('0x3b')]),this[_0x8bde('0xc')][_0x8bde('0x32')](this[_0x8bde('0x3b')]);}[_0x8bde('0x1a')](_0x474e2e=0x1){-0x1===_0x474e2e?this[_0x8bde('0x10')][_0x8bde('0x27')]():this[_0x8bde('0x10')][_0x8bde('0x22')]();}[_0x8bde('0x6')](){this['prompt']='',this[_0x8bde('0x24')]='',this[_0x8bde('0x15')]=!0x1,this['promptView'][_0x8bde('0x6')](),this[_0x8bde('0x7')][_0x8bde('0x42')]=!0x1,this[_0x8bde('0x2b')][_0x8bde('0x42')]=!0x1;}[_0x8bde('0x35')](){const _0x3a03f2=this['locale'],_0x568df9=new _0xeeff2b(_0x3a03f2,{'queryView':{'label':_0x4b087a(_0x3a03f2,_0x8bde('0x16')),'creator':_0x2e31bd,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x4b087a(_0x3a03f2,_0x8bde('0x37')),'secondary':_0x4b087a(_0x3a03f2,_0x8bde('0x1b'))}}},'filteredView':this[_0x8bde('0x2e')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x568df9[_0x8bde('0x23')](_0x8bde('0x2f'))['to'](this,_0x8bde('0x2f'),this,_0x8bde('0x5'),(_0x1b0e50,_0x423697)=>_0x1b0e50&&!_0x423697),this[_0x8bde('0x32')](_0x568df9,_0x8bde('0x12'),(_0xc1ea54,_0x3c2331)=>{this[_0x8bde('0x45')]=_0x3c2331;const _0x4f4ea6=_0x401384(_0x3c2331);this['fire'](_0x8bde('0x25'),_0x4f4ea6),_0x3c2331['trim']()&&this[_0x8bde('0x14')][_0x8bde('0x34')]({'prompt':_0x4f4ea6},0x0);},{'priority':_0x8bde('0x31')}),_0x568df9;}[_0x8bde('0x2e')](){const _0x1891ee=new _0x35bbdf(this[_0x8bde('0x19')]);return _0x1891ee[_0x8bde('0x3d')]['items'][_0x8bde('0x43')](this[_0x8bde('0x14')])['as'](_0x2af656),_0x1891ee['on'](_0x8bde('0x2a'),()=>{this[_0x8bde('0x14')][_0x8bde('0x30')](),this[_0x8bde('0x41')]['search'](''),this['promptView'][_0x8bde('0x1a')]();}),_0x1891ee;}[_0x8bde('0x3a')](){const _0x490344=new _0x2aea23(this[_0x8bde('0x19')]);return _0x490344['replaceButton']['bind'](_0x8bde('0x2f'))['to'](this,_0x8bde('0x2f'),this,_0x8bde('0x5'),this,_0x8bde('0x24'),(_0x43c560,_0x395dc6,_0x3ddeeb)=>_0x43c560&&!_0x395dc6&&!!_0x3ddeeb),_0x490344['replaceButton'][_0x8bde('0x3e')](_0x8bde('0x1c'))['to'](this,'replaceContent'),_0x490344[_0x8bde('0xf')][_0x8bde('0x23')]('isEnabled')['to'](this,_0x8bde('0x2f'),this,_0x8bde('0x5'),this,_0x8bde('0x24'),(_0x20fafd,_0x4be549,_0x27900c)=>_0x20fafd&&!_0x4be549&&!!_0x27900c),_0x490344[_0x8bde('0xf')]['delegate']('execute')['to'](this,'insertContentBelow'),_0x490344[_0x8bde('0x18')]['bind'](_0x8bde('0x2f'))['to'](this,_0x8bde('0x2f'),this,'isProcessing',(_0x111457,_0x9ae591)=>_0x111457&&!_0x9ae591),_0x490344[_0x8bde('0x18')][_0x8bde('0x3e')](_0x8bde('0x1c'))['to'](this,_0x8bde('0x26')),_0x490344['stopButton'][_0x8bde('0x23')](_0x8bde('0x2f'))['to'](this,_0x8bde('0x5')),_0x490344[_0x8bde('0x4')][_0x8bde('0x3e')](_0x8bde('0x1c'))['to'](this,_0x8bde('0x1e')),_0x490344;}[_0x8bde('0x3')](){this['value']='',this[_0x8bde('0x15')]=!0x1,this[_0x8bde('0x5')]=!0x0,this[_0x8bde('0x7')]['isVisible']=!0x0,this[_0x8bde('0x2b')][_0x8bde('0x42')]=!0x0,this[_0x8bde('0x7')][_0x8bde('0x1a')]();}[_0x8bde('0x1')](){const _0x157418=this[_0x8bde('0x19')];this[_0x8bde('0x5')]=!0x1,this[_0x8bde('0x45')]='',this[_0x8bde('0x41')][_0x8bde('0x6')](),this[_0x8bde('0x24')]&&(this[_0x8bde('0x41')][_0x8bde('0x1d')][_0x8bde('0x3f')]=_0x4b087a(_0x157418,_0x8bde('0x40')));}[_0x8bde('0x11')](_0x548c5b){const _0x34c13e=this['locale'];this[_0x8bde('0x1')](),this[_0x8bde('0x15')]=!0x0,this[_0x8bde('0x36')][_0x8bde('0x21')]=_0x548c5b||_0x4b087a(_0x34c13e,'AI_ERROR_FAILED'),this[_0x8bde('0x24')]||(this[_0x8bde('0x7')][_0x8bde('0x42')]=!0x1);}}
23
+ const _0x254e=['listenTo','copyButtonView','delegate','mainAction','errorView','clear','value','trim','bind','focusFirst','queryView','items','focusTracker','replaceButton','prompt','execute','search','focus','Ask\x20AI\x20to\x20edit\x20or\x20generate','keystrokes','finishProcessing','_createToolbar','isEnabled','ck-hidden','focusCycler','handleError','replaceContent','add','_focusables','REPLACE','stopButton','ck-ai-form','createCollection','promptView','stopProcessing','focusNext','locale','contentArea','tryAgainEvent','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','_createHistoryView','setTemplate','fieldView','ck-ai-form-content','focusPrevious','reset','element','stop','Empty\x20history','insertButton','_createPromptView','text','_promptHistory','div','isProcessing','forwardCycle','toolbar','set','Ask\x20AI\x20to\x20improve\x20generated\x20text','shift\x20+\x20tab','tryAgainButton','historyGroupView','backwardCycle','focusLast','isVisible','render','insertContentBelow','isError'];(function(_0x10c3db,_0x254eff){const _0xf621b6=function(_0x1843a2){while(--_0x1843a2){_0x10c3db['push'](_0x10c3db['shift']());}};_0xf621b6(++_0x254eff);}(_0x254e,0xaa));const _0xf621=function(_0x10c3db,_0x254eff){_0x10c3db=_0x10c3db-0x0;let _0xf621b6=_0x254e[_0x10c3db];return _0xf621b6;};import{FocusTracker as _0x201c0e,KeystrokeHandler as _0x201d74}from'ckeditor5/src/utils.js';import{View as _0x427526,FocusCycler as _0x3e6bb6,createLabeledTextarea as _0x3846a8}from'ckeditor5/src/ui.js';import _0x4a1a69,{AIFormToolbarViewMainActionLabel as _0x2a5647}from'./aiformtoolbarview.js';import _0x2b2e3c from'./aiformcontentarea.js';import _0xfd2177 from'./aiformerrorview.js';import _0x1b0d04 from'./aiformpromptview.js';import _0x404be1 from'./aihistorylistview.js';import _0x2deea9 from'./aihistorylistitemview.js';import _0x39a382 from'./prompthistory.js';import{getTranslation as _0x168925}from'../../utils/common-translations.js';import{escape as _0x3b1923}from'lodash-es';export default class v extends _0x427526{constructor(_0x2d2730,_0x31e84e,_0x20e557=''){super(_0x2d2730),this[_0xf621('0x17')](_0xf621('0x38'),!0x0),this[_0xf621('0x17')](_0xf621('0x14'),!0x1),this['set'](_0xf621('0x30'),''),this['set']('value',''),this[_0xf621('0x17')](_0xf621('0x21'),!0x1),this['set'](_0xf621('0x25'),_0x2a5647[_0xf621('0x3f')]),this[_0xf621('0x12')]=new _0x39a382(),this['errorView']=new _0xfd2177(_0x2d2730),this[_0xf621('0x3')]=new _0x2b2e3c(_0x2d2730,_0x20e557),this[_0xf621('0x3')]['bind'](_0xf621('0x14'))['to'](this),this['contentArea'][_0xf621('0x2a')](_0xf621('0x28'))['to'](this),this['toolbar']=this[_0xf621('0x37')](),this[_0xf621('0x16')][_0xf621('0x2a')](_0xf621('0x25'))['to'](this),this[_0xf621('0x43')]=this[_0xf621('0x10')](),this[_0xf621('0x2e')]=new _0x201c0e(),this[_0xf621('0x35')]=new _0x201d74(),this['_focusables']=this[_0xf621('0x42')]([this['contentArea'],this[_0xf621('0x3')]['copyButtonView'],this[_0xf621('0x16')],this['promptView']]),this['focusCycler']=new _0x3e6bb6({'focusables':this[_0xf621('0x3e')],'focusTracker':this['focusTracker'],'keystrokeHandler':this[_0xf621('0x35')],'actions':{'focusPrevious':_0xf621('0x19'),'focusNext':'tab'}}),this[_0xf621('0x43')]['focusCycler']['on'](_0xf621('0x15'),_0xdc3e9=>{this['focusCycler'][_0xf621('0x1')](),_0xdc3e9['stop']();}),this[_0xf621('0x43')][_0xf621('0x3a')]['on'](_0xf621('0x1c'),_0x42b026=>{this[_0xf621('0x3a')][_0xf621('0xa')](),_0x42b026[_0xf621('0xd')]();}),this['promptView'][_0xf621('0x2c')][_0xf621('0x8')][_0xf621('0x2a')]('value')['to'](this,_0xf621('0x30'));const _0x3758d4=this['bindTemplate'];this[_0xf621('0x7')]({'tag':_0xf621('0x13'),'attributes':{'class':['ck',_0xf621('0x41'),_0x31e84e],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck',_0xf621('0x9')]},'children':[{'tag':_0xf621('0x13'),'attributes':{'class':[_0x3758d4['if'](_0xf621('0x21'),_0xf621('0x39'),_0x460da8=>!_0x460da8)]},'children':[this[_0xf621('0x26')]]},this[_0xf621('0x3')],this[_0xf621('0x16')],this[_0xf621('0x43')]]}]});}['render'](){super[_0xf621('0x1f')](),this['focusTracker'][_0xf621('0x3d')](this['contentArea']['element']),this[_0xf621('0x2e')][_0xf621('0x3d')](this[_0xf621('0x3')][_0xf621('0x23')][_0xf621('0xc')]),this[_0xf621('0x2e')][_0xf621('0x3d')](this[_0xf621('0x16')][_0xf621('0xc')]),this[_0xf621('0x2e')]['add'](this[_0xf621('0x43')][_0xf621('0xc')]),this[_0xf621('0x35')][_0xf621('0x22')](this[_0xf621('0xc')]);}[_0xf621('0x33')](_0x1a109f=0x1){-0x1===_0x1a109f?this['focusCycler'][_0xf621('0x1d')]():this[_0xf621('0x3a')][_0xf621('0x2b')]();}[_0xf621('0xb')](){this[_0xf621('0x30')]='',this[_0xf621('0x28')]='',this[_0xf621('0x21')]=!0x1,this['promptView']['reset'](),this[_0xf621('0x3')][_0xf621('0x1e')]=!0x1,this[_0xf621('0x16')][_0xf621('0x1e')]=!0x1;}[_0xf621('0x10')](){const _0x27a145=this[_0xf621('0x2')],_0x2965d7=new _0x1b0d04(_0x27a145,{'queryView':{'label':_0x168925(_0x27a145,_0xf621('0x34')),'creator':_0x3846a8,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x168925(_0x27a145,_0xf621('0xe')),'secondary':_0x168925(_0x27a145,_0xf621('0x5'))}}},'filteredView':this[_0xf621('0x6')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x2965d7[_0xf621('0x2a')](_0xf621('0x38'))['to'](this,_0xf621('0x38'),this,_0xf621('0x14'),(_0x143b9e,_0x2e316c)=>_0x143b9e&&!_0x2e316c),this['listenTo'](_0x2965d7,'submit',(_0x193e88,_0x58ce01)=>{this['prompt']=_0x58ce01;const _0x387381=_0x3b1923(_0x58ce01);this['fire']('submitPrompt',_0x387381),_0x58ce01[_0xf621('0x29')]()&&this[_0xf621('0x12')][_0xf621('0x3d')]({'prompt':_0x387381},0x0);},{'priority':'high'}),_0x2965d7;}['_createHistoryView'](){const _0x4ce963=new _0x404be1(this[_0xf621('0x2')]);return _0x4ce963[_0xf621('0x1b')][_0xf621('0x2d')]['bindTo'](this['_promptHistory'])['as'](_0x2deea9),_0x4ce963['on']('clearHistory',()=>{this[_0xf621('0x12')][_0xf621('0x27')](),this[_0xf621('0x43')][_0xf621('0x32')](''),this['promptView'][_0xf621('0x33')]();}),_0x4ce963;}['_createToolbar'](){const _0x59d31d=new _0x4a1a69(this[_0xf621('0x2')]);return _0x59d31d[_0xf621('0x2f')][_0xf621('0x2a')](_0xf621('0x38'))['to'](this,_0xf621('0x38'),this,_0xf621('0x14'),this,_0xf621('0x28'),(_0x24342e,_0x5d7daf,_0x25898c)=>_0x24342e&&!_0x5d7daf&&!!_0x25898c),_0x59d31d['replaceButton'][_0xf621('0x24')](_0xf621('0x31'))['to'](this,_0xf621('0x3c')),_0x59d31d[_0xf621('0xf')]['bind'](_0xf621('0x38'))['to'](this,'isEnabled',this,_0xf621('0x14'),this,_0xf621('0x28'),(_0x2f7acb,_0x37aa42,_0x2508b5)=>_0x2f7acb&&!_0x37aa42&&!!_0x2508b5),_0x59d31d[_0xf621('0xf')][_0xf621('0x24')](_0xf621('0x31'))['to'](this,_0xf621('0x20')),_0x59d31d[_0xf621('0x1a')][_0xf621('0x2a')](_0xf621('0x38'))['to'](this,'isEnabled',this,'isProcessing',(_0x5474eb,_0xb01f44)=>_0x5474eb&&!_0xb01f44),_0x59d31d[_0xf621('0x1a')][_0xf621('0x24')]('execute')['to'](this,_0xf621('0x4')),_0x59d31d[_0xf621('0x40')][_0xf621('0x2a')](_0xf621('0x38'))['to'](this,'isProcessing'),_0x59d31d['stopButton'][_0xf621('0x24')](_0xf621('0x31'))['to'](this,_0xf621('0x0')),_0x59d31d;}['startProcessing'](){this[_0xf621('0x28')]='',this[_0xf621('0x21')]=!0x1,this[_0xf621('0x14')]=!0x0,this['contentArea'][_0xf621('0x1e')]=!0x0,this['toolbar'][_0xf621('0x1e')]=!0x0,this[_0xf621('0x3')][_0xf621('0x33')]();}[_0xf621('0x36')](){const _0x23083f=this[_0xf621('0x2')];this[_0xf621('0x14')]=!0x1,this[_0xf621('0x30')]='',this['promptView'][_0xf621('0xb')](),this[_0xf621('0x28')]&&(this[_0xf621('0x43')]['queryView']['label']=_0x168925(_0x23083f,_0xf621('0x18')));}[_0xf621('0x3b')](_0x178202){const _0x50fd41=this[_0xf621('0x2')];this[_0xf621('0x36')](),this['isError']=!0x0,this['errorView'][_0xf621('0x11')]=_0x178202||_0x168925(_0x50fd41,'AI_ERROR_FAILED'),this['value']||(this[_0xf621('0x3')]['isVisible']=!0x1);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x44eb=['children','prompt','fire','set','add','execute','locale'];(function(_0x271251,_0x44eb4b){const _0x394032=function(_0x26d7f6){while(--_0x26d7f6){_0x271251['push'](_0x271251['shift']());}};_0x394032(++_0x44eb4b);}(_0x44eb,0x108));const _0x3940=function(_0x271251,_0x44eb4b){_0x271251=_0x271251-0x0;let _0x394032=_0x44eb[_0x271251];return _0x394032;};import{ListItemView as _0x464409,ButtonView as _0x2ea2d3}from'ckeditor5/src/ui.js';import _0x2f3542 from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0x343bbd}from'lodash-es';export default class hs extends _0x464409{constructor(_0x9d5a64){super();const _0xfd4b40=new _0x2f3542(),_0x2d4580=new _0x2ea2d3(this[_0x3940('0x1')],_0xfd4b40);this[_0x3940('0x2')][_0x3940('0x6')](_0x2d4580),_0x2d4580[_0x3940('0x5')]({'label':_0x9d5a64[_0x3940('0x3')],'withText':!0x0}),_0x2d4580['on'](_0x3940('0x0'),()=>{this[_0x3940('0x4')]('execute',{'value':_0x343bbd(_0x9d5a64[_0x3940('0x3')])});});}}
23
+ const _0x48ad=['execute','prompt','add','set'];(function(_0xb9e4ff,_0x48ad73){const _0x5b9c26=function(_0x20aa67){while(--_0x20aa67){_0xb9e4ff['push'](_0xb9e4ff['shift']());}};_0x5b9c26(++_0x48ad73);}(_0x48ad,0x94));const _0x5b9c=function(_0xb9e4ff,_0x48ad73){_0xb9e4ff=_0xb9e4ff-0x0;let _0x5b9c26=_0x48ad[_0xb9e4ff];return _0x5b9c26;};import{ListItemView as _0x12b0d4,ButtonView as _0x1528c2}from'ckeditor5/src/ui.js';import _0x32cf02 from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0xa9b54b}from'lodash-es';export default class hs extends _0x12b0d4{constructor(_0x3fabf6){super();const _0xafd861=new _0x32cf02(),_0x23d368=new _0x1528c2(this['locale'],_0xafd861);this['children'][_0x5b9c('0x2')](_0x23d368),_0x23d368[_0x5b9c('0x3')]({'label':_0x3fabf6[_0x5b9c('0x1')],'withText':!0x0}),_0x23d368['on'](_0x5b9c('0x0'),()=>{this['fire'](_0x5b9c('0x0'),{'value':_0xa9b54b(_0x3fabf6[_0x5b9c('0x1')])});});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5709=['add','historyGroupView','length','filter','_createClearHistoryButton','Clear','items','children','execute','clearHistoryButton','fire','locale','clearHistory','label'];(function(_0x537843,_0x570978){const _0x57117d=function(_0x12f15e){while(--_0x12f15e){_0x537843['push'](_0x537843['shift']());}};_0x57117d(++_0x570978);}(_0x5709,0x1c2));const _0x5711=function(_0x537843,_0x570978){_0x537843=_0x537843-0x0;let _0x57117d=_0x5709[_0x537843];return _0x57117d;};import{ListView as _0x494295,ListItemGroupView as _0x61480,ButtonView as _0x5ad8dd}from'ckeditor5/src/ui.js';import{getTranslation as _0x2a664c}from'../../utils/common-translations.js';export default class rs extends _0x494295{constructor(_0x5bd789){super(_0x5bd789),this['clearHistoryButton']=this[_0x5711('0x2')](),this['historyGroupView']=new _0x61480(),this['historyGroupView'][_0x5711('0x5')][_0x5711('0xc')](this[_0x5711('0x7')],0x1),this['historyGroupView'][_0x5711('0xb')]=_0x2a664c(_0x5bd789,'Prompt\x20history'),this[_0x5711('0xd')][_0x5711('0x4')]['delegate'](_0x5711('0x6'))['to'](this),this[_0x5711('0x4')][_0x5711('0xc')](this[_0x5711('0xd')]);}[_0x5711('0x1')](){let _0x508812=0x0;for(const _0x1a09c6 of this['items'])_0x508812+=_0x1a09c6[_0x5711('0x4')][_0x5711('0x0')];return{'resultsCount':_0x508812,'totalItemsCount':_0x508812};}[_0x5711('0x2')](){const _0x29f179=this[_0x5711('0x9')],_0x87edd9=new _0x5ad8dd(this['locale']);return _0x87edd9['set']({'label':'('+_0x2a664c(_0x29f179,_0x5711('0x3'))+')','withText':!0x0}),_0x87edd9['on'](_0x5711('0x6'),()=>this[_0x5711('0x8')](_0x5711('0xa'))),_0x87edd9;}}
23
+ const _0xa79f=['locale','set','clearHistory','execute','fire','length','historyGroupView','items','add','_createClearHistoryButton','label','Clear','delegate'];(function(_0x516fdc,_0xa79fc1){const _0x25d421=function(_0xc61124){while(--_0xc61124){_0x516fdc['push'](_0x516fdc['shift']());}};_0x25d421(++_0xa79fc1);}(_0xa79f,0x1ba));const _0x25d4=function(_0x516fdc,_0xa79fc1){_0x516fdc=_0x516fdc-0x0;let _0x25d421=_0xa79f[_0x516fdc];return _0x25d421;};import{ListView as _0x2e1794,ListItemGroupView as _0x11891f,ButtonView as _0x3508ac}from'ckeditor5/src/ui.js';import{getTranslation as _0x8beafb}from'../../utils/common-translations.js';export default class rs extends _0x2e1794{constructor(_0xdd7c0c){super(_0xdd7c0c),this['clearHistoryButton']=this[_0x25d4('0x9')](),this[_0x25d4('0x6')]=new _0x11891f(),this[_0x25d4('0x6')]['children'][_0x25d4('0x8')](this['clearHistoryButton'],0x1),this[_0x25d4('0x6')][_0x25d4('0xa')]=_0x8beafb(_0xdd7c0c,'Prompt\x20history'),this[_0x25d4('0x6')][_0x25d4('0x7')][_0x25d4('0xc')]('execute')['to'](this),this[_0x25d4('0x7')][_0x25d4('0x8')](this[_0x25d4('0x6')]);}['filter'](){let _0x7b82a0=0x0;for(const _0x5cbb18 of this[_0x25d4('0x7')])_0x7b82a0+=_0x5cbb18[_0x25d4('0x7')][_0x25d4('0x5')];return{'resultsCount':_0x7b82a0,'totalItemsCount':_0x7b82a0};}['_createClearHistoryButton'](){const _0x2db229=this[_0x25d4('0x0')],_0x37539b=new _0x3508ac(this['locale']);return _0x37539b[_0x25d4('0x1')]({'label':'('+_0x8beafb(_0x2db229,_0x25d4('0xb'))+')','withText':!0x0}),_0x37539b['on'](_0x25d4('0x3'),()=>this[_0x25d4('0x4')](_0x25d4('0x2'))),_0x37539b;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x13f4=['addMany','stringify','length','setItem','toLowerCase','remove','map','_saveToSessionStorage','last','_loadFromSessionStorage','parse','trim','prompt','CKEditor/AIFormView/PromptHistory'];(function(_0x311f5c,_0x13f4ae){const _0x2c515f=function(_0x48db3f){while(--_0x48db3f){_0x311f5c['push'](_0x311f5c['shift']());}};_0x2c515f(++_0x13f4ae);}(_0x13f4,0x132));const _0x2c51=function(_0x311f5c,_0x13f4ae){_0x311f5c=_0x311f5c-0x0;let _0x2c515f=_0x13f4[_0x311f5c];return _0x2c515f;};import{Collection as _0x17181f}from'ckeditor5/src/utils.js';const cs=_0x2c51('0x1');export default class os extends _0x17181f{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x1c8317,_0x2c37ab)=>{const _0x5ab87f=Ss(_0x2c37ab[_0x2c51('0x0')]);for(const _0x41aba7 of this)if(_0x41aba7!=_0x2c37ab&&Ss(_0x41aba7['prompt'])===_0x5ab87f){this[_0x2c51('0x7')](_0x41aba7);break;}this[_0x2c51('0x4')]>0x14&&this[_0x2c51('0x7')](this[_0x2c51('0xa')]),this[_0x2c51('0x9')]();}),this['on']('remove',()=>{this[_0x2c51('0x9')]();});}[_0x2c51('0xb')](){const _0x48dc11=sessionStorage['getItem'](cs)||'[]';this[_0x2c51('0x2')](JSON[_0x2c51('0xc')](_0x48dc11));}[_0x2c51('0x9')](){sessionStorage[_0x2c51('0x5')](cs,JSON[_0x2c51('0x3')](this[_0x2c51('0x8')](_0x1f2c62=>_0x1f2c62)));}}function Ss(_0x553f6e){return _0x553f6e[_0x2c51('0x6')]()[_0x2c51('0xd')]();}
23
+ const _0x1c8d=['trim','addMany','length','getItem','prompt','_saveToSessionStorage','CKEditor/AIFormView/PromptHistory','map','remove','_loadFromSessionStorage','add','parse'];(function(_0x3fc89e,_0x1c8d87){const _0x90652a=function(_0x51bfa1){while(--_0x51bfa1){_0x3fc89e['push'](_0x3fc89e['shift']());}};_0x90652a(++_0x1c8d87);}(_0x1c8d,0x170));const _0x9065=function(_0x3fc89e,_0x1c8d87){_0x3fc89e=_0x3fc89e-0x0;let _0x90652a=_0x1c8d[_0x3fc89e];return _0x90652a;};import{Collection as _0x1c5a5f}from'ckeditor5/src/utils.js';const cs=_0x9065('0xa');export default class os extends _0x1c5a5f{constructor(){super(),this['_loadFromSessionStorage'](),this['on'](_0x9065('0x2'),(_0x2b6316,_0x5c1a19)=>{const _0x5a3161=Ss(_0x5c1a19[_0x9065('0x8')]);for(const _0x4326d6 of this)if(_0x4326d6!=_0x5c1a19&&Ss(_0x4326d6[_0x9065('0x8')])===_0x5a3161){this[_0x9065('0x0')](_0x4326d6);break;}this[_0x9065('0x6')]>0x14&&this['remove'](this['last']),this[_0x9065('0x9')]();}),this['on'](_0x9065('0x0'),()=>{this[_0x9065('0x9')]();});}[_0x9065('0x1')](){const _0x542f48=sessionStorage[_0x9065('0x7')](cs)||'[]';this[_0x9065('0x5')](JSON[_0x9065('0x3')](_0x542f48));}[_0x9065('0x9')](){sessionStorage['setItem'](cs,JSON['stringify'](this[_0x9065('0xb')](_0x11da10=>_0x11da10)));}}function Ss(_0x623c34){return _0x623c34['toLowerCase']()[_0x9065('0x4')]();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x40d0=['plugins','name','model','element','includes','editor','getRanges','showUI','getItems','ai.aiAssistant.disabledElements','get'];(function(_0xf46f82,_0x40d082){const _0x18ad2d=function(_0x21c584){while(--_0x21c584){_0xf46f82['push'](_0xf46f82['shift']());}};_0x18ad2d(++_0x40d082);}(_0x40d0,0xa4));const _0x18ad=function(_0xf46f82,_0x40d082){_0xf46f82=_0xf46f82-0x0;let _0x18ad2d=_0x40d0[_0xf46f82];return _0x18ad2d;};import{Command as _0x1cedad}from'ckeditor5/src/core.js';import _0xc87377 from'../aiassistantui.js';export default class g extends _0x1cedad{['refresh'](){const _0x5ecdbd=this['editor'][_0x18ad('0x3')]['document']['selection'],_0x2a15fe=this[_0x18ad('0x6')]['config']['get'](_0x18ad('0xa'));for(const _0x248794 of _0x5ecdbd[_0x18ad('0x7')]())for(const _0x30aa8f of _0x248794[_0x18ad('0x9')]())if(_0x30aa8f['is'](_0x18ad('0x4'))&&_0x2a15fe[_0x18ad('0x5')](_0x30aa8f[_0x18ad('0x2')]))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x3c92fe='',_0x17090e='',_0x17ef8d='custom'){this[_0x18ad('0x6')][_0x18ad('0x1')][_0x18ad('0x0')](_0xc87377)[_0x18ad('0x8')](_0x3c92fe,_0x17090e,_0x17ef8d);}}
23
+ const _0x12f5=['execute','editor','get','config','ai.aiAssistant.disabledElements','showUI','getRanges','isEnabled','document','selection','refresh','custom','plugins'];(function(_0xe87458,_0x12f55b){const _0x237393=function(_0x2ecab3){while(--_0x2ecab3){_0xe87458['push'](_0xe87458['shift']());}};_0x237393(++_0x12f55b);}(_0x12f5,0xa1));const _0x2373=function(_0xe87458,_0x12f55b){_0xe87458=_0xe87458-0x0;let _0x237393=_0x12f5[_0xe87458];return _0x237393;};import{Command as _0xa11a9f}from'ckeditor5/src/core.js';import _0x2bfa1f from'../aiassistantui.js';export default class g extends _0xa11a9f{[_0x2373('0x5')](){const _0x5c00a8=this['editor']['model'][_0x2373('0x3')][_0x2373('0x4')],_0x42a31a=this[_0x2373('0x9')][_0x2373('0xb')][_0x2373('0xa')](_0x2373('0xc'));for(const _0x4eb20f of _0x5c00a8[_0x2373('0x1')]())for(const _0x2df657 of _0x4eb20f['getItems']())if(_0x2df657['is']('element')&&_0x42a31a['includes'](_0x2df657['name']))return void(this[_0x2373('0x2')]=!0x1);this['isEnabled']=!0x0;}[_0x2373('0x8')](_0x161821='',_0x11670b='',_0x5a8d67=_0x2373('0x6')){this['editor'][_0x2373('0x7')][_0x2373('0xa')](_0x2bfa1f)[_0x2373('0x0')](_0x161821,_0x11670b,_0x5a8d67);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x48bf6c,_0xa79738,_0x1532a9){const t=_0x48bf6c['t'];switch(_0xa79738){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',_0x1532a9);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'},_0x1532a9);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 _0xa79738;}}
23
+ export function getTranslation(_0x1da5a1,_0x5371a2,_0x43cac4){const t=_0x1da5a1['t'];switch(_0x5371a2){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',_0x43cac4);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'},_0x43cac4);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 _0x5371a2;}}