UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines • 11.3 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x2b739f=_0xda3e;(function(_0x39e2a0,_0x5668b7){const _0x814b2b=_0xda3e,_0x53a0f6=_0x39e2a0();while(!![]){try{const _0x239f7f=-parseInt(_0x814b2b(0x1ab))/0x1+-parseInt(_0x814b2b(0x1a2))/0x2*(-parseInt(_0x814b2b(0x18b))/0x3)+-parseInt(_0x814b2b(0x1a3))/0x4*(parseInt(_0x814b2b(0x1c4))/0x5)+parseInt(_0x814b2b(0x18a))/0x6*(parseInt(_0x814b2b(0x191))/0x7)+-parseInt(_0x814b2b(0x1b0))/0x8+parseInt(_0x814b2b(0x1dd))/0x9+-parseInt(_0x814b2b(0x1c1))/0xa*(-parseInt(_0x814b2b(0x1ae))/0xb);if(_0x239f7f===_0x5668b7)break;else _0x53a0f6['push'](_0x53a0f6['shift']());}catch(_0x112ffd){_0x53a0f6['push'](_0x53a0f6['shift']());}}}(_0x4c5c,0x3ef9f));function _0x4c5c(){const _0x448d9c=['markBlockFormat','TrackChangesEditing','end','locale','imageTypeInline','isInContent','commandParams','commands','registerCustomCallback','get','isIntersecting','374HUaNEi','957628pTFSKs','normalizedStyles','value','chain','_splitMarkerName','accept','afterInit','toLowerCase','73260mjsfci','forEach','plugins','497959dJneUl','ImageStyleEditing','2799552HCcFiO','insertion','getSuggestion','author','getClosestSelectedImageElement','differ','document','title','setImageNaturalSizeAttributes','model','subType','isEqual','getContainedElement','imageStyle','formatBlock','imageCaption','getFirstRange','10CvekcV','Users','markInlineFormat','5OwwejH','newRange','nodeBefore','editor','selection','*Format:*\x20%0','from','discardSuggestion','hasSuggestion','getSuggestions','commandName','name','enableCommand','head','filter','imageTypeBlock','FORMAT_SIDE_IMAGE','refresh','format','createRangeOn','isBefore','_findSuggestions','start','has','suggestion','4511781ZAgBin','descriptionFactory','ImageUtils','type','_suggestionFactory','isOwn','isInlineImage','convertInlineImageToBlock','change','isBlockImage','nodeAfter','discard','length','registerPostFixer','getChangedMarkers','imageStylePostApply','commandReversedParams','18jtrVCr','1857OUgHIB','join','getSuggestionCallback','shouldConvertImageType','imageStylePreApply','findIndex','602539YVuRwp','_registerLegacyDescription','registerDescriptionCallback','side','next','formatInline'];_0x4c5c=function(){return _0x448d9c;};return _0x4c5c();}import{Plugin as _0x1971ef}from'ckeditor5/src/core.js';import{uid as _0x345df5}from'ckeditor5/src/utils.js';import{getTranslation as _0x4f6eb8}from'../utils/common-translations.js';function _0xda3e(_0x16f523,_0xc406e){const _0x4c5c80=_0x4c5c();return _0xda3e=function(_0xda3e00,_0x1c99ec){_0xda3e00=_0xda3e00-0x187;let _0x4243fb=_0x4c5c80[_0xda3e00];return _0x4243fb;},_0xda3e(_0x16f523,_0xc406e);}export default class ct extends _0x1971ef{[_0x2b739f(0x1a9)](){const _0x39348a=_0x2b739f,_0x33e248=this[_0x39348a(0x1c7)];if(!_0x33e248[_0x39348a(0x1ad)][_0x39348a(0x1db)](_0x39348a(0x1af)))return;const _0x5d6b45=_0x33e248[_0x39348a(0x1ad)][_0x39348a(0x1a0)](_0x39348a(0x198)),_0x412ce9=_0x33e248[_0x39348a(0x1ad)][_0x39348a(0x1a0)](_0x39348a(0x1df)),_0x40ff5d={};_0x5d6b45[_0x39348a(0x1d0)](_0x39348a(0x1bd),(_0x1211c0,_0x24b2a5)=>{const _0x17e35b=_0x39348a,_0x3971b3=_0x33e248[_0x17e35b(0x1ad)][_0x17e35b(0x1a0)](_0x17e35b(0x1c2))['me'],_0x2ce7a4=_0x33e248[_0x17e35b(0x19e)][_0x17e35b(0x1a0)](_0x17e35b(0x1bd));let _0x48567a=_0x412ce9[_0x17e35b(0x1b4)](_0x33e248[_0x17e35b(0x1b9)][_0x17e35b(0x1b6)][_0x17e35b(0x1c8)]),_0x2568c1=_0x33e248[_0x17e35b(0x1b9)][_0x17e35b(0x1d7)](_0x48567a),_0x597c6a=_0x2ce7a4[_0x17e35b(0x1a5)];if(_0x597c6a==_0x24b2a5[_0x17e35b(0x1a5)])return;const _0x1b5f66={'commandName':_0x17e35b(0x1bd),'commandParams':[_0x24b2a5],'formatGroupId':_0x345df5()};_0x33e248[_0x17e35b(0x1b9)][_0x17e35b(0x1e5)](()=>{const _0x519571=_0x17e35b;if(_0x5d6b45[_0x519571(0x1cd)]()[_0x519571(0x1d2)](_0x3821bc=>_0x3821bc[_0x519571(0x19c)]&&_0x3971b3==_0x3821bc[_0x519571(0x1b3)]&&(_0x519571(0x1be)==_0x3821bc[_0x519571(0x1e0)]||_0x519571(0x196)==_0x3821bc[_0x519571(0x1e0)])&&(_0x519571(0x18f)==_0x3821bc[_0x519571(0x1ba)]||_0x519571(0x188)==_0x3821bc[_0x519571(0x1ba)])&&_0x3821bc[_0x519571(0x1c0)]()[_0x519571(0x1bb)](_0x2568c1))[_0x519571(0x1ac)](_0xd1f01=>_0x5d6b45[_0x519571(0x1cb)](_0xd1f01[_0x519571(0x1d1)])),_0x48567a=_0x412ce9[_0x519571(0x1b4)](_0x33e248[_0x519571(0x1b9)][_0x519571(0x1b6)][_0x519571(0x1c8)]),_0x2568c1=_0x33e248[_0x519571(0x1b9)][_0x519571(0x1d7)](_0x48567a),_0x2ce7a4[_0x519571(0x1d5)](),_0x33e248[_0x519571(0x19e)][_0x519571(0x1a0)](_0x519571(0x19b))[_0x519571(0x1d5)](),_0x33e248[_0x519571(0x19e)][_0x519571(0x1a0)](_0x519571(0x1d3))[_0x519571(0x1d5)](),_0x597c6a=_0x2ce7a4[_0x519571(0x1a5)],_0x597c6a!=_0x24b2a5[_0x519571(0x1a5)])return _0x412ce9[_0x519571(0x1e3)](_0x48567a)&&_0x2ce7a4[_0x519571(0x18e)](_0x24b2a5[_0x519571(0x1a5)],_0x48567a)?(_0x1211c0({..._0x24b2a5,'setImageSizes':!0x1}),_0x48567a=_0x412ce9[_0x519571(0x1b4)](_0x33e248[_0x519571(0x1b9)][_0x519571(0x1b6)][_0x519571(0x1c8)]),void _0x5d6b45[_0x519571(0x197)](_0x48567a,{..._0x1b5f66,'commandReversedParams':[{'value':_0x597c6a||null,'setImageSizes':!0x1}]},[],_0x519571(0x18f))):void(_0x412ce9[_0x519571(0x1e6)](_0x48567a)?_0x5d6b45[_0x519571(0x197)](_0x48567a,_0x1b5f66,[],_0x519571(0x188)):_0x5d6b45[_0x519571(0x1c3)](_0x2568c1,_0x1b5f66,_0x519571(0x188)));});});for(const _0x29d982 of _0x33e248[_0x39348a(0x1ad)][_0x39348a(0x1a0)](_0x39348a(0x1af))[_0x39348a(0x1a4)])_0x40ff5d[_0x29d982[_0x39348a(0x1cf)]]=_0x29d982[_0x39348a(0x1b7)][_0x39348a(0x1aa)]();_0x5d6b45[_0x39348a(0x1e1)][_0x39348a(0x19f)](_0x39348a(0x1be),_0x39348a(0x18f),_0x39348a(0x18c),()=>!0x1),_0x5d6b45[_0x39348a(0x1e1)][_0x39348a(0x19f)](_0x39348a(0x1be),_0x39348a(0x188),_0x39348a(0x18c),()=>!0x1),_0x5d6b45[_0x39348a(0x1e1)][_0x39348a(0x19f)](_0x39348a(0x196),_0x39348a(0x188),_0x39348a(0x18c),()=>!0x1),_0x5d6b45[_0x39348a(0x1e1)][_0x39348a(0x19f)](_0x39348a(0x1be),_0x39348a(0x18f),_0x39348a(0x1a8),([_0x235e5d])=>{const _0x14bc7f=_0x39348a;_0x412ce9[_0x14bc7f(0x1b8)](_0x235e5d[_0x14bc7f(0x1bc)]());}),_0x5d6b45[_0x39348a(0x1e1)][_0x39348a(0x19f)](_0x39348a(0x1be),_0x39348a(0x18f),_0x39348a(0x1e8),(_0x47068d,_0x4d1d3c)=>{const _0x53f17e=_0x39348a;_0x5d6b45[_0x53f17e(0x1e1)][_0x53f17e(0x18d)](_0x53f17e(0x1be),'',_0x53f17e(0x1a8))(_0x47068d,{'commandName':_0x4d1d3c[_0x53f17e(0x1ce)],'commandParams':_0x4d1d3c[_0x53f17e(0x189)]});}),_0x5d6b45[_0x39348a(0x1e1)][_0x39348a(0x19f)](_0x39348a(0x1be),_0x39348a(0x18f),_0x39348a(0x1a6),function(_0x42b0ef,_0x14f8b0){if(_0x5403d7(_0x42b0ef,_0x14f8b0))return[_0x42b0ef,_0x14f8b0];if(_0x5403d7(_0x14f8b0,_0x42b0ef))return[_0x14f8b0,_0x42b0ef];return null;});const _0x33d0e7=[{'type':_0x39348a(0x1be),'subType':_0x39348a(0x18f)},{'type':_0x39348a(0x1b1),'subType':_0x39348a(0x1bf)},{'type':_0x39348a(0x1be),'subType':_0x39348a(0x1e4)},{'type':_0x39348a(0x1b1),'subType':_0x39348a(0x1e4)}];function _0x5403d7(_0x1b22e5,_0x51132a){const _0x4b8a7e=_0x39348a,_0x237f8d=_0x33d0e7[_0x4b8a7e(0x190)](({type:_0x4b8837,subType:_0x2a2736})=>_0x1b22e5[_0x4b8a7e(0x1e0)]==_0x4b8837&&_0x1b22e5[_0x4b8a7e(0x1ba)]==_0x2a2736),_0x4fa954=_0x33d0e7[_0x4b8a7e(0x190)](({type:_0xb6cb8e,subType:_0x124a3c})=>_0x51132a[_0x4b8a7e(0x1e0)]==_0xb6cb8e&&_0x51132a[_0x4b8a7e(0x1ba)]==_0x124a3c);if(_0x237f8d<0x0||_0x4fa954<0x0)return!0x1;const _0x871b58=_0x1b22e5[_0x4b8a7e(0x1c0)](),_0x407be2=_0x51132a[_0x4b8a7e(0x1c0)]();if((0x0==_0x237f8d||0x1==_0x237f8d)&&0x2==_0x4fa954&&_0x871b58[_0x4b8a7e(0x1a1)](_0x407be2))return!0x0;if(0x2==_0x237f8d&&0x3==_0x4fa954){const _0xb99324=_0x5d6b45[_0x4b8a7e(0x1d9)](_0x871b58,_0x4b8a7e(0x1b1))[_0x4b8a7e(0x1d2)](({suggestion:_0xfabd51,meta:_0x24afea})=>_0x24afea[_0x4b8a7e(0x1e2)]&&_0x4b8a7e(0x1e4)==_0xfabd51[_0x4b8a7e(0x1ba)]);if(_0xb99324[_0x4b8a7e(0x1e9)]>0x1&&_0x407be2[_0x4b8a7e(0x199)][_0x4b8a7e(0x1bb)](_0x871b58[_0x4b8a7e(0x1da)]))return!0x0;if(0x1==_0xb99324[_0x4b8a7e(0x1e9)]&&(_0x871b58[_0x4b8a7e(0x1da)][_0x4b8a7e(0x1bb)](_0x407be2[_0x4b8a7e(0x199)])||_0x871b58[_0x4b8a7e(0x199)][_0x4b8a7e(0x1bb)](_0x407be2[_0x4b8a7e(0x1da)])))return!0x0;}if(0x3==_0x237f8d&&0x3==_0x4fa954&&_0x871b58[_0x4b8a7e(0x1da)][_0x4b8a7e(0x1d8)](_0x407be2[_0x4b8a7e(0x1da)])){const _0x59cb81=_0x871b58[_0x4b8a7e(0x199)][_0x4b8a7e(0x1e7)],_0x3c1072=_0x407be2[_0x4b8a7e(0x1da)][_0x4b8a7e(0x1c6)];return _0x412ce9[_0x4b8a7e(0x1e6)](_0x59cb81)&&_0x59cb81===_0x3c1072;}return!0x1;}_0x33e248[_0x39348a(0x1b9)][_0x39348a(0x1b6)][_0x39348a(0x1ea)](()=>{const _0x45d373=_0x39348a;let _0x4f0a02=!0x1;const _0x2fb54c=Array[_0x45d373(0x1ca)](_0x33e248[_0x45d373(0x1b9)][_0x45d373(0x1b6)][_0x45d373(0x1b5)][_0x45d373(0x187)]());for(const {name:_0x49d8e9,data:_0x47fced}of _0x2fb54c){const {group:_0x333c17,type:_0x4c09a0,subType:_0x440f3a,id:_0x1ac39f}=_0x5d6b45[_0x45d373(0x1a7)](_0x49d8e9);if(_0x45d373(0x1dc)==_0x333c17&&_0x5d6b45[_0x45d373(0x1cc)](_0x1ac39f)){if(_0x45d373(0x1be)==_0x4c09a0&&(_0x45d373(0x18f)==_0x440f3a||_0x45d373(0x188)==_0x440f3a)){const _0x10404e=_0x5d6b45[_0x45d373(0x1b2)](_0x1ac39f);if(_0x47fced[_0x45d373(0x1c5)]){const _0x14044a=_0x10404e[_0x45d373(0x1c0)]()[_0x45d373(0x1bc)]();if(_0x412ce9[_0x45d373(0x1e6)](_0x14044a))continue;_0x5d6b45[_0x45d373(0x1cb)](_0x10404e),_0x4f0a02=!0x0;}}if(_0x45d373(0x1b1)==_0x4c09a0&&_0x45d373(0x1bf)==_0x440f3a&&!_0x47fced[_0x45d373(0x1c5)]){const _0x38bf28=_0x5d6b45[_0x45d373(0x1b2)](_0x1ac39f);_0x38bf28[_0x45d373(0x195)]&&_0x38bf28[_0x45d373(0x195)][_0x45d373(0x19c)]&&(_0x5d6b45[_0x45d373(0x1cb)](_0x38bf28[_0x45d373(0x195)]),_0x4f0a02=!0x0);}}}return _0x4f0a02;}),this[_0x39348a(0x192)](_0x40ff5d);}[_0x2b739f(0x192)](_0x3268c1){const _0x49a9bf=_0x2b739f,_0x22b399=this[_0x49a9bf(0x1c7)],_0x25c970=_0x22b399[_0x49a9bf(0x19a)];_0x22b399[_0x49a9bf(0x1ad)][_0x49a9bf(0x1a0)](_0x49a9bf(0x198))[_0x49a9bf(0x1de)][_0x49a9bf(0x193)](_0x532899=>{const _0x96c8b9=_0x49a9bf;if(_0x96c8b9(0x1be)!=_0x532899[_0x96c8b9(0x1e0)]&&_0x96c8b9(0x196)!=_0x532899[_0x96c8b9(0x1e0)])return;const {data:_0x4be026}=_0x532899;if(!_0x4be026||_0x96c8b9(0x1bd)!=_0x4be026[_0x96c8b9(0x1ce)])return;const _0x1338aa=_0x4be026[_0x96c8b9(0x19d)][0x0][_0x96c8b9(0x1a5)];return _0x4ebfdf(_0x96c8b9(0x194)===_0x1338aa?_0x4f6eb8(_0x25c970,_0x96c8b9(0x1d4)):_0x3268c1[_0x1338aa]||_0x1338aa);function _0x4ebfdf(_0x2e3144){const _0x326d42=_0x96c8b9;return{'type':_0x326d42(0x1d6),'content':_0x4f6eb8(_0x25c970,_0x326d42(0x1c9),_0x2e3144)};}});}}