UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 9.09 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 _0x4b0940=_0x19e7;(function(_0x379b6b,_0x273d7d){const _0x3aea90=_0x19e7,_0x3e475d=_0x379b6b();while(!![]){try{const _0x259ea9=-parseInt(_0x3aea90(0x1c7))/0x1*(parseInt(_0x3aea90(0x18c))/0x2)+parseInt(_0x3aea90(0x1af))/0x3+-parseInt(_0x3aea90(0x1c3))/0x4*(parseInt(_0x3aea90(0x1b9))/0x5)+parseInt(_0x3aea90(0x1b8))/0x6*(parseInt(_0x3aea90(0x1ac))/0x7)+-parseInt(_0x3aea90(0x1a3))/0x8*(parseInt(_0x3aea90(0x19b))/0x9)+parseInt(_0x3aea90(0x1a7))/0xa*(parseInt(_0x3aea90(0x196))/0xb)+parseInt(_0x3aea90(0x1c8))/0xc;if(_0x259ea9===_0x273d7d)break;else _0x3e475d['push'](_0x3e475d['shift']());}catch(_0x597f1a){_0x3e475d['push'](_0x3e475d['shift']());}}}(_0x4885,0xf3a75));import{ContextPlugin as _0x2a28a5}from'ckeditor5/src/core.js';import{CKEditorError as _0x330aa8}from'ckeditor5/src/utils.js';import{AnnotationCollection as _0x704bd2,bindAnnotationCollections as _0x38308f}from'./annotationcollection.js';function _0x19e7(_0x300ee8,_0x1a59d3){const _0x4885c4=_0x4885();return _0x19e7=function(_0x19e7a6,_0x4fb416){_0x19e7a6=_0x19e7a6-0x187;let _0x2abe57=_0x4885c4[_0x19e7a6];return _0x2abe57;},_0x19e7(_0x300ee8,_0x1a59d3);}import{Annotations as _0x48bd3d}from'./annotations.js';export class AnnotationsUIs extends _0x2a28a5{[_0x4b0940(0x18e)];[_0x4b0940(0x1c0)];[_0x4b0940(0x19c)];static get[_0x4b0940(0x1a9)](){return[_0x48bd3d];}static get[_0x4b0940(0x1b6)](){const _0x4c1df1=_0x4b0940;return _0x4c1df1(0x1a2);}static get[_0x4b0940(0x1be)](){return!0x0;}static get[_0x4b0940(0x18d)](){return!0x0;}constructor(_0x1add13){const _0x3bf693=_0x4b0940;super(_0x1add13),this[_0x3bf693(0x18e)]=new Set(),this[_0x3bf693(0x19c)]=new Map(),this[_0x3bf693(0x1c0)]=new Map();}[_0x4b0940(0x1c2)](){const _0x18a867=_0x4b0940,_0x2dfe23=this[_0x18a867(0x1a0)][_0x18a867(0x1b7)][_0x18a867(0x1b5)](_0x48bd3d);this[_0x18a867(0x1ae)](_0x2dfe23,_0x18a867(0x1ab),(_0x9f4243,_0xe16da1)=>{const _0x3b8655=_0x18a867;for(const _0x3dc435 of this[_0x3b8655(0x18e)]){const _0x3ae527=this[_0x3b8655(0x19c)][_0x3b8655(0x1b5)](_0x3dc435);(0x0,this[_0x3b8655(0x1c0)][_0x3b8655(0x1b5)](_0x3dc435)[_0x3b8655(0x1a1)])(_0xe16da1)&&_0x3ae527[_0x3b8655(0x193)](_0xe16da1);}}),this[_0x18a867(0x1ae)](_0x2dfe23,_0x18a867(0x194),()=>{const _0x1aafe1=_0x18a867;for(const _0x476c10 of this[_0x1aafe1(0x18e)]){this[_0x1aafe1(0x19c)][_0x1aafe1(0x1b5)](_0x476c10)[_0x1aafe1(0x193)](null);}}),this[_0x18a867(0x1ae)](_0x2dfe23[_0x18a867(0x1a6)],_0x18a867(0x1b2),(_0x4e2762,_0x29e842)=>{const _0x57f20c=_0x18a867;this[_0x57f20c(0x187)](_0x29e842);});}[_0x4b0940(0x1bc)](){const _0xcfd842=_0x4b0940;return this[_0xcfd842(0x18e)][_0xcfd842(0x190)]>0x0;}[_0x4b0940(0x1bb)](_0x47159a){const _0x4e32cb=_0x4b0940;return this[_0x4e32cb(0x18e)][_0x4e32cb(0x1c4)](_0x47159a);}[_0x4b0940(0x198)](_0x40ded6,_0x2ef348=this[_0x4b0940(0x191)]){const _0x2cbb1e=_0x4b0940,_0x883ad7=this[_0x2cbb1e(0x1a0)][_0x2cbb1e(0x1b7)][_0x2cbb1e(0x1b5)](_0x48bd3d);if(!this[_0x2cbb1e(0x19c)][_0x2cbb1e(0x1c4)](_0x40ded6))throw new _0x330aa8(_0x2cbb1e(0x19a),this,{'uiName':_0x40ded6});this[_0x2cbb1e(0x1bb)](_0x40ded6)&&this[_0x2cbb1e(0x1a8)](_0x40ded6),this[_0x2cbb1e(0x18e)][_0x2cbb1e(0x1b2)](_0x40ded6);const _0x5c0be3=new _0x704bd2(),_0x5dbdd0=_0x883ad7[_0x2cbb1e(0x1a6)];_0x38308f({'source':_0x5dbdd0,'target':_0x5c0be3,'filter':_0x2ef348}),this[_0x2cbb1e(0x1c0)][_0x2cbb1e(0x1bf)](_0x40ded6,{'collection':_0x5c0be3,'filter':_0x2ef348});const _0x5a6219=this[_0x2cbb1e(0x19c)][_0x2cbb1e(0x1b5)](_0x40ded6);_0x5a6219[_0x2cbb1e(0x19d)](_0x5c0be3),this[_0x2cbb1e(0x1ae)](_0x5a6219,_0x2cbb1e(0x1c5),(_0x2f47ba,_0x415ec3,_0x48f24e,_0x4aa4b8)=>{const _0x4254a0=_0x2cbb1e;_0x4aa4b8&&_0x883ad7[_0x4254a0(0x19e)](_0x4aa4b8),_0x48f24e&&_0x883ad7[_0x4254a0(0x1a4)](_0x48f24e);});}[_0x4b0940(0x1a8)](_0x2155aa){const _0x1f96b5=_0x4b0940;if(this[_0x1f96b5(0x18e)][_0x1f96b5(0x1b1)](_0x2155aa),!this[_0x1f96b5(0x19c)][_0x1f96b5(0x1c4)](_0x2155aa))throw new _0x330aa8(_0x1f96b5(0x19a),this,{'uiName':_0x2155aa});const _0x31d2fc=this[_0x1f96b5(0x19c)][_0x1f96b5(0x1b5)](_0x2155aa);_0x31d2fc[_0x1f96b5(0x18a)](),this[_0x1f96b5(0x1b0)](_0x31d2fc),this[_0x1f96b5(0x1c0)][_0x1f96b5(0x1b5)](_0x2155aa)[_0x1f96b5(0x1c1)][_0x1f96b5(0x192)](),this[_0x1f96b5(0x1c0)][_0x1f96b5(0x1b1)](_0x2155aa);}[_0x4b0940(0x188)](_0xdc0389){const _0x55dfd8=_0x4b0940;if(!this[_0x55dfd8(0x19c)][_0x55dfd8(0x1c4)](_0xdc0389))throw new _0x330aa8(_0x55dfd8(0x19a),this,{'uiName':_0xdc0389});const _0x409632=this[_0x55dfd8(0x1a0)][_0x55dfd8(0x1b7)][_0x55dfd8(0x1b5)](_0x48bd3d),_0x44e430=Array[_0x55dfd8(0x199)](_0x409632[_0x55dfd8(0x18f)])[0x0]||null;this[_0x55dfd8(0x1c6)](),this[_0x55dfd8(0x198)](_0xdc0389);const _0x3871b4=this[_0x55dfd8(0x19c)][_0x55dfd8(0x1b5)](_0xdc0389);_0x3871b4[_0x55dfd8(0x193)](_0x44e430),_0x3871b4[_0x55dfd8(0x1ba)]&&_0x44e430&&_0x3871b4[_0x55dfd8(0x1ba)]([_0x44e430]);}[_0x4b0940(0x1c6)](){const _0x58d27e=_0x4b0940;for(const _0x1c9cc1 of this[_0x58d27e(0x18e)])this[_0x58d27e(0x1a8)](_0x1c9cc1);}[_0x4b0940(0x1aa)](_0x275e60,_0x4ad1aa){const _0x839dc6=_0x4b0940;if(this[_0x839dc6(0x19c)][_0x839dc6(0x1c4)](_0x275e60))throw new _0x330aa8(_0x839dc6(0x1b4));if(_0x839dc6(0x197)!=typeof _0x4ad1aa[_0x839dc6(0x19d)]||_0x839dc6(0x197)!=typeof _0x4ad1aa[_0x839dc6(0x18a)]||_0x839dc6(0x197)!=typeof _0x4ad1aa[_0x839dc6(0x193)])throw new _0x330aa8(_0x839dc6(0x1ad),null);this[_0x839dc6(0x19c)][_0x839dc6(0x1bf)](_0x275e60,_0x4ad1aa);}[_0x4b0940(0x1b3)](){const _0x368ec9=_0x4b0940,_0xbf14b3=this[_0x368ec9(0x1a0)][_0x368ec9(0x1b7)][_0x368ec9(0x1b5)](_0x48bd3d)[_0x368ec9(0x1c1)],_0x26e48a=new Map(),_0xce5b5f=Array[_0x368ec9(0x199)](this[_0x368ec9(0x18e)]);for(const _0x37c8f7 of this[_0x368ec9(0x18e)]){const _0x45da87=this[_0x368ec9(0x1c0)][_0x368ec9(0x1b5)](_0x37c8f7)[_0x368ec9(0x1c1)];for(const _0x19704e of _0x45da87)_0x26e48a[_0x368ec9(0x1bf)](_0x19704e,_0x37c8f7);}for(const _0x534cb1 of _0xbf14b3){const _0x4536c2=_0x26e48a[_0x368ec9(0x1b5)](_0x534cb1);this[_0x368ec9(0x187)](_0x534cb1);const _0x518c64=_0xce5b5f[_0x368ec9(0x189)](_0x2f3604=>this[_0x368ec9(0x1c0)][_0x368ec9(0x1b5)](_0x2f3604)[_0x368ec9(0x1a1)](_0x534cb1));_0x4536c2!==_0x518c64&&(_0x4536c2&&this[_0x368ec9(0x1c0)][_0x368ec9(0x1b5)](_0x4536c2)[_0x368ec9(0x1c1)][_0x368ec9(0x18b)](_0x534cb1),_0x518c64&&this[_0x368ec9(0x1c0)][_0x368ec9(0x1b5)](_0x518c64)[_0x368ec9(0x1c1)][_0x368ec9(0x1b2)](_0x534cb1));}}[_0x4b0940(0x192)](){const _0x98ae72=_0x4b0940;this[_0x98ae72(0x1c6)](),super[_0x98ae72(0x192)]();}[_0x4b0940(0x191)](){return!0x0;}[_0x4b0940(0x187)](_0x3a23d5){const _0x26ea1c=_0x4b0940,_0x17669f=[];for(const _0x2583f5 of this[_0x26ea1c(0x18e)]){(0x0,this[_0x26ea1c(0x1c0)][_0x26ea1c(0x1b5)](_0x2583f5)[_0x26ea1c(0x1a1)])(_0x3a23d5)&&_0x17669f[_0x26ea1c(0x1a5)](_0x2583f5);}if(_0x17669f[_0x26ea1c(0x195)]>0x1)throw new _0x330aa8(_0x26ea1c(0x1bd),null,{'matchedUIs':_0x17669f,'annotationType':_0x3a23d5[_0x26ea1c(0x19f)]});}}function _0x4885(){const _0x9d1fd6=['function','activate','from','annotationsuis-missing-ui','1759869yyAaPm','_uis','attach','_removeActiveAnnotation','type','context','filter','AnnotationsUIs','8UkpOpP','_addActiveAnnotation','push','_visibleAnnotations','162590rFpxUB','deactivate','requires','register','_activateAnnotation','4824295doEQCC','annotationsuis-register-invalid-interface','listenTo','552072SbFBOr','stopListening','delete','add','refilterAnnotations','annotationsuis-register-already-registered','get','pluginName','plugins','6NKvGfp','75hdSwxA','_setSelectedAnnotations','isActive','hasActive','annotationsuis-annotation-mismatch','isOfficialPlugin','set','uisData','collection','init','27332cjDSHP','has','change:activeAnnotation','deactivateAll','116905ciydjK','5306196DeFIDH','_assertAnnotationDoesNotBelongToMultipleUIs','switchTo','find','detach','remove','2CBTAii','isPremiumPlugin','activeUIs','activeAnnotations','size','defaultFilter','destroy','setActiveAnnotation','_deactivateAllAnnotations','length','66XoUDsU'];_0x4885=function(){return _0x9d1fd6;};return _0x4885();}