UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 4.59 kB
/* * 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 _0x248c(){const _0x18e778=['3365395VkMFlC','showChangesToggleView','6893703UnyRAw','AI_SUGGESTION_BUTTON_SHOW_CHANGES','icon','ck-ai-suggestion__header__show-changes-toggle\x20ck-ai-chat-controls-button','4qcTmcG','render','add','set','isShowChangesToggleVisible','toggleShowChanges','ck-ai-suggestion__header','remove','ck-hidden','iconView','isOn','29390339MjOzrY','bind','div','content','isVisible','children','filter','1jbYKpC','span','showDiff','fire','2740377xWDnto','showHeader','32sPLIay','637448iqvZuF','4709010EbbSGC','execute','setTemplate','AI_SUGGESTION_HEADER_TITLE','1561810nxCTCa','10wfMaHa'];_0x248c=function(){return _0x18e778;};return _0x248c();}const _0x34e34b=_0x1ffe;(function(_0x4bec03,_0x19a866){const _0x2cf6b4=_0x1ffe,_0x90fdae=_0x4bec03();while(!![]){try{const _0x3df171=parseInt(_0x2cf6b4(0x200))/0x1*(-parseInt(_0x2cf6b4(0x20c))/0x2)+-parseInt(_0x2cf6b4(0x204))/0x3+-parseInt(_0x2cf6b4(0x214))/0x4*(-parseInt(_0x2cf6b4(0x20e))/0x5)+-parseInt(_0x2cf6b4(0x208))/0x6+-parseInt(_0x2cf6b4(0x207))/0x7*(-parseInt(_0x2cf6b4(0x206))/0x8)+-parseInt(_0x2cf6b4(0x210))/0x9+-parseInt(_0x2cf6b4(0x20d))/0xa*(-parseInt(_0x2cf6b4(0x1f9))/0xb);if(_0x3df171===_0x19a866)break;else _0x90fdae['push'](_0x90fdae['shift']());}catch(_0x11b78d){_0x90fdae['push'](_0x90fdae['shift']());}}}(_0x248c,0x71492));import{getTranslation as _0x401435}from'../../utils/common-translations.js';import{ButtonView as _0x174413,IconView as _0x3c9225,View as _0xfa5020}from'ckeditor5/src/ui.js';function _0x1ffe(_0x17d1c1,_0x376078){const _0x248c04=_0x248c();return _0x1ffe=function(_0x1ffe95,_0x1181b9){_0x1ffe95=_0x1ffe95-0x1f3;let _0x5f7440=_0x248c04[_0x1ffe95];return _0x5f7440;},_0x1ffe(_0x17d1c1,_0x376078);}import{IconDocument as _0x38b90c,IconShowChangesOff as _0x21ae97,IconShowChangesOn as _0x1928dd}from'ckeditor5/src/icons.js';export class AISuggestionHeaderView extends _0xfa5020{[_0x34e34b(0x20f)];constructor(_0x10cfa3,_0xb36767){const _0x4028cd=_0x34e34b;super(_0x10cfa3),this[_0x4028cd(0x217)](_0x4028cd(0x218),!0x0),this[_0x4028cd(0x20f)]=new ShowChangesToggleView(_0x10cfa3),this[_0x4028cd(0x20f)][_0x4028cd(0x217)]({'class':_0x4028cd(0x213),'label':_0x401435(_0x10cfa3,_0x4028cd(0x211)),'withText':!0x0}),this[_0x4028cd(0x20f)][_0x4028cd(0x1f8)]=_0xb36767[_0x4028cd(0x202)],this[_0x4028cd(0x20f)][_0x4028cd(0x1fa)](_0x4028cd(0x1fd))['to'](this,_0x4028cd(0x218)),this[_0x4028cd(0x20f)][_0x4028cd(0x1fa)](_0x4028cd(0x212))['to'](this[_0x4028cd(0x20f)],_0x4028cd(0x1f8),_0x548789=>_0x548789?_0x1928dd:_0x21ae97),this[_0x4028cd(0x20f)]['on'](_0x4028cd(0x209),()=>{const _0x5c18c9=_0x4028cd;this[_0x5c18c9(0x20f)][_0x5c18c9(0x1f8)]=!this[_0x5c18c9(0x20f)][_0x5c18c9(0x1f8)],this[_0x5c18c9(0x203)](_0x5c18c9(0x1f3),{'isOn':this[_0x5c18c9(0x20f)][_0x5c18c9(0x1f8)]});});const _0x42230d=new _0x3c9225();_0x42230d[_0x4028cd(0x1fc)]=_0x38b90c,this[_0x4028cd(0x20a)]({'tag':_0x4028cd(0x1fb),'attributes':{'class':['ck',_0x4028cd(0x1f4),!0x1===_0xb36767[_0x4028cd(0x205)]?_0x4028cd(0x1f6):null][_0x4028cd(0x1ff)](Boolean)},'children':[_0x42230d,{'tag':_0x4028cd(0x201),'children':[_0x401435(_0x10cfa3,_0x4028cd(0x20b))]},this[_0x4028cd(0x20f)]]});}}export class ShowChangesToggleView extends _0x174413{[_0x34e34b(0x215)](){const _0x363959=_0x34e34b;super[_0x363959(0x215)](),this[_0x363959(0x1fe)][_0x363959(0x1f5)](this[_0x363959(0x1f7)]),this[_0x363959(0x1fe)][_0x363959(0x216)](this[_0x363959(0x1f7)]);}}