@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.12 kB
JavaScript
/*
* 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 _0x43534a=_0x53d4;(function(_0x34ef8d,_0x2ef4d6){const _0x4f7928=_0x53d4,_0x5a5183=_0x34ef8d();while(!![]){try{const _0x17971c=parseInt(_0x4f7928(0xb5))/0x1*(parseInt(_0x4f7928(0xe6))/0x2)+parseInt(_0x4f7928(0xef))/0x3+parseInt(_0x4f7928(0xd1))/0x4*(parseInt(_0x4f7928(0xb3))/0x5)+parseInt(_0x4f7928(0xbf))/0x6*(parseInt(_0x4f7928(0xc5))/0x7)+parseInt(_0x4f7928(0xd4))/0x8*(-parseInt(_0x4f7928(0xe0))/0x9)+parseInt(_0x4f7928(0xdd))/0xa*(parseInt(_0x4f7928(0xe7))/0xb)+-parseInt(_0x4f7928(0xc1))/0xc;if(_0x17971c===_0x2ef4d6)break;else _0x5a5183['push'](_0x5a5183['shift']());}catch(_0x3f8b91){_0x5a5183['push'](_0x5a5183['shift']());}}}(_0x1b39,0x7f935));import{ContextPlugin as _0x2e4b96,Context as _0x675c73}from'ckeditor5/src/core.js';import _0x5f13f4 from'./annotationsuis.js';function _0x1b39(){const _0x5f4d86=['uiUpdate','widesidebar-detach-not-attached','getOrderedSelectedAnnotations','set:container','context','activeAnnotation','add','12738HUqbIs','editors','24060072MdhjrS','init','requires','isAttached','3360cpzQKF','refresh','_refreshPositioningDebounced','container','refreshPositioning','annotations','has','addAnnotation','set','from','addEventListener','stop','24016ZsjlcC','detach','attach','8zXUsOq','ready','widesidebar-attach-already-attached','setActiveAnnotation','get','rearrange','off','WideSidebar','wideSidebar','10460xDLsZZ','pluginName','stopListening','4845213JWoczv','EditorAnnotations','_activeAnnotation','_destroyEditorAnnotationsIntegration','_attachToContainer','isPremiumPlugin','22OStNSd','1353dSPtyd','hasDomSelection','cancel','blur','focus','switchTo','listenTo','removeEventListener','911208AXjGdt','high','destroy','ck-sidebar--wide','remove','isOfficialPlugin','register','change:container','_detachFromContainer','plugins','updateTargetRect','resize','640Ufzphx','_integrateWithEditorAnnotations','76906PNVQDt','_editorAnnotations','_annotations'];_0x1b39=function(){return _0x5f4d86;};return _0x1b39();}import _0xbbdf18 from'./sidebar.js';import{CKEditorError as _0x5f0f16,Collection as _0x1c57de}from'ckeditor5/src/utils.js';import{debounce as _0x4264e7}from'lodash-es';function _0x53d4(_0x4a46de,_0x385549){const _0x1b39c2=_0x1b39();return _0x53d4=function(_0x53d4d8,_0x1a95ab){_0x53d4d8=_0x53d4d8-0xa8;let _0x237132=_0x1b39c2[_0x53d4d8];return _0x237132;},_0x53d4(_0x4a46de,_0x385549);}export default class e extends _0x2e4b96{static get[_0x43534a(0xc3)](){return[_0xbbdf18,_0x5f13f4];}static get[_0x43534a(0xde)](){const _0x50437e=_0x43534a;return _0x50437e(0xdb);}static get[_0x43534a(0xac)](){return!0x0;}static get[_0x43534a(0xe5)](){return!0x0;}constructor(_0x10dfb3){const _0x3ca7da=_0x43534a;super(_0x10dfb3),this[_0x3ca7da(0xc4)]=!0x1,this[_0x3ca7da(0xcd)](_0x3ca7da(0xbd),null),this[_0x3ca7da(0xca)]=null,this[_0x3ca7da(0xb6)]=new _0x1c57de(),this[_0x3ca7da(0xc7)]=_0x4264e7(()=>{const _0x251e26=_0x3ca7da;this[_0x251e26(0xca)][_0x251e26(0xc9)]();},0xfa,{'leading':!0x1});}[_0x43534a(0xc2)](){const _0x18cfc1=_0x43534a,_0xd19400=this[_0x18cfc1(0xbc)][_0x18cfc1(0xb0)][_0x18cfc1(0xd8)](_0x5f13f4),_0x102d0b=this[_0x18cfc1(0xbc)][_0x18cfc1(0xb0)][_0x18cfc1(0xd8)](_0xbbdf18);_0xd19400[_0x18cfc1(0xad)](_0x18cfc1(0xdc),this),_0x102d0b[_0x18cfc1(0xc8)]&&_0xd19400[_0x18cfc1(0xec)](_0x18cfc1(0xdc));}[_0x43534a(0xd7)](_0x50ea02){const _0x13d9f9=_0x43534a;if(_0x50ea02===this[_0x13d9f9(0xbd)])return;const _0xef8156=this[_0x13d9f9(0xbc)][_0x13d9f9(0xb0)][_0x13d9f9(0xd8)](_0xbbdf18);_0xef8156[_0x13d9f9(0xe2)]=_0x50ea02;const _0x33528b=this[_0x13d9f9(0xbd)];_0xef8156[_0x13d9f9(0xc6)]({'blurredAnnotation':_0x33528b,'activatedAnnotation':_0x50ea02}),this[_0x13d9f9(0xbd)]=_0x50ea02;}[_0x43534a(0xd3)](_0x115426){const _0x3b189a=_0x43534a;this[_0x3b189a(0xca)]=_0x115426;const _0x2851fc=this[_0x3b189a(0xbc)][_0x3b189a(0xb0)][_0x3b189a(0xd8)](_0xbbdf18);if(_0x2851fc[_0x3b189a(0xb7)]=_0x115426,this[_0x3b189a(0xc4)])throw new _0x5f0f16(_0x3b189a(0xd6),this);this[_0x3b189a(0xc4)]=!0x0,this[_0x3b189a(0xed)](_0x2851fc,_0x3b189a(0xbb),()=>{const _0x4eecb5=_0x3b189a;this[_0x4eecb5(0xd2)](),this[_0x4eecb5(0xed)](_0x2851fc,_0x4eecb5(0xae),_0x26d553=>{const _0x481f2b=_0x4eecb5;_0x26d553[_0x481f2b(0xda)](),this[_0x481f2b(0xd3)](_0x115426);});}),_0x2851fc[_0x3b189a(0xe4)]({'viewClass':_0x3b189a(0xaa)});const _0x47fcd7=_0xa81fec=>{const _0x4b2f1d=_0x3b189a;_0xa81fec[_0x4b2f1d(0xb1)](),_0x2851fc[_0x4b2f1d(0xcc)](_0xa81fec);};for(const _0x24f3bf of _0x115426)_0x47fcd7(_0x24f3bf);this[_0x3b189a(0xed)](_0x115426,_0x3b189a(0xbe),(_0x327c3c,_0x21b748)=>{_0x47fcd7(_0x21b748);}),this[_0x3b189a(0xed)](_0x115426,_0x3b189a(0xab),(_0x56aa4e,_0x23e5b4,_0x19d3d7)=>{const _0x977d87=_0x3b189a;_0x2851fc[_0x977d87(0xd9)]({'removedAnnotation':_0x23e5b4,'previousAnnotation':_0x115426[_0x977d87(0xd8)](_0x19d3d7-0x1),'nextAnnotation':_0x115426[_0x977d87(0xd8)](_0x19d3d7+0x1)}),_0x23e5b4===this[_0x977d87(0xbd)]&&this[_0x977d87(0xd7)](null);},{'priority':_0x3b189a(0xa8)}),this[_0x3b189a(0xed)](_0x115426,_0x3b189a(0xeb),(_0x532940,_0x5079ee)=>{const _0x1385b9=_0x3b189a;this[_0x1385b9(0xd7)](_0x5079ee);}),this[_0x3b189a(0xed)](_0x115426,_0x3b189a(0xea),()=>{const _0x430499=_0x3b189a;this[_0x430499(0xd7)](null);});const _0x391f78=this[_0x3b189a(0xbc)]instanceof _0x675c73?this[_0x3b189a(0xbc)][_0x3b189a(0xc0)]:new _0x1c57de([this[_0x3b189a(0xbc)]]);for(const _0x3ff51c of _0x391f78)this[_0x3b189a(0xb4)](_0x3ff51c);this[_0x3b189a(0xed)](_0x391f78,_0x3b189a(0xbe),(_0x4c413a,_0x4ff166)=>{const _0x58de4d=_0x3b189a;this[_0x58de4d(0xed)](_0x4ff166,_0x58de4d(0xd5),()=>{const _0x28267c=_0x58de4d;this[_0x28267c(0xb4)](_0x4ff166);});}),this[_0x3b189a(0xed)](_0x391f78,_0x3b189a(0xab),(_0x472e30,_0x16fa38)=>{const _0x3419d3=_0x3b189a;_0x16fa38[_0x3419d3(0xb0)][_0x3419d3(0xcb)](_0x3419d3(0xe1))&&this[_0x3419d3(0xe3)](_0x16fa38[_0x3419d3(0xb0)][_0x3419d3(0xd8)](_0x3419d3(0xe1)));}),window[_0x3b189a(0xcf)](_0x3b189a(0xb2),this[_0x3b189a(0xc7)]),this[_0x3b189a(0xca)][_0x3b189a(0xc9)]();}[_0x43534a(0xd2)](){const _0xa8e38f=_0x43534a;if(!this[_0xa8e38f(0xc4)])throw new _0x5f0f16(_0xa8e38f(0xb9),this);this[_0xa8e38f(0xd7)](null);const _0x20c67c=this[_0xa8e38f(0xbc)][_0xa8e38f(0xb0)][_0xa8e38f(0xd8)](_0xbbdf18);_0x20c67c[_0xa8e38f(0xaf)](this[_0xa8e38f(0xca)]),this[_0xa8e38f(0xdf)](_0x20c67c),this[_0xa8e38f(0xdf)](this[_0xa8e38f(0xca)]),this[_0xa8e38f(0xbc)]instanceof _0x675c73&&this[_0xa8e38f(0xdf)](this[_0xa8e38f(0xbc)][_0xa8e38f(0xc0)]);for(const _0x365d4c of Array[_0xa8e38f(0xce)](this[_0xa8e38f(0xb6)]))this[_0xa8e38f(0xe3)](_0x365d4c);window[_0xa8e38f(0xee)](_0xa8e38f(0xb2),this[_0xa8e38f(0xc7)]),this[_0xa8e38f(0xc7)][_0xa8e38f(0xe9)](),this[_0xa8e38f(0xbd)]=null,this[_0xa8e38f(0xc4)]=!0x1,this[_0xa8e38f(0xca)]=null;}[_0x43534a(0xa9)](){const _0x4f190d=_0x43534a;this[_0x4f190d(0xc4)]&&this[_0x4f190d(0xd2)]();}[_0x43534a(0xb4)](_0x16904a){const _0x51b9c2=_0x43534a;if(!_0x16904a[_0x51b9c2(0xb0)][_0x51b9c2(0xcb)](_0x51b9c2(0xe1)))return;const _0x2f57a7=_0x16904a[_0x51b9c2(0xb0)][_0x51b9c2(0xd8)](_0x51b9c2(0xe1)),_0x231471=()=>{const _0x165d67=_0x51b9c2,_0xaecb29=_0x2f57a7[_0x165d67(0xba)]({'annotations':this[_0x165d67(0xca)],'activeAnnotation':this[_0x165d67(0xbd)]});this[_0x165d67(0xd7)](_0xaecb29[0x0]||null);};this[_0x51b9c2(0xed)](_0x2f57a7,_0x51b9c2(0xc6),_0x231471),this[_0x51b9c2(0xed)](_0x2f57a7,_0x51b9c2(0xea),(_0x4e54d6,{isAnnotationTracked:_0x341e67})=>{const _0x3f39ad=_0x51b9c2;this[_0x3f39ad(0xbd)]&&_0x341e67(this[_0x3f39ad(0xbd)])&&this[_0x3f39ad(0xd7)](null);}),this[_0x51b9c2(0xed)](_0x2f57a7,_0x51b9c2(0xb8),()=>{const _0x2e2cbe=_0x51b9c2;this[_0x2e2cbe(0xc7)]();}),this[_0x51b9c2(0xed)](this[_0x51b9c2(0xca)],_0x51b9c2(0xea),_0x5059d0=>{const _0x41af48=_0x51b9c2;_0x2f57a7[_0x41af48(0xe8)]()&&(_0x231471(),_0x5059d0[_0x41af48(0xd0)]());},{'priority':_0x51b9c2(0xa8)}),this[_0x51b9c2(0xb6)][_0x51b9c2(0xbe)](_0x2f57a7);}[_0x43534a(0xe3)](_0x359902){const _0x1c1742=_0x43534a;this[_0x1c1742(0xdf)](_0x359902),this[_0x1c1742(0xb6)][_0x1c1742(0xab)](_0x359902);}}