UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 7.09 kB
/* * 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 _0x2f22c9=_0x3d6a;(function(_0x240bb6,_0x5e9eb1){const _0x3cabcc=_0x3d6a,_0x4bee8e=_0x240bb6();while(!![]){try{const _0x15bfb8=-parseInt(_0x3cabcc(0x12a))/0x1+parseInt(_0x3cabcc(0x117))/0x2+parseInt(_0x3cabcc(0x121))/0x3+parseInt(_0x3cabcc(0x13f))/0x4*(-parseInt(_0x3cabcc(0x126))/0x5)+parseInt(_0x3cabcc(0x130))/0x6*(parseInt(_0x3cabcc(0x12f))/0x7)+-parseInt(_0x3cabcc(0x123))/0x8+-parseInt(_0x3cabcc(0x145))/0x9;if(_0x15bfb8===_0x5e9eb1)break;else _0x4bee8e['push'](_0x4bee8e['shift']());}catch(_0x3206d9){_0x4bee8e['push'](_0x4bee8e['shift']());}}}(_0x1464,0x265e7));import{Plugin as _0x4cd874}from'ckeditor5/src/core.js';import{CKEditorError as _0x526551}from'ckeditor5/src/utils.js';import{debounce as _0x5e30b1}from'es-toolkit/compat';import{Annotations as _0x3ae4ee}from'./annotations.js';export class EditorAnnotations extends _0x4cd874{[_0x2f22c9(0x129)];[_0x2f22c9(0x13e)];static get[_0x2f22c9(0x118)](){return[_0x3ae4ee];}static get[_0x2f22c9(0x116)](){const _0x37b3e4=_0x2f22c9;return _0x37b3e4(0x12c);}static get[_0x2f22c9(0x10f)](){return!0x0;}static get[_0x2f22c9(0x11a)](){return!0x0;}constructor(_0x212fe1){const _0x5589c3=_0x2f22c9;super(_0x212fe1),this[_0x5589c3(0x129)]=new Set(),this[_0x5589c3(0x13e)]=new Set();}[_0x2f22c9(0x13d)](){const _0xdcbb9e=_0x2f22c9,_0xb67588=this[_0xdcbb9e(0x127)],_0x5df87c=_0xb67588[_0xdcbb9e(0x149)][_0xdcbb9e(0x148)][_0xdcbb9e(0x122)],_0x547a85=_0x5e30b1(()=>this[_0xdcbb9e(0x141)](),0xa);_0x5df87c['on'](_0xdcbb9e(0x115),(_0x11a6ee,_0x1db3af)=>{const _0x1eaa30=_0xdcbb9e;_0x1db3af[_0x1eaa30(0x134)]&&(_0x547a85[_0x1eaa30(0x11b)](),this[_0x1eaa30(0x141)]());}),this[_0xdcbb9e(0x132)](_0xb67588[_0xdcbb9e(0x110)][_0xdcbb9e(0x147)][_0xdcbb9e(0x148)],_0xdcbb9e(0x11e),(_0x43e10d,_0x577ee9,_0x5121ea)=>{_0x5121ea&&_0x547a85();}),this[_0xdcbb9e(0x132)](_0xb67588['ui'][_0xdcbb9e(0x135)],_0xdcbb9e(0x11e),(_0x25f5b4,_0x5eeebf,_0x4daf63)=>{const _0x1c1b99=_0xdcbb9e;_0x4daf63||this[_0x1c1b99(0x143)](_0x1c1b99(0x139),{'isAnnotationTracked':_0x1463fd=>this[_0x1c1b99(0x140)][_0x1c1b99(0x113)](_0x1463fd[_0x1c1b99(0x14d)])});}),this[_0xdcbb9e(0x132)](this[_0xdcbb9e(0x127)]['ui'],_0xdcbb9e(0x111),()=>this[_0xdcbb9e(0x143)](_0xdcbb9e(0x114)));}[_0x2f22c9(0x12d)](_0x18dc44){const _0x43d2af=_0x2f22c9;if(this[_0x43d2af(0x13e)][_0x43d2af(0x113)](_0x18dc44[_0x43d2af(0x147)]))return;this[_0x43d2af(0x13e)][_0x43d2af(0x14a)](_0x18dc44[_0x43d2af(0x147)]),this[_0x43d2af(0x127)]['ui'][_0x43d2af(0x135)][_0x43d2af(0x14a)](_0x18dc44[_0x43d2af(0x147)][_0x43d2af(0x12e)]);const _0x1a895e=this[_0x43d2af(0x127)][_0x43d2af(0x131)][_0x43d2af(0x14b)](_0x3ae4ee);this[_0x43d2af(0x132)](_0x1a895e[_0x43d2af(0x119)],_0x43d2af(0x120),(_0x1851b3,_0x1fd569)=>{const _0x3b2058=_0x43d2af;this[_0x3b2058(0x127)]['ui'][_0x3b2058(0x135)][_0x3b2058(0x120)](_0x1fd569[_0x3b2058(0x147)][_0x3b2058(0x12e)]),this[_0x3b2058(0x13e)][_0x3b2058(0x125)](_0x1fd569[_0x3b2058(0x147)]);});}[_0x2f22c9(0x136)](){const _0x57e95d=_0x2f22c9;return this[_0x57e95d(0x127)][_0x57e95d(0x110)][_0x57e95d(0x147)][_0x57e95d(0x136)];}[_0x2f22c9(0x11c)](_0x146791){const _0x232384=_0x2f22c9;if(_0x232384(0x138)!=typeof _0x146791)throw new _0x526551(_0x232384(0x14c));this[_0x232384(0x129)][_0x232384(0x14a)](_0x146791);}[_0x2f22c9(0x141)](){const _0x331f46=_0x2f22c9;this[_0x331f46(0x143)](_0x331f46(0x124));}[_0x2f22c9(0x133)]({activeAnnotation:_0x45cd50,annotations:_0x4dbc56}){const _0x4d4654=_0x2f22c9,_0x46ea5c=[],_0x5bfc52=this[_0x4d4654(0x127)][_0x4d4654(0x149)][_0x4d4654(0x148)][_0x4d4654(0x122)],_0x2a31b1=Array[_0x4d4654(0x11d)](_0x5bfc52[_0x4d4654(0x144)]());for(const [_0x3e261f,_0x48b3e0]of this[_0x4d4654(0x140)]){const _0x20a02e=_0x1bb956(_0x48b3e0),_0x217821=_0x4dbc56[_0x4d4654(0x12b)](_0x3e261f);_0x20a02e&&_0x217821&&_0x46ea5c[_0x4d4654(0x112)]({'annotation':_0x217821,'range':_0x20a02e});}function _0x1bb956(_0x475e3a){const _0x3e3fff=_0x4d4654;for(const _0x5af3c0 of _0x475e3a)for(const _0x5bf694 of _0x2a31b1)if(_0x5af3c0[_0x3e3fff(0x146)](_0x5bf694,!_0x5bfc52[_0x3e3fff(0x142)]))return _0x5af3c0;return null;}return _0x46ea5c[_0x4d4654(0x13a)]((_0x46667f,_0x165844)=>{const _0x2c5f0f=_0x4d4654,_0x39f888=_0x46667f[_0x2c5f0f(0x128)],_0x3c648d=_0x165844[_0x2c5f0f(0x128)];if(!_0x39f888[_0x2c5f0f(0x11f)](_0x3c648d)){if(_0x39f888[_0x2c5f0f(0x146)](_0x3c648d,!0x0))return 0x1;if(_0x3c648d[_0x2c5f0f(0x146)](_0x39f888,!0x0))return-0x1;}return _0x46667f[_0x2c5f0f(0x137)]==_0x45cd50?-0x1:_0x165844[_0x2c5f0f(0x137)]==_0x45cd50?0x1:0x0;})[_0x4d4654(0x13c)](_0x52b398=>_0x52b398[_0x4d4654(0x137)]);}get[_0x2f22c9(0x140)](){const _0xc6c49a=_0x2f22c9,_0x303de9=new Map();for(const _0x399d89 of Array[_0xc6c49a(0x11d)](this[_0xc6c49a(0x129)]))for(const [_0x5f067c,_0x49f95e]of _0x399d89())_0x303de9[_0xc6c49a(0x13b)](_0x5f067c,_0x49f95e);return _0x303de9;}}function _0x3d6a(_0x51c5b8,_0x1a760f){const _0x1464f7=_0x1464();return _0x3d6a=function(_0x3d6a72,_0x512925){_0x3d6a72=_0x3d6a72-0x10f;let _0x5a0404=_0x1464f7[_0x3d6a72];return _0x5a0404;},_0x3d6a(_0x51c5b8,_0x1a760f);}function _0x1464(){const _0x38861b=['isOfficialPlugin','editing','update','push','has','uiUpdate','change:range','pluginName','464698QpRYUM','requires','collection','isPremiumPlugin','cancel','addSourceCollector','from','change:isFocused','isEqual','remove','786162xkqAdY','selection','183976fFbjxk','refresh','delete','305780eZhIQJ','editor','range','_dataCollectors','67902wJQYou','getByInnerView','EditorAnnotations','registerAnnotation','element','21djPNOB','280554qzSoKL','plugins','listenTo','getOrderedSelectedAnnotations','directChange','focusTracker','hasDomSelection','annotation','function','blur','sort','set','map','init','_editorAnnotations','4rZtbMg','_editorAnnotationsData','refreshSelectedViews','isCollapsed','fire','getRanges','2929194YfPMNW','containsRange','view','document','model','add','get','editorannotations-invalid-source-callback','innerView'];_0x1464=function(){return _0x38861b;};return _0x1464();}