UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines • 9.88 kB
/* * 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 _0x1a8223=_0x5728;(function(_0x335ff4,_0x1cb1db){const _0x1b12f0=_0x5728,_0x39350d=_0x335ff4();while(!![]){try{const _0x2a0cba=parseInt(_0x1b12f0(0xa6))/0x1+parseInt(_0x1b12f0(0xb4))/0x2+parseInt(_0x1b12f0(0x8e))/0x3*(-parseInt(_0x1b12f0(0x9a))/0x4)+-parseInt(_0x1b12f0(0x86))/0x5*(parseInt(_0x1b12f0(0x9e))/0x6)+parseInt(_0x1b12f0(0x69))/0x7+parseInt(_0x1b12f0(0xb1))/0x8*(parseInt(_0x1b12f0(0x98))/0x9)+-parseInt(_0x1b12f0(0xaf))/0xa;if(_0x2a0cba===_0x1cb1db)break;else _0x39350d['push'](_0x39350d['shift']());}catch(_0x1a1466){_0x39350d['push'](_0x39350d['shift']());}}}(_0x8214,0xf184b));import'../../theme/commentsarchive.css';import{Plugin as _0x25b94e}from'ckeditor5/src/core.js';import{IconCommentsArchive as _0x149a3b}from'ckeditor5/src/icons.js';import{ViewCollection as _0x51803b,MenuBarMenuListItemButtonView as _0x4564bb,ButtonView as _0x54fcee,Dialog as _0x5678bb,DialogViewPosition as _0x1f456f}from'ckeditor5/src/ui.js';import{getTranslation as _0x12e190}from'../utils/common-translations.js';function _0x8214(){const _0x756d03=['focusableElements','includes','archivedAt','1955351glzlYq','_createCommentsArchiveButton','_addAnnotationToArchive','CommentsRepository','editor','plugins','source','filter','Dialog','27704870hBUHXL','find','440pJmwgv','archivedThreads','stop','1861696oZeQpg','menuitemcheckbox','execute','get','9116317UxGKCQ','_hideDialogOnAnnotationEscape','indexOf','getByInnerView','annotationViews','channelId','stopListening','escape','_threadToController','Annotations','remove','length','bind','requires','commentsArchive','has','_handleNewThread','_calculatePosition','collection','config','isOn','set:isVisible','_visibleAnnotations','innerView','splice','set','hide','init','listenTo','15FVyVyS','findIndex','view','isPremiumPlugin','_toggleDialog','return','menuBar:commentsArchive','isOpen','90QMCgHC','locale','componentFactory','show','CommentsArchiveUI','commentsArchiveView','EDITOR_TOP_SIDE','isVisible','forEach','add','186813ZQFPrW','isEnabled','11296dYxtBI','COMMENTS_ARCHIVE','collaboration.channelId','pluginName','2971398rIiKvU','push','isOfficialPlugin','_pendingThreads','tooltip'];_0x8214=function(){return _0x756d03;};return _0x8214();}import{CommentsArchiveView as _0x3577de}from'./ui/view/commentsarchiveview.js';import{CommentsArchive as _0x54b532}from'./commentsarchive.js';function _0x5728(_0x1561ca,_0x55cc2c){const _0x82149b=_0x8214();return _0x5728=function(_0x572819,_0x189eed){_0x572819=_0x572819-0x69;let _0x38ab57=_0x82149b[_0x572819];return _0x38ab57;},_0x5728(_0x1561ca,_0x55cc2c);}export class CommentsArchiveUI extends _0x25b94e{[_0x1a8223(0x93)];[_0x1a8223(0x6d)];[_0x1a8223(0xa1)];static get[_0x1a8223(0x9d)](){const _0x28f613=_0x1a8223;return _0x28f613(0x92);}static get[_0x1a8223(0xa0)](){return!0x0;}static get[_0x1a8223(0x89)](){return!0x0;}static get[_0x1a8223(0x76)](){return[_0x54b532,_0x5678bb];}constructor(_0x24643b){const _0x52daf4=_0x1a8223;super(_0x24643b),this[_0x52daf4(0x6d)]=new _0x51803b(),this[_0x52daf4(0xa1)]=[];}[_0x1a8223(0x84)](){const _0x18be79=_0x1a8223,_0x370957=this[_0x18be79(0xaa)],_0x7f552a=this[_0x18be79(0x6a)][_0x18be79(0x75)](this);_0x370957['ui'][_0x18be79(0x90)][_0x18be79(0x97)](_0x18be79(0x77),()=>this[_0x18be79(0xa7)](_0x54fcee,!0x0)),_0x370957['ui'][_0x18be79(0x90)][_0x18be79(0x97)](_0x18be79(0x8c),()=>{const _0x18b75b=_0x18be79,_0x224469=this[_0x18b75b(0xa7)](_0x4564bb);return _0x224469[_0x18b75b(0x82)]({'role':_0x18b75b(0xb5)}),_0x224469;});const _0x23e9de=_0x370957[_0x18be79(0xab)][_0x18be79(0xb7)](_0x54b532),_0x2ade8f=_0x370957[_0x18be79(0xab)][_0x18be79(0xb7)](_0x18be79(0x72)),_0x5e7ece=_0x370957[_0x18be79(0xab)][_0x18be79(0xb7)](_0x18be79(0xa9));_0x23e9de[_0x18be79(0xb2)][_0x18be79(0x96)](_0x5696c6=>{const _0x4328b2=_0x18be79;this[_0x4328b2(0x79)](_0x5696c6);}),this[_0x18be79(0x85)](_0x23e9de[_0x18be79(0xb2)],_0x18be79(0x97),(_0x514261,_0x5c68dc)=>{const _0x1f5c06=_0x18be79;this[_0x1f5c06(0x79)](_0x5c68dc);}),this[_0x18be79(0x85)](_0x2ade8f[_0x18be79(0x7b)],_0x18be79(0x97),(_0x46661f,_0x3e715e)=>{const _0x22c02a=_0x18be79,_0x560960=this[_0x22c02a(0xa1)][_0x22c02a(0xb0)](_0x288a69=>{const _0x222b86=_0x22c02a,_0x1ed5f5=_0x5e7ece[_0x222b86(0x71)][_0x222b86(0xb7)](_0x288a69);return _0x1ed5f5&&_0x3e715e[_0x222b86(0x80)]===_0x1ed5f5[_0x222b86(0x88)];});if(_0x560960){const _0x4ac95f=this[_0x22c02a(0x7a)](_0x560960[_0x22c02a(0xa5)]);this[_0x22c02a(0xa8)](_0x3e715e,_0x4ac95f),this[_0x22c02a(0xa1)][_0x22c02a(0x81)](this[_0x22c02a(0xa1)][_0x22c02a(0x6b)](_0x560960),0x1);}}),this[_0x18be79(0x85)](_0x23e9de[_0x18be79(0xb2)],_0x18be79(0x73),(_0x504e81,_0x8e14da)=>{const _0x4a58da=_0x18be79,_0x35f0f6=_0x370957[_0x4a58da(0x7c)][_0x4a58da(0xb7)](_0x4a58da(0x9c));if(!_0x35f0f6||_0x8e14da[_0x4a58da(0x6e)]===_0x35f0f6){if(this[_0x4a58da(0xa1)][_0x4a58da(0xa4)](_0x8e14da))this[_0x4a58da(0xa1)][_0x4a58da(0x81)](this[_0x4a58da(0xa1)][_0x4a58da(0x6b)](_0x8e14da),0x1);else{const _0x2150e3=_0x5e7ece[_0x4a58da(0x71)][_0x4a58da(0xb7)](_0x8e14da),_0x45fc33=_0x2ade8f[_0x4a58da(0x6c)](_0x2150e3[_0x4a58da(0x88)]);this[_0x4a58da(0x6d)][_0x4a58da(0x73)](_0x45fc33[_0x4a58da(0x88)]),this[_0x4a58da(0x6f)](_0x45fc33),this[_0x4a58da(0x6f)](_0x45fc33[_0x4a58da(0xa3)]);}}}),this[_0x18be79(0x85)](_0x2ade8f[_0x18be79(0x7b)],_0x18be79(0x97),(_0x31eaf5,_0xcd0ba1)=>{const _0x5dd7cf=_0x18be79;this[_0x5dd7cf(0x85)](_0xcd0ba1,_0x5dd7cf(0x70),_0x7f552a);}),this[_0x18be79(0x85)](_0x2ade8f[_0x18be79(0x7b)],_0x18be79(0x73),(_0xea0d64,_0x53883a)=>{const _0x367884=_0x18be79;this[_0x367884(0x6f)](_0x53883a,_0x367884(0x70),_0x7f552a);});}[_0x1a8223(0xa8)](_0xa9ce13,_0x2f8a55){const _0x12508e=_0x1a8223;this[_0x12508e(0x85)](_0xa9ce13,_0x12508e(0x7e),_0x1f930c=>{const _0x1d234e=_0x12508e;_0x1f930c[_0x1d234e(0x8b)]=!0x1,_0x1f930c[_0x1d234e(0xb3)]();}),this[_0x12508e(0x6d)][_0x12508e(0x97)](_0xa9ce13[_0x12508e(0x88)],_0x2f8a55);}[_0x1a8223(0x79)](_0x4d20b6){const _0x49a7e3=_0x1a8223,_0x84fe89=this[_0x49a7e3(0xaa)][_0x49a7e3(0xab)][_0x49a7e3(0xb7)](_0x49a7e3(0xa9)),_0x322728=this[_0x49a7e3(0xaa)][_0x49a7e3(0xab)][_0x49a7e3(0xb7)](_0x49a7e3(0x72)),_0x188907=this[_0x49a7e3(0xaa)][_0x49a7e3(0x7c)][_0x49a7e3(0xb7)](_0x49a7e3(0x9c));if(!_0x188907||_0x4d20b6[_0x49a7e3(0x6e)]===_0x188907){const _0x4e4fe2=_0x84fe89[_0x49a7e3(0x71)][_0x49a7e3(0xb7)](_0x4d20b6);if(!_0x4e4fe2)return void this[_0x49a7e3(0xa1)][_0x49a7e3(0x9f)](_0x4d20b6);const _0x49efd4=this[_0x49a7e3(0x7a)](_0x4d20b6[_0x49a7e3(0xa5)]),_0x454a5d=_0x322728[_0x49a7e3(0x6c)](_0x4e4fe2[_0x49a7e3(0x88)]);_0x454a5d[_0x49a7e3(0x95)]&&_0x322728[_0x49a7e3(0x7f)][_0x49a7e3(0x73)](_0x454a5d),this[_0x49a7e3(0xa8)](_0x454a5d,_0x49efd4);}}[_0x1a8223(0x7a)](_0x24d093){const _0x6e33f3=_0x1a8223,_0x2e8286=this[_0x6e33f3(0xaa)][_0x6e33f3(0x7c)][_0x6e33f3(0xb7)](_0x6e33f3(0x9c)),_0x55fe69=[...this[_0x6e33f3(0xaa)][_0x6e33f3(0xab)][_0x6e33f3(0xb7)](_0x54b532)[_0x6e33f3(0xb2)]][_0x6e33f3(0xad)](_0x28b6b6=>_0x28b6b6[_0x6e33f3(0x6e)]===_0x2e8286)[_0x6e33f3(0x87)](_0x4b7046=>_0x4b7046[_0x6e33f3(0xa5)]<_0x24d093);return _0x55fe69<0x0||_0x55fe69>this[_0x6e33f3(0x6d)][_0x6e33f3(0x74)]?this[_0x6e33f3(0x6d)][_0x6e33f3(0x74)]:_0x55fe69-0x1;}[_0x1a8223(0x8a)](){const _0x554fd1=_0x1a8223,_0x1e3251=this[_0x554fd1(0xaa)],_0x299877=_0x1e3251[_0x554fd1(0xab)][_0x554fd1(0xb7)](_0x554fd1(0xae));this[_0x554fd1(0x93)]||(this[_0x554fd1(0x93)]=new _0x3577de(_0x1e3251[_0x554fd1(0x8f)],this[_0x554fd1(0x6d)])),_0x554fd1(0x77)===_0x299877['id']?_0x299877[_0x554fd1(0x83)]():_0x299877[_0x554fd1(0x91)]({'id':_0x554fd1(0x77),'title':_0x12e190(_0x1e3251[_0x554fd1(0x8f)],_0x554fd1(0x9b)),'icon':_0x149a3b,'hasCloseButton':!0x0,'content':this[_0x554fd1(0x93)],'position':_0x1f456f[_0x554fd1(0x94)]});}[_0x1a8223(0xa7)](_0x4c3682,_0x2249ac=!0x1){const _0x4eb607=_0x1a8223,_0x2ae61f=this[_0x4eb607(0xaa)][_0x4eb607(0x8f)],_0x13d50a=this[_0x4eb607(0xaa)][_0x4eb607(0xab)][_0x4eb607(0xb7)](_0x4eb607(0xae)),_0x34784e=new _0x4c3682(_0x2ae61f);return _0x34784e[_0x4eb607(0x75)](_0x4eb607(0x99))['to'](this,_0x4eb607(0x99)),_0x34784e[_0x4eb607(0x75)](_0x4eb607(0x7d))['to'](_0x13d50a,'id',_0x15d6bc=>_0x4eb607(0x77)===_0x15d6bc),_0x34784e[_0x4eb607(0x82)]({'label':_0x12e190(_0x2ae61f,_0x4eb607(0x9b)),'icon':_0x149a3b,'isToggleable':!0x0}),_0x2249ac&&(_0x34784e[_0x4eb607(0xa2)]=!0x0),this[_0x4eb607(0x85)](_0x34784e,_0x4eb607(0xb6),()=>this[_0x4eb607(0x8a)]()),_0x34784e;}[_0x1a8223(0x6a)]=_0xa669d=>{const _0x365c77=_0x1a8223,_0x519f71=_0xa669d[_0x365c77(0xac)];if(!this[_0x365c77(0x6d)][_0x365c77(0x78)](_0x519f71[_0x365c77(0x88)]))return;const _0x1ff636=this[_0x365c77(0xaa)][_0x365c77(0xab)][_0x365c77(0xb7)](_0x365c77(0xae));_0x1ff636[_0x365c77(0x8d)]&&_0x365c77(0x77)===_0x1ff636['id']&&(_0x1ff636[_0x365c77(0x83)](),_0xa669d[_0x365c77(0xb3)]());};}