@ckeditor/ckeditor5-ai
Version:
AI Assistant feature for CKEditor 5.
23 lines • 4.72 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x15fd79=_0xb93a;(function(_0x30ab65,_0x5a3c5d){const _0x282ad7=_0xb93a,_0x434d31=_0x30ab65();while(!![]){try{const _0x44361c=parseInt(_0x282ad7(0xfb))/0x1*(-parseInt(_0x282ad7(0x10f))/0x2)+parseInt(_0x282ad7(0x10a))/0x3*(parseInt(_0x282ad7(0x100))/0x4)+parseInt(_0x282ad7(0xfc))/0x5+-parseInt(_0x282ad7(0xfe))/0x6*(parseInt(_0x282ad7(0xf2))/0x7)+parseInt(_0x282ad7(0xfa))/0x8*(-parseInt(_0x282ad7(0x106))/0x9)+parseInt(_0x282ad7(0xf9))/0xa*(parseInt(_0x282ad7(0x108))/0xb)+-parseInt(_0x282ad7(0x101))/0xc*(parseInt(_0x282ad7(0xef))/0xd);if(_0x44361c===_0x5a3c5d)break;else _0x434d31['push'](_0x434d31['shift']());}catch(_0x122708){_0x434d31['push'](_0x434d31['shift']());}}}(_0x1d3b,0x4763b));import{Plugin as _0x4450e7}from'ckeditor5/src/core.js';import{CKEditorError as _0x1aaf29}from'ckeditor5/src/utils.js';import{default as _0x3aa74a,AIRequestError as _0x1776e0}from'./aiadapter.js';function _0xb93a(_0x4e6362,_0x4a69b){const _0x1d3b38=_0x1d3b();return _0xb93a=function(_0xb93a9c,_0x23302c){_0xb93a9c=_0xb93a9c-0xe8;let _0x33e81c=_0x1d3b38[_0xb93a9c];return _0x33e81c;},_0xb93a(_0x4e6362,_0x4a69b);}import{getTranslation as _0x50b281}from'../utils/common-translations.js';function _0x1d3b(){const _0x43b2ca=['signal','116633wJikju','resolve','300zbcEHO','requires','object','AbortError','_prepareRequestParameters','2ovibdr','get','catch','reject','_prepareRequestHeaders','assign','abort','AI_ERROR_GET_HEADERS','13OdYYkq','application/json','AI_ERROR_GET_PARAMETERS','7JmzDLu','plugins','editor','textAdapter','locale','abortController','name','430pNiuQo','7576xlYYVz','189835urkLVF','2332200tZweab','error','607470BIXtKJ','init','3252AVONbC','1167012cRKREv','aitextadapter-send-request-failed','aborted','sendRequest','makeRequest','3069BKbDzP'];_0x1d3b=function(){return _0x43b2ca;};return _0x1d3b();}export default class P extends _0x4450e7{[_0x15fd79(0xf7)];static get[_0x15fd79(0x10b)](){return[_0x3aa74a];}constructor(_0x599fd4){const _0x38f003=_0x15fd79;super(_0x599fd4),this[_0x38f003(0xf7)]=new AbortController();}[_0x15fd79(0xff)](){const _0x114cf2=_0x15fd79;this[_0x114cf2(0xf4)][_0x114cf2(0xf3)][_0x114cf2(0xe8)](_0x3aa74a)[_0x114cf2(0xf5)]=this;}[_0x15fd79(0xed)](){const _0x2f44c7=_0x15fd79;this[_0x2f44c7(0xf7)][_0x2f44c7(0x107)][_0x2f44c7(0x103)]||(this[_0x2f44c7(0xf7)][_0x2f44c7(0xed)](),this[_0x2f44c7(0xf7)]=new AbortController());}async[_0x15fd79(0x105)](_0x4e054c){const _0x2fffdc=_0x15fd79;return this[_0x2fffdc(0x104)](_0x4e054c)[_0x2fffdc(0xe9)](_0x310d46=>{const _0x4f4210=_0x2fffdc;if(_0x310d46 instanceof _0x1776e0)return Promise[_0x4f4210(0xea)](_0x310d46);if(_0x4f4210(0x10d)==_0x310d46[_0x4f4210(0xf8)])return Promise[_0x4f4210(0x109)]();throw console[_0x4f4210(0xfd)](_0x310d46),new _0x1aaf29(_0x4f4210(0x102),null);});}async[_0x15fd79(0xeb)](_0x3989ea,_0x2ccfc3){const _0x570cd3=_0x15fd79,_0x375fca=this[_0x570cd3(0xf4)][_0x570cd3(0xf6)],_0x586388={'Content-Type':_0x570cd3(0xf0)};if(_0x570cd3(0x10c)==typeof _0x3989ea)Object[_0x570cd3(0xec)](_0x586388,_0x3989ea);else{if(_0x3989ea)try{const _0x142460=await _0x3989ea(_0x2ccfc3);Object[_0x570cd3(0xec)](_0x586388,_0x142460);}catch{return Promise[_0x570cd3(0xea)](new _0x1776e0(_0x50b281(_0x375fca,_0x570cd3(0xee))));}}return _0x586388;}async[_0x15fd79(0x10e)](_0x474e75,_0x4ecf1f){const _0x227bcc=_0x15fd79,_0x2f93e1=this[_0x227bcc(0xf4)][_0x227bcc(0xf6)];if(_0x227bcc(0x10c)==typeof _0x474e75)return _0x474e75;try{return await _0x474e75(_0x4ecf1f);}catch{return Promise[_0x227bcc(0xea)](new _0x1776e0(_0x50b281(_0x2f93e1,_0x227bcc(0xf1))));}}}