@ckeditor/ckeditor5-track-changes
Version:
CKEditor 5 track changes plugin.
23 lines • 9.06 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 _0x23eb00=_0x4089;(function(_0x1c2a59,_0x30c736){const _0xf60a0=_0x4089,_0x309443=_0x1c2a59();while(!![]){try{const _0x48d848=-parseInt(_0xf60a0(0x109))/0x1+parseInt(_0xf60a0(0x119))/0x2+-parseInt(_0xf60a0(0x103))/0x3*(-parseInt(_0xf60a0(0x10e))/0x4)+-parseInt(_0xf60a0(0xea))/0x5*(parseInt(_0xf60a0(0xf7))/0x6)+parseInt(_0xf60a0(0x11a))/0x7+-parseInt(_0xf60a0(0xe8))/0x8*(-parseInt(_0xf60a0(0x118))/0x9)+-parseInt(_0xf60a0(0xe0))/0xa*(parseInt(_0xf60a0(0xe5))/0xb);if(_0x48d848===_0x30c736)break;else _0x309443['push'](_0x309443['shift']());}catch(_0x509dea){_0x309443['push'](_0x309443['shift']());}}}(_0x4ca6,0xe7abc));import{FocusTracker as _0x3279ca,KeystrokeHandler as _0x180201}from'ckeditor5/src/utils.js';import{View as _0x36f5f3,ViewCollection as _0x515255,FocusCycler as _0x19f7f9}from'ckeditor5/src/ui.js';import{LateFocusButtonView as _0x450d57,UserView as _0x3603eb}from'ckeditor5-collaboration/src/collaboration-core.js';import{IconCancel as _0x2a4da9,IconCheck as _0xff049a}from'ckeditor5/src/icons.js';function _0x4089(_0x40eb91,_0x3e1ead){const _0x4ca67b=_0x4ca6();return _0x4089=function(_0x408923,_0x45fa3d){_0x408923=_0x408923-0xcc;let _0x2b7cab=_0x4ca67b[_0x408923];return _0x2b7cab;},_0x4089(_0x40eb91,_0x3e1ead);}import{getTranslation as _0x2b6899}from'../../utils/common-translations.js';function _0x4ca6(){const _0x3aaa2d=['attributes','ck-annotation__info','execute','discardButton','formatDateTime','ck-comment__info-time','acceptButton','bindTemplate','Discard\x20suggestion','11187NYijrC','3352800lvXqWn','8125915iUdyhi','EXTERNAL_SUGGESTION','target','fire','extendTemplate','ck-suggestion__user','focusables','EXTERNAL_IMPORT_WORD_SUGGESTION','keystrokes','description','author','ck-annotation__info-name','push','innerHTML','authoredAt','ck-suggestion__main','time','getTemplate','ck-annotation__content-wrapper','focusFirst','userView','change:description','ck-annotation__user','shift+tab','focusCycler','tab','add','span','source','ck-annotation__main','getUserViewNotificationText','getExternalSuggestionNote','548510BGRxTF','ck-suggestion','ck-annotation__info-time','enter','ck-suggestion--accept','154qnkWBx','render','ck-annotation','88zVJbQf','Accept\x20suggestion','5WALnWp','discardSuggestion','listenTo','element','name','.ck-annotation__content-wrapper','creator','ck-suggestion__actions','_config','EXTERNAL_AVATAR','ck-comment__external','bind','querySelector','8562066QJhakr','presentation','div','focus','ck-suggestion__info-name','ck-suggestion__info','setTemplate','importWord','EXTERNAL_IMPORT_WORD_AVATAR','_setupKeyboardNavigation','_model','locale','67458JveHui','esc','set','focusTracker','ck-suggestion--discard','_createButton','1416005AJoHeC','@external','ck-annotation__actions','isExternal','acceptSuggestion','304qsFoZx'];_0x4ca6=function(){return _0x3aaa2d;};return _0x4ca6();}export class SuggestionView extends _0x36f5f3{[_0x23eb00(0xd4)];[_0x23eb00(0x115)];[_0x23eb00(0x112)];[_0x23eb00(0x120)];[_0x23eb00(0x106)];[_0x23eb00(0x122)];[_0x23eb00(0xd8)];[_0x23eb00(0x101)];[_0x23eb00(0xf2)];constructor(_0xa5663d,_0x216768,_0x5d313d){const _0x1a2c6c=_0x23eb00;super(_0xa5663d),this[_0x1a2c6c(0x101)]=_0x216768,this[_0x1a2c6c(0xf2)]=_0x5d313d,this[_0x1a2c6c(0x105)](_0x1a2c6c(0x123),''),this[_0x1a2c6c(0xf5)](_0x1a2c6c(0xce))['to'](_0x216768),this[_0x1a2c6c(0x115)]=this[_0x1a2c6c(0x108)](_0x2b6899(_0xa5663d,_0x1a2c6c(0xe9)),_0xff049a,_0x1a2c6c(0xe4),_0x1a2c6c(0x10d),'sw'),this[_0x1a2c6c(0x112)]=this[_0x1a2c6c(0x108)](_0x2b6899(_0xa5663d,_0x1a2c6c(0x117)),_0x2a4da9,_0x1a2c6c(0x107),_0x1a2c6c(0xeb),'sw'),this[_0x1a2c6c(0xd4)]=new _0x3603eb(_0xa5663d,_0x216768[_0x1a2c6c(0x124)],this[_0x1a2c6c(0xde)]()),this[_0x1a2c6c(0xd4)][_0x1a2c6c(0x11e)]({'attributes':{'class':[_0x1a2c6c(0x11f),_0x1a2c6c(0xd6)],'aria-hidden':!0x0}}),this[_0x1a2c6c(0x120)]=new _0x515255([this[_0x1a2c6c(0x115)],this[_0x1a2c6c(0x112)]]),this[_0x1a2c6c(0x106)]=new _0x3279ca(),this[_0x1a2c6c(0x122)]=new _0x180201(),this[_0x1a2c6c(0xd8)]=new _0x19f7f9({'focusables':this[_0x1a2c6c(0x120)],'focusTracker':this[_0x1a2c6c(0x106)],'keystrokeHandler':this[_0x1a2c6c(0x122)],'actions':{'focusPrevious':_0x1a2c6c(0xd7),'focusNext':_0x1a2c6c(0xd9)},'keystrokeHandlerOptions':{'filter':_0xe321f0=>_0xe321f0[_0x1a2c6c(0x11c)]!==this[_0x1a2c6c(0xed)]}}),this[_0x1a2c6c(0xfd)](this[_0x1a2c6c(0xd1)]());}[_0x23eb00(0xe6)](){const _0x212466=_0x23eb00;super[_0x212466(0xe6)]();const _0x296c08=this[_0x212466(0xed)][_0x212466(0xf6)](_0x212466(0xef));_0x296c08[_0x212466(0xcd)]=this[_0x212466(0x123)],this['on'](_0x212466(0xd5),(_0x1623a6,_0x4743a0,_0x599742)=>{const _0x54933e=_0x212466;_0x296c08[_0x54933e(0xcd)]=_0x599742;}),this[_0x212466(0x100)]();}[_0x23eb00(0xd1)](){const _0xf264e8=_0x23eb00,_0x1fe6e0=this[_0xf264e8(0x116)],_0x444db4=[{'tag':_0xf264e8(0xf9),'attributes':{'class':[_0xf264e8(0xfc),_0xf264e8(0x110)]},'children':[{'tag':_0xf264e8(0xdb),'children':[{'text':this[_0xf264e8(0xd4)][_0xf264e8(0xee)]}],'attributes':{'class':[_0xf264e8(0xfb),_0xf264e8(0x125)],'data-cke-tooltip-text':this[_0xf264e8(0xd4)][_0xf264e8(0xee)]}},{'tag':_0xf264e8(0xd0),'attributes':{'datetime':_0x1fe6e0['to'](_0xf264e8(0xce)),'class':[_0xf264e8(0x114),_0xf264e8(0xe2)]},'children':[{'text':_0x1fe6e0['to'](_0xf264e8(0xce),_0x1cb44f=>this[_0xf264e8(0xf2)][_0xf264e8(0x113)](_0x1cb44f))}]}]},{'tag':_0xf264e8(0xf9),'attributes':{'class':[_0xf264e8(0xf1),_0xf264e8(0x10b)]},'children':[this[_0xf264e8(0x115)],this[_0xf264e8(0x112)]]},{'tag':_0xf264e8(0xf9),'attributes':{'class':[_0xf264e8(0xd2)]}}];return this[_0xf264e8(0x101)][_0xf264e8(0x10c)]&&_0x444db4[_0xf264e8(0xcc)]({'tag':_0xf264e8(0xf9),'attributes':{'class':[_0xf264e8(0xf4)]},'children':[{'text':this[_0xf264e8(0xdf)]()}]}),{'tag':_0xf264e8(0xf9),'attributes':{'class':[_0xf264e8(0xe1),_0xf264e8(0xe7)],'tabindex':-0x1},'children':[this[_0xf264e8(0xd4)],{'tag':_0xf264e8(0xf9),'attributes':{'class':[_0xf264e8(0xcf),_0xf264e8(0xdd)],'role':_0xf264e8(0xf8)},'children':_0x444db4}]};}[_0x23eb00(0xfa)](){const _0x1b1e50=_0x23eb00;this[_0x1b1e50(0xed)][_0x1b1e50(0xfa)]();}[_0x23eb00(0xde)](){const _0x2c6b08=_0x23eb00;return this[_0x2c6b08(0x101)][_0x2c6b08(0x10c)]?_0x2c6b08(0xfe)===this[_0x2c6b08(0x101)][_0x2c6b08(0x10f)][_0x2c6b08(0x10a)][_0x2c6b08(0xdc)]?_0x2b6899(this[_0x2c6b08(0x102)],_0x2c6b08(0xff),this[_0x2c6b08(0x101)][_0x2c6b08(0xf0)][_0x2c6b08(0xee)]):_0x2b6899(this[_0x2c6b08(0x102)],_0x2c6b08(0xf3),this[_0x2c6b08(0x101)][_0x2c6b08(0xf0)][_0x2c6b08(0xee)]):null;}[_0x23eb00(0xdf)](){const _0x223db1=_0x23eb00;return _0x223db1(0xfe)===this[_0x223db1(0x101)][_0x223db1(0x10f)][_0x223db1(0x10a)][_0x223db1(0xdc)]?_0x2b6899(this[_0x223db1(0x102)],_0x223db1(0x121)):_0x2b6899(this[_0x223db1(0x102)],_0x223db1(0x11b));}[_0x23eb00(0x108)](_0x30ec78,_0xc3fa2e,_0x32f204,_0x28598a,_0x8792cc){const _0x27cc98=_0x23eb00,_0x4afae5=new _0x450d57(this[_0x27cc98(0x102)]);return _0x4afae5[_0x27cc98(0x105)]({'label':_0x30ec78,'icon':_0xc3fa2e,'tooltip':!0x0,'tooltipPosition':_0x8792cc}),_0x4afae5[_0x27cc98(0x11e)]({'attributes':{'class':_0x32f204}}),_0x4afae5['on'](_0x27cc98(0x111),()=>{const _0x4437d5=_0x27cc98;this[_0x4437d5(0x11d)](_0x28598a,this[_0x4437d5(0x101)]['id']);}),_0x4afae5;}[_0x23eb00(0x100)](){const _0x44bd0b=_0x23eb00,_0x5468cc=this[_0x44bd0b(0xed)];this[_0x44bd0b(0x122)][_0x44bd0b(0xec)](_0x5468cc);for(const _0x824eb7 of this[_0x44bd0b(0x120)])this[_0x44bd0b(0x106)][_0x44bd0b(0xda)](_0x824eb7[_0x44bd0b(0xed)]),this[_0x44bd0b(0x122)][_0x44bd0b(0xec)](_0x824eb7[_0x44bd0b(0xed)]);this[_0x44bd0b(0x122)][_0x44bd0b(0x105)](_0x44bd0b(0xe3),(_0x5de223,_0x287a9d)=>{const _0x26b25e=_0x44bd0b;_0x5468cc===_0x5de223[_0x26b25e(0x11c)]&&(this[_0x26b25e(0xd8)][_0x26b25e(0xd3)](),_0x287a9d());}),this[_0x44bd0b(0x122)][_0x44bd0b(0x105)](_0x44bd0b(0x104),(_0x1b581e,_0x4e68c1)=>{const _0x46c0ce=_0x44bd0b;_0x5468cc!==_0x1b581e[_0x46c0ce(0x11c)]&&(this[_0x46c0ce(0xfa)](),_0x4e68c1());});}}