UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines • 10.1 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 _0x55d7(){const _0x4fd7a3=['_selectedElements','model','blockName','TrackChangesEditing','before','ELEMENT_LIST_ITEM','*Change\x20to:*\x20%0','LegacyListEditing','length','bulletedList','listType','format','ELEMENT_TODO_LIST','createRange','forceValue','todoList','schema','listItem','change','*Outdent:*\x20%0','paragraph','name','locale','*Uncheck\x20item*','numbered','3EYfdsO','86094OaSfrO','descriptionFactory','push','execute','*Check\x20item*','formatInline','indentList','get','492aMIBMO','checkTodoList','1263640zCeqvD','getSelectedBlocks','filter','104QRspSu','todo','replace','type','markBlockFormat','slice','findIndex','listIndent','isObject','has','todoListChecked','enableCommand','1697993skpakn','afterInit','registerElementLabel','checkChild','List','14MNQuIW','568756cFVDZm','parent','ELEMENT_BULLETED_LIST','1897CHcBZZ','numberedList','LegacyTodoListEditing','registerDescriptionCallback','formatBlock','outdentList','39452Sutdsa','end','commandParams','from','previousSibling','editor','bulleted','*Indent:*\x20%0','element','ELEMENT_NUMBERED_LIST','document','commands','commandName','createPositionAt','plugins','nextSibling','getAttribute','add','value','3327080XeeXSp','selection'];_0x55d7=function(){return _0x4fd7a3;};return _0x55d7();}const _0x6d1fea=_0x891d;(function(_0x5ad864,_0x226b95){const _0xcbf80a=_0x891d,_0x279ee1=_0x5ad864();while(!![]){try{const _0x58693d=-parseInt(_0xcbf80a(0x1b7))/0x1*(parseInt(_0xcbf80a(0x1c1))/0x2)+parseInt(_0xcbf80a(0x1ef))/0x3*(parseInt(_0xcbf80a(0x1b8))/0x4)+-parseInt(_0xcbf80a(0x1a3))/0x5+-parseInt(_0xcbf80a(0x1a1))/0x6*(-parseInt(_0xcbf80a(0x1bb))/0x7)+parseInt(_0xcbf80a(0x1a6))/0x8*(parseInt(_0xcbf80a(0x199))/0x9)+parseInt(_0xcbf80a(0x1d4))/0xa+parseInt(_0xcbf80a(0x1b2))/0xb;if(_0x58693d===_0x226b95)break;else _0x279ee1['push'](_0x279ee1['shift']());}catch(_0x85831f){_0x279ee1['push'](_0x279ee1['shift']());}}}(_0x55d7,0x3c4a4));import{Plugin as _0x125578}from'ckeditor5/src/core.js';import{getTranslation as _0x24f8c3}from'../utils/common-translations.js';export default class gt extends _0x125578{[_0x6d1fea(0x1b3)](){const _0x415b33=_0x6d1fea,_0x574dea=this[_0x415b33(0x1c6)],_0x399295=_0x574dea[_0x415b33(0x1ec)];if(!_0x574dea[_0x415b33(0x1cf)][_0x415b33(0x1af)](_0x415b33(0x1dd)))return;const _0x142cb0=_0x574dea[_0x415b33(0x1cf)][_0x415b33(0x1a0)](_0x415b33(0x1d9)),_0x132880=_0x574dea[_0x415b33(0x1cf)][_0x415b33(0x1af)](_0x415b33(0x1bd));function _0x2bcf85(_0x469ad0){return()=>{const _0x4d66de=_0x891d,_0x5c0778=_0x574dea[_0x4d66de(0x1d7)][_0x4d66de(0x1cb)][_0x4d66de(0x1d5)],_0x5207aa=_0x574dea[_0x4d66de(0x1cc)][_0x4d66de(0x1a0)](_0x469ad0);if(_0x5207aa[_0x4d66de(0x1d3)])return void _0x574dea[_0x4d66de(0x19c)](_0x4d66de(0x1ea),{});const _0x4a69ad=_0x469ad0[_0x4d66de(0x1ab)](0x0,-0x4),_0x4c540c=function(_0x50ae5c,_0xafe15c,_0xee1ec){const _0x83b84a=_0x4d66de;let _0x12942d=Array[_0x83b84a(0x1c4)](_0x50ae5c)[_0x83b84a(0x1a5)](_0x4bf399=>function(_0x675f53,_0x1dfae9){const _0x4d8835=_0x83b84a;return _0x1dfae9[_0x4d8835(0x1b5)](_0x675f53[_0x4d8835(0x1b9)],_0x4d8835(0x1e7))&&!_0x1dfae9[_0x4d8835(0x1ae)](_0x675f53);}(_0x4bf399,_0xee1ec));_0x12942d=_0x12942d[_0x83b84a(0x1a5)](_0x563d62=>!_0x563d62['is'](_0x83b84a(0x1c9),_0x83b84a(0x1e7))||_0x563d62[_0x83b84a(0x1d1)](_0x83b84a(0x1e0))!=_0xafe15c);const _0x26b765=new Set();for(const _0x517386 of _0x12942d)_0x517386['is'](_0x83b84a(0x1c9),_0x83b84a(0x1e7))?_0x26b765[_0x83b84a(0x1d2)](Le(_0x517386)):_0x26b765[_0x83b84a(0x1d2)](_0x517386);return Array[_0x83b84a(0x1c4)](_0x26b765);}(_0x5c0778[_0x4d66de(0x1a4)](),_0x4a69ad,_0x574dea[_0x4d66de(0x1d7)][_0x4d66de(0x1e6)]);_0x574dea[_0x4d66de(0x1d7)][_0x4d66de(0x1e8)](()=>{const _0x13f93b=_0x4d66de;for(const _0x54595d of _0x4c540c)_0x142cb0[_0x13f93b(0x1aa)](_0x54595d,{'commandName':_0x469ad0,'commandParams':[{'forceValue':!_0x5207aa[_0x13f93b(0x1d3)]}],'formatGroupId':_0x13f93b(0x1d8)},Ee(_0x54595d));});};}function _0x26becf(_0x4f4512){return()=>{const _0x4da803=_0x891d,_0x4c9ba2=function(_0x1860ec){const _0x799387=_0x891d;let _0x58611c=Array[_0x799387(0x1c4)](_0x1860ec);const _0xe5ef8b=_0x58611c[_0x799387(0x1ac)](_0x1a55e4=>_0x799387(0x1e7)!=_0x1a55e4[_0x799387(0x1eb)]);return _0xe5ef8b>-0x1&&(_0x58611c=_0x58611c[_0x799387(0x1ab)](0x0,_0xe5ef8b)),_0x58611c;}(_0x574dea[_0x4da803(0x1d7)][_0x4da803(0x1cb)][_0x4da803(0x1d5)][_0x4da803(0x1a4)]()),_0x17f604=_0x574dea[_0x4da803(0x1d7)][_0x4da803(0x1e3)](_0x574dea[_0x4da803(0x1d7)][_0x4da803(0x1ce)](_0x4c9ba2[0x0],_0x4da803(0x1da)),_0x574dea[_0x4da803(0x1d7)][_0x4da803(0x1ce)](_0x4c9ba2[_0x4c9ba2[_0x4da803(0x1de)]-0x1],_0x4da803(0x1c2)));_0x574dea[_0x4da803(0x1d7)][_0x4da803(0x1e8)](()=>{const _0x594acd=_0x4da803;_0x142cb0[_0x594acd(0x1aa)](_0x17f604,{'commandName':_0x4f4512,'commandParams':[],'formatGroupId':_0x594acd(0x1ad)},function(_0x48717e){const _0x54bb10=_0x594acd,_0x1ac356=new Set();for(const _0x15c95a of _0x48717e){let _0x48d5e8=_0x15c95a[_0x54bb10(0x1d0)];for(;_0x48d5e8&&_0x48d5e8[_0x54bb10(0x1d1)](_0x54bb10(0x1ad))>_0x15c95a[_0x54bb10(0x1d1)](_0x54bb10(0x1ad));)_0x1ac356[_0x54bb10(0x1d2)](_0x48d5e8),_0x48d5e8=_0x48d5e8[_0x54bb10(0x1d0)];}return Array[_0x54bb10(0x1c4)](_0x1ac356);}(_0x4c9ba2));});};}_0x142cb0[_0x415b33(0x1b1)](_0x415b33(0x1bc),_0x2bcf85(_0x415b33(0x1bc))),_0x142cb0[_0x415b33(0x1b1)](_0x415b33(0x1df),_0x2bcf85(_0x415b33(0x1df))),_0x132880&&_0x142cb0[_0x415b33(0x1b1)](_0x415b33(0x1e5),_0x2bcf85(_0x415b33(0x1e5))),_0x142cb0[_0x415b33(0x1b1)](_0x415b33(0x19f),_0x26becf(_0x415b33(0x19f))),_0x142cb0[_0x415b33(0x1b1)](_0x415b33(0x1c0),_0x26becf(_0x415b33(0x1c0))),_0x132880&&_0x142cb0[_0x415b33(0x1b1)](_0x415b33(0x1a2),()=>{const _0x1bc98f=_0x415b33,_0x465f83=_0x574dea[_0x1bc98f(0x1cc)][_0x1bc98f(0x1a0)](_0x1bc98f(0x1a2)),_0x4e187a=Array[_0x1bc98f(0x1c4)](_0x465f83[_0x1bc98f(0x1d6)]);_0x4e187a[_0x1bc98f(0x1a5)](_0x5af960=>_0x5af960[_0x1bc98f(0x1d1)](_0x1bc98f(0x1b0))!=_0x465f83[_0x1bc98f(0x1d3)]),_0x574dea[_0x1bc98f(0x1d7)][_0x1bc98f(0x1e8)](()=>{const _0x120352=_0x1bc98f;for(const _0x469b1a of _0x4e187a)_0x142cb0[_0x120352(0x1aa)](_0x469b1a,{'commandName':_0x120352(0x1a2),'commandParams':[{'forceValue':!_0x465f83[_0x120352(0x1d3)]}]});});}),_0x142cb0[_0x415b33(0x19a)][_0x415b33(0x1b4)](_0x415b33(0x1e7),_0x382ce2=>_0x24f8c3(_0x399295,_0x415b33(0x1db),_0x382ce2)),_0x142cb0[_0x415b33(0x19a)][_0x415b33(0x1be)](_0x3c545c=>{const _0x593f38=_0x415b33;if(_0x593f38(0x1bf)!=_0x3c545c[_0x593f38(0x1a9)]&&_0x593f38(0x19e)!=_0x3c545c[_0x593f38(0x1a9)])return;const {data:_0x1f28fb}=_0x3c545c;if(_0x1f28fb){if(_0x593f38(0x1bc)==_0x1f28fb[_0x593f38(0x1cd)]||_0x593f38(0x1df)==_0x1f28fb[_0x593f38(0x1cd)]||_0x593f38(0x1e5)==_0x1f28fb[_0x593f38(0x1cd)])switch(_0x1f28fb[_0x593f38(0x1cd)][_0x593f38(0x1a8)](_0x593f38(0x1b6),'')){case _0x593f38(0x1c7):return _0x7d3cf7(_0x24f8c3(_0x399295,_0x593f38(0x1ba)));case _0x593f38(0x1ee):return _0x7d3cf7(_0x24f8c3(_0x399295,_0x593f38(0x1ca)));case _0x593f38(0x1a7):return _0x7d3cf7(_0x24f8c3(_0x399295,_0x593f38(0x1e2)));}if(_0x593f38(0x19f)==_0x1f28fb[_0x593f38(0x1cd)])return{'type':_0x593f38(0x1e1),'content':_0x24f8c3(_0x399295,_0x593f38(0x1c8),_0x24f8c3(_0x399295,_0x593f38(0x1db)))};if(_0x593f38(0x1c0)==_0x1f28fb[_0x593f38(0x1cd)])return{'type':_0x593f38(0x1e1),'content':_0x24f8c3(_0x399295,_0x593f38(0x1e9),_0x24f8c3(_0x399295,_0x593f38(0x1db)))};if(_0x593f38(0x1a2)==_0x1f28fb[_0x593f38(0x1cd)])return _0x1f28fb[_0x593f38(0x1c3)][0x0][_0x593f38(0x1e4)]?{'type':_0x593f38(0x1e1),'content':_0x24f8c3(_0x399295,_0x593f38(0x19d))}:{'type':_0x593f38(0x1e1),'content':_0x24f8c3(_0x399295,_0x593f38(0x1ed))};}function _0x7d3cf7(_0x9ca667){const _0x33402c=_0x593f38;return{'type':_0x33402c(0x1e1),'content':_0x24f8c3(_0x399295,_0x33402c(0x1dc),_0x9ca667)};}});}}function _0x891d(_0x221b2e,_0xdfeca6){const _0x55d75d=_0x55d7();return _0x891d=function(_0x891da4,_0x4adfb3){_0x891da4=_0x891da4-0x199;let _0x26cd29=_0x55d75d[_0x891da4];return _0x26cd29;},_0x891d(_0x221b2e,_0xdfeca6);}function Le(_0x49a4fe){const _0x14d738=_0x6d1fea,_0x42307a=_0x49a4fe[_0x14d738(0x1d1)](_0x14d738(0x1ad));if(0x0==_0x42307a)return _0x49a4fe;let _0x194a67=_0x49a4fe;for(;_0x49a4fe[_0x14d738(0x1c5)]&&_0x49a4fe[_0x14d738(0x1c5)]['is'](_0x14d738(0x1c9),_0x14d738(0x1e7));){const _0x105c7a=_0x49a4fe[_0x14d738(0x1c5)][_0x14d738(0x1d1)](_0x14d738(0x1ad));if(_0x105c7a==_0x42307a)_0x194a67=_0x49a4fe[_0x14d738(0x1c5)];else{if(_0x105c7a<_0x42307a)break;}_0x49a4fe=_0x49a4fe[_0x14d738(0x1c5)];}return _0x194a67;}function Ee(_0x2c7577){const _0xda9407=_0x6d1fea,_0x5ea8b7=[];if(_0x2c7577['is'](_0xda9407(0x1c9),_0xda9407(0x1e7))&&_0x2c7577[_0xda9407(0x1d1)](_0xda9407(0x1ad))>0x0){let _0x1f7b58=_0x2c7577[_0xda9407(0x1d0)];for(;_0x1f7b58&&_0xda9407(0x1e7)==_0x1f7b58[_0xda9407(0x1eb)]&&_0x1f7b58[_0xda9407(0x1d1)](_0xda9407(0x1ad))==_0x2c7577[_0xda9407(0x1d1)](_0xda9407(0x1ad));)_0x5ea8b7[_0xda9407(0x19b)](_0x1f7b58),_0x1f7b58=_0x1f7b58[_0xda9407(0x1d0)];}return _0x5ea8b7;}