UNPKG

@ckeditor/ckeditor5-revision-history

Version:

Document revision history feature for CKEditor 5.

23 lines 5.85 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(_0x3919a1,_0x4ad07d){const _0x39cc12=_0x4717,_0x2419c1=_0x3919a1();while(!![]){try{const _0x3eb639=parseInt(_0x39cc12(0xfb))/0x1*(-parseInt(_0x39cc12(0x118))/0x2)+-parseInt(_0x39cc12(0xfe))/0x3*(-parseInt(_0x39cc12(0x10a))/0x4)+parseInt(_0x39cc12(0x113))/0x5+-parseInt(_0x39cc12(0x11f))/0x6*(parseInt(_0x39cc12(0xfa))/0x7)+-parseInt(_0x39cc12(0x112))/0x8*(-parseInt(_0x39cc12(0x102))/0x9)+-parseInt(_0x39cc12(0x111))/0xa+-parseInt(_0x39cc12(0x11d))/0xb*(-parseInt(_0x39cc12(0x124))/0xc);if(_0x3eb639===_0x4ad07d)break;else _0x2419c1['push'](_0x2419c1['shift']());}catch(_0x121614){_0x2419c1['push'](_0x2419c1['shift']());}}}(_0x452d,0x78237));import{Collection as _0x2f619a}from'ckeditor5/src/utils.js';import{IconThreeVerticalDots as _0x27738b}from'ckeditor5/src/icons.js';function _0x452d(){const _0x371627=['execute','add','isEnabled','action','6560620PwzCAE','1765912UFburb','4136765lglbkW','model','_action','extendTemplate','class','10212tGhOzB','items','buttonView','change:isActionsDropdownOpen','Show\x20more\x20items','3443BrLnOM','map','156JkkxwG','function','isOpen','panelPosition','listenTo','2424IgjXDS','bindTemplate','isActionsDropdownOpen','Name\x20this\x20revision','listView','stopPropagation','ck-on','isReady','menuitem','64589MjFXqL','69IpoVoo','find','Compare\x20against\x20selected','43887TKObPI','button','locale','bind','9XFTcWz','Restore\x20this\x20revision','source','set','children','first','menu','isVisible','172hoTkgS','name','ck-revision-history-sidebar__revision__actions'];_0x452d=function(){return _0x371627;};return _0x452d();}function _0x4717(_0x24f2c8,_0x173d11){const _0x452d2a=_0x452d();return _0x4717=function(_0x4717b1,_0x248289){_0x4717b1=_0x4717b1-0xfa;let _0x2657ea=_0x452d2a[_0x4717b1];return _0x2657ea;},_0x4717(_0x24f2c8,_0x173d11);}import{UIModel as _0x102507,addListToDropdown as _0xdbe3f1,createDropdown as _0x31e00d}from'ckeditor5/src/ui.js';import{getTranslation as _0x97fa13}from'../../utils/common-translations.js';import'../../../theme/revision/revisionactions.css';export function createActionsDropdownView(_0x5c6b81,_0x29475e){const _0x331a36=_0x4717,_0x523f79=_0x5c6b81[_0x331a36(0x125)],_0xdeee53=_0x5c6b81[_0x331a36(0x100)],_0x206f9b=_0x31e00d(_0xdeee53);_0x206f9b[_0x331a36(0x122)]='sw';const _0x337911=function(_0x373492,_0x1b3d3c){const _0x151bee=_0x331a36,_0x1d5a76=function(_0x5ead63,_0x1baed2){const _0x3cc1be=_0x4717,_0x475ae4=_0x5ead63[_0x3cc1be(0x100)],_0x38696b={'Compare\x20against\x20selected':_0x97fa13(_0x475ae4,_0x3cc1be(0xfd)),'Name\x20this\x20revision':_0x97fa13(_0x475ae4,_0x3cc1be(0x127)),'Restore\x20this\x20revision':_0x97fa13(_0x475ae4,_0x3cc1be(0x103))};return _0x1baed2[_0x3cc1be(0x11e)](_0x553d5d=>{const _0x1551ef=_0x3cc1be,_0x3ef3d4=_0x38696b[_0x553d5d[_0x1551ef(0x10b)]];return _0x3ef3d4&&_0x3ef3d4!==_0x553d5d[_0x1551ef(0x10b)]&&(_0x553d5d[_0x1551ef(0x10b)]=_0x3ef3d4),_0x553d5d;});}(_0x373492,_0x1b3d3c),_0x2726f8=new _0x2f619a();for(const _0x3f7313 of _0x1d5a76){const _0xde774d={'type':_0x151bee(0xff),'model':new _0x102507({'label':_0x3f7313[_0x151bee(0x10b)],'class':_0x3f7313[_0x151bee(0x117)],'withText':!0x0,'role':_0x151bee(0x12c),'_action':_0x3f7313[_0x151bee(0x110)]})};_0xde774d[_0x151bee(0x114)][_0x151bee(0x101)](_0x151bee(0x10f))['to'](_0x373492,_0x151bee(0x126),_0x118364=>_0x151bee(0x120)!=typeof _0x3f7313[_0x151bee(0x10f)]||(!_0x118364||_0x3f7313[_0x151bee(0x10f)](_0x373492))),_0x2726f8[_0x151bee(0x10e)](_0xde774d);}return _0x2726f8;}(_0x5c6b81,_0x29475e);return _0x5c6b81[_0x331a36(0x101)](_0x331a36(0x126))['to'](_0x206f9b,_0x331a36(0x121)),_0x206f9b[_0x331a36(0x11a)][_0x331a36(0x105)]({'label':_0x97fa13(_0xdeee53,_0x331a36(0x11c)),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x27738b}),_0x206f9b[_0x331a36(0x116)]({'attributes':{'class':[_0x331a36(0x10c),_0x523f79['if'](_0x331a36(0x126),_0x331a36(0x12a))]},'on':{'click':_0x523f79['to'](_0x2e2a38=>_0x2e2a38[_0x331a36(0x129)]())}}),_0x206f9b['on'](_0x331a36(0x10d),_0x20ee51=>{const _0x3aac7a=_0x331a36;_0x5c6b81[_0x3aac7a(0x12b)]&&_0x3aac7a(0x120)==typeof _0x20ee51[_0x3aac7a(0x104)][_0x3aac7a(0x115)]&&_0x20ee51[_0x3aac7a(0x104)][_0x3aac7a(0x115)](_0x5c6b81);}),_0xdbe3f1(_0x206f9b,_0x337911,{'role':_0x331a36(0x108)}),_0x206f9b[_0x331a36(0x123)](_0x5c6b81,_0x331a36(0x11b),(_0xd56a24,_0x3ff869,_0x2416d4)=>{const _0x5cad80=_0x331a36;if(_0x2416d4)for(const _0x3d7840 of _0x206f9b[_0x5cad80(0x128)][_0x5cad80(0x119)]){const _0x1dc761=_0x3d7840[_0x5cad80(0x106)][_0x5cad80(0x107)],_0xe6bd7b=_0x29475e[_0x5cad80(0xfc)](_0x75d3c1=>_0x75d3c1[_0x5cad80(0x110)]===_0x1dc761[_0x5cad80(0x115)])[_0x5cad80(0x109)];_0x3d7840[_0x5cad80(0x109)]=void 0x0===_0xe6bd7b||_0xe6bd7b(_0x5c6b81);}}),_0x206f9b;}