@ckeditor/ckeditor5-track-changes
Version:
CKEditor 5 track changes plugin.
23 lines • 11.3 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 _0x4754(_0x4540d0,_0x70caa){const _0x217f17=_0x217f();return _0x4754=function(_0x475464,_0x1b1adb){_0x475464=_0x475464-0xb9;let _0x4871bd=_0x217f17[_0x475464];return _0x4871bd;},_0x4754(_0x4540d0,_0x70caa);}const _0xfac3fc=_0x4754;(function(_0x240dd,_0x2cf625){const _0xd7ef17=_0x4754,_0x3a491e=_0x240dd();while(!![]){try{const _0x367d5f=-parseInt(_0xd7ef17(0xd6))/0x1*(parseInt(_0xd7ef17(0xdc))/0x2)+-parseInt(_0xd7ef17(0xf2))/0x3*(-parseInt(_0xd7ef17(0x104))/0x4)+parseInt(_0xd7ef17(0xed))/0x5+-parseInt(_0xd7ef17(0xff))/0x6+-parseInt(_0xd7ef17(0x117))/0x7*(-parseInt(_0xd7ef17(0xf1))/0x8)+-parseInt(_0xd7ef17(0xfd))/0x9+parseInt(_0xd7ef17(0xea))/0xa;if(_0x367d5f===_0x2cf625)break;else _0x3a491e['push'](_0x3a491e['shift']());}catch(_0xd95be2){_0x3a491e['push'](_0x3a491e['shift']());}}}(_0x217f,0xe068e));import{Plugin as _0x964918}from'ckeditor5/src/core.js';import{TrackChangesTable as _0x4c2b8b}from'./table.js';import{ModelLiveRange as _0xf5d9eb}from'ckeditor5/src/engine.js';function _0x217f(){const _0x1c36b4=['504123IkVigz','formatInline','mergeTableCells','descriptionFactory','splitTableCellHorizontally','getSuggestions','6IIiLJt','getCellLocation','get','filter','commands','afterInit','isInContent','mergeTableCellLeft','from','registerDescriptionCallback','getAncestors','splitTableCellVertically','*Merge\x20cells*','isEnabled','4622630KbeGvf','_tablePostFixingSubtypes','selection','8002990ulTBrD','requires','set:isEnabled','_areSelectedCellsMergable','2920YwflHK','3353145CHikWu','stop','TrackChangesEditing','$graveyard','createRangeOn','enableCommand','forceDefaultExecution','containsRange','has','horizontally','detach','8681103UfRexE','author','2795478cmZBaP','getFirstPosition','format','setSelection','highest','4huwvzO','root','rootName','deletion','low','execute','markBlockFormat','_acceptFormatSuggestionCallbackFactory','push','tableCell','editor','mergeTableCellDown','TableUtils','locale','mergeTableCellRight','getRanges','accept','refresh','type','13069GMxOVJ','*Split\x20cell:*\x20horizontally','value','element','return','add','change','direction','model','createTableWalker','registerCustomCallback','_isForcedDefaultExecutionBlock','formatBlock','*Split\x20cell:*\x20vertically','mergeTableCellUp','findAncestor','commandName','table','_suggestionFactory','getSelectionAffectedTableCells','fromRange','cell','_areMergableCells','subType','trackChanges','TableEditing','plugins','length','size','insertion','markMultiRangeBlockFormat','find','map','document'];_0x217f=function(){return _0x1c36b4;};return _0x217f();}import{getTranslation as _0x3749ec}from'../utils/common-translations.js';export class TrackChangesTableMergeSplit extends _0x964918{static get[_0xfac3fc(0xee)](){return[_0x4c2b8b];}[_0xfac3fc(0xe1)](){const _0x4499ef=_0xfac3fc,_0x7749d1=this[_0x4499ef(0x10e)],_0x2441f6=_0x7749d1[_0x4499ef(0xbc)][_0x4499ef(0xd5)][_0x4499ef(0xec)],_0x2ad6b0=_0x7749d1[_0x4499ef(0x111)];if(!_0x7749d1[_0x4499ef(0xce)][_0x4499ef(0xfa)](_0x4499ef(0xcd)))return;const _0x9ad7fc=_0x7749d1[_0x4499ef(0xce)][_0x4499ef(0xde)](_0x4499ef(0xf4)),_0xa9ceb4=_0x7749d1[_0x4499ef(0xce)][_0x4499ef(0xde)](_0x4499ef(0x110)),_0x59e866=_0x7749d1[_0x4499ef(0xce)][_0x4499ef(0xde)](_0x4c2b8b);_0x59e866[_0x4499ef(0xeb)][_0x4499ef(0x10c)](_0x4499ef(0xd8)),_0x9ad7fc[_0x4499ef(0xf7)](_0x4499ef(0xd8),()=>{const _0xd182ce=_0x4499ef,_0x57fe71=_0xa9ceb4[_0xd182ce(0xc7)](_0x7749d1[_0xd182ce(0xbc)][_0xd182ce(0xd5)][_0xd182ce(0xec)]);_0x7749d1[_0xd182ce(0xbc)][_0xd182ce(0xba)](()=>{const _0x435108=_0xd182ce;_0x9ad7fc[_0x435108(0xd2)](_0x57fe71,{'commandName':_0x435108(0xd8),'commandParams':[]},[],_0x435108(0xd8));});}),_0x7749d1[_0x4499ef(0xe0)][_0x4499ef(0xde)](_0x4499ef(0xd8))['on'](_0x4499ef(0x109),(_0x3da751,_0x351585)=>{const _0x2de240=_0x4499ef;_0x7749d1[_0x2de240(0xe0)][_0x2de240(0xde)](_0x2de240(0xcc))[_0x2de240(0x119)]&&(_0x351585[_0x2de240(0xcf)]>0x0&&_0x351585[_0x351585[_0x2de240(0xcf)]-0x1]&&_0x351585[_0x351585[_0x2de240(0xcf)]-0x1][_0x2de240(0xf8)]||_0x9ad7fc[_0x2de240(0xbf)]||this[_0x2de240(0xf0)]()||_0x3da751[_0x2de240(0xf3)]());},{'priority':_0x4499ef(0x103)});for(const _0x3dbdcc of[_0x4499ef(0xc2),_0x4499ef(0x112),_0x4499ef(0x10f),_0x4499ef(0xe3)]){const _0x4f3b7b=_0x7749d1[_0x4499ef(0xe0)][_0x4499ef(0xde)](_0x3dbdcc);_0x9ad7fc[_0x4499ef(0xf7)](_0x3dbdcc,()=>{const _0x35b827=_0x4499ef,_0xb8c6a8=_0x7749d1[_0x35b827(0xbc)][_0x35b827(0xd5)][_0x35b827(0xec)][_0x35b827(0x100)]()[_0x35b827(0xe6)]()[_0x35b827(0xd3)](_0xb7c5b5=>_0xb7c5b5['is'](_0x35b827(0x11a),_0x35b827(0x10d))),_0x521f84=_0x4f3b7b[_0x35b827(0x119)];_0x7749d1[_0x35b827(0xbc)][_0x35b827(0xba)](()=>{const _0x2433bc=_0x35b827;_0x9ad7fc[_0x2433bc(0xd2)]([_0xb8c6a8,_0x521f84],{'commandName':_0x2433bc(0xd8),'commandParams':[]},[],_0x2433bc(0xd8));});});}for(const _0x2ffcee of[_0x4499ef(0xe7),_0x4499ef(0xda)]){const _0x3d985b=_0x7749d1[_0x4499ef(0xe0)][_0x4499ef(0xde)](_0x2ffcee);_0x9ad7fc[_0x4499ef(0xf7)](_0x2ffcee,()=>{const _0x399e07=_0x4499ef,_0x5cee07=_0xa9ceb4[_0x399e07(0xc7)](_0x7749d1[_0x399e07(0xbc)][_0x399e07(0xd5)][_0x399e07(0xec)])[0x0],_0x2f2a98=_0x5cee07[_0x399e07(0xc3)](_0x399e07(0xc5)),{column:_0x28727e,row:_0x1648c9}=_0xa9ceb4[_0x399e07(0xdd)](_0x5cee07);let _0x4d1138=[];if(_0x399e07(0xfb)==_0x3d985b[_0x399e07(0xbb)]){const _0x2aaaac=_0xa9ceb4[_0x399e07(0xbd)](_0x2f2a98,{'startRow':_0x1648c9,'endRow':_0x1648c9,'includeAllSlots':!0x0});_0x4d1138=Array[_0x399e07(0xe4)](_0x2aaaac)[_0x399e07(0xd4)](_0x30a863=>_0x30a863[_0x399e07(0xc9)]);}else{const _0x362535=_0xa9ceb4[_0x399e07(0xbd)](_0x2f2a98,{'column':_0x28727e,'includeAllSlots':!0x0});_0x4d1138=Array[_0x399e07(0xe4)](_0x362535)[_0x399e07(0xd4)](_0x7b6930=>_0x7b6930[_0x399e07(0xc9)]);}_0x7749d1[_0x399e07(0xbc)][_0x399e07(0xba)](_0x8ea375=>{const _0xb96969=_0x399e07;_0x9ad7fc[_0xb96969(0x10a)](_0x8ea375[_0xb96969(0xf6)](_0x5cee07),{'commandName':_0x2ffcee,'commandParams':[]},_0x4d1138,_0x2ffcee);});});}_0x9ad7fc[_0x4499ef(0xd9)][_0x4499ef(0xe5)](_0x1e789b=>{const _0x5d3cb5=_0x4499ef;if(_0x5d3cb5(0xc0)!=_0x1e789b[_0x5d3cb5(0x116)]&&_0x5d3cb5(0xd7)!=_0x1e789b[_0x5d3cb5(0x116)])return;const {data:_0x44af96}=_0x1e789b;return _0x44af96&&_0x5d3cb5(0xd8)==_0x44af96[_0x5d3cb5(0xc4)]?{'type':_0x5d3cb5(0x101),'content':_0x3749ec(_0x2ad6b0,_0x5d3cb5(0xe8))}:void 0x0;}),_0x9ad7fc[_0x4499ef(0xd9)][_0x4499ef(0xe5)](_0x3163f8=>{const _0x1833fd=_0x4499ef;if(_0x1833fd(0xc0)!=_0x3163f8[_0x1833fd(0x116)]&&_0x1833fd(0xd7)!=_0x3163f8[_0x1833fd(0x116)])return;const {data:_0x5c0b0b}=_0x3163f8;return _0x5c0b0b?_0x1833fd(0xe7)==_0x5c0b0b[_0x1833fd(0xc4)]?{'type':_0x1833fd(0x101),'content':_0x3749ec(_0x2ad6b0,_0x1833fd(0xc1))}:_0x1833fd(0xda)==_0x5c0b0b[_0x1833fd(0xc4)]?{'type':_0x1833fd(0x101),'content':_0x3749ec(_0x2ad6b0,_0x1833fd(0x118))}:void 0x0:void 0x0;});const _0x431fda=_0x59e866[_0x4499ef(0x10b)]();for(const _0x17e242 of[_0x4499ef(0xc2),_0x4499ef(0x112),_0x4499ef(0x10f),_0x4499ef(0xe3)])_0x9ad7fc[_0x4499ef(0xc6)][_0x4499ef(0xbe)](_0x4499ef(0xc0),_0x17e242,_0x4499ef(0x114),_0x431fda);for(const _0x35da72 of[_0x4499ef(0xe7),_0x4499ef(0xda)])_0x9ad7fc[_0x4499ef(0xc6)][_0x4499ef(0xbe)](_0x4499ef(0xc0),_0x35da72,_0x4499ef(0x114),_0x431fda);_0x9ad7fc[_0x4499ef(0xc6)][_0x4499ef(0xbe)](_0x4499ef(0xc0),_0x4499ef(0xd8),_0x4499ef(0x114),_0x2ddd6d=>{const _0x1be9ca=_0x4499ef;_0x7749d1[_0x1be9ca(0xbc)][_0x1be9ca(0xba)](_0x5c5195=>{const _0x14f420=_0x1be9ca,_0x551607=Array[_0x14f420(0xe4)](_0x2441f6[_0x14f420(0x113)]())[_0x14f420(0xd4)](_0x94832f=>_0xf5d9eb[_0x14f420(0xc8)](_0x94832f));_0x5c5195[_0x14f420(0x102)](_0x2ddd6d),_0x7749d1[_0x14f420(0xe0)][_0x14f420(0xde)](_0x14f420(0xd8))[_0x14f420(0x115)](),_0x7749d1[_0x14f420(0x109)](_0x14f420(0xd8),{'forceDefaultExecution':!0x0});const _0x5d4a02=_0x551607[_0x14f420(0xdf)](_0x19166c=>_0x14f420(0xf5)!=_0x19166c[_0x14f420(0x105)][_0x14f420(0x106)]);_0x5d4a02[_0x14f420(0xcf)]>0x0&&_0x5c5195[_0x14f420(0x102)](_0x5d4a02);for(const _0x36bb2b of _0x551607)_0x36bb2b[_0x14f420(0xfc)]();});});for(const _0x14da78 of[_0x4499ef(0xc2),_0x4499ef(0x10f),_0x4499ef(0xe3),_0x4499ef(0x112)]){const _0x590cfd=_0x7749d1[_0x4499ef(0xe0)][_0x4499ef(0xde)](_0x14da78);_0x590cfd['on'](_0x4499ef(0xef),(_0x3bcd2f,_0x94a60b,_0x3bbd33)=>{const _0x11046f=_0x4499ef;if(_0x3bbd33){const _0x179b9c=_0x7749d1[_0x11046f(0xbc)][_0x11046f(0xd5)][_0x11046f(0xec)][_0x11046f(0x100)]()[_0x11046f(0xe6)]()[_0x11046f(0xd3)](_0x60468e=>_0x60468e['is'](_0x11046f(0x11a),_0x11046f(0x10d)));this[_0x11046f(0xca)](_0x590cfd[_0x11046f(0x119)],_0x179b9c)||(_0x3bcd2f[_0x11046f(0x11b)]=!0x1,_0x3bcd2f[_0x11046f(0xf3)]());}},{'priority':_0x4499ef(0x108)});}}[_0xfac3fc(0xf0)](){const _0x5ad0b5=_0xfac3fc,_0xfe30ff=this[_0x5ad0b5(0x10e)][_0x5ad0b5(0xe0)][_0x5ad0b5(0xde)](_0x5ad0b5(0xd8)),_0x2df90b=this[_0x5ad0b5(0x10e)][_0x5ad0b5(0xce)][_0x5ad0b5(0xde)](_0x5ad0b5(0x110));if(!_0xfe30ff[_0x5ad0b5(0xe9)])return!0x1;const _0x45e3d0=_0x2df90b[_0x5ad0b5(0xc7)](this[_0x5ad0b5(0x10e)][_0x5ad0b5(0xbc)][_0x5ad0b5(0xd5)][_0x5ad0b5(0xec)]);for(const _0x2fd152 of _0x45e3d0)for(const _0x2bfc6a of _0x45e3d0)if(_0x2fd152!=_0x2bfc6a&&!this[_0x5ad0b5(0xca)](_0x2fd152,_0x2bfc6a))return!0x1;return!0x0;}[_0xfac3fc(0xca)](_0x362fd3,_0x37d7df){const _0x37da16=_0xfac3fc,_0x59807a=this[_0x37da16(0x10e)][_0x37da16(0xce)][_0x37da16(0xde)](_0x37da16(0xf4)),_0x654441=this[_0x37da16(0x10e)][_0x37da16(0xbc)][_0x37da16(0xf6)](_0x362fd3),_0xba0822=this[_0x37da16(0x10e)][_0x37da16(0xbc)][_0x37da16(0xf6)](_0x37d7df),_0x277b57=new Set(),_0x44025e=new Set();for(const _0x83086b of _0x59807a[_0x37da16(0xdb)]())if((_0x37da16(0xd1)==_0x83086b[_0x37da16(0x116)]||_0x37da16(0x107)==_0x83086b[_0x37da16(0x116)]||_0x37da16(0xd8)==_0x83086b[_0x37da16(0xcb)])&&_0x83086b[_0x37da16(0xe2)]){for(const _0x32f57b of _0x83086b[_0x37da16(0x113)]())_0x32f57b[_0x37da16(0xf9)](_0x654441,!0x0)&&_0x277b57[_0x37da16(0xb9)](_0x83086b[_0x37da16(0x116)]+':'+_0x83086b[_0x37da16(0xfe)]['id']),_0x32f57b[_0x37da16(0xf9)](_0xba0822,!0x0)&&_0x44025e[_0x37da16(0xb9)](_0x83086b[_0x37da16(0x116)]+':'+_0x83086b[_0x37da16(0xfe)]['id']);}if(_0x277b57[_0x37da16(0xd0)]!=_0x44025e[_0x37da16(0xd0)])return!0x1;for(const _0x2b8298 of _0x277b57)if(!_0x44025e[_0x37da16(0xfa)](_0x2b8298))return!0x1;return!0x0;}}