@ckeditor/ckeditor5-track-changes
Version:
CKEditor 5 track changes plugin.
23 lines • 10.2 kB
JavaScript
/*
* 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 _0x404284=_0x2b57;(function(_0x53422e,_0x3f59e2){const _0x20a512=_0x2b57,_0x41b888=_0x53422e();while(!![]){try{const _0x417bcc=-parseInt(_0x20a512(0xd0))/0x1*(parseInt(_0x20a512(0xd8))/0x2)+parseInt(_0x20a512(0xab))/0x3*(-parseInt(_0x20a512(0xef))/0x4)+-parseInt(_0x20a512(0xea))/0x5+parseInt(_0x20a512(0xbe))/0x6+parseInt(_0x20a512(0xa2))/0x7+parseInt(_0x20a512(0xbf))/0x8+-parseInt(_0x20a512(0xec))/0x9*(-parseInt(_0x20a512(0xf7))/0xa);if(_0x417bcc===_0x3f59e2)break;else _0x41b888['push'](_0x41b888['shift']());}catch(_0x3bfe95){_0x41b888['push'](_0x41b888['shift']());}}}(_0x3c93,0xdcb51));function _0x3c93(){const _0x5d0f8e=['editor','Dialog','8IUQzVQ','string','classes','querySelector','detachFromDom','once','render','bodyCollectionContainer','230NdELah','config','document','div','editables','forEach','getRootsAttributes','updatePosition','createElement','ck-reset_all','plugins','has','finalContentPreview','getMergeFieldsIds','Final\x20content\x20preview','affectsData','previewMode','previewDataReady','reduce','max','getDomRoot','6597003ewZjXa','getDefaultValues','min','getBoundingClientRect','editing','figure.media','replaceWith','replace','ck-media__wrapper','1156668ehpTEf','refresh','getDataSetValues','show','_sortRoots','push','$defaultValues','attachToDom','element','classList','_getMergeFieldsData','add','sort','setPreviewData','_standarizeRootsData','clientHeight','MergeFieldsEditing','remove','innerHeight','5210496ftEEKM','615992xSJeTx','documentElement','ck-track-changes-preview-dialog','getAttribute','then','registry','item','getRootNames','getClientRects','width','$labels','model','url','_fixMediaEmbeds','getLabel','trackChanges.preview.renderFunction','innerHTML','161QfyITw','getDataWithAcceptedSuggestions','value','MediaEmbedEditing','execute','ck-focused','get','querySelectorAll','12442zqKXOp','class','isEnabled','view','values','getMediaViewElement','editable','TrackChangesData','contentView','set','\x20ck-reset_all','locale','destroy','height','entries','oembed','domConverter','headerView','4651230KSuFOp','children','672696TEgyNU'];_0x3c93=function(){return _0x5d0f8e;};return _0x3c93();}function _0x2b57(_0x1dcad8,_0x35b5a7){const _0x3c931f=_0x3c93();return _0x2b57=function(_0x2b576f,_0x58eded){_0x2b576f=_0x2b576f-0x96;let _0x35d039=_0x3c931f[_0x2b576f];return _0x35d039;},_0x2b57(_0x1dcad8,_0x35b5a7);}import{Command as _0x68f940}from'ckeditor5/src/core.js';import{BodyCollection as _0x50be3d}from'ckeditor5/src/ui.js';import{DowncastWriter as _0x226925}from'ckeditor5/src/engine.js';import _0x1842f1 from'../ui/view/trackchangespreviewview.js';import{getTranslation as _0x33d2ac}from'../utils/common-translations.js';export default class re extends _0x68f940{constructor(_0x3f4b10){const _0x3e3298=_0x2b57;super(_0x3f4b10),this[_0x3e3298(0x9c)]=!0x1,this[_0x3e3298(0xda)]=!0x0;}[_0x404284(0xac)](){const _0x34ba8d=_0x404284;this[_0x34ba8d(0xda)]=!0x0;}[_0x404284(0xd4)](){const _0x298a48=_0x404284,_0x3399e9=this[_0x298a48(0xed)],_0x93aab9=_0x3399e9[_0x298a48(0xe3)],_0x3ef3ac=_0x3399e9[_0x298a48(0x97)][_0x298a48(0xd6)](_0x298a48(0xee));let _0x564548;const _0x576a32=function(_0x3dbfcd){const _0x4ca426=_0x298a48,_0x23a190={};if(_0x4ca426(0xfb)in _0x3dbfcd['ui'][_0x4ca426(0xdb)]){for(const [_0x4747a6,_0x24a99d]of Object[_0x4ca426(0xe6)](_0x3dbfcd['ui'][_0x4ca426(0xdb)][_0x4ca426(0xfb)]))_0x23a190[_0x4747a6]=_0x24a99d[_0x4ca426(0xb3)];}else _0x23a190[_0x3dbfcd[_0x4ca426(0xca)][_0x4ca426(0xf9)][_0x4ca426(0xc6)]()[0x0]]=_0x3dbfcd['ui'][_0x4ca426(0xdb)][_0x4ca426(0xde)][_0x4ca426(0xb3)];return _0x23a190;}(_0x3399e9),_0x54f8c3=function(_0x11ff4c){const _0x2ef1bb=_0x298a48;let _0x2f58bd=0x0;for(const _0x2a695e of Object[_0x2ef1bb(0xdc)](_0x11ff4c))_0x2f58bd=Math[_0x2ef1bb(0xa0)](_0x2f58bd,_0x2a695e[_0x2ef1bb(0xa5)]()[_0x2ef1bb(0xc8)]);let _0x4f1f27=0x0;for(const _0x50003c of Object[_0x2ef1bb(0xdc)](_0x11ff4c))_0x4f1f27+=_0x50003c[_0x2ef1bb(0xa5)]()[_0x2ef1bb(0xe5)];const _0x39860e=0.8*Math[_0x2ef1bb(0xa0)](document[_0x2ef1bb(0xc0)][_0x2ef1bb(0xba)],window[_0x2ef1bb(0xbd)]),_0x35ead5=Math[_0x2ef1bb(0xa4)](_0x4f1f27,_0x39860e);return{'width':_0x2f58bd,'height':_0x35ead5};}(_0x576a32);_0x3ef3ac[_0x298a48(0xae)]({'id':_0x298a48(0x99),'title':_0x33d2ac(_0x93aab9,_0x298a48(0x9b)),'isModal':!0x0,'className':_0x298a48(0xc1),'content':new _0x1842f1(_0x93aab9,{'dialogRects':_0x54f8c3}),'onHide':()=>{const _0x12f6e3=_0x298a48;_0x564548[_0x12f6e3(0xf3)]();},'onShow':()=>{const _0x1ec33b=_0x298a48;_0x3399e9[_0x1ec33b(0x97)][_0x1ec33b(0xd6)](_0x1ec33b(0xdf))[_0x1ec33b(0xd1)]({...this[_0x1ec33b(0xb5)]()})[_0x1ec33b(0xc3)](_0x4e5bbe=>{const _0x10b058=_0x1ec33b,_0x30f37f=this[_0x10b058(0xb9)](_0x4e5bbe,_0x3399e9,_0x576a32);_0x3ef3ac[_0x10b058(0xdb)][_0x10b058(0xe0)][_0x10b058(0xeb)][_0x10b058(0xd6)](0x0)[_0x10b058(0xb8)](_0x30f37f,_0x3399e9[_0x10b058(0xf8)][_0x10b058(0xd6)](_0x10b058(0xce)));}),_0x564548=new _0x50be3d(_0x93aab9,[_0x3ef3ac[_0x1ec33b(0xdb)]]),_0x564548[_0x1ec33b(0xb2)](),_0x564548[_0x1ec33b(0xf6)][_0x1ec33b(0xb4)][_0x1ec33b(0xbc)](_0x1ec33b(0x96)),_0x3399e9[_0x1ec33b(0xf4)](_0x1ec33b(0xe4),()=>{const _0x1fc5f7=_0x1ec33b;_0x564548[_0x1fc5f7(0xf3)]();});const _0x53e9ea=_0x3ef3ac[_0x1ec33b(0xdb)][_0x1ec33b(0xe9)][_0x1ec33b(0xd9)];_0x3ef3ac[_0x1ec33b(0xdb)][_0x1ec33b(0xe9)][_0x1ec33b(0xd9)]=_0x53e9ea?_0x53e9ea+_0x1ec33b(0xe2):_0x1ec33b(0x96),_0x3ef3ac[_0x1ec33b(0xdb)][_0x1ec33b(0xe0)][_0x1ec33b(0xeb)][_0x1ec33b(0xd6)](0x0)['on'](_0x1ec33b(0x9e),()=>{const _0x5c0b25=_0x1ec33b;_0x3ef3ac[_0x5c0b25(0xdb)][_0x5c0b25(0xfe)]();});}});}[_0x404284(0xb5)](){const _0x4f8fda=_0x404284;if(!this[_0x4f8fda(0xed)][_0x4f8fda(0x97)][_0x4f8fda(0x98)](_0x4f8fda(0xbb)))return{};const _0xfcfda4=this[_0x4f8fda(0xed)][_0x4f8fda(0x97)][_0x4f8fda(0xd6)](_0x4f8fda(0xbb)),_0x67a47=_0xfcfda4[_0x4f8fda(0x9d)],_0xc7f570={};if(_0x4f8fda(0xc9)===_0x67a47){for(const _0x2b2007 of _0xfcfda4[_0x4f8fda(0x9a)]())_0xc7f570[_0x2b2007]=_0xfcfda4[_0x4f8fda(0xcd)](_0x2b2007)||_0x2b2007;}else{const _0x88e519=_0x4f8fda(0xb1)===_0x67a47?_0xfcfda4[_0x4f8fda(0xa3)]():_0xfcfda4[_0x4f8fda(0xad)](_0x67a47,!0x0);for(const _0x2450a8 of Object[_0x4f8fda(0xe6)](_0x88e519)){const [_0x11400e,_0x12f111]=_0x2450a8;_0xc7f570[_0x11400e]=null!==_0x12f111?_0x12f111:_0xfcfda4[_0x4f8fda(0xcd)](_0x11400e)||_0x11400e;}}return{'mergeFieldsData':_0xc7f570};}[_0x404284(0xb9)](_0x5e779b,_0x577a7e,_0x4bc656){const _0x118e98=_0x404284;let _0x37035e;if(_0x118e98(0xf0)==typeof _0x5e779b){const _0x14d899=_0x577a7e[_0x118e98(0xca)][_0x118e98(0xf9)][_0x118e98(0xc6)]()[0x0];_0x37035e={[_0x14d899]:_0x5e779b};}else _0x37035e=_0x5e779b;const _0x1e3473=this[_0x118e98(0xcc)](_0x37035e,_0x577a7e),_0x101279=function(_0x27e459,_0x1b32ad){const _0x50b663=_0x118e98;for(const [_0xacd7b3,_0x4b8495]of _0x27e459)_0x4b8495[_0x50b663(0xf1)]=_0x1b32ad[_0xacd7b3][_0x50b663(0xb4)][_0x50b663(0xd2)][_0x50b663(0xa9)](_0x50b663(0xd5),'');return _0x27e459;}(this[_0x118e98(0xaf)](_0x577a7e)[_0x118e98(0x9f)]((_0xaaf86b,_0x5b7a44)=>(_0xaaf86b[_0x118e98(0xb0)]([_0x5b7a44,{'content':_0x1e3473[_0x5b7a44],'classes':''}]),_0xaaf86b),[]),_0x4bc656);return _0x101279;}[_0x404284(0xcc)](_0x453cac,_0x3024a8){const _0x3617c3=_0x404284;if(!_0x3024a8[_0x3617c3(0x97)][_0x3617c3(0x98)](_0x3617c3(0xd3)))return _0x453cac;const _0xfb3ad4=_0x3024a8[_0x3617c3(0x97)][_0x3617c3(0xd6)](_0x3617c3(0xd3));for(const [_0x5c1373,_0x467d0e]of Object[_0x3617c3(0xe6)](_0x453cac)){const _0x25265b=document[_0x3617c3(0xff)](_0x3617c3(0xfa));_0x25265b[_0x3617c3(0xcf)]=_0x467d0e,(_0x25265b[_0x3617c3(0xd7)](_0x3617c3(0xa7))[_0x3617c3(0xfc)](_0x45a924=>{const _0x4778e7=_0x3617c3,_0x279d7b=_0x45a924[_0x4778e7(0xf2)](_0x4778e7(0xe7));if(_0x279d7b){const _0x2a1478=_0x279d7b[_0x4778e7(0xc2)](_0x4778e7(0xcb));if(_0x2a1478){const _0x1d9f78=_0xfb3ad4[_0x4778e7(0xc4)][_0x4778e7(0xdd)](new _0x226925(_0x3024a8[_0x4778e7(0xa6)][_0x4778e7(0xdb)][_0x4778e7(0xf9)]),_0x2a1478,{'elementName':'','renderForEditingView':!0x0}),_0xf08111=document[_0x4778e7(0xff)](_0x4778e7(0xfa));_0xf08111[_0x4778e7(0xb4)][_0x4778e7(0xb6)](_0x4778e7(0xaa)),_0x1d9f78[_0x4778e7(0xf5)](_0xf08111,_0x3024a8[_0x4778e7(0xa6)][_0x4778e7(0xdb)][_0x4778e7(0xe8)]),_0x279d7b[_0x4778e7(0xa8)](_0xf08111);}}}),_0x453cac[_0x5c1373]=_0x25265b[_0x3617c3(0xcf)]);}return _0x453cac;}[_0x404284(0xaf)](_0xaf1494){const _0x4f983a=_0x404284;if(!function(_0x6838b9){const _0x13b7c9=_0x2b57;return void 0x0!==_0x6838b9[_0x13b7c9(0xfd)];}(_0xaf1494))return _0xaf1494[_0x4f983a(0xca)][_0x4f983a(0xf9)][_0x4f983a(0xc6)]();const _0x306789=[],_0x15bdc2=new Map();for(const _0x348238 of _0xaf1494[_0x4f983a(0xca)][_0x4f983a(0xf9)][_0x4f983a(0xc6)]()){const _0x41e993=_0xaf1494[_0x4f983a(0xa6)][_0x4f983a(0xdb)][_0x4f983a(0xa1)](_0x348238)[_0x4f983a(0xc7)]()[_0x4f983a(0xc5)](0x0);_0x306789[_0x4f983a(0xb0)](_0x348238),_0x15bdc2[_0x4f983a(0xe1)](_0x348238,_0x41e993);}return _0x306789[_0x4f983a(0xb7)]((_0x163b0e,_0x2b51b9)=>{const _0x2af293=_0x4f983a,_0x4debcc=_0x15bdc2[_0x2af293(0xd6)](_0x163b0e),_0x4e456d=_0x15bdc2[_0x2af293(0xd6)](_0x2b51b9);return _0x4debcc['y']-_0x4e456d['y']||_0x4debcc['x']-_0x4e456d['x'];}),_0x306789;}}