@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
23 lines • 9.24 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 _0x210d(){const _0x463584=['isOn','show:','_hidePanel','right','850ObelYS','ui-tabsview-tab-not-found','top','locale','fire','side','_showPanel','render','hide','activeTab','getTab','getTabIds','isVisible','isMaximized','14996akzveC','buttonIcon','ck-tabs__buttons-container','setTemplate','5qnItLI','reduce','178DNLZGw','33651tYyPSJ','ck-tabs','label','_getPanel','24092519myugxd','1053633RoCSAD','hide:','_setupButton','div','button','6448536lCDkOs','ck-tabs__panels-container','bind','activateTab:','buttonLabel','ck-reset','content','_hideButton','_tabs','show','find','panel','activateTab','addTab:','hideTab','6FTfgTk','ck-tabs__panels-container_','_showButton','set','keys','1014156lSosYB','buttonViews','execute','length','order','children','303DmkUQl','class','_getButton','get','ck-tabs_','createCollection','icon','add','ck-tabs__buttons-container_','left','addTab','ck-ai-tabs_maximized','bindTemplate','panelViews','showTab','getIndex'];_0x210d=function(){return _0x463584;};return _0x210d();}const _0x5ba8a6=_0x3dfe;(function(_0x4f4c82,_0x2021d0){const _0x241443=_0x3dfe,_0x4b1a2f=_0x4f4c82();while(!![]){try{const _0x4fb4d3=-parseInt(_0x241443(0x1b3))/0x1+parseInt(_0x241443(0x194))/0x2*(-parseInt(_0x241443(0x1b9))/0x3)+parseInt(_0x241443(0x18e))/0x4*(-parseInt(_0x241443(0x192))/0x5)+parseInt(_0x241443(0x1ae))/0x6*(-parseInt(_0x241443(0x19a))/0x7)+-parseInt(_0x241443(0x19f))/0x8+parseInt(_0x241443(0x195))/0x9*(parseInt(_0x241443(0x180))/0xa)+parseInt(_0x241443(0x199))/0xb;if(_0x4fb4d3===_0x2021d0)break;else _0x4b1a2f['push'](_0x4b1a2f['shift']());}catch(_0x2c2d79){_0x4b1a2f['push'](_0x4b1a2f['shift']());}}}(_0x210d,0x80114));import{View as _0xae3a9f}from'ckeditor5/src/ui.js';function _0x3dfe(_0x50aad4,_0x5e8906){const _0x210d28=_0x210d();return _0x3dfe=function(_0x3dfeb9,_0x59586e){_0x3dfeb9=_0x3dfeb9-0x174;let _0x394df0=_0x210d28[_0x3dfeb9];return _0x394df0;},_0x3dfe(_0x50aad4,_0x5e8906);}import{toArray as _0x4b0352,CKEditorError as _0x40514b}from'ckeditor5/src/utils.js';import{TabButtonView as _0x1d2f14}from'./tabbuttonview.js';import{TabPanelView as _0xcfa859}from'./tabpanelview.js';import'../../../theme/aitabs/tabs/tabsview.css';export const AI_TABS_POSITIONS=[_0x5ba8a6(0x182),_0x5ba8a6(0x175),_0x5ba8a6(0x17f)];export class AITabsView extends _0xae3a9f{[_0x5ba8a6(0x1b4)]=this[_0x5ba8a6(0x1be)]();[_0x5ba8a6(0x179)]=this[_0x5ba8a6(0x1be)]();[_0x5ba8a6(0x1a7)]=new Map();constructor(_0x3166eb,_0x46a687={}){const _0x2bc3b8=_0x5ba8a6;super(_0x3166eb),this[_0x2bc3b8(0x1b1)](_0x2bc3b8(0x1ba),void 0x0),this[_0x2bc3b8(0x1b1)](_0x2bc3b8(0x189),null),this[_0x2bc3b8(0x1b1)](_0x2bc3b8(0x185),_0x46a687[_0x2bc3b8(0x185)]||_0x2bc3b8(0x182)),this[_0x2bc3b8(0x1b1)](_0x2bc3b8(0x18d),!0x1);const _0x37238c=this[_0x2bc3b8(0x178)];this[_0x2bc3b8(0x191)]({'tag':_0x2bc3b8(0x19d),'attributes':{'class':['ck',_0x2bc3b8(0x1a4),_0x2bc3b8(0x196),..._0x4b0352(_0x46a687[_0x2bc3b8(0x1ba)]||[]),_0x37238c['to'](_0x2bc3b8(0x185),_0x5b2aab=>_0x2bc3b8(0x1bd)+_0x5b2aab),_0x37238c['to'](_0x2bc3b8(0x1ba)),_0x37238c['to'](_0x2bc3b8(0x18d),_0x22d5c3=>_0x22d5c3?_0x2bc3b8(0x177):'')],'tabindex':'0'},'children':[{'tag':_0x2bc3b8(0x19d),'attributes':{'class':['ck',_0x2bc3b8(0x190),_0x37238c['to'](_0x2bc3b8(0x185),_0x3f13ca=>_0x2bc3b8(0x174)+_0x3f13ca)]},'children':this[_0x2bc3b8(0x1b4)]},{'tag':_0x2bc3b8(0x19d),'attributes':{'class':['ck',_0x2bc3b8(0x1a0),_0x37238c['to'](_0x2bc3b8(0x185),_0x182371=>_0x2bc3b8(0x1af)+_0x182371)]},'children':this[_0x2bc3b8(0x179)]},..._0x4b0352(_0x46a687[_0x2bc3b8(0x1b8)]||[])]});}[_0x5ba8a6(0x18b)](){const _0x3386c2=_0x5ba8a6;return[...this[_0x3386c2(0x1a7)][_0x3386c2(0x1b2)]()];}[_0x5ba8a6(0x18a)](_0x17a5f7){const _0x4ca8a5=_0x5ba8a6,_0x44b1c6=this[_0x4ca8a5(0x1a7)][_0x4ca8a5(0x1bc)](_0x17a5f7);return _0x44b1c6||null;}[_0x5ba8a6(0x176)](_0x48351e){const _0x2cbaa6=_0x5ba8a6,_0x5d2cd0=this[_0x2cbaa6(0x19c)]({'id':_0x48351e['id'],'label':_0x48351e[_0x2cbaa6(0x1a3)],'icon':_0x48351e[_0x2cbaa6(0x18f)],'order':_0x48351e[_0x2cbaa6(0x1b7)]}),_0x2849da=new _0xcfa859(this[_0x2cbaa6(0x183)]);return _0x2849da[_0x2cbaa6(0x187)](),_0x48351e[_0x2cbaa6(0x1a5)]&&_0x2849da[_0x2cbaa6(0x1b8)][_0x2cbaa6(0x1c0)](_0x48351e[_0x2cbaa6(0x1a5)]),this[_0x2cbaa6(0x179)][_0x2cbaa6(0x1c0)](_0x2849da),this[_0x2cbaa6(0x1a7)][_0x2cbaa6(0x1b1)](_0x48351e['id'],{'button':_0x5d2cd0,'panel':_0x2849da,'order':void 0x0!==_0x48351e[_0x2cbaa6(0x1b7)]?_0x48351e[_0x2cbaa6(0x1b7)]:null}),this[_0x2cbaa6(0x184)](_0x2cbaa6(0x1ac)+_0x48351e['id'],{'id':_0x48351e['id'],'button':_0x5d2cd0,'panel':_0x2849da}),null===this[_0x2cbaa6(0x189)]?this[_0x2cbaa6(0x1ab)](_0x48351e['id']):this[_0x2cbaa6(0x17e)](_0x48351e['id']),{'button':_0x5d2cd0,'panel':_0x2849da};}[_0x5ba8a6(0x1ab)](_0x79ada3){const _0x320ed7=_0x5ba8a6;if(null!==_0x79ada3&&!this[_0x320ed7(0x18a)](_0x79ada3))throw new _0x40514b(_0x320ed7(0x181),{'tabs':this,'tabId':_0x79ada3});this[_0x320ed7(0x189)]!==_0x79ada3&&(this[_0x320ed7(0x189)]&&this[_0x320ed7(0x17e)](this[_0x320ed7(0x189)]),this[_0x320ed7(0x189)]=_0x79ada3,_0x79ada3&&this[_0x320ed7(0x186)](_0x79ada3),this[_0x320ed7(0x184)](_0x320ed7(0x1a2)+_0x79ada3,_0x79ada3));}[_0x5ba8a6(0x17a)](_0x50ab5c){const _0x5aeec9=_0x5ba8a6;if(!this[_0x5aeec9(0x18a)](_0x50ab5c))throw new _0x40514b(_0x5aeec9(0x181),{'tabs':this,'tabId':_0x50ab5c});this[_0x5aeec9(0x186)](_0x50ab5c),this[_0x5aeec9(0x1b0)](_0x50ab5c),this[_0x5aeec9(0x184)](_0x5aeec9(0x17d)+_0x50ab5c,_0x50ab5c);}[_0x5ba8a6(0x1ad)](_0x1084c1){const _0x40f82f=_0x5ba8a6;if(!this[_0x40f82f(0x18a)](_0x1084c1))throw new _0x40514b(_0x40f82f(0x181),{'tabs':this,'tabId':_0x1084c1});const _0x3e638d=this[_0x40f82f(0x189)];this[_0x40f82f(0x17e)](_0x1084c1),this[_0x40f82f(0x1a6)](_0x1084c1);const _0x1bd723=this[_0x40f82f(0x18b)]();_0x3e638d===_0x1084c1&&_0x1bd723[_0x40f82f(0x1b6)]>0x1&&this[_0x40f82f(0x1ab)](_0x1bd723[_0x40f82f(0x1a9)](_0x172c09=>_0x172c09!==_0x1084c1)),this[_0x40f82f(0x184)](_0x40f82f(0x19b)+_0x1084c1,_0x1084c1);}[_0x5ba8a6(0x198)](_0x2becee){const _0x33c170=_0x5ba8a6,_0x5139c7=this[_0x33c170(0x1a7)][_0x33c170(0x1bc)](_0x2becee);return _0x5139c7?_0x5139c7[_0x33c170(0x1aa)]:null;}[_0x5ba8a6(0x186)](_0x5d8480){const _0x2b5be8=_0x5ba8a6;null!==this[_0x2b5be8(0x189)]&&this[_0x2b5be8(0x189)]!==_0x5d8480||this[_0x2b5be8(0x198)](_0x5d8480)[_0x2b5be8(0x1a8)]();}[_0x5ba8a6(0x17e)](_0x11040e){const _0x2ab6a4=_0x5ba8a6,_0x330083=this[_0x2ab6a4(0x198)](_0x11040e);_0x330083[_0x2ab6a4(0x18c)]&&(this[_0x2ab6a4(0x189)]===_0x11040e&&(this[_0x2ab6a4(0x189)]=null),_0x330083[_0x2ab6a4(0x188)]());}[_0x5ba8a6(0x1bb)](_0x33eaaf){const _0x464785=_0x5ba8a6,_0x25acd8=this[_0x464785(0x1a7)][_0x464785(0x1bc)](_0x33eaaf);return _0x25acd8?_0x25acd8[_0x464785(0x19e)]:null;}[_0x5ba8a6(0x1b0)](_0xc5eca3){const _0x2bba81=_0x5ba8a6;this[_0x2bba81(0x1bb)](_0xc5eca3)[_0x2bba81(0x1a8)]();}[_0x5ba8a6(0x1a6)](_0x32a1cb){const _0x3e67eb=_0x5ba8a6;this[_0x3e67eb(0x1bb)](_0x32a1cb)[_0x3e67eb(0x188)]();}[_0x5ba8a6(0x19c)](_0x3f7e30){const _0x1573e3=_0x5ba8a6,_0x4983dc=new _0x1d2f14(this[_0x1573e3(0x183)],{'side':this[_0x1573e3(0x185)]}),_0x51a4e4=this[_0x1573e3(0x1b4)];if(_0x4983dc[_0x1573e3(0x1b1)]({'label':_0x3f7e30[_0x1573e3(0x197)],'icon':_0x3f7e30[_0x1573e3(0x1bf)],'tooltip':!0x0,'withText':!0x0}),_0x4983dc[_0x1573e3(0x1a1)](_0x1573e3(0x17c))['to'](this,_0x1573e3(0x189),_0x4e6d3b=>_0x4e6d3b===_0x3f7e30['id']),_0x4983dc[_0x1573e3(0x1a1)](_0x1573e3(0x185))['to'](this,_0x1573e3(0x185)),_0x3f7e30[_0x1573e3(0x1b7)]){const _0x4cd1f7=[...this[_0x1573e3(0x1a7)]][_0x1573e3(0x193)]((_0x3aaaef,_0x246615)=>{const _0x1a9af2=_0x1573e3,_0x3a2ff3=_0x246615[0x0],{order:_0x47d618}=_0x246615[0x1];return!_0x47d618||_0x47d618>_0x3f7e30[_0x1a9af2(0x1b7)]?_0x3aaaef:_0x47d618>=_0x3aaaef[_0x1a9af2(0x1b7)]?{'id':_0x3a2ff3,'order':_0x47d618}:_0x3aaaef;},{'id':'','order':0x0}),_0x100fbb=_0x51a4e4[_0x1573e3(0x17b)](this[_0x1573e3(0x1bb)](_0x4cd1f7['id']));_0x51a4e4[_0x1573e3(0x1c0)](_0x4983dc,_0x100fbb+0x1);}else _0x51a4e4[_0x1573e3(0x1c0)](_0x4983dc);return _0x4983dc['on'](_0x1573e3(0x1b5),()=>{const _0x5bfcb9=_0x1573e3;this[_0x5bfcb9(0x1ab)](_0x3f7e30['id']);}),_0x4983dc;}}