@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 7.13 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 _0x166dc0=_0x582d;(function(_0x25f99d,_0x29a6bf){const _0x3f61ad=_0x582d,_0x24b8f1=_0x25f99d();while(!![]){try{const _0x405516=parseInt(_0x3f61ad(0xfe))/0x1+-parseInt(_0x3f61ad(0x120))/0x2+parseInt(_0x3f61ad(0xf5))/0x3*(-parseInt(_0x3f61ad(0xe6))/0x4)+-parseInt(_0x3f61ad(0x100))/0x5*(-parseInt(_0x3f61ad(0xf0))/0x6)+parseInt(_0x3f61ad(0x10c))/0x7*(-parseInt(_0x3f61ad(0xfd))/0x8)+parseInt(_0x3f61ad(0xea))/0x9+parseInt(_0x3f61ad(0xf1))/0xa;if(_0x405516===_0x29a6bf)break;else _0x24b8f1['push'](_0x24b8f1['shift']());}catch(_0x2397d0){_0x24b8f1['push'](_0x24b8f1['shift']());}}}(_0x3a7c,0x6457f));function _0x582d(_0x3ecab9,_0x19b9f0){const _0x3a7cff=_0x3a7c();return _0x582d=function(_0x582d07,_0x142a88){_0x582d07=_0x582d07-0xe3;let _0x1b7dfe=_0x3a7cff[_0x582d07];return _0x1b7dfe;},_0x582d(_0x3ecab9,_0x19b9f0);}function _0x3a7c(){const _0x91f8bf=['directChange','function','change:range','isOfficialPlugin','_editorAnnotationsData','isEqual','blur','collection','registerAnnotation','_dataCollectors','29589PwJGan','editorannotations-invalid-source-callback','addSourceCollector','getOrderedSelectedAnnotations','editing','refresh','view','add','plugins','document','remove','set','focusTracker','containsRange','model','refreshSelectedViews','from','isCollapsed','has','map','1069600kxHVZa','isReadOnly','annotation','hasDomSelection','delete','push','listenTo','563668nNXffC','pluginName','uiUpdate','selection','2487114yoHgfS','getByInnerView','fire','get','element','cancel','6LvuOHJ','10885870jfLRwW','innerView','range','_editorAnnotations','3fgkNVl','change:isFocused','sort','isPremiumPlugin','init','editor','requires','EditorAnnotations','808vrTiXM','113409nFcEkY','update','176545ZEpWNk','getRanges'];_0x3a7c=function(){return _0x91f8bf;};return _0x3a7c();}import{Plugin as _0x45b8c7}from'ckeditor5/src/core.js';import{CKEditorError as _0x4656c0}from'ckeditor5/src/utils.js';import{debounce as _0x12d95b}from'es-toolkit/compat';import{Annotations as _0x289e31}from'./annotations.js';export class EditorAnnotations extends _0x45b8c7{[_0x166dc0(0x10b)];[_0x166dc0(0xf4)];static get[_0x166dc0(0xfb)](){return[_0x289e31];}static get[_0x166dc0(0xe7)](){const _0x4c6818=_0x166dc0;return _0x4c6818(0xfc);}static get[_0x166dc0(0x105)](){return!0x0;}static get[_0x166dc0(0xf8)](){return!0x0;}constructor(_0x13ff70){const _0x45af93=_0x166dc0;super(_0x13ff70),this[_0x45af93(0x10b)]=new Set(),this[_0x45af93(0xf4)]=new Set();}[_0x166dc0(0xf9)](){const _0x5358e9=_0x166dc0,_0x2f16ac=this[_0x5358e9(0xfa)],_0x51ebb0=_0x2f16ac[_0x5358e9(0x11a)][_0x5358e9(0x115)][_0x5358e9(0xe9)],_0x34665b=_0x12d95b(()=>this[_0x5358e9(0x11b)](),0xa);_0x51ebb0['on'](_0x5358e9(0x104),(_0x24e8c3,_0x4eb480)=>{const _0x287bc0=_0x5358e9;_0x4eb480[_0x287bc0(0x102)]&&(_0x34665b[_0x287bc0(0xef)](),this[_0x287bc0(0x11b)]());}),this[_0x5358e9(0xe5)](_0x2f16ac[_0x5358e9(0x110)][_0x5358e9(0x112)][_0x5358e9(0x115)],_0x5358e9(0xf6),(_0x4a5de0,_0x37f321,_0xb4edac)=>{_0xb4edac&&_0x34665b();}),this[_0x5358e9(0xe5)](_0x2f16ac['ui'][_0x5358e9(0x118)],_0x5358e9(0xf6),(_0x5b7a7f,_0x14eab6,_0x1019f5)=>{const _0x6d0015=_0x5358e9;_0x1019f5||_0x2f16ac[_0x6d0015(0x121)]||this[_0x6d0015(0xec)](_0x6d0015(0x108),{'isAnnotationTracked':_0x2e147c=>this[_0x6d0015(0x106)][_0x6d0015(0x11e)](_0x2e147c[_0x6d0015(0xf2)])});}),this[_0x5358e9(0xe5)](this[_0x5358e9(0xfa)]['ui'],_0x5358e9(0xff),()=>this[_0x5358e9(0xec)](_0x5358e9(0xe8)));}[_0x166dc0(0x10a)](_0x17fe87){const _0x16f64c=_0x166dc0;if(this[_0x16f64c(0xf4)][_0x16f64c(0x11e)](_0x17fe87[_0x16f64c(0x112)]))return;this[_0x16f64c(0xf4)][_0x16f64c(0x113)](_0x17fe87[_0x16f64c(0x112)]),this[_0x16f64c(0xfa)]['ui'][_0x16f64c(0x118)][_0x16f64c(0x113)](_0x17fe87[_0x16f64c(0x112)][_0x16f64c(0xee)]);const _0x386560=this[_0x16f64c(0xfa)][_0x16f64c(0x114)][_0x16f64c(0xed)](_0x289e31);this[_0x16f64c(0xe5)](_0x386560[_0x16f64c(0x109)],_0x16f64c(0x116),(_0x3b08a5,_0x27d892)=>{const _0x5910bd=_0x16f64c;this[_0x5910bd(0xfa)]['ui'][_0x5910bd(0x118)][_0x5910bd(0x116)](_0x27d892[_0x5910bd(0x112)][_0x5910bd(0xee)]),this[_0x5910bd(0xf4)][_0x5910bd(0xe3)](_0x27d892[_0x5910bd(0x112)]);});}[_0x166dc0(0x123)](){const _0x4740d7=_0x166dc0;return this[_0x4740d7(0xfa)][_0x4740d7(0x110)][_0x4740d7(0x112)][_0x4740d7(0x123)];}[_0x166dc0(0x10e)](_0x293714){const _0x217d93=_0x166dc0;if(_0x217d93(0x103)!=typeof _0x293714)throw new _0x4656c0(_0x217d93(0x10d));this[_0x217d93(0x10b)][_0x217d93(0x113)](_0x293714);}[_0x166dc0(0x11b)](){const _0x4a1457=_0x166dc0;this[_0x4a1457(0xec)](_0x4a1457(0x111));}[_0x166dc0(0x10f)]({activeAnnotation:_0x5bb7b9,annotations:_0x1df1de}){const _0x43e4ee=_0x166dc0,_0x3201ee=[],_0x2f2ec2=this[_0x43e4ee(0xfa)][_0x43e4ee(0x11a)][_0x43e4ee(0x115)][_0x43e4ee(0xe9)],_0x3d24bf=Array[_0x43e4ee(0x11c)](_0x2f2ec2[_0x43e4ee(0x101)]());for(const [_0x48c824,_0x55d50d]of this[_0x43e4ee(0x106)]){const _0x5784ee=_0x4cbb82(_0x55d50d),_0x663e8a=_0x1df1de[_0x43e4ee(0xeb)](_0x48c824);_0x5784ee&&_0x663e8a&&_0x3201ee[_0x43e4ee(0xe4)]({'annotation':_0x663e8a,'range':_0x5784ee});}function _0x4cbb82(_0xaaf9e4){const _0x127f84=_0x43e4ee;for(const _0x277baa of _0xaaf9e4)for(const _0x1ed8ae of _0x3d24bf)if(_0x277baa[_0x127f84(0x119)](_0x1ed8ae,!_0x2f2ec2[_0x127f84(0x11d)]))return _0x277baa;return null;}return _0x3201ee[_0x43e4ee(0xf7)]((_0x3d1279,_0x435075)=>{const _0x43b3d0=_0x43e4ee,_0x472f72=_0x3d1279[_0x43b3d0(0xf3)],_0x1f97aa=_0x435075[_0x43b3d0(0xf3)];if(!_0x472f72[_0x43b3d0(0x107)](_0x1f97aa)){if(_0x472f72[_0x43b3d0(0x119)](_0x1f97aa,!0x0))return 0x1;if(_0x1f97aa[_0x43b3d0(0x119)](_0x472f72,!0x0))return-0x1;}return _0x3d1279[_0x43b3d0(0x122)]==_0x5bb7b9?-0x1:_0x435075[_0x43b3d0(0x122)]==_0x5bb7b9?0x1:0x0;})[_0x43e4ee(0x11f)](_0x2cc99e=>_0x2cc99e[_0x43e4ee(0x122)]);}get[_0x166dc0(0x106)](){const _0x57363c=_0x166dc0,_0x23d820=new Map();for(const _0xc3f3ab of Array[_0x57363c(0x11c)](this[_0x57363c(0x10b)]))for(const [_0x27d6e1,_0x221485]of _0xc3f3ab())_0x23d820[_0x57363c(0x117)](_0x27d6e1,_0x221485);return _0x23d820;}}