@ckeditor/ckeditor5-ai
Version:
AI Assistant feature for CKEditor 5.
23 lines • 4.77 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x1ac4(){const _0x76a5a6=['config','getSelectedBlocks','getItems','isEmpty','498cMYlfw','from','set','getFirstRange','add','getRanges','isCollapsed','hasContent','selection','values','length','3yRDThe','model','250230nURElZ','name','85304uweiYe','change:isEnabled','get','131588Tgawep','_commandDefinitions','element','ai.aiAssistant.disabledElements','showUI','21000eLUswZ','18GzjEXw','editor','change:_hasContext','enabledCommandsIds','execute','2998732MdbFEG','refresh','document','1941680WJsUfE','requiresContent','_hasContext','isEnabled','custom','plugins','91vkxPEC','includes','485396XKUhEu'];_0x1ac4=function(){return _0x76a5a6;};return _0x1ac4();}function _0x1439(_0x221fb8,_0x5bacc0){const _0x1ac474=_0x1ac4();return _0x1439=function(_0x14396a,_0xf82414){_0x14396a=_0x14396a-0x18e;let _0x36dd10=_0x1ac474[_0x14396a];return _0x36dd10;},_0x1439(_0x221fb8,_0x5bacc0);}const _0x1d71f1=_0x1439;(function(_0x76cb62,_0xee9320){const _0x199668=_0x1439,_0x2b46c6=_0x76cb62();while(!![]){try{const _0x544e4a=parseInt(_0x199668(0x1aa))/0x1+parseInt(_0x199668(0x1af))/0x2*(-parseInt(_0x199668(0x1a8))/0x3)+-parseInt(_0x199668(0x198))/0x4+parseInt(_0x199668(0x1b4))/0x5*(-parseInt(_0x199668(0x19d))/0x6)+-parseInt(_0x199668(0x196))/0x7*(parseInt(_0x199668(0x1ac))/0x8)+parseInt(_0x199668(0x1b5))/0x9*(parseInt(_0x199668(0x190))/0xa)+parseInt(_0x199668(0x1ba))/0xb;if(_0x544e4a===_0xee9320)break;else _0x2b46c6['push'](_0x2b46c6['shift']());}catch(_0x1093a7){_0x2b46c6['push'](_0x2b46c6['shift']());}}}(_0x1ac4,0x39d10));import{Command as _0x5e52fc}from'ckeditor5/src/core.js';import _0x1ce84d from'../aiassistantui.js';export default class j extends _0x5e52fc{[_0x1d71f1(0x1b0)];constructor(_0x1aa610,_0xada239){const _0x159677=_0x1d71f1;super(_0x1aa610),this[_0x159677(0x1b0)]=_0xada239,this[_0x159677(0x19f)](_0x159677(0x1b8),[]),this['on'](_0x159677(0x1b7),(_0x35f419,_0x32c3a3,_0x1cd60e)=>{const _0x32572c=_0x159677;this[_0x32572c(0x193)]&&(this[_0x32572c(0x1b8)]=G(this[_0x32572c(0x1b0)],_0x1cd60e));}),this[_0x159677(0x19f)](_0x159677(0x192),!0x1),this['on'](_0x159677(0x1ad),(_0x2fc0c9,_0x552f28,_0x4e9783)=>{const _0x10965f=_0x159677;this[_0x10965f(0x1b8)]=_0x4e9783?G(this[_0x10965f(0x1b0)],this[_0x10965f(0x192)]):[];});}[_0x1d71f1(0x18e)](){const _0x329c51=_0x1d71f1,_0x41113e=this[_0x329c51(0x1b6)][_0x329c51(0x1a9)];this[_0x329c51(0x192)]=function(_0x410cd5){const _0x5f2695=_0x329c51,_0x1a480a=_0x410cd5[_0x5f2695(0x18f)][_0x5f2695(0x1a5)];return _0x1a480a[_0x5f2695(0x1a3)]?0x0!==[..._0x1a480a[_0x5f2695(0x19a)]()][_0x5f2695(0x1a7)]&&![..._0x1a480a[_0x5f2695(0x19a)]()][0x0][_0x5f2695(0x19c)]:!!_0x410cd5[_0x5f2695(0x1a4)](_0x1a480a[_0x5f2695(0x1a0)]());}(_0x41113e);const _0xf5ee96=_0x41113e[_0x329c51(0x18f)][_0x329c51(0x1a5)],_0x27627a=this[_0x329c51(0x1b6)][_0x329c51(0x199)][_0x329c51(0x1ae)](_0x329c51(0x1b2));for(const _0x20f248 of _0xf5ee96[_0x329c51(0x1a2)]())for(const _0x60e9b8 of _0x20f248[_0x329c51(0x19b)]())if(_0x60e9b8['is'](_0x329c51(0x1b1))&&_0x27627a[_0x329c51(0x197)](_0x60e9b8[_0x329c51(0x1ab)]))return void(this[_0x329c51(0x193)]=!0x1);this[_0x329c51(0x193)]=!0x0;}[_0x1d71f1(0x1b9)](_0x95cc9b='',_0x3ba44c='',_0x18c84d=_0x1d71f1(0x194)){const _0x29005c=_0x1d71f1;this[_0x29005c(0x1b6)][_0x29005c(0x195)][_0x29005c(0x1ae)](_0x1ce84d)[_0x29005c(0x1b3)](_0x95cc9b,_0x3ba44c,_0x18c84d);}}function G(_0x1f7767,_0x145629){const _0x181ce3=_0x1d71f1,_0x36cd57=new Set();for(const _0x363415 of _0x1f7767[_0x181ce3(0x1a6)]())(_0x145629||!0x1===_0x363415[_0x181ce3(0x191)])&&_0x36cd57[_0x181ce3(0x1a1)](_0x363415['id']);return Array[_0x181ce3(0x19e)](_0x36cd57);}