UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines • 8.21 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 _0x1b77d8=_0xca69;(function(_0x5aa5eb,_0x3bb848){const _0x1da5b6=_0xca69,_0x4cb26d=_0x5aa5eb();while(!![]){try{const _0x2cddc0=-parseInt(_0x1da5b6(0xae))/0x1+-parseInt(_0x1da5b6(0xbc))/0x2+-parseInt(_0x1da5b6(0xcd))/0x3+parseInt(_0x1da5b6(0xbb))/0x4+parseInt(_0x1da5b6(0xe1))/0x5+-parseInt(_0x1da5b6(0xbd))/0x6+parseInt(_0x1da5b6(0xd7))/0x7*(parseInt(_0x1da5b6(0xb1))/0x8);if(_0x2cddc0===_0x3bb848)break;else _0x4cb26d['push'](_0x4cb26d['shift']());}catch(_0x5bda12){_0x4cb26d['push'](_0x4cb26d['shift']());}}}(_0x5370,0xc9f1e));function _0xca69(_0x34d213,_0x2a89bd){const _0x53709d=_0x5370();return _0xca69=function(_0xca69b5,_0x2f4b81){_0xca69b5=_0xca69b5-0xa9;let _0x48755f=_0x53709d[_0xca69b5];return _0x48755f;},_0xca69(_0x34d213,_0x2a89bd);}import{Plugin as _0x49a84e}from'ckeditor5/src/core.js';import{CKEditorError as _0x2a00e1}from'ckeditor5/src/utils.js';import _0x5a6c23 from'./trackchangesediting.js';import{sanitizeEditorConfig as _0x15eb9a}from'ckeditor5-collaboration/src/collaboration-core.js';const w=[_0x1b77d8(0xb3)];export default class T extends _0x49a84e{static get[_0x1b77d8(0xb0)](){return[_0x5a6c23];}static get[_0x1b77d8(0xe5)](){const _0x163e3e=_0x1b77d8;return _0x163e3e(0xc7);}static get[_0x1b77d8(0xd8)](){return!0x0;}static get[_0x1b77d8(0xc5)](){return!0x0;}[_0x1b77d8(0xd9)](){const _0x4182ab=_0x1b77d8,_0x58b158=this[_0x4182ab(0xc6)];if(_0x58b158[_0x4182ab(0xd6)][_0x4182ab(0xe2)](_0x4182ab(0xb4),_0x55b5dc=>{const _0x35f0c4=_0x4182ab,_0x1d9378=_0x58b158[_0x35f0c4(0xc9)][_0x35f0c4(0xd5)][_0x35f0c4(0xe6)]()[_0x35f0c4(0xc0)]((_0x57d2d8,_0x587284)=>(_0x57d2d8[_0x587284]='',_0x57d2d8),{});return _0x58b158[_0x35f0c4(0xc2)][_0x35f0c4(0xb7)](_0x1d9378,_0x55b5dc);}),_0x4182ab(0xde)!=typeof _0x58b158[_0x4182ab(0xd6)][_0x4182ab(0xd3)](_0x4182ab(0xaa))[_0x4182ab(0xe7)])throw new _0x2a00e1(_0x4182ab(0xba));}[_0x1b77d8(0xc8)](_0x346938){const _0x59452d=_0x1b77d8;return N(this[_0x59452d(0xc6)],!0x0,_0x346938);}[_0x1b77d8(0xb8)](_0x401649){const _0x22d3ab=_0x1b77d8;return N(this[_0x22d3ab(0xc6)],!0x1,_0x401649);}}function _0x5370(){const _0x3fc66f=['define','execute','div','pluginName','getRootNames','editorCreator','map','TrackChangesDataGetter','addCommentThread','getRootsAttributes','addUser','trackChangesData','appendChild','useAnonymousUser','set','986457amtwdx','createDocumentFragment','requires','2381528EWooLr','data','Pagination','trackChangesData.editorCreator','name','Users','create','getDataWithDiscardedSuggestions','CommentsRepository','track-changes-data-invalid-editor-creator','5102432VDzTGK','2956280zVJOep','7864386GRMANC','push','remove','reduce','getFullData','constructor','getCommentThreads','_adapter','isPremiumPlugin','editor','TrackChangesData','getDataWithAcceptedSuggestions','model','plugins','getSuggestions','join','8532sRwDHZ','destroy','TrackChangesEditing','rootsAttributes','acceptAllSuggestions','discardAllSuggestions','get','addSuggestionData','document','config','49wzTHJq','isOfficialPlugin','init','fromCharCode','users','end','getUser','function','result','createElement','6229465QsIMIp'];_0x5370=function(){return _0x3fc66f;};return _0x5370();}class D extends _0x49a84e{[_0x1b77d8(0xdf)];static get[_0x1b77d8(0xe5)](){const _0x2ad5cd=_0x1b77d8;return _0x2ad5cd(0xe9);}static get[_0x1b77d8(0xd8)](){return!0x0;}static get[_0x1b77d8(0xc5)](){return!0x0;}constructor(_0x1ea307){const _0x49615=_0x1b77d8;function _0x139c8d(_0xc991ec){const _0x46b30b=_0xca69;return _0xc991ec[_0x46b30b(0xe8)](_0x4bb1ca=>String[_0x46b30b(0xda)](_0x4bb1ca))[_0x46b30b(0xcc)]('');}super(_0x1ea307),this[_0x49615(0xdf)]=_0x49615(0xdc),_0x1ea307[_0x139c8d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x139c8d([0x76,0x69,0x65,0x77])][_0x139c8d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x139c8d([0x61,0x75,0x74,0x6f]),_0x1ea307[_0x139c8d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x139c8d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x139c8d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x139c8d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x139c8d([0x6f,0x6b])});}[_0x1b77d8(0xd9)](){const _0x2121fa=_0x1b77d8;this[_0x2121fa(0xc6)][_0x2121fa(0xca)][_0x2121fa(0xd3)](_0x2121fa(0xb9))[_0x2121fa(0xc4)]={'addCommentThread':()=>new Promise(()=>{}),'getCommentThread':()=>new Promise(()=>{}),'updateCommentThread':()=>new Promise(()=>{}),'resolveCommentThread':()=>new Promise(()=>{}),'reopenCommentThread':()=>new Promise(()=>{}),'removeCommentThread':()=>new Promise(()=>{}),'addComment':()=>new Promise(()=>{}),'updateComment':()=>new Promise(()=>{}),'removeComment':()=>new Promise(()=>{})},this[_0x2121fa(0xc6)][_0x2121fa(0xca)][_0x2121fa(0xd3)](_0x2121fa(0xcf))[_0x2121fa(0xc4)]=null;}}function v(_0x397065){const _0x4a34ba=_0x1b77d8;return void 0x0!==_0x397065[_0x4a34ba(0xeb)];}async function N(_0xf968a8,_0x59a810,_0x4f673a){const _0x440254=_0x1b77d8,_0x3bdb4a=_0x15eb9a(_0xf968a8,w);_0x3bdb4a[_0x440254(0xca)][_0x440254(0xbe)](_0x5a6c23,D),_0x3bdb4a[_0x440254(0xd0)]=v(_0xf968a8)?_0xf968a8[_0x440254(0xeb)]():void 0x0;const _0x3d4e23=document[_0x440254(0xaf)](),_0x1d587b=_0xf968a8[_0x440254(0xd6)][_0x440254(0xd3)](_0x440254(0xaa))[_0x440254(0xe7)],_0x55e721=await _0x1d587b(_0x3bdb4a,()=>function(_0x146da4){const _0x31e900=_0x440254,_0xb6aea1=document[_0x31e900(0xe0)](_0x31e900(0xe4));return _0x146da4[_0x31e900(0xab)](_0xb6aea1),_0xb6aea1;}(_0x3d4e23));!function(_0x1b67b2,_0x77bafc){const _0x3ab1a3=_0x440254,_0x2ec8fd=_0x1b67b2[_0x3ab1a3(0xc9)][_0x3ab1a3(0xd5)][_0x3ab1a3(0xe6)]()[_0x3ab1a3(0xc0)]((_0x196ae9,_0x327af0)=>(_0x196ae9[_0x327af0]=_0x1b67b2[_0x3ab1a3(0xb2)][_0x3ab1a3(0xd3)]({'rootName':_0x327af0}),_0x196ae9),{}),_0xf7974b=_0x1b67b2[_0x3ab1a3(0xca)][_0x3ab1a3(0xd3)](_0x3ab1a3(0xb6))[_0x3ab1a3(0xdb)][_0x3ab1a3(0xe8)](_0x1c2943=>({'id':_0x1c2943['id'],'name':_0x1c2943[_0x3ab1a3(0xb5)]})),_0x886e26=_0x1b67b2[_0x3ab1a3(0xca)][_0x3ab1a3(0xd3)](_0x3ab1a3(0xcf))[_0x3ab1a3(0xcb)]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x3cbfff=_0x1b67b2[_0x3ab1a3(0xca)][_0x3ab1a3(0xd3)](_0x3ab1a3(0xb9))[_0x3ab1a3(0xc3)]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x41c377=_0x77bafc[_0x3ab1a3(0xca)][_0x3ab1a3(0xd3)](_0x3ab1a3(0xb6)),_0x1a3e13=_0x77bafc[_0x3ab1a3(0xca)][_0x3ab1a3(0xd3)](_0x3ab1a3(0xcf)),_0x49a9e7=_0x77bafc[_0x3ab1a3(0xca)][_0x3ab1a3(0xd3)](_0x3ab1a3(0xb9));for(const _0x4bbe43 of _0x49a9e7[_0x3ab1a3(0xc3)]())_0x4bbe43[_0x3ab1a3(0xbf)]();for(const _0x2a555d of _0xf7974b)_0x41c377[_0x3ab1a3(0xdd)](_0x2a555d['id'])||_0x41c377[_0x3ab1a3(0xa9)](_0x2a555d);_0x41c377['me']||_0x41c377[_0x3ab1a3(0xac)]();for(const _0x209147 of _0x3cbfff)_0x49a9e7[_0x3ab1a3(0xea)](_0x209147);for(const _0x843881 of _0x886e26)_0x1a3e13[_0x3ab1a3(0xd4)](_0x843881);_0x77bafc[_0x3ab1a3(0xb2)][_0x3ab1a3(0xad)](_0x2ec8fd);}(_0xf968a8,_0x55e721),_0x55e721[_0x440254(0xe3)](_0x59a810?_0x440254(0xd1):_0x440254(0xd2));const _0x282abe=v(_0x55e721)?_0x55e721[_0x440254(0xc1)](_0x4f673a):_0x55e721[_0x440254(0xb2)][_0x440254(0xd3)](_0x4f673a);return await _0x55e721[_0x440254(0xce)](),_0x282abe;}