UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 9.5 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 _0x5450(){const _0x1eee29=['handleListReversedCommand','from','change','forward','length','TrackChangesEditing','LegacyListUtils','7435242cNYtLu','formatBlock','getSelectedBlocks','has','element','listType','*Format:*\x20set\x20order\x20to\x20regular','replace','listStyle','_getSuggestionBlocksForListStyle','6079880CXbtlZ','before','selection','listReversed','createPositionAt','locale','handleListStyleCommand','4187418iqZEji','*Format:*\x20set\x20start\x20index\x20to\x20%0','default','document','getAttribute','LegacyListPropertiesEditing','listItem','parent','get','type','descriptionFactory','handleDescriptions','handleListStartCommand','_LIST_','reversed','map','656gvsuHX','unshift','filter','config','*Format:*\x20set\x20order\x20to\x20reversed','getListTypeFromListStyleType','backward','markMultiRangeBlockFormat','model','styles','formatInline','startIndex','numbered','list.properties','bind','push','3882040FBwUzm','commandName','getLastPosition','registerDescriptionCallback','editor','*Change\x20to:*\x20%0','2gizYqm','getSiblingNodes','toUpperCase','flat','ELEMENT_','899791qobNEs','listStart','afterInit','format','6589156rsruFR','getFirstPosition','211914xYPKLJ','plugins','enableCommand','createRange','commandParams','_getTranslationKeyForListStyle','_getSuggestionBlocks'];_0x5450=function(){return _0x1eee29;};return _0x5450();}const _0x2aed91=_0x581f;function _0x581f(_0xff1bc2,_0x1b0bc8){const _0x545036=_0x5450();return _0x581f=function(_0x581f5b,_0x479024){_0x581f5b=_0x581f5b-0x10c;let _0x45f145=_0x545036[_0x581f5b];return _0x45f145;},_0x581f(_0xff1bc2,_0x1b0bc8);}(function(_0x2e13ff,_0x576962){const _0x2a1481=_0x581f,_0x124109=_0x2e13ff();while(!![]){try{const _0x4f418c=-parseInt(_0x2a1481(0x118))/0x1*(parseInt(_0x2a1481(0x113))/0x2)+parseInt(_0x2a1481(0x13d))/0x3+parseInt(_0x2a1481(0x136))/0x4+-parseInt(_0x2a1481(0x10d))/0x5+-parseInt(_0x2a1481(0x12c))/0x6+-parseInt(_0x2a1481(0x11c))/0x7+-parseInt(_0x2a1481(0x14d))/0x8*(-parseInt(_0x2a1481(0x11e))/0x9);if(_0x4f418c===_0x576962)break;else _0x124109['push'](_0x124109['shift']());}catch(_0x3a80d8){_0x124109['push'](_0x124109['shift']());}}}(_0x5450,0xf1a8a));import{Plugin as _0x7a0148}from'ckeditor5/src/core.js';import{getTranslation as _0x321499}from'../utils/common-translations.js';export default class Q extends _0x7a0148{[_0x2aed91(0x11a)](){const _0x41dad6=_0x2aed91;if(!this[_0x41dad6(0x111)][_0x41dad6(0x11f)][_0x41dad6(0x12f)](_0x41dad6(0x142)))return;const _0x571bd1=this[_0x41dad6(0x111)][_0x41dad6(0x150)][_0x41dad6(0x145)](_0x41dad6(0x15a)),_0x5a3c35=this[_0x41dad6(0x111)][_0x41dad6(0x11f)][_0x41dad6(0x145)](_0x41dad6(0x12a));_0x571bd1[_0x41dad6(0x156)]&&_0x5a3c35[_0x41dad6(0x120)](_0x41dad6(0x134),this[_0x41dad6(0x13c)][_0x41dad6(0x15b)](this)),_0x571bd1[_0x41dad6(0x14b)]&&_0x5a3c35[_0x41dad6(0x120)](_0x41dad6(0x139),this[_0x41dad6(0x125)][_0x41dad6(0x15b)](this)),_0x571bd1[_0x41dad6(0x158)]&&_0x5a3c35[_0x41dad6(0x120)](_0x41dad6(0x119),this[_0x41dad6(0x149)][_0x41dad6(0x15b)](this)),_0x5a3c35[_0x41dad6(0x147)][_0x41dad6(0x110)](this[_0x41dad6(0x148)][_0x41dad6(0x15b)](this));}[_0x2aed91(0x13c)](_0x3f0d4a,_0x3d3425={}){const _0x1d3cc0=_0x2aed91,_0x5ecdbf=this[_0x1d3cc0(0x111)][_0x1d3cc0(0x11f)][_0x1d3cc0(0x145)](_0x1d3cc0(0x12a)),_0x369e7c=this[_0x1d3cc0(0x135)]();this[_0x1d3cc0(0x111)][_0x1d3cc0(0x155)][_0x1d3cc0(0x127)](()=>{const _0x2b01c1=_0x1d3cc0;_0x5ecdbf[_0x2b01c1(0x154)](_0x369e7c,{'commandName':_0x2b01c1(0x134),'commandParams':[{'type':_0x3d3425[_0x2b01c1(0x146)]}],'formatGroupId':_0x2b01c1(0x134)});});}[_0x2aed91(0x125)](_0x3688f3,_0x1c4bbe={}){const _0x16f600=_0x2aed91,_0x5764dc=this[_0x16f600(0x111)][_0x16f600(0x11f)][_0x16f600(0x145)](_0x16f600(0x12a)),_0x1647f8=this[_0x16f600(0x124)](_0x3a8a4f=>_0x3a8a4f['is'](_0x16f600(0x130),_0x16f600(0x143))&&_0x16f600(0x159)===_0x3a8a4f[_0x16f600(0x141)](_0x16f600(0x131)));if(_0x1647f8[_0x16f600(0x129)]<0x1)return;const _0x38dd4a=_0x1647f8[_0x16f600(0x14c)](_0x4090e6=>this[_0x16f600(0x111)][_0x16f600(0x155)][_0x16f600(0x121)](this[_0x16f600(0x111)][_0x16f600(0x155)][_0x16f600(0x13a)](_0x4090e6,_0x16f600(0x137)),this[_0x16f600(0x111)][_0x16f600(0x155)][_0x16f600(0x13a)](_0x4090e6,0x0)));this[_0x16f600(0x111)][_0x16f600(0x155)][_0x16f600(0x127)](()=>{const _0x657696=_0x16f600;_0x5764dc[_0x657696(0x154)](_0x38dd4a,{'commandName':_0x657696(0x139),'commandParams':[{'reversed':_0x1c4bbe[_0x657696(0x14b)]}],'formatGroupId':_0x657696(0x139)});});}[_0x2aed91(0x149)](_0x194e97,_0x38e439={}){const _0x964ad6=_0x2aed91,_0x29b2e7=this[_0x964ad6(0x111)][_0x964ad6(0x11f)][_0x964ad6(0x145)](_0x964ad6(0x12a)),_0x3a74ef=this[_0x964ad6(0x124)](_0x54d454=>_0x54d454['is'](_0x964ad6(0x130),_0x964ad6(0x143))&&_0x964ad6(0x159)===_0x54d454[_0x964ad6(0x141)](_0x964ad6(0x131)));if(_0x3a74ef[_0x964ad6(0x129)]<0x1)return;const _0x8cfe22=_0x3a74ef[_0x964ad6(0x14c)](_0x538c14=>this[_0x964ad6(0x111)][_0x964ad6(0x155)][_0x964ad6(0x121)](this[_0x964ad6(0x111)][_0x964ad6(0x155)][_0x964ad6(0x13a)](_0x538c14,_0x964ad6(0x137)),this[_0x964ad6(0x111)][_0x964ad6(0x155)][_0x964ad6(0x13a)](_0x538c14,0x0)));this[_0x964ad6(0x111)][_0x964ad6(0x155)][_0x964ad6(0x127)](()=>{const _0x5a36b4=_0x964ad6;_0x29b2e7[_0x5a36b4(0x154)](_0x8cfe22,{'commandName':_0x5a36b4(0x119),'commandParams':[{'startIndex':_0x38e439[_0x5a36b4(0x158)]}],'formatGroupId':_0x5a36b4(0x119)});});}[_0x2aed91(0x148)](_0x2e6beb){const _0x3ad943=_0x2aed91;if(_0x3ad943(0x12d)!=_0x2e6beb[_0x3ad943(0x146)]&&_0x3ad943(0x157)!=_0x2e6beb[_0x3ad943(0x146)])return;const _0x188994=this[_0x3ad943(0x111)][_0x3ad943(0x13b)],{data:_0xba4f1b}=_0x2e6beb;if(!_0xba4f1b)return;let _0x37eff6,_0x4459fb;switch(_0xba4f1b[_0x3ad943(0x10e)]){case _0x3ad943(0x134):_0x37eff6=_0x3ad943(0x112),_0x4459fb={'type':_0x3ad943(0x11b),'content':_0x321499(_0x188994,_0x37eff6,_0x321499(_0x188994,this[_0x3ad943(0x123)](_0xba4f1b[_0x3ad943(0x122)][0x0][_0x3ad943(0x146)])))};break;case _0x3ad943(0x139):_0x37eff6=_0xba4f1b[_0x3ad943(0x122)][0x0][_0x3ad943(0x14b)]?_0x3ad943(0x151):_0x3ad943(0x132),_0x4459fb={'type':_0x3ad943(0x11b),'content':_0x321499(_0x188994,_0x37eff6)};break;case _0x3ad943(0x119):_0x37eff6=_0x3ad943(0x13e),_0x4459fb={'type':_0x3ad943(0x11b),'content':_0x321499(_0x188994,_0x37eff6,_0xba4f1b[_0x3ad943(0x122)][0x0][_0x3ad943(0x158)])};}return _0x4459fb;}[_0x2aed91(0x135)](){const _0x18f0b7=_0x2aed91,_0x3d71e0=this[_0x18f0b7(0x111)][_0x18f0b7(0x11f)][_0x18f0b7(0x145)](_0x18f0b7(0x12b));let _0x47f44e=Array[_0x18f0b7(0x126)](this[_0x18f0b7(0x111)][_0x18f0b7(0x155)][_0x18f0b7(0x140)][_0x18f0b7(0x138)][_0x18f0b7(0x12e)]());return _0x47f44e[0x0]?.['is'](_0x18f0b7(0x130),_0x18f0b7(0x143))&&_0x47f44e[_0x18f0b7(0x14e)](..._0x3d71e0[_0x18f0b7(0x114)](this[_0x18f0b7(0x111)][_0x18f0b7(0x155)][_0x18f0b7(0x140)][_0x18f0b7(0x138)][_0x18f0b7(0x11d)](),_0x18f0b7(0x153))),_0x47f44e[_0x47f44e[_0x18f0b7(0x129)]-0x1]?.['is'](_0x18f0b7(0x130),_0x18f0b7(0x143))&&_0x47f44e[_0x18f0b7(0x10c)](..._0x3d71e0[_0x18f0b7(0x114)](this[_0x18f0b7(0x111)][_0x18f0b7(0x155)][_0x18f0b7(0x140)][_0x18f0b7(0x138)][_0x18f0b7(0x10f)](),_0x18f0b7(0x128))),_0x47f44e=[...new Set(_0x47f44e)],this[_0x18f0b7(0x111)][_0x18f0b7(0x155)][_0x18f0b7(0x140)][_0x18f0b7(0x138)][_0x18f0b7(0x11d)]()?.[_0x18f0b7(0x144)]?.['is'](_0x18f0b7(0x130),_0x18f0b7(0x143))&&(_0x47f44e=_0x47f44e[_0x18f0b7(0x14f)](_0xd21f3c=>_0xd21f3c['is'](_0x18f0b7(0x130),_0x18f0b7(0x143)))),_0x47f44e;}[_0x2aed91(0x124)](_0x13a0ca){const _0x27f4a3=_0x2aed91,_0x3acc97=this[_0x27f4a3(0x111)][_0x27f4a3(0x11f)][_0x27f4a3(0x145)](_0x27f4a3(0x12b));let _0x5b406d=Array[_0x27f4a3(0x126)](this[_0x27f4a3(0x111)][_0x27f4a3(0x155)][_0x27f4a3(0x140)][_0x27f4a3(0x138)][_0x27f4a3(0x12e)]())[_0x27f4a3(0x14f)](_0x13a0ca)[_0x27f4a3(0x14c)](_0x2173af=>{const _0x138aa5=_0x27f4a3,_0x2bb635=this[_0x138aa5(0x111)][_0x138aa5(0x155)][_0x138aa5(0x13a)](_0x2173af,0x0);return[..._0x3acc97[_0x138aa5(0x114)](_0x2bb635,_0x138aa5(0x153)),..._0x3acc97[_0x138aa5(0x114)](_0x2bb635,_0x138aa5(0x128))];})[_0x27f4a3(0x116)]();return _0x5b406d=[...new Set(_0x5b406d)],_0x5b406d;}[_0x2aed91(0x123)](_0x35d716){const _0x558cc1=_0x2aed91;return _0x558cc1(0x117)+(this[_0x558cc1(0x111)][_0x558cc1(0x11f)][_0x558cc1(0x145)](_0x558cc1(0x12b))[_0x558cc1(0x152)](_0x35d716)||_0x558cc1(0x13f))[_0x558cc1(0x115)]()+_0x558cc1(0x14a)+_0x35d716[_0x558cc1(0x115)]()[_0x558cc1(0x133)](/-/g,'_');}}