@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 7.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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x1b88(_0x5478cb,_0x2f66e8){const _0x21adb4=_0x21ad();return _0x1b88=function(_0x1b88af,_0x1c8520){_0x1b88af=_0x1b88af-0x1ec;let _0x29e731=_0x21adb4[_0x1b88af];return _0x29e731;},_0x1b88(_0x5478cb,_0x2f66e8);}const _0x548c7b=_0x1b88;(function(_0x6062f8,_0x1b9036){const _0x35dbeb=_0x1b88,_0x5b074d=_0x6062f8();while(!![]){try{const _0x387aa5=parseInt(_0x35dbeb(0x211))/0x1*(parseInt(_0x35dbeb(0x1fd))/0x2)+parseInt(_0x35dbeb(0x20e))/0x3+parseInt(_0x35dbeb(0x209))/0x4+parseInt(_0x35dbeb(0x1f9))/0x5+-parseInt(_0x35dbeb(0x20c))/0x6*(-parseInt(_0x35dbeb(0x1ff))/0x7)+parseInt(_0x35dbeb(0x227))/0x8*(parseInt(_0x35dbeb(0x202))/0x9)+-parseInt(_0x35dbeb(0x204))/0xa*(parseInt(_0x35dbeb(0x21b))/0xb);if(_0x387aa5===_0x1b9036)break;else _0x5b074d['push'](_0x5b074d['shift']());}catch(_0x33c97b){_0x5b074d['push'](_0x5b074d['shift']());}}}(_0x21ad,0xdac3e));import{Plugin as _0x5ec5be}from'ckeditor5/src/core.js';import{CKEditorError as _0x507cd0}from'ckeditor5/src/utils.js';function _0x21ad(){const _0x4da1de=['from','add','isReadOnly','isOfficialPlugin','blur','selection','model','directChange','push','20493nTyytW','annotation','remove','map','set','focusTracker','addSourceCollector','cancel','element','has','get','uiUpdate','8KCZecQ','requires','delete','getOrderedSelectedAnnotations','editing','plugins','document','registerAnnotation','_editorAnnotations','change:range','refreshSelectedViews','EditorAnnotations','update','editor','view','isPremiumPlugin','init','range','fire','isEqual','3332255hIyqaR','isCollapsed','collection','_editorAnnotationsData','166146JzLunA','getRanges','3444kQfSFU','hasDomSelection','innerView','5876622APmAbm','sort','7850ZRsnfZ','editorannotations-invalid-source-callback','listenTo','getByInnerView','containsRange','902008OnNpnH','refresh','_dataCollectors','1686tbEPRe','pluginName','1776843NOGJcP','function','change:isFocused','1OlxHwQ'];_0x21ad=function(){return _0x4da1de;};return _0x21ad();}import{debounce as _0x3a20ba}from'es-toolkit/compat';import _0x5b14b8 from'./annotations.js';export default class P extends _0x5ec5be{[_0x548c7b(0x20b)];[_0x548c7b(0x1ed)];static get[_0x548c7b(0x228)](){return[_0x5b14b8];}static get[_0x548c7b(0x20d)](){const _0x4d7f4b=_0x548c7b;return _0x4d7f4b(0x1f0);}static get[_0x548c7b(0x215)](){return!0x0;}static get[_0x548c7b(0x1f4)](){return!0x0;}constructor(_0xda5508){const _0x48f938=_0x548c7b;super(_0xda5508),this[_0x48f938(0x20b)]=new Set(),this[_0x48f938(0x1ed)]=new Set();}[_0x548c7b(0x1f5)](){const _0x15fdd8=_0x548c7b,_0x23f4ec=this[_0x15fdd8(0x1f2)],_0x4a4024=_0x23f4ec[_0x15fdd8(0x218)][_0x15fdd8(0x22d)][_0x15fdd8(0x217)],_0x3790c9=_0x3a20ba(()=>this[_0x15fdd8(0x1ef)](),0xa);_0x4a4024['on'](_0x15fdd8(0x1ee),(_0xa9e178,_0x15f117)=>{const _0x233eb9=_0x15fdd8;_0x15f117[_0x233eb9(0x219)]&&(_0x3790c9[_0x233eb9(0x222)](),this[_0x233eb9(0x1ef)]());}),this[_0x15fdd8(0x206)](_0x23f4ec[_0x15fdd8(0x22b)][_0x15fdd8(0x1f3)][_0x15fdd8(0x22d)],_0x15fdd8(0x210),(_0x38ec9a,_0x386a59,_0x23d84a)=>{_0x23d84a&&_0x3790c9();}),this[_0x15fdd8(0x206)](_0x23f4ec['ui'][_0x15fdd8(0x220)],_0x15fdd8(0x210),(_0x161f7a,_0x1ef773,_0x33bfda)=>{const _0x29443b=_0x15fdd8;_0x33bfda||_0x23f4ec[_0x29443b(0x214)]||this[_0x29443b(0x1f7)](_0x29443b(0x216),{'isAnnotationTracked':_0x2a30aa=>this[_0x29443b(0x1fc)][_0x29443b(0x224)](_0x2a30aa[_0x29443b(0x201)])});}),this[_0x15fdd8(0x206)](this[_0x15fdd8(0x1f2)]['ui'],_0x15fdd8(0x1f1),()=>this[_0x15fdd8(0x1f7)](_0x15fdd8(0x226)));}[_0x548c7b(0x1ec)](_0x552165){const _0x39f6d0=_0x548c7b;if(this[_0x39f6d0(0x1ed)][_0x39f6d0(0x224)](_0x552165[_0x39f6d0(0x1f3)]))return;this[_0x39f6d0(0x1ed)][_0x39f6d0(0x213)](_0x552165[_0x39f6d0(0x1f3)]),this[_0x39f6d0(0x1f2)]['ui'][_0x39f6d0(0x220)][_0x39f6d0(0x213)](_0x552165[_0x39f6d0(0x1f3)][_0x39f6d0(0x223)]);const _0x3b4846=this[_0x39f6d0(0x1f2)][_0x39f6d0(0x22c)][_0x39f6d0(0x225)](_0x5b14b8);this[_0x39f6d0(0x206)](_0x3b4846[_0x39f6d0(0x1fb)],_0x39f6d0(0x21d),(_0xdf5f9a,_0x31f139)=>{const _0x122dce=_0x39f6d0;this[_0x122dce(0x1f2)]['ui'][_0x122dce(0x220)][_0x122dce(0x21d)](_0x31f139[_0x122dce(0x1f3)][_0x122dce(0x223)]),this[_0x122dce(0x1ed)][_0x122dce(0x229)](_0x31f139[_0x122dce(0x1f3)]);});}[_0x548c7b(0x200)](){const _0x5c60a5=_0x548c7b;return this[_0x5c60a5(0x1f2)][_0x5c60a5(0x22b)][_0x5c60a5(0x1f3)][_0x5c60a5(0x200)];}[_0x548c7b(0x221)](_0x1ceb3f){const _0x391478=_0x548c7b;if(_0x391478(0x20f)!=typeof _0x1ceb3f)throw new _0x507cd0(_0x391478(0x205));this[_0x391478(0x20b)][_0x391478(0x213)](_0x1ceb3f);}[_0x548c7b(0x1ef)](){const _0x1cb31b=_0x548c7b;this[_0x1cb31b(0x1f7)](_0x1cb31b(0x20a));}[_0x548c7b(0x22a)]({activeAnnotation:_0x504fb4,annotations:_0x197af5}){const _0x1bb45a=_0x548c7b,_0x573fa9=[],_0x6f0125=this[_0x1bb45a(0x1f2)][_0x1bb45a(0x218)][_0x1bb45a(0x22d)][_0x1bb45a(0x217)],_0x286d74=Array[_0x1bb45a(0x212)](_0x6f0125[_0x1bb45a(0x1fe)]());for(const [_0x29d26c,_0x14035b]of this[_0x1bb45a(0x1fc)]){const _0x54a284=_0x3b6428(_0x14035b),_0x1945d2=_0x197af5[_0x1bb45a(0x207)](_0x29d26c);_0x54a284&&_0x1945d2&&_0x573fa9[_0x1bb45a(0x21a)]({'annotation':_0x1945d2,'range':_0x54a284});}function _0x3b6428(_0x1cdb83){const _0x194492=_0x1bb45a;for(const _0x310c71 of _0x1cdb83)for(const _0x40d40c of _0x286d74)if(_0x310c71[_0x194492(0x208)](_0x40d40c,!_0x6f0125[_0x194492(0x1fa)]))return _0x310c71;return null;}return _0x573fa9[_0x1bb45a(0x203)]((_0x2dbb43,_0x36e68e)=>{const _0x36c227=_0x1bb45a,_0x31658a=_0x2dbb43[_0x36c227(0x1f6)],_0x17efe1=_0x36e68e[_0x36c227(0x1f6)];if(!_0x31658a[_0x36c227(0x1f8)](_0x17efe1)){if(_0x31658a[_0x36c227(0x208)](_0x17efe1,!0x0))return 0x1;if(_0x17efe1[_0x36c227(0x208)](_0x31658a,!0x0))return-0x1;}return _0x2dbb43[_0x36c227(0x21c)]==_0x504fb4?-0x1:_0x36e68e[_0x36c227(0x21c)]==_0x504fb4?0x1:0x0;})[_0x1bb45a(0x21e)](_0x32391a=>_0x32391a[_0x1bb45a(0x21c)]);}get[_0x548c7b(0x1fc)](){const _0xfb6dc9=_0x548c7b,_0x4b1324=new Map();for(const _0x3a2378 of Array[_0xfb6dc9(0x212)](this[_0xfb6dc9(0x20b)]))for(const [_0x281fb2,_0x20a670]of _0x3a2378())_0x4b1324[_0xfb6dc9(0x21f)](_0x281fb2,_0x20a670);return _0x4b1324;}}