@ckeditor/ckeditor5-ai 41.0.0 → 41.1.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 _0x40e6=['window','submit','fieldView','isEnabled','style','update','submitButtonView','render','focusCycler','focus','_createSubmitButton','history','bind','left','fieldWrapperChildren','add','History','execute','keystrokes','enter','minRows','target','Submit','maxRows','ck-ai-form__toggle-history','isVisible','children','focusableChildren','focusFirst','filteredView','ck-ai-form__submit','isEmpty','resultsView','width','value','locale','fire','requestAnimationFrame','_createShowHistoryButton','uiLanguageDirection','set','rtl','right','element','excludeScrollbarsAndBorders','showHistoryButtonView','queryView','isOn','focusLast'];(function(_0x1efa2e,_0x40e698){const _0x571045=function(_0x392924){while(--_0x392924){_0x1efa2e['push'](_0x1efa2e['shift']());}};_0x571045(++_0x40e698);}(_0x40e6,0xe6));const _0x5710=function(_0x1efa2e,_0x40e698){_0x1efa2e=_0x1efa2e-0x0;let _0x571045=_0x40e6[_0x1efa2e];return _0x571045;};import{Rect as _0x2ce0e0,global as _0x125f59,isVisible as _0x47391b}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x2082c6,ButtonView as _0x242b40}from'ckeditor5/src/ui.js';import{icons as _0x395ff5}from'ckeditor5/src/core.js';import{getTranslation as _0x50b2ca}from'../../utils/common-translations.js';import _0x337335 from'../../../theme/icons/submit.svg';export default class ht extends _0x2082c6{constructor(_0x584c58,_0x16261a){super(_0x584c58,_0x16261a),this[_0x5710('0xc')]['fieldView'][_0x5710('0x23')]=0x1,this['queryView'][_0x5710('0x11')][_0x5710('0x26')]=0x3,this['submitButtonView']=this[_0x5710('0x19')](),this[_0x5710('0xb')]=this[_0x5710('0x4')](),this[_0x5710('0x2a')][_0x5710('0x1e')](this[_0x5710('0xb')],0x1),this[_0x5710('0x2a')][_0x5710('0x1e')](this['submitButtonView']);}[_0x5710('0x16')](){super[_0x5710('0x16')](),this[_0x5710('0xc')][_0x5710('0x1d')][_0x5710('0x1e')](this[_0x5710('0xb')]),this[_0x5710('0x29')]['add'](this[_0x5710('0x15')]),this[_0x5710('0x21')][_0x5710('0x6')](_0x5710('0x22'),(_0x768a70,_0x376326)=>{_0x768a70[_0x5710('0x24')]==this[_0x5710('0xc')][_0x5710('0x11')][_0x5710('0x9')]&&(this[_0x5710('0x10')](),_0x376326());});}['_createSubmitButton'](){const _0x418356=new _0x242b40(this[_0x5710('0x1')]),_0x2a6180=this['locale'];return _0x418356[_0x5710('0x6')]({'icon':_0x337335,'label':_0x50b2ca(_0x2a6180,_0x5710('0x25')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x5710('0x2d')}),_0x418356['on']('execute',()=>{this[_0x5710('0x10')]();}),_0x418356[_0x5710('0x1b')]('isEnabled')['to'](this[_0x5710('0xc')][_0x5710('0x11')],_0x5710('0x2e'),this,_0x5710('0x12'),(_0x45e3aa,_0x3c0bd4)=>!_0x45e3aa&&_0x3c0bd4),_0x418356;}['_createShowHistoryButton'](){const _0x275351=new _0x242b40(this[_0x5710('0x1')]),_0x228da6=this[_0x5710('0x2f')],_0x3f351a=this['locale'];_0x275351[_0x5710('0x6')]({'label':_0x50b2ca(_0x3f351a,_0x5710('0x1f')),'withText':!0x1,'icon':_0x395ff5[_0x5710('0x1a')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x5710('0x27')}),_0x275351[_0x5710('0x1b')](_0x5710('0xd'))['to'](_0x228da6,_0x5710('0x28')),_0x275351[_0x5710('0x1b')](_0x5710('0x12'))['to'](this,_0x5710('0x12')),_0x275351['on'](_0x5710('0x20'),()=>{_0x228da6['isVisible']=!_0x228da6[_0x5710('0x28')],_0x228da6[_0x5710('0x28')]?this[_0x5710('0x2c')][_0x5710('0x18')]():this[_0x5710('0x18')]();});const _0x3f86c3=()=>{_0x125f59[_0x5710('0xf')][_0x5710('0x3')](()=>{if(_0x47391b(this[_0x5710('0x9')])){const _0x98c5cf=new _0x2ce0e0(this[_0x5710('0xc')]['fieldView'][_0x5710('0x9')]),_0x28b284=_0x98c5cf['width'],_0x48f492=_0x5710('0x7')===_0x3f351a[_0x5710('0x5')]?_0x5710('0x1c'):_0x5710('0x8');_0x98c5cf[_0x5710('0xa')](),_0x275351['element'][_0x5710('0x13')][_0x48f492]=_0x28b284-_0x98c5cf[_0x5710('0x30')]+0x1+'px';}});};return this['queryView'][_0x5710('0x11')]['on'](_0x5710('0x14'),_0x3f86c3),this['on']('render',_0x3f86c3),_0x275351;}['submit'](){const _0x104be3=this[_0x5710('0xc')]['fieldView'][_0x5710('0x9')][_0x5710('0x0')];this[_0x5710('0x2')](_0x5710('0x10'),_0x104be3);}[_0x5710('0x18')](_0x26ba80){-0x1===_0x26ba80?this[_0x5710('0x17')][_0x5710('0xe')]():this[_0x5710('0x17')][_0x5710('0x2b')]();}}
23
+ const _0x25ad=['fire','submit','set','_createShowHistoryButton','resultsView','update','target','Submit','history','focusCycler','fieldWrapperChildren','rtl','focusFirst','uiLanguageDirection','showHistoryButtonView','enter','requestAnimationFrame','submitButtonView','window','style','excludeScrollbarsAndBorders','maxRows','minRows','children','queryView','add','render','focus','locale','value','isOn','fieldView','element','isVisible','focusableChildren','right','execute','width','isEnabled','ck-ai-form__toggle-history','_createSubmitButton','filteredView','bind'];(function(_0x1a5444,_0x25addb){const _0x112f1b=function(_0x3ec57b){while(--_0x3ec57b){_0x1a5444['push'](_0x1a5444['shift']());}};_0x112f1b(++_0x25addb);}(_0x25ad,0xd2));const _0x112f=function(_0x1a5444,_0x25addb){_0x1a5444=_0x1a5444-0x0;let _0x112f1b=_0x25ad[_0x1a5444];return _0x112f1b;};import{Rect as _0x3f694f,global as _0x18cf8a,isVisible as _0x1612f1}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x302717,ButtonView as _0x46f7e4}from'ckeditor5/src/ui.js';import{icons as _0x25e98a}from'ckeditor5/src/core.js';import{getTranslation as _0x2ea6a9}from'../../utils/common-translations.js';import _0x4333eb from'../../../theme/icons/submit.svg';export default class ht extends _0x302717{constructor(_0x161099,_0x1bef73){super(_0x161099,_0x1bef73),this[_0x112f('0x1d')][_0x112f('0x24')][_0x112f('0x1b')]=0x1,this[_0x112f('0x1d')]['fieldView'][_0x112f('0x1a')]=0x3,this[_0x112f('0x16')]=this[_0x112f('0x2')](),this[_0x112f('0x13')]=this['_createShowHistoryButton'](),this[_0x112f('0x27')]['add'](this[_0x112f('0x13')],0x1),this[_0x112f('0x27')][_0x112f('0x1e')](this[_0x112f('0x16')]);}[_0x112f('0x1f')](){super['render'](),this[_0x112f('0x1d')][_0x112f('0xf')][_0x112f('0x1e')](this[_0x112f('0x13')]),this[_0x112f('0x1c')][_0x112f('0x1e')](this[_0x112f('0x16')]),this['keystrokes'][_0x112f('0x7')](_0x112f('0x14'),(_0x5110f4,_0x10ecba)=>{_0x5110f4[_0x112f('0xb')]==this['queryView'][_0x112f('0x24')][_0x112f('0x25')]&&(this['submit'](),_0x10ecba());});}[_0x112f('0x2')](){const _0x295fb6=new _0x46f7e4(this[_0x112f('0x21')]),_0x10a770=this[_0x112f('0x21')];return _0x295fb6[_0x112f('0x7')]({'icon':_0x4333eb,'label':_0x2ea6a9(_0x10a770,_0x112f('0xc')),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x295fb6['on']('execute',()=>{this[_0x112f('0x6')]();}),_0x295fb6[_0x112f('0x4')](_0x112f('0x0'))['to'](this[_0x112f('0x1d')][_0x112f('0x24')],'isEmpty',this,_0x112f('0x0'),(_0x381c04,_0x5b662c)=>!_0x381c04&&_0x5b662c),_0x295fb6;}[_0x112f('0x8')](){const _0x3a3444=new _0x46f7e4(this[_0x112f('0x21')]),_0x5169ad=this[_0x112f('0x9')],_0x5027e3=this[_0x112f('0x21')];_0x3a3444[_0x112f('0x7')]({'label':_0x2ea6a9(_0x5027e3,'History'),'withText':!0x1,'icon':_0x25e98a[_0x112f('0xd')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x112f('0x1')}),_0x3a3444[_0x112f('0x4')](_0x112f('0x23'))['to'](_0x5169ad,_0x112f('0x26')),_0x3a3444[_0x112f('0x4')](_0x112f('0x0'))['to'](this,_0x112f('0x0')),_0x3a3444['on'](_0x112f('0x29'),()=>{_0x5169ad['isVisible']=!_0x5169ad[_0x112f('0x26')],_0x5169ad[_0x112f('0x26')]?this[_0x112f('0x3')]['focus']():this[_0x112f('0x20')]();});const _0x2feee7=()=>{_0x18cf8a[_0x112f('0x17')][_0x112f('0x15')](()=>{if(_0x1612f1(this[_0x112f('0x25')])){const _0x3ce70d=new _0x3f694f(this[_0x112f('0x1d')][_0x112f('0x24')][_0x112f('0x25')]),_0x554c01=_0x3ce70d[_0x112f('0x2a')],_0x5df1f0=_0x112f('0x10')===_0x5027e3[_0x112f('0x12')]?'left':_0x112f('0x28');_0x3ce70d[_0x112f('0x19')](),_0x3a3444[_0x112f('0x25')][_0x112f('0x18')][_0x5df1f0]=_0x554c01-_0x3ce70d[_0x112f('0x2a')]+0x1+'px';}});};return this[_0x112f('0x1d')][_0x112f('0x24')]['on'](_0x112f('0xa'),_0x2feee7),this['on'](_0x112f('0x1f'),_0x2feee7),_0x3a3444;}['submit'](){const _0x2cd260=this[_0x112f('0x1d')][_0x112f('0x24')]['element'][_0x112f('0x22')];this[_0x112f('0x5')](_0x112f('0x6'),_0x2cd260);}[_0x112f('0x20')](_0x30195b){-0x1===_0x30195b?this[_0x112f('0xe')]['focusLast']():this[_0x112f('0xe')][_0x112f('0x11')]();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5611=['replace','ck-ai-form__toolbar','stopButton','bind','ck-button-action','addMany','_CONTENT','insert','REPLACE','insertButton','Stop','isVisible','extendTemplate','tryAgainButton','set','bindTemplate','locale','mainAction','replaceButton','ck-hidden','items','toUpperCase','_createButton','label','AI_','Try\x20again'];(function(_0x1e0b64,_0x5611c9){const _0x8ad26=function(_0x3b98d0){while(--_0x3b98d0){_0x1e0b64['push'](_0x1e0b64['shift']());}};_0x8ad26(++_0x5611c9);}(_0x5611,0xe2));const _0x8ad2=function(_0x1e0b64,_0x5611c9){_0x1e0b64=_0x1e0b64-0x0;let _0x8ad26=_0x5611[_0x1e0b64];return _0x8ad26;};import{ToolbarView as _0x316226,ButtonView as _0x51b354}from'ckeditor5/src/ui.js';import{getTranslation as _0xddaf14}from'../../utils/common-translations.js';export const AIFormToolbarViewMainActionLabel={'REPLACE':_0x8ad2('0x8'),'INSERT':_0x8ad2('0xf')};export default class at extends _0x316226{constructor(_0x46e0de){super(_0x46e0de),this[_0x8ad2('0x16')](_0x8ad2('0x13'),!0x1),this[_0x8ad2('0x16')](_0x8ad2('0x19'),AIFormToolbarViewMainActionLabel[_0x8ad2('0x10')]),this[_0x8ad2('0x0')]=this['_createButton']('',_0x8ad2('0xc')),this[_0x8ad2('0x0')][_0x8ad2('0xb')](_0x8ad2('0x5'))['to'](this,_0x8ad2('0x19'),_0x135715=>_0xddaf14(_0x46e0de,_0x8ad2('0x6')+_0x135715[_0x8ad2('0x3')]()+_0x8ad2('0xe'))),this[_0x8ad2('0x11')]=this['_createButton'](_0xddaf14(_0x46e0de,'Insert\x20below')),this['tryAgainButton']=this[_0x8ad2('0x4')](_0xddaf14(_0x46e0de,_0x8ad2('0x7'))),this[_0x8ad2('0xa')]=this['_createButton'](_0xddaf14(_0x46e0de,_0x8ad2('0x12')));const _0x47c062=this[_0x8ad2('0x17')];this[_0x8ad2('0x14')]({'attributes':{'class':[_0x8ad2('0x9'),_0x47c062['if'](_0x8ad2('0x13'),_0x8ad2('0x1'),_0x37273a=>!_0x37273a)]}}),this[_0x8ad2('0x2')][_0x8ad2('0xd')]([this[_0x8ad2('0x0')],this[_0x8ad2('0x11')],this[_0x8ad2('0x15')],this[_0x8ad2('0xa')]]);}[_0x8ad2('0x4')](_0x56ab73,_0x2405f3){const _0x2f41c4=new _0x51b354(this[_0x8ad2('0x18')]);return _0x2f41c4[_0x8ad2('0x16')]({'label':_0x56ab73,'class':_0x2405f3||'','isVisible':!0x0,'withText':!0x0}),_0x2f41c4;}}
23
+ const _0x43b2=['extendTemplate','set','replaceButton','toUpperCase','stopButton','insertButton','mainAction','ck-button-action','REPLACE','Try\x20again','locale','replace','items','bindTemplate','_createButton','Insert\x20below','bind','addMany','tryAgainButton','ck-hidden','insert','AI_','isVisible','Stop','ck-ai-form__toolbar','_CONTENT'];(function(_0x3fe480,_0x43b297){const _0x1138ca=function(_0x17e652){while(--_0x17e652){_0x3fe480['push'](_0x3fe480['shift']());}};_0x1138ca(++_0x43b297);}(_0x43b2,0x170));const _0x1138=function(_0x3fe480,_0x43b297){_0x3fe480=_0x3fe480-0x0;let _0x1138ca=_0x43b2[_0x3fe480];return _0x1138ca;};import{ToolbarView as _0x2da9a0,ButtonView as _0x47fe60}from'ckeditor5/src/ui.js';import{getTranslation as _0x16d989}from'../../utils/common-translations.js';export const AIFormToolbarViewMainActionLabel={'REPLACE':_0x1138('0x7'),'INSERT':_0x1138('0x10')};export default class at extends _0x2da9a0{constructor(_0x52b62c){super(_0x52b62c),this[_0x1138('0x17')](_0x1138('0x12'),!0x1),this[_0x1138('0x17')](_0x1138('0x2'),AIFormToolbarViewMainActionLabel[_0x1138('0x4')]),this[_0x1138('0x18')]=this[_0x1138('0xa')]('',_0x1138('0x3')),this[_0x1138('0x18')][_0x1138('0xc')]('label')['to'](this,_0x1138('0x2'),_0x395b09=>_0x16d989(_0x52b62c,_0x1138('0x11')+_0x395b09[_0x1138('0x19')]()+_0x1138('0x15'))),this['insertButton']=this['_createButton'](_0x16d989(_0x52b62c,_0x1138('0xb'))),this[_0x1138('0xe')]=this[_0x1138('0xa')](_0x16d989(_0x52b62c,_0x1138('0x5'))),this[_0x1138('0x0')]=this[_0x1138('0xa')](_0x16d989(_0x52b62c,_0x1138('0x13')));const _0x183354=this[_0x1138('0x9')];this[_0x1138('0x16')]({'attributes':{'class':[_0x1138('0x14'),_0x183354['if'](_0x1138('0x12'),_0x1138('0xf'),_0xbad83e=>!_0xbad83e)]}}),this[_0x1138('0x8')][_0x1138('0xd')]([this[_0x1138('0x18')],this[_0x1138('0x1')],this[_0x1138('0xe')],this[_0x1138('0x0')]]);}[_0x1138('0xa')](_0x24520c,_0x277f4f){const _0x3b41c7=new _0x47fe60(this[_0x1138('0x6')]);return _0x3b41c7['set']({'label':_0x24520c,'class':_0x277f4f||'','isVisible':!0x0,'withText':!0x0}),_0x3b41c7;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x38ec=['keystrokes','Empty\x20history','tab','setTemplate','bind','focus','focusTracker','AI_ERROR_FAILED','Ask\x20AI\x20to\x20edit\x20or\x20generate','listenTo','focusNext','isProcessing','focusFirst','_promptHistory','isError','prompt','shift\x20+\x20tab','element','locale','mainAction','contentArea','set','clear','clearHistory','isEnabled','fire','forwardCycle','fieldView','add','focusPrevious','toolbar','stop','startProcessing','queryView','submit','value','insertContentBelow','_focusables','ck-ai-form','_createPromptView','historyGroupView','backwardCycle','tryAgainEvent','copyButtonView','search','replaceButton','reset','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','delegate','high','insertButton','div','ck-ai-form-content','REPLACE','finishProcessing','execute','text','promptView','_createToolbar','focusLast','isVisible','errorView','replaceContent','submitPrompt','_createHistoryView','items','focusCycler','bindTo','render'];(function(_0x407df5,_0x38ecff){const _0x30c149=function(_0x128c4e){while(--_0x128c4e){_0x407df5['push'](_0x407df5['shift']());}};_0x30c149(++_0x38ecff);}(_0x38ec,0x173));const _0x30c1=function(_0x407df5,_0x38ecff){_0x407df5=_0x407df5-0x0;let _0x30c149=_0x38ec[_0x407df5];return _0x30c149;};import{FocusTracker as _0x2efdb1,KeystrokeHandler as _0x44b8b0}from'ckeditor5/src/utils.js';import{View as _0x12dac3,FocusCycler as _0x3e13b0,createLabeledTextarea as _0x2f629d}from'ckeditor5/src/ui.js';import _0x1beb2e,{AIFormToolbarViewMainActionLabel as _0x31c492}from'./aiformtoolbarview.js';import _0x4661df from'./aiformcontentarea.js';import _0x3aff52 from'./aiformerrorview.js';import _0x40b740 from'./aiformpromptview.js';import _0x4163c9 from'./aihistorylistview.js';import _0x51ab88 from'./aihistorylistitemview.js';import _0x2917dd from'./prompthistory.js';import{getTranslation as _0x10aec1}from'../../utils/common-translations.js';import{escape as _0x575068}from'lodash-es';export default class v extends _0x12dac3{constructor(_0x5617e0,_0x1d006b,_0xc0c4be=''){super(_0x5617e0),this['set'](_0x30c1('0x43'),!0x0),this['set'](_0x30c1('0x36'),!0x1),this[_0x30c1('0x40')](_0x30c1('0x3a'),''),this['set'](_0x30c1('0x9'),''),this['set']('isError',!0x1),this[_0x30c1('0x40')](_0x30c1('0x3e'),_0x31c492[_0x30c1('0x1b')]),this[_0x30c1('0x38')]=new _0x2917dd(),this[_0x30c1('0x23')]=new _0x3aff52(_0x5617e0),this['contentArea']=new _0x4661df(_0x5617e0,_0xc0c4be),this[_0x30c1('0x3f')][_0x30c1('0x2f')](_0x30c1('0x36'))['to'](this),this[_0x30c1('0x3f')]['bind']('value')['to'](this),this[_0x30c1('0x4')]=this[_0x30c1('0x20')](),this['toolbar'][_0x30c1('0x2f')](_0x30c1('0x3e'))['to'](this),this[_0x30c1('0x1f')]=this['_createPromptView'](),this[_0x30c1('0x31')]=new _0x2efdb1(),this[_0x30c1('0x2b')]=new _0x44b8b0(),this[_0x30c1('0xb')]=this['createCollection']([this['contentArea'],this[_0x30c1('0x3f')][_0x30c1('0x11')],this[_0x30c1('0x4')],this[_0x30c1('0x1f')]]),this['focusCycler']=new _0x3e13b0({'focusables':this[_0x30c1('0xb')],'focusTracker':this[_0x30c1('0x31')],'keystrokeHandler':this[_0x30c1('0x2b')],'actions':{'focusPrevious':_0x30c1('0x3b'),'focusNext':_0x30c1('0x2d')}}),this[_0x30c1('0x1f')]['focusCycler']['on'](_0x30c1('0x0'),_0x4ba352=>{this[_0x30c1('0x28')][_0x30c1('0x35')](),_0x4ba352[_0x30c1('0x5')]();}),this['promptView']['focusCycler']['on'](_0x30c1('0xf'),_0x4c8d16=>{this[_0x30c1('0x28')][_0x30c1('0x3')](),_0x4c8d16[_0x30c1('0x5')]();}),this[_0x30c1('0x1f')][_0x30c1('0x7')][_0x30c1('0x1')]['bind'](_0x30c1('0x9'))['to'](this,'prompt');const _0x5ddeea=this['bindTemplate'];this[_0x30c1('0x2e')]({'tag':_0x30c1('0x19'),'attributes':{'class':['ck',_0x30c1('0xc'),_0x1d006b],'tabindex':'-1'},'children':[{'tag':_0x30c1('0x19'),'attributes':{'class':['ck',_0x30c1('0x1a')]},'children':[{'tag':_0x30c1('0x19'),'attributes':{'class':[_0x5ddeea['if']('isError','ck-hidden',_0x40bff0=>!_0x40bff0)]},'children':[this[_0x30c1('0x23')]]},this['contentArea'],this[_0x30c1('0x4')],this['promptView']]}]});}[_0x30c1('0x2a')](){super[_0x30c1('0x2a')](),this[_0x30c1('0x31')]['add'](this[_0x30c1('0x3f')]['element']),this[_0x30c1('0x31')][_0x30c1('0x2')](this[_0x30c1('0x3f')][_0x30c1('0x11')][_0x30c1('0x3c')]),this[_0x30c1('0x31')][_0x30c1('0x2')](this['toolbar'][_0x30c1('0x3c')]),this[_0x30c1('0x31')]['add'](this[_0x30c1('0x1f')][_0x30c1('0x3c')]),this[_0x30c1('0x2b')][_0x30c1('0x34')](this[_0x30c1('0x3c')]);}['focus'](_0x1ae7fa=0x1){-0x1===_0x1ae7fa?this[_0x30c1('0x28')][_0x30c1('0x21')]():this[_0x30c1('0x28')][_0x30c1('0x37')]();}[_0x30c1('0x14')](){this[_0x30c1('0x3a')]='',this[_0x30c1('0x9')]='',this[_0x30c1('0x39')]=!0x1,this[_0x30c1('0x1f')][_0x30c1('0x14')](),this[_0x30c1('0x3f')]['isVisible']=!0x1,this[_0x30c1('0x4')][_0x30c1('0x22')]=!0x1;}[_0x30c1('0xd')](){const _0x280994=this[_0x30c1('0x3d')],_0xa2282b=new _0x40b740(_0x280994,{'queryView':{'label':_0x10aec1(_0x280994,_0x30c1('0x33')),'creator':_0x2f629d,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x10aec1(_0x280994,_0x30c1('0x2c')),'secondary':_0x10aec1(_0x280994,_0x30c1('0x15'))}}},'filteredView':this[_0x30c1('0x26')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0xa2282b[_0x30c1('0x2f')](_0x30c1('0x43'))['to'](this,'isEnabled',this,_0x30c1('0x36'),(_0x2be238,_0xee1cc9)=>_0x2be238&&!_0xee1cc9),this[_0x30c1('0x34')](_0xa2282b,_0x30c1('0x8'),(_0x2dd2cc,_0x38014a)=>{this[_0x30c1('0x3a')]=_0x38014a;const _0x3071ec=_0x575068(_0x38014a);this[_0x30c1('0x44')](_0x30c1('0x25'),_0x3071ec),_0x38014a['trim']()&&this[_0x30c1('0x38')][_0x30c1('0x2')]({'prompt':_0x3071ec},0x0);},{'priority':_0x30c1('0x17')}),_0xa2282b;}[_0x30c1('0x26')](){const _0x34fa68=new _0x4163c9(this['locale']);return _0x34fa68[_0x30c1('0xe')][_0x30c1('0x27')][_0x30c1('0x29')](this[_0x30c1('0x38')])['as'](_0x51ab88),_0x34fa68['on'](_0x30c1('0x42'),()=>{this[_0x30c1('0x38')][_0x30c1('0x41')](),this[_0x30c1('0x1f')][_0x30c1('0x12')](''),this[_0x30c1('0x1f')][_0x30c1('0x30')]();}),_0x34fa68;}[_0x30c1('0x20')](){const _0x110191=new _0x1beb2e(this['locale']);return _0x110191['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,_0x30c1('0x36'),this,_0x30c1('0x9'),(_0x4090d1,_0x5b6087,_0x4f6e00)=>_0x4090d1&&!_0x5b6087&&!!_0x4f6e00),_0x110191[_0x30c1('0x13')][_0x30c1('0x16')]('execute')['to'](this,_0x30c1('0x24')),_0x110191['insertButton']['bind'](_0x30c1('0x43'))['to'](this,_0x30c1('0x43'),this,_0x30c1('0x36'),this,_0x30c1('0x9'),(_0x48cb9e,_0x2786c0,_0x2001ea)=>_0x48cb9e&&!_0x2786c0&&!!_0x2001ea),_0x110191[_0x30c1('0x18')][_0x30c1('0x16')](_0x30c1('0x1d'))['to'](this,_0x30c1('0xa')),_0x110191['tryAgainButton']['bind'](_0x30c1('0x43'))['to'](this,_0x30c1('0x43'),this,_0x30c1('0x36'),(_0x3527df,_0x3ae1e1)=>_0x3527df&&!_0x3ae1e1),_0x110191['tryAgainButton']['delegate'](_0x30c1('0x1d'))['to'](this,_0x30c1('0x10')),_0x110191['stopButton'][_0x30c1('0x2f')](_0x30c1('0x43'))['to'](this,_0x30c1('0x36')),_0x110191['stopButton'][_0x30c1('0x16')](_0x30c1('0x1d'))['to'](this,'stopProcessing'),_0x110191;}[_0x30c1('0x6')](){this[_0x30c1('0x9')]='',this['isError']=!0x1,this[_0x30c1('0x36')]=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar'][_0x30c1('0x22')]=!0x0,this[_0x30c1('0x3f')]['focus']();}[_0x30c1('0x1c')](){const _0x47cb93=this[_0x30c1('0x3d')];this[_0x30c1('0x36')]=!0x1,this[_0x30c1('0x3a')]='',this['promptView'][_0x30c1('0x14')](),this[_0x30c1('0x9')]&&(this[_0x30c1('0x1f')][_0x30c1('0x7')]['label']=_0x10aec1(_0x47cb93,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x4ffe3d){const _0x2aefce=this['locale'];this[_0x30c1('0x1c')](),this[_0x30c1('0x39')]=!0x0,this[_0x30c1('0x23')][_0x30c1('0x1e')]=_0x4ffe3d||_0x10aec1(_0x2aefce,_0x30c1('0x32')),this[_0x30c1('0x9')]||(this[_0x30c1('0x3f')][_0x30c1('0x22')]=!0x1);}}
23
+ const _0x287b=['replaceButton','clear','isEnabled','locale','AI_ERROR_FAILED','focusCycler','add','historyGroupView','shift\x20+\x20tab','fire','value','insertContentBelow','contentArea','focusPrevious','replaceContent','set','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','isError','submitPrompt','fieldView','delegate','errorView','clearHistory','_promptHistory','Ask\x20AI\x20to\x20improve\x20generated\x20text','stopButton','focusNext','backwardCycle','stop','focusTracker','ck-ai-form','promptView','handleError','_createHistoryView','div','toolbar','startProcessing','focusFirst','REPLACE','render','element','text','tryAgainEvent','insertButton','bindTo','isVisible','ck-ai-form-content','_createToolbar','focus','tryAgainButton','finishProcessing','createCollection','mainAction','stopProcessing','bind','reset','execute','trim','focusLast','items','setTemplate','prompt','submit','keystrokes','queryView','_focusables','isProcessing','copyButtonView','_createPromptView'];(function(_0x2da91a,_0x287bba){const _0x455b21=function(_0x144636){while(--_0x144636){_0x2da91a['push'](_0x2da91a['shift']());}};_0x455b21(++_0x287bba);}(_0x287b,0x123));const _0x455b=function(_0x2da91a,_0x287bba){_0x2da91a=_0x2da91a-0x0;let _0x455b21=_0x287b[_0x2da91a];return _0x455b21;};import{FocusTracker as _0x53ee1d,KeystrokeHandler as _0x41d6c6}from'ckeditor5/src/utils.js';import{View as _0x43f5d6,FocusCycler as _0x313bdc,createLabeledTextarea as _0x284bbc}from'ckeditor5/src/ui.js';import _0x27ae3a,{AIFormToolbarViewMainActionLabel as _0x494123}from'./aiformtoolbarview.js';import _0x3b3ccd from'./aiformcontentarea.js';import _0x256f89 from'./aiformerrorview.js';import _0x2b0094 from'./aiformpromptview.js';import _0x343725 from'./aihistorylistview.js';import _0x54f7f6 from'./aihistorylistitemview.js';import _0x44ec00 from'./prompthistory.js';import{getTranslation as _0x10e538}from'../../utils/common-translations.js';import{escape as _0x72d839}from'lodash-es';export default class v extends _0x43f5d6{constructor(_0x4d02c8,_0x178708,_0x5ee5b1=''){super(_0x4d02c8),this[_0x455b('0x0')](_0x455b('0x38'),!0x0),this[_0x455b('0x0')](_0x455b('0x33'),!0x1),this['set'](_0x455b('0x2e'),''),this[_0x455b('0x0')](_0x455b('0x40'),''),this[_0x455b('0x0')](_0x455b('0x2'),!0x1),this[_0x455b('0x0')](_0x455b('0x25'),_0x494123[_0x455b('0x17')]),this[_0x455b('0x8')]=new _0x44ec00(),this[_0x455b('0x6')]=new _0x256f89(_0x4d02c8),this[_0x455b('0x42')]=new _0x3b3ccd(_0x4d02c8,_0x5ee5b1),this['contentArea'][_0x455b('0x27')](_0x455b('0x33'))['to'](this),this[_0x455b('0x42')][_0x455b('0x27')](_0x455b('0x40'))['to'](this),this[_0x455b('0x14')]=this[_0x455b('0x20')](),this[_0x455b('0x14')]['bind']('mainAction')['to'](this),this[_0x455b('0x10')]=this['_createPromptView'](),this[_0x455b('0xe')]=new _0x53ee1d(),this[_0x455b('0x30')]=new _0x41d6c6(),this[_0x455b('0x32')]=this[_0x455b('0x24')]([this['contentArea'],this[_0x455b('0x42')][_0x455b('0x34')],this[_0x455b('0x14')],this[_0x455b('0x10')]]),this[_0x455b('0x3b')]=new _0x313bdc({'focusables':this[_0x455b('0x32')],'focusTracker':this[_0x455b('0xe')],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':_0x455b('0x3e'),'focusNext':'tab'}}),this[_0x455b('0x10')][_0x455b('0x3b')]['on']('forwardCycle',_0x456929=>{this[_0x455b('0x3b')][_0x455b('0xb')](),_0x456929[_0x455b('0xd')]();}),this[_0x455b('0x10')][_0x455b('0x3b')]['on'](_0x455b('0xc'),_0x59a37e=>{this[_0x455b('0x3b')][_0x455b('0x43')](),_0x59a37e[_0x455b('0xd')]();}),this[_0x455b('0x10')][_0x455b('0x31')][_0x455b('0x4')]['bind'](_0x455b('0x40'))['to'](this,_0x455b('0x2e'));const _0x4bafdb=this['bindTemplate'];this[_0x455b('0x2d')]({'tag':_0x455b('0x13'),'attributes':{'class':['ck',_0x455b('0xf'),_0x178708],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck',_0x455b('0x1f')]},'children':[{'tag':_0x455b('0x13'),'attributes':{'class':[_0x4bafdb['if']('isError','ck-hidden',_0x16ceec=>!_0x16ceec)]},'children':[this[_0x455b('0x6')]]},this[_0x455b('0x42')],this[_0x455b('0x14')],this['promptView']]}]});}[_0x455b('0x18')](){super[_0x455b('0x18')](),this['focusTracker'][_0x455b('0x3c')](this[_0x455b('0x42')]['element']),this[_0x455b('0xe')][_0x455b('0x3c')](this['contentArea'][_0x455b('0x34')][_0x455b('0x19')]),this[_0x455b('0xe')][_0x455b('0x3c')](this['toolbar'][_0x455b('0x19')]),this[_0x455b('0xe')][_0x455b('0x3c')](this[_0x455b('0x10')][_0x455b('0x19')]),this['keystrokes']['listenTo'](this[_0x455b('0x19')]);}[_0x455b('0x21')](_0x49a309=0x1){-0x1===_0x49a309?this['focusCycler'][_0x455b('0x2b')]():this[_0x455b('0x3b')][_0x455b('0x16')]();}[_0x455b('0x28')](){this['prompt']='',this['value']='',this[_0x455b('0x2')]=!0x1,this['promptView']['reset'](),this[_0x455b('0x42')]['isVisible']=!0x1,this[_0x455b('0x14')][_0x455b('0x1e')]=!0x1;}[_0x455b('0x35')](){const _0x56dd74=this[_0x455b('0x39')],_0x237644=new _0x2b0094(_0x56dd74,{'queryView':{'label':_0x10e538(_0x56dd74,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x284bbc,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x10e538(_0x56dd74,'Empty\x20history'),'secondary':_0x10e538(_0x56dd74,_0x455b('0x1'))}}},'filteredView':this[_0x455b('0x12')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x237644[_0x455b('0x27')](_0x455b('0x38'))['to'](this,_0x455b('0x38'),this,_0x455b('0x33'),(_0xb59428,_0xe00802)=>_0xb59428&&!_0xe00802),this['listenTo'](_0x237644,_0x455b('0x2f'),(_0x6ed043,_0x2f074e)=>{this['prompt']=_0x2f074e;const _0xdc6a0=_0x72d839(_0x2f074e);this[_0x455b('0x3f')](_0x455b('0x3'),_0xdc6a0),_0x2f074e[_0x455b('0x2a')]()&&this[_0x455b('0x8')]['add']({'prompt':_0xdc6a0},0x0);},{'priority':'high'}),_0x237644;}[_0x455b('0x12')](){const _0x4d1d91=new _0x343725(this['locale']);return _0x4d1d91[_0x455b('0x3d')][_0x455b('0x2c')][_0x455b('0x1d')](this[_0x455b('0x8')])['as'](_0x54f7f6),_0x4d1d91['on'](_0x455b('0x7'),()=>{this[_0x455b('0x8')][_0x455b('0x37')](),this['promptView']['search'](''),this[_0x455b('0x10')]['focus']();}),_0x4d1d91;}['_createToolbar'](){const _0x1dd56c=new _0x27ae3a(this[_0x455b('0x39')]);return _0x1dd56c[_0x455b('0x36')]['bind']('isEnabled')['to'](this,_0x455b('0x38'),this,'isProcessing',this,_0x455b('0x40'),(_0x3048b2,_0x5a9f38,_0x5e9238)=>_0x3048b2&&!_0x5a9f38&&!!_0x5e9238),_0x1dd56c['replaceButton'][_0x455b('0x5')](_0x455b('0x29'))['to'](this,_0x455b('0x44')),_0x1dd56c[_0x455b('0x1c')][_0x455b('0x27')](_0x455b('0x38'))['to'](this,_0x455b('0x38'),this,'isProcessing',this,_0x455b('0x40'),(_0x233f1d,_0x122b37,_0x225080)=>_0x233f1d&&!_0x122b37&&!!_0x225080),_0x1dd56c['insertButton'][_0x455b('0x5')](_0x455b('0x29'))['to'](this,_0x455b('0x41')),_0x1dd56c[_0x455b('0x22')][_0x455b('0x27')](_0x455b('0x38'))['to'](this,_0x455b('0x38'),this,_0x455b('0x33'),(_0x4cde12,_0x5eda1d)=>_0x4cde12&&!_0x5eda1d),_0x1dd56c[_0x455b('0x22')][_0x455b('0x5')](_0x455b('0x29'))['to'](this,_0x455b('0x1b')),_0x1dd56c[_0x455b('0xa')][_0x455b('0x27')]('isEnabled')['to'](this,_0x455b('0x33')),_0x1dd56c[_0x455b('0xa')][_0x455b('0x5')](_0x455b('0x29'))['to'](this,_0x455b('0x26')),_0x1dd56c;}[_0x455b('0x15')](){this['value']='',this[_0x455b('0x2')]=!0x1,this['isProcessing']=!0x0,this[_0x455b('0x42')]['isVisible']=!0x0,this[_0x455b('0x14')][_0x455b('0x1e')]=!0x0,this[_0x455b('0x42')][_0x455b('0x21')]();}[_0x455b('0x23')](){const _0x2143ef=this[_0x455b('0x39')];this['isProcessing']=!0x1,this[_0x455b('0x2e')]='',this[_0x455b('0x10')][_0x455b('0x28')](),this[_0x455b('0x40')]&&(this['promptView'][_0x455b('0x31')]['label']=_0x10e538(_0x2143ef,_0x455b('0x9')));}[_0x455b('0x11')](_0x352c47){const _0x4e9b30=this[_0x455b('0x39')];this[_0x455b('0x23')](),this['isError']=!0x0,this[_0x455b('0x6')][_0x455b('0x1a')]=_0x352c47||_0x10e538(_0x4e9b30,_0x455b('0x3a')),this['value']||(this[_0x455b('0x42')][_0x455b('0x1e')]=!0x1);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x18e1=['prompt','execute','set','children'];(function(_0x54ac05,_0x18e1fc){const _0x3e8f40=function(_0xef0342){while(--_0xef0342){_0x54ac05['push'](_0x54ac05['shift']());}};_0x3e8f40(++_0x18e1fc);}(_0x18e1,0x1c8));const _0x3e8f=function(_0x54ac05,_0x18e1fc){_0x54ac05=_0x54ac05-0x0;let _0x3e8f40=_0x18e1[_0x54ac05];return _0x3e8f40;};import{ListItemView as _0xbb61d6,ButtonView as _0x3b58ff}from'ckeditor5/src/ui.js';import _0x10a600 from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0x193fb5}from'lodash-es';export default class hs extends _0xbb61d6{constructor(_0x4826c7){super();const _0x163b17=new _0x10a600(),_0x134025=new _0x3b58ff(this['locale'],_0x163b17);this[_0x3e8f('0x3')]['add'](_0x134025),_0x134025[_0x3e8f('0x2')]({'label':_0x4826c7['prompt'],'withText':!0x0}),_0x134025['on'](_0x3e8f('0x1'),()=>{this['fire'](_0x3e8f('0x1'),{'value':_0x193fb5(_0x4826c7[_0x3e8f('0x0')])});});}}
23
+ const _0x5e70=['add','prompt','execute','fire'];(function(_0x2c4464,_0x5e70d1){const _0x5711aa=function(_0x2d5c09){while(--_0x2d5c09){_0x2c4464['push'](_0x2c4464['shift']());}};_0x5711aa(++_0x5e70d1);}(_0x5e70,0x11e));const _0x5711=function(_0x2c4464,_0x5e70d1){_0x2c4464=_0x2c4464-0x0;let _0x5711aa=_0x5e70[_0x2c4464];return _0x5711aa;};import{ListItemView as _0x5942e3,ButtonView as _0x142971}from'ckeditor5/src/ui.js';import _0x35f643 from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0x2caf88}from'lodash-es';export default class hs extends _0x5942e3{constructor(_0x365248){super();const _0x3067d6=new _0x35f643(),_0x419c88=new _0x142971(this['locale'],_0x3067d6);this['children'][_0x5711('0x2')](_0x419c88),_0x419c88['set']({'label':_0x365248[_0x5711('0x3')],'withText':!0x0}),_0x419c88['on'](_0x5711('0x0'),()=>{this[_0x5711('0x1')](_0x5711('0x0'),{'value':_0x2caf88(_0x365248[_0x5711('0x3')])});});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5ca2=['Prompt\x20history','children','add','historyGroupView','length','_createClearHistoryButton','filter','label','Clear','locale','clearHistoryButton','items','execute','fire','set'];(function(_0x1af96a,_0x5ca2a2){const _0x3a0084=function(_0x2df122){while(--_0x2df122){_0x1af96a['push'](_0x1af96a['shift']());}};_0x3a0084(++_0x5ca2a2);}(_0x5ca2,0xd5));const _0x3a00=function(_0x1af96a,_0x5ca2a2){_0x1af96a=_0x1af96a-0x0;let _0x3a0084=_0x5ca2[_0x1af96a];return _0x3a0084;};import{ListView as _0x5abef1,ListItemGroupView as _0x33216e,ButtonView as _0x35571b}from'ckeditor5/src/ui.js';import{getTranslation as _0x299b61}from'../../utils/common-translations.js';export default class rs extends _0x5abef1{constructor(_0x4da02a){super(_0x4da02a),this[_0x3a00('0x7')]=this[_0x3a00('0x2')](),this[_0x3a00('0x0')]=new _0x33216e(),this[_0x3a00('0x0')][_0x3a00('0xd')][_0x3a00('0xe')](this['clearHistoryButton'],0x1),this[_0x3a00('0x0')][_0x3a00('0x4')]=_0x299b61(_0x4da02a,_0x3a00('0xc')),this['historyGroupView'][_0x3a00('0x8')]['delegate'](_0x3a00('0x9'))['to'](this),this[_0x3a00('0x8')][_0x3a00('0xe')](this[_0x3a00('0x0')]);}[_0x3a00('0x3')](){let _0x2499a4=0x0;for(const _0x5c71a5 of this['items'])_0x2499a4+=_0x5c71a5[_0x3a00('0x8')][_0x3a00('0x1')];return{'resultsCount':_0x2499a4,'totalItemsCount':_0x2499a4};}[_0x3a00('0x2')](){const _0x3efec7=this[_0x3a00('0x6')],_0x5e272a=new _0x35571b(this[_0x3a00('0x6')]);return _0x5e272a[_0x3a00('0xb')]({'label':'('+_0x299b61(_0x3efec7,_0x3a00('0x5'))+')','withText':!0x0}),_0x5e272a['on'](_0x3a00('0x9'),()=>this[_0x3a00('0xa')]('clearHistory')),_0x5e272a;}}
23
+ const _0x1f1b=['set','items','Clear','historyGroupView','filter','length','add','clearHistoryButton','clearHistory','execute','fire','locale'];(function(_0x1b3d0a,_0x1f1b2c){const _0x4e4322=function(_0x4c23f4){while(--_0x4c23f4){_0x1b3d0a['push'](_0x1b3d0a['shift']());}};_0x4e4322(++_0x1f1b2c);}(_0x1f1b,0xd6));const _0x4e43=function(_0x1b3d0a,_0x1f1b2c){_0x1b3d0a=_0x1b3d0a-0x0;let _0x4e4322=_0x1f1b[_0x1b3d0a];return _0x4e4322;};import{ListView as _0x2ea859,ListItemGroupView as _0x5383d5,ButtonView as _0x99327e}from'ckeditor5/src/ui.js';import{getTranslation as _0x52d153}from'../../utils/common-translations.js';export default class rs extends _0x2ea859{constructor(_0x1689c1){super(_0x1689c1),this[_0x4e43('0x9')]=this['_createClearHistoryButton'](),this[_0x4e43('0x5')]=new _0x5383d5(),this['historyGroupView']['children'][_0x4e43('0x8')](this[_0x4e43('0x9')],0x1),this[_0x4e43('0x5')]['label']=_0x52d153(_0x1689c1,'Prompt\x20history'),this[_0x4e43('0x5')][_0x4e43('0x3')]['delegate'](_0x4e43('0xb'))['to'](this),this[_0x4e43('0x3')]['add'](this['historyGroupView']);}[_0x4e43('0x6')](){let _0x477be0=0x0;for(const _0x15a621 of this[_0x4e43('0x3')])_0x477be0+=_0x15a621[_0x4e43('0x3')][_0x4e43('0x7')];return{'resultsCount':_0x477be0,'totalItemsCount':_0x477be0};}['_createClearHistoryButton'](){const _0x352003=this['locale'],_0x557e3a=new _0x99327e(this[_0x4e43('0x1')]);return _0x557e3a[_0x4e43('0x2')]({'label':'('+_0x52d153(_0x352003,_0x4e43('0x4'))+')','withText':!0x0}),_0x557e3a['on'](_0x4e43('0xb'),()=>this[_0x4e43('0x0')](_0x4e43('0xa'))),_0x557e3a;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x473c=['stringify','getItem','remove','length','prompt','add','parse','_saveToSessionStorage','addMany','last','toLowerCase','_loadFromSessionStorage','CKEditor/AIFormView/PromptHistory','map'];(function(_0x5b4c41,_0x473cb9){const _0x504b15=function(_0x18f729){while(--_0x18f729){_0x5b4c41['push'](_0x5b4c41['shift']());}};_0x504b15(++_0x473cb9);}(_0x473c,0x1e3));const _0x504b=function(_0x5b4c41,_0x473cb9){_0x5b4c41=_0x5b4c41-0x0;let _0x504b15=_0x473c[_0x5b4c41];return _0x504b15;};import{Collection as _0x199604}from'ckeditor5/src/utils.js';const cs=_0x504b('0x5');export default class os extends _0x199604{constructor(){super(),this[_0x504b('0x4')](),this['on'](_0x504b('0xc'),(_0x420f68,_0x33430c)=>{const _0x3b0105=Ss(_0x33430c[_0x504b('0xb')]);for(const _0x5723cf of this)if(_0x5723cf!=_0x33430c&&Ss(_0x5723cf['prompt'])===_0x3b0105){this[_0x504b('0x9')](_0x5723cf);break;}this[_0x504b('0xa')]>0x14&&this[_0x504b('0x9')](this[_0x504b('0x2')]),this['_saveToSessionStorage']();}),this['on'](_0x504b('0x9'),()=>{this[_0x504b('0x0')]();});}[_0x504b('0x4')](){const _0x51ec5a=sessionStorage[_0x504b('0x8')](cs)||'[]';this[_0x504b('0x1')](JSON[_0x504b('0xd')](_0x51ec5a));}[_0x504b('0x0')](){sessionStorage['setItem'](cs,JSON[_0x504b('0x7')](this[_0x504b('0x6')](_0x2a6395=>_0x2a6395)));}}function Ss(_0x46671e){return _0x46671e[_0x504b('0x3')]()['trim']();}
23
+ const _0x1242=['CKEditor/AIFormView/PromptHistory','toLowerCase','length','getItem','remove','stringify','addMany','last','add','setItem','prompt','_saveToSessionStorage','map'];(function(_0xfca20c,_0x124275){const _0x41a510=function(_0x1fce27){while(--_0x1fce27){_0xfca20c['push'](_0xfca20c['shift']());}};_0x41a510(++_0x124275);}(_0x1242,0xa6));const _0x41a5=function(_0xfca20c,_0x124275){_0xfca20c=_0xfca20c-0x0;let _0x41a510=_0x1242[_0xfca20c];return _0x41a510;};import{Collection as _0x379985}from'ckeditor5/src/utils.js';const cs=_0x41a5('0x3');export default class os extends _0x379985{constructor(){super(),this['_loadFromSessionStorage'](),this['on'](_0x41a5('0xb'),(_0x5c5b9b,_0x269b4d)=>{const _0x44f0ba=Ss(_0x269b4d[_0x41a5('0x0')]);for(const _0x7df0b7 of this)if(_0x7df0b7!=_0x269b4d&&Ss(_0x7df0b7['prompt'])===_0x44f0ba){this[_0x41a5('0x7')](_0x7df0b7);break;}this[_0x41a5('0x5')]>0x14&&this[_0x41a5('0x7')](this[_0x41a5('0xa')]),this[_0x41a5('0x1')]();}),this['on']('remove',()=>{this[_0x41a5('0x1')]();});}['_loadFromSessionStorage'](){const _0x48dd43=sessionStorage[_0x41a5('0x6')](cs)||'[]';this[_0x41a5('0x9')](JSON['parse'](_0x48dd43));}['_saveToSessionStorage'](){sessionStorage[_0x41a5('0xc')](cs,JSON[_0x41a5('0x8')](this[_0x41a5('0x2')](_0x4e67a8=>_0x4e67a8)));}}function Ss(_0x238169){return _0x238169[_0x41a5('0x4')]()['trim']();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1a04=['refresh','element','custom','selection','showUI','config','document','isEnabled','execute','ai.aiAssistant.disabledElements','name','getItems','model','includes','get','editor'];(function(_0x50d75b,_0x1a0450){const _0x32f3b5=function(_0x5d5955){while(--_0x5d5955){_0x50d75b['push'](_0x50d75b['shift']());}};_0x32f3b5(++_0x1a0450);}(_0x1a04,0x1b7));const _0x32f3=function(_0x50d75b,_0x1a0450){_0x50d75b=_0x50d75b-0x0;let _0x32f3b5=_0x1a04[_0x50d75b];return _0x32f3b5;};import{Command as _0xe637c4}from'ckeditor5/src/core.js';import _0x1d2260 from'../aiassistantui.js';export default class g extends _0xe637c4{[_0x32f3('0x9')](){const _0x3da2da=this[_0x32f3('0x8')][_0x32f3('0x5')][_0x32f3('0xf')][_0x32f3('0xc')],_0x389fbc=this[_0x32f3('0x8')][_0x32f3('0xe')][_0x32f3('0x7')](_0x32f3('0x2'));for(const _0x4651b2 of _0x3da2da['getRanges']())for(const _0x5ef151 of _0x4651b2[_0x32f3('0x4')]())if(_0x5ef151['is'](_0x32f3('0xa'))&&_0x389fbc[_0x32f3('0x6')](_0x5ef151[_0x32f3('0x3')]))return void(this[_0x32f3('0x0')]=!0x1);this['isEnabled']=!0x0;}[_0x32f3('0x1')](_0xccee65='',_0x1cacb3='',_0x12d6fe=_0x32f3('0xb')){this[_0x32f3('0x8')]['plugins'][_0x32f3('0x7')](_0x1d2260)[_0x32f3('0xd')](_0xccee65,_0x1cacb3,_0x12d6fe);}}
23
+ const _0x40bb=['refresh','includes','isEnabled','ai.aiAssistant.disabledElements','element','getRanges','config','execute','get','editor','showUI','model','name','getItems','plugins'];(function(_0x3cc29,_0x40bbf6){const _0x84905b=function(_0x5ba3c4){while(--_0x5ba3c4){_0x3cc29['push'](_0x3cc29['shift']());}};_0x84905b(++_0x40bbf6);}(_0x40bb,0x64));const _0x8490=function(_0x3cc29,_0x40bbf6){_0x3cc29=_0x3cc29-0x0;let _0x84905b=_0x40bb[_0x3cc29];return _0x84905b;};import{Command as _0x53afe4}from'ckeditor5/src/core.js';import _0x1ab446 from'../aiassistantui.js';export default class g extends _0x53afe4{[_0x8490('0x5')](){const _0x291b71=this[_0x8490('0xe')][_0x8490('0x1')]['document']['selection'],_0x181958=this[_0x8490('0xe')][_0x8490('0xb')][_0x8490('0xd')](_0x8490('0x8'));for(const _0x2aa27c of _0x291b71[_0x8490('0xa')]())for(const _0x293a68 of _0x2aa27c[_0x8490('0x3')]())if(_0x293a68['is'](_0x8490('0x9'))&&_0x181958[_0x8490('0x6')](_0x293a68[_0x8490('0x2')]))return void(this[_0x8490('0x7')]=!0x1);this[_0x8490('0x7')]=!0x0;}[_0x8490('0xc')](_0x56df60='',_0x6e9843='',_0x49cc57='custom'){this['editor'][_0x8490('0x4')][_0x8490('0xd')](_0x1ab446)[_0x8490('0x0')](_0x56df60,_0x6e9843,_0x49cc57);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x56c57f,_0x1170a3,_0x4ac435){const t=_0x56c57f['t'];switch(_0x1170a3){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',_0x4ac435);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'},_0x4ac435);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 _0x1170a3;}}
23
+ export function getTranslation(_0x47f906,_0x13ad73,_0x2540fc){const t=_0x47f906['t'];switch(_0x13ad73){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',_0x2540fc);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'},_0x2540fc);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 _0x13ad73;}}