@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 7.32 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x4e9e(_0x220ba1,_0x1b5452){const _0x597aa2=_0x597a();return _0x4e9e=function(_0x4e9eae,_0x42346a){_0x4e9eae=_0x4e9eae-0x114;let _0x1bc026=_0x597aa2[_0x4e9eae];return _0x1bc026;},_0x4e9e(_0x220ba1,_0x1b5452);}const _0x3c8d57=_0x4e9e;(function(_0x5ee397,_0xeab6ec){const _0x4c4f3c=_0x4e9e,_0x3a78e5=_0x5ee397();while(!![]){try{const _0x2aca98=parseInt(_0x4c4f3c(0x13e))/0x1+parseInt(_0x4c4f3c(0x123))/0x2+parseInt(_0x4c4f3c(0x11f))/0x3+parseInt(_0x4c4f3c(0x135))/0x4+parseInt(_0x4c4f3c(0x131))/0x5*(-parseInt(_0x4c4f3c(0x115))/0x6)+-parseInt(_0x4c4f3c(0x11c))/0x7+parseInt(_0x4c4f3c(0x12d))/0x8*(-parseInt(_0x4c4f3c(0x126))/0x9);if(_0x2aca98===_0xeab6ec)break;else _0x3a78e5['push'](_0x3a78e5['shift']());}catch(_0xbe5f52){_0x3a78e5['push'](_0x3a78e5['shift']());}}}(_0x597a,0x39a61));import{CKEditorError as _0x4d5e00,Collection as _0x46fdd1,FocusTracker as _0x5cf4ce}from'ckeditor5/src/utils.js';function _0x597a(){const _0x1dc9f5=['remove','sort','view','focusableElements','updateTargetRect','length','refreshPositioning','221148BfcMUJ','delete','set','listenTo','get','1718862JVtRnk','getByView','focus','add','annotationcollection-duplicated-item','top','left','1238132OEuWee','clear','_getOrderInContent','1222146tGeDBL','_viewToAnnotation','from','_innerViewToAnnotation','1930GmIRaH','focusTracker','annotationcollection-not-existing-item','9MQnsgk','stopListening','getIndex','has','fire','change:isFocused','isFocused','2186264FHoZvw','getByInnerView','innerView','targetRect','5PbWgOi','destroy','_focusTracker','blur','1373080ILKzrm','_sort'];_0x597a=function(){return _0x1dc9f5;};return _0x597a();}export class AnnotationCollection extends _0x46fdd1{[_0x3c8d57(0x122)];[_0x3c8d57(0x120)];[_0x3c8d57(0x133)];constructor(_0x369676=[]){const _0x1a0177=_0x3c8d57;super(),this[_0x1a0177(0x122)]=new Map(),this[_0x1a0177(0x120)]=new Map(),this[_0x1a0177(0x133)]=new _0x5cf4ce(),this[_0x1a0177(0x133)]['on'](_0x1a0177(0x12b),(_0x7a9098,_0x11fe21,_0x13b02c)=>{const _0x46205d=_0x1a0177;_0x13b02c||this[_0x46205d(0x12a)](_0x46205d(0x134));});for(const _0x138c75 of _0x369676)this[_0x1a0177(0x118)](_0x138c75);}get[_0x3c8d57(0x12c)](){const _0x175ff6=_0x3c8d57;return this[_0x175ff6(0x133)][_0x175ff6(0x12c)];}[_0x3c8d57(0x118)](_0x542862){const _0x5c5ba9=_0x3c8d57;if(this[_0x5c5ba9(0x129)](_0x542862))throw new _0x4d5e00(_0x5c5ba9(0x119),null);this[_0x5c5ba9(0x122)][_0x5c5ba9(0x140)](_0x542862[_0x5c5ba9(0x12f)],_0x542862),this[_0x5c5ba9(0x120)][_0x5c5ba9(0x140)](_0x542862[_0x5c5ba9(0x139)],_0x542862);for(const _0x2f2fdf of _0x542862[_0x5c5ba9(0x13a)])this[_0x5c5ba9(0x133)][_0x5c5ba9(0x118)](_0x2f2fdf);this[_0x5c5ba9(0x141)](_0x542862[_0x5c5ba9(0x13a)],_0x5c5ba9(0x118),(_0x1a71bf,_0x281d67)=>{const _0x3c8af7=_0x5c5ba9;this[_0x3c8af7(0x133)][_0x3c8af7(0x118)](_0x281d67);}),this[_0x5c5ba9(0x141)](_0x542862[_0x5c5ba9(0x13a)],_0x5c5ba9(0x137),(_0x1bf791,_0x3ee957)=>{const _0x16cfab=_0x5c5ba9;this[_0x16cfab(0x133)][_0x16cfab(0x137)](_0x3ee957);}),this[_0x5c5ba9(0x141)](_0x542862[_0x5c5ba9(0x139)][_0x5c5ba9(0x124)],_0x5c5ba9(0x12b),(_0x2f06ad,_0x2e86ce,_0x18d720)=>{const _0x4d1238=_0x5c5ba9;_0x18d720&&this[_0x4d1238(0x12a)](_0x4d1238(0x117),_0x542862);}),_0x542862[_0x5c5ba9(0x13b)]();const _0x33cc80=this[_0x5c5ba9(0x11e)](_0x542862[_0x5c5ba9(0x139)][_0x5c5ba9(0x130)]);return super[_0x5c5ba9(0x118)](_0x542862,_0x33cc80);}[_0x3c8d57(0x137)](_0x7adc81){const _0x483f76=_0x3c8d57;if(!this[_0x483f76(0x129)](_0x7adc81))throw new _0x4d5e00(_0x483f76(0x125),null);this[_0x483f76(0x127)](_0x7adc81[_0x483f76(0x139)][_0x483f76(0x124)]),this[_0x483f76(0x127)](_0x7adc81[_0x483f76(0x13a)]);for(const _0x4f0469 of _0x7adc81[_0x483f76(0x13a)])this[_0x483f76(0x133)][_0x483f76(0x137)](_0x4f0469);return this[_0x483f76(0x120)][_0x483f76(0x13f)](_0x7adc81[_0x483f76(0x139)]),this[_0x483f76(0x122)][_0x483f76(0x13f)](_0x7adc81[_0x483f76(0x12f)]),super[_0x483f76(0x137)](_0x7adc81);}[_0x3c8d57(0x12e)](_0x24abe8){const _0x580082=_0x3c8d57;return this[_0x580082(0x122)][_0x580082(0x114)](_0x24abe8);}[_0x3c8d57(0x116)](_0x35c26e){const _0x588042=_0x3c8d57;return this[_0x588042(0x120)][_0x588042(0x114)](_0x35c26e);}[_0x3c8d57(0x132)](){const _0x3c76da=_0x3c8d57;super[_0x3c76da(0x11d)](),this[_0x3c76da(0x127)](),this[_0x3c76da(0x122)][_0x3c76da(0x11d)](),this[_0x3c76da(0x120)][_0x3c76da(0x11d)](),this[_0x3c76da(0x133)][_0x3c76da(0x132)]();}[_0x3c8d57(0x13d)](){const _0x4baad3=_0x3c8d57;for(const _0x426fff of this)_0x426fff[_0x4baad3(0x13b)]();this[_0x4baad3(0x136)]();}[_0x3c8d57(0x136)](){const _0x2e86c7=_0x3c8d57,_0x57f8f5=Array[_0x2e86c7(0x121)](this)[_0x2e86c7(0x138)]((_0x43e11f,_0x52dbd6)=>w(_0x43e11f[_0x2e86c7(0x139)][_0x2e86c7(0x130)],_0x52dbd6[_0x2e86c7(0x139)][_0x2e86c7(0x130)]));for(let _0x11c263=_0x57f8f5[_0x2e86c7(0x13c)]-0x1;_0x11c263>0x0;_0x11c263--){const _0x83d358=_0x57f8f5[_0x11c263];_0x11c263!==this[_0x2e86c7(0x128)](_0x83d358)&&(this[_0x2e86c7(0x137)](_0x83d358),this[_0x2e86c7(0x118)](_0x83d358));}}[_0x3c8d57(0x11e)](_0x1088ef){const _0x50217d=_0x3c8d57;let _0x574486=0x0;if(!_0x1088ef)return this[_0x50217d(0x13c)];for(const _0x29a0a8 of this){const _0x2acde3=_0x29a0a8[_0x50217d(0x139)][_0x50217d(0x130)];if(_0x2acde3){if(w(_0x1088ef,_0x2acde3)<0x0)return _0x574486;_0x574486++;}}return _0x574486;}}export function bindAnnotationCollections({source:_0x40ea08,target:_0x4a935a,filter:_0x2ef8ab}){const _0xb07b5a=_0x3c8d57;for(const _0x30ffdf of _0x40ea08)_0x2ef8ab(_0x30ffdf)&&_0x4a935a[_0xb07b5a(0x118)](_0x30ffdf);_0x4a935a[_0xb07b5a(0x141)](_0x40ea08,_0xb07b5a(0x118),(_0xbea0af,_0x262a5c)=>{const _0x50850f=_0xb07b5a;_0x2ef8ab(_0x262a5c)&&_0x4a935a[_0x50850f(0x118)](_0x262a5c);}),_0x4a935a[_0xb07b5a(0x141)](_0x40ea08,_0xb07b5a(0x137),(_0x2a0cef,_0x555aa1)=>{const _0x1e1d74=_0xb07b5a;_0x4a935a[_0x1e1d74(0x129)](_0x555aa1)&&_0x4a935a[_0x1e1d74(0x137)](_0x555aa1);});}function w(_0x1786cd,_0x1b9af5){const _0x5ad11e=_0x3c8d57;if(null===_0x1786cd&&null===_0x1b9af5)return 0x0;if(null===_0x1786cd)return-0x1;if(null===_0x1b9af5)return 0x1;const _0x277380=_0x1786cd[_0x5ad11e(0x11a)]-_0x1b9af5[_0x5ad11e(0x11a)];return 0x0==_0x277380?_0x1786cd[_0x5ad11e(0x11b)]-_0x1b9af5[_0x5ad11e(0x11b)]:_0x277380;}