UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

24 lines • 11.8 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ function _0x41f7(){const _0x31cef0=['ck-hidden','formatDateTime','Show\x20more\x20items','_model','ck-comment--info','756322jKnrQL','fire','ck-comment','ck-comment--','render','focus','visibleView','icon','find','ck-annotation__info-time','group','threeVerticalDots','unbind','userView','_createCommentInputView','panelPosition','ck-comment--edit','bindTemplate','author','Remove','focusables','locale','ck-comment__external','getTemplate','41011245PfYZaY','ck-annotation__main','1466SAsPoA','isEditable','bind','switchToEditMode','_createDropdown','isReadOnly','cancelConfirm','mouseenter','push','placeholder','buttonView','change:isRemovable','isExternal','Edit','createCollection','getUserViewNotificationText','940cSjpJw','extendTemplate','pencil','set','_createEditButton','div','actionIndicator','removeComment','isEnabled','time','withText','11735992qPUcom','1088952OPewsC','listitem','ck-comment--remove','blur','_createRemoveButton','ck-comment__wrapper','listenTo','toMany','ck-annotation__user','mouseleave','ck-annotation__info-name','ck-annotation__actions--hidden','5TIRfsr','length','ariaDescriptionView','Reply...','45HmsviX','label','some','add','ck-comment__actions--hidden','Delete\x20comment?','addMany','remove','dropdown','removeButton','items','element','panelView','_config','ariaLabel','ck-comment__info-time','ck-comment__main','isVisible','12bWoqai','editButton','ck-annotation','then','ck-comment__info','ck-annotation__info','authoredAt','resolvedAt','actionBar','ck-comment__actions','children','isEditMode','ck-annotation__actions','isSystemComment','span','ck-comment__user','ck-annotation__content-wrapper','isConfirm','1232650lbcpBO','2347494OuncIB','name','ck-comment--remove-confirmation','_attachActions','from','setTemplate','isRemovable','showConfirm','edit','getExternalCommentNote','ck-comment__info-name','execute'];_0x41f7=function(){return _0x31cef0;};return _0x41f7();}const _0x5bf006=_0xf56b;function _0xf56b(_0x3dd91c,_0x42d0e5){const _0x41f7f4=_0x41f7();return _0xf56b=function(_0xf56b1c,_0x263fcc){_0xf56b1c=_0xf56b1c-0xb6;let _0x37bfb6=_0x41f7f4[_0xf56b1c];return _0x37bfb6;},_0xf56b(_0x3dd91c,_0x42d0e5);}(function(_0x2e4859,_0x172daa){const _0x5b1ddd=_0xf56b,_0xbf7791=_0x2e4859();while(!![]){try{const _0x3096c7=parseInt(_0x5b1ddd(0x10b))/0x1*(parseInt(_0x5b1ddd(0xfb))/0x2)+parseInt(_0x5b1ddd(0x117))/0x3*(-parseInt(_0x5b1ddd(0xbd))/0x4)+parseInt(_0x5b1ddd(0x123))/0x5*(-parseInt(_0x5b1ddd(0xd0))/0x6)+-parseInt(_0x5b1ddd(0xe1))/0x7+-parseInt(_0x5b1ddd(0x116))/0x8+parseInt(_0x5b1ddd(0x127))/0x9*(-parseInt(_0x5b1ddd(0xcf))/0xa)+parseInt(_0x5b1ddd(0xf9))/0xb;if(_0x3096c7===_0x172daa)break;else _0xbf7791['push'](_0xbf7791['shift']());}catch(_0x4242ee){_0xbf7791['push'](_0xbf7791['shift']());}}}(_0x41f7,0xb6110));import{ButtonView as _0x5e0cff,createDropdown as _0x24bcfd,ListView as _0x6dfe63,ListItemView as _0x264986,focusChildOnDropdownOpen as _0x504c0f}from'ckeditor5/src/ui.js';import{icons as _0x2ca597}from'ckeditor5/src/core.js';import{UserView as _0x211030,ConfirmMixin as _0x793fca,LateFocusDropdownButtonView as _0xef27fd}from'ckeditor5-collaboration/src/collaboration-core.js';import _0x35f8f6 from'./basecommentview.js';import _0x3928ef from'../../../../theme/icons/remove-comment.svg';import{getTranslation as _0x156ec9}from'../../../utils/common-translations.js';export default class gt extends/* #__PURE__ -- @preserve */ _0x793fca(_0x35f8f6){constructor(_0x394547,_0x1d7432,_0x2ee099){const _0x3dc848=_0xf56b;super(_0x394547,_0x1d7432,_0x2ee099),this[_0x3dc848(0x10e)](_0x3dc848(0x111),null),this[_0x3dc848(0x10e)](_0x3dc848(0x104),_0x156ec9(_0x394547,_0x3dc848(0x126))),this[_0x3dc848(0xfd)](_0x3dc848(0xc3))['to'](_0x1d7432),this[_0x3dc848(0xfd)](_0x3dc848(0xc4))['to'](_0x1d7432),this[_0x3dc848(0xc5)]=this[_0x3dc848(0x109)](),this[_0x3dc848(0xca)]||(this[_0x3dc848(0xbe)]=this[_0x3dc848(0x10f)](),this[_0x3dc848(0x130)]=this[_0x3dc848(0x11b)](),this[_0x3dc848(0x131)]=this[_0x3dc848(0x109)](),this[_0x3dc848(0x131)][_0x3dc848(0x12d)]([this[_0x3dc848(0xbe)],this[_0x3dc848(0x130)]]),this[_0x3dc848(0x12f)]=this[_0x3dc848(0xff)](),this[_0x3dc848(0xc5)][_0x3dc848(0x12a)](this[_0x3dc848(0x12f)]),this[_0x3dc848(0xf5)][_0x3dc848(0x12a)](this[_0x3dc848(0x12f)])),this[_0x3dc848(0xee)]=new _0x211030(_0x394547,_0x1d7432[_0x3dc848(0xf3)],this[_0x3dc848(0x10a)]()),this[_0x3dc848(0xee)][_0x3dc848(0x10c)]({'attributes':{'class':[_0x3dc848(0xcc),_0x3dc848(0x11f)],'aria-hidden':!0x0}}),this[_0x3dc848(0x11d)](_0x1d7432,_0x3dc848(0x106),()=>this[_0x3dc848(0x101)]()),this[_0x3dc848(0xd5)](this[_0x3dc848(0xf8)]());}[_0x5bf006(0xf8)](){const _0x5381f1=_0x5bf006,_0x3670f0=this[_0x5381f1(0xf2)],_0x35d6ce=[{'tag':_0x5381f1(0x110),'attributes':{'class':[_0x5381f1(0xc1),_0x5381f1(0xc2)]},'children':[{'tag':_0x5381f1(0xcb),'children':[{'text':this[_0x5381f1(0xee)][_0x5381f1(0xd1)]}],'attributes':{'class':[_0x5381f1(0xda),_0x5381f1(0x121)],'data-cke-tooltip-text':this[_0x5381f1(0xee)][_0x5381f1(0xd1)]}},{'tag':_0x5381f1(0x114),'attributes':{'datetime':_0x3670f0['to'](_0x5381f1(0xc3)),'class':[_0x5381f1(0xba),_0x5381f1(0xea)]},'children':[{'text':_0x3670f0['to'](_0x5381f1(0xc3),_0x4b5ff1=>this[_0x5381f1(0xb8)][_0x5381f1(0xdd)](_0x4b5ff1))}]}]},{'tag':_0x5381f1(0x110),'attributes':{'class':[_0x5381f1(0xc6),_0x5381f1(0xc9),_0x3670f0['if'](_0x5381f1(0xc8),_0x5381f1(0x12b)),_0x3670f0['if'](_0x5381f1(0xc8),_0x5381f1(0x122))]},'children':this[_0x5381f1(0xc5)]},{'tag':_0x5381f1(0x110),'attributes':{'class':[_0x5381f1(0xcd)]},'children':this[_0x5381f1(0xe7)]},this[_0x5381f1(0x125)]];return this[_0x5381f1(0xdf)][_0x5381f1(0x107)]&&_0x35d6ce[_0x5381f1(0x103)]({'tag':_0x5381f1(0x110),'attributes':{'class':[_0x5381f1(0xf7)]},'children':[{'text':this[_0x5381f1(0xd9)]()}]}),{'tag':'li','attributes':{'class':[_0x5381f1(0x11c),_0x3670f0['if'](_0x5381f1(0xce),_0x5381f1(0xd2))],'tabindex':-0x1,'aria-label':_0x3670f0['to'](_0x5381f1(0xb9)),'aria-describedby':this[_0x5381f1(0x125)]['id'],'role':_0x5381f1(0x118)},'children':[{'tag':_0x5381f1(0x110),'attributes':{'class':[_0x5381f1(0xe3),_0x5381f1(0xbf),_0x3670f0['if'](_0x5381f1(0xc8),_0x5381f1(0xf1)),_0x3670f0['if'](_0x5381f1(0xca),_0x5381f1(0xe0)),_0x3670f0['to'](_0x5381f1(0x111),_0x104718=>_0x104718?_0x5381f1(0xe4)+_0x104718:'')],'data-author-id':this[_0x5381f1(0xdf)][_0x5381f1(0xf3)]['id'],'data-comment-id':this[_0x5381f1(0xdf)]['id'],'role':_0x5381f1(0xeb)},'children':[this[_0x5381f1(0xee)],{'tag':_0x5381f1(0x110),'attributes':{'class':[_0x5381f1(0xbb),_0x5381f1(0xfa)]},'children':_0x35d6ce}]}]};}[_0x5bf006(0x10f)](){const _0x48f1bd=_0x5bf006,_0x4bc332=new _0x5e0cff(this[_0x48f1bd(0xf6)]);return _0x4bc332[_0x48f1bd(0x128)]=_0x156ec9(this[_0x48f1bd(0xf6)],_0x48f1bd(0x108)),_0x4bc332[_0x48f1bd(0xe8)]=_0x2ca597[_0x48f1bd(0x10d)],_0x4bc332[_0x48f1bd(0x115)]=!0x0,_0x4bc332[_0x48f1bd(0x10c)]({'attributes':{'class':_0x48f1bd(0xf1)}}),_0x4bc332[_0x48f1bd(0xfd)](_0x48f1bd(0x113))['to'](this[_0x48f1bd(0xdf)],_0x48f1bd(0x100),_0x2439f7=>!_0x2439f7),_0x4bc332[_0x48f1bd(0xfd)](_0x48f1bd(0xbc))['to'](this[_0x48f1bd(0xdf)],_0x48f1bd(0xfc)),_0x4bc332['on'](_0x48f1bd(0xdb),()=>this[_0x48f1bd(0xfe)]()),_0x4bc332;}[_0x5bf006(0x11b)](){const _0x2d7d9c=_0x5bf006,_0xfd1cab=new _0x5e0cff(this[_0x2d7d9c(0xf6)]);return _0xfd1cab[_0x2d7d9c(0x128)]=_0x156ec9(this[_0x2d7d9c(0xf6)],_0x2d7d9c(0xf4)),_0xfd1cab[_0x2d7d9c(0xe8)]=_0x3928ef,_0xfd1cab[_0x2d7d9c(0x115)]=!0x0,_0xfd1cab[_0x2d7d9c(0x10c)]({'attributes':{'class':_0x2d7d9c(0x119)}}),_0xfd1cab[_0x2d7d9c(0xfd)](_0x2d7d9c(0x113))['to'](this[_0x2d7d9c(0xdf)],_0x2d7d9c(0x100),_0x371c3b=>!_0x371c3b),_0xfd1cab[_0x2d7d9c(0xfd)](_0x2d7d9c(0xbc))['to'](this[_0x2d7d9c(0xdf)],_0x2d7d9c(0xd6)),_0xfd1cab['on'](_0x2d7d9c(0xdb),()=>{const _0x4c4b4f=_0x2d7d9c;this[_0x4c4b4f(0xd7)](_0x156ec9(this[_0x4c4b4f(0xf6)],_0x4c4b4f(0x12c)),this[_0x4c4b4f(0xb6)])[_0x4c4b4f(0xc0)](()=>{const _0x1e50c3=_0x4c4b4f;this[_0x1e50c3(0xe2)](_0x1e50c3(0x112),this[_0x1e50c3(0xdf)]['id']);});}),_0xfd1cab;}[_0x5bf006(0xff)](){const _0x2cb839=_0x5bf006,_0x28f105=_0x24bcfd(this[_0x2cb839(0xf6)],_0xef27fd),_0x22df31=_0x28f105[_0x2cb839(0xb7)][_0x2cb839(0xc7)],_0x3cd134=new _0x6dfe63(this[_0x2cb839(0xf6)]),_0x3296da=_0x28f105[_0x2cb839(0xf2)];_0x504c0f(_0x28f105,()=>this[_0x2cb839(0x131)][_0x2cb839(0xe9)](_0x169854=>_0x169854[_0x2cb839(0xbc)])),_0x28f105[_0x2cb839(0x10c)]({'attributes':{'class':[_0x3296da['if'](_0x2cb839(0xbc),_0x2cb839(0xdc),_0x327d65=>!_0x327d65)]}});const _0x5dfae0=(_0x3134f4,_0x2d56ba=-0x1)=>{const _0x5bf172=_0x2cb839,_0x13dcc9=new _0x264986(this[_0x5bf172(0xf6)]);_0x13dcc9[_0x5bf172(0xc7)][_0x5bf172(0x12a)](_0x3134f4);const _0x116193=_0x2d56ba>-0x1?_0x2d56ba:_0x3cd134[_0x5bf172(0x131)][_0x5bf172(0x124)];_0x3cd134[_0x5bf172(0x131)][_0x5bf172(0x12a)](_0x13dcc9,_0x116193);const _0x448607=Array[_0x5bf172(0xd4)](this[_0x5bf172(0x131)]);_0x28f105[_0x5bf172(0xed)](_0x5bf172(0x113),_0x5bf172(0xbc)),_0x28f105[_0x5bf172(0xfd)](_0x5bf172(0x113))[_0x5bf172(0x11e)](_0x448607,_0x5bf172(0x113),(..._0x3c2ff3)=>_0x3c2ff3[_0x5bf172(0x129)](_0x46a925=>_0x46a925)),_0x28f105[_0x5bf172(0xfd)](_0x5bf172(0xbc))[_0x5bf172(0x11e)](_0x448607,_0x5bf172(0xbc),(..._0x28562b)=>_0x28562b[_0x5bf172(0x129)](_0x17ba57=>_0x17ba57));};_0x28f105[_0x2cb839(0xf0)]='sw',_0x28f105[_0x2cb839(0x105)][_0x2cb839(0x10e)]({'label':_0x156ec9(this[_0x2cb839(0xf6)],_0x2cb839(0xde)),'icon':_0x2ca597[_0x2cb839(0xec)]});for(const _0x14d111 of this[_0x2cb839(0x131)])_0x5dfae0(_0x14d111);return _0x22df31[_0x2cb839(0x12a)](_0x3cd134),_0x28f105[_0x2cb839(0x11d)](this[_0x2cb839(0x131)],_0x2cb839(0x12a),(_0x31d2a7,_0x4867f2,_0x363d46)=>{_0x5dfae0(_0x4867f2,_0x363d46);}),_0x28f105[_0x2cb839(0x11d)](this[_0x2cb839(0x131)],_0x2cb839(0x12e),(_0x5868cf,_0x36f6b2,_0x10cfe8)=>{const _0x3b9828=_0x2cb839;_0x3cd134[_0x3b9828(0x131)][_0x3b9828(0x12e)](_0x10cfe8);}),_0x28f105;}[_0x5bf006(0xd3)](_0x1c927b,_0x58c540){const _0x357031=_0x5bf006,_0x54cc12=_0x1c927b&&_0x1c927b[_0x357031(0xb6)];_0x54cc12&&(this[_0x357031(0x11d)](_0x54cc12,_0x357031(0x102),()=>this[_0x357031(0x111)]=_0x58c540),this[_0x357031(0x11d)](_0x54cc12,_0x357031(0xe6),()=>this[_0x357031(0x111)]=_0x58c540),this[_0x357031(0x11d)](_0x54cc12,_0x357031(0x120),()=>this[_0x357031(0x111)]=null),this[_0x357031(0x11d)](_0x54cc12,_0x357031(0x11a),()=>this[_0x357031(0x111)]=null));}[_0x5bf006(0xef)](){const _0xf0246a=_0x5bf006,_0x4f53c5=super[_0xf0246a(0xef)]();return _0x4f53c5[_0xf0246a(0xfd)](_0xf0246a(0x104))['to'](this),_0x4f53c5;}[_0x5bf006(0xe5)](){const _0x3f4f5d=_0x5bf006;super[_0x3f4f5d(0xe5)](),this[_0x3f4f5d(0xd3)](this[_0x3f4f5d(0xbe)],_0x3f4f5d(0xd8)),this[_0x3f4f5d(0xd3)](this[_0x3f4f5d(0x130)],_0x3f4f5d(0x12e));}}