UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 9.42 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 _0x4d4602=_0x51d5;(function(_0xdb21b8,_0x1958b3){const _0xcebd71=_0x51d5,_0x5dde=_0xdb21b8();while(!![]){try{const _0x165094=parseInt(_0xcebd71(0xc1))/0x1*(parseInt(_0xcebd71(0xe7))/0x2)+parseInt(_0xcebd71(0x103))/0x3*(parseInt(_0xcebd71(0xc4))/0x4)+-parseInt(_0xcebd71(0x104))/0x5*(parseInt(_0xcebd71(0xf0))/0x6)+-parseInt(_0xcebd71(0xed))/0x7+parseInt(_0xcebd71(0xff))/0x8*(-parseInt(_0xcebd71(0xec))/0x9)+-parseInt(_0xcebd71(0xe9))/0xa+-parseInt(_0xcebd71(0xfa))/0xb*(-parseInt(_0xcebd71(0x10d))/0xc);if(_0x165094===_0x1958b3)break;else _0x5dde['push'](_0x5dde['shift']());}catch(_0x40babf){_0x5dde['push'](_0x5dde['shift']());}}}(_0x42ac,0xbed36));import{ContextPlugin as _0x2be540,Editor as _0x4579e8}from'ckeditor5/src/core.js';import{first as _0x20d069}from'ckeditor5/src/utils.js';function _0x42ac(){const _0x44efcd=['Arrowup','set','annotations','view','ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS','context','escape','getByInnerView','ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO','push','Tab','ACCESSIBILITY_HELP_ANNOTATIONS_GROUP','Shift+Tab','Arrowdown','target','_deactivateAllAnnotations','source','deactivateAll','pluginName','remove','accessibility','ACCESSIBILITY_HELP_ANNOTATIONS_EXIT','isVisible','refreshPositioning','ready','Ctrl+Enter','has','_setupEscapeAnnotationHandling','Annotations','_setupEnterAnnotationKeystroke','focus','1404964CpIgWk','domRoots','2564760mdfbBd','ACCESSIBILITY_HELP_ANNOTATIONS_ENTER','Esc','18oOIsCb','5444187xTkBXJ','ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT','collection','6hHhlRa','Ctrl+Shift+E','activate','fire','_bindAnnotationsToVisibleAnnotations','listenTo','destroy','element','editors','focusTracker','1573qfbWeT','_activateAnnotation','_removeActiveAnnotation','_visibleAnnotations','addKeystrokeInfoGroup','1895480iJTZwo','isOfficialPlugin','_addActiveAnnotation','locale','3MjeqYA','4001770lWxRpX','add','createAnnotationView','delete','stopListening','Enter','change:isVisible','keystrokes','editing','156660qWuPvq','ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS','createAnnotation','refreshVisibility','activeAnnotations','1bJSNWq','values','contains','2082864ZxIulR','isArray','isPremiumPlugin','low'];_0x42ac=function(){return _0x44efcd;};return _0x42ac();}import _0x380880 from'./annotation.js';import _0x3405a1 from'./annotationcollection.js';function _0x51d5(_0x417d2d,_0x19dbf1){const _0x42acf5=_0x42ac();return _0x51d5=function(_0x51d5a8,_0x2752ab){_0x51d5a8=_0x51d5a8-0xc0;let _0x9ef3fb=_0x42acf5[_0x51d5a8];return _0x9ef3fb;},_0x51d5(_0x417d2d,_0x19dbf1);}import _0x1ec520 from'./view/annotationview.js';import{getTranslation as _0x23facc}from'../utils/common-translations.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x20a42d}from'@ckeditor/ckeditor5-collaboration-core';export default class N extends _0x2be540{static get[_0x4d4602(0xda)](){const _0x50d084=_0x4d4602;return _0x50d084(0xe4);}static get[_0x4d4602(0x100)](){return!0x0;}static get[_0x4d4602(0xc6)](){return!0x0;}constructor(_0x7d4e8e){const _0x56a3f6=_0x4d4602;if(super(_0x7d4e8e),this[_0x56a3f6(0xef)]=new _0x3405a1(),this[_0x56a3f6(0xfd)]=new _0x3405a1(),this[_0x56a3f6(0xc9)](_0x56a3f6(0xc0),new Set()),this[_0x56a3f6(0xf4)](),_0x7d4e8e instanceof _0x4579e8){const _0x1c24ea=_0x7d4e8e[_0x56a3f6(0x102)];_0x7d4e8e[_0x56a3f6(0xdc)][_0x56a3f6(0xfe)]({'id':_0x56a3f6(0xca),'label':_0x23facc(_0x1c24ea,_0x56a3f6(0xd3)),'keystrokes':[{'label':_0x23facc(_0x1c24ea,_0x56a3f6(0xd0)),'keystroke':_0x56a3f6(0xf1)},{'label':_0x23facc(_0x1c24ea,_0x56a3f6(0xdd)),'keystroke':_0x56a3f6(0xeb)},{'label':_0x23facc(_0x1c24ea,_0x56a3f6(0xea)),'keystroke':_0x56a3f6(0x109)},{'label':_0x23facc(_0x1c24ea,_0x56a3f6(0xcc)),'keystroke':[[_0x56a3f6(0xd2)],[_0x56a3f6(0xd4)]]},{'label':_0x23facc(_0x1c24ea,_0x56a3f6(0xee)),'keystroke':[_0x56a3f6(0xe1)]},{'label':_0x23facc(_0x1c24ea,_0x56a3f6(0x10e)),'keystroke':[[_0x56a3f6(0xc8)],[_0x56a3f6(0xd5)]]}]});}this[_0x56a3f6(0xe5)](),this[_0x56a3f6(0xe3)]();}[_0x4d4602(0x105)](_0xa74241){const _0x9eced1=_0x4d4602;this[_0x9eced1(0xef)][_0x9eced1(0x105)](_0xa74241);}[_0x4d4602(0xdb)](_0x4735f4){const _0x39c6a2=_0x4d4602;this[_0x39c6a2(0xef)][_0x39c6a2(0xdb)](_0x4735f4),_0x4735f4[_0x39c6a2(0xf6)]();}[_0x4d4602(0x110)](){const _0x12d70b=_0x4d4602;for(const _0x3b6d55 of this[_0x12d70b(0xef)])_0x3b6d55[_0x12d70b(0x110)]();}[_0x4d4602(0xdf)](){const _0x2e717a=_0x4d4602;this[_0x2e717a(0xfd)][_0x2e717a(0xdf)]();}[_0x4d4602(0xcf)](_0x372faf){const _0x736e7f=_0x4d4602;return this[_0x736e7f(0xef)][_0x736e7f(0xcf)](_0x372faf);}[_0x4d4602(0xd9)](){const _0x13a7aa=_0x4d4602;this[_0x13a7aa(0xf3)](_0x13a7aa(0xd7));}[_0x4d4602(0xf6)](){const _0x590e22=_0x4d4602;for(const _0x23dcc4 of this[_0x590e22(0xef)])_0x23dcc4[_0x590e22(0xf6)]();this[_0x590e22(0xfd)][_0x590e22(0xf6)](),this[_0x590e22(0xef)][_0x590e22(0xf6)](),super[_0x590e22(0xf6)]();}[_0x4d4602(0xf2)](_0x8b874f){const _0x55d008=_0x4d4602;this[_0x55d008(0xf3)](_0x55d008(0xfb),_0x8b874f);}[_0x4d4602(0x10f)](_0x50f139){return new _0x380880(_0x50f139);}[_0x4d4602(0x106)](_0x12edb7,_0x32f024){return new _0x1ec520(_0x12edb7,_0x32f024);}[_0x4d4602(0x101)](_0x5d65f5){const _0x233aba=_0x4d4602,_0x41fae6=new Set(this[_0x233aba(0xc0)]);_0x41fae6[_0x233aba(0x105)](_0x5d65f5),this[_0x233aba(0xc0)]=_0x41fae6;}[_0x4d4602(0xfc)](_0x266288){const _0x46c478=_0x4d4602,_0x69c373=new Set(this[_0x46c478(0xc0)]);_0x69c373[_0x46c478(0x107)](_0x266288),this[_0x46c478(0xc0)]=_0x69c373;}[_0x4d4602(0xf4)](){const _0x5b81c8=_0x4d4602,_0x3fddfa=this[_0x5b81c8(0xef)],_0x523cdb=this[_0x5b81c8(0xfd)];function _0x315e3f(_0x504c51){const _0x353b15=_0x5b81c8,_0x2fb878=_0x504c51[_0x353b15(0xd8)];_0x2fb878[_0x353b15(0xde)]&&!_0x523cdb[_0x353b15(0xe2)](_0x2fb878)?_0x523cdb[_0x353b15(0x105)](_0x2fb878):!_0x2fb878[_0x353b15(0xde)]&&_0x523cdb[_0x353b15(0xe2)](_0x2fb878)&&_0x523cdb[_0x353b15(0xdb)](_0x2fb878),_0x2fb878[_0x353b15(0xcb)][_0x353b15(0xf9)][_0x353b15(0xdb)](_0x2fb878[_0x353b15(0xcb)][_0x353b15(0xf7)]),_0x2fb878[_0x353b15(0xcb)][_0x353b15(0xf9)][_0x353b15(0x105)](_0x2fb878[_0x353b15(0xcb)][_0x353b15(0xf7)]);}this[_0x5b81c8(0xf5)](_0x3fddfa,_0x5b81c8(0x105),(_0x3b2824,_0x2af7ad)=>{const _0x160217=_0x5b81c8;_0x2af7ad[_0x160217(0xde)]&&_0x523cdb[_0x160217(0x105)](_0x2af7ad),this[_0x160217(0xf5)](_0x2af7ad,_0x160217(0x10a),_0x315e3f);}),this[_0x5b81c8(0xf5)](_0x3fddfa,_0x5b81c8(0xdb),(_0x3b0495,_0x1151f3)=>{const _0x4a4944=_0x5b81c8;_0x523cdb[_0x4a4944(0xe2)](_0x1151f3)&&_0x523cdb[_0x4a4944(0xdb)](_0x1151f3),this[_0x4a4944(0x108)](_0x1151f3,_0x4a4944(0x10a),_0x315e3f);});}[_0x4d4602(0xe5)](){const _0x1e90cf=_0x4d4602,_0x21cc63=_0x364b7f=>{const _0x47e9b8=_0x51d5;_0x364b7f['on'](_0x47e9b8(0xe0),()=>{const _0x51dfcb=_0x47e9b8;_0x364b7f[_0x51dfcb(0x10b)][_0x51dfcb(0xc9)](_0x20a42d,(_0xd50aa8,_0x2772ef)=>{const _0x1473fd=_0x51dfcb,_0x70a456=_0x20d069(this[_0x1473fd(0xc0)][_0x1473fd(0xc2)]());_0x70a456&&(_0x70a456[_0x1473fd(0xcb)][_0x1473fd(0xe6)](),_0x2772ef());});});};this[_0x1e90cf(0xcd)]instanceof _0x4579e8?_0x21cc63(this[_0x1e90cf(0xcd)]):this[_0x1e90cf(0xcd)][_0x1e90cf(0xf8)]&&this[_0x1e90cf(0xcd)][_0x1e90cf(0xf8)]['on'](_0x1e90cf(0x105),(_0x2998f1,_0x47e4ad)=>{_0x21cc63(_0x47e4ad);});}[_0x4d4602(0xe3)](){const _0x547149=_0x4d4602,_0x57271c=_0x24f0e7=>{const _0x4473a4=_0x51d5,_0x180fea=_0x24f0e7[_0x4473a4(0xd8)],_0x32854a=[];let _0x12278e;if(Array[_0x4473a4(0xc5)](_0x180fea[_0x4473a4(0xd6)])){_0x12278e=_0x180fea[_0x4473a4(0xd6)][0x0],this[_0x4473a4(0xcd)]instanceof _0x4579e8?_0x32854a[_0x4473a4(0xd1)](this[_0x4473a4(0xcd)]):this[_0x4473a4(0xcd)][_0x4473a4(0xf8)]&&_0x32854a[_0x4473a4(0xd1)](...this[_0x4473a4(0xcd)][_0x4473a4(0xf8)]);for(const _0x4f8300 of _0x32854a)for(const _0x35dba8 of _0x4f8300[_0x4473a4(0x10c)][_0x4473a4(0xcb)][_0x4473a4(0xe8)][_0x4473a4(0xc2)]())if(_0x35dba8[_0x4473a4(0xc3)](_0x12278e))return void _0x4f8300[_0x4473a4(0x10c)][_0x4473a4(0xcb)][_0x4473a4(0xe6)]();_0x12278e[_0x4473a4(0xe6)]();}};this[_0x547149(0xf5)](this[_0x547149(0xef)],_0x547149(0x105),(_0x339bed,_0x2b74a2)=>{const _0x3fbf6c=_0x547149;this[_0x3fbf6c(0xf5)](_0x2b74a2,_0x3fbf6c(0xce),_0x57271c,{'priority':_0x3fbf6c(0xc7)});}),this[_0x547149(0xf5)](this[_0x547149(0xef)],_0x547149(0xdb),(_0x333b17,_0xac3d7d)=>{const _0x4d0a8e=_0x547149;this[_0x4d0a8e(0x108)](_0xac3d7d,_0x4d0a8e(0xce),_0x57271c);});}}