@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.56 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 _0x1db9cb=_0x1655;function _0x1655(_0x202d20,_0x2365c6){const _0x598af8=_0x598a();return _0x1655=function(_0x165512,_0x42ad19){_0x165512=_0x165512-0x179;let _0x409ab8=_0x598af8[_0x165512];return _0x409ab8;},_0x1655(_0x202d20,_0x2365c6);}(function(_0x4209de,_0x483146){const _0x1e2a6d=_0x1655,_0x3d766b=_0x4209de();while(!![]){try{const _0x1c8a2e=parseInt(_0x1e2a6d(0x1a7))/0x1+parseInt(_0x1e2a6d(0x19e))/0x2+parseInt(_0x1e2a6d(0x19d))/0x3+parseInt(_0x1e2a6d(0x1a3))/0x4*(-parseInt(_0x1e2a6d(0x18e))/0x5)+parseInt(_0x1e2a6d(0x1af))/0x6*(parseInt(_0x1e2a6d(0x183))/0x7)+parseInt(_0x1e2a6d(0x1c6))/0x8+-parseInt(_0x1e2a6d(0x1aa))/0x9*(parseInt(_0x1e2a6d(0x1ab))/0xa);if(_0x1c8a2e===_0x483146)break;else _0x3d766b['push'](_0x3d766b['shift']());}catch(_0x3d89b9){_0x3d766b['push'](_0x3d766b['shift']());}}}(_0x598a,0x4eb19));import{ContextPlugin as _0x31af80,Editor as _0x5a3eca}from'ckeditor5/src/core.js';import{first as _0xbc0c32}from'ckeditor5/src/utils.js';import{Annotation as _0x42bb38}from'./annotation.js';import{AnnotationCollection as _0x5cb228}from'./annotationcollection.js';import{AnnotationView as _0x3b0d68}from'./view/annotationview.js';import{getTranslation as _0x4062ad}from'../utils/common-translations.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x544913}from'@ckeditor/ckeditor5-collaboration-core';export class Annotations extends _0x31af80{[_0x1db9cb(0x199)];[_0x1db9cb(0x1b7)];static get[_0x1db9cb(0x1a4)](){const _0x373aab=_0x1db9cb;return _0x373aab(0x198);}static get[_0x1db9cb(0x1c2)](){return!0x0;}static get[_0x1db9cb(0x1b4)](){return!0x0;}constructor(_0x4c6a35){const _0x309710=_0x1db9cb;if(super(_0x4c6a35),this[_0x309710(0x199)]=new _0x5cb228(),this[_0x309710(0x1b7)]=new _0x5cb228(),this[_0x309710(0x1a2)](_0x309710(0x182),new Set()),this[_0x309710(0x1b1)](),_0x4c6a35 instanceof _0x5a3eca){const _0x489351=_0x4c6a35[_0x309710(0x19b)];_0x4c6a35[_0x309710(0x1ae)][_0x309710(0x1ad)]({'id':_0x309710(0x1ac),'label':_0x4062ad(_0x489351,_0x309710(0x1bc)),'keystrokes':[{'label':_0x4062ad(_0x489351,_0x309710(0x1c5)),'keystroke':_0x309710(0x1c1)},{'label':_0x4062ad(_0x489351,_0x309710(0x17d)),'keystroke':_0x309710(0x195)},{'label':_0x4062ad(_0x489351,_0x309710(0x196)),'keystroke':_0x309710(0x1b6)},{'label':_0x4062ad(_0x489351,_0x309710(0x1b3)),'keystroke':[[_0x309710(0x1b0)],[_0x309710(0x193)]]},{'label':_0x4062ad(_0x489351,_0x309710(0x18f)),'keystroke':[_0x309710(0x1b9)]},{'label':_0x4062ad(_0x489351,_0x309710(0x184)),'keystroke':[[_0x309710(0x17f)],[_0x309710(0x186)]]}]});}this[_0x309710(0x1a8)](),this[_0x309710(0x194)]();}[_0x1db9cb(0x1a1)](_0x28d358){const _0x7dc14a=_0x1db9cb;this[_0x7dc14a(0x199)][_0x7dc14a(0x1a1)](_0x28d358);}[_0x1db9cb(0x18a)](_0x8641cd){const _0x2ffd8a=_0x1db9cb;this[_0x2ffd8a(0x199)][_0x2ffd8a(0x18a)](_0x8641cd),_0x8641cd[_0x2ffd8a(0x1a5)]();}[_0x1db9cb(0x1c0)](){const _0x15337f=_0x1db9cb;for(const _0x280655 of this[_0x15337f(0x199)])_0x280655[_0x15337f(0x1c0)]();}[_0x1db9cb(0x191)](){const _0x3dfd61=_0x1db9cb;this[_0x3dfd61(0x1b7)][_0x3dfd61(0x191)]();}[_0x1db9cb(0x17c)](_0xf2e1bf){const _0x59de42=_0x1db9cb;return this[_0x59de42(0x199)][_0x59de42(0x17c)](_0xf2e1bf);}[_0x1db9cb(0x189)](){const _0x1731a1=_0x1db9cb;this[_0x1731a1(0x188)](_0x1731a1(0x1b2));}[_0x1db9cb(0x1a5)](){const _0x14f7c2=_0x1db9cb;for(const _0x1fc758 of this[_0x14f7c2(0x199)])_0x1fc758[_0x14f7c2(0x1a5)]();this[_0x14f7c2(0x1b7)][_0x14f7c2(0x1a5)](),this[_0x14f7c2(0x199)][_0x14f7c2(0x1a5)](),super[_0x14f7c2(0x1a5)]();}[_0x1db9cb(0x17e)](_0x3f513f){const _0x17f6f3=_0x1db9cb;this[_0x17f6f3(0x188)](_0x17f6f3(0x1a6),_0x3f513f);}[_0x1db9cb(0x18b)](_0x483cea){return new _0x42bb38(_0x483cea);}[_0x1db9cb(0x180)](_0x5c3d3b,_0x3dd289){return new _0x3b0d68(_0x5c3d3b,_0x3dd289);}[_0x1db9cb(0x187)](_0x1ac73a){const _0x51edda=_0x1db9cb,_0x1bd9a9=new Set(this[_0x51edda(0x182)]);_0x1bd9a9[_0x51edda(0x1a1)](_0x1ac73a),this[_0x51edda(0x182)]=_0x1bd9a9;}[_0x1db9cb(0x1b8)](_0xbe94a3){const _0x3a456b=_0x1db9cb,_0x1939ec=new Set(this[_0x3a456b(0x182)]);_0x1939ec[_0x3a456b(0x1c3)](_0xbe94a3),this[_0x3a456b(0x182)]=_0x1939ec;}[_0x1db9cb(0x1b1)](){const _0x4a949a=_0x1db9cb,_0xefcb3c=this[_0x4a949a(0x199)],_0x5af82d=this[_0x4a949a(0x1b7)];function _0x1e03a5(_0xa36271){const _0x48cc54=_0x4a949a,_0x551385=_0xa36271[_0x48cc54(0x181)];_0x551385[_0x48cc54(0x1bb)]&&!_0x5af82d[_0x48cc54(0x1c4)](_0x551385)?_0x5af82d[_0x48cc54(0x1a1)](_0x551385):!_0x551385[_0x48cc54(0x1bb)]&&_0x5af82d[_0x48cc54(0x1c4)](_0x551385)&&_0x5af82d[_0x48cc54(0x18a)](_0x551385),_0x551385[_0x48cc54(0x1b5)][_0x48cc54(0x19a)][_0x48cc54(0x18a)](_0x551385[_0x48cc54(0x1b5)][_0x48cc54(0x1a0)]),_0x551385[_0x48cc54(0x1b5)][_0x48cc54(0x19a)][_0x48cc54(0x1a1)](_0x551385[_0x48cc54(0x1b5)][_0x48cc54(0x1a0)]);}this[_0x4a949a(0x19f)](_0xefcb3c,_0x4a949a(0x1a1),(_0x51de14,_0x428c3c)=>{const _0x3380cb=_0x4a949a;_0x428c3c[_0x3380cb(0x1bb)]&&_0x5af82d[_0x3380cb(0x1a1)](_0x428c3c),this[_0x3380cb(0x19f)](_0x428c3c,_0x3380cb(0x19c),_0x1e03a5);}),this[_0x4a949a(0x19f)](_0xefcb3c,_0x4a949a(0x18a),(_0x32841b,_0x27c4ce)=>{const _0x26dabd=_0x4a949a;_0x5af82d[_0x26dabd(0x1c4)](_0x27c4ce)&&_0x5af82d[_0x26dabd(0x18a)](_0x27c4ce),this[_0x26dabd(0x1be)](_0x27c4ce,_0x26dabd(0x19c),_0x1e03a5);});}[_0x1db9cb(0x1a8)](){const _0x120bfe=_0x1db9cb,_0x46eafa=_0x5dfa37=>{const _0x43667b=_0x1655;_0x5dfa37['on'](_0x43667b(0x185),()=>{const _0x57744b=_0x43667b;_0x5dfa37[_0x57744b(0x17a)][_0x57744b(0x1a2)](_0x544913,(_0xb646df,_0x465fa3)=>{const _0x519f76=_0x57744b,_0x2895f9=_0xbc0c32(this[_0x519f76(0x182)][_0x519f76(0x18c)]());_0x2895f9&&(_0x2895f9[_0x519f76(0x1b5)][_0x519f76(0x197)](),_0x465fa3());});});};this[_0x120bfe(0x18d)]instanceof _0x5a3eca?_0x46eafa(this[_0x120bfe(0x18d)]):this[_0x120bfe(0x18d)][_0x120bfe(0x179)]&&this[_0x120bfe(0x18d)][_0x120bfe(0x179)]['on'](_0x120bfe(0x1a1),(_0x1c7be3,_0x258267)=>{_0x46eafa(_0x258267);});}[_0x1db9cb(0x194)](){const _0x51f98b=_0x1db9cb,_0x27a41b=_0x9e9bb9=>{const _0x27e98b=_0x1655,_0x3ec3d6=_0x9e9bb9[_0x27e98b(0x181)],_0x15f994=[];let _0xbc7111;if(Array[_0x27e98b(0x1bf)](_0x3ec3d6[_0x27e98b(0x1ba)])){_0xbc7111=_0x3ec3d6[_0x27e98b(0x1ba)][0x0],this[_0x27e98b(0x18d)]instanceof _0x5a3eca?_0x15f994[_0x27e98b(0x1bd)](this[_0x27e98b(0x18d)]):this[_0x27e98b(0x18d)][_0x27e98b(0x179)]&&_0x15f994[_0x27e98b(0x1bd)](...this[_0x27e98b(0x18d)][_0x27e98b(0x179)]);for(const _0x208d10 of _0x15f994)for(const _0x228457 of _0x208d10[_0x27e98b(0x17b)][_0x27e98b(0x1b5)][_0x27e98b(0x1a9)][_0x27e98b(0x18c)]())if(_0x228457[_0x27e98b(0x192)](_0xbc7111))return void _0x208d10[_0x27e98b(0x17b)][_0x27e98b(0x1b5)][_0x27e98b(0x197)]();_0xbc7111[_0x27e98b(0x197)]();}};this[_0x51f98b(0x19f)](this[_0x51f98b(0x199)],_0x51f98b(0x1a1),(_0xcc34c3,_0xe733db)=>{const _0x4efb80=_0x51f98b;this[_0x4efb80(0x19f)](_0xe733db,_0x4efb80(0x190),_0x27a41b,{'priority':_0x4efb80(0x1c7)});}),this[_0x51f98b(0x19f)](this[_0x51f98b(0x199)],_0x51f98b(0x18a),(_0x59c342,_0x30c094)=>{const _0x5e93fb=_0x51f98b;this[_0x5e93fb(0x1be)](_0x30c094,_0x5e93fb(0x190),_0x27a41b);});}}function _0x598a(){const _0x59fd78=['delete','has','ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO','4090232VDRyur','low','editors','keystrokes','editing','getByInnerView','ACCESSIBILITY_HELP_ANNOTATIONS_EXIT','activate','Arrowup','createAnnotationView','source','activeAnnotations','7qBmHUL','ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS','ready','Arrowdown','_addActiveAnnotation','fire','deactivateAll','remove','createAnnotation','values','context','5gLYHgO','ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT','escape','refreshPositioning','contains','Shift+Tab','_setupEscapeAnnotationHandling','Esc','ACCESSIBILITY_HELP_ANNOTATIONS_ENTER','focus','Annotations','collection','focusTracker','locale','change:isVisible','1217805yTQwLp','645270jPuKjw','listenTo','element','add','set','1485464QPoRNW','pluginName','destroy','_activateAnnotation','574585LtJjrj','_setupEnterAnnotationKeystroke','domRoots','1422XKUXKJ','92500uZzGvD','annotations','addKeystrokeInfoGroup','accessibility','2044566QEPxPh','Tab','_bindAnnotationsToVisibleAnnotations','_deactivateAllAnnotations','ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS','isPremiumPlugin','view','Enter','_visibleAnnotations','_removeActiveAnnotation','Ctrl+Enter','target','isVisible','ACCESSIBILITY_HELP_ANNOTATIONS_GROUP','push','stopListening','isArray','refreshVisibility','Ctrl+Shift+E','isOfficialPlugin'];_0x598a=function(){return _0x59fd78;};return _0x598a();}