@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 8.91 kB
JavaScript
/*
* Copyright (c) 2003-2026, 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 _0x544273=_0x35f0;(function(_0x398a58,_0x736991){const _0x360e96=_0x35f0,_0x45726f=_0x398a58();while(!![]){try{const _0x247ef0=parseInt(_0x360e96(0x1c2))/0x1+-parseInt(_0x360e96(0x1ae))/0x2*(-parseInt(_0x360e96(0x1c1))/0x3)+-parseInt(_0x360e96(0x1b4))/0x4*(parseInt(_0x360e96(0x1ce))/0x5)+parseInt(_0x360e96(0x1b0))/0x6*(parseInt(_0x360e96(0x1aa))/0x7)+parseInt(_0x360e96(0x183))/0x8+parseInt(_0x360e96(0x1a1))/0x9*(-parseInt(_0x360e96(0x1cf))/0xa)+-parseInt(_0x360e96(0x1c7))/0xb*(parseInt(_0x360e96(0x192))/0xc);if(_0x247ef0===_0x736991)break;else _0x45726f['push'](_0x45726f['shift']());}catch(_0x4fc189){_0x45726f['push'](_0x45726f['shift']());}}}(_0x263b,0xd896b));import{Plugin as _0x3f7a24}from'ckeditor5/src/core.js';import{IconAddComment as _0x4d399f}from'ckeditor5/src/icons.js';import{CommentsRepository as _0xe76c10}from'./commentsrepository.js';import{CommentsEditing as _0x4f5e70}from'./commentsediting.js';import{EditorAnnotations as _0x93bdbd}from'../annotations/editorannotations.js';import{ButtonView as _0x3a3f55,MenuBarMenuListItemButtonView as _0x4b483e}from'ckeditor5/src/ui.js';import{Annotations as _0xee13b3}from'../annotations/annotations.js';import{CommentsListView as _0x389611}from'./ui/view/commentslistview.js';function _0x35f0(_0x165c58,_0x292df9){const _0x263b02=_0x263b();return _0x35f0=function(_0x35f046,_0x387eb6){_0x35f046=_0x35f046-0x180;let _0x5b4078=_0x263b02[_0x35f046];return _0x5b4078;},_0x35f0(_0x165c58,_0x292df9);}import{CommentThreadInputView as _0x157b4a}from'./ui/view/commentthreadinputview.js';import{getTranslation as _0x37fd60}from'../utils/common-translations.js';function _0x263b(){const _0x340c62=['stop','innerView','has','view','hasContent','CommentsUI','commentsLicenseKeyNotAllowed','change:activeAnnotations','25108152OUJpif','getRange','low','CommentsListView','usageLimit','_licenseKeyCheckInterval','highest','CommentThreadInputView','add','addSourceCollector','commands','find','componentFactory','plugins','hasCommentThread','9HZptEo','push','isPremiumPlugin','editor','featureNotAllowed','expired','commentsLicenseKeyDomainLimit','invalid','isOfficialPlugin','5920061veBSrk','focusTracker','commentsLicenseKeyUsageLimit','removeCommentThread','16OQKZIF','Comments','6rHNJyx','length','_viewToController','hasMarkerForId','4LybhYe','config','isEnabled','commentsLicenseKeyExpired','model','commentsLicenseKeyEvaluationLimit','domainLimit','destroy','listenTo','requires','editing','comment:','activeMarker','203385uQKQTS','508279DHPjGE','_showLicenseError','evaluationLimit','Comment','isFocused','11twZDDo','_threadToController','bind','addCommentThread','pluginName','licenseKey','map','417560lqHcAE','5603210eqHgZI','tooltip','init','getCommentThread','addComment','getAllMarkersForId','locale','_createUIButton','set','get','comment','13815712RhGwQX','execute','commentsLicenseKeyValid','commentsLicenseKeyInvalid','menuBar:comment','focus','from'];_0x263b=function(){return _0x340c62;};return _0x263b();}export class CommentsUI extends _0x3f7a24{[_0x544273(0x1cc)];[_0x544273(0x197)];static get[_0x544273(0x1cb)](){const _0x2a79d3=_0x544273;return _0x2a79d3(0x18f);}static get[_0x544273(0x1a9)](){return!0x0;}static get[_0x544273(0x1a3)](){return!0x0;}static get[_0x544273(0x1bd)](){return[_0xe76c10,_0x4f5e70,_0x93bdbd,_0xee13b3];}get[_0x544273(0x195)](){return _0x389611;}get[_0x544273(0x199)](){return _0x157b4a;}[_0x544273(0x1d1)](){const _0x5c51a8=_0x544273,_0x2319ad=this[_0x5c51a8(0x1a4)],_0xcd6f70=_0x2319ad[_0x5c51a8(0x19f)][_0x5c51a8(0x181)](_0xe76c10),_0x2dbc21=_0x2319ad[_0x5c51a8(0x19f)][_0x5c51a8(0x181)](_0x4f5e70),_0x5a878b=_0x2319ad[_0x5c51a8(0x19f)][_0x5c51a8(0x181)](_0xee13b3),_0x3c64a8=_0x2319ad[_0x5c51a8(0x19f)][_0x5c51a8(0x181)](_0x93bdbd);_0x2319ad['ui'][_0x5c51a8(0x19e)][_0x5c51a8(0x19a)](_0x5c51a8(0x182),()=>{const _0x842cc7=_0x5c51a8,_0x1ba1ed=this[_0x842cc7(0x1d6)](_0x3a3f55);return _0x1ba1ed[_0x842cc7(0x1d0)]=!0x0,_0x1ba1ed;}),_0x2319ad['ui'][_0x5c51a8(0x19e)][_0x5c51a8(0x19a)](_0x5c51a8(0x187),()=>this[_0x5c51a8(0x1d6)](_0x4b483e)),_0x3c64a8[_0x5c51a8(0x19b)](()=>{const _0x3c7136=_0x5c51a8,_0x2c361d=[];for(const [_0x43b2f8,_0x2ffc10]of _0xcd6f70[_0x3c7136(0x1c8)]){const _0x327b6b=_0x2dbc21[_0x3c7136(0x1d4)](_0x43b2f8['id']),_0x2e7f82=_0x327b6b[_0x3c7136(0x1cd)](_0x3581cd=>_0x3581cd[_0x3c7136(0x193)]());_0x327b6b[_0x3c7136(0x1b1)]>0x0&&_0x2c361d[_0x3c7136(0x1a2)]([_0x2ffc10[_0x3c7136(0x18d)],_0x2e7f82]);}return _0x2c361d;}),this[_0x5c51a8(0x1bc)](_0x5a878b,_0x5c51a8(0x191),(_0x3ac922,_0x585c81,_0x4b6002)=>{const _0x295282=_0x5c51a8,_0x44d961=Array[_0x295282(0x189)](_0x4b6002)[_0x295282(0x1cd)](_0x145b1f=>_0x145b1f[_0x295282(0x18b)])[_0x295282(0x19d)](_0x25790b=>_0xcd6f70[_0x295282(0x1b2)][_0x295282(0x18c)](_0x25790b));if(!_0x44d961)return void(_0x2dbc21[_0x295282(0x1c0)]=null);const _0x1becaf=_0xcd6f70[_0x295282(0x1b2)][_0x295282(0x181)](_0x44d961)[_0x295282(0x1b8)]['id'],_0x587fc1=_0x295282(0x1bf)+_0x1becaf;_0x1becaf&&_0x2dbc21[_0x295282(0x1b3)](_0x1becaf)?_0x2dbc21[_0x295282(0x1c0)]=_0x587fc1:_0x2dbc21[_0x295282(0x1c0)]&&(_0x2dbc21[_0x295282(0x1c0)]=null);}),this[_0x5c51a8(0x1bc)](_0xcd6f70,_0x5c51a8(0x1ad),(_0x335188,{threadId:_0x15639d,isFromAdapter:_0x33baa5})=>{const _0x483a91=_0x5c51a8;!_0x33baa5&&_0x2319ad['ui'][_0x483a91(0x1ab)][_0x483a91(0x1c6)]&&_0x2dbc21[_0x483a91(0x1b3)](_0x15639d)&&_0x2319ad[_0x483a91(0x1be)][_0x483a91(0x18d)][_0x483a91(0x188)]();},{'priority':_0x5c51a8(0x198)}),this[_0x5c51a8(0x1bc)](_0xcd6f70,_0x5c51a8(0x1d3),(_0x10b04a,{threadId:_0x5d88fe,isFromAdapter:_0x20b009})=>{const _0xddfcc3=_0x5c51a8;if(_0x20b009||!_0x2dbc21[_0xddfcc3(0x1b3)](_0x5d88fe)||!_0xcd6f70[_0xddfcc3(0x1a0)](_0x5d88fe))return;0x1===_0xcd6f70[_0xddfcc3(0x1d2)](_0x5d88fe)[_0xddfcc3(0x1b1)]&&(_0x2319ad[_0xddfcc3(0x1be)][_0xddfcc3(0x18d)][_0xddfcc3(0x188)](),_0x10b04a[_0xddfcc3(0x18a)]());},{'priority':_0x5c51a8(0x194)}),this[_0x5c51a8(0x1cc)]=this[_0x5c51a8(0x1a4)][_0x5c51a8(0x1b5)][_0x5c51a8(0x181)](_0x5c51a8(0x1cc));const _0x4abdce=this[_0x5c51a8(0x1a4)];this[_0x5c51a8(0x197)]=setInterval(()=>{const _0x49ace1=_0x5c51a8;let _0x1a2ad7;for(const _0x2cbdd5 in _0x4abdce){const _0x1ece8d=_0x2cbdd5,_0x2bfae1=_0x4abdce[_0x1ece8d];if(_0x49ace1(0x185)==_0x2bfae1||_0x49ace1(0x186)==_0x2bfae1||_0x49ace1(0x1b7)==_0x2bfae1||_0x49ace1(0x1a7)==_0x2bfae1||_0x49ace1(0x190)==_0x2bfae1||_0x49ace1(0x1b9)==_0x2bfae1||_0x49ace1(0x1ac)==_0x2bfae1){delete _0x4abdce[_0x1ece8d],_0x1a2ad7=_0x2bfae1,clearInterval(this[_0x49ace1(0x197)]),this[_0x49ace1(0x197)]=void 0x0;break;}}_0x49ace1(0x186)==_0x1a2ad7&&_0x4abdce[_0x49ace1(0x1c3)](_0x49ace1(0x1a8)),_0x49ace1(0x1b7)==_0x1a2ad7&&_0x4abdce[_0x49ace1(0x1c3)](_0x49ace1(0x1a6)),_0x49ace1(0x1a7)==_0x1a2ad7&&_0x4abdce[_0x49ace1(0x1c3)](_0x49ace1(0x1ba)),_0x49ace1(0x190)==_0x1a2ad7&&_0x4abdce[_0x49ace1(0x1c3)](_0x49ace1(0x1a5),_0x49ace1(0x1af)),_0x49ace1(0x1b9)==_0x1a2ad7&&_0x4abdce[_0x49ace1(0x1c3)](_0x49ace1(0x1c4)),_0x49ace1(0x1ac)==_0x1a2ad7&&_0x4abdce[_0x49ace1(0x1c3)](_0x49ace1(0x196));},0x3e8);}[_0x544273(0x1bb)](){const _0x180951=_0x544273;super[_0x180951(0x1bb)](),this[_0x180951(0x197)]&&clearInterval(this[_0x180951(0x197)]);}[_0x544273(0x1d6)](_0x2e7fd2){const _0x2f7856=_0x544273,_0x5b2fb6=this[_0x2f7856(0x1a4)],_0x54b1b7=new _0x2e7fd2(_0x5b2fb6[_0x2f7856(0x1d5)]),_0x280854=_0x5b2fb6[_0x2f7856(0x19c)][_0x2f7856(0x181)](_0x2f7856(0x1ca));return _0x54b1b7[_0x2f7856(0x180)]({'label':_0x37fd60(_0x5b2fb6[_0x2f7856(0x1d5)],_0x2f7856(0x1c5)),'icon':_0x4d399f}),_0x54b1b7[_0x2f7856(0x1c9)](_0x2f7856(0x1b6))['to'](_0x280854,_0x2f7856(0x1b6),_0x280854,_0x2f7856(0x18e),(_0x5d65ab,_0x4804fe)=>_0x5d65ab&&_0x4804fe),this[_0x2f7856(0x1bc)](_0x54b1b7,_0x2f7856(0x184),()=>{const _0x588e58=_0x2f7856;_0x280854[_0x588e58(0x184)]();}),_0x54b1b7;}}