UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 9.33 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 _0x48a0c2=_0x2e48;(function(_0x11d6d6,_0x19aee2){const _0x1e79b3=_0x2e48,_0x2d00eb=_0x11d6d6();while(!![]){try{const _0x1fb13c=-parseInt(_0x1e79b3(0x195))/0x1+parseInt(_0x1e79b3(0x173))/0x2*(parseInt(_0x1e79b3(0x18b))/0x3)+parseInt(_0x1e79b3(0x17c))/0x4*(parseInt(_0x1e79b3(0x19c))/0x5)+parseInt(_0x1e79b3(0x161))/0x6*(parseInt(_0x1e79b3(0x19b))/0x7)+parseInt(_0x1e79b3(0x162))/0x8+parseInt(_0x1e79b3(0x18c))/0x9+-parseInt(_0x1e79b3(0x18e))/0xa*(parseInt(_0x1e79b3(0x182))/0xb);if(_0x1fb13c===_0x19aee2)break;else _0x2d00eb['push'](_0x2d00eb['shift']());}catch(_0x56597b){_0x2d00eb['push'](_0x2d00eb['shift']());}}}(_0x5542,0xa341a));import{ContextPlugin as _0x5a5dc3,Context as _0x159739}from'ckeditor5/src/core.js';function _0x2e48(_0x3d3e7e,_0xc126ee){const _0x554210=_0x5542();return _0x2e48=function(_0x2e489f,_0xea1f53){_0x2e489f=_0x2e489f-0x157;let _0x3da818=_0x554210[_0x2e489f];return _0x3da818;},_0x2e48(_0x3d3e7e,_0xc126ee);}function _0x5542(){const _0x55752b=['requires','context','refreshPositioning','wideSidebar','removeEventListener','pluginName','3130016dFdMXS','register','attach','_editorAnnotations','annotations','container','11vbNrbv','remove','add','has','_detachFromContainer','init','refresh','activeAnnotation','hasDomSelection','4566rxQwac','6716736LoPhXP','destroy','13531310GENNZU','stop','_refreshPositioningDebounced','detach','widesidebar-attach-already-attached','addEventListener','off','740586tCDNih','_annotations','updateTargetRect','widesidebar-detach-not-attached','high','_attachToContainer','1580719ksBviQ','5NxSoVa','getOrderedSelectedAnnotations','focus','cancel','setActiveAnnotation','set:container','WideSidebar','_activeAnnotation','ck-sidebar--wide','uiUpdate','isPremiumPlugin','addAnnotation','6SJJdWn','6759488uVHPds','isOfficialPlugin','rearrange','stopListening','plugins','_destroyEditorAnnotationsIntegration','resize','isAttached','from','set','switchTo','get','blur','EditorAnnotations','listenTo','change:container','editors','214iMGHsp','_integrateWithEditorAnnotations','ready'];_0x5542=function(){return _0x55752b;};return _0x5542();}import _0xc9bc8d from'./annotationsuis.js';import _0x2d6f30 from'./sidebar.js';import{CKEditorError as _0x1d7149,Collection as _0x3d218c}from'ckeditor5/src/utils.js';import{debounce as _0x4685da}from'es-toolkit/compat';export default class e extends _0x5a5dc3{[_0x48a0c2(0x169)];[_0x48a0c2(0x180)];[_0x48a0c2(0x17f)];[_0x48a0c2(0x190)];static get[_0x48a0c2(0x176)](){return[_0x2d6f30,_0xc9bc8d];}static get[_0x48a0c2(0x17b)](){const _0x29539e=_0x48a0c2;return _0x29539e(0x15b);}static get[_0x48a0c2(0x163)](){return!0x0;}static get[_0x48a0c2(0x15f)](){return!0x0;}constructor(_0x36a761){const _0x478d27=_0x48a0c2;super(_0x36a761),this[_0x478d27(0x169)]=!0x1,this[_0x478d27(0x16b)](_0x478d27(0x189),null),this[_0x478d27(0x180)]=null,this[_0x478d27(0x17f)]=new _0x3d218c(),this[_0x478d27(0x190)]=_0x4685da(()=>{const _0x4365b9=_0x478d27;this[_0x4365b9(0x180)][_0x4365b9(0x178)]();},0xfa,{'leading':!0x1});}[_0x48a0c2(0x187)](){const _0x3c7694=_0x48a0c2,_0x54f32b=this[_0x3c7694(0x177)][_0x3c7694(0x166)][_0x3c7694(0x16d)](_0xc9bc8d),_0x28e443=this[_0x3c7694(0x177)][_0x3c7694(0x166)][_0x3c7694(0x16d)](_0x2d6f30);_0x54f32b[_0x3c7694(0x17d)](_0x3c7694(0x179),this),_0x28e443[_0x3c7694(0x181)]&&_0x54f32b[_0x3c7694(0x16c)](_0x3c7694(0x179));}[_0x48a0c2(0x159)](_0x303b16){const _0x3adb57=_0x48a0c2;if(_0x303b16===this[_0x3adb57(0x189)])return;const _0x2509a2=this[_0x3adb57(0x177)][_0x3adb57(0x166)][_0x3adb57(0x16d)](_0x2d6f30);_0x2509a2[_0x3adb57(0x15c)]=_0x303b16;const _0x21d4b1=this[_0x3adb57(0x189)];_0x2509a2[_0x3adb57(0x188)]({'blurredAnnotation':_0x21d4b1,'activatedAnnotation':_0x303b16}),this[_0x3adb57(0x189)]=_0x303b16;}[_0x48a0c2(0x17e)](_0x4510f2){const _0x5e8be2=_0x48a0c2;this[_0x5e8be2(0x180)]=_0x4510f2;const _0x452cf9=this[_0x5e8be2(0x177)][_0x5e8be2(0x166)][_0x5e8be2(0x16d)](_0x2d6f30);if(_0x452cf9[_0x5e8be2(0x196)]=_0x4510f2,this[_0x5e8be2(0x169)])throw new _0x1d7149(_0x5e8be2(0x192),this);this[_0x5e8be2(0x169)]=!0x0,this[_0x5e8be2(0x170)](_0x452cf9,_0x5e8be2(0x15a),()=>{const _0x5c4d29=_0x5e8be2;this[_0x5c4d29(0x191)](),this[_0x5c4d29(0x170)](_0x452cf9,_0x5c4d29(0x171),_0x71949b=>{const _0x294a36=_0x5c4d29;_0x71949b[_0x294a36(0x194)](),this[_0x294a36(0x17e)](_0x4510f2);});}),_0x452cf9[_0x5e8be2(0x19a)]({'viewClass':_0x5e8be2(0x15d)});const _0x67ad5a=_0x1591ec=>{const _0x23147b=_0x5e8be2;_0x1591ec[_0x23147b(0x197)](),_0x452cf9[_0x23147b(0x160)](_0x1591ec);};for(const _0x553175 of _0x4510f2)_0x67ad5a(_0x553175);this[_0x5e8be2(0x170)](_0x4510f2,_0x5e8be2(0x184),(_0x11a85f,_0x1e57d3)=>{_0x67ad5a(_0x1e57d3);}),this[_0x5e8be2(0x170)](_0x4510f2,_0x5e8be2(0x183),(_0x53dd6b,_0x5dfc28,_0x3fd846)=>{const _0x1008d7=_0x5e8be2;_0x452cf9[_0x1008d7(0x164)]({'removedAnnotation':_0x5dfc28,'previousAnnotation':_0x4510f2[_0x1008d7(0x16d)](_0x3fd846-0x1),'nextAnnotation':_0x4510f2[_0x1008d7(0x16d)](_0x3fd846+0x1)}),_0x5dfc28===this[_0x1008d7(0x189)]&&this[_0x1008d7(0x159)](null);},{'priority':_0x5e8be2(0x199)}),this[_0x5e8be2(0x170)](_0x4510f2,_0x5e8be2(0x157),(_0x1b0859,_0x6d0196)=>{const _0xb0fe27=_0x5e8be2;this[_0xb0fe27(0x159)](_0x6d0196);}),this[_0x5e8be2(0x170)](_0x4510f2,_0x5e8be2(0x16e),()=>{const _0x5364a0=_0x5e8be2;this[_0x5364a0(0x159)](null);});const _0x497fcf=this[_0x5e8be2(0x177)]instanceof _0x159739?this[_0x5e8be2(0x177)][_0x5e8be2(0x172)]:new _0x3d218c([this[_0x5e8be2(0x177)]]);for(const _0x49112e of _0x497fcf)this[_0x5e8be2(0x174)](_0x49112e);this[_0x5e8be2(0x170)](_0x497fcf,_0x5e8be2(0x184),(_0xd3d697,_0x44f5c6)=>{const _0x5ce86d=_0x5e8be2;this[_0x5ce86d(0x170)](_0x44f5c6,_0x5ce86d(0x175),()=>{const _0x1e07ae=_0x5ce86d;this[_0x1e07ae(0x174)](_0x44f5c6);});}),this[_0x5e8be2(0x170)](_0x497fcf,_0x5e8be2(0x183),(_0x49f6d9,_0x2758c8)=>{const _0x57a59a=_0x5e8be2;_0x2758c8[_0x57a59a(0x166)][_0x57a59a(0x185)](_0x57a59a(0x16f))&&this[_0x57a59a(0x167)](_0x2758c8[_0x57a59a(0x166)][_0x57a59a(0x16d)](_0x57a59a(0x16f)));}),window[_0x5e8be2(0x193)](_0x5e8be2(0x168),this[_0x5e8be2(0x190)]),this[_0x5e8be2(0x180)][_0x5e8be2(0x178)]();}[_0x48a0c2(0x191)](){const _0x2b68ff=_0x48a0c2;if(!this[_0x2b68ff(0x169)])throw new _0x1d7149(_0x2b68ff(0x198),this);this[_0x2b68ff(0x159)](null);const _0x3ddeaa=this[_0x2b68ff(0x177)][_0x2b68ff(0x166)][_0x2b68ff(0x16d)](_0x2d6f30);_0x3ddeaa[_0x2b68ff(0x186)](this[_0x2b68ff(0x180)]),this[_0x2b68ff(0x165)](_0x3ddeaa),this[_0x2b68ff(0x165)](this[_0x2b68ff(0x180)]),this[_0x2b68ff(0x177)]instanceof _0x159739&&this[_0x2b68ff(0x165)](this[_0x2b68ff(0x177)][_0x2b68ff(0x172)]);for(const _0x1bff16 of Array[_0x2b68ff(0x16a)](this[_0x2b68ff(0x17f)]))this[_0x2b68ff(0x167)](_0x1bff16);window[_0x2b68ff(0x17a)](_0x2b68ff(0x168),this[_0x2b68ff(0x190)]),this[_0x2b68ff(0x190)][_0x2b68ff(0x158)](),this[_0x2b68ff(0x189)]=null,this[_0x2b68ff(0x169)]=!0x1,this[_0x2b68ff(0x180)]=null;}[_0x48a0c2(0x18d)](){const _0x2f7255=_0x48a0c2;this[_0x2f7255(0x169)]&&this[_0x2f7255(0x191)]();}[_0x48a0c2(0x174)](_0x3d0a0b){const _0x914b7e=_0x48a0c2;if(!_0x3d0a0b[_0x914b7e(0x166)][_0x914b7e(0x185)](_0x914b7e(0x16f)))return;const _0x261c15=_0x3d0a0b[_0x914b7e(0x166)][_0x914b7e(0x16d)](_0x914b7e(0x16f)),_0x6fe1ae=()=>{const _0xf03535=_0x914b7e,_0x23eb23=_0x261c15[_0xf03535(0x19d)]({'annotations':this[_0xf03535(0x180)],'activeAnnotation':this[_0xf03535(0x189)]});this[_0xf03535(0x159)](_0x23eb23[0x0]||null);};this[_0x914b7e(0x170)](_0x261c15,_0x914b7e(0x188),_0x6fe1ae),this[_0x914b7e(0x170)](_0x261c15,_0x914b7e(0x16e),(_0x41644f,{isAnnotationTracked:_0x1f0731})=>{const _0x208797=_0x914b7e;this[_0x208797(0x189)]&&_0x1f0731(this[_0x208797(0x189)])&&this[_0x208797(0x159)](null);}),this[_0x914b7e(0x170)](_0x261c15,_0x914b7e(0x15e),()=>{const _0x53ca41=_0x914b7e;this[_0x53ca41(0x190)]();}),this[_0x914b7e(0x170)](this[_0x914b7e(0x180)],_0x914b7e(0x16e),_0x756fda=>{const _0x4a01d3=_0x914b7e;_0x261c15[_0x4a01d3(0x18a)]()&&(_0x6fe1ae(),_0x756fda[_0x4a01d3(0x18f)]());},{'priority':_0x914b7e(0x199)}),this[_0x914b7e(0x17f)][_0x914b7e(0x184)](_0x261c15);}[_0x48a0c2(0x167)](_0x35919a){const _0x3f66c9=_0x48a0c2;this[_0x3f66c9(0x165)](_0x35919a),this[_0x3f66c9(0x17f)][_0x3f66c9(0x183)](_0x35919a);}}