UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 8.65 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 _0x570058=_0x37ba;(function(_0x61c90e,_0x5a3a45){const _0x280aa6=_0x37ba,_0x35b336=_0x61c90e();while(!![]){try{const _0x223e2b=parseInt(_0x280aa6(0xf9))/0x1+-parseInt(_0x280aa6(0xfe))/0x2+parseInt(_0x280aa6(0xd7))/0x3*(parseInt(_0x280aa6(0xe2))/0x4)+parseInt(_0x280aa6(0xdd))/0x5+parseInt(_0x280aa6(0xca))/0x6*(parseInt(_0x280aa6(0xe6))/0x7)+parseInt(_0x280aa6(0x119))/0x8+-parseInt(_0x280aa6(0x103))/0x9*(parseInt(_0x280aa6(0xf3))/0xa);if(_0x223e2b===_0x5a3a45)break;else _0x35b336['push'](_0x35b336['shift']());}catch(_0x1b81df){_0x35b336['push'](_0x35b336['shift']());}}}(_0x3c2b,0x2bc6d));function _0x3c2b(){const _0x2a3a02=['innerView','bind','454364Bslkdl','isOfficialPlugin','Comments','expired','2933IEJUlF','commands','getCommentThread','find','featureNotAllowed','editor','trialLimit','licenseKey','commentsLicenseKeyValid','plugins','invalid','Comment','addComment','18890NeyNcP','domainLimit','comment:','_threadToController','commentsLicenseKeyEvaluationLimit','requires','156546NHmlKq','CommentsListView','change:activeAnnotations','_showLicenseError','focusTracker','8244odirgH','view','addSourceCollector','activeMarker','pluginName','3924dgeXkt','CommentThreadInputView','_licenseKeyCheckInterval','from','hasCommentThread','set','removeCommentThread','model','isEnabled','getRange','get','isFocused','low','comment','_createUIButton','addCommentThread','getAllMarkersForId','execute','config','map','init','length','1806872afieIb','menuBar:comment','commentsLicenseKeyUsageLimit','usageLimit','locale','push','commentsLicenseKeyDomainLimit','4242xWhlKv','commentsLicenseKeyTrialLimit','destroy','stop','evaluationLimit','componentFactory','commentsLicenseKeyNotAllowed','CommentsUI','editing','_viewToController','hasMarkerForId','focus','commentsLicenseKeyInvalid','3VXupFY','has','highest','listenTo','commentsLicenseKeyExpired','tooltip','1074030AckXMC','isPremiumPlugin','add'];_0x3c2b=function(){return _0x2a3a02;};return _0x3c2b();}import{Plugin as _0x39fb3a}from'ckeditor5/src/core.js';import{IconAddComment as _0x5072c3}from'ckeditor5/src/icons.js';import _0x4ade55 from'./commentsrepository.js';import _0x1489d2 from'./commentsediting.js';import _0x1302e4 from'../annotations/editorannotations.js';import{ButtonView as _0x3bce40,MenuBarMenuListItemButtonView as _0x53755c}from'ckeditor5/src/ui.js';function _0x37ba(_0x4c441a,_0x37fac2){const _0x3c2b85=_0x3c2b();return _0x37ba=function(_0x37baaa,_0x4ded8c){_0x37baaa=_0x37baaa-0xc8;let _0x5ea921=_0x3c2b85[_0x37baaa];return _0x5ea921;},_0x37ba(_0x4c441a,_0x37fac2);}import _0x3c2838 from'../annotations/annotations.js';import _0x355ddb from'./ui/view/commentslistview.js';import _0x3f21a5 from'./ui/view/commentthreadinputview.js';import{getTranslation as _0x461c46}from'../utils/common-translations.js';export default class i extends _0x39fb3a{[_0x570058(0xed)];[_0x570058(0x105)];static get[_0x570058(0x102)](){const _0x10872d=_0x570058;return _0x10872d(0xd1);}static get[_0x570058(0xe3)](){return!0x0;}static get[_0x570058(0xde)](){return!0x0;}static get[_0x570058(0xf8)](){return[_0x4ade55,_0x1489d2,_0x1302e4,_0x3c2838];}get[_0x570058(0xfa)](){return _0x355ddb;}get[_0x570058(0x104)](){return _0x3f21a5;}[_0x570058(0x117)](){const _0x586a08=_0x570058,_0x120c11=this[_0x586a08(0xeb)],_0x20b55c=_0x120c11[_0x586a08(0xef)][_0x586a08(0x10d)](_0x4ade55),_0x56e8cb=_0x120c11[_0x586a08(0xef)][_0x586a08(0x10d)](_0x1489d2),_0x31ec02=_0x120c11[_0x586a08(0xef)][_0x586a08(0x10d)](_0x3c2838),_0x2c7573=_0x120c11[_0x586a08(0xef)][_0x586a08(0x10d)](_0x1302e4);_0x120c11['ui'][_0x586a08(0xcf)][_0x586a08(0xdf)](_0x586a08(0x110),()=>{const _0x18ae67=_0x586a08,_0x4d2006=this[_0x18ae67(0x111)](_0x3bce40);return _0x4d2006[_0x18ae67(0xdc)]=!0x0,_0x4d2006;}),_0x120c11['ui'][_0x586a08(0xcf)][_0x586a08(0xdf)](_0x586a08(0x11a),()=>this[_0x586a08(0x111)](_0x53755c)),_0x2c7573[_0x586a08(0x100)](()=>{const _0x799f9b=_0x586a08,_0x28e2b4=[];for(const [_0x23786d,_0x2ae04d]of _0x20b55c[_0x799f9b(0xf6)]){const _0x4d69e1=_0x56e8cb[_0x799f9b(0x113)](_0x23786d['id']),_0x94ee5e=_0x4d69e1[_0x799f9b(0x116)](_0x5110e6=>_0x5110e6[_0x799f9b(0x10c)]());_0x4d69e1[_0x799f9b(0x118)]>0x0&&_0x28e2b4[_0x799f9b(0xc8)]([_0x2ae04d[_0x799f9b(0xff)],_0x94ee5e]);}return _0x28e2b4;}),this[_0x586a08(0xda)](_0x31ec02,_0x586a08(0xfb),(_0x36107c,_0x438fa0,_0x500de5)=>{const _0x23d957=_0x586a08,_0x50cb28=Array[_0x23d957(0x106)](_0x500de5)[_0x23d957(0x116)](_0x3a2814=>_0x3a2814[_0x23d957(0xe0)])[_0x23d957(0xe9)](_0x16ed16=>_0x20b55c[_0x23d957(0xd3)][_0x23d957(0xd8)](_0x16ed16));if(!_0x50cb28)return void(_0x56e8cb[_0x23d957(0x101)]=null);const _0x296c41=_0x20b55c[_0x23d957(0xd3)][_0x23d957(0x10d)](_0x50cb28)[_0x23d957(0x10a)]['id'],_0x43155e=_0x23d957(0xf5)+_0x296c41;_0x296c41&&_0x56e8cb[_0x23d957(0xd4)](_0x296c41)?_0x56e8cb[_0x23d957(0x101)]=_0x43155e:_0x56e8cb[_0x23d957(0x101)]&&(_0x56e8cb[_0x23d957(0x101)]=null);}),this[_0x586a08(0xda)](_0x20b55c,_0x586a08(0x109),(_0x48104f,{threadId:_0x709087,isFromAdapter:_0x250e5d})=>{const _0x353dcc=_0x586a08;!_0x250e5d&&_0x120c11['ui'][_0x353dcc(0xfd)][_0x353dcc(0x10e)]&&_0x56e8cb[_0x353dcc(0xd4)](_0x709087)&&_0x120c11[_0x353dcc(0xd2)][_0x353dcc(0xff)][_0x353dcc(0xd5)]();},{'priority':_0x586a08(0xd9)}),this[_0x586a08(0xda)](_0x20b55c,_0x586a08(0xf2),(_0x38c8f8,{threadId:_0x2eb1ac,isFromAdapter:_0x4a5757})=>{const _0x37bbca=_0x586a08;if(_0x4a5757||!_0x56e8cb[_0x37bbca(0xd4)](_0x2eb1ac)||!_0x20b55c[_0x37bbca(0x107)](_0x2eb1ac))return;0x1===_0x20b55c[_0x37bbca(0xe8)](_0x2eb1ac)[_0x37bbca(0x118)]&&(_0x120c11[_0x37bbca(0xd2)][_0x37bbca(0xff)][_0x37bbca(0xd5)](),_0x38c8f8[_0x37bbca(0xcd)]());},{'priority':_0x586a08(0x10f)}),this[_0x586a08(0xed)]=this[_0x586a08(0xeb)][_0x586a08(0x115)][_0x586a08(0x10d)](_0x586a08(0xed));const _0x3d1714=this[_0x586a08(0xeb)];this[_0x586a08(0x105)]=setInterval(()=>{const _0x7593ac=_0x586a08;let _0x44ade1;for(const _0x17601d in _0x3d1714){const _0x4df400=_0x17601d,_0x2ba113=_0x3d1714[_0x4df400];if(_0x7593ac(0xee)==_0x2ba113||_0x7593ac(0xd6)==_0x2ba113||_0x7593ac(0xdb)==_0x2ba113||_0x7593ac(0xc9)==_0x2ba113||_0x7593ac(0xd0)==_0x2ba113||_0x7593ac(0xf7)==_0x2ba113||_0x7593ac(0xcb)==_0x2ba113||_0x7593ac(0x11b)==_0x2ba113){delete _0x3d1714[_0x4df400],_0x44ade1=_0x2ba113,clearInterval(this[_0x7593ac(0x105)]),this[_0x7593ac(0x105)]=void 0x0;break;}}_0x7593ac(0xd6)==_0x44ade1&&_0x3d1714[_0x7593ac(0xfc)](_0x7593ac(0xf0)),_0x7593ac(0xdb)==_0x44ade1&&_0x3d1714[_0x7593ac(0xfc)](_0x7593ac(0xe5)),_0x7593ac(0xc9)==_0x44ade1&&_0x3d1714[_0x7593ac(0xfc)](_0x7593ac(0xf4)),_0x7593ac(0xd0)==_0x44ade1&&_0x3d1714[_0x7593ac(0xfc)](_0x7593ac(0xea),_0x7593ac(0xe4)),_0x7593ac(0xf7)==_0x44ade1&&_0x3d1714[_0x7593ac(0xfc)](_0x7593ac(0xce)),_0x7593ac(0xcb)==_0x44ade1&&_0x3d1714[_0x7593ac(0xfc)](_0x7593ac(0xec)),_0x7593ac(0x11b)==_0x44ade1&&_0x3d1714[_0x7593ac(0xfc)](_0x7593ac(0x11c));},0x3e8);}[_0x570058(0xcc)](){const _0x28d990=_0x570058;super[_0x28d990(0xcc)](),this[_0x28d990(0x105)]&&clearInterval(this[_0x28d990(0x105)]);}[_0x570058(0x111)](_0x4d7989){const _0x48818c=_0x570058,_0x5a8dda=this[_0x48818c(0xeb)],_0x561977=new _0x4d7989(_0x5a8dda[_0x48818c(0x11d)]),_0x4cf4b3=_0x5a8dda[_0x48818c(0xe7)][_0x48818c(0x10d)](_0x48818c(0x112));return _0x561977[_0x48818c(0x108)]({'label':_0x461c46(_0x5a8dda[_0x48818c(0x11d)],_0x48818c(0xf1)),'icon':_0x5072c3}),_0x561977[_0x48818c(0xe1)](_0x48818c(0x10b))['to'](_0x4cf4b3),this[_0x48818c(0xda)](_0x561977,_0x48818c(0x114),()=>{const _0x199af4=_0x48818c;_0x4cf4b3[_0x199af4(0x114)]();}),_0x561977;}}