@ckeditor/ckeditor5-track-changes
Version:
CKEditor 5 track changes plugin.
23 lines • 11.5 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x39f96d=_0x3acf;(function(_0x29aa59,_0x1a6baf){const _0x11efcf=_0x3acf,_0x93616e=_0x29aa59();while(!![]){try{const _0x2eba54=parseInt(_0x11efcf(0x146))/0x1*(-parseInt(_0x11efcf(0x12b))/0x2)+-parseInt(_0x11efcf(0x15a))/0x3*(-parseInt(_0x11efcf(0x119))/0x4)+-parseInt(_0x11efcf(0x104))/0x5*(parseInt(_0x11efcf(0x132))/0x6)+-parseInt(_0x11efcf(0x121))/0x7+parseInt(_0x11efcf(0x122))/0x8+parseInt(_0x11efcf(0x133))/0x9*(parseInt(_0x11efcf(0x159))/0xa)+parseInt(_0x11efcf(0x12c))/0xb;if(_0x2eba54===_0x1a6baf)break;else _0x93616e['push'](_0x93616e['shift']());}catch(_0x1b1479){_0x93616e['push'](_0x93616e['shift']());}}}(_0x1a03,0x7e617));function _0x3acf(_0xb8b362,_0x4285df){const _0x1a037f=_0x1a03();return _0x3acf=function(_0x3acfad,_0x3f618b){_0x3acfad=_0x3acfad-0x100;let _0x3b680e=_0x1a037f[_0x3acfad];return _0x3b680e;},_0x3acf(_0xb8b362,_0x4285df);}import{Plugin as _0x2f265f}from'ckeditor5/src/core.js';import _0x223fd1 from'./table.js';import{LiveRange as _0x29a93c}from'ckeditor5/src/engine.js';import{getTranslation as _0x3ef240}from'../utils/common-translations.js';function _0x1a03(){const _0x319b32=['getRanges','containsRange','cell','author','createRangeOn','filter','push','markMultiRangeBlockFormat','root','add','$graveyard','requires','commands','getAncestors','has','type','TrackChangesEditing','direction','929252zxLQiS','formatBlock','mergeTableCells','editor','mergeTableCellDown','mergeTableCellUp','element','getCellLocation','4029963PCXiuw','4440720aAmvHc','registerDescriptionCallback','isEnabled','from','size','change','locale','selection','_acceptFormatSuggestionCallbackFactory','272962lGhfXI','2372106CBUatO','registerCustomCallback','TableEditing','*Split\x20cell:*\x20vertically','return','TableUtils','398754bxqtUv','9FvizKv','deletion','_isForcedDefaultExecutionBlock','mergeTableCellLeft','isInContent','insertion','tableCell','getSelectionAffectedTableCells','*Merge\x20cells*','table','highest','enableCommand','setSelection','fromRange','rootName','length','model','getFirstPosition','trackChanges','6ZYKJzJ','find','accept','_areMergableCells','horizontally','set:isEnabled','descriptionFactory','document','execute','_suggestionFactory','low','detach','commandName','get','_areSelectedCellsMergable','findAncestor','*Split\x20cell:*\x20horizontally','splitTableCellHorizontally','_tablePostFixingSubtypes','5774930AynJHh','9QsJQcO','mergeTableCellRight','plugins','afterInit','format','value','subType','getSuggestions','createTableWalker','splitTableCellVertically','refresh','map','markBlockFormat','forceDefaultExecution','10FATxDB','formatInline','stop'];_0x1a03=function(){return _0x319b32;};return _0x1a03();}export default class Nt extends _0x2f265f{static get[_0x39f96d(0x112)](){return[_0x223fd1];}[_0x39f96d(0x15d)](){const _0x5cf1f0=_0x39f96d,_0x3a811b=this[_0x5cf1f0(0x11c)],_0x4b1e13=_0x3a811b[_0x5cf1f0(0x143)][_0x5cf1f0(0x14d)][_0x5cf1f0(0x129)],_0xfb5486=_0x3a811b[_0x5cf1f0(0x128)];if(!_0x3a811b[_0x5cf1f0(0x15c)][_0x5cf1f0(0x115)](_0x5cf1f0(0x12e)))return;const _0x37a704=_0x3a811b[_0x5cf1f0(0x15c)][_0x5cf1f0(0x153)](_0x5cf1f0(0x117)),_0x4a4cbc=_0x3a811b[_0x5cf1f0(0x15c)][_0x5cf1f0(0x153)](_0x5cf1f0(0x131)),_0x2f065e=_0x3a811b[_0x5cf1f0(0x15c)][_0x5cf1f0(0x153)](_0x223fd1);_0x2f065e[_0x5cf1f0(0x158)][_0x5cf1f0(0x10d)](_0x5cf1f0(0x11b)),_0x37a704[_0x5cf1f0(0x13e)](_0x5cf1f0(0x11b),()=>{const _0x145a8d=_0x5cf1f0,_0x423a00=_0x4a4cbc[_0x145a8d(0x13a)](_0x3a811b[_0x145a8d(0x143)][_0x145a8d(0x14d)][_0x145a8d(0x129)]);_0x3a811b[_0x145a8d(0x143)][_0x145a8d(0x127)](()=>{const _0x343b7a=_0x145a8d;_0x37a704[_0x343b7a(0x10e)](_0x423a00,{'commandName':_0x343b7a(0x11b),'commandParams':[]},[],_0x343b7a(0x11b));});}),_0x3a811b[_0x5cf1f0(0x113)][_0x5cf1f0(0x153)](_0x5cf1f0(0x11b))['on'](_0x5cf1f0(0x14e),(_0x2fa19f,_0x482073)=>{const _0x23d772=_0x5cf1f0;_0x3a811b[_0x23d772(0x113)][_0x23d772(0x153)](_0x23d772(0x145))[_0x23d772(0x15f)]&&(_0x482073[_0x23d772(0x142)]>0x0&&_0x482073[_0x482073[_0x23d772(0x142)]-0x1]&&_0x482073[_0x482073[_0x23d772(0x142)]-0x1][_0x23d772(0x103)]||_0x37a704[_0x23d772(0x135)]||this[_0x23d772(0x154)]()||_0x2fa19f[_0x23d772(0x106)]());},{'priority':_0x5cf1f0(0x13d)});for(const _0x25a20f of[_0x5cf1f0(0x11e),_0x5cf1f0(0x15b),_0x5cf1f0(0x11d),_0x5cf1f0(0x136)]){const _0x5a17ed=_0x3a811b[_0x5cf1f0(0x113)][_0x5cf1f0(0x153)](_0x25a20f);_0x37a704[_0x5cf1f0(0x13e)](_0x25a20f,()=>{const _0x5e9a2c=_0x5cf1f0,_0x1aa386=_0x3a811b[_0x5e9a2c(0x143)][_0x5e9a2c(0x14d)][_0x5e9a2c(0x129)][_0x5e9a2c(0x144)]()[_0x5e9a2c(0x114)]()[_0x5e9a2c(0x147)](_0x4efa8d=>_0x4efa8d['is'](_0x5e9a2c(0x11f),_0x5e9a2c(0x139))),_0x2283bd=_0x5a17ed[_0x5e9a2c(0x15f)];_0x3a811b[_0x5e9a2c(0x143)][_0x5e9a2c(0x127)](()=>{const _0xe28cc=_0x5e9a2c;_0x37a704[_0xe28cc(0x10e)]([_0x1aa386,_0x2283bd],{'commandName':_0xe28cc(0x11b),'commandParams':[]},[],_0xe28cc(0x11b));});});}for(const _0x123842 of[_0x5cf1f0(0x163),_0x5cf1f0(0x157)]){const _0x16f1ab=_0x3a811b[_0x5cf1f0(0x113)][_0x5cf1f0(0x153)](_0x123842);_0x37a704[_0x5cf1f0(0x13e)](_0x123842,()=>{const _0xecba0d=_0x5cf1f0,_0x6cce2b=_0x4a4cbc[_0xecba0d(0x13a)](_0x3a811b[_0xecba0d(0x143)][_0xecba0d(0x14d)][_0xecba0d(0x129)])[0x0],_0x132e7d=_0x6cce2b[_0xecba0d(0x155)](_0xecba0d(0x13c)),{column:_0x94a7d1,row:_0xaa3cd6}=_0x4a4cbc[_0xecba0d(0x120)](_0x6cce2b);let _0x1e7e5c=[];if(_0xecba0d(0x14a)==_0x16f1ab[_0xecba0d(0x118)]){const _0x26cb1f=_0x4a4cbc[_0xecba0d(0x162)](_0x132e7d,{'startRow':_0xaa3cd6,'endRow':_0xaa3cd6,'includeAllSlots':!0x0});_0x1e7e5c=Array[_0xecba0d(0x125)](_0x26cb1f)[_0xecba0d(0x101)](_0x37fa6f=>_0x37fa6f[_0xecba0d(0x109)]);}else{const _0x53e104=_0x4a4cbc[_0xecba0d(0x162)](_0x132e7d,{'column':_0x94a7d1,'includeAllSlots':!0x0});_0x1e7e5c=Array[_0xecba0d(0x125)](_0x53e104)[_0xecba0d(0x101)](_0x3d307b=>_0x3d307b[_0xecba0d(0x109)]);}_0x3a811b[_0xecba0d(0x143)][_0xecba0d(0x127)](_0x32419c=>{const _0x54e114=_0xecba0d;_0x37a704[_0x54e114(0x102)](_0x32419c[_0x54e114(0x10b)](_0x6cce2b),{'commandName':_0x123842,'commandParams':[]},_0x1e7e5c,_0x123842);});});}_0x37a704[_0x5cf1f0(0x14c)][_0x5cf1f0(0x123)](_0xcf32a3=>{const _0x3c0a31=_0x5cf1f0;if(_0x3c0a31(0x11a)!=_0xcf32a3[_0x3c0a31(0x116)]&&_0x3c0a31(0x105)!=_0xcf32a3[_0x3c0a31(0x116)])return;const {data:_0x33a8e6}=_0xcf32a3;return _0x33a8e6&&_0x3c0a31(0x11b)==_0x33a8e6[_0x3c0a31(0x152)]?{'type':_0x3c0a31(0x15e),'content':_0x3ef240(_0xfb5486,_0x3c0a31(0x13b))}:void 0x0;}),_0x37a704[_0x5cf1f0(0x14c)][_0x5cf1f0(0x123)](_0x57e467=>{const _0x252e31=_0x5cf1f0;if(_0x252e31(0x11a)!=_0x57e467[_0x252e31(0x116)]&&_0x252e31(0x105)!=_0x57e467[_0x252e31(0x116)])return;const {data:_0xb1ae9d}=_0x57e467;return _0xb1ae9d?_0x252e31(0x163)==_0xb1ae9d[_0x252e31(0x152)]?{'type':_0x252e31(0x15e),'content':_0x3ef240(_0xfb5486,_0x252e31(0x12f))}:_0x252e31(0x157)==_0xb1ae9d[_0x252e31(0x152)]?{'type':_0x252e31(0x15e),'content':_0x3ef240(_0xfb5486,_0x252e31(0x156))}:void 0x0:void 0x0;});const _0x28bb8e=_0x2f065e[_0x5cf1f0(0x12a)]();for(const _0x259b6e of[_0x5cf1f0(0x11e),_0x5cf1f0(0x15b),_0x5cf1f0(0x11d),_0x5cf1f0(0x136)])_0x37a704[_0x5cf1f0(0x14f)][_0x5cf1f0(0x12d)](_0x5cf1f0(0x11a),_0x259b6e,_0x5cf1f0(0x148),_0x28bb8e);for(const _0x2bc6db of[_0x5cf1f0(0x163),_0x5cf1f0(0x157)])_0x37a704[_0x5cf1f0(0x14f)][_0x5cf1f0(0x12d)](_0x5cf1f0(0x11a),_0x2bc6db,_0x5cf1f0(0x148),_0x28bb8e);_0x37a704[_0x5cf1f0(0x14f)][_0x5cf1f0(0x12d)](_0x5cf1f0(0x11a),_0x5cf1f0(0x11b),_0x5cf1f0(0x148),_0x274546=>{const _0x41508e=_0x5cf1f0;_0x3a811b[_0x41508e(0x143)][_0x41508e(0x127)](_0x51a874=>{const _0x27b13c=_0x41508e,_0x8e81b2=Array[_0x27b13c(0x125)](_0x4b1e13[_0x27b13c(0x107)]())[_0x27b13c(0x101)](_0x25d802=>_0x29a93c[_0x27b13c(0x140)](_0x25d802));_0x51a874[_0x27b13c(0x13f)](_0x274546),_0x3a811b[_0x27b13c(0x113)][_0x27b13c(0x153)](_0x27b13c(0x11b))[_0x27b13c(0x100)](),_0x3a811b[_0x27b13c(0x14e)](_0x27b13c(0x11b),{'forceDefaultExecution':!0x0});const _0x3d0012=_0x8e81b2[_0x27b13c(0x10c)](_0x489ef3=>_0x27b13c(0x111)!=_0x489ef3[_0x27b13c(0x10f)][_0x27b13c(0x141)]);_0x3d0012[_0x27b13c(0x142)]>0x0&&_0x51a874[_0x27b13c(0x13f)](_0x3d0012);for(const _0x6ab7f7 of _0x8e81b2)_0x6ab7f7[_0x27b13c(0x151)]();});});for(const _0x4498de of[_0x5cf1f0(0x11e),_0x5cf1f0(0x11d),_0x5cf1f0(0x136),_0x5cf1f0(0x15b)]){const _0x3ca8d7=_0x3a811b[_0x5cf1f0(0x113)][_0x5cf1f0(0x153)](_0x4498de);_0x3ca8d7['on'](_0x5cf1f0(0x14b),(_0x1b8e46,_0x744346,_0x5890ac)=>{const _0x192e88=_0x5cf1f0;if(_0x5890ac){const _0x39b21d=_0x3a811b[_0x192e88(0x143)][_0x192e88(0x14d)][_0x192e88(0x129)][_0x192e88(0x144)]()[_0x192e88(0x114)]()[_0x192e88(0x147)](_0x28e7a7=>_0x28e7a7['is'](_0x192e88(0x11f),_0x192e88(0x139)));this[_0x192e88(0x149)](_0x3ca8d7[_0x192e88(0x15f)],_0x39b21d)||(_0x1b8e46[_0x192e88(0x130)]=!0x1,_0x1b8e46[_0x192e88(0x106)]());}},{'priority':_0x5cf1f0(0x150)});}}[_0x39f96d(0x154)](){const _0x8c4c0e=_0x39f96d,_0x2d892e=this[_0x8c4c0e(0x11c)][_0x8c4c0e(0x113)][_0x8c4c0e(0x153)](_0x8c4c0e(0x11b)),_0x43e2b7=this[_0x8c4c0e(0x11c)][_0x8c4c0e(0x15c)][_0x8c4c0e(0x153)](_0x8c4c0e(0x131));if(!_0x2d892e[_0x8c4c0e(0x124)])return!0x1;const _0x3e254b=_0x43e2b7[_0x8c4c0e(0x13a)](this[_0x8c4c0e(0x11c)][_0x8c4c0e(0x143)][_0x8c4c0e(0x14d)][_0x8c4c0e(0x129)]);for(const _0x52bef4 of _0x3e254b)for(const _0x3977bd of _0x3e254b)if(_0x52bef4!=_0x3977bd&&!this[_0x8c4c0e(0x149)](_0x52bef4,_0x3977bd))return!0x1;return!0x0;}[_0x39f96d(0x149)](_0x530eae,_0x36c8cc){const _0x3cdbd5=_0x39f96d,_0x36c32f=this[_0x3cdbd5(0x11c)][_0x3cdbd5(0x15c)][_0x3cdbd5(0x153)](_0x3cdbd5(0x117)),_0x25e88a=this[_0x3cdbd5(0x11c)][_0x3cdbd5(0x143)][_0x3cdbd5(0x10b)](_0x530eae),_0x1b9f41=this[_0x3cdbd5(0x11c)][_0x3cdbd5(0x143)][_0x3cdbd5(0x10b)](_0x36c8cc),_0x28f788=new Set(),_0x361303=new Set();for(const _0x46eba8 of _0x36c32f[_0x3cdbd5(0x161)]())if((_0x3cdbd5(0x138)==_0x46eba8[_0x3cdbd5(0x116)]||_0x3cdbd5(0x134)==_0x46eba8[_0x3cdbd5(0x116)]||_0x3cdbd5(0x11b)==_0x46eba8[_0x3cdbd5(0x160)])&&_0x46eba8[_0x3cdbd5(0x137)]){for(const _0x1dc6cf of _0x46eba8[_0x3cdbd5(0x107)]())_0x1dc6cf[_0x3cdbd5(0x108)](_0x25e88a,!0x0)&&_0x28f788[_0x3cdbd5(0x110)](_0x46eba8[_0x3cdbd5(0x116)]+':'+_0x46eba8[_0x3cdbd5(0x10a)]['id']),_0x1dc6cf[_0x3cdbd5(0x108)](_0x1b9f41,!0x0)&&_0x361303[_0x3cdbd5(0x110)](_0x46eba8[_0x3cdbd5(0x116)]+':'+_0x46eba8[_0x3cdbd5(0x10a)]['id']);}if(_0x28f788[_0x3cdbd5(0x126)]!=_0x361303[_0x3cdbd5(0x126)])return!0x1;for(const _0x4fd3c8 of _0x28f788)if(!_0x361303[_0x3cdbd5(0x115)](_0x4fd3c8))return!0x1;return!0x0;}}