@ckeditor/ckeditor5-ai 0.0.0-nightly-20231103.0 → 0.0.0-nightly-20231105.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 _0x5805=['top_p','system','aiAssistant','stringify','sendPrompt','document','text/html','_cleanUpData','parseFromString','<span>','POST','user','Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','_xmlSerializer','editing','content','application/json','data','config','reject','</span>','gpt-3.5-turbo','read','string','startsWith','Authorization','filter','catch','AIRequestError','stream','signal','includes','_isBufferIncomplete','_apiUrl','get','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','aiAssistant.requestParameters.temperature','_authKey','_abortController','_readStreamableResponse','map','processPrompt','data:\x20','temperature','json','split','_parseAndNormalizeContent','resolve','aiAssistant.apiUrl','model','editor','view','text','aiAssistant.requestParameters.model','message','replace','_readStaticResponse','abort','choices','define','_prepareMessages','length','locale','adapter','name','[DONE]','getReader','parse','Bearer\x20','_domParser','aiAssistant.requestParameters','serializeToString','decode','_requestParameters','delta','toModel','Moderation','aiAssistant.requestParameters.top_p','AI_ERROR_MODERATION','max_tokens','authKey','processor','_normalizeResponseHeadings'];(function(_0x1203c8,_0x5805cf){const _0x17469b=function(_0x34b451){while(--_0x34b451){_0x1203c8['push'](_0x1203c8['shift']());}};_0x17469b(++_0x5805cf);}(_0x5805,0xaf));const _0x1746=function(_0x1203c8,_0x5805cf){_0x1203c8=_0x1203c8-0x0;let _0x17469b=_0x5805[_0x1203c8];return _0x17469b;};import{Matcher as _0x401a5b,UpcastWriter as _0x45f694}from'ckeditor5/src/engine';import{Plugin as _0x50aba3}from'ckeditor5/src/core';import{CKEditorError as _0x51fde0}from'ckeditor5/src/utils';import{getTranslation as _0x43fb77}from'./utils/common-translations';export default class o extends _0x50aba3{static get['pluginName'](){return'AIConnector';}constructor(_0x375040){super(_0x375040),_0x375040[_0x1746('0x9')][_0x1746('0x32')](_0x1746('0x27'),'https://api.openai.com/v1/chat/completions'),_0x375040[_0x1746('0x9')][_0x1746('0x32')](_0x1746('0x2c'),_0x1746('0xc')),_0x375040[_0x1746('0x9')][_0x1746('0x32')]('aiAssistant.requestParameters.max_tokens',0x7d0),_0x375040[_0x1746('0x9')][_0x1746('0x32')](_0x1746('0x1b'),0x1),_0x375040['config'][_0x1746('0x32')](_0x1746('0x44'),0x1),_0x375040[_0x1746('0x9')][_0x1746('0x32')]('aiAssistant.requestParameters.stream',!0x0);const _0x4d33f3=_0x375040[_0x1746('0x9')][_0x1746('0x19')](_0x1746('0x27')),_0x37c70e=_0x375040[_0x1746('0x9')]['get'](_0x1746('0x4c'))[_0x1746('0x47')],_0xbc15a1=_0x375040[_0x1746('0x9')][_0x1746('0x19')](_0x1746('0x3d'));this['_abortController']=new AbortController(),this[_0x1746('0x36')]=new OpenAIAdapter(_0x375040,_0x4d33f3,_0xbc15a1,_0x37c70e);}async[_0x1746('0x20')](_0x1fe167,_0x265a28,_0x11ecd3){const {systemMessage:_0x59dd75,userMessage:_0x38b752}=this[_0x1746('0x33')](_0x1fe167,_0x265a28);return this[_0x1746('0x36')][_0x1746('0x4e')](_0x59dd75,_0x38b752,this['_abortController'][_0x1746('0x15')],_0x11ecd3)[_0x1746('0x12')](_0x41f494=>{if(_0x41f494 instanceof AIRequestError)return Promise['reject'](_0x41f494);if('AbortError'==_0x41f494[_0x1746('0x37')])return Promise[_0x1746('0x26')]();throw console['error'](_0x41f494),new _0x51fde0('aiconnector-send-prompt-failed',null);});}[_0x1746('0x30')](){this[_0x1746('0x1d')][_0x1746('0x15')]['aborted']||(this[_0x1746('0x1d')][_0x1746('0x30')](),this[_0x1746('0x1d')]=new AbortController());}['_prepareMessages'](_0x3261ed,_0x1fe9d3){let _0x3601c3,_0x12878a;return _0x1fe9d3?(_0x3601c3=_0x1746('0x3'),_0x12878a='Instruction:\x0a'+_0x3261ed+_0x1746('0x1a')+(_0x1fe9d3[_0x1746('0xf')]('<')?_0x1fe9d3:_0x1746('0x0')+_0x1fe9d3+_0x1746('0xb'))):(_0x3601c3='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x12878a=_0x3261ed),{'systemMessage':_0x3601c3,'userMessage':_0x12878a};}}export class OpenAIAdapter{constructor(_0x3be75d,_0x56f60a,_0x2b69d1,_0x39ae91){this['editor']=_0x3be75d,this[_0x1746('0x18')]=_0x56f60a,this[_0x1746('0x1c')]=_0x39ae91,this['_requestParameters']=_0x2b69d1,this[_0x1746('0x3c')]=new DOMParser(),this[_0x1746('0x4')]=new XMLSerializer();}async['sendPrompt'](_0x248209,_0x3d8187,_0x465451,_0x171564){const _0xad7354=this[_0x1746('0x29')][_0x1746('0x35')],_0xe143fd={'Content-Type':_0x1746('0x7')};if(_0x1746('0xe')==typeof this['_authKey'])_0xe143fd[_0x1746('0x10')]=_0x1746('0x3b')+this[_0x1746('0x1c')];else{if(this[_0x1746('0x1c')])try{const _0xfff88f=await this[_0x1746('0x1c')]();_0xe143fd[_0x1746('0x10')]=_0x1746('0x3b')+_0xfff88f;}catch(_0x24b9dd){return Promise[_0x1746('0xa')](new AIRequestError(_0x43fb77(_0xad7354,'AI_ERROR_AUTH_REQUEST')));}}const _0x597ee7={'model':this[_0x1746('0x40')][_0x1746('0x28')],'messages':[{'role':_0x1746('0x4b'),'content':_0x248209},{'role':'user','content':_0x3d8187}],'stream':this[_0x1746('0x40')][_0x1746('0x14')],'max_tokens':this[_0x1746('0x40')][_0x1746('0x46')],'temperature':this[_0x1746('0x40')][_0x1746('0x22')],'top_p':this[_0x1746('0x40')][_0x1746('0x4a')]};this[_0x1746('0x40')][_0x1746('0x2')]&&(_0x597ee7[_0x1746('0x2')]=this['_requestParameters'][_0x1746('0x2')]);const _0x129bef={'method':_0x1746('0x1'),'headers':_0xe143fd,'body':JSON[_0x1746('0x4d')](_0x597ee7),'signal':_0x465451},_0x584abe=await fetch(this[_0x1746('0x18')],_0x129bef);if(_0x584abe['ok'])return this[_0x1746('0x40')][_0x1746('0x14')]?await this[_0x1746('0x1e')](_0x584abe,_0x171564):await this[_0x1746('0x2f')](_0x584abe,_0x171564),Promise['resolve']();{const _0x4bdba2=await _0x584abe[_0x1746('0x2b')]();return _0x4bdba2[_0x1746('0x16')]('context_length_exceeded')?Promise['reject'](new AIRequestError(_0x43fb77(_0xad7354,'AI_ERROR_CONTEXT_LENGTH'))):_0x4bdba2[_0x1746('0x16')](_0x1746('0x43'))?Promise[_0x1746('0xa')](new AIRequestError(_0x43fb77(_0xad7354,_0x1746('0x45')))):Promise[_0x1746('0xa')](new Error(_0x4bdba2));}}async[_0x1746('0x1e')](_0x423428,_0xe0e679){const _0x384f40=_0x423428['body'][_0x1746('0x39')](),_0x32e215=new TextDecoder();let _0x555d84='',_0x4470d8='',_0x5d4c82='',_0x2bb807=!0x1;for(;!_0x2bb807;){const {done:_0x4d69c7,value:_0xf8af25}=await _0x384f40[_0x1746('0xd')](),_0x364e5b=_0x555d84+_0x32e215[_0x1746('0x3f')](_0xf8af25);let _0x236cfb='';_0x2bb807=_0x4d69c7;try{_0x236cfb=this[_0x1746('0x51')](_0x364e5b),_0x555d84='';}catch(_0x2d17a4){_0x555d84+=_0x364e5b;continue;}_0x4470d8+=_0x236cfb,!_0x4d69c7&&this['_isBufferIncomplete'](_0x4470d8)||_0x4470d8&&(_0x5d4c82+=_0x4470d8,_0xe0e679(this[_0x1746('0x25')](_0x5d4c82)),_0x4470d8='');}return Promise[_0x1746('0x26')]();}async[_0x1746('0x2f')](_0x12892a,_0x57a0d1){const _0x142827=(await _0x12892a[_0x1746('0x23')]())[_0x1746('0x31')][0x0][_0x1746('0x2d')]['content'];return _0x57a0d1(this['_parseAndNormalizeContent'](_0x142827)),Promise[_0x1746('0x26')]();}[_0x1746('0x17')](_0x54526b){const _0x12f287=_0x54526b['split']('<')['length']!==_0x54526b[_0x1746('0x24')]('>')[_0x1746('0x34')],_0x3bf3ea=_0x54526b[_0x1746('0x34')]<0x1e;return _0x12f287&&_0x3bf3ea;}['_parseAndNormalizeContent'](_0x5d1460){const _0x53460c=this[_0x1746('0x3c')][_0x1746('0x52')](_0x5d1460,_0x1746('0x50')),_0x1f4e86=this['editor'][_0x1746('0x8')][_0x1746('0x48')]['toView'](this[_0x1746('0x4')][_0x1746('0x3e')](_0x53460c['body']));return this[_0x1746('0x49')](_0x1f4e86),this[_0x1746('0x29')][_0x1746('0x8')]['stringify'](this['editor'][_0x1746('0x8')][_0x1746('0x42')](_0x1f4e86));}[_0x1746('0x49')](_0x3145fc){const _0x1d13ea=new _0x45f694(this[_0x1746('0x29')][_0x1746('0x5')][_0x1746('0x2a')][_0x1746('0x4f')]),_0xd09b05=new _0x401a5b({'name':/^h[1-5]$/}),_0xca6621=[];let _0x37c47c=!0x1;for(const _0x3eb9e8 of _0x3145fc)_0x3eb9e8['is']('element')&&_0xd09b05['match'](_0x3eb9e8)&&(_0xca6621['push'](_0x3eb9e8),'h1'==_0x3eb9e8[_0x1746('0x37')]&&(_0x37c47c=!0x0));if(_0x37c47c)for(const _0x19fae5 of _0xca6621)_0x1d13ea['rename']('h'+(parseInt(_0x19fae5['name'][0x1])+0x1),_0x19fae5);}['_cleanUpData'](_0x1ed79e){return _0x1ed79e[_0x1746('0x24')](/\n(?![^{]*\})/g)[_0x1746('0x1f')](_0x30c311=>_0x30c311[_0x1746('0x2e')](_0x1746('0x21'),''))[_0x1746('0x11')](_0x5e5889=>_0x5e5889&&_0x5e5889[_0x1746('0x34')]>0x0&&_0x1746('0x38')!==_0x5e5889)[_0x1746('0x1f')](_0x533c9d=>{const {choices:_0x313536}=JSON[_0x1746('0x3a')](_0x533c9d);if(_0x313536[0x0]&&_0x313536[0x0][_0x1746('0x41')]&&_0x313536[0x0][_0x1746('0x41')][_0x1746('0x6')])return _0x313536[0x0][_0x1746('0x41')][_0x1746('0x6')];})[_0x1746('0x11')](_0x345cd9=>_0x345cd9)['join']('');}}export class AIRequestError extends Error{constructor(_0x282356){super(_0x282356),this[_0x1746('0x37')]=_0x1746('0x13');}}
23
+ const _0x4913=['text/html','signal','editor','reject','choices','text','stringify','toModel','data:\x20','get','_prepareMessages','authKey','name','aiAssistant.requestParameters','abort','parseFromString','decode','_normalizeResponseHeadings','_parseAndNormalizeContent','_xmlSerializer','max_tokens','delta','AI_ERROR_AUTH_REQUEST','document','data','split','top_p','Bearer\x20','aiconnector-send-prompt-failed','_requestParameters','model','toView','aiAssistant.requestParameters.temperature','sendPrompt','AIConnector','_domParser','aiAssistant.requestParameters.stream','json','https://api.openai.com/v1/chat/completions','AbortError','pluginName','parse','temperature','filter','view','<span>','adapter','AI_ERROR_MODERATION','Authorization','replace','gpt-3.5-turbo','getReader','serializeToString','AI_ERROR_CONTEXT_LENGTH','Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','user','system','match','Instruction:\x0a','define','_abortController','join','_authKey','_cleanUpData','</span>','body','config','_isBufferIncomplete','aiAssistant','_readStaticResponse','Moderation','push','element','rename','_apiUrl','includes','content','length','POST','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','application/json','error','editing','aiAssistant.requestParameters.max_tokens','stream','map','processor','aiAssistant.apiUrl','read','_readStreamableResponse','resolve','aborted','catch'];(function(_0x2895fe,_0x49137f){const _0x140d47=function(_0x6ebcd7){while(--_0x6ebcd7){_0x2895fe['push'](_0x2895fe['shift']());}};_0x140d47(++_0x49137f);}(_0x4913,0x10e));const _0x140d=function(_0x2895fe,_0x49137f){_0x2895fe=_0x2895fe-0x0;let _0x140d47=_0x4913[_0x2895fe];return _0x140d47;};import{Matcher as _0x146414,UpcastWriter as _0x28ac95}from'ckeditor5/src/engine';import{Plugin as _0x51cb65}from'ckeditor5/src/core';import{CKEditorError as _0x28fbfc}from'ckeditor5/src/utils';import{getTranslation as _0x92b88c}from'./utils/common-translations';export default class o extends _0x51cb65{static get[_0x140d('0x34')](){return _0x140d('0x2e');}constructor(_0x8dada2){super(_0x8dada2),_0x8dada2[_0x140d('0x4e')]['define'](_0x140d('0x6'),_0x140d('0x32')),_0x8dada2['config'][_0x140d('0x47')]('aiAssistant.requestParameters.model',_0x140d('0x3e')),_0x8dada2[_0x140d('0x4e')]['define'](_0x140d('0x2'),0x7d0),_0x8dada2[_0x140d('0x4e')][_0x140d('0x47')](_0x140d('0x2c'),0x1),_0x8dada2['config']['define']('aiAssistant.requestParameters.top_p',0x1),_0x8dada2['config'][_0x140d('0x47')](_0x140d('0x30'),!0x0);const _0x402947=_0x8dada2[_0x140d('0x4e')][_0x140d('0x15')](_0x140d('0x6')),_0x420215=_0x8dada2[_0x140d('0x4e')]['get'](_0x140d('0x50'))[_0x140d('0x17')],_0x27bf4c=_0x8dada2[_0x140d('0x4e')][_0x140d('0x15')](_0x140d('0x19'));this['_abortController']=new AbortController(),this[_0x140d('0x3a')]=new OpenAIAdapter(_0x8dada2,_0x402947,_0x27bf4c,_0x420215);}async['processPrompt'](_0x190a16,_0x52c0a0,_0x26b7ff){const {systemMessage:_0x4724b8,userMessage:_0xfe425a}=this['_prepareMessages'](_0x190a16,_0x52c0a0);return this[_0x140d('0x3a')]['sendPrompt'](_0x4724b8,_0xfe425a,this[_0x140d('0x48')][_0x140d('0xd')],_0x26b7ff)[_0x140d('0xb')](_0x415c30=>{if(_0x415c30 instanceof AIRequestError)return Promise[_0x140d('0xf')](_0x415c30);if(_0x140d('0x33')==_0x415c30[_0x140d('0x18')])return Promise[_0x140d('0x9')]();throw console[_0x140d('0x0')](_0x415c30),new _0x28fbfc(_0x140d('0x28'),null);});}[_0x140d('0x1a')](){this[_0x140d('0x48')][_0x140d('0xd')][_0x140d('0xa')]||(this['_abortController']['abort'](),this[_0x140d('0x48')]=new AbortController());}[_0x140d('0x16')](_0xe1af52,_0x93534f){let _0x127b80,_0x24e113;return _0x93534f?(_0x127b80=_0x140d('0x42'),_0x24e113=_0x140d('0x46')+_0xe1af52+_0x140d('0x5b')+(_0x93534f['startsWith']('<')?_0x93534f:_0x140d('0x39')+_0x93534f+_0x140d('0x4c'))):(_0x127b80=_0x140d('0x5c'),_0x24e113=_0xe1af52),{'systemMessage':_0x127b80,'userMessage':_0x24e113};}}export class OpenAIAdapter{constructor(_0x232c91,_0x361977,_0x4be6e6,_0x3bc824){this[_0x140d('0xe')]=_0x232c91,this['_apiUrl']=_0x361977,this[_0x140d('0x4a')]=_0x3bc824,this[_0x140d('0x29')]=_0x4be6e6,this[_0x140d('0x2f')]=new DOMParser(),this[_0x140d('0x1f')]=new XMLSerializer();}async[_0x140d('0x2d')](_0x5bbdfa,_0x424cf1,_0x213905,_0x1aad7b){const _0x333da8=this['editor']['locale'],_0x44511d={'Content-Type':_0x140d('0x5d')};if('string'==typeof this[_0x140d('0x4a')])_0x44511d['Authorization']=_0x140d('0x27')+this['_authKey'];else{if(this[_0x140d('0x4a')])try{const _0x4d7157=await this['_authKey']();_0x44511d[_0x140d('0x3c')]=_0x140d('0x27')+_0x4d7157;}catch(_0x299a6b){return Promise[_0x140d('0xf')](new AIRequestError(_0x92b88c(_0x333da8,_0x140d('0x22'))));}}const _0x236868={'model':this[_0x140d('0x29')][_0x140d('0x2a')],'messages':[{'role':_0x140d('0x44'),'content':_0x5bbdfa},{'role':_0x140d('0x43'),'content':_0x424cf1}],'stream':this[_0x140d('0x29')][_0x140d('0x3')],'max_tokens':this[_0x140d('0x29')][_0x140d('0x20')],'temperature':this['_requestParameters'][_0x140d('0x36')],'top_p':this['_requestParameters'][_0x140d('0x26')]};this[_0x140d('0x29')]['user']&&(_0x236868['user']=this['_requestParameters'][_0x140d('0x43')]);const _0x3c257f={'method':_0x140d('0x5a'),'headers':_0x44511d,'body':JSON[_0x140d('0x12')](_0x236868),'signal':_0x213905},_0x1c10b1=await fetch(this[_0x140d('0x56')],_0x3c257f);if(_0x1c10b1['ok'])return this['_requestParameters']['stream']?await this[_0x140d('0x8')](_0x1c10b1,_0x1aad7b):await this[_0x140d('0x51')](_0x1c10b1,_0x1aad7b),Promise['resolve']();{const _0x209f9f=await _0x1c10b1[_0x140d('0x11')]();return _0x209f9f[_0x140d('0x57')]('context_length_exceeded')?Promise[_0x140d('0xf')](new AIRequestError(_0x92b88c(_0x333da8,_0x140d('0x41')))):_0x209f9f['includes'](_0x140d('0x52'))?Promise[_0x140d('0xf')](new AIRequestError(_0x92b88c(_0x333da8,_0x140d('0x3b')))):Promise[_0x140d('0xf')](new Error(_0x209f9f));}}async['_readStreamableResponse'](_0x48f34f,_0x5d2673){const _0x556799=_0x48f34f[_0x140d('0x4d')][_0x140d('0x3f')](),_0x66268=new TextDecoder();let _0x582e2c='',_0x98443c='',_0x113e9b='',_0x242675=!0x1;for(;!_0x242675;){const {done:_0x31d0c5,value:_0xdb98f9}=await _0x556799[_0x140d('0x7')](),_0x53db81=_0x582e2c+_0x66268[_0x140d('0x1c')](_0xdb98f9);let _0x1cb768='';_0x242675=_0x31d0c5;try{_0x1cb768=this['_cleanUpData'](_0x53db81),_0x582e2c='';}catch(_0x28ac83){_0x582e2c+=_0x53db81;continue;}_0x98443c+=_0x1cb768,!_0x31d0c5&&this['_isBufferIncomplete'](_0x98443c)||_0x98443c&&(_0x113e9b+=_0x98443c,_0x5d2673(this[_0x140d('0x1e')](_0x113e9b)),_0x98443c='');}return Promise[_0x140d('0x9')]();}async[_0x140d('0x51')](_0x206e3f,_0x14a0da){const _0x1f63db=(await _0x206e3f[_0x140d('0x31')]())[_0x140d('0x10')][0x0]['message'][_0x140d('0x58')];return _0x14a0da(this[_0x140d('0x1e')](_0x1f63db)),Promise[_0x140d('0x9')]();}[_0x140d('0x4f')](_0x49159f){const _0x5ca9de=_0x49159f[_0x140d('0x25')]('<')[_0x140d('0x59')]!==_0x49159f[_0x140d('0x25')]('>')[_0x140d('0x59')],_0x1c7100=_0x49159f[_0x140d('0x59')]<0x1e;return _0x5ca9de&&_0x1c7100;}[_0x140d('0x1e')](_0x1bb7bb){const _0x3a8dab=this[_0x140d('0x2f')][_0x140d('0x1b')](_0x1bb7bb,_0x140d('0xc')),_0x24761f=this[_0x140d('0xe')][_0x140d('0x24')][_0x140d('0x5')][_0x140d('0x2b')](this[_0x140d('0x1f')][_0x140d('0x40')](_0x3a8dab[_0x140d('0x4d')]));return this[_0x140d('0x1d')](_0x24761f),this[_0x140d('0xe')][_0x140d('0x24')][_0x140d('0x12')](this[_0x140d('0xe')][_0x140d('0x24')][_0x140d('0x13')](_0x24761f));}[_0x140d('0x1d')](_0x243815){const _0x551bd4=new _0x28ac95(this[_0x140d('0xe')][_0x140d('0x1')][_0x140d('0x38')][_0x140d('0x23')]),_0x475467=new _0x146414({'name':/^h[1-5]$/}),_0x3d5ec5=[];let _0x53e0c3=!0x1;for(const _0x274c3e of _0x243815)_0x274c3e['is'](_0x140d('0x54'))&&_0x475467[_0x140d('0x45')](_0x274c3e)&&(_0x3d5ec5[_0x140d('0x53')](_0x274c3e),'h1'==_0x274c3e[_0x140d('0x18')]&&(_0x53e0c3=!0x0));if(_0x53e0c3)for(const _0x2fd3a9 of _0x3d5ec5)_0x551bd4[_0x140d('0x55')]('h'+(parseInt(_0x2fd3a9[_0x140d('0x18')][0x1])+0x1),_0x2fd3a9);}[_0x140d('0x4b')](_0x521f5f){return _0x521f5f[_0x140d('0x25')](/\n(?![^{]*\})/g)[_0x140d('0x4')](_0x1829e1=>_0x1829e1[_0x140d('0x3d')](_0x140d('0x14'),''))[_0x140d('0x37')](_0x22bbcd=>_0x22bbcd&&_0x22bbcd[_0x140d('0x59')]>0x0&&'[DONE]'!==_0x22bbcd)[_0x140d('0x4')](_0x2ce428=>{const {choices:_0x46ad5e}=JSON[_0x140d('0x35')](_0x2ce428);if(_0x46ad5e[0x0]&&_0x46ad5e[0x0]['delta']&&_0x46ad5e[0x0][_0x140d('0x21')][_0x140d('0x58')])return _0x46ad5e[0x0][_0x140d('0x21')]['content'];})[_0x140d('0x37')](_0x50a459=>_0x50a459)[_0x140d('0x49')]('');}}export class AIRequestError extends Error{constructor(_0x1fd4e5){super(_0x1fd4e5),this[_0x140d('0x18')]='AIRequestError';}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x38e4=['processPrompt','connector','once','reset','set','currentContext','finally','updateView','isProcessing','submitPrompt','render','finishProcessing','mainAction','bind','value','_handlePrompt','prompt','stopProcessing','handleError','startProcessing','listenTo','isRendered','previousPrompt','view','tryAgainEvent','abort','previousContext'];(function(_0x375f64,_0x38e4db){const _0x53b153=function(_0x14412e){while(--_0x14412e){_0x375f64['push'](_0x375f64['shift']());}};_0x53b153(++_0x38e4db);}(_0x38e4,0x14c));const _0x53b1=function(_0x375f64,_0x38e4db){_0x375f64=_0x375f64-0x0;let _0x53b153=_0x38e4[_0x375f64];return _0x53b153;};import{ObservableMixin as _0x2870ed}from'ckeditor5/src/utils';import{AIRequestError as _0x2f8e19}from'../aiconnector';export default class g extends _0x2870ed(){constructor(_0x5d8ccd,_0x59b01c){super(),this['connector']=_0x5d8ccd,this[_0x53b1('0xf')]=_0x59b01c,this[_0x53b1('0x17')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this[_0x53b1('0xf')][_0x53b1('0x5')](_0x53b1('0x6'))['to'](this,_0x53b1('0x18')),this['listenTo'](this[_0x53b1('0xf')],_0x53b1('0x1'),(_0x6414ec,_0x303d02)=>{const _0x44f810=this[_0x53b1('0x18')]||this['initialContext'];this[_0x53b1('0x7')](_0x303d02,_0x44f810);}),this[_0x53b1('0xc')](this[_0x53b1('0xf')],_0x53b1('0x10'),()=>{this['view'][_0x53b1('0x8')]=this['previousLabel'],this['_handlePrompt'](this[_0x53b1('0xe')],this[_0x53b1('0x12')],this['previousLabel']);}),this[_0x53b1('0xc')](this[_0x53b1('0xf')],_0x53b1('0x9'),()=>{this[_0x53b1('0x9')]();});}['destroy'](){this['stopListening']();}async[_0x53b1('0x1a')]({prompt:_0x858cd,htmlContent:_0x4408da,label:_0x395704,mainAction:_0x226aed}){this[_0x53b1('0xf')][_0x53b1('0x8')]=_0x395704,this['view'][_0x53b1('0x4')]=_0x226aed,this['initialContext']=_0x4408da,_0x858cd&&(this['view'][_0x53b1('0xd')]?this[_0x53b1('0x7')](_0x858cd,_0x4408da,_0x395704):this[_0x53b1('0xf')][_0x53b1('0x15')](_0x53b1('0x2'),()=>{this[_0x53b1('0x7')](_0x858cd,_0x4408da,_0x395704);}));}['stopProcessing'](){this['isProcessing']&&(this[_0x53b1('0x0')]=!0x1,this[_0x53b1('0xf')][_0x53b1('0x3')](),this[_0x53b1('0x14')][_0x53b1('0x11')]());}[_0x53b1('0x16')](){this['initialContext']='',this[_0x53b1('0x18')]='',this[_0x53b1('0x12')]='',this['previousPrompt']='',this['previousLabel']='',this['view'][_0x53b1('0x16')](),this['stopProcessing']();}async[_0x53b1('0x7')](_0x5b706f,_0x1d7d12,_0x5ef3a7){return this['isProcessing']=!0x0,this[_0x53b1('0xf')][_0x53b1('0xb')](),this[_0x53b1('0x12')]=_0x1d7d12,this['previousPrompt']=_0x5b706f,this['previousLabel']=_0x5ef3a7||_0x5b706f,new Promise(_0x50a01d=>{this[_0x53b1('0x14')][_0x53b1('0x13')](_0x5b706f,_0x1d7d12,_0x271e99=>this['_updateValue'](_0x271e99))['catch'](_0x32f034=>{_0x32f034 instanceof _0x2f8e19?this[_0x53b1('0xf')][_0x53b1('0xa')](_0x32f034['message']):this[_0x53b1('0xf')][_0x53b1('0xa')](),_0x50a01d();})[_0x53b1('0x19')](()=>{this[_0x53b1('0x9')](),_0x50a01d();});});}['_updateValue'](_0x20d514){this['currentContext']=''+_0x20d514;}}
23
+ const _0xf168=['finishProcessing','submitPrompt','set','currentContext','handleError','isProcessing','processPrompt','connector','previousPrompt','once','catch','message','prompt','stopProcessing','_updateValue','stopListening','listenTo','render','mainAction','bind','finally','initialContext','startProcessing','updateView','previousContext','previousLabel','view','_handlePrompt'];(function(_0x23c5f0,_0xf16889){const _0x5b9f2d=function(_0x2d2391){while(--_0x2d2391){_0x23c5f0['push'](_0x23c5f0['shift']());}};_0x5b9f2d(++_0xf16889);}(_0xf168,0x6d));const _0x5b9f=function(_0x23c5f0,_0xf16889){_0x23c5f0=_0x23c5f0-0x0;let _0x5b9f2d=_0xf168[_0x23c5f0];return _0x5b9f2d;};import{ObservableMixin as _0x385e77}from'ckeditor5/src/utils';import{AIRequestError as _0x30d011}from'../aiconnector';export default class g extends _0x385e77(){constructor(_0x5282a2,_0x4c64ab){super(),this['connector']=_0x5282a2,this['view']=_0x4c64ab,this[_0x5b9f('0x5')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this[_0x5b9f('0x1')][_0x5b9f('0x16')]('value')['to'](this,_0x5b9f('0x6')),this[_0x5b9f('0x13')](this[_0x5b9f('0x1')],_0x5b9f('0x4'),(_0x5bdb93,_0x2b0985)=>{const _0x589424=this[_0x5b9f('0x6')]||this[_0x5b9f('0x18')];this[_0x5b9f('0x2')](_0x2b0985,_0x589424);}),this[_0x5b9f('0x13')](this[_0x5b9f('0x1')],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this[_0x5b9f('0x2')](this[_0x5b9f('0xb')],this[_0x5b9f('0x1b')],this[_0x5b9f('0x0')]);}),this[_0x5b9f('0x13')](this[_0x5b9f('0x1')],_0x5b9f('0x10'),()=>{this[_0x5b9f('0x10')]();});}['destroy'](){this[_0x5b9f('0x12')]();}async[_0x5b9f('0x1a')]({prompt:_0xba11e,htmlContent:_0x57e218,label:_0x16e239,mainAction:_0x26a119}){this[_0x5b9f('0x1')][_0x5b9f('0xf')]=_0x16e239,this[_0x5b9f('0x1')][_0x5b9f('0x15')]=_0x26a119,this[_0x5b9f('0x18')]=_0x57e218,_0xba11e&&(this[_0x5b9f('0x1')]['isRendered']?this[_0x5b9f('0x2')](_0xba11e,_0x57e218,_0x16e239):this[_0x5b9f('0x1')][_0x5b9f('0xc')](_0x5b9f('0x14'),()=>{this[_0x5b9f('0x2')](_0xba11e,_0x57e218,_0x16e239);}));}[_0x5b9f('0x10')](){this[_0x5b9f('0x8')]&&(this[_0x5b9f('0x8')]=!0x1,this[_0x5b9f('0x1')][_0x5b9f('0x3')](),this[_0x5b9f('0xa')]['abort']());}['reset'](){this[_0x5b9f('0x18')]='',this['currentContext']='',this[_0x5b9f('0x1b')]='',this[_0x5b9f('0xb')]='',this['previousLabel']='',this[_0x5b9f('0x1')]['reset'](),this[_0x5b9f('0x10')]();}async[_0x5b9f('0x2')](_0x2c2808,_0x5c9a5d,_0x3478c6){return this[_0x5b9f('0x8')]=!0x0,this[_0x5b9f('0x1')][_0x5b9f('0x19')](),this[_0x5b9f('0x1b')]=_0x5c9a5d,this['previousPrompt']=_0x2c2808,this['previousLabel']=_0x3478c6||_0x2c2808,new Promise(_0x1401bb=>{this[_0x5b9f('0xa')][_0x5b9f('0x9')](_0x2c2808,_0x5c9a5d,_0x379765=>this[_0x5b9f('0x11')](_0x379765))[_0x5b9f('0xd')](_0x54c6fa=>{_0x54c6fa instanceof _0x30d011?this[_0x5b9f('0x1')][_0x5b9f('0x7')](_0x54c6fa[_0x5b9f('0xe')]):this['view'][_0x5b9f('0x7')](),_0x1401bb();})[_0x5b9f('0x17')](()=>{this[_0x5b9f('0x10')](),_0x1401bb();});});}[_0x5b9f('0x11')](_0x3d233d){this[_0x5b9f('0x6')]=''+_0x3d233d;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1330=['match','items','highlightText','isVisible','label','length','children','filter'];(function(_0x2145d0,_0x13302e){const _0x584016=function(_0x5b01f0){while(--_0x5b01f0){_0x2145d0['push'](_0x2145d0['shift']());}};_0x584016(++_0x13302e);}(_0x1330,0xef));const _0x5840=function(_0x2145d0,_0x13302e){_0x2145d0=_0x2145d0-0x0;let _0x584016=_0x1330[_0x2145d0];return _0x584016;};import{ListView as _0x4a3d0f}from'ckeditor5/src/ui';export default class v extends _0x4a3d0f{['filter'](_0x439334){let _0x266164=0x0,_0x1283a0=0x0;for(const _0x2b4303 of this[_0x5840('0x2')]){const _0x322be2=_0x2b4303,_0x5016e2=_0x439334&&!!_0x322be2[_0x5840('0x5')][_0x5840('0x1')](_0x439334);_0x322be2['labelView']['highlightText'](_0x5016e2?_0x439334:null);for(const _0x106cf3 of _0x322be2[_0x5840('0x2')]){const _0x56caaf=_0x106cf3[_0x5840('0x7')]['first'],_0x1cac2e=_0x56caaf['labelView'];if(_0x439334){const _0x9deb3b=!!_0x56caaf[_0x5840('0x5')][_0x5840('0x1')](_0x439334);_0x1cac2e[_0x5840('0x3')](_0x9deb3b?_0x439334:null),_0x106cf3[_0x5840('0x4')]=_0x5016e2||_0x9deb3b;}else _0x106cf3[_0x5840('0x4')]=!0x0,_0x1cac2e[_0x5840('0x3')](null);}const _0xbfbe9a=_0x322be2[_0x5840('0x2')][_0x5840('0x0')](_0x52260b=>_0x52260b[_0x5840('0x4')])[_0x5840('0x6')];_0x266164+=_0x322be2[_0x5840('0x2')][_0x5840('0x6')],_0x1283a0+=_0x5016e2?_0x322be2[_0x5840('0x2')][_0x5840('0x6')]:_0xbfbe9a,_0x322be2[_0x5840('0x4')]=_0x5016e2||!!_0xbfbe9a;}return{'resultsCount':_0x1283a0,'totalItemsCount':_0x266164};}}
23
+ const _0x49a5=['label','children','filter','items','labelView','highlightText','length','match','first','isVisible'];(function(_0x4f6d3a,_0x49a5fa){const _0x4ab482=function(_0x34af1d){while(--_0x34af1d){_0x4f6d3a['push'](_0x4f6d3a['shift']());}};_0x4ab482(++_0x49a5fa);}(_0x49a5,0x1b1));const _0x4ab4=function(_0x4f6d3a,_0x49a5fa){_0x4f6d3a=_0x4f6d3a-0x0;let _0x4ab482=_0x49a5[_0x4f6d3a];return _0x4ab482;};import{ListView as _0x3265bb}from'ckeditor5/src/ui';export default class v extends _0x3265bb{['filter'](_0x28b7b7){let _0x7c680e=0x0,_0x465fac=0x0;for(const _0x2c1149 of this[_0x4ab4('0x0')]){const _0x35dbb3=_0x2c1149,_0x2172ac=_0x28b7b7&&!!_0x35dbb3['label'][_0x4ab4('0x4')](_0x28b7b7);_0x35dbb3[_0x4ab4('0x1')]['highlightText'](_0x2172ac?_0x28b7b7:null);for(const _0x389517 of _0x35dbb3[_0x4ab4('0x0')]){const _0x2008f7=_0x389517[_0x4ab4('0x8')][_0x4ab4('0x5')],_0x1aa077=_0x2008f7[_0x4ab4('0x1')];if(_0x28b7b7){const _0x3f45f1=!!_0x2008f7[_0x4ab4('0x7')][_0x4ab4('0x4')](_0x28b7b7);_0x1aa077[_0x4ab4('0x2')](_0x3f45f1?_0x28b7b7:null),_0x389517[_0x4ab4('0x6')]=_0x2172ac||_0x3f45f1;}else _0x389517[_0x4ab4('0x6')]=!0x0,_0x1aa077[_0x4ab4('0x2')](null);}const _0x4489ab=_0x35dbb3[_0x4ab4('0x0')][_0x4ab4('0x9')](_0x1ba175=>_0x1ba175[_0x4ab4('0x6')])[_0x4ab4('0x3')];_0x7c680e+=_0x35dbb3[_0x4ab4('0x0')]['length'],_0x465fac+=_0x2172ac?_0x35dbb3[_0x4ab4('0x0')][_0x4ab4('0x3')]:_0x4489ab,_0x35dbb3[_0x4ab4('0x6')]=_0x2172ac||!!_0x4489ab;}return{'resultsCount':_0x465fac,'totalItemsCount':_0x7c680e};}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x206c=['ck-button__label'];(function(_0x42ce47,_0x206c2a){const _0x290584=function(_0xce6669){while(--_0xce6669){_0x42ce47['push'](_0x42ce47['shift']());}};_0x290584(++_0x206c2a);}(_0x206c,0x17c));const _0x2905=function(_0x42ce47,_0x206c2a){_0x42ce47=_0x42ce47-0x0;let _0x290584=_0x206c[_0x42ce47];return _0x290584;};import{HighlightedTextView as _0xd160fb}from'ckeditor5/src/ui';export default class C extends _0xd160fb{constructor(){super(),this['set']({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x5543e8=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':[_0x2905('0x0')],'style':_0x5543e8['to']('style'),'id':_0x5543e8['to']('id')}});}}
23
+ const _0x4228=['ck-button__label','bindTemplate'];(function(_0x3a2c07,_0x42285b){const _0x2bb5b9=function(_0x3f6e13){while(--_0x3f6e13){_0x3a2c07['push'](_0x3a2c07['shift']());}};_0x2bb5b9(++_0x42285b);}(_0x4228,0x158));const _0x2bb5=function(_0x3a2c07,_0x42285b){_0x3a2c07=_0x3a2c07-0x0;let _0x2bb5b9=_0x4228[_0x3a2c07];return _0x2bb5b9;};import{HighlightedTextView as _0x1aec0d}from'ckeditor5/src/ui';export default class C extends _0x1aec0d{constructor(){super(),this['set']({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x4b4adc=this[_0x2bb5('0x1')];this['extendTemplate']({'attributes':{'class':[_0x2bb5('0x0')],'style':_0x4b4adc['to']('style'),'id':_0x4b4adc['to']('id')}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4904=['ck-label','for','bindTemplate','ck-editor__label_'];(function(_0x4038e9,_0x490436){const _0x3fa721=function(_0x17699a){while(--_0x17699a){_0x4038e9['push'](_0x4038e9['shift']());}};_0x3fa721(++_0x490436);}(_0x4904,0x172));const _0x3fa7=function(_0x4038e9,_0x490436){_0x4038e9=_0x4038e9-0x0;let _0x3fa721=_0x4904[_0x4038e9];return _0x3fa721;};import{HighlightedTextView as _0x592d83}from'ckeditor5/src/ui';import{uid as _0x4ed213}from'ckeditor5/src/utils';export default class k extends _0x592d83{constructor(){super(),this['set']('for',void 0x0);const _0x97cb50=this[_0x3fa7('0x0')];this['id']=_0x3fa7('0x1')+_0x4ed213(),this['extendTemplate']({'attributes':{'class':['ck',_0x3fa7('0x2')],'id':this['id'],'for':_0x97cb50['to'](_0x3fa7('0x3'))}});}}
23
+ const _0x1461=['extendTemplate','ck-editor__label_','for','bindTemplate','ck-label'];(function(_0x13a852,_0x146116){const _0x125659=function(_0x534373){while(--_0x534373){_0x13a852['push'](_0x13a852['shift']());}};_0x125659(++_0x146116);}(_0x1461,0xb6));const _0x1256=function(_0x13a852,_0x146116){_0x13a852=_0x13a852-0x0;let _0x125659=_0x1461[_0x13a852];return _0x125659;};import{HighlightedTextView as _0x274faa}from'ckeditor5/src/ui';import{uid as _0x4ccfa4}from'ckeditor5/src/utils';export default class k extends _0x274faa{constructor(){super(),this['set'](_0x1256('0x0'),void 0x0);const _0x1979a5=this[_0x1256('0x1')];this['id']=_0x1256('0x4')+_0x4ccfa4(),this[_0x1256('0x3')]({'attributes':{'class':['ck',_0x1256('0x2')],'id':this['id'],'for':_0x1979a5['to'](_0x1256('0x0'))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x544d=['appendChild','ck-ai-form__content-field','remove','class','getSelection','write','bind','setTemplate','removeAllRanges','innerHTML','ck-ai-form__copy-button-wrapper','appendLoader','ck-content','locale','setContent','listenTo','_createLoader','text/html','_copyHTMLToClipboard','absolute','execute','_createCopyButton','div','scrollHeight','ClipboardItem','createElement','-9999px','AI\x20is\x20writing...','style','value','copy','body','createRange','render','scrollTo','wheel','copyButtonView','element','smooth','Copy','loaderView','isVisible','check','position','text/plain','isProcessing','ck-ai-form__content-area-wrapper','textContent','mousedown','selectNodeContents','left','addRange','focus','change:value','.ck-ai-form__loader','execCommand','clipboard','contentFieldView','set','icon'];(function(_0x56ba88,_0x544d68){const _0x1689e5=function(_0x20b63a){while(--_0x20b63a){_0x56ba88['push'](_0x56ba88['shift']());}};_0x1689e5(++_0x544d68);}(_0x544d,0x1d0));const _0x1689=function(_0x56ba88,_0x544d68){_0x56ba88=_0x56ba88-0x0;let _0x1689e5=_0x544d[_0x56ba88];return _0x1689e5;};import{global as _0x22e675}from'ckeditor5/src/utils';import{View as _0x59a3fb,ButtonView as _0x438dcd,SpinnerView as _0x2fe068}from'ckeditor5/src/ui';import _0x4de345 from'../../../theme/icons/copy.svg';import{getTranslation as _0x556c68}from'../../utils/common-translations';import{icons as _0x4e2ce}from'ckeditor5/src/core';export default class D extends _0x59a3fb{constructor(_0xf65ca1,_0x5c4943=''){super(_0xf65ca1),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x19530e=this['bindTemplate'];this['contentFieldView']=new ContentFieldView(_0xf65ca1,_0x5c4943),this['copyButtonView']=this[_0x1689('0x25')](),this[_0x1689('0x17')]({'tag':'div','attributes':{'class':['ck',_0x1689('0x2'),_0x19530e['if'](_0x1689('0x39'),'ck-hidden',_0x50dd28=>!_0x50dd28)],'tabindex':'-1'},'children':[{'tag':_0x1689('0x26'),'attributes':{'class':['ck','ck-ai-form__content-area',_0x19530e['if'](_0x1689('0x1'),'ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':_0x1689('0x26'),'attributes':{'class':['ck',_0x1689('0x1a')]},'children':[this[_0x1689('0x34')]]}]}]});}[_0x1689('0x31')](){super['render'](),this[_0x1689('0x2d')]&&this[_0x1689('0xd')][_0x1689('0x1e')](this[_0x1689('0x2d')]);let _0x3fe504=!0x1;this['on'](_0x1689('0x9'),(_0x17ec42,_0x3fdded,_0x145e39)=>{const _0x569182=!this[_0x1689('0xd')][_0x1689('0x35')]['querySelector'](_0x1689('0xa'));this['contentFieldView']['setContent'](_0x145e39),this[_0x1689('0x1')]&&_0x569182&&!_0x3fe504&&this['element'][_0x1689('0x32')]({'top':this[_0x1689('0x35')][_0x1689('0x27')],'behavior':_0x1689('0x36')});}),this['on']('change:isProcessing',(_0x2d79bf,_0x4c0937,_0x3a80eb)=>{_0x3fe504=!0x1,_0x3a80eb?(this[_0x1689('0x2d')]=null,this[_0x1689('0xd')][_0x1689('0x1b')]()):this['value']||this[_0x1689('0xd')]['setContent']('');}),this['listenTo'](this[_0x1689('0x35')],_0x1689('0x33'),()=>{_0x3fe504=!0x0;}),this[_0x1689('0x1f')](this[_0x1689('0x35')],_0x1689('0x4'),()=>{_0x3fe504=!0x0;});}[_0x1689('0x8')](){this[_0x1689('0x35')]['focus']();}[_0x1689('0x25')](){const _0x14c37d=this[_0x1689('0x1d')],_0x28c324=new _0x438dcd(this['locale']),_0x35e114='ck-ai-form__copy-button';return _0x28c324[_0x1689('0xe')]({'label':_0x556c68(_0x14c37d,_0x1689('0x37')),'icon':_0x4de345,'class':_0x35e114,'tooltip':!0x0}),_0x28c324[_0x1689('0x16')](_0x1689('0x39'))['to'](this,_0x1689('0x2d'),_0x3eaa99=>!!_0x3eaa99),_0x28c324[_0x1689('0x16')]('isEnabled')['to'](this,_0x1689('0x1'),_0x24a48c=>!_0x24a48c),_0x28c324['on'](_0x1689('0x24'),()=>{this[_0x1689('0x22')](this['contentFieldView']['element']),_0x28c324[_0x1689('0xf')]=_0x4e2ce[_0x1689('0x3a')],_0x28c324[_0x1689('0x13')]=_0x35e114+'\x20ck-ai-form__copy-button--copied',this[_0x1689('0x8')](),setTimeout(()=>{_0x28c324[_0x1689('0xf')]=_0x4de345,_0x28c324[_0x1689('0x13')]=_0x35e114;},0x3e8);}),_0x28c324;}['_copyHTMLToClipboard'](_0x431205){const {window:_0x15821b,document:_0x349aa2}=_0x22e675;if(_0x15821b[_0x1689('0x28')]){const {Blob:_0x538f63,ClipboardItem:_0x72d099}=_0x15821b,_0x1a0d63=[new _0x72d099({'text/html':new _0x538f63([_0x431205[_0x1689('0x19')]],{'type':_0x1689('0x21')}),'text/plain':new _0x538f63([_0x431205[_0x1689('0x3')]||''],{'type':_0x1689('0x0')})})];navigator[_0x1689('0xc')][_0x1689('0x15')](_0x1a0d63);}else{const _0x3b3764=_0x349aa2[_0x1689('0x29')]('div');_0x3b3764[_0x1689('0x2c')][_0x1689('0x3b')]=_0x1689('0x23'),_0x3b3764[_0x1689('0x2c')][_0x1689('0x6')]=_0x1689('0x2a'),_0x3b3764[_0x1689('0x19')]=_0x431205['innerHTML'],_0x349aa2[_0x1689('0x2f')][_0x1689('0x10')](_0x3b3764);const _0x2d3134=_0x349aa2[_0x1689('0x30')]();_0x2d3134[_0x1689('0x5')](_0x3b3764);const _0x107aed=_0x15821b[_0x1689('0x14')]();_0x107aed[_0x1689('0x18')](),_0x107aed[_0x1689('0x7')](_0x2d3134),_0x349aa2[_0x1689('0xb')](_0x1689('0x2e')),_0x3b3764[_0x1689('0x12')]();}}}export class ContentFieldView extends _0x59a3fb{constructor(_0x1dec50,_0x5db835=''){super(_0x1dec50),this[_0x1689('0x38')]=this[_0x1689('0x20')](),this[_0x1689('0x17')]({'tag':_0x1689('0x26'),'attributes':{'class':['ck',_0x1689('0x1c'),_0x5db835,'ck-reset_all-excluded',_0x1689('0x11')]}});}[_0x1689('0x1e')](_0x241800){this[_0x1689('0x35')][_0x1689('0x19')]=_0x241800;}[_0x1689('0x1b')](){this[_0x1689('0x35')][_0x1689('0x10')](this['loaderView'][_0x1689('0x35')]);}[_0x1689('0x20')](){const _0x3417b0=new _0x59a3fb(),_0x56d981=this['locale'],_0x329cdd=new _0x2fe068();return _0x329cdd[_0x1689('0x39')]=!0x0,_0x3417b0['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x329cdd,{'text':_0x556c68(_0x56d981,_0x1689('0x2b'))}]}),_0x3417b0[_0x1689('0x31')](),_0x3417b0;}}
23
+ const _0xcce2=['div','textContent','setContent','-9999px','position','left','addRange','ck-ai-form__content-field','text/html','_copyHTMLToClipboard','bindTemplate','wheel','check','loaderView','element','icon','clipboard','AI\x20is\x20writing...','smooth','mousedown','ck-ai-form__loader','bind','change:isProcessing','isVisible','selectNodeContents','contentFieldView','body','class','removeAllRanges','ck-ai-form__copy-button-wrapper','render','change:value','set','innerHTML','isProcessing','appendChild','createElement','appendLoader','ck-ai-form__content-area','copyButtonView','execCommand','locale','value','scrollTo','execute','isEnabled','ck-ai-form__copy-button','.ck-ai-form__loader','remove','_createLoader','focus','style','setTemplate','listenTo','_createCopyButton','ck-reset_all-excluded'];(function(_0x13c87f,_0xcce2f5){const _0x1cd8c1=function(_0x41107d){while(--_0x41107d){_0x13c87f['push'](_0x13c87f['shift']());}};_0x1cd8c1(++_0xcce2f5);}(_0xcce2,0xb7));const _0x1cd8=function(_0x13c87f,_0xcce2f5){_0x13c87f=_0x13c87f-0x0;let _0x1cd8c1=_0xcce2[_0x13c87f];return _0x1cd8c1;};import{global as _0x50cfe2}from'ckeditor5/src/utils';import{View as _0x276f9d,ButtonView as _0x3675db,SpinnerView as _0x1fe79b}from'ckeditor5/src/ui';import _0x4e94ae from'../../../theme/icons/copy.svg';import{getTranslation as _0x2df8b1}from'../../utils/common-translations';import{icons as _0x54a06e}from'ckeditor5/src/core';export default class D extends _0x276f9d{constructor(_0x9de0ac,_0x4eaf3f=''){super(_0x9de0ac),this[_0x1cd8('0x11')]({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x4c57f9=this[_0x1cd8('0x33')];this[_0x1cd8('0xa')]=new ContentFieldView(_0x9de0ac,_0x4eaf3f),this[_0x1cd8('0x18')]=this[_0x1cd8('0x27')](),this[_0x1cd8('0x25')]({'tag':_0x1cd8('0x29'),'attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x4c57f9['if'](_0x1cd8('0x8'),'ck-hidden',_0x24cc23=>!_0x24cc23)],'tabindex':'-1'},'children':[{'tag':_0x1cd8('0x29'),'attributes':{'class':['ck',_0x1cd8('0x17'),_0x4c57f9['if'](_0x1cd8('0x13'),'ck-ai-form__content-area--processing')]},'children':[this[_0x1cd8('0xa')],{'tag':_0x1cd8('0x29'),'attributes':{'class':['ck',_0x1cd8('0xe')]},'children':[this[_0x1cd8('0x18')]]}]}]});}[_0x1cd8('0xf')](){super[_0x1cd8('0xf')](),this['value']&&this['contentFieldView'][_0x1cd8('0x2b')](this['value']);let _0x56aecf=!0x1;this['on'](_0x1cd8('0x10'),(_0x28a36d,_0x4e2360,_0x4308eb)=>{const _0x373285=!this['contentFieldView']['element']['querySelector'](_0x1cd8('0x20'));this['contentFieldView'][_0x1cd8('0x2b')](_0x4308eb),this[_0x1cd8('0x13')]&&_0x373285&&!_0x56aecf&&this[_0x1cd8('0x37')][_0x1cd8('0x1c')]({'top':this[_0x1cd8('0x37')]['scrollHeight'],'behavior':_0x1cd8('0x3')});}),this['on'](_0x1cd8('0x7'),(_0x1d9159,_0x1abecf,_0x3680a1)=>{_0x56aecf=!0x1,_0x3680a1?(this[_0x1cd8('0x1b')]=null,this[_0x1cd8('0xa')][_0x1cd8('0x16')]()):this[_0x1cd8('0x1b')]||this[_0x1cd8('0xa')][_0x1cd8('0x2b')]('');}),this[_0x1cd8('0x26')](this['element'],_0x1cd8('0x34'),()=>{_0x56aecf=!0x0;}),this['listenTo'](this[_0x1cd8('0x37')],_0x1cd8('0x4'),()=>{_0x56aecf=!0x0;});}[_0x1cd8('0x23')](){this[_0x1cd8('0x37')][_0x1cd8('0x23')]();}[_0x1cd8('0x27')](){const _0x31f34c=this[_0x1cd8('0x1a')],_0x3b87b3=new _0x3675db(this[_0x1cd8('0x1a')]),_0x23fadd=_0x1cd8('0x1f');return _0x3b87b3[_0x1cd8('0x11')]({'label':_0x2df8b1(_0x31f34c,'Copy'),'icon':_0x4e94ae,'class':_0x23fadd,'tooltip':!0x0}),_0x3b87b3[_0x1cd8('0x6')](_0x1cd8('0x8'))['to'](this,_0x1cd8('0x1b'),_0x24f8f7=>!!_0x24f8f7),_0x3b87b3[_0x1cd8('0x6')](_0x1cd8('0x1e'))['to'](this,_0x1cd8('0x13'),_0x333999=>!_0x333999),_0x3b87b3['on'](_0x1cd8('0x1d'),()=>{this[_0x1cd8('0x32')](this[_0x1cd8('0xa')][_0x1cd8('0x37')]),_0x3b87b3[_0x1cd8('0x0')]=_0x54a06e[_0x1cd8('0x35')],_0x3b87b3['class']=_0x23fadd+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x3b87b3[_0x1cd8('0x0')]=_0x4e94ae,_0x3b87b3[_0x1cd8('0xc')]=_0x23fadd;},0x3e8);}),_0x3b87b3;}['_copyHTMLToClipboard'](_0x5e5a75){const {window:_0x32beed,document:_0x43dd2a}=_0x50cfe2;if(_0x32beed['ClipboardItem']){const {Blob:_0x540f0a,ClipboardItem:_0x24a7c8}=_0x32beed,_0x319203=[new _0x24a7c8({'text/html':new _0x540f0a([_0x5e5a75[_0x1cd8('0x12')]],{'type':_0x1cd8('0x31')}),'text/plain':new _0x540f0a([_0x5e5a75[_0x1cd8('0x2a')]||''],{'type':'text/plain'})})];navigator[_0x1cd8('0x1')]['write'](_0x319203);}else{const _0x20edf6=_0x43dd2a[_0x1cd8('0x15')](_0x1cd8('0x29'));_0x20edf6[_0x1cd8('0x24')][_0x1cd8('0x2d')]='absolute',_0x20edf6[_0x1cd8('0x24')][_0x1cd8('0x2e')]=_0x1cd8('0x2c'),_0x20edf6[_0x1cd8('0x12')]=_0x5e5a75[_0x1cd8('0x12')],_0x43dd2a[_0x1cd8('0xb')][_0x1cd8('0x14')](_0x20edf6);const _0x2bcda1=_0x43dd2a['createRange']();_0x2bcda1[_0x1cd8('0x9')](_0x20edf6);const _0x33b0bc=_0x32beed['getSelection']();_0x33b0bc[_0x1cd8('0xd')](),_0x33b0bc[_0x1cd8('0x2f')](_0x2bcda1),_0x43dd2a[_0x1cd8('0x19')]('copy'),_0x20edf6[_0x1cd8('0x21')]();}}}export class ContentFieldView extends _0x276f9d{constructor(_0x5b064b,_0x30ef93=''){super(_0x5b064b),this[_0x1cd8('0x36')]=this[_0x1cd8('0x22')](),this[_0x1cd8('0x25')]({'tag':'div','attributes':{'class':['ck','ck-content',_0x30ef93,_0x1cd8('0x28'),_0x1cd8('0x30')]}});}['setContent'](_0x24c5b0){this[_0x1cd8('0x37')][_0x1cd8('0x12')]=_0x24c5b0;}[_0x1cd8('0x16')](){this[_0x1cd8('0x37')][_0x1cd8('0x14')](this[_0x1cd8('0x36')][_0x1cd8('0x37')]);}[_0x1cd8('0x22')](){const _0x582e8b=new _0x276f9d(),_0x103080=this[_0x1cd8('0x1a')],_0x2f917f=new _0x1fe79b();return _0x2f917f[_0x1cd8('0x8')]=!0x0,_0x582e8b[_0x1cd8('0x25')]({'tag':_0x1cd8('0x29'),'attributes':{'class':['ck',_0x1cd8('0x5')]},'children':[_0x2f917f,{'text':_0x2df8b1(_0x103080,_0x1cd8('0x2'))}]}),_0x582e8b[_0x1cd8('0xf')](),_0x582e8b;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4590=['content','set','bindTemplate','text','setTemplate','ck-ai-form__error'];(function(_0x16e6af,_0x4590ab){const _0x1e0ac0=function(_0x2125c7){while(--_0x2125c7){_0x16e6af['push'](_0x16e6af['shift']());}};_0x1e0ac0(++_0x4590ab);}(_0x4590,0xc4));const _0x1e0a=function(_0x16e6af,_0x4590ab){_0x16e6af=_0x16e6af-0x0;let _0x1e0ac0=_0x4590[_0x16e6af];return _0x1e0ac0;};import{View as _0x284285,IconView as _0xcc9122}from'ckeditor5/src/ui';import _0x5414ce from'../../../theme/icons/error.svg';export default class K extends _0x284285{constructor(_0x2d17e9,_0x618868=''){super(_0x2d17e9);const _0x15da1c=new _0xcc9122(),_0x37380b=this[_0x1e0a('0x4')];this[_0x1e0a('0x3')]('text',_0x618868),_0x15da1c[_0x1e0a('0x2')]=_0x5414ce,this[_0x1e0a('0x0')]({'tag':'div','attributes':{'class':['ck',_0x1e0a('0x1')]},'children':[_0x15da1c,{'text':_0x37380b['to'](_0x1e0a('0x5'))}]});}}
23
+ const _0x2c04=['div','bindTemplate','setTemplate','ck-ai-form__error','set','text'];(function(_0x8e2b38,_0x2c04b3){const _0x12f329=function(_0x2ff616){while(--_0x2ff616){_0x8e2b38['push'](_0x8e2b38['shift']());}};_0x12f329(++_0x2c04b3);}(_0x2c04,0x89));const _0x12f3=function(_0x8e2b38,_0x2c04b3){_0x8e2b38=_0x8e2b38-0x0;let _0x12f329=_0x2c04[_0x8e2b38];return _0x12f329;};import{View as _0x480621,IconView as _0x2ebcb8}from'ckeditor5/src/ui';import _0x17bac6 from'../../../theme/icons/error.svg';export default class K extends _0x480621{constructor(_0x33c1fd,_0x2530f8=''){super(_0x33c1fd);const _0x22895a=new _0x2ebcb8(),_0x2a9551=this[_0x12f3('0x2')];this[_0x12f3('0x5')](_0x12f3('0x0'),_0x2530f8),_0x22895a['content']=_0x17bac6,this[_0x12f3('0x3')]({'tag':_0x12f3('0x1'),'attributes':{'class':['ck',_0x12f3('0x4')]},'children':[_0x22895a,{'text':_0x2a9551['to'](_0x12f3('0x0'))}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xa8b0=['fire','focus','element','locale','isVisible','execute','requestAnimationFrame','bind','focusFirst','history','ck-ai-form__toggle-history','fieldView','minRows','target','window','render','focusCycler','resultsView','maxRows','isEmpty','isEnabled','children','set','rtl','value','keystrokes','uiLanguageDirection','queryView','add','style','submit','excludeScrollbarsAndBorders','History','isOn','focusLast','focusableChildren','Submit','showHistoryButtonView','_createShowHistoryButton','submitButtonView','enter'];(function(_0x46111f,_0xa8b09){const _0x1fea2e=function(_0x5335c8){while(--_0x5335c8){_0x46111f['push'](_0x46111f['shift']());}};_0x1fea2e(++_0xa8b09);}(_0xa8b0,0x18a));const _0x1fea=function(_0x46111f,_0xa8b09){_0x46111f=_0x46111f-0x0;let _0x1fea2e=_0xa8b0[_0x46111f];return _0x1fea2e;};import{Rect as _0x3b8675,global as _0x58197d,isVisible as _0x501d2e}from'ckeditor5/src/utils';import{AutocompleteView as _0xacf9b7,ButtonView as _0x2c581e}from'ckeditor5/src/ui';import{icons as _0x4210dc}from'ckeditor5/src/core';import{escape as _0xdf1c18}from'lodash-es';import{getTranslation as _0x2321eb}from'../../utils/common-translations';import _0x3e6bf9 from'../../../theme/icons/submit.svg';export default class Y extends _0xacf9b7{constructor(_0x5e28cb,_0x2590e4){super(_0x5e28cb,_0x2590e4),this[_0x1fea('0x2')][_0x1fea('0x1b')][_0x1fea('0x1c')]=0x1,this[_0x1fea('0x2')]['fieldView'][_0x1fea('0x22')]=0x3,this[_0x1fea('0xe')]=this['_createSubmitButton'](),this[_0x1fea('0xc')]=this[_0x1fea('0xd')](),this[_0x1fea('0xa')][_0x1fea('0x3')](this[_0x1fea('0xc')],0x1),this['focusableChildren'][_0x1fea('0x3')](this['submitButtonView']);}[_0x1fea('0x1f')](){super[_0x1fea('0x1f')](),this[_0x1fea('0x2')]['fieldWrapperChildren'][_0x1fea('0x3')](this['showHistoryButtonView']),this[_0x1fea('0x25')]['add'](this[_0x1fea('0xe')]),this[_0x1fea('0x0')][_0x1fea('0x26')](_0x1fea('0xf'),(_0x6d294f,_0xca84aa)=>{_0x6d294f[_0x1fea('0x1d')]==this[_0x1fea('0x2')][_0x1fea('0x1b')][_0x1fea('0x12')]&&(this['submit'](),_0xca84aa());});}['_createSubmitButton'](){const _0x271988=new _0x2c581e(this['locale']),_0x18666e=this[_0x1fea('0x13')];return _0x271988[_0x1fea('0x26')]({'icon':_0x3e6bf9,'label':_0x2321eb(_0x18666e,_0x1fea('0xb')),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x271988['on'](_0x1fea('0x15'),()=>{this['submit']();}),_0x271988[_0x1fea('0x17')](_0x1fea('0x24'))['to'](this[_0x1fea('0x2')]['fieldView'],_0x1fea('0x23'),this,'isEnabled',(_0x13bdf8,_0xa47b69)=>!_0x13bdf8&&_0xa47b69),_0x271988;}[_0x1fea('0xd')](){const _0x371037=new _0x2c581e(this['locale']),_0x4e2b9c=this[_0x1fea('0x21')],_0x4c8bc0=this[_0x1fea('0x13')];_0x371037[_0x1fea('0x26')]({'label':_0x2321eb(_0x4c8bc0,_0x1fea('0x7')),'withText':!0x1,'icon':_0x4210dc[_0x1fea('0x19')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x1fea('0x1a')}),_0x371037['bind'](_0x1fea('0x8'))['to'](_0x4e2b9c,_0x1fea('0x14')),_0x371037[_0x1fea('0x17')](_0x1fea('0x24'))['to'](this,_0x1fea('0x24')),_0x371037['on']('execute',()=>{_0x4e2b9c[_0x1fea('0x14')]=!_0x4e2b9c[_0x1fea('0x14')],_0x4e2b9c['isVisible']?this['filteredView'][_0x1fea('0x11')]():this[_0x1fea('0x11')]();});const _0x11a6bd=()=>{_0x58197d[_0x1fea('0x1e')][_0x1fea('0x16')](()=>{if(_0x501d2e(this[_0x1fea('0x12')])){const _0x48c4f2=new _0x3b8675(this[_0x1fea('0x2')]['fieldView']['element']),_0x30898a=_0x48c4f2['width'],_0x380d86=_0x1fea('0x27')===_0x4c8bc0[_0x1fea('0x1')]?'left':'right';_0x48c4f2[_0x1fea('0x6')](),_0x371037[_0x1fea('0x12')][_0x1fea('0x4')][_0x380d86]=_0x30898a-_0x48c4f2['width']+0x1+'px';}});};return this[_0x1fea('0x2')][_0x1fea('0x1b')]['on']('update',_0x11a6bd),this['on'](_0x1fea('0x1f'),_0x11a6bd),_0x371037;}[_0x1fea('0x5')](){const _0x43dca8=this[_0x1fea('0x2')][_0x1fea('0x1b')][_0x1fea('0x12')][_0x1fea('0x28')];this[_0x1fea('0x10')](_0x1fea('0x5'),_0xdf1c18(_0x43dca8));}[_0x1fea('0x11')](_0x3dfc98){-0x1===_0x3dfc98?this[_0x1fea('0x20')][_0x1fea('0x9')]():this[_0x1fea('0x20')][_0x1fea('0x18')]();}}
23
+ const _0xafa1=['render','fieldView','right','_createShowHistoryButton','enter','excludeScrollbarsAndBorders','width','set','requestAnimationFrame','ck-ai-form__toggle-history','focusableChildren','focus','element','submitButtonView','focusCycler','locale','add','fire','ck-ai-form__submit','uiLanguageDirection','minRows','filteredView','keystrokes','showHistoryButtonView','children','window','execute','focusFirst','fieldWrapperChildren','isEmpty','value','update','rtl','queryView','maxRows','submit','isVisible','_createSubmitButton','isEnabled','resultsView','bind'];(function(_0x427b47,_0xafa1a8){const _0x1791ed=function(_0x1f3282){while(--_0x1f3282){_0x427b47['push'](_0x427b47['shift']());}};_0x1791ed(++_0xafa1a8);}(_0xafa1,0x17b));const _0x1791=function(_0x427b47,_0xafa1a8){_0x427b47=_0x427b47-0x0;let _0x1791ed=_0xafa1[_0x427b47];return _0x1791ed;};import{Rect as _0x4d77df,global as _0x3b21a6,isVisible as _0x53fb4b}from'ckeditor5/src/utils';import{AutocompleteView as _0x3a2c1a,ButtonView as _0x4bff58}from'ckeditor5/src/ui';import{icons as _0x34b3a2}from'ckeditor5/src/core';import{escape as _0x539adf}from'lodash-es';import{getTranslation as _0x179f8e}from'../../utils/common-translations';import _0x42c5b2 from'../../../theme/icons/submit.svg';export default class Y extends _0x3a2c1a{constructor(_0x32cec7,_0x2a4542){super(_0x32cec7,_0x2a4542),this[_0x1791('0x17')]['fieldView'][_0x1791('0xa')]=0x1,this[_0x1791('0x17')][_0x1791('0x20')][_0x1791('0x18')]=0x3,this['submitButtonView']=this['_createSubmitButton'](),this[_0x1791('0xd')]=this[_0x1791('0x22')](),this[_0x1791('0x0')][_0x1791('0x6')](this['showHistoryButtonView'],0x1),this[_0x1791('0x0')][_0x1791('0x6')](this[_0x1791('0x3')]);}['render'](){super[_0x1791('0x1f')](),this['queryView'][_0x1791('0x12')][_0x1791('0x6')](this[_0x1791('0xd')]),this[_0x1791('0xe')][_0x1791('0x6')](this[_0x1791('0x3')]),this[_0x1791('0xc')]['set'](_0x1791('0x23'),(_0x21ff8d,_0x2c9e39)=>{_0x21ff8d['target']==this[_0x1791('0x17')][_0x1791('0x20')]['element']&&(this[_0x1791('0x19')](),_0x2c9e39());});}[_0x1791('0x1b')](){const _0x21e58b=new _0x4bff58(this[_0x1791('0x5')]),_0x42a7b2=this[_0x1791('0x5')];return _0x21e58b[_0x1791('0x26')]({'icon':_0x42c5b2,'label':_0x179f8e(_0x42a7b2,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':_0x1791('0x8')}),_0x21e58b['on'](_0x1791('0x10'),()=>{this['submit']();}),_0x21e58b['bind'](_0x1791('0x1c'))['to'](this[_0x1791('0x17')][_0x1791('0x20')],_0x1791('0x13'),this,'isEnabled',(_0x166339,_0x32af10)=>!_0x166339&&_0x32af10),_0x21e58b;}[_0x1791('0x22')](){const _0x5ca5f5=new _0x4bff58(this[_0x1791('0x5')]),_0x4d8f45=this[_0x1791('0x1d')],_0x8a3296=this['locale'];_0x5ca5f5[_0x1791('0x26')]({'label':_0x179f8e(_0x8a3296,'History'),'withText':!0x1,'icon':_0x34b3a2['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x1791('0x28')}),_0x5ca5f5[_0x1791('0x1e')]('isOn')['to'](_0x4d8f45,_0x1791('0x1a')),_0x5ca5f5[_0x1791('0x1e')]('isEnabled')['to'](this,'isEnabled'),_0x5ca5f5['on'](_0x1791('0x10'),()=>{_0x4d8f45[_0x1791('0x1a')]=!_0x4d8f45[_0x1791('0x1a')],_0x4d8f45[_0x1791('0x1a')]?this[_0x1791('0xb')][_0x1791('0x1')]():this[_0x1791('0x1')]();});const _0x57affc=()=>{_0x3b21a6[_0x1791('0xf')][_0x1791('0x27')](()=>{if(_0x53fb4b(this[_0x1791('0x2')])){const _0x508566=new _0x4d77df(this[_0x1791('0x17')]['fieldView']['element']),_0x8c9933=_0x508566[_0x1791('0x25')],_0xdb9813=_0x1791('0x16')===_0x8a3296[_0x1791('0x9')]?'left':_0x1791('0x21');_0x508566[_0x1791('0x24')](),_0x5ca5f5['element']['style'][_0xdb9813]=_0x8c9933-_0x508566[_0x1791('0x25')]+0x1+'px';}});};return this[_0x1791('0x17')]['fieldView']['on'](_0x1791('0x15'),_0x57affc),this['on'](_0x1791('0x1f'),_0x57affc),_0x5ca5f5;}[_0x1791('0x19')](){const _0x462973=this[_0x1791('0x17')][_0x1791('0x20')]['element'][_0x1791('0x14')];this[_0x1791('0x7')](_0x1791('0x19'),_0x539adf(_0x462973));}[_0x1791('0x1')](_0x4eef44){-0x1===_0x4eef44?this[_0x1791('0x4')]['focusLast']():this[_0x1791('0x4')][_0x1791('0x11')]();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4061=['INSERT','replaceButton','AI_','label','mainAction','REPLACE','bind','insertButton','ck-ai-form__toolbar','items','_CONTENT','stopButton','Try\x20again','replace','set','ck-button-action','bindTemplate','isVisible','insert','_createButton','Stop'];(function(_0x370ec4,_0x40619d){const _0x15b453=function(_0xc07031){while(--_0xc07031){_0x370ec4['push'](_0x370ec4['shift']());}};_0x15b453(++_0x40619d);}(_0x4061,0x14b));const _0x15b4=function(_0x370ec4,_0x40619d){_0x370ec4=_0x370ec4-0x0;let _0x15b453=_0x4061[_0x370ec4];return _0x15b453;};import{ToolbarView as _0x5af7be,ButtonView as _0x34b6ae}from'ckeditor5/src/ui';import{getTranslation as _0x3ed115}from'../../utils/common-translations';export var AIFormToolbarViewMainAction;!function(_0x145ac1){_0x145ac1[_0x15b4('0xa')]=_0x15b4('0x12'),_0x145ac1[_0x15b4('0x5')]=_0x15b4('0x2');}(AIFormToolbarViewMainAction||(AIFormToolbarViewMainAction={}));export default class ii extends _0x5af7be{constructor(_0x5de140){super(_0x5de140),this[_0x15b4('0x13')](_0x15b4('0x1'),!0x1),this[_0x15b4('0x13')](_0x15b4('0x9'),AIFormToolbarViewMainAction[_0x15b4('0xa')]),this[_0x15b4('0x6')]=this[_0x15b4('0x3')]('',_0x15b4('0x14')),this[_0x15b4('0x6')][_0x15b4('0xb')](_0x15b4('0x8'))['to'](this,_0x15b4('0x9'),_0x576725=>_0x3ed115(_0x5de140,_0x15b4('0x7')+_0x576725['toUpperCase']()+_0x15b4('0xf'))),this[_0x15b4('0xc')]=this[_0x15b4('0x3')](_0x3ed115(_0x5de140,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](_0x3ed115(_0x5de140,_0x15b4('0x11'))),this[_0x15b4('0x10')]=this['_createButton'](_0x3ed115(_0x5de140,_0x15b4('0x4')));const _0x5a7d79=this[_0x15b4('0x0')];this['extendTemplate']({'attributes':{'class':[_0x15b4('0xd'),_0x5a7d79['if'](_0x15b4('0x1'),'ck-hidden',_0x501b19=>!_0x501b19)]}}),this[_0x15b4('0xe')]['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this[_0x15b4('0x10')]]);}['_createButton'](_0x17b9c3,_0x2554c2){const _0x428df4=new _0x34b6ae(this['locale']);return _0x428df4[_0x15b4('0x13')]({'label':_0x17b9c3,'class':_0x2554c2||'','isVisible':!0x0,'withText':!0x0}),_0x428df4;}}
23
+ const _0x4c2b=['Insert\x20below','insertButton','insert','tryAgainButton','bindTemplate','replaceButton','ck-ai-form__toolbar','toUpperCase','addMany','label','_createButton','replace','extendTemplate','ck-hidden','isVisible','Stop','mainAction','set','AI_','REPLACE','stopButton','bind','locale','ck-button-action'];(function(_0xb57434,_0x4c2b50){const _0x585201=function(_0x4c11bd){while(--_0x4c11bd){_0xb57434['push'](_0xb57434['shift']());}};_0x585201(++_0x4c2b50);}(_0x4c2b,0x93));const _0x5852=function(_0xb57434,_0x4c2b50){_0xb57434=_0xb57434-0x0;let _0x585201=_0x4c2b[_0xb57434];return _0x585201;};import{ToolbarView as _0x17a155,ButtonView as _0x3cd9c9}from'ckeditor5/src/ui';import{getTranslation as _0x11d912}from'../../utils/common-translations';export var AIFormToolbarViewMainAction;!function(_0x40a847){_0x40a847[_0x5852('0x10')]=_0x5852('0x8'),_0x40a847['INSERT']=_0x5852('0x17');}(AIFormToolbarViewMainAction||(AIFormToolbarViewMainAction={}));export default class ii extends _0x17a155{constructor(_0xc7f407){super(_0xc7f407),this['set'](_0x5852('0xb'),!0x1),this[_0x5852('0xe')](_0x5852('0xd'),AIFormToolbarViewMainAction['REPLACE']),this[_0x5852('0x2')]=this[_0x5852('0x7')]('',_0x5852('0x14')),this[_0x5852('0x2')][_0x5852('0x12')](_0x5852('0x6'))['to'](this,_0x5852('0xd'),_0x590850=>_0x11d912(_0xc7f407,_0x5852('0xf')+_0x590850[_0x5852('0x4')]()+'_CONTENT')),this['insertButton']=this[_0x5852('0x7')](_0x11d912(_0xc7f407,_0x5852('0x15'))),this['tryAgainButton']=this[_0x5852('0x7')](_0x11d912(_0xc7f407,'Try\x20again')),this[_0x5852('0x11')]=this[_0x5852('0x7')](_0x11d912(_0xc7f407,_0x5852('0xc')));const _0x43bfea=this[_0x5852('0x1')];this[_0x5852('0x9')]({'attributes':{'class':[_0x5852('0x3'),_0x43bfea['if']('isVisible',_0x5852('0xa'),_0xd9748c=>!_0xd9748c)]}}),this['items'][_0x5852('0x5')]([this[_0x5852('0x2')],this[_0x5852('0x16')],this[_0x5852('0x0')],this[_0x5852('0x11')]]);}[_0x5852('0x7')](_0x5e4735,_0x29d3b2){const _0x1447f5=new _0x3cd9c9(this[_0x5852('0x13')]);return _0x1447f5[_0x5852('0xe')]({'label':_0x5e4735,'class':_0x29d3b2||'','isVisible':!0x0,'withText':!0x0}),_0x1447f5;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x8c8e=['isError','historyGroupView','bindTo','tryAgainEvent','value','stopProcessing','tab','replaceContent','set','ck-hidden','Empty\x20history','shift\x20+\x20tab','high','fieldView','toolbar','add','fire','isEnabled','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','reset','_focusCycler','queryView','trim','_focusables','element','_createHistoryView','copyButtonView','AI_ERROR_FAILED','createCollection','mainAction','handleError','focusPrevious','startProcessing','listenTo','forwardCycle','search','tryAgainButton','insertButton','focusNext','submit','focusFirst','focus','stop','_createToolbar','locale','focusTracker','bindTemplate','backwardCycle','header','isVisible','render','keystrokes','ck-ai-form-content','errorView','finishProcessing','replaceButton','execute','ck-ai-form','promptView','isProcessing','Ask\x20AI\x20to\x20improve\x20generated\x20text','focusCycler','contentArea','REPLACE','_promptHistory','div','prompt','setTemplate','clear','bind','stopButton'];(function(_0x165591,_0x8c8e96){const _0x4b3ebb=function(_0x1dc038){while(--_0x1dc038){_0x165591['push'](_0x165591['shift']());}};_0x4b3ebb(++_0x8c8e96);}(_0x8c8e,0xc1));const _0x4b3e=function(_0x165591,_0x8c8e96){_0x165591=_0x165591-0x0;let _0x4b3ebb=_0x8c8e[_0x165591];return _0x4b3ebb;};import{FocusTracker as _0x2edf27,KeystrokeHandler as _0x5d7d54}from'ckeditor5/src/utils';import{View as _0x44582b,FocusCycler as _0x23f3ca,createLabeledTextarea as _0x55d488,FormHeaderView as _0x1efa6f}from'ckeditor5/src/ui';import _0x6a703a,{AIFormToolbarViewMainAction as _0x1e2f98}from'./aiformtoolbarview';import _0xc8411 from'./aiformcontentarea';import _0x10fa88 from'./aiformerrorview';import _0x206ab1 from'./aiformpromptview';import _0x3e1f13 from'./aihistorylistview';import _0x28ac51 from'./aihistorylistitemview';import _0x210e87 from'./prompthistory';import{getTranslation as _0x4a54cc}from'../../utils/common-translations';import _0x267bad from'../../../theme/icons/robot-pencil.svg';export default class y extends _0x44582b{constructor(_0x2901d9,_0x4c0aab,_0x48a817=''){super(_0x2901d9),this[_0x4b3e('0x1c')](_0x4b3e('0x25'),!0x0),this[_0x4b3e('0x1c')]('isProcessing',!0x1),this[_0x4b3e('0x1c')](_0x4b3e('0xf'),''),this['set']('value',''),this[_0x4b3e('0x1c')](_0x4b3e('0x14'),!0x1),this[_0x4b3e('0x1c')](_0x4b3e('0x31'),_0x1e2f98[_0x4b3e('0xc')]),this[_0x4b3e('0xd')]=new _0x210e87(),this[_0x4b3e('0x2')]=new _0x10fa88(_0x2901d9),this[_0x4b3e('0x44')]=new _0x1efa6f(_0x2901d9,{'label':_0x4a54cc(_0x2901d9,'AI\x20Assistant'),'icon':_0x267bad}),this['contentArea']=new _0xc8411(_0x2901d9,_0x48a817),this[_0x4b3e('0xb')]['bind']('isProcessing')['to'](this),this[_0x4b3e('0xb')][_0x4b3e('0x12')](_0x4b3e('0x18'))['to'](this),this[_0x4b3e('0x22')]=this[_0x4b3e('0x3f')](),this[_0x4b3e('0x22')][_0x4b3e('0x12')](_0x4b3e('0x31'))['to'](this),this[_0x4b3e('0x7')]=this['_createPromptView'](),this[_0x4b3e('0x41')]=new _0x2edf27(),this['keystrokes']=new _0x5d7d54(),this['_focusables']=this[_0x4b3e('0x30')]([this['contentArea'],this[_0x4b3e('0xb')][_0x4b3e('0x2e')],this[_0x4b3e('0x22')],this[_0x4b3e('0x7')]]),this[_0x4b3e('0x28')]=new _0x23f3ca({'focusables':this[_0x4b3e('0x2b')],'focusTracker':this[_0x4b3e('0x41')],'keystrokeHandler':this[_0x4b3e('0x0')],'actions':{'focusPrevious':_0x4b3e('0x1f'),'focusNext':_0x4b3e('0x1a')}}),this[_0x4b3e('0x7')][_0x4b3e('0xa')]['on'](_0x4b3e('0x36'),_0x1ab003=>{this[_0x4b3e('0x28')][_0x4b3e('0x3a')](),_0x1ab003['stop']();}),this[_0x4b3e('0x7')][_0x4b3e('0xa')]['on'](_0x4b3e('0x43'),_0x356866=>{this[_0x4b3e('0x28')][_0x4b3e('0x33')](),_0x356866[_0x4b3e('0x3e')]();}),this[_0x4b3e('0x7')][_0x4b3e('0x29')][_0x4b3e('0x21')][_0x4b3e('0x12')](_0x4b3e('0x18'))['to'](this,_0x4b3e('0xf'));const _0x4f7867=this[_0x4b3e('0x42')];this[_0x4b3e('0x10')]({'tag':_0x4b3e('0xe'),'attributes':{'class':['ck',_0x4b3e('0x6'),_0x4c0aab],'tabindex':'-1'},'children':[this['header'],{'tag':_0x4b3e('0xe'),'attributes':{'class':['ck',_0x4b3e('0x1')]},'children':[{'tag':_0x4b3e('0xe'),'attributes':{'class':[_0x4f7867['if'](_0x4b3e('0x14'),_0x4b3e('0x1d'),_0x37ee4c=>!_0x37ee4c)]},'children':[this[_0x4b3e('0x2')]]},this[_0x4b3e('0xb')],this[_0x4b3e('0x22')],this[_0x4b3e('0x7')]]}]});}['render'](){super[_0x4b3e('0x46')](),this[_0x4b3e('0x41')][_0x4b3e('0x23')](this[_0x4b3e('0xb')][_0x4b3e('0x2c')]),this['focusTracker'][_0x4b3e('0x23')](this[_0x4b3e('0xb')][_0x4b3e('0x2e')][_0x4b3e('0x2c')]),this[_0x4b3e('0x41')][_0x4b3e('0x23')](this['toolbar'][_0x4b3e('0x2c')]),this[_0x4b3e('0x41')][_0x4b3e('0x23')](this[_0x4b3e('0x7')][_0x4b3e('0x2c')]),this[_0x4b3e('0x0')][_0x4b3e('0x35')](this[_0x4b3e('0x2c')]);}[_0x4b3e('0x3d')](){this[_0x4b3e('0x28')][_0x4b3e('0x3c')]();}[_0x4b3e('0x27')](){this[_0x4b3e('0xf')]='',this[_0x4b3e('0x18')]='',this[_0x4b3e('0x7')]['reset'](),this[_0x4b3e('0xb')][_0x4b3e('0x45')]=!0x1,this['toolbar'][_0x4b3e('0x45')]=!0x1;}['_createPromptView'](){const _0x700f60=this[_0x4b3e('0x40')],_0x544aea=new _0x206ab1(_0x700f60,{'queryView':{'label':_0x4a54cc(_0x700f60,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x55d488,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x4a54cc(_0x700f60,_0x4b3e('0x1e')),'secondary':_0x4a54cc(_0x700f60,_0x4b3e('0x26'))}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x544aea[_0x4b3e('0x12')](_0x4b3e('0x25'))['to'](this,_0x4b3e('0x25'),this,'isProcessing',(_0xeada01,_0x169d00)=>_0xeada01&&!_0x169d00),this['listenTo'](_0x544aea,_0x4b3e('0x3b'),(_0x34cdeb,_0x2b050b)=>{this[_0x4b3e('0xf')]=_0x2b050b,this[_0x4b3e('0x24')]('submitPrompt',this['prompt']),_0x2b050b[_0x4b3e('0x2a')]()&&this[_0x4b3e('0xd')][_0x4b3e('0x23')]({'prompt':_0x2b050b['trim']()},0x0);},{'priority':_0x4b3e('0x20')}),_0x544aea;}[_0x4b3e('0x2d')](){const _0x42db2e=new _0x3e1f13(this[_0x4b3e('0x40')]);return _0x42db2e[_0x4b3e('0x15')]['items'][_0x4b3e('0x16')](this[_0x4b3e('0xd')])['as'](_0x28ac51),_0x42db2e['on']('clearHistory',()=>{this['_promptHistory'][_0x4b3e('0x11')](),this['promptView'][_0x4b3e('0x37')](''),this['promptView']['focus']();}),_0x42db2e;}['_createToolbar'](){const _0x45f766=new _0x6a703a(this[_0x4b3e('0x40')]);return _0x45f766[_0x4b3e('0x4')][_0x4b3e('0x12')](_0x4b3e('0x25'))['to'](this,_0x4b3e('0x25'),this,'isProcessing',this,'value',(_0x13f101,_0x16d228,_0x17abde)=>_0x13f101&&!_0x16d228&&!!_0x17abde),_0x45f766[_0x4b3e('0x4')]['on'](_0x4b3e('0x5'),()=>{this['fire'](_0x4b3e('0x1b'),this[_0x4b3e('0x18')]);}),_0x45f766['insertButton'][_0x4b3e('0x12')]('isEnabled')['to'](this,_0x4b3e('0x25'),this,_0x4b3e('0x8'),this,_0x4b3e('0x18'),(_0x5f2158,_0x56a44b,_0x331a3a)=>_0x5f2158&&!_0x56a44b&&!!_0x331a3a),_0x45f766[_0x4b3e('0x39')]['on'](_0x4b3e('0x5'),()=>{this[_0x4b3e('0x24')]('insertContentBelow',this[_0x4b3e('0x18')]);}),_0x45f766[_0x4b3e('0x38')][_0x4b3e('0x12')](_0x4b3e('0x25'))['to'](this,_0x4b3e('0x25'),this,'isProcessing',(_0x48b026,_0x1e9788)=>_0x48b026&&!_0x1e9788),_0x45f766[_0x4b3e('0x38')]['on'](_0x4b3e('0x5'),()=>{this[_0x4b3e('0x24')](_0x4b3e('0x17'));}),_0x45f766['stopButton'][_0x4b3e('0x12')](_0x4b3e('0x25'))['to'](this,_0x4b3e('0x8')),_0x45f766[_0x4b3e('0x13')]['on'](_0x4b3e('0x5'),()=>{this[_0x4b3e('0x24')](_0x4b3e('0x19'));}),_0x45f766;}[_0x4b3e('0x34')](){this[_0x4b3e('0x18')]='',this[_0x4b3e('0x14')]=!0x1,this['isProcessing']=!0x0,this[_0x4b3e('0xb')][_0x4b3e('0x45')]=!0x0,this['toolbar'][_0x4b3e('0x45')]=!0x0,this[_0x4b3e('0xb')][_0x4b3e('0x3d')]();}[_0x4b3e('0x3')](){const _0x161f79=this[_0x4b3e('0x40')];this['isProcessing']=!0x1,this[_0x4b3e('0xf')]='',this[_0x4b3e('0x7')]['reset'](),this['value']&&(this[_0x4b3e('0x7')]['queryView']['label']=_0x4a54cc(_0x161f79,_0x4b3e('0x9')));}[_0x4b3e('0x32')](_0x3c7c21){const _0xdf4add=this[_0x4b3e('0x40')];this[_0x4b3e('0x3')](),this[_0x4b3e('0x14')]=!0x0,this['errorView']['text']=_0x3c7c21||_0x4a54cc(_0xdf4add,_0x4b3e('0x2f')),this[_0x4b3e('0x18')]||(this[_0x4b3e('0xb')][_0x4b3e('0x45')]=!0x1);}}
23
+ const _0x2450=['shift\x20+\x20tab','reset','stopButton','queryView','fire','promptView','ck-ai-form-content','fieldView','render','stop','value','keystrokes','insertContentBelow','_createPromptView','focusFirst','insertButton','ck-hidden','AI_ERROR_FAILED','REPLACE','replaceButton','submit','bind','locale','execute','div','errorView','Empty\x20history','replaceContent','focus','bindTemplate','setTemplate','historyGroupView','text','isProcessing','high','trim','isError','_promptHistory','add','prompt','_createToolbar','clear','submitPrompt','isVisible','_focusables','element','focusCycler','_focusCycler','set','tryAgainButton','toolbar','mainAction','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','forwardCycle','startProcessing','listenTo','clearHistory','tryAgainEvent','backwardCycle','focusNext','isEnabled','focusTracker','copyButtonView','contentArea','ck-ai-form','createCollection'];(function(_0x26ca68,_0x24503a){const _0x2bf270=function(_0x57abe2){while(--_0x57abe2){_0x26ca68['push'](_0x26ca68['shift']());}};_0x2bf270(++_0x24503a);}(_0x2450,0x107));const _0x2bf2=function(_0x26ca68,_0x24503a){_0x26ca68=_0x26ca68-0x0;let _0x2bf270=_0x2450[_0x26ca68];return _0x2bf270;};import{FocusTracker as _0x11cbaa,KeystrokeHandler as _0x93c7b0}from'ckeditor5/src/utils';import{View as _0x1584d8,FocusCycler as _0x18af61,createLabeledTextarea as _0x238477,FormHeaderView as _0x2225c0}from'ckeditor5/src/ui';import _0xff6d64,{AIFormToolbarViewMainAction as _0x4629c7}from'./aiformtoolbarview';import _0x4c98a5 from'./aiformcontentarea';import _0x5069ab from'./aiformerrorview';import _0x11dce6 from'./aiformpromptview';import _0x3dbcab from'./aihistorylistview';import _0x2c0da2 from'./aihistorylistitemview';import _0x4386b5 from'./prompthistory';import{getTranslation as _0x268916}from'../../utils/common-translations';import _0x32c56b from'../../../theme/icons/robot-pencil.svg';export default class y extends _0x1584d8{constructor(_0x57773d,_0x378abc,_0x41d513=''){super(_0x57773d),this['set'](_0x2bf2('0x3d'),!0x0),this[_0x2bf2('0x31')](_0x2bf2('0x22'),!0x1),this[_0x2bf2('0x31')]('prompt',''),this[_0x2bf2('0x31')](_0x2bf2('0xb'),''),this[_0x2bf2('0x31')]('isError',!0x1),this['set'](_0x2bf2('0x34'),_0x4629c7[_0x2bf2('0x13')]),this[_0x2bf2('0x26')]=new _0x4386b5(),this[_0x2bf2('0x1a')]=new _0x5069ab(_0x57773d),this['header']=new _0x2225c0(_0x57773d,{'label':_0x268916(_0x57773d,'AI\x20Assistant'),'icon':_0x32c56b}),this[_0x2bf2('0x40')]=new _0x4c98a5(_0x57773d,_0x41d513),this[_0x2bf2('0x40')][_0x2bf2('0x16')](_0x2bf2('0x22'))['to'](this),this[_0x2bf2('0x40')][_0x2bf2('0x16')](_0x2bf2('0xb'))['to'](this),this[_0x2bf2('0x33')]=this[_0x2bf2('0x29')](),this[_0x2bf2('0x33')][_0x2bf2('0x16')](_0x2bf2('0x34'))['to'](this),this[_0x2bf2('0x6')]=this[_0x2bf2('0xe')](),this[_0x2bf2('0x3e')]=new _0x11cbaa(),this[_0x2bf2('0xc')]=new _0x93c7b0(),this[_0x2bf2('0x2d')]=this[_0x2bf2('0x0')]([this[_0x2bf2('0x40')],this[_0x2bf2('0x40')][_0x2bf2('0x3f')],this['toolbar'],this[_0x2bf2('0x6')]]),this[_0x2bf2('0x30')]=new _0x18af61({'focusables':this[_0x2bf2('0x2d')],'focusTracker':this[_0x2bf2('0x3e')],'keystrokeHandler':this[_0x2bf2('0xc')],'actions':{'focusPrevious':_0x2bf2('0x1'),'focusNext':'tab'}}),this['promptView'][_0x2bf2('0x2f')]['on'](_0x2bf2('0x36'),_0x317c15=>{this['_focusCycler'][_0x2bf2('0x3c')](),_0x317c15['stop']();}),this['promptView'][_0x2bf2('0x2f')]['on'](_0x2bf2('0x3b'),_0x1d5406=>{this['_focusCycler']['focusPrevious'](),_0x1d5406[_0x2bf2('0xa')]();}),this[_0x2bf2('0x6')][_0x2bf2('0x4')][_0x2bf2('0x8')][_0x2bf2('0x16')]('value')['to'](this,_0x2bf2('0x28'));const _0x3565ee=this[_0x2bf2('0x1e')];this[_0x2bf2('0x1f')]({'tag':'div','attributes':{'class':['ck',_0x2bf2('0x41'),_0x378abc],'tabindex':'-1'},'children':[this['header'],{'tag':_0x2bf2('0x19'),'attributes':{'class':['ck',_0x2bf2('0x7')]},'children':[{'tag':_0x2bf2('0x19'),'attributes':{'class':[_0x3565ee['if'](_0x2bf2('0x25'),_0x2bf2('0x11'),_0x1c259d=>!_0x1c259d)]},'children':[this[_0x2bf2('0x1a')]]},this[_0x2bf2('0x40')],this['toolbar'],this[_0x2bf2('0x6')]]}]});}[_0x2bf2('0x9')](){super[_0x2bf2('0x9')](),this[_0x2bf2('0x3e')]['add'](this[_0x2bf2('0x40')][_0x2bf2('0x2e')]),this[_0x2bf2('0x3e')][_0x2bf2('0x27')](this[_0x2bf2('0x40')][_0x2bf2('0x3f')][_0x2bf2('0x2e')]),this[_0x2bf2('0x3e')]['add'](this[_0x2bf2('0x33')][_0x2bf2('0x2e')]),this[_0x2bf2('0x3e')][_0x2bf2('0x27')](this[_0x2bf2('0x6')][_0x2bf2('0x2e')]),this[_0x2bf2('0xc')]['listenTo'](this[_0x2bf2('0x2e')]);}[_0x2bf2('0x1d')](){this['_focusCycler'][_0x2bf2('0xf')]();}[_0x2bf2('0x2')](){this[_0x2bf2('0x28')]='',this[_0x2bf2('0xb')]='',this[_0x2bf2('0x6')]['reset'](),this[_0x2bf2('0x40')][_0x2bf2('0x2c')]=!0x1,this[_0x2bf2('0x33')][_0x2bf2('0x2c')]=!0x1;}[_0x2bf2('0xe')](){const _0x31ce64=this[_0x2bf2('0x17')],_0x33fa13=new _0x11dce6(_0x31ce64,{'queryView':{'label':_0x268916(_0x31ce64,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x238477,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x268916(_0x31ce64,_0x2bf2('0x1b')),'secondary':_0x268916(_0x31ce64,_0x2bf2('0x35'))}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x33fa13[_0x2bf2('0x16')]('isEnabled')['to'](this,_0x2bf2('0x3d'),this,'isProcessing',(_0x4ae537,_0x4c5877)=>_0x4ae537&&!_0x4c5877),this[_0x2bf2('0x38')](_0x33fa13,_0x2bf2('0x15'),(_0x2209b6,_0x199cbf)=>{this['prompt']=_0x199cbf,this[_0x2bf2('0x5')](_0x2bf2('0x2b'),this['prompt']),_0x199cbf[_0x2bf2('0x24')]()&&this['_promptHistory'][_0x2bf2('0x27')]({'prompt':_0x199cbf[_0x2bf2('0x24')]()},0x0);},{'priority':_0x2bf2('0x23')}),_0x33fa13;}['_createHistoryView'](){const _0x4b5ee6=new _0x3dbcab(this[_0x2bf2('0x17')]);return _0x4b5ee6[_0x2bf2('0x20')]['items']['bindTo'](this['_promptHistory'])['as'](_0x2c0da2),_0x4b5ee6['on'](_0x2bf2('0x39'),()=>{this[_0x2bf2('0x26')][_0x2bf2('0x2a')](),this['promptView']['search'](''),this[_0x2bf2('0x6')][_0x2bf2('0x1d')]();}),_0x4b5ee6;}[_0x2bf2('0x29')](){const _0x4384c7=new _0xff6d64(this[_0x2bf2('0x17')]);return _0x4384c7[_0x2bf2('0x14')][_0x2bf2('0x16')](_0x2bf2('0x3d'))['to'](this,'isEnabled',this,_0x2bf2('0x22'),this,_0x2bf2('0xb'),(_0x584221,_0x5f5c1e,_0x54fbe4)=>_0x584221&&!_0x5f5c1e&&!!_0x54fbe4),_0x4384c7[_0x2bf2('0x14')]['on'](_0x2bf2('0x18'),()=>{this['fire'](_0x2bf2('0x1c'),this[_0x2bf2('0xb')]);}),_0x4384c7[_0x2bf2('0x10')][_0x2bf2('0x16')](_0x2bf2('0x3d'))['to'](this,_0x2bf2('0x3d'),this,_0x2bf2('0x22'),this,_0x2bf2('0xb'),(_0x54c7ea,_0x76c3a1,_0x181445)=>_0x54c7ea&&!_0x76c3a1&&!!_0x181445),_0x4384c7[_0x2bf2('0x10')]['on'](_0x2bf2('0x18'),()=>{this['fire'](_0x2bf2('0xd'),this['value']);}),_0x4384c7[_0x2bf2('0x32')]['bind']('isEnabled')['to'](this,_0x2bf2('0x3d'),this,_0x2bf2('0x22'),(_0xb184ad,_0x13c76e)=>_0xb184ad&&!_0x13c76e),_0x4384c7['tryAgainButton']['on']('execute',()=>{this[_0x2bf2('0x5')](_0x2bf2('0x3a'));}),_0x4384c7[_0x2bf2('0x3')][_0x2bf2('0x16')](_0x2bf2('0x3d'))['to'](this,'isProcessing'),_0x4384c7[_0x2bf2('0x3')]['on']('execute',()=>{this[_0x2bf2('0x5')]('stopProcessing');}),_0x4384c7;}[_0x2bf2('0x37')](){this[_0x2bf2('0xb')]='',this['isError']=!0x1,this[_0x2bf2('0x22')]=!0x0,this[_0x2bf2('0x40')][_0x2bf2('0x2c')]=!0x0,this[_0x2bf2('0x33')]['isVisible']=!0x0,this[_0x2bf2('0x40')][_0x2bf2('0x1d')]();}['finishProcessing'](){const _0x1a8856=this[_0x2bf2('0x17')];this[_0x2bf2('0x22')]=!0x1,this['prompt']='',this['promptView']['reset'](),this[_0x2bf2('0xb')]&&(this[_0x2bf2('0x6')][_0x2bf2('0x4')]['label']=_0x268916(_0x1a8856,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x4d3473){const _0x70074f=this[_0x2bf2('0x17')];this['finishProcessing'](),this[_0x2bf2('0x25')]=!0x0,this[_0x2bf2('0x1a')][_0x2bf2('0x21')]=_0x4d3473||_0x268916(_0x70074f,_0x2bf2('0x12')),this[_0x2bf2('0xb')]||(this[_0x2bf2('0x40')]['isVisible']=!0x1);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1ad0=['add','execute','locale','children','set'];(function(_0x3f2bca,_0x1ad09f){const _0x1c6b99=function(_0x69d2a4){while(--_0x69d2a4){_0x3f2bca['push'](_0x3f2bca['shift']());}};_0x1c6b99(++_0x1ad09f);}(_0x1ad0,0x16d));const _0x1c6b=function(_0x3f2bca,_0x1ad09f){_0x3f2bca=_0x3f2bca-0x0;let _0x1c6b99=_0x1ad0[_0x3f2bca];return _0x1c6b99;};import{ListItemView as _0x131612,ButtonView as _0xe9cda7}from'ckeditor5/src/ui';import _0x4f0db8 from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x435e19}from'lodash-es';export default class ot extends _0x131612{constructor(_0x248eb3){super();const _0x3e5abf=new _0x4f0db8(),_0x3b1590=new _0xe9cda7(this[_0x1c6b('0x2')],_0x3e5abf);this[_0x1c6b('0x3')][_0x1c6b('0x0')](_0x3b1590),_0x3b1590[_0x1c6b('0x4')]({'label':_0x248eb3['prompt'],'withText':!0x0}),_0x3b1590['on']('execute',()=>{this['fire'](_0x1c6b('0x1'),{'value':_0x435e19(_0x248eb3['prompt'])});});}}
23
+ const _0x48ae=['add','prompt','children','locale','execute'];(function(_0xcef024,_0x48ae01){const _0x26d30c=function(_0x55b6f9){while(--_0x55b6f9){_0xcef024['push'](_0xcef024['shift']());}};_0x26d30c(++_0x48ae01);}(_0x48ae,0x9a));const _0x26d3=function(_0xcef024,_0x48ae01){_0xcef024=_0xcef024-0x0;let _0x26d30c=_0x48ae[_0xcef024];return _0x26d30c;};import{ListItemView as _0x1228a0,ButtonView as _0x2242f6}from'ckeditor5/src/ui';import _0x1abed4 from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x2d33ca}from'lodash-es';export default class ot extends _0x1228a0{constructor(_0x315ac6){super();const _0x136878=new _0x1abed4(),_0x24120c=new _0x2242f6(this[_0x26d3('0x4')],_0x136878);this[_0x26d3('0x3')][_0x26d3('0x1')](_0x24120c),_0x24120c['set']({'label':_0x315ac6[_0x26d3('0x2')],'withText':!0x0}),_0x24120c['on'](_0x26d3('0x0'),()=>{this['fire'](_0x26d3('0x0'),{'value':_0x2d33ca(_0x315ac6['prompt'])});});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3777=['Prompt\x20history','fire','historyGroupView','clearHistoryButton','delegate','add','length','label','children','locale','filter','items','Clear','execute','_createClearHistoryButton'];(function(_0x473f7e,_0x3777f7){const _0x330c4f=function(_0x1a9246){while(--_0x1a9246){_0x473f7e['push'](_0x473f7e['shift']());}};_0x330c4f(++_0x3777f7);}(_0x3777,0x18f));const _0x330c=function(_0x473f7e,_0x3777f7){_0x473f7e=_0x473f7e-0x0;let _0x330c4f=_0x3777[_0x473f7e];return _0x330c4f;};import{ListView as _0x218552,ListItemGroupView as _0x8ec090,ButtonView as _0xb4c51}from'ckeditor5/src/ui';import{getTranslation as _0xb02bd}from'../../utils/common-translations';export default class ht extends _0x218552{constructor(_0x12cc8a){super(_0x12cc8a),this[_0x330c('0x9')]=this[_0x330c('0x5')](),this['historyGroupView']=new _0x8ec090(),this[_0x330c('0x8')][_0x330c('0xe')][_0x330c('0xb')](this[_0x330c('0x9')],0x1),this['historyGroupView'][_0x330c('0xd')]=_0xb02bd(_0x12cc8a,_0x330c('0x6')),this[_0x330c('0x8')][_0x330c('0x2')][_0x330c('0xa')](_0x330c('0x4'))['to'](this),this[_0x330c('0x2')]['add'](this[_0x330c('0x8')]);}[_0x330c('0x1')](){let _0x3f16e0=0x0;for(const _0x2b033c of this[_0x330c('0x2')])_0x3f16e0+=_0x2b033c[_0x330c('0x2')][_0x330c('0xc')];return{'resultsCount':_0x3f16e0,'totalItemsCount':_0x3f16e0};}[_0x330c('0x5')](){const _0x27b08e=this[_0x330c('0x0')],_0x153c7e=new _0xb4c51(this[_0x330c('0x0')]);return _0x153c7e['set']({'label':'('+_0xb02bd(_0x27b08e,_0x330c('0x3'))+')','withText':!0x0}),_0x153c7e['on'](_0x330c('0x4'),()=>this[_0x330c('0x7')]('clearHistory')),_0x153c7e;}}
23
+ const _0x500d=['clearHistory','locale','execute','filter','children','fire','historyGroupView','items','Prompt\x20history','clearHistoryButton','_createClearHistoryButton','add'];(function(_0x350bb2,_0x500d98){const _0x46054e=function(_0x2f3dcc){while(--_0x2f3dcc){_0x350bb2['push'](_0x350bb2['shift']());}};_0x46054e(++_0x500d98);}(_0x500d,0x143));const _0x4605=function(_0x350bb2,_0x500d98){_0x350bb2=_0x350bb2-0x0;let _0x46054e=_0x500d[_0x350bb2];return _0x46054e;};import{ListView as _0x57220c,ListItemGroupView as _0x375d1c,ButtonView as _0x348fbc}from'ckeditor5/src/ui';import{getTranslation as _0x2b3ee7}from'../../utils/common-translations';export default class ht extends _0x57220c{constructor(_0x40b385){super(_0x40b385),this['clearHistoryButton']=this[_0x4605('0xb')](),this['historyGroupView']=new _0x375d1c(),this[_0x4605('0x7')][_0x4605('0x5')][_0x4605('0x0')](this[_0x4605('0xa')],0x1),this['historyGroupView']['label']=_0x2b3ee7(_0x40b385,_0x4605('0x9')),this[_0x4605('0x7')][_0x4605('0x8')]['delegate'](_0x4605('0x3'))['to'](this),this['items'][_0x4605('0x0')](this[_0x4605('0x7')]);}[_0x4605('0x4')](){let _0x9c1626=0x0;for(const _0x1d68ea of this[_0x4605('0x8')])_0x9c1626+=_0x1d68ea[_0x4605('0x8')]['length'];return{'resultsCount':_0x9c1626,'totalItemsCount':_0x9c1626};}['_createClearHistoryButton'](){const _0x46c287=this[_0x4605('0x2')],_0x3a2160=new _0x348fbc(this[_0x4605('0x2')]);return _0x3a2160['set']({'label':'('+_0x2b3ee7(_0x46c287,'Clear')+')','withText':!0x0}),_0x3a2160['on'](_0x4605('0x3'),()=>this[_0x4605('0x6')](_0x4605('0x1'))),_0x3a2160;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5b20=['parse','last','length','stringify','setItem','map','addMany','remove','_saveToSessionStorage','CKEditor/AIFormView/PromptHistory','getItem','prompt'];(function(_0x39a41c,_0x5b206b){const _0x5169e5=function(_0x243b27){while(--_0x243b27){_0x39a41c['push'](_0x39a41c['shift']());}};_0x5169e5(++_0x5b206b);}(_0x5b20,0x156));const _0x5169=function(_0x39a41c,_0x5b206b){_0x39a41c=_0x39a41c-0x0;let _0x5169e5=_0x5b20[_0x39a41c];return _0x5169e5;};import{Collection as _0x40a828}from'ckeditor5/src/utils';const ts=_0x5169('0x3');export default class nt extends _0x40a828{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x2fc197,_0x2cf878)=>{const _0xd2496b=os(_0x2cf878[_0x5169('0x5')]);for(const _0x599ea4 of this)if(_0x599ea4!=_0x2cf878&&os(_0x599ea4[_0x5169('0x5')])===_0xd2496b){this['remove'](_0x599ea4);break;}this[_0x5169('0x8')]>0x14&&this[_0x5169('0x1')](this[_0x5169('0x7')]),this[_0x5169('0x2')]();}),this['on'](_0x5169('0x1'),()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x117d37=sessionStorage[_0x5169('0x4')](ts)||'[]';this[_0x5169('0x0')](JSON[_0x5169('0x6')](_0x117d37));}['_saveToSessionStorage'](){sessionStorage[_0x5169('0xa')](ts,JSON[_0x5169('0x9')](this[_0x5169('0xb')](_0x58f346=>_0x58f346)));}}function os(_0x4579db){return _0x4579db['toLowerCase']()['trim']();}
23
+ const _0x11e7=['stringify','toLowerCase','setItem','map','prompt','CKEditor/AIFormView/PromptHistory','remove','last','parse','_saveToSessionStorage','addMany','trim','length'];(function(_0x3ff873,_0x11e7b2){const _0x90e7c5=function(_0x109853){while(--_0x109853){_0x3ff873['push'](_0x3ff873['shift']());}};_0x90e7c5(++_0x11e7b2);}(_0x11e7,0x170));const _0x90e7=function(_0x3ff873,_0x11e7b2){_0x3ff873=_0x3ff873-0x0;let _0x90e7c5=_0x11e7[_0x3ff873];return _0x90e7c5;};import{Collection as _0x3e281b}from'ckeditor5/src/utils';const ts=_0x90e7('0x1');export default class nt extends _0x3e281b{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x41a03f,_0x440a21)=>{const _0x255eba=os(_0x440a21[_0x90e7('0x0')]);for(const _0x19c5e3 of this)if(_0x19c5e3!=_0x440a21&&os(_0x19c5e3[_0x90e7('0x0')])===_0x255eba){this[_0x90e7('0x2')](_0x19c5e3);break;}this[_0x90e7('0x8')]>0x14&&this[_0x90e7('0x2')](this[_0x90e7('0x3')]),this[_0x90e7('0x5')]();}),this['on'](_0x90e7('0x2'),()=>{this[_0x90e7('0x5')]();});}['_loadFromSessionStorage'](){const _0x54321f=sessionStorage['getItem'](ts)||'[]';this[_0x90e7('0x6')](JSON[_0x90e7('0x4')](_0x54321f));}[_0x90e7('0x5')](){sessionStorage[_0x90e7('0xb')](ts,JSON[_0x90e7('0x9')](this[_0x90e7('0xc')](_0x286000=>_0x286000)));}}function os(_0xbeee2c){return _0xbeee2c[_0x90e7('0xa')]()[_0x90e7('0x7')]();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3b93=['execute','name','editor','showUI','model','selection','isEnabled','refresh','aiAssistant.disabledElements','getRanges','get','element','config'];(function(_0xeeb7b8,_0x3b93ca){const _0x3f9b33=function(_0x4b125e){while(--_0x4b125e){_0xeeb7b8['push'](_0xeeb7b8['shift']());}};_0x3f9b33(++_0x3b93ca);}(_0x3b93,0xa2));const _0x3f9b=function(_0xeeb7b8,_0x3b93ca){_0xeeb7b8=_0xeeb7b8-0x0;let _0x3f9b33=_0x3b93[_0xeeb7b8];return _0x3f9b33;};import{Command as _0x213e67}from'ckeditor5/src/core';import _0x110357 from'../aiassistantui';export default class I extends _0x213e67{[_0x3f9b('0x1')](){const _0x27bd8d=this[_0x3f9b('0x9')][_0x3f9b('0xb')]['document'][_0x3f9b('0xc')],_0x3f1d01=this[_0x3f9b('0x9')][_0x3f9b('0x6')][_0x3f9b('0x4')](_0x3f9b('0x2'));for(const _0x594941 of _0x27bd8d[_0x3f9b('0x3')]())for(const _0x30b026 of _0x594941['getItems']())if(_0x30b026['is'](_0x3f9b('0x5'))&&_0x3f1d01['includes'](_0x30b026[_0x3f9b('0x8')]))return void(this['isEnabled']=!0x1);this[_0x3f9b('0x0')]=!0x0;}[_0x3f9b('0x7')](_0x4740cd='',_0xa968fd=''){this[_0x3f9b('0x9')]['plugins'][_0x3f9b('0x4')](_0x110357)[_0x3f9b('0xa')](_0x4740cd,_0xa968fd);}}
23
+ const _0x50fd=['getRanges','selection','includes','get','document','element','showUI','config','editor','name','execute'];(function(_0x498b08,_0x50fd4c){const _0x2a685a=function(_0x5a517e){while(--_0x5a517e){_0x498b08['push'](_0x498b08['shift']());}};_0x2a685a(++_0x50fd4c);}(_0x50fd,0x199));const _0x2a68=function(_0x498b08,_0x50fd4c){_0x498b08=_0x498b08-0x0;let _0x2a685a=_0x50fd[_0x498b08];return _0x2a685a;};import{Command as _0x351d30}from'ckeditor5/src/core';import _0x107b1e from'../aiassistantui';export default class I extends _0x351d30{['refresh'](){const _0x3e3a95=this[_0x2a68('0x6')]['model'][_0x2a68('0x2')][_0x2a68('0xa')],_0x243ab2=this[_0x2a68('0x6')][_0x2a68('0x5')]['get']('aiAssistant.disabledElements');for(const _0x4facf2 of _0x3e3a95[_0x2a68('0x9')]())for(const _0x1b36e0 of _0x4facf2['getItems']())if(_0x1b36e0['is'](_0x2a68('0x3'))&&_0x243ab2[_0x2a68('0x0')](_0x1b36e0[_0x2a68('0x7')]))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}[_0x2a68('0x8')](_0x11130a='',_0x21635f=''){this[_0x2a68('0x6')]['plugins'][_0x2a68('0x1')](_0x107b1e)[_0x2a68('0x4')](_0x11130a,_0x21635f);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x5103ba,_0x2190df,_0xf62ceb){const t=_0x5103ba['t'];switch(_0x2190df){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',_0xf62ceb);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_AUTH_REQUEST':return t({'id':'AI_ERROR_AUTH_REQUEST','string':'Authorization\x20request\x20failed'});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 _0x2190df;}}
23
+ export function getTranslation(_0x3865ad,_0x5ae8d9,_0x39cfb6){const t=_0x3865ad['t'];switch(_0x5ae8d9){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',_0x39cfb6);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_AUTH_REQUEST':return t({'id':'AI_ERROR_AUTH_REQUEST','string':'Authorization\x20request\x20failed'});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 _0x5ae8d9;}}