UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 9.49 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 _0x16d18a=_0x2557;(function(_0x41e183,_0x27dacf){const _0x1e82a2=_0x2557,_0x25b5b0=_0x41e183();while(!![]){try{const _0x578f1f=parseInt(_0x1e82a2(0x11f))/0x1+-parseInt(_0x1e82a2(0x122))/0x2*(parseInt(_0x1e82a2(0x107))/0x3)+parseInt(_0x1e82a2(0x10f))/0x4+parseInt(_0x1e82a2(0x14c))/0x5*(-parseInt(_0x1e82a2(0x134))/0x6)+parseInt(_0x1e82a2(0x121))/0x7+-parseInt(_0x1e82a2(0x102))/0x8+parseInt(_0x1e82a2(0x10e))/0x9*(-parseInt(_0x1e82a2(0x11a))/0xa);if(_0x578f1f===_0x27dacf)break;else _0x25b5b0['push'](_0x25b5b0['shift']());}catch(_0x42d137){_0x25b5b0['push'](_0x25b5b0['shift']());}}}(_0x5392,0x33618));import{ContextPlugin as _0x39ef13,Editor as _0x2b2972}from'ckeditor5/src/core.js';import{first as _0x514a39}from'ckeditor5/src/utils.js';import _0x3d36ad from'./annotation.js';import _0x15113c from'./annotationcollection.js';function _0x2557(_0x15f8c0,_0x7f0c7e){const _0x5392d6=_0x5392();return _0x2557=function(_0x255714,_0xfd8f6c){_0x255714=_0x255714-0xfe;let _0x58f032=_0x5392d6[_0x255714];return _0x58f032;},_0x2557(_0x15f8c0,_0x7f0c7e);}import _0x489566 from'./view/annotationview.js';import{getTranslation as _0x1beb54}from'../utils/common-translations.js';function _0x5392(){const _0x6b7885=['editing','_activateAnnotation','Enter','push','Ctrl+Shift+E','Shift+Tab','activate','fire','_setupEscapeAnnotationHandling','70PUxQod','ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS','listenTo','Annotations','ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO','396735shyhzv','pluginName','2532187jCndfR','2StPUlm','element','escape','Ctrl+Enter','_deactivateAllAnnotations','stopListening','createAnnotation','_visibleAnnotations','ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT','accessibility','set','destroy','isPremiumPlugin','deactivateAll','domRoots','collection','addKeystrokeInfoGroup','locale','1795782eesVTG','contains','focusTracker','ACCESSIBILITY_HELP_ANNOTATIONS_GROUP','context','Arrowup','change:isVisible','activeAnnotations','_removeActiveAnnotation','Esc','_bindAnnotationsToVisibleAnnotations','delete','createAnnotationView','keystrokes','add','source','remove','ACCESSIBILITY_HELP_ANNOTATIONS_EXIT','isOfficialPlugin','annotations','target','Tab','isVisible','Arrowdown','5EzHZxr','has','isArray','low','refreshPositioning','2237320msbcPf','ready','ACCESSIBILITY_HELP_ANNOTATIONS_ENTER','editors','focus','151257GUkBEh','view','getByInnerView','ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS','values','_setupEnterAnnotationKeystroke','refreshVisibility','152865nmolcF','801024mcGatf','_addActiveAnnotation'];_0x5392=function(){return _0x6b7885;};return _0x5392();}import{FOCUS_ANNOTATION_KEYSTROKE as _0x44917f}from'@ckeditor/ckeditor5-collaboration-core';export default class O extends _0x39ef13{[_0x16d18a(0x131)];[_0x16d18a(0x129)];static get[_0x16d18a(0x120)](){const _0x215c60=_0x16d18a;return _0x215c60(0x11d);}static get[_0x16d18a(0x146)](){return!0x0;}static get[_0x16d18a(0x12e)](){return!0x0;}constructor(_0x5188d7){const _0x2fe928=_0x16d18a;if(super(_0x5188d7),this[_0x2fe928(0x131)]=new _0x15113c(),this[_0x2fe928(0x129)]=new _0x15113c(),this[_0x2fe928(0x12c)](_0x2fe928(0x13b),new Set()),this[_0x2fe928(0x13e)](),_0x5188d7 instanceof _0x2b2972){const _0x5f503b=_0x5188d7[_0x2fe928(0x133)];_0x5188d7[_0x2fe928(0x12b)][_0x2fe928(0x132)]({'id':_0x2fe928(0x147),'label':_0x1beb54(_0x5f503b,_0x2fe928(0x137)),'keystrokes':[{'label':_0x1beb54(_0x5f503b,_0x2fe928(0x11e)),'keystroke':_0x2fe928(0x115)},{'label':_0x1beb54(_0x5f503b,_0x2fe928(0x145)),'keystroke':_0x2fe928(0x13d)},{'label':_0x1beb54(_0x5f503b,_0x2fe928(0x104)),'keystroke':_0x2fe928(0x113)},{'label':_0x1beb54(_0x5f503b,_0x2fe928(0x10a)),'keystroke':[[_0x2fe928(0x149)],[_0x2fe928(0x116)]]},{'label':_0x1beb54(_0x5f503b,_0x2fe928(0x12a)),'keystroke':[_0x2fe928(0x125)]},{'label':_0x1beb54(_0x5f503b,_0x2fe928(0x11b)),'keystroke':[[_0x2fe928(0x139)],[_0x2fe928(0x14b)]]}]});}this[_0x2fe928(0x10c)](),this[_0x2fe928(0x119)]();}[_0x16d18a(0x142)](_0x1fe914){const _0x1e8fee=_0x16d18a;this[_0x1e8fee(0x131)][_0x1e8fee(0x142)](_0x1fe914);}[_0x16d18a(0x144)](_0x5f1754){const _0x1aeffd=_0x16d18a;this[_0x1aeffd(0x131)][_0x1aeffd(0x144)](_0x5f1754),_0x5f1754[_0x1aeffd(0x12d)]();}[_0x16d18a(0x10d)](){const _0x378f20=_0x16d18a;for(const _0x3a14b3 of this[_0x378f20(0x131)])_0x3a14b3[_0x378f20(0x10d)]();}[_0x16d18a(0x101)](){const _0x25e382=_0x16d18a;this[_0x25e382(0x129)][_0x25e382(0x101)]();}[_0x16d18a(0x109)](_0x586a8d){const _0x487a58=_0x16d18a;return this[_0x487a58(0x131)][_0x487a58(0x109)](_0x586a8d);}[_0x16d18a(0x12f)](){const _0x482495=_0x16d18a;this[_0x482495(0x118)](_0x482495(0x126));}[_0x16d18a(0x12d)](){const _0xefaf88=_0x16d18a;for(const _0x44e28b of this[_0xefaf88(0x131)])_0x44e28b[_0xefaf88(0x12d)]();this[_0xefaf88(0x129)][_0xefaf88(0x12d)](),this[_0xefaf88(0x131)][_0xefaf88(0x12d)](),super[_0xefaf88(0x12d)]();}[_0x16d18a(0x117)](_0x6cea99){const _0x2c8599=_0x16d18a;this[_0x2c8599(0x118)](_0x2c8599(0x112),_0x6cea99);}[_0x16d18a(0x128)](_0x4768fc){return new _0x3d36ad(_0x4768fc);}[_0x16d18a(0x140)](_0x298bc3,_0x21ada0){return new _0x489566(_0x298bc3,_0x21ada0);}[_0x16d18a(0x110)](_0x44662f){const _0x51a01a=_0x16d18a,_0x14d5b4=new Set(this[_0x51a01a(0x13b)]);_0x14d5b4[_0x51a01a(0x142)](_0x44662f),this[_0x51a01a(0x13b)]=_0x14d5b4;}[_0x16d18a(0x13c)](_0x2f6253){const _0x1871cc=_0x16d18a,_0x160abf=new Set(this[_0x1871cc(0x13b)]);_0x160abf[_0x1871cc(0x13f)](_0x2f6253),this[_0x1871cc(0x13b)]=_0x160abf;}[_0x16d18a(0x13e)](){const _0x348de0=_0x16d18a,_0x1f2811=this[_0x348de0(0x131)],_0x2b109c=this[_0x348de0(0x129)];function _0x377549(_0x5260d1){const _0x8af2da=_0x348de0,_0x4ae8b8=_0x5260d1[_0x8af2da(0x143)];_0x4ae8b8[_0x8af2da(0x14a)]&&!_0x2b109c[_0x8af2da(0xfe)](_0x4ae8b8)?_0x2b109c[_0x8af2da(0x142)](_0x4ae8b8):!_0x4ae8b8[_0x8af2da(0x14a)]&&_0x2b109c[_0x8af2da(0xfe)](_0x4ae8b8)&&_0x2b109c[_0x8af2da(0x144)](_0x4ae8b8),_0x4ae8b8[_0x8af2da(0x108)][_0x8af2da(0x136)][_0x8af2da(0x144)](_0x4ae8b8[_0x8af2da(0x108)][_0x8af2da(0x123)]),_0x4ae8b8[_0x8af2da(0x108)][_0x8af2da(0x136)][_0x8af2da(0x142)](_0x4ae8b8[_0x8af2da(0x108)][_0x8af2da(0x123)]);}this[_0x348de0(0x11c)](_0x1f2811,_0x348de0(0x142),(_0xaad4ea,_0x5cff9b)=>{const _0x5b9528=_0x348de0;_0x5cff9b[_0x5b9528(0x14a)]&&_0x2b109c[_0x5b9528(0x142)](_0x5cff9b),this[_0x5b9528(0x11c)](_0x5cff9b,_0x5b9528(0x13a),_0x377549);}),this[_0x348de0(0x11c)](_0x1f2811,_0x348de0(0x144),(_0x945eaa,_0x1f28a5)=>{const _0x1311d1=_0x348de0;_0x2b109c[_0x1311d1(0xfe)](_0x1f28a5)&&_0x2b109c[_0x1311d1(0x144)](_0x1f28a5),this[_0x1311d1(0x127)](_0x1f28a5,_0x1311d1(0x13a),_0x377549);});}[_0x16d18a(0x10c)](){const _0x8d091=_0x16d18a,_0x487258=_0x12a906=>{const _0x1411bf=_0x2557;_0x12a906['on'](_0x1411bf(0x103),()=>{const _0x4b3aa2=_0x1411bf;_0x12a906[_0x4b3aa2(0x141)][_0x4b3aa2(0x12c)](_0x44917f,(_0x203f71,_0x4075f9)=>{const _0x7571e5=_0x4b3aa2,_0x3b82e0=_0x514a39(this[_0x7571e5(0x13b)][_0x7571e5(0x10b)]());_0x3b82e0&&(_0x3b82e0[_0x7571e5(0x108)][_0x7571e5(0x106)](),_0x4075f9());});});};this[_0x8d091(0x138)]instanceof _0x2b2972?_0x487258(this[_0x8d091(0x138)]):this[_0x8d091(0x138)][_0x8d091(0x105)]&&this[_0x8d091(0x138)][_0x8d091(0x105)]['on'](_0x8d091(0x142),(_0x4033ce,_0x271903)=>{_0x487258(_0x271903);});}[_0x16d18a(0x119)](){const _0x2309bf=_0x16d18a,_0x6dc29c=_0x50cc19=>{const _0x39b748=_0x2557,_0x253acf=_0x50cc19[_0x39b748(0x143)],_0x491173=[];let _0x27d085;if(Array[_0x39b748(0xff)](_0x253acf[_0x39b748(0x148)])){_0x27d085=_0x253acf[_0x39b748(0x148)][0x0],this[_0x39b748(0x138)]instanceof _0x2b2972?_0x491173[_0x39b748(0x114)](this[_0x39b748(0x138)]):this[_0x39b748(0x138)][_0x39b748(0x105)]&&_0x491173[_0x39b748(0x114)](...this[_0x39b748(0x138)][_0x39b748(0x105)]);for(const _0x397621 of _0x491173)for(const _0x18599d of _0x397621[_0x39b748(0x111)][_0x39b748(0x108)][_0x39b748(0x130)][_0x39b748(0x10b)]())if(_0x18599d[_0x39b748(0x135)](_0x27d085))return void _0x397621[_0x39b748(0x111)][_0x39b748(0x108)][_0x39b748(0x106)]();_0x27d085[_0x39b748(0x106)]();}};this[_0x2309bf(0x11c)](this[_0x2309bf(0x131)],_0x2309bf(0x142),(_0x2257d1,_0x2c1ea1)=>{const _0x23620c=_0x2309bf;this[_0x23620c(0x11c)](_0x2c1ea1,_0x23620c(0x124),_0x6dc29c,{'priority':_0x23620c(0x100)});}),this[_0x2309bf(0x11c)](this[_0x2309bf(0x131)],_0x2309bf(0x144),(_0x1fbbc3,_0x12ff9a)=>{const _0xda120f=_0x2309bf;this[_0xda120f(0x127)](_0x12ff9a,_0xda120f(0x124),_0x6dc29c);});}}