UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 6.05 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(_0xc9767e,_0xcc128b){const _0x21cc9d=_0xec3c,_0x2fbcf7=_0xc9767e();while(!![]){try{const _0x58cd24=-parseInt(_0x21cc9d(0x1db))/0x1+parseInt(_0x21cc9d(0x1cf))/0x2+parseInt(_0x21cc9d(0x1cb))/0x3+-parseInt(_0x21cc9d(0x1d7))/0x4*(-parseInt(_0x21cc9d(0x1d8))/0x5)+parseInt(_0x21cc9d(0x1b1))/0x6*(parseInt(_0x21cc9d(0x1b4))/0x7)+-parseInt(_0x21cc9d(0x1dd))/0x8+-parseInt(_0x21cc9d(0x1d3))/0x9;if(_0x58cd24===_0xcc128b)break;else _0x2fbcf7['push'](_0x2fbcf7['shift']());}catch(_0x3d2872){_0x2fbcf7['push'](_0x2fbcf7['shift']());}}}(_0x4ffa,0xd103e));export function normalizeDescription(_0xf0ce98){const _0x151e39=_0xec3c;return Array[_0x151e39(0x1ce)](_0xf0ce98)||(_0xf0ce98=[_0xf0ce98]),_0xf0ce98[_0x151e39(0x1d6)](_0xdcf670=>{const _0x1eef8a=_0x151e39,_0x31817f=_0xdcf670[_0x1eef8a(0x1ac)][_0x1eef8a(0x1d5)](/\*/g,''),_0x3ead1a=_0xdcf670[_0x1eef8a(0x1d1)]?_0x1eef8a(0x1b8)+_0xdcf670[_0x1eef8a(0x1d1)][_0x1eef8a(0x1c6)]+']':'';return'['+_0xdcf670[_0x1eef8a(0x1b2)]+']\x20'+_0x31817f+_0x3ead1a;})[_0x151e39(0x1bd)](';\x20');}export function renderDescription(_0x8fb8f6,_0xf6e86f){const _0x45fca1=_0xec3c;let _0x45efad='';return _0x45efad+=_0x8fb8f6[_0x45fca1(0x1ba)]('*')[_0x45fca1(0x1d6)]((_0x2c4cc9,_0x4e3c95)=>_0x4e3c95%0x2!=0x0?_0x45fca1(0x1df)+nn(_0x2c4cc9)+_0x45fca1(0x1d4):nn(_0x2c4cc9))[_0x45fca1(0x1bd)](''),_0xf6e86f&&(_0x45efad+=_0x45fca1(0x1c7)+_0xf6e86f[_0x45fca1(0x1c6)]+_0x45fca1(0x1b9)+_0xf6e86f[_0x45fca1(0x1bc)]+_0x45fca1(0x1c4)),_0x45efad;}function nn(_0x5b4778){const _0xecc7d9=_0xec3c,_0x3e95f2=document[_0xecc7d9(0x1bf)](_0xecc7d9(0x1c1));return _0x3e95f2[_0xecc7d9(0x1c5)]=_0x5b4778,_0x3e95f2[_0xecc7d9(0x1da)];}export function sortSuggestions(_0x529202){const _0x2164ff=_0xec3c;return _0x529202[_0x2164ff(0x1af)]((_0xbd3f51,_0x50e869)=>_0x2164ff(0x1c0)==_0xbd3f51[_0x2164ff(0x1b2)]&&_0x2164ff(0x1c0)!=_0x50e869[_0x2164ff(0x1b2)]?-0x1:_0x2164ff(0x1c0)!=_0xbd3f51[_0x2164ff(0x1b2)]&&_0x2164ff(0x1c0)==_0x50e869[_0x2164ff(0x1b2)]?0x1:0x0);}export function getSelectedSuggestions(_0x2c87f8,_0x1997ce){const _0xb33a4b=_0xec3c,_0x9bcba4=Array[_0xb33a4b(0x1c9)](_0x2c87f8[_0xb33a4b(0x1b5)]()),_0x1396c3=new Set();for(const _0x450147 of _0x1997ce)if(_0x450147[_0xb33a4b(0x1d2)]){for(const _0x5dd332 of _0x9bcba4)for(const _0x594944 of _0x450147[_0xb33a4b(0x1b5)]())(_0x5dd332[_0xb33a4b(0x1bb)](_0x594944)||_0x2c87f8[_0xb33a4b(0x1b6)]&&!_0x450147[_0xb33a4b(0x1c8)]&&_0x450147[_0xb33a4b(0x1c2)]&&_0x594944[_0xb33a4b(0x1ad)][_0xb33a4b(0x1b3)](_0x5dd332[_0xb33a4b(0x1be)]))&&_0x1396c3[_0xb33a4b(0x1d9)](_0x450147);}return _0x1396c3;}export function getRangesOfBlockGroups(_0xfc1385,_0x239ff3){const _0x557661=_0xec3c;let _0x2db09c,_0x2d2319=0x0;const _0x524c1d=[],_0x2e4845=_0x239ff3[_0x557661(0x1c3)];for(;_0x2d2319<_0xfc1385[_0x557661(0x1b0)];){const _0x498fcd=_0xfc1385[_0x2d2319],_0x4c52b6=_0xfc1385[_0x2d2319+0x1];_0x2db09c||(_0x2db09c=_0x239ff3[_0x557661(0x1cc)](_0x498fcd)),on(_0x239ff3,_0x498fcd,_0x4c52b6)||(_0x524c1d[_0x557661(0x1d0)](_0x239ff3[_0x557661(0x1ae)](_0x2db09c,_0x2e4845[_0x557661(0x1dc)](_0x498fcd)?_0x239ff3[_0x557661(0x1ca)](_0x498fcd):_0x239ff3[_0x557661(0x1b7)](_0x498fcd,_0x557661(0x1ad)))),_0x2db09c=null),_0x2d2319++;}return _0x524c1d;}function _0x4ffa(){const _0x235b99=['content','end','createRange','sort','length','1174026AiWmFB','type','isTouching','49TFBxNs','getRanges','isCollapsed','createPositionAt','\x20[color\x20','\x22\x20title=\x22','split','isIntersecting','title','join','start','createElement','deletion','span','next','schema','\x22></span>','innerText','value','<span\x20class=\x22ck-suggestion-color\x22\x20style=\x22background-color:\x20','isMultiRange','from','createPositionAfter','786660SCmsPV','createPositionBefore','splice','isArray','2782256SyRwvq','push','color','isInContent','9458235XGphlr','</span>','replace','map','72100HZrDWL','100owbZgG','add','innerHTML','1131758Beilpo','isObject','2757968MySaqv','change','<span\x20class=\x22ck-suggestion-type\x22>','execute'];_0x4ffa=function(){return _0x235b99;};return _0x4ffa();}function on(_0x9bbbc8,_0x19fb3e,_0x5853e9){const _0x5d68cc=_0xec3c;if(!_0x5853e9)return!0x1;const _0x4c3581=_0x9bbbc8[_0x5d68cc(0x1ca)](_0x19fb3e),_0x413d51=_0x9bbbc8[_0x5d68cc(0x1cc)](_0x5853e9);return _0x4c3581[_0x5d68cc(0x1b3)](_0x413d51);}function _0xec3c(_0x3d33ca,_0x215060){const _0x4ffab6=_0x4ffa();return _0xec3c=function(_0xec3c0,_0x36f4d1){_0xec3c0=_0xec3c0-0x1ac;let _0x587d84=_0x4ffab6[_0xec3c0];return _0x587d84;},_0xec3c(_0x3d33ca,_0x215060);}export const MAX_SUGGESTION_ACTIONS_IN_BATCH=0x64;export function executeCommandForSuggestions(_0x126e90,_0x2ca75a,_0x350f49){const _0x506b57=_0xec3c;for(;_0x350f49[_0x506b57(0x1b0)];){const _0x445faf=_0x350f49[_0x506b57(0x1cd)](0x0,0x64);_0x126e90[_0x506b57(0x1de)](()=>{const _0x4ad8b6=_0x506b57;for(const _0x2011ab of _0x445faf)_0x2011ab[_0x4ad8b6(0x1d2)]&&_0x2ca75a[_0x4ad8b6(0x1e0)](_0x2011ab['id']);});}}