UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 7.18 kB
/* * Copyright (c) 2003-2026, 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 _0x80c6bd=_0x4391;(function(_0x330331,_0x234cad){const _0x3ab653=_0x4391,_0x264c8b=_0x330331();while(!![]){try{const _0x578d3a=-parseInt(_0x3ab653(0x139))/0x1+-parseInt(_0x3ab653(0x111))/0x2*(-parseInt(_0x3ab653(0x116))/0x3)+parseInt(_0x3ab653(0x11d))/0x4+parseInt(_0x3ab653(0x144))/0x5*(parseInt(_0x3ab653(0x125))/0x6)+-parseInt(_0x3ab653(0x13d))/0x7+parseInt(_0x3ab653(0x118))/0x8*(-parseInt(_0x3ab653(0x141))/0x9)+-parseInt(_0x3ab653(0x14e))/0xa*(parseInt(_0x3ab653(0x128))/0xb);if(_0x578d3a===_0x234cad)break;else _0x264c8b['push'](_0x264c8b['shift']());}catch(_0xb6db08){_0x264c8b['push'](_0x264c8b['shift']());}}}(_0x3007,0x38c21));function _0x4391(_0x9465bf,_0x2a6af8){const _0x300769=_0x3007();return _0x4391=function(_0x4391af,_0x1f874f){_0x4391af=_0x4391af-0x110;let _0xcb8428=_0x300769[_0x4391af];return _0xcb8428;},_0x4391(_0x9465bf,_0x2a6af8);}import{Plugin as _0x35402f}from'ckeditor5/src/core.js';import{CKEditorError as _0x7ca146}from'ckeditor5/src/utils.js';import{debounce as _0xaab32a}from'es-toolkit/compat';import{Annotations as _0x4ec203}from'./annotations.js';export class EditorAnnotations extends _0x35402f{[_0x80c6bd(0x11f)];[_0x80c6bd(0x14b)];static get[_0x80c6bd(0x135)](){return[_0x4ec203];}static get[_0x80c6bd(0x142)](){const _0x1235ad=_0x80c6bd;return _0x1235ad(0x12e);}static get[_0x80c6bd(0x130)](){return!0x0;}static get[_0x80c6bd(0x14f)](){return!0x0;}constructor(_0x3a6e62){const _0x13027b=_0x80c6bd;super(_0x3a6e62),this[_0x13027b(0x11f)]=new Set(),this[_0x13027b(0x14b)]=new Set();}[_0x80c6bd(0x114)](){const _0x2347ac=_0x80c6bd,_0x147ad1=this[_0x2347ac(0x143)],_0x4f567e=_0x147ad1[_0x2347ac(0x11a)][_0x2347ac(0x121)][_0x2347ac(0x122)],_0x393ab1=_0xaab32a(()=>this[_0x2347ac(0x14d)](),0xa);_0x4f567e['on'](_0x2347ac(0x123),(_0x373526,_0x140180)=>{const _0xa08264=_0x2347ac;_0x140180[_0xa08264(0x136)]&&(_0x393ab1[_0xa08264(0x127)](),this[_0xa08264(0x14d)]());}),this[_0x2347ac(0x148)](_0x147ad1[_0x2347ac(0x149)][_0x2347ac(0x11b)][_0x2347ac(0x121)],_0x2347ac(0x12b),(_0x11c1ac,_0x47bd11,_0x2d1dac)=>{_0x2d1dac&&_0x393ab1();}),this[_0x2347ac(0x148)](_0x147ad1['ui'][_0x2347ac(0x132)],_0x2347ac(0x12b),(_0x5417f7,_0x5730d6,_0x59f16d)=>{const _0x511475=_0x2347ac;_0x59f16d||this[_0x511475(0x126)](_0x511475(0x117),{'isAnnotationTracked':_0x3c25ff=>this[_0x511475(0x131)][_0x511475(0x113)](_0x3c25ff[_0x511475(0x14a)])});}),this[_0x2347ac(0x148)](this[_0x2347ac(0x143)]['ui'],_0x2347ac(0x137),()=>this[_0x2347ac(0x126)](_0x2347ac(0x12f)));}[_0x80c6bd(0x115)](_0x3c84a0){const _0xc0e869=_0x80c6bd;if(this[_0xc0e869(0x14b)][_0xc0e869(0x113)](_0x3c84a0[_0xc0e869(0x11b)]))return;this[_0xc0e869(0x14b)][_0xc0e869(0x13f)](_0x3c84a0[_0xc0e869(0x11b)]),this[_0xc0e869(0x143)]['ui'][_0xc0e869(0x132)][_0xc0e869(0x13f)](_0x3c84a0[_0xc0e869(0x11b)][_0xc0e869(0x134)]);const _0x157d58=this[_0xc0e869(0x143)][_0xc0e869(0x119)][_0xc0e869(0x13b)](_0x4ec203);this[_0xc0e869(0x148)](_0x157d58[_0xc0e869(0x146)],_0xc0e869(0x150),(_0x1cceae,_0x2ae973)=>{const _0x74dd06=_0xc0e869;this[_0x74dd06(0x143)]['ui'][_0x74dd06(0x132)][_0x74dd06(0x150)](_0x2ae973[_0x74dd06(0x11b)][_0x74dd06(0x134)]),this[_0x74dd06(0x14b)][_0x74dd06(0x13e)](_0x2ae973[_0x74dd06(0x11b)]);});}[_0x80c6bd(0x11e)](){const _0x15970c=_0x80c6bd;return this[_0x15970c(0x143)][_0x15970c(0x149)][_0x15970c(0x11b)][_0x15970c(0x11e)];}[_0x80c6bd(0x140)](_0x664146){const _0xc6a122=_0x80c6bd;if(_0xc6a122(0x11c)!=typeof _0x664146)throw new _0x7ca146(_0xc6a122(0x120));this[_0xc6a122(0x11f)][_0xc6a122(0x13f)](_0x664146);}[_0x80c6bd(0x14d)](){const _0xcc3ef2=_0x80c6bd;this[_0xcc3ef2(0x126)](_0xcc3ef2(0x12d));}[_0x80c6bd(0x110)]({activeAnnotation:_0x3e16f1,annotations:_0x4c09a8}){const _0xcf88c1=_0x80c6bd,_0x818abd=[],_0x182912=this[_0xcf88c1(0x143)][_0xcf88c1(0x11a)][_0xcf88c1(0x121)][_0xcf88c1(0x122)],_0x13535d=Array[_0xcf88c1(0x12c)](_0x182912[_0xcf88c1(0x138)]());for(const [_0x4bbdb0,_0x4f31a1]of this[_0xcf88c1(0x131)]){const _0xe7a0e=_0x3cba10(_0x4f31a1),_0x5020ad=_0x4c09a8[_0xcf88c1(0x13a)](_0x4bbdb0);_0xe7a0e&&_0x5020ad&&_0x818abd[_0xcf88c1(0x133)]({'annotation':_0x5020ad,'range':_0xe7a0e});}function _0x3cba10(_0x2be85a){const _0x18b26e=_0xcf88c1;for(const _0x23370b of _0x2be85a)for(const _0x2934da of _0x13535d)if(_0x23370b[_0x18b26e(0x124)](_0x2934da,!_0x182912[_0x18b26e(0x14c)]))return _0x23370b;return null;}return _0x818abd[_0xcf88c1(0x12a)]((_0x20403a,_0x45916e)=>{const _0x5b810b=_0xcf88c1,_0xcd5e2d=_0x20403a[_0x5b810b(0x129)],_0x3e1b55=_0x45916e[_0x5b810b(0x129)];if(!_0xcd5e2d[_0x5b810b(0x13c)](_0x3e1b55)){if(_0xcd5e2d[_0x5b810b(0x124)](_0x3e1b55,!0x0))return 0x1;if(_0x3e1b55[_0x5b810b(0x124)](_0xcd5e2d,!0x0))return-0x1;}return _0x20403a[_0x5b810b(0x145)]==_0x3e16f1?-0x1:_0x45916e[_0x5b810b(0x145)]==_0x3e16f1?0x1:0x0;})[_0xcf88c1(0x112)](_0x4c9b62=>_0x4c9b62[_0xcf88c1(0x145)]);}get[_0x80c6bd(0x131)](){const _0x3babeb=_0x80c6bd,_0x17dafb=new Map();for(const _0x2f5fa0 of Array[_0x3babeb(0x12c)](this[_0x3babeb(0x11f)]))for(const [_0xebd6f4,_0x104d3a]of _0x2f5fa0())_0x17dafb[_0x3babeb(0x147)](_0xebd6f4,_0x104d3a);return _0x17dafb;}}function _0x3007(){const _0x34be3a=['refreshSelectedViews','597970uPGNpx','isPremiumPlugin','remove','getOrderedSelectedAnnotations','3798zKOqQq','map','has','init','registerAnnotation','579DZvNsz','blur','144dDBful','plugins','model','view','function','789492iNHrhM','hasDomSelection','_dataCollectors','editorannotations-invalid-source-callback','document','selection','change:range','containsRange','54thHTLL','fire','cancel','11ITRmdr','range','sort','change:isFocused','from','refresh','EditorAnnotations','uiUpdate','isOfficialPlugin','_editorAnnotationsData','focusTracker','push','element','requires','directChange','update','getRanges','145637mDVEip','getByInnerView','get','isEqual','373408QDlseb','delete','add','addSourceCollector','88776oxBjZT','pluginName','editor','58295vDmUDs','annotation','collection','set','listenTo','editing','innerView','_editorAnnotations','isCollapsed'];_0x3007=function(){return _0x34be3a;};return _0x3007();}