UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines • 8.43 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 _0xa2f62=_0xc477;(function(_0x141c1b,_0xd9d5e8){const _0x3189c5=_0xc477,_0x2e87ec=_0x141c1b();while(!![]){try{const _0x5f3838=parseInt(_0x3189c5(0x10f))/0x1+-parseInt(_0x3189c5(0x134))/0x2+parseInt(_0x3189c5(0x12d))/0x3*(-parseInt(_0x3189c5(0x10c))/0x4)+parseInt(_0x3189c5(0x10d))/0x5+-parseInt(_0x3189c5(0x148))/0x6+parseInt(_0x3189c5(0x133))/0x7*(parseInt(_0x3189c5(0x11f))/0x8)+parseInt(_0x3189c5(0x132))/0x9;if(_0x5f3838===_0xd9d5e8)break;else _0x2e87ec['push'](_0x2e87ec['shift']());}catch(_0x5a089c){_0x2e87ec['push'](_0x2e87ec['shift']());}}}(_0x43cf,0xf1bcf));import{Plugin as _0x21b2a1}from'ckeditor5/src/core.js';import{CKEditorError as _0x5a4f0c}from'ckeditor5/src/utils.js';function _0x43cf(){const _0xfb3551=['execute','Users','trackChangesData','trackChangesData.editorCreator','createDocumentFragment','TrackChangesDataGetter','join','_adapter','destroy','push','getRootNames','TrackChangesEditing','set','CommentsRepository','9835458RAIZYs','Pagination','requires','TrackChangesData','pluginName','div','define','config','1268700kcwYVF','4626810zrerFm','isOfficialPlugin','369467qbjpFQ','getSuggestions','model','rootsAttributes','users','get','plugins','addCommentThread','reduce','getCommentThreads','function','fromCharCode','editor','result','map','editorCreator','6304024FoOcfe','getRootsAttributes','create','document','getDataWithAcceptedSuggestions','addSuggestionData','createElement','end','name','init','appendChild','getDataWithDiscardedSuggestions','data','constructor','9EKMurn','getFullData','getUser','useAnonymousUser','discardAllSuggestions','8728443OnEygq','14tyIHkV','519470YCxuQP','remove','isPremiumPlugin','track-changes-data-invalid-editor-creator','acceptAllSuggestions','addUser'];_0x43cf=function(){return _0xfb3551;};return _0x43cf();}import{TrackChangesEditing as _0x49a01c}from'./trackchangesediting.js';import{sanitizeEditorConfig as _0x45f0cd}from'ckeditor5-collaboration/src/collaboration-core.js';const p=[_0xa2f62(0x105)];export class TrackChangesData extends _0x21b2a1{static get[_0xa2f62(0x106)](){return[_0x49a01c];}static get[_0xa2f62(0x108)](){const _0x3ffcd4=_0xa2f62;return _0x3ffcd4(0x107);}static get[_0xa2f62(0x10e)](){return!0x0;}static get[_0xa2f62(0x136)](){return!0x0;}[_0xa2f62(0x128)](){const _0x2a9a40=_0xa2f62,_0x46b0cd=this[_0x2a9a40(0x11b)];if(_0x46b0cd[_0x2a9a40(0x10b)][_0x2a9a40(0x10a)](_0x2a9a40(0x13d),_0x102f22=>{const _0x423c7d=_0x2a9a40,_0x5b833f=_0x46b0cd[_0x423c7d(0x111)][_0x423c7d(0x122)][_0x423c7d(0x144)]()[_0x423c7d(0x117)]((_0x12f24e,_0x10986a)=>(_0x12f24e[_0x10986a]='',_0x12f24e),{});return _0x46b0cd[_0x423c7d(0x12c)][_0x423c7d(0x121)](_0x5b833f,_0x102f22);}),_0x2a9a40(0x119)!=typeof _0x46b0cd[_0x2a9a40(0x10b)][_0x2a9a40(0x114)](_0x2a9a40(0x13c))[_0x2a9a40(0x11e)])throw new _0x5a4f0c(_0x2a9a40(0x137));}[_0xa2f62(0x123)](_0x485970){const _0x25435c=_0xa2f62;return P(this[_0x25435c(0x11b)],!0x0,_0x485970);}[_0xa2f62(0x12a)](_0x3db77b){const _0x278100=_0xa2f62;return P(this[_0x278100(0x11b)],!0x1,_0x3db77b);}}export class TrackChangesDataGetter extends _0x21b2a1{[_0xa2f62(0x11c)];static get[_0xa2f62(0x108)](){const _0x37f3d9=_0xa2f62;return _0x37f3d9(0x13f);}static get[_0xa2f62(0x10e)](){return!0x0;}static get[_0xa2f62(0x136)](){return!0x0;}constructor(_0x4fb280){const _0x316abd=_0xa2f62;function _0x504fc5(_0x54712e){const _0xac4be2=_0xc477;return _0x54712e[_0xac4be2(0x11d)](_0x75d4bd=>String[_0xac4be2(0x11a)](_0x75d4bd))[_0xac4be2(0x140)]('');}super(_0x4fb280),this[_0x316abd(0x11c)]=_0x316abd(0x126),_0x4fb280[_0x504fc5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x504fc5([0x76,0x69,0x65,0x77])][_0x504fc5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x504fc5([0x61,0x75,0x74,0x6f]),_0x4fb280[_0x504fc5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x504fc5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x504fc5([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x504fc5([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x504fc5([0x6f,0x6b])});}[_0xa2f62(0x128)](){const _0x649c02=_0xa2f62;this[_0x649c02(0x11b)][_0x649c02(0x115)][_0x649c02(0x114)](_0x649c02(0x147))[_0x649c02(0x141)]={'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[_0x649c02(0x11b)][_0x649c02(0x115)][_0x649c02(0x114)](_0x649c02(0x145))[_0x649c02(0x141)]=null;}}function k(_0x1b3e6c){const _0x207949=_0xa2f62;return void 0x0!==_0x1b3e6c[_0x207949(0x120)];}function _0xc477(_0x17aebb,_0x2936c2){const _0x43cf0d=_0x43cf();return _0xc477=function(_0xc47730,_0x208e81){_0xc47730=_0xc47730-0x105;let _0xc4f3e8=_0x43cf0d[_0xc47730];return _0xc4f3e8;},_0xc477(_0x17aebb,_0x2936c2);}async function P(_0x5194ae,_0x3b0f17,_0xcd6506){const _0x10f4a0=_0xa2f62,_0x3d8e6d=_0x45f0cd(_0x5194ae,p);_0x3d8e6d[_0x10f4a0(0x115)][_0x10f4a0(0x143)](_0x49a01c,TrackChangesDataGetter),_0x3d8e6d[_0x10f4a0(0x112)]=k(_0x5194ae)?_0x5194ae[_0x10f4a0(0x120)]():void 0x0;const _0x2bd12=document[_0x10f4a0(0x13e)](),_0x3993a5=_0x5194ae[_0x10f4a0(0x10b)][_0x10f4a0(0x114)](_0x10f4a0(0x13c))[_0x10f4a0(0x11e)],_0x17f698=await _0x3993a5(_0x3d8e6d,()=>function(_0x4f8e59){const _0x3891d8=_0x10f4a0,_0x5079ea=document[_0x3891d8(0x125)](_0x3891d8(0x109));return _0x4f8e59[_0x3891d8(0x129)](_0x5079ea),_0x5079ea;}(_0x2bd12));!function(_0x55fb4c,_0x165401){const _0x5472d3=_0x10f4a0,_0x562be0=_0x55fb4c[_0x5472d3(0x111)][_0x5472d3(0x122)][_0x5472d3(0x144)]()[_0x5472d3(0x117)]((_0x5d13e7,_0x35820a)=>(_0x5d13e7[_0x35820a]=_0x55fb4c[_0x5472d3(0x12b)][_0x5472d3(0x114)]({'rootName':_0x35820a}),_0x5d13e7),{}),_0x555a4f=_0x55fb4c[_0x5472d3(0x115)][_0x5472d3(0x114)](_0x5472d3(0x13b))[_0x5472d3(0x113)][_0x5472d3(0x11d)](_0x1cffb1=>({'id':_0x1cffb1['id'],'name':_0x1cffb1[_0x5472d3(0x127)]})),_0x198a2e=_0x55fb4c[_0x5472d3(0x115)][_0x5472d3(0x114)](_0x5472d3(0x145))[_0x5472d3(0x110)]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x5efa67=_0x55fb4c[_0x5472d3(0x115)][_0x5472d3(0x114)](_0x5472d3(0x147))[_0x5472d3(0x118)]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x4a5498=_0x165401[_0x5472d3(0x115)][_0x5472d3(0x114)](_0x5472d3(0x13b)),_0x3a754d=_0x165401[_0x5472d3(0x115)][_0x5472d3(0x114)](_0x5472d3(0x145)),_0x549bbd=_0x165401[_0x5472d3(0x115)][_0x5472d3(0x114)](_0x5472d3(0x147));for(const _0x40368e of _0x549bbd[_0x5472d3(0x118)]())_0x40368e[_0x5472d3(0x135)]();for(const _0x3bbafb of _0x555a4f)_0x4a5498[_0x5472d3(0x12f)](_0x3bbafb['id'])||_0x4a5498[_0x5472d3(0x139)](_0x3bbafb);_0x4a5498['me']||_0x4a5498[_0x5472d3(0x130)]();for(const _0x893a77 of _0x5efa67)_0x549bbd[_0x5472d3(0x116)](_0x893a77);for(const _0x217165 of _0x198a2e)_0x3a754d[_0x5472d3(0x124)](_0x217165);_0x165401[_0x5472d3(0x12b)][_0x5472d3(0x146)](_0x562be0);}(_0x5194ae,_0x17f698),_0x17f698[_0x10f4a0(0x13a)](_0x3b0f17?_0x10f4a0(0x138):_0x10f4a0(0x131));const _0x2e213a=k(_0x17f698)?_0x17f698[_0x10f4a0(0x12e)](_0xcd6506):_0x17f698[_0x10f4a0(0x12b)][_0x10f4a0(0x114)](_0xcd6506);return await _0x17f698[_0x10f4a0(0x142)](),_0x2e213a;}