@ckeditor/ckeditor5-revision-history
Version:
Document revision history feature for CKEditor 5.
23 lines • 8.61 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 _0x46c4(_0x1d9cde,_0x4ab2c6){const _0x2f525b=_0x2f52();return _0x46c4=function(_0x46c49a,_0x1f20a9){_0x46c49a=_0x46c49a-0x111;let _0x2f4c0c=_0x2f525b[_0x46c49a];return _0x2f4c0c;},_0x46c4(_0x1d9cde,_0x4ab2c6);}const _0x266455=_0x46c4;(function(_0x4c663a,_0x1c82d8){const _0x147bc1=_0x46c4,_0x11a37c=_0x4c663a();while(!![]){try{const _0x46af70=parseInt(_0x147bc1(0x139))/0x1*(parseInt(_0x147bc1(0x111))/0x2)+-parseInt(_0x147bc1(0x11b))/0x3+-parseInt(_0x147bc1(0x11e))/0x4+parseInt(_0x147bc1(0x14f))/0x5+-parseInt(_0x147bc1(0x120))/0x6*(parseInt(_0x147bc1(0x134))/0x7)+-parseInt(_0x147bc1(0x15e))/0x8+-parseInt(_0x147bc1(0x121))/0x9*(-parseInt(_0x147bc1(0x133))/0xa);if(_0x46af70===_0x1c82d8)break;else _0x11a37c['push'](_0x11a37c['shift']());}catch(_0x1102af){_0x11a37c['push'](_0x11a37c['shift']());}}}(_0x2f52,0xec29b));import{Plugin as _0x24e5dc}from'ckeditor5/src/core.js';import{RevisionsSidebarView as _0x3bdd46}from'./revisionssidebarview.js';function _0x2f52(){const _0x5919ee=['2466McdAum','12234141hryJQD','name','compare','render','revisionSelected','_revisions','fieldView','action','highlightRevisions','revisionHistory.viewerSidebarContainer','_createRevisionActions','availableRevisionActions','revisionSetName','editor','getIndex','remove','bind','data','10vMtRVJ','17241RbpvAR','_handleRevisionSetName','config','isPremiumPlugin','_sidebarView','7HmQgyS','add','diff','RevisionsSidebar','setName','element','getLaterVisibleRevision','compareAgainstSelected','selectRevision','Name\x20this\x20revision','length','get','requires','init','_revisionsRepository','Compare\x20against\x20selected','revisionHistory.requireRevisionName','_handleEditorDataReady','getEarlierVisibleRevision','_revisionViewer','appendChild','pluginName','6748115MYQxlg','restoreRevision','defaultRevisionActions','_handleDiffChange','isReady','revisionViews','focus','isOfficialPlugin','restoreRevisionCallback','isVisible','isSelected','change:diff','isEnabled','assign','destroy','221848Lmevkb','revisionHistory.revisionActions','nameRevision','listenTo','getRevisionsInDiff','getRevision','303118pwAUOx','select','locale','newRevisionId','_handleRevisionSelected','repository','plugins','revisionHistory','ready','string','1184286nCZSUv','Restore\x20this\x20revision','timePeriodViews','5471104goJbZf','map'];_0x2f52=function(){return _0x5919ee;};return _0x2f52();}import{RevisionViewer as _0x2550ca}from'../../revisionviewer.js';class f extends _0x24e5dc{[_0x266455(0x14c)];[_0x266455(0x147)];[_0x266455(0x138)];static [_0x266455(0x151)]=[_0x266455(0x140),_0x266455(0x150),_0x266455(0x160)];static [_0x266455(0x12c)]=(function(){const _0xa5e11f=_0x266455;return{'compareAgainstSelected':{'name':_0xa5e11f(0x148),'action':({plugins:i},s)=>{const _0x5beef1=_0xa5e11f,e=i[_0x5beef1(0x144)](_0x2550ca),n=e[_0x5beef1(0x116)];let r=e[_0x5beef1(0x13b)][_0x5beef1(0x114)],o=s['id'];n[_0x5beef1(0x12f)](r)>n[_0x5beef1(0x12f)](o)&&([r,o]=[o,r]),e[_0x5beef1(0x123)](r,o);},'isVisible':({plugins:i},s)=>{const _0x41f663=_0xa5e11f,e=i[_0x41f663(0x144)](_0x2550ca);return!(e[_0x41f663(0x116)][_0x41f663(0x162)](e[_0x41f663(0x13b)])[_0x41f663(0x143)]>0x2)&&!s[_0x41f663(0x159)];}},'restoreRevision':{'name':_0xa5e11f(0x11c),'action':(i,{id:s})=>{const _0x245a14=_0xa5e11f;i[_0x245a14(0x136)][_0x245a14(0x144)](_0x245a14(0x118))[_0x245a14(0x157)](s);},'isVisible':({plugins:i},s)=>!!i[_0xa5e11f(0x144)](_0x2550ca)[_0xa5e11f(0x116)][_0xa5e11f(0x13f)](s['id'])},'nameRevision':{'name':_0xa5e11f(0x142),'action':({plugins:i},{id:s,revisionNameView:e})=>{const _0x55dd8f=_0xa5e11f,n=i[_0x55dd8f(0x144)](_0x2550ca),r=n[_0x55dd8f(0x116)][_0x55dd8f(0x14b)](s);n[_0x55dd8f(0x123)](s,r),e[_0x55dd8f(0x155)](),e[_0x55dd8f(0x127)][_0x55dd8f(0x112)]();}}};}());static get[_0x266455(0x14e)](){const _0x3a1ca4=_0x266455;return _0x3a1ca4(0x13c);}static get[_0x266455(0x156)](){return!0x0;}static get[_0x266455(0x137)](){return!0x0;}static get[_0x266455(0x145)](){return[_0x2550ca];}constructor(_0x32286a){const _0x1f2800=_0x266455;super(_0x32286a),this[_0x1f2800(0x14c)]=_0x32286a[_0x1f2800(0x117)][_0x1f2800(0x144)](_0x2550ca),this[_0x1f2800(0x147)]=this[_0x1f2800(0x14c)][_0x1f2800(0x116)],this[_0x1f2800(0x138)]=null;}[_0x266455(0x146)](){const _0x5e27b3=_0x266455,_0x291974=this[_0x5e27b3(0x147)][_0x5e27b3(0x126)],_0x54ab2f=this[_0x5e27b3(0x12b)](),_0x412336=this[_0x5e27b3(0x12e)][_0x5e27b3(0x136)][_0x5e27b3(0x144)](_0x5e27b3(0x12a));this[_0x5e27b3(0x138)]=new _0x3bdd46(this[_0x5e27b3(0x12e)][_0x5e27b3(0x113)],_0x291974,_0x54ab2f,this[_0x5e27b3(0x12e)][_0x5e27b3(0x136)][_0x5e27b3(0x144)](_0x5e27b3(0x149))),this[_0x5e27b3(0x138)]['on'](_0x5e27b3(0x125),this[_0x5e27b3(0x115)][_0x5e27b3(0x131)](this)),this[_0x5e27b3(0x138)]['on'](_0x5e27b3(0x12d),this[_0x5e27b3(0x135)][_0x5e27b3(0x131)](this)),this[_0x5e27b3(0x138)][_0x5e27b3(0x131)](_0x5e27b3(0x15b))['to'](this[_0x5e27b3(0x14c)]),this[_0x5e27b3(0x138)][_0x5e27b3(0x11d)]['on'](_0x5e27b3(0x13a),(_0x3925f4,_0x38dc1b)=>{const _0x41255f=_0x5e27b3;_0x38dc1b[_0x41255f(0x154)]['on'](_0x41255f(0x13a),(_0x4c64f7,_0x34fd0d)=>{const _0x3a38d2=_0x41255f;_0x34fd0d[_0x3a38d2(0x131)](_0x3a38d2(0x15b),_0x3a38d2(0x153))['to'](this[_0x3a38d2(0x14c)]);});}),this[_0x5e27b3(0x138)][_0x5e27b3(0x124)](),this[_0x5e27b3(0x161)](this[_0x5e27b3(0x12e)][_0x5e27b3(0x132)],_0x5e27b3(0x119),this[_0x5e27b3(0x14a)][_0x5e27b3(0x131)](this)),this[_0x5e27b3(0x161)](this[_0x5e27b3(0x14c)],_0x5e27b3(0x15a),this[_0x5e27b3(0x152)][_0x5e27b3(0x131)](this)),_0x412336[_0x5e27b3(0x14d)](this[_0x5e27b3(0x138)][_0x5e27b3(0x13e)]);}[_0x266455(0x15d)](){const _0x159fe1=_0x266455;this[_0x159fe1(0x138)][_0x159fe1(0x13e)][_0x159fe1(0x130)](),this[_0x159fe1(0x138)][_0x159fe1(0x15d)]();}[_0x266455(0x14a)](){const _0xc8e7d0=_0x266455,_0x3ec5fa=this[_0xc8e7d0(0x147)][_0xc8e7d0(0x163)](0x0);if(_0x3ec5fa){const _0x30bd94=this[_0xc8e7d0(0x147)][_0xc8e7d0(0x14b)](_0x3ec5fa['id']);this[_0xc8e7d0(0x14c)][_0xc8e7d0(0x123)](_0x3ec5fa,_0x30bd94);}}[_0x266455(0x115)](_0x18e94f,_0x51b9d8){const _0x42f91e=_0x266455,_0x46ffcf=this[_0x42f91e(0x147)][_0x42f91e(0x163)](_0x51b9d8['id']),_0x4934c5=this[_0x42f91e(0x147)][_0x42f91e(0x14b)](_0x46ffcf['id']);this[_0x42f91e(0x14c)][_0x42f91e(0x123)](_0x46ffcf,_0x4934c5);}[_0x266455(0x135)](_0x338460,_0x5d8f71){const _0xf5c15a=_0x266455;this[_0xf5c15a(0x147)][_0xf5c15a(0x163)](_0x5d8f71['id'])[_0xf5c15a(0x13d)](_0x5d8f71[_0xf5c15a(0x122)]);}[_0x266455(0x152)](_0x368b58,_0x4f6d23,_0x298c95){const _0x2b8f5f=_0x266455,_0x4d29e9=this[_0x2b8f5f(0x147)][_0x2b8f5f(0x162)](_0x298c95);_0x4d29e9[_0x2b8f5f(0x143)]>0x2?(this[_0x2b8f5f(0x138)][_0x2b8f5f(0x129)](_0x4d29e9),this[_0x2b8f5f(0x138)][_0x2b8f5f(0x141)](null)):(this[_0x2b8f5f(0x138)][_0x2b8f5f(0x129)]([]),this[_0x2b8f5f(0x138)][_0x2b8f5f(0x141)](_0x4d29e9[0x0]));}[_0x266455(0x12b)](){const _0x3be3f7=_0x266455,_0xf36bd5=this[_0x3be3f7(0x12e)],_0x503285=f[_0x3be3f7(0x12c)],_0x524d17=_0xf36bd5[_0x3be3f7(0x136)][_0x3be3f7(0x144)](_0x3be3f7(0x15f))||f[_0x3be3f7(0x151)];if(_0x524d17[_0x3be3f7(0x143)])return _0x524d17[_0x3be3f7(0x11f)](_0x101957=>{const _0x49e56c=_0x3be3f7,_0x2bf08c=_0x49e56c(0x11a)==typeof _0x101957?Object[_0x49e56c(0x15c)]({},_0x503285[_0x101957]):_0x101957;return _0x2bf08c[_0x49e56c(0x128)]=_0x2bf08c[_0x49e56c(0x128)][_0x49e56c(0x131)](this,_0xf36bd5),_0x2bf08c[_0x49e56c(0x158)]&&(_0x2bf08c[_0x49e56c(0x158)]=_0x2bf08c[_0x49e56c(0x158)][_0x49e56c(0x131)](this,_0xf36bd5)),_0x2bf08c;});}}export{f as RevisionsSidebar};