@ckeditor/ckeditor5-ai 41.1.0 → 41.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +6 -6
- package/build/translations/pt.js +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/pt.po +4 -4
- package/package.json +4 -4
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.d.ts +5 -0
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.d.ts +2 -1
- package/src/aiassistantui.js +1 -1
- package/src/augmentation.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/ui/aiassistantcontroller.d.ts +1 -1
- package/src/ui/aiassistantcontroller.js +1 -1
- package/src/ui/dropdown/aicommandslistview.d.ts +11 -0
- package/src/ui/dropdown/aicommandslistview.js +1 -1
- package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
- package/src/ui/dropdown/labelwithhighlightview.js +1 -1
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.d.ts +12 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/theme/ai.css +4 -0
package/build/translations/pt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){const o=e.pt=e.pt||{};o.dictionary=Object.assign(o.dictionary||{},{"AI Assistant":"Assistente de IA","AI Commands":"Comandos de IA","AI is writing...":"A IA está a escrever...",AI_ERROR_CONTEXT_LENGTH:"O conteúdo selecionado é muito longo",AI_ERROR_FAILED:"Falha ao comunicar com o serviço de IA",AI_ERROR_GET_HEADERS:"
|
|
1
|
+
!function(e){const o=e.pt=e.pt||{};o.dictionary=Object.assign(o.dictionary||{},{"AI Assistant":"Assistente de IA","AI Commands":"Comandos de IA","AI is writing...":"A IA está a escrever...",AI_ERROR_CONTEXT_LENGTH:"O conteúdo selecionado é muito longo",AI_ERROR_FAILED:"Falha ao comunicar com o serviço de IA",AI_ERROR_GET_HEADERS:"Falha ao preparar cabeçalhos de pedidos",AI_ERROR_GET_PARAMETERS:"Falha ao preparar parâmetros de pedidos",AI_ERROR_MODERATION:"O pedido solicitado não cumpre as regras de moderação",AI_ERROR_UNSUPPORTED_MODEL:'O modelo de IA pedido ("%0") não é suportado',AI_INSERT_CONTENT:"Inserir",AI_REPLACE_CONTENT:"Substituir",Arabic:"Árabe","Ask AI and your prompts will be listed here for you to use later.":"Faça um pedido à IA e as suas instruções serão listadas aqui para poder usá-las posteriormente.","Ask AI to edit or generate":"Pedir à IA para editar ou gerar","Ask AI to improve generated text":"Pedir à IA para melhorar o texto gerado",Business:"Empresarial",Casual:"Informal","Change style":"Alterar estilo","Change tone":"Alterar tom",Confident:"Confiante",Continue:"Continuar",Copy:"Copiar",Direct:"Direto","Edit or review":"Editar ou rever","Empty history":"Histórico vazio",English:"Inglês",French:"Francês",Friendly:"Cordial","Generate from selection":"Gerar a partir da seleção",German:"Alemão",Hindi:"Hindi",History:"Histórico","Improve writing":"Melhorar a escrita","Insert below":"Inserir abaixo",Journalism:"Jornalístico",Legal:"Jurídico","Make longer":"Tornar mais extenso","Make shorter":"Tornar mais curto","No commands available":"Nenhum comando disponível","No commands found":"Nenhum comando encontrado",Poetic:"Poético",Portuguese:"Português",Professional:"Profissional","Prompt history":"Histórico de instruções","Search AI command":"Comando de pesquisa IA","Simplified Chinese":"Chinês Simplificado","Simplify language":"Simplificar a linguagem",Spanish:"Espanhol",Stop:"Parar",Submit:"Submeter",Summarize:"Resumir",Translate:"Traduzir","Translate to %0":"Traduzir para %0","Try again":"Tentar de novo"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/lang/translations/he.po
CHANGED
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: Hebrew (https://app.transifex.com/ckeditor/teams/11143/he/)\n"
|
|
16
16
|
"Language: he\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;\n"
|
|
18
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
19
|
|
|
20
20
|
msgctxt "AI command group label for editing and reviewing."
|
package/lang/translations/pt.po
CHANGED
|
@@ -143,11 +143,11 @@ msgstr "Comandos de IA"
|
|
|
143
143
|
|
|
144
144
|
msgctxt "The placeholder for the prompt input to obtain new content."
|
|
145
145
|
msgid "Ask AI to edit or generate"
|
|
146
|
-
msgstr "
|
|
146
|
+
msgstr "Pedir à IA para editar ou gerar"
|
|
147
147
|
|
|
148
148
|
msgctxt "The placeholder for the prompt input to improve the generated content."
|
|
149
149
|
msgid "Ask AI to improve generated text"
|
|
150
|
-
msgstr "
|
|
150
|
+
msgstr "Pedir à IA para melhorar o texto gerado"
|
|
151
151
|
|
|
152
152
|
msgctxt "The label for the button that copies the text from the textarea."
|
|
153
153
|
msgid "Copy"
|
|
@@ -191,7 +191,7 @@ msgstr "Histórico de instruções"
|
|
|
191
191
|
|
|
192
192
|
msgctxt "The placeholder for the search input to filter the AI commands."
|
|
193
193
|
msgid "Search AI command"
|
|
194
|
-
msgstr "
|
|
194
|
+
msgstr "Comando de pesquisa IA"
|
|
195
195
|
|
|
196
196
|
msgctxt "The message displayed when the commands search input does not match any AI commands."
|
|
197
197
|
msgid "No commands found"
|
|
@@ -211,7 +211,7 @@ msgstr "Inserir"
|
|
|
211
211
|
|
|
212
212
|
msgctxt "Error message displayed when preparing request headers fails."
|
|
213
213
|
msgid "AI_ERROR_GET_HEADERS"
|
|
214
|
-
msgstr "
|
|
214
|
+
msgstr "Falha ao preparar cabeçalhos de pedidos"
|
|
215
215
|
|
|
216
216
|
msgctxt "Error message displayed when preparing request parameters fails."
|
|
217
217
|
msgid "AI_ERROR_GET_PARAMETERS"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-ai",
|
|
3
|
-
"version": "41.1
|
|
3
|
+
"version": "41.2.1",
|
|
4
4
|
"description": "AI Assistant feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"ckeditor5": "41.1
|
|
27
|
-
"ckeditor5-collaboration": "41.1
|
|
26
|
+
"ckeditor5": "41.2.1",
|
|
27
|
+
"ckeditor5-collaboration": "41.2.1",
|
|
28
28
|
"@aws-sdk/client-bedrock-runtime": "3.470.0",
|
|
29
|
-
"@ckeditor/ckeditor5-ui": "41.1
|
|
29
|
+
"@ckeditor/ckeditor5-ui": "41.2.1",
|
|
30
30
|
"lodash-es": "4.17.21"
|
|
31
31
|
},
|
|
32
32
|
"type": "module",
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x171553=_0x34bc;function _0x4de5(){var _0x2f69da=['afterInit','289656hsHXaw','AIAdapter','2037680RLXXRQ','9161744qATBFI','14LPAdvX','1177GfCJDO','27WkoMIn','aiadapter-text-adapter-not-set','pluginName','1014531DuujiK','2274755OSJsWs','6zoVHkL','2074616ijfXjA','9362OTALzc','AIRequestError','name','textAdapter','7OrDjgg'];_0x4de5=function(){return _0x2f69da;};return _0x4de5();}(function(_0x339b59,_0x181746){var _0xb9c04=_0x34bc,_0x4cc8ad=_0x339b59();while(!![]){try{var _0x2ea36c=-parseInt(_0xb9c04(0x151))/0x1*(-parseInt(_0xb9c04(0x147))/0x2)+-parseInt(_0xb9c04(0x143))/0x3+parseInt(_0xb9c04(0x146))/0x4+parseInt(_0xb9c04(0x144))/0x5*(-parseInt(_0xb9c04(0x145))/0x6)+parseInt(_0xb9c04(0x14b))/0x7*(-parseInt(_0xb9c04(0x150))/0x8)+parseInt(_0xb9c04(0x140))/0x9*(-parseInt(_0xb9c04(0x14f))/0xa)+-parseInt(_0xb9c04(0x152))/0xb*(-parseInt(_0xb9c04(0x14d))/0xc);if(_0x2ea36c===_0x181746)break;else _0x4cc8ad['push'](_0x4cc8ad['shift']());}catch(_0x32bbc5){_0x4cc8ad['push'](_0x4cc8ad['shift']());}}}(_0x4de5,0x96b58));import{Plugin as _0xbe08b4}from'ckeditor5/src/core.js';import{CKEditorError as _0x5a65b1}from'ckeditor5/src/utils.js';export default class g extends _0xbe08b4{static get[_0x171553(0x142)](){var _0x18635a=_0x171553;return _0x18635a(0x14e);}[_0x171553(0x14c)](){var _0x5f0072=_0x171553;if(!this[_0x5f0072(0x14a)])throw new _0x5a65b1(_0x5f0072(0x141),null);}}function _0x34bc(_0x497e4c,_0x561061){var _0x4de532=_0x4de5();return _0x34bc=function(_0x34bc9b,_0x1eb135){_0x34bc9b=_0x34bc9b-0x140;var _0xf44fdc=_0x4de532[_0x34bc9b];return _0xf44fdc;},_0x34bc(_0x497e4c,_0x561061);}export class AIRequestError extends Error{constructor(_0x550e2b){var _0xeaa56=_0x171553;super(_0x550e2b),this[_0xeaa56(0x149)]=_0xeaa56(0x148);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x33eeb9=_0x4b54;(function(_0x31e5ac,_0xbfb411){const _0x35ffac=_0x4b54,_0x3ddcd0=_0x31e5ac();while(!![]){try{const _0x518def=parseInt(_0x35ffac(0x143))/0x1*(-parseInt(_0x35ffac(0x146))/0x2)+parseInt(_0x35ffac(0x156))/0x3*(-parseInt(_0x35ffac(0x158))/0x4)+-parseInt(_0x35ffac(0x154))/0x5+parseInt(_0x35ffac(0x144))/0x6+-parseInt(_0x35ffac(0x148))/0x7*(parseInt(_0x35ffac(0x14c))/0x8)+parseInt(_0x35ffac(0x15e))/0x9+parseInt(_0x35ffac(0x149))/0xa;if(_0x518def===_0xbfb411)break;else _0x3ddcd0['push'](_0x3ddcd0['shift']());}catch(_0x2c90c6){_0x3ddcd0['push'](_0x3ddcd0['shift']());}}}(_0x5481,0x94b47));function _0x4b54(_0x4cf6a3,_0x47b99c){const _0x5481c5=_0x5481();return _0x4b54=function(_0x4b5455,_0x51a353){_0x4b5455=_0x4b5455-0x141;let _0x2bd668=_0x5481c5[_0x4b5455];return _0x2bd668;},_0x4b54(_0x4cf6a3,_0x47b99c);}import{Plugin as _0x451cbe}from'ckeditor5/src/core.js';import{CKEditorError as _0x1e2a30}from'ckeditor5/src/utils.js';import{default as _0x2357a9,AIRequestError as _0x4343c4}from'./aiadapter.js';import{getTranslation as _0x5bb357}from'../utils/common-translations.js';function _0x5481(){const _0x328db1=['_prepareRequestHeaders','assign','error','reject','locale','1329950yxqlxU','sendRequest','132iVFurB','object','75604uUTWvK','get','textAdapter','plugins','editor','requires','913383JibODK','aborted','_prepareRequestParameters','AI_ERROR_GET_PARAMETERS','makeRequest','abortController','abort','AbortError','signal','catch','388253gEWKOf','4926660jdSbqb','application/json','6PPIuEg','name','921235hNIsVy','23437060cFjooD','init','AI_ERROR_GET_HEADERS','24VkTSRB','resolve','aitextadapter-send-request-failed'];_0x5481=function(){return _0x328db1;};return _0x5481();}export default class _ extends _0x451cbe{static get[_0x33eeb9(0x15d)](){return[_0x2357a9];}constructor(_0x32eaa7){const _0x2b3445=_0x33eeb9;super(_0x32eaa7),this[_0x2b3445(0x163)]=new AbortController();}[_0x33eeb9(0x14a)](){const _0x12c05c=_0x33eeb9;this[_0x12c05c(0x15c)][_0x12c05c(0x15b)][_0x12c05c(0x159)](_0x2357a9)[_0x12c05c(0x15a)]=this;}[_0x33eeb9(0x164)](){const _0xe95995=_0x33eeb9;this[_0xe95995(0x163)][_0xe95995(0x141)][_0xe95995(0x15f)]||(this[_0xe95995(0x163)][_0xe95995(0x164)](),this[_0xe95995(0x163)]=new AbortController());}async[_0x33eeb9(0x162)](_0x55c2e5){const _0x112b2b=_0x33eeb9;return this[_0x112b2b(0x155)](_0x55c2e5)[_0x112b2b(0x142)](_0x35d164=>{const _0x12fa01=_0x112b2b;if(_0x35d164 instanceof _0x4343c4)return Promise[_0x12fa01(0x152)](_0x35d164);if(_0x12fa01(0x165)==_0x35d164[_0x12fa01(0x147)])return Promise[_0x12fa01(0x14d)]();throw console[_0x12fa01(0x151)](_0x35d164),new _0x1e2a30(_0x12fa01(0x14e),null);});}async[_0x33eeb9(0x14f)](_0x61c1a0,_0x261cbe){const _0x47f731=_0x33eeb9,_0x12251f=this[_0x47f731(0x15c)][_0x47f731(0x153)],_0x76aa4={'Content-Type':_0x47f731(0x145)};if(_0x47f731(0x157)==typeof _0x61c1a0)Object[_0x47f731(0x150)](_0x76aa4,_0x61c1a0);else{if(_0x61c1a0)try{const _0x23ce83=await _0x61c1a0(_0x261cbe);Object[_0x47f731(0x150)](_0x76aa4,_0x23ce83);}catch(_0x199dab){return Promise[_0x47f731(0x152)](new _0x4343c4(_0x5bb357(_0x12251f,_0x47f731(0x14b))));}}return _0x76aa4;}async[_0x33eeb9(0x160)](_0x33761f,_0x398913){const _0x3f8475=_0x33eeb9,_0x4c66e9=this[_0x3f8475(0x15c)][_0x3f8475(0x153)];if(_0x3f8475(0x157)==typeof _0x33761f)return _0x33761f;try{return await _0x33761f(_0x398913);}catch(_0xe8c26){return Promise[_0x3f8475(0x152)](new _0x4343c4(_0x5bb357(_0x4c66e9,_0x3f8475(0x161))));}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x78c46e=_0x1df3;function _0x1df3(_0x1f4e4a,_0xa70993){const _0x455ef0=_0x455e();return _0x1df3=function(_0x1df321,_0x3c968c){_0x1df321=_0x1df321-0x70;let _0x30c16b=_0x455ef0[_0x1df321];return _0x30c16b;},_0x1df3(_0x1f4e4a,_0xa70993);}(function(_0x222cc9,_0x1f522b){const _0x1b58a1=_0x1df3,_0x5bc8da=_0x222cc9();while(!![]){try{const _0x3d98bb=parseInt(_0x1b58a1(0xac))/0x1+-parseInt(_0x1b58a1(0x8c))/0x2+-parseInt(_0x1b58a1(0x7b))/0x3+parseInt(_0x1b58a1(0x88))/0x4*(-parseInt(_0x1b58a1(0x92))/0x5)+-parseInt(_0x1b58a1(0x87))/0x6+-parseInt(_0x1b58a1(0xba))/0x7+-parseInt(_0x1b58a1(0xb3))/0x8*(-parseInt(_0x1b58a1(0xc1))/0x9);if(_0x3d98bb===_0x1f522b)break;else _0x5bc8da['push'](_0x5bc8da['shift']());}catch(_0x2b1947){_0x5bc8da['push'](_0x5bc8da['shift']());}}}(_0x455e,0x6090c));import{default as _0x41b1f6}from'./aitextadapter.js';function _0x455e(){const _0x4e12e8=['_apiUrl','generations','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','ai.aws.apiUrl','\x0a\x0aAssistant:','decode','sendRequest','anthropic.claude-v2','getModelFamily','json','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.','726178JcQBoq','_readAsyncIterableResponse','stringify','_getGeneratedText','_requestHeaders','filter','AI_ERROR_UNSUPPORTED_MODEL','3884872mvNiyj','cohere.command','join','length','generation','bytes','POST','5103336UuEAqO','map','abortController','ai.aws.bedrockClientConfig','split','ai.aws.requestParameters','resolve','18SwRXxX','_readStreamableResponse','utf-8','meta.llama','define','preparePrompt','completion','_processProxyRequest','body','AWSTextAdapter','send','config','656643zEzhTe','\x0a[/INST]','ai.aws.requestHeaders','_readStaticResponse','_prepareRequestParameters','toString','Human:\x0a','anthropic.claude','data','<<SYS>>\x0a','read','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.','1034568tXtQFI','284tSgqUP','getReader','get','\x0a<</SYS>>\x0a[INST]\x0a','259212liQxCl','utf8','chunk','from','ai21.j2','parse','3655pRgnPZ','text','signal','_processAWSRequest','_prepareRequestHeaders','_requestParameters','editor','application/json','pluginName','locale','test','_bedrockClientConfig','completions','Instruction:\x0a','bedrock-2023-05-31'];_0x455e=function(){return _0x4e12e8;};return _0x455e();}import{AIRequestError as _0x1c5278}from'./aiadapter.js';import{BedrockRuntimeClient as _0x26825c,InvokeModelCommand as _0x2d6331,InvokeModelWithResponseStreamCommand as _0x42df5f}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x2a9e0f}from'../utils/common-translations.js';export default class q extends _0x41b1f6{static get[_0x78c46e(0x9a)](){const _0x442b02=_0x78c46e;return _0x442b02(0x78);}constructor(_0x48d7af){const _0x28a865=_0x78c46e;super(_0x48d7af),_0x48d7af[_0x28a865(0x7a)][_0x28a865(0x8a)](_0x28a865(0xbf))||_0x48d7af[_0x28a865(0x7a)][_0x28a865(0x73)](_0x28a865(0xbf),{'model':_0x28a865(0xa8),'max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':_0x28a865(0xa0),'stream':!0x0}),this[_0x28a865(0xa1)]=_0x48d7af[_0x28a865(0x7a)][_0x28a865(0x8a)](_0x28a865(0xa4)),this[_0x28a865(0x9d)]=_0x48d7af[_0x28a865(0x7a)][_0x28a865(0x8a)](_0x28a865(0xbd)),this[_0x28a865(0xb0)]=_0x48d7af[_0x28a865(0x7a)][_0x28a865(0x8a)](_0x28a865(0x7d)),this[_0x28a865(0x97)]=_0x48d7af[_0x28a865(0x7a)][_0x28a865(0x8a)](_0x28a865(0xbf));}async[_0x78c46e(0xa7)]({query:_0x52dd02,context:_0xb5535f,onData:_0x282b8c,actionId:_0x1cdfb8}){const _0x5120e4=_0x78c46e,{model:_0x45f67d,stream:_0x2f1017,..._0x114d27}=await this[_0x5120e4(0x7f)](this[_0x5120e4(0x97)],_0x1cdfb8),_0x2449b4={'prompt':await this[_0x5120e4(0x74)](_0x52dd02,_0xb5535f,_0x45f67d,_0x1cdfb8),..._0x114d27};this[_0x5120e4(0xa1)]?await this[_0x5120e4(0x76)](_0x2449b4,_0x45f67d,_0x2f1017,_0x282b8c,_0x1cdfb8):await this[_0x5120e4(0x95)](_0x2449b4,_0x45f67d,_0x2f1017,_0x282b8c);}async[_0x78c46e(0x74)](_0x5fa56b,_0x41e4e6,_0x5e7275,_0x341242){const _0x4216f7=_0x78c46e;let _0x20aae6,_0x1f3878;return _0x41e4e6?(_0x20aae6=_0x4216f7(0x86),_0x1f3878=_0x4216f7(0x9f)+_0x5fa56b+_0x4216f7(0xa3)+_0x41e4e6):(_0x20aae6=_0x4216f7(0xab),_0x1f3878=_0x5fa56b),_0x4216f7(0x72)==this[_0x4216f7(0xa9)](_0x5e7275)?_0x4216f7(0x84)+_0x20aae6+_0x4216f7(0x8b)+_0x1f3878+_0x4216f7(0x7c):_0x4216f7(0x81)+_0x20aae6+'\x0a'+_0x1f3878+_0x4216f7(0xa5);}[_0x78c46e(0xa9)](_0x1dc07f){const _0x29d369=_0x78c46e;if(/^anthropic\.claude/[_0x29d369(0x9c)](_0x1dc07f))return _0x29d369(0x82);if(/^ai21\.j2/[_0x29d369(0x9c)](_0x1dc07f))return _0x29d369(0x90);if(/^cohere\.command/[_0x29d369(0x9c)](_0x1dc07f))return _0x29d369(0xb4);if(/^meta\.llama/[_0x29d369(0x9c)](_0x1dc07f))return _0x29d369(0x72);throw new _0x1c5278(_0x2a9e0f(this[_0x29d369(0x98)][_0x29d369(0x9b)],_0x29d369(0xb2),_0x1dc07f));}async[_0x78c46e(0x76)](_0x723976,_0x3b2976,_0x50e654,_0xe1463c,_0x36524d){const _0x10396b=_0x78c46e,_0x548cd9={'method':_0x10396b(0xb9),'headers':await this[_0x10396b(0x96)](this[_0x10396b(0xb0)],_0x36524d),'body':JSON[_0x10396b(0xae)]({..._0x723976,'model':_0x3b2976,'stream':_0x50e654}),'signal':this[_0x10396b(0xbc)][_0x10396b(0x94)]},_0x5ae3ac=await fetch(this[_0x10396b(0xa1)],_0x548cd9);_0x50e654?await this[_0x10396b(0x70)](_0x5ae3ac,_0x3b2976,_0xe1463c):await this[_0x10396b(0x7e)](_0x5ae3ac,_0x3b2976,_0xe1463c);}async[_0x78c46e(0x95)](_0x73e3b4,_0x5d940b,_0x3f16aa,_0x4b7fb3){const _0xe8c910=_0x78c46e,_0x185125=new _0x26825c(this[_0xe8c910(0x9d)]),_0x2ddebc={'body':JSON[_0xe8c910(0xae)](_0x73e3b4),'contentType':_0xe8c910(0x99),'accept':_0xe8c910(0x99),'modelId':_0x5d940b};let _0x260657;if(_0x3f16aa){const _0x1b2072=new _0x42df5f(_0x2ddebc);_0x260657=await _0x185125[_0xe8c910(0x79)](_0x1b2072,{'abortSignal':this[_0xe8c910(0xbc)][_0xe8c910(0x94)]}),await this[_0xe8c910(0xad)](_0x260657,_0x5d940b,_0x4b7fb3);}else{const _0x1ae866=new _0x2d6331(_0x2ddebc);_0x260657=await _0x185125[_0xe8c910(0x79)](_0x1ae866,{'abortSignal':this[_0xe8c910(0xbc)][_0xe8c910(0x94)]}),await this[_0xe8c910(0x7e)](_0x260657,_0x5d940b,_0x4b7fb3);}}async[_0x78c46e(0xad)](_0x5beae7,_0x3ea704,_0x5d38b3){const _0x400051=_0x78c46e,_0x185315=_0x5beae7[_0x400051(0x77)],_0x5d0b39=new TextDecoder(_0x400051(0x71));let _0x27633a='';for await(const _0x375429 of _0x185315)if(_0x375429[_0x400051(0x8e)]){const _0x91253a=_0x5d0b39[_0x400051(0xa6)](_0x375429[_0x400051(0x8e)][_0x400051(0xb8)]),_0x3bb7b1=JSON[_0x400051(0x91)](_0x91253a);_0x27633a+=this[_0x400051(0xaf)](_0x3bb7b1,_0x3ea704),_0x5d38b3(_0x27633a);}return Promise[_0x400051(0xc0)]();}async[_0x78c46e(0x70)](_0x2aa5d9,_0x57b7ee,_0x210512){const _0x4cffbe=_0x78c46e,_0x483389=_0x2aa5d9[_0x4cffbe(0x77)],_0x5efe2d=new TextDecoder(_0x4cffbe(0x71)),_0x3affb8=_0x483389[_0x4cffbe(0x89)]();let _0x1d7c82='',_0x274823='',_0xa2672f=!0x1;for(;!_0xa2672f;){const {done:_0x12fdcf,value:_0x4068ae}=await _0x3affb8[_0x4cffbe(0x85)]();if(_0xa2672f=_0x12fdcf,_0xa2672f)break;const _0x58e4bb=(_0x1d7c82+_0x5efe2d[_0x4cffbe(0xa6)](_0x4068ae))[_0x4cffbe(0xbe)]('\x0a')[_0x4cffbe(0xbb)](_0x47ceaa=>{const _0x277865=_0x4cffbe;try{return _0x1d7c82='',JSON[_0x277865(0x91)](_0x47ceaa);}catch(_0x21d081){return _0x1d7c82=_0x47ceaa,null;}})[_0x4cffbe(0xb1)](_0x1dd104=>null!==_0x1dd104);_0x58e4bb[_0x4cffbe(0xb6)]&&(_0x274823+=_0x58e4bb[_0x4cffbe(0xbb)](_0x2e6fe8=>this[_0x4cffbe(0xaf)](_0x2e6fe8,_0x57b7ee))[_0x4cffbe(0xb5)](''),_0x210512(_0x274823));}return Promise[_0x4cffbe(0xc0)]();}async[_0x78c46e(0x7e)](_0x3e79a0,_0x2f43e1,_0x24c07d){const _0x3200f2=_0x78c46e;let _0x2efa91;return _0x2efa91=_0x3e79a0 instanceof Response?await _0x3e79a0[_0x3200f2(0xaa)]():JSON[_0x3200f2(0x91)](Buffer[_0x3200f2(0x8f)](_0x3e79a0[_0x3200f2(0x77)])[_0x3200f2(0x80)](_0x3200f2(0x8d))),(_0x24c07d(this[_0x3200f2(0xaf)](_0x2efa91,_0x2f43e1)),Promise[_0x3200f2(0xc0)]());}[_0x78c46e(0xaf)](_0x445c93,_0x564382){const _0xc47f5e=_0x78c46e;switch(this[_0xc47f5e(0xa9)](_0x564382)){case _0xc47f5e(0x82):return _0x445c93[_0xc47f5e(0x75)];case _0xc47f5e(0x90):return _0x445c93[_0xc47f5e(0x9e)][0x0][_0xc47f5e(0x83)][_0xc47f5e(0x93)];case _0xc47f5e(0xb4):return _0x445c93[_0xc47f5e(0xa2)][0x0][_0xc47f5e(0x93)];case _0xc47f5e(0x72):return _0x445c93[_0xc47f5e(0xb7)];}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x42d87c=_0x271a;function _0x271a(_0x358833,_0x2e8533){const _0x5a8a46=_0x5a8a();return _0x271a=function(_0x271a51,_0x3be78d){_0x271a51=_0x271a51-0x187;let _0x2e3a79=_0x5a8a46[_0x271a51];return _0x2e3a79;},_0x271a(_0x358833,_0x2e8533);}(function(_0x2cb6ca,_0x5a57e1){const _0x5f2df2=_0x271a,_0x31945d=_0x2cb6ca();while(!![]){try{const _0x239f40=-parseInt(_0x5f2df2(0x19b))/0x1+parseInt(_0x5f2df2(0x1a8))/0x2+parseInt(_0x5f2df2(0x195))/0x3+-parseInt(_0x5f2df2(0x1c3))/0x4*(-parseInt(_0x5f2df2(0x1a2))/0x5)+parseInt(_0x5f2df2(0x1b0))/0x6+parseInt(_0x5f2df2(0x18c))/0x7*(-parseInt(_0x5f2df2(0x1be))/0x8)+-parseInt(_0x5f2df2(0x1ac))/0x9*(parseInt(_0x5f2df2(0x1c0))/0xa);if(_0x239f40===_0x5a57e1)break;else _0x31945d['push'](_0x31945d['shift']());}catch(_0x39c0e7){_0x31945d['push'](_0x31945d['shift']());}}}(_0x5a8a,0x6dd88));import{default as _0x32bd3e}from'./aitextadapter.js';import{AIRequestError as _0x541a82}from'./aiadapter.js';function _0x5a8a(){const _0x29c12a=['split','1222209YpRlUy','content','config','parse','join','json','286129kVayGc','read','body','AI_ERROR_MODERATION','length','editor','choices','635CsqMUE','context_length_exceeded','stringify','pluginName','[DONE]','prepareMessages','915004yjTIUE','ai.openAI.requestParameters','includes','stream','7685343fwzbQF','abortController','text','_isBufferIncomplete','3384264menyCC','_apiUrl','_prepareRequestParameters','locale','ai.openAI.requestHeaders','define','system','getReader','gpt-3.5-turbo','decode','reject','AI_ERROR_CONTEXT_LENGTH','get','_readStreamableResponse','8wIvkgI','replace','10ENUqgf','delta','_requestHeaders','18008MGFUum','_prepareRequestHeaders','signal','OpenAITextAdapter','_readStaticResponse','data:\x20','_requestParameters','map','Instruction:\x0a','ai.openAI.apiUrl','filter','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','https://api.openai.com/v1/chat/completions','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.','sendRequest','2875033KvHMLc','POST','message','_cleanUpData','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.','Moderation','resolve','user'];_0x5a8a=function(){return _0x29c12a;};return _0x5a8a();}import{getTranslation as _0x411af7}from'../utils/common-translations.js';export default class M extends _0x32bd3e{static get[_0x42d87c(0x1a5)](){const _0x52a335=_0x42d87c;return _0x52a335(0x1c6);}constructor(_0x3bbe75){const _0x1a9947=_0x42d87c;super(_0x3bbe75),_0x3bbe75[_0x1a9947(0x197)][_0x1a9947(0x1b5)](_0x1a9947(0x1cc),_0x1a9947(0x189)),_0x3bbe75[_0x1a9947(0x197)][_0x1a9947(0x1bc)](_0x1a9947(0x1a9))||_0x3bbe75[_0x1a9947(0x197)][_0x1a9947(0x1b5)](_0x1a9947(0x1a9),{'model':_0x1a9947(0x1b8),'max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this[_0x1a9947(0x1b1)]=_0x3bbe75[_0x1a9947(0x197)][_0x1a9947(0x1bc)](_0x1a9947(0x1cc)),this[_0x1a9947(0x1c2)]=_0x3bbe75[_0x1a9947(0x197)][_0x1a9947(0x1bc)](_0x1a9947(0x1b4))||{},this[_0x1a9947(0x1c9)]=_0x3bbe75[_0x1a9947(0x197)][_0x1a9947(0x1bc)](_0x1a9947(0x1a9));}async[_0x42d87c(0x18b)]({query:_0x5b67a8,context:_0x5e0ecd,onData:_0xff1f6d,actionId:_0x556238}){const _0x41c385=_0x42d87c,_0x3db117=this[_0x41c385(0x1a0)][_0x41c385(0x1b3)],_0x10bf8d=await this[_0x41c385(0x1a7)](_0x5b67a8,_0x5e0ecd,_0x556238),_0x1ebc2d=await this[_0x41c385(0x1c4)](this[_0x41c385(0x1c2)],_0x556238),_0x58292b=await this[_0x41c385(0x1b2)](this[_0x41c385(0x1c9)],_0x556238),_0x4a9141={'messages':_0x10bf8d,..._0x58292b},_0x15afbf={'method':_0x41c385(0x18d),'headers':_0x1ebc2d,'body':JSON[_0x41c385(0x1a4)](_0x4a9141),'signal':this[_0x41c385(0x1ad)][_0x41c385(0x1c5)]},_0x512d8d=await fetch(this[_0x41c385(0x1b1)],_0x15afbf);if(_0x512d8d['ok'])return _0x58292b[_0x41c385(0x1ab)]?await this[_0x41c385(0x1bd)](_0x512d8d,_0xff1f6d):await this[_0x41c385(0x1c7)](_0x512d8d,_0xff1f6d),Promise[_0x41c385(0x192)]();{const _0x5ef29e=await _0x512d8d[_0x41c385(0x1ae)]();return _0x5ef29e[_0x41c385(0x1aa)](_0x41c385(0x1a3))?Promise[_0x41c385(0x1ba)](new _0x541a82(_0x411af7(_0x3db117,_0x41c385(0x1bb)))):_0x5ef29e[_0x41c385(0x1aa)](_0x41c385(0x191))?Promise[_0x41c385(0x1ba)](new _0x541a82(_0x411af7(_0x3db117,_0x41c385(0x19e)))):Promise[_0x41c385(0x1ba)](new Error(_0x5ef29e));}}async[_0x42d87c(0x1a7)](_0x2d6563,_0x15942f,_0x46a0fa){const _0x13a7e4=_0x42d87c;let _0x5c5da3,_0x387e3a;return _0x15942f?(_0x5c5da3=_0x13a7e4(0x18a),_0x387e3a=_0x13a7e4(0x1cb)+_0x2d6563+_0x13a7e4(0x188)+_0x15942f):(_0x5c5da3=_0x13a7e4(0x190),_0x387e3a=_0x2d6563),[{'role':_0x13a7e4(0x1b6),'content':_0x5c5da3},{'role':_0x13a7e4(0x193),'content':_0x387e3a}];}async[_0x42d87c(0x1bd)](_0xa60121,_0x5d72b3){const _0x28537c=_0x42d87c,_0x407f00=_0xa60121[_0x28537c(0x19d)][_0x28537c(0x1b7)](),_0x554d9a=new TextDecoder();let _0x1a097c='',_0x5afeca='',_0x4b675a='',_0xa9089a=!0x1;for(;!_0xa9089a;){const {done:_0x28795a,value:_0x49e141}=await _0x407f00[_0x28537c(0x19c)](),_0x14d623=_0x1a097c+_0x554d9a[_0x28537c(0x1b9)](_0x49e141);let _0x8255af='';_0xa9089a=_0x28795a;try{_0x8255af=this[_0x28537c(0x18f)](_0x14d623),_0x1a097c='';}catch(_0x437caa){_0x1a097c=_0x14d623;continue;}_0x5afeca+=_0x8255af,!_0xa9089a&&this[_0x28537c(0x1af)](_0x5afeca)||_0x5afeca&&(_0x4b675a+=_0x5afeca,_0x5afeca='',_0x5d72b3(_0x4b675a));}return Promise[_0x28537c(0x192)]();}async[_0x42d87c(0x1c7)](_0x230286,_0x44ad7a){const _0x9fe426=_0x42d87c;return _0x44ad7a((await _0x230286[_0x9fe426(0x19a)]())[_0x9fe426(0x1a1)][0x0][_0x9fe426(0x18e)][_0x9fe426(0x196)]),Promise[_0x9fe426(0x192)]();}[_0x42d87c(0x1af)](_0x15ae35){const _0x1dc9db=_0x42d87c,_0x12c0c1=_0x15ae35[_0x1dc9db(0x194)]('<')[_0x1dc9db(0x19f)]!==_0x15ae35[_0x1dc9db(0x194)]('>')[_0x1dc9db(0x19f)],_0xe81d6c=_0x15ae35[_0x1dc9db(0x19f)]<0x1e;return _0x12c0c1&&_0xe81d6c;}[_0x42d87c(0x18f)](_0x52d450){const _0x486361=_0x42d87c;return _0x52d450[_0x486361(0x194)](/\n(?![^{]*\})/g)[_0x486361(0x1ca)](_0x32534b=>_0x32534b[_0x486361(0x1bf)](_0x486361(0x1c8),''))[_0x486361(0x187)](_0x3d5c73=>_0x3d5c73&&_0x3d5c73[_0x486361(0x19f)]>0x0&&_0x486361(0x1a6)!==_0x3d5c73)[_0x486361(0x1ca)](_0x18a78a=>{const _0x23683e=_0x486361,{choices:_0x494703}=JSON[_0x23683e(0x198)](_0x18a78a);if(_0x494703[0x0]&&_0x494703[0x0][_0x23683e(0x1c1)]&&_0x494703[0x0][_0x23683e(0x1c1)][_0x23683e(0x196)])return _0x494703[0x0][_0x23683e(0x1c1)][_0x23683e(0x196)];})[_0x486361(0x187)](_0x59d0a2=>_0x59d0a2)[_0x486361(0x199)]('');}}
|
package/src/aiassistant.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x453f=['translatePortuguese','Translate\x20to\x20%0','Casual','makeLonger','define','AIAssistant','German','locale','friendly','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','generate','Spanish','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','push','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','editor','init','legal','_licenseKeyCheckInterval','Direct','Generate\x20from\x20selection','translateArabic','translateGerman','Translate\x20the\x20content\x20to\x20French\x20language.','destroy','groupId','ai-invalid-license-key','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','French','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','Translate\x20the\x20content\x20to\x20Arabic\x20language.','pluginName','Arabic','Change\x20tone','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','ai.aiAssistant.removeCommands','casual','Poetic','makeShorter','translateChinese','changeTone','aiLicenseKeyTrial','simplifyLanguage','includes','Portuguese','editOrReview','ai.aiAssistant.commands','poetic','get','licenseKey','forEach','journalism','professional','Hindi','aiLicenseKeyInvalid','Improve\x20writing','Friendly','Business','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','Change\x20style','Legal','translateSpanish','Professional','ai-trial-license-key-reached-limit-changes','commands','Translate\x20the\x20content\x20to\x20German\x20language.','Translate\x20the\x20content\x20to\x20Hindi\x20language.','find','changeStyle','Make\x20shorter','Journalism','config','English','concat','translateFrench','Translate\x20the\x20content\x20to\x20English\x20language.','ai.aiAssistant.extraCommandGroups','info','set','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'];(function(_0x3d06f4,_0x453f57){const _0x7c465c=function(_0x2b06ed){while(--_0x2b06ed){_0x3d06f4['push'](_0x3d06f4['shift']());}};_0x7c465c(++_0x453f57);}(_0x453f,0x164));const _0x7c46=function(_0x3d06f4,_0x453f57){_0x3d06f4=_0x3d06f4-0x0;let _0x7c465c=_0x453f[_0x3d06f4];return _0x7c465c;};import{CKEditorError as _0x3f8275}from'ckeditor5/src/utils.js';import{Plugin as _0x27f973}from'ckeditor5/src/core.js';import _0x857330 from'./aiassistantui.js';import _0x5f228e from'./aiassistantediting.js';import{getTranslation as _0x2087c7}from'./utils/common-translations.js';export default class r extends _0x27f973{static get['requires'](){return[_0x857330,_0x5f228e];}static get[_0x7c46('0xd')](){return _0x7c46('0x45');}constructor(_0x4d4583){super(_0x4d4583);const _0x37e020=_0x4d4583[_0x7c46('0x36')];_0x37e020['define'](_0x7c46('0x1d'),getDefaultCommands(_0x4d4583[_0x7c46('0x47')])),_0x37e020[_0x7c46('0x44')](_0x7c46('0x3b'),[]),_0x37e020['define'](_0x7c46('0x12'),[]);const _0x1c57f1=_0x37e020['get'](_0x7c46('0x1d')),_0x4b5221=_0x37e020[_0x7c46('0x1f')](_0x7c46('0x3b')),_0x395d67=_0x37e020[_0x7c46('0x1f')](_0x7c46('0x12'));_0x4b5221[_0x7c46('0x21')](_0x45db38=>{const _0x1ea416=_0x1c57f1[_0x7c46('0x32')](_0xb295bc=>_0xb295bc[_0x7c46('0x7')]===_0x45db38['groupId']);_0x1ea416?_0x1ea416[_0x7c46('0x2f')]=_0x1ea416['commands'][_0x7c46('0x38')](_0x45db38['commands']):_0x1c57f1[_0x7c46('0x4d')](_0x45db38);}),_0x1c57f1[_0x7c46('0x21')](_0x1cd7e0=>{_0x1cd7e0[_0x7c46('0x2f')]=_0x1cd7e0[_0x7c46('0x2f')]['filter'](_0x5d52b4=>!_0x395d67[_0x7c46('0x1a')](_0x5d52b4['id']));}),_0x37e020[_0x7c46('0x3d')]('ai.aiAssistant.commands',_0x1c57f1);}[_0x7c46('0x52')](){const _0x194094=this[_0x7c46('0x51')];this[_0x7c46('0x20')]=_0x194094['config'][_0x7c46('0x1f')]('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x60b37f;for(const _0xacb410 in _0x194094){const _0x29935b=_0xacb410,_0x250b06=_0x194094[_0x29935b];if(_0x7c46('0x18')===_0x250b06||_0x7c46('0x25')===_0x250b06||'aiLicenseKeyValid'===_0x250b06||'aiLicenseKeyTrialLimit:operations'===_0x250b06){delete _0x194094[_0x29935b],_0x60b37f=_0x250b06;break;}}if(_0x7c46('0x25')===_0x60b37f)throw clearInterval(this[_0x7c46('0x0')]),new _0x3f8275(_0x7c46('0x8'),null);if('aiLicenseKeyTrial'===_0x60b37f&&console[_0x7c46('0x3c')]('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20ai\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'aiLicenseKeyTrialLimit:operations'===_0x60b37f)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3f8275(_0x7c46('0x2e'),null);'aiLicenseKeyValid'===_0x60b37f&&clearInterval(this[_0x7c46('0x0')]);},0x3e8);}[_0x7c46('0x6')](){this[_0x7c46('0x0')]&&clearInterval(this[_0x7c46('0x0')]);}}export function getDefaultCommands(_0x4cf557){return[{'groupId':_0x7c46('0x1c'),'groupLabel':_0x2087c7(_0x4cf557,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':_0x2087c7(_0x4cf557,_0x7c46('0x26')),'prompt':_0x7c46('0x50')},{'id':_0x7c46('0x15'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x34')),'prompt':_0x7c46('0x4e')},{'id':_0x7c46('0x43'),'label':_0x2087c7(_0x4cf557,'Make\x20longer'),'prompt':_0x7c46('0x49')},{'id':_0x7c46('0x19'),'label':_0x2087c7(_0x4cf557,'Simplify\x20language'),'prompt':_0x7c46('0x4f')}]},{'groupId':_0x7c46('0x4a'),'groupLabel':_0x2087c7(_0x4cf557,_0x7c46('0x2')),'commands':[{'id':'summarize','label':_0x2087c7(_0x4cf557,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':_0x2087c7(_0x4cf557,'Continue'),'prompt':_0x7c46('0x4c')}]},{'groupId':_0x7c46('0x17'),'groupLabel':_0x2087c7(_0x4cf557,_0x7c46('0xf')),'commands':[{'id':_0x7c46('0x23'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x2d')),'prompt':_0x7c46('0x9')},{'id':_0x7c46('0x13'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x42')),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':_0x2087c7(_0x4cf557,_0x7c46('0x1')),'prompt':_0x7c46('0x3e')},{'id':'confident','label':_0x2087c7(_0x4cf557,'Confident'),'prompt':_0x7c46('0x3f')},{'id':_0x7c46('0x48'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x27')),'prompt':_0x7c46('0x11')}]},{'groupId':_0x7c46('0x33'),'groupLabel':_0x2087c7(_0x4cf557,_0x7c46('0x2a')),'commands':[{'id':'business','label':_0x2087c7(_0x4cf557,_0x7c46('0x28')),'prompt':_0x7c46('0x10')},{'id':_0x7c46('0x53'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x2b')),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':_0x7c46('0x22'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x35')),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':_0x7c46('0x1e'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x14')),'prompt':_0x7c46('0x29')}]},{'groupId':'translate','groupLabel':_0x2087c7(_0x4cf557,'Translate'),'commands':[{'id':'translateEnglish','label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0x37'))]),'prompt':_0x7c46('0x3a')},{'id':_0x7c46('0x2c'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0x4b'))]),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':_0x7c46('0x40'),'label':_0x2087c7(_0x4cf557,'Translate\x20to\x20%0',[_0x2087c7(_0x4cf557,_0x7c46('0x1b'))]),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':_0x7c46('0x4'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0x46'))]),'prompt':_0x7c46('0x30')},{'id':_0x7c46('0x39'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0xa'))]),'prompt':_0x7c46('0x5')},{'id':_0x7c46('0x16'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,'Simplified\x20Chinese')]),'prompt':_0x7c46('0xb')},{'id':'translateHindi','label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0x24'))]),'prompt':_0x7c46('0x31')},{'id':_0x7c46('0x3'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0xe'))]),'prompt':_0x7c46('0xc')}]}];}
|
|
23
|
+
const _0x515493=_0x12d4;function _0x12d4(_0x428f91,_0x1d2699){const _0x244a0f=_0x244a();return _0x12d4=function(_0x12d405,_0x36a33c){_0x12d405=_0x12d405-0x104;let _0x5738ad=_0x244a0f[_0x12d405];return _0x5738ad;},_0x12d4(_0x428f91,_0x1d2699);}(function(_0x38357b,_0x5a35da){const _0x5bbca5=_0x12d4,_0x2dffd9=_0x38357b();while(!![]){try{const _0xd85093=-parseInt(_0x5bbca5(0x17c))/0x1*(parseInt(_0x5bbca5(0x12a))/0x2)+-parseInt(_0x5bbca5(0x147))/0x3*(-parseInt(_0x5bbca5(0x13c))/0x4)+-parseInt(_0x5bbca5(0x118))/0x5*(-parseInt(_0x5bbca5(0x12b))/0x6)+parseInt(_0x5bbca5(0x166))/0x7+parseInt(_0x5bbca5(0x144))/0x8+parseInt(_0x5bbca5(0x122))/0x9+parseInt(_0x5bbca5(0x10d))/0xa;if(_0xd85093===_0x5a35da)break;else _0x2dffd9['push'](_0x2dffd9['shift']());}catch(_0x1cdfdc){_0x2dffd9['push'](_0x2dffd9['shift']());}}}(_0x244a,0xcbd40));import{CKEditorError as _0x4be835}from'ckeditor5/src/utils.js';import{Plugin as _0x521de0}from'ckeditor5/src/core.js';import _0x58dc36 from'./aiassistantui.js';import _0x554ad8 from'./aiassistantediting.js';function _0x244a(){const _0xb2ef19=['ai.aiAssistant.commands','changeTone','Translate\x20the\x20content\x20to\x20Portuguese\x20language.','define','Edit\x20or\x20review','set','requires','Professional','aiLicenseKeyTrial','aiLicenseKeyTrialLimit:operations','continue','Simplify\x20language','translatePortuguese','2230067kIHEIg','translateHindi','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','ai.aiAssistant.extraCommandGroups','Casual','destroy','makeShorter','direct','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','Summarize','Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.','makeLonger','Translate\x20the\x20content\x20to\x20Spanish\x20language.','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20ai\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','groupId','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','translateSpanish','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.','French','translateEnglish','Generate\x20from\x20selection','35021zzLNUS','Translate\x20the\x20content\x20to\x20French\x20language.','aiLicenseKeyInvalid','Confident','Translate\x20the\x20content\x20to\x20English\x20language.','Translate\x20the\x20content\x20to\x20German\x20language.','Spanish','generate','professional','English','German','9021610yEUmhl','Continue','Arabic','find','includes','_licenseKeyCheckInterval','Journalism','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','concat','push','5LCjAyw','translateGerman','editor','simplifyLanguage','config','licenseKey','Translate','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Friendly','forEach','1720314OkSXKZ','filter','ai.aiAssistant.removeCommands','aiLicenseKeyValid','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','editOrReview','friendly','82CVXJzA','4397928UscXEa','Legal','casual','summarize','ai-invalid-license-key','Direct','init','locale','pluginName','Portuguese','Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','Improve\x20writing','Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.','commands','legal','ai-trial-license-key-reached-limit-changes','368Bywlcg','Change\x20style','get','poetic','business','Make\x20longer','Make\x20shorter','translateFrench','140648Zirhvu','AIAssistant','translateChinese','3531jyGzrw','translateArabic','changeStyle','Hindi','Business','Translate\x20the\x20content\x20to\x20Hindi\x20language.','journalism','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','Change\x20tone','Simplified\x20Chinese','info','Translate\x20to\x20%0','Translate\x20the\x20content\x20to\x20Arabic\x20language.','improveWriting','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','translate','confident','Poetic'];_0x244a=function(){return _0xb2ef19;};return _0x244a();}import{getTranslation as _0xe41f2}from'./utils/common-translations.js';export default class r extends _0x521de0{static get[_0x515493(0x15f)](){return[_0x58dc36,_0x554ad8];}static get[_0x515493(0x133)](){const _0x1cc362=_0x515493;return _0x1cc362(0x145);}constructor(_0x49c2c6){const _0x292378=_0x515493;super(_0x49c2c6);const _0x577275=_0x49c2c6[_0x292378(0x11c)];_0x577275[_0x292378(0x15c)](_0x292378(0x159),getDefaultCommands(_0x49c2c6[_0x292378(0x132)])),_0x577275[_0x292378(0x15c)](_0x292378(0x169),[]),_0x577275[_0x292378(0x15c)](_0x292378(0x124),[]);const _0x43e148=_0x577275[_0x292378(0x13e)](_0x292378(0x159)),_0x305f11=_0x577275[_0x292378(0x13e)](_0x292378(0x169)),_0x48a300=_0x577275[_0x292378(0x13e)](_0x292378(0x124));_0x305f11[_0x292378(0x121)](_0xbcf0f=>{const _0x8af0ed=_0x292378,_0x2581ae=_0x43e148[_0x8af0ed(0x110)](_0x6beaf8=>_0x6beaf8[_0x8af0ed(0x174)]===_0xbcf0f[_0x8af0ed(0x174)]);_0x2581ae?_0x2581ae[_0x8af0ed(0x139)]=_0x2581ae[_0x8af0ed(0x139)][_0x8af0ed(0x116)](_0xbcf0f[_0x8af0ed(0x139)]):_0x43e148[_0x8af0ed(0x117)](_0xbcf0f);}),_0x43e148[_0x292378(0x121)](_0x550805=>{const _0x141992=_0x292378;_0x550805[_0x141992(0x139)]=_0x550805[_0x141992(0x139)][_0x141992(0x123)](_0x18a38a=>!_0x48a300[_0x141992(0x111)](_0x18a38a['id']));}),_0x577275[_0x292378(0x15e)](_0x292378(0x159),_0x43e148);}[_0x515493(0x131)](){const _0x5dede7=_0x515493,_0x4fe156=this[_0x5dede7(0x11a)];this[_0x5dede7(0x11d)]=_0x4fe156[_0x5dede7(0x11c)][_0x5dede7(0x13e)](_0x5dede7(0x11d)),this[_0x5dede7(0x112)]=setInterval(()=>{const _0x16294d=_0x5dede7;let _0x1ae858;for(const _0x590a20 in _0x4fe156){const _0x541bca=_0x590a20,_0x280947=_0x4fe156[_0x541bca];if(_0x16294d(0x161)===_0x280947||_0x16294d(0x104)===_0x280947||_0x16294d(0x125)===_0x280947||_0x16294d(0x162)===_0x280947){delete _0x4fe156[_0x541bca],_0x1ae858=_0x280947;break;}}if(_0x16294d(0x104)===_0x1ae858)throw clearInterval(this[_0x16294d(0x112)]),new _0x4be835(_0x16294d(0x12f),null);if(_0x16294d(0x161)===_0x1ae858&&console[_0x16294d(0x151)](_0x16294d(0x173)),_0x16294d(0x162)===_0x1ae858)throw clearInterval(this[_0x16294d(0x112)]),new _0x4be835(_0x16294d(0x13b),null);_0x16294d(0x125)===_0x1ae858&&clearInterval(this[_0x16294d(0x112)]);},0x3e8);}[_0x515493(0x16b)](){const _0x1ddd46=_0x515493;this[_0x1ddd46(0x112)]&&clearInterval(this[_0x1ddd46(0x112)]);}}export function getDefaultCommands(_0x4b59e3){const _0x37dd74=_0x515493;return[{'groupId':_0x37dd74(0x128),'groupLabel':_0xe41f2(_0x4b59e3,_0x37dd74(0x15d)),'commands':[{'id':_0x37dd74(0x154),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x137)),'prompt':_0x37dd74(0x175)},{'id':_0x37dd74(0x16c),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x142)),'prompt':_0x37dd74(0x127)},{'id':_0x37dd74(0x171),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x141)),'prompt':_0x37dd74(0x16e)},{'id':_0x37dd74(0x11b),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x164)),'prompt':_0x37dd74(0x115)}]},{'groupId':_0x37dd74(0x109),'groupLabel':_0xe41f2(_0x4b59e3,_0x37dd74(0x17b)),'commands':[{'id':_0x37dd74(0x12e),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x16f)),'prompt':_0x37dd74(0x170)},{'id':_0x37dd74(0x163),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x10e)),'prompt':_0x37dd74(0x155)}]},{'groupId':_0x37dd74(0x15a),'groupLabel':_0xe41f2(_0x4b59e3,_0x37dd74(0x14f)),'commands':[{'id':_0x37dd74(0x10a),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x160)),'prompt':_0x37dd74(0x114)},{'id':_0x37dd74(0x12d),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x16a)),'prompt':_0x37dd74(0x135)},{'id':_0x37dd74(0x16d),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x130)),'prompt':_0x37dd74(0x11f)},{'id':_0x37dd74(0x157),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x105)),'prompt':_0x37dd74(0x177)},{'id':_0x37dd74(0x129),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x120)),'prompt':_0x37dd74(0x14e)}]},{'groupId':_0x37dd74(0x149),'groupLabel':_0xe41f2(_0x4b59e3,_0x37dd74(0x13d)),'commands':[{'id':_0x37dd74(0x140),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x14b)),'prompt':_0x37dd74(0x178)},{'id':_0x37dd74(0x13a),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x12c)),'prompt':_0x37dd74(0x126)},{'id':_0x37dd74(0x14d),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x113)),'prompt':_0x37dd74(0x138)},{'id':_0x37dd74(0x13f),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x158)),'prompt':_0x37dd74(0x168)}]},{'groupId':_0x37dd74(0x156),'groupLabel':_0xe41f2(_0x4b59e3,_0x37dd74(0x11e)),'commands':[{'id':_0x37dd74(0x17a),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x152),[_0xe41f2(_0x4b59e3,_0x37dd74(0x10b))]),'prompt':_0x37dd74(0x106)},{'id':_0x37dd74(0x176),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x152),[_0xe41f2(_0x4b59e3,_0x37dd74(0x108))]),'prompt':_0x37dd74(0x172)},{'id':_0x37dd74(0x165),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x152),[_0xe41f2(_0x4b59e3,_0x37dd74(0x134))]),'prompt':_0x37dd74(0x15b)},{'id':_0x37dd74(0x119),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x152),[_0xe41f2(_0x4b59e3,_0x37dd74(0x10c))]),'prompt':_0x37dd74(0x107)},{'id':_0x37dd74(0x143),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x152),[_0xe41f2(_0x4b59e3,_0x37dd74(0x179))]),'prompt':_0x37dd74(0x17d)},{'id':_0x37dd74(0x146),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x152),[_0xe41f2(_0x4b59e3,_0x37dd74(0x150))]),'prompt':_0x37dd74(0x136)},{'id':_0x37dd74(0x167),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x152),[_0xe41f2(_0x4b59e3,_0x37dd74(0x14a))]),'prompt':_0x37dd74(0x14c)},{'id':_0x37dd74(0x148),'label':_0xe41f2(_0x4b59e3,_0x37dd74(0x152),[_0xe41f2(_0x4b59e3,_0x37dd74(0x10f))]),'prompt':_0x37dd74(0x153)}]}];}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import type { Position } from 'ckeditor5/src/engine.js';
|
|
10
|
+
import { ClipboardMarkersUtils } from 'ckeditor5/src/clipboard.js';
|
|
10
11
|
/**
|
|
11
12
|
* The AI assistant editing plugin.
|
|
12
13
|
*/
|
|
@@ -15,6 +16,10 @@ export default class AIAssistantEditing extends Plugin {
|
|
|
15
16
|
* @inheritDoc
|
|
16
17
|
*/
|
|
17
18
|
static get pluginName(): "AIAssistantEditing";
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get requires(): readonly [typeof ClipboardMarkersUtils];
|
|
18
23
|
/**
|
|
19
24
|
* @inheritDoc
|
|
20
25
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x9b912e=_0x4b2f;function _0x1090(){const _0x45bdf8=['ai-ui','processor','getLastPosition','getSelectedBlocks','data','24TPpjaz','_setUniqueMarkerNamesInFragment','selection','span','canEditAt','319840RKiMru','removeMarker','pop','5654803tkCFSQ','72054xdEExP','ck-fake-ai-selection_collapsed','init','275944xguuhR','isContent','AIAssistantEditing','change','pluginName','insertContent','37953hjsJvW','createPositionAfter','document','for','createRange','toView','requires','setSelection','markerToHighlight','markerToElement','112mLHCci','schema','config','isAtEnd','updateMarker','ai-ui-candidate','insertContentBelow','ck-fake-ai-selection-candidate','length','ck-ai-assistant-ui_theme','end','plugins','start','ck-fake-ai-selection','get','toModel','showFakeVisualSelection','hideFakeVisualSelection','418796QQHahz','model','getRange','has','addMarker','1569154TMzgSc','editingDowncast','createSelection','markers','from','getLastMatchingPosition','editor','ai.useTheme','conversion','getFirstRange','push'];_0x1090=function(){return _0x45bdf8;};return _0x1090();}(function(_0x4ba5e0,_0x3e897a){const _0x2e9a6d=_0x4b2f,_0x19b6d1=_0x4ba5e0();while(!![]){try{const _0x239885=-parseInt(_0x2e9a6d(0xc0))/0x1+parseInt(_0x2e9a6d(0xe7))/0x2+parseInt(_0x2e9a6d(0xb4))/0x3*(-parseInt(_0x2e9a6d(0xe2))/0x4)+parseInt(_0x2e9a6d(0xb9))/0x5+parseInt(_0x2e9a6d(0xbd))/0x6+parseInt(_0x2e9a6d(0xbc))/0x7+-parseInt(_0x2e9a6d(0xd0))/0x8*(parseInt(_0x2e9a6d(0xc6))/0x9);if(_0x239885===_0x3e897a)break;else _0x19b6d1['push'](_0x19b6d1['shift']());}catch(_0xe4bc2f){_0x19b6d1['push'](_0x19b6d1['shift']());}}}(_0x1090,0x790c1));import{Plugin as _0x4e1847}from'ckeditor5/src/core.js';import{ClipboardMarkersUtils as _0xc36c79}from'ckeditor5/src/clipboard.js';function _0x4b2f(_0xfe366e,_0x173eab){const _0x1090d5=_0x1090();return _0x4b2f=function(_0x4b2fae,_0x588903){_0x4b2fae=_0x4b2fae-0xac;let _0x54f5d5=_0x1090d5[_0x4b2fae];return _0x54f5d5;},_0x4b2f(_0xfe366e,_0x173eab);}const c=_0x9b912e(0xaf),l=_0x9b912e(0xd5);export default class i extends _0x4e1847{static get[_0x9b912e(0xc4)](){const _0x3a34c5=_0x9b912e;return _0x3a34c5(0xc2);}static get[_0x9b912e(0xcc)](){return[_0xc36c79];}[_0x9b912e(0xbf)](){const _0x71ea51=_0x9b912e,{editor:_0x1431a6}=this,_0x387c4b=[_0x71ea51(0xdd)];_0x1431a6[_0x71ea51(0xd2)][_0x71ea51(0xde)](_0x71ea51(0xee))&&_0x387c4b[_0x71ea51(0xae)](_0x71ea51(0xd9)),_0x1431a6[_0x71ea51(0xac)][_0x71ea51(0xc9)](_0x71ea51(0xe8))[_0x71ea51(0xce)]({'model':c,'view':{'classes':_0x387c4b}}),_0x1431a6[_0x71ea51(0xac)][_0x71ea51(0xc9)](_0x71ea51(0xe8))[_0x71ea51(0xcf)]({'model':c,'view':{'name':_0x71ea51(0xb7),'classes':[_0x71ea51(0xdd),_0x71ea51(0xbe)]}}),_0x1431a6[_0x71ea51(0xac)][_0x71ea51(0xc9)](_0x71ea51(0xe8))[_0x71ea51(0xce)]({'model':l,'view':{'classes':[_0x71ea51(0xd7)]}}),_0x1431a6[_0x71ea51(0xac)][_0x71ea51(0xc9)](_0x71ea51(0xe8))[_0x71ea51(0xcf)]({'model':l,'view':{'name':_0x71ea51(0xb7),'classes':[_0x71ea51(0xd7),_0x71ea51(0xbe)]}});}[_0x9b912e(0xe0)](_0xff308){const _0x4a365d=_0x9b912e,_0x3669b1=this[_0x4a365d(0xed)][_0x4a365d(0xe3)],_0x31bb98=_0xff308?l:c;_0x3669b1[_0x4a365d(0xc3)](_0x1f3b18=>{const _0x5b336a=_0x4a365d,_0x391441=_0x3669b1[_0x5b336a(0xc8)][_0x5b336a(0xb6)][_0x5b336a(0xad)]();if(_0x3669b1[_0x5b336a(0xea)][_0x5b336a(0xe5)](_0x31bb98))_0x1f3b18[_0x5b336a(0xd4)](_0x31bb98,{'range':_0x391441});else{if(_0x391441[_0x5b336a(0xdc)][_0x5b336a(0xd3)]){const _0x3b0294=_0x391441[_0x5b336a(0xdc)][_0x5b336a(0xec)](({item:_0x58a743})=>!_0x3669b1[_0x5b336a(0xd1)][_0x5b336a(0xc1)](_0x58a743),{'boundaries':_0x391441});_0x1f3b18[_0x5b336a(0xe6)](_0x31bb98,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x1f3b18[_0x5b336a(0xca)](_0x3b0294,_0x391441[_0x5b336a(0xda)])});}else _0x1f3b18[_0x5b336a(0xe6)](_0x31bb98,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x391441});}});}[_0x9b912e(0xe1)](_0x19d7b7){const _0x2e1627=_0x9b912e,_0x269674=this[_0x2e1627(0xed)][_0x2e1627(0xe3)],_0x197cb2=_0x19d7b7?l:c;_0x269674[_0x2e1627(0xea)][_0x2e1627(0xe5)](_0x197cb2)&&_0x269674[_0x2e1627(0xc3)](_0x2bfcad=>{const _0x1dd72e=_0x2e1627;_0x2bfcad[_0x1dd72e(0xba)](_0x197cb2);});}[_0x9b912e(0xc5)](_0x56ccfe,_0x3aa5ed){const _0x197d29=_0x9b912e,_0x33076d=this[_0x197d29(0xed)][_0x197d29(0xdb)][_0x197d29(0xde)](_0xc36c79),_0x39b9dc=_0x3aa5ed||this[_0x197d29(0xed)][_0x197d29(0xe3)][_0x197d29(0xea)][_0x197d29(0xde)](c)[_0x197d29(0xe4)]();if(!this[_0x197d29(0xed)][_0x197d29(0xe3)][_0x197d29(0xb8)](_0x39b9dc))return;const _0x1b1d81=this[_0x197d29(0xed)][_0x197d29(0xb3)][_0x197d29(0xb0)][_0x197d29(0xcb)](_0x56ccfe),_0x1477ee=this[_0x197d29(0xed)][_0x197d29(0xb3)][_0x197d29(0xdf)](_0x1b1d81);_0x33076d[_0x197d29(0xb5)](_0x1477ee),this[_0x197d29(0xed)][_0x197d29(0xe3)][_0x197d29(0xc3)](_0x17c754=>{const _0x3b133e=_0x197d29;this[_0x3b133e(0xe1)]();const _0x426656=this[_0x3b133e(0xed)][_0x3b133e(0xe3)][_0x3b133e(0xc5)](_0x1477ee,_0x39b9dc);_0x426656&&_0x17c754[_0x3b133e(0xcd)](_0x426656);});}[_0x9b912e(0xd6)](_0x328e05){const _0x4d83cb=_0x9b912e,{model:_0x120d31}=this[_0x4d83cb(0xed)],_0x4db593=Array[_0x4d83cb(0xeb)](_0x120d31[_0x4d83cb(0xe9)](this[_0x4d83cb(0xed)][_0x4d83cb(0xe3)][_0x4d83cb(0xea)][_0x4d83cb(0xde)](c)[_0x4d83cb(0xe4)]())[_0x4d83cb(0xb2)]()),_0x1a0ae3=_0x4db593[_0x4d83cb(0xd8)]?_0x120d31[_0x4d83cb(0xc7)](_0x4db593[_0x4d83cb(0xbb)]()):_0x120d31[_0x4d83cb(0xc8)][_0x4d83cb(0xb6)][_0x4d83cb(0xb1)]();this[_0x4d83cb(0xc5)](_0x328e05,_0x1a0ae3);}}
|
package/src/aiassistantui.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import AIAdapter from './adapters/aiadapter.js';
|
|
|
13
13
|
import '../theme/ai.css';
|
|
14
14
|
import '../theme/ai-dropdown.css';
|
|
15
15
|
import '../theme/ai-form.css';
|
|
16
|
+
import { ClipboardMarkersUtils } from 'ckeditor5/src/clipboard.js';
|
|
16
17
|
/**
|
|
17
18
|
* The UI plugin of the AI assistant.
|
|
18
19
|
*/
|
|
@@ -24,7 +25,7 @@ export default class AIAssistantUI extends Plugin {
|
|
|
24
25
|
/**
|
|
25
26
|
* @inheritDoc
|
|
26
27
|
*/
|
|
27
|
-
static get requires(): readonly [typeof AIAssistantEditing, typeof AIAdapter, typeof Dialog];
|
|
28
|
+
static get requires(): readonly [typeof ClipboardMarkersUtils, typeof AIAssistantEditing, typeof AIAdapter, typeof Dialog];
|
|
28
29
|
/**
|
|
29
30
|
* @inheritDoc
|
|
30
31
|
*/
|