UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 7.25 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ function _0x4453(){const _0x34f7bf=['get','327765SjgESY','10VKFjoI','82648zDdUKn','fire','change:isFocused','annotationcollection-duplicated-item','blur','11299827YzYKMY','updateTargetRect','clear','getByView','isFocused','stopListening','set','view','destroy','_focusTracker','_viewToAnnotation','21033480emalWu','891EvKnam','has','getByInnerView','top','length','refreshPositioning','from','focusTracker','5962506lxKCJu','add','5EtDAqT','targetRect','delete','annotationcollection-not-existing-item','431809vieomO','innerView','_sort','sort','2647928LaYswe','listenTo','focus','_innerViewToAnnotation','getIndex','_getOrderInContent','focusableElements','remove','left'];_0x4453=function(){return _0x34f7bf;};return _0x4453();}const _0x817ae0=_0x50db;(function(_0x7704fb,_0x442165){const _0x4c1b86=_0x50db,_0x431ee2=_0x7704fb();while(!![]){try{const _0x1129c0=parseInt(_0x4c1b86(0x82))/0x1+-parseInt(_0x4c1b86(0x91))/0x2*(-parseInt(_0x4c1b86(0x90))/0x3)+parseInt(_0x4c1b86(0x86))/0x4*(-parseInt(_0x4c1b86(0x7e))/0x5)+-parseInt(_0x4c1b86(0x7c))/0x6+-parseInt(_0x4c1b86(0x68))/0x7+-parseInt(_0x4c1b86(0x92))/0x8*(-parseInt(_0x4c1b86(0x74))/0x9)+parseInt(_0x4c1b86(0x73))/0xa;if(_0x1129c0===_0x442165)break;else _0x431ee2['push'](_0x431ee2['shift']());}catch(_0x229753){_0x431ee2['push'](_0x431ee2['shift']());}}}(_0x4453,0xcba9f));import{CKEditorError as _0x16b832,Collection as _0x1600db,FocusTracker as _0xdc90f3}from'ckeditor5/src/utils.js';function _0x50db(_0x502a77,_0x26f579){const _0x44531c=_0x4453();return _0x50db=function(_0x50db51,_0x55e110){_0x50db51=_0x50db51-0x65;let _0x529855=_0x44531c[_0x50db51];return _0x529855;},_0x50db(_0x502a77,_0x26f579);}export class AnnotationCollection extends _0x1600db{[_0x817ae0(0x89)];[_0x817ae0(0x72)];[_0x817ae0(0x71)];constructor(_0xb5589c=[]){const _0x39e385=_0x817ae0;super(),this[_0x39e385(0x89)]=new Map(),this[_0x39e385(0x72)]=new Map(),this[_0x39e385(0x71)]=new _0xdc90f3(),this[_0x39e385(0x71)]['on'](_0x39e385(0x65),(_0x55d0ef,_0x42fa32,_0x5cf061)=>{const _0x5e232c=_0x39e385;_0x5cf061||this[_0x5e232c(0x93)](_0x5e232c(0x67));});for(const _0x3b9f1c of _0xb5589c)this[_0x39e385(0x7d)](_0x3b9f1c);}get[_0x817ae0(0x6c)](){const _0x4ab424=_0x817ae0;return this[_0x4ab424(0x71)][_0x4ab424(0x6c)];}[_0x817ae0(0x7d)](_0x5c80d6){const _0x5aa77e=_0x817ae0;if(this[_0x5aa77e(0x75)](_0x5c80d6))throw new _0x16b832(_0x5aa77e(0x66),null);this[_0x5aa77e(0x89)][_0x5aa77e(0x6e)](_0x5c80d6[_0x5aa77e(0x83)],_0x5c80d6),this[_0x5aa77e(0x72)][_0x5aa77e(0x6e)](_0x5c80d6[_0x5aa77e(0x6f)],_0x5c80d6);for(const _0x47da63 of _0x5c80d6[_0x5aa77e(0x8c)])this[_0x5aa77e(0x71)][_0x5aa77e(0x7d)](_0x47da63);this[_0x5aa77e(0x87)](_0x5c80d6[_0x5aa77e(0x8c)],_0x5aa77e(0x7d),(_0x539017,_0x3203f0)=>{const _0x493275=_0x5aa77e;this[_0x493275(0x71)][_0x493275(0x7d)](_0x3203f0);}),this[_0x5aa77e(0x87)](_0x5c80d6[_0x5aa77e(0x8c)],_0x5aa77e(0x8d),(_0x213c32,_0x9c4ef2)=>{const _0x36cca4=_0x5aa77e;this[_0x36cca4(0x71)][_0x36cca4(0x8d)](_0x9c4ef2);}),this[_0x5aa77e(0x87)](_0x5c80d6[_0x5aa77e(0x6f)][_0x5aa77e(0x7b)],_0x5aa77e(0x65),(_0x22037d,_0x424f2f,_0x3ea973)=>{const _0x1a4510=_0x5aa77e;_0x3ea973&&this[_0x1a4510(0x93)](_0x1a4510(0x88),_0x5c80d6);}),_0x5c80d6[_0x5aa77e(0x69)]();const _0x17739b=this[_0x5aa77e(0x8b)](_0x5c80d6[_0x5aa77e(0x6f)][_0x5aa77e(0x7f)]);return super[_0x5aa77e(0x7d)](_0x5c80d6,_0x17739b);}[_0x817ae0(0x8d)](_0x1a64e9){const _0x4d7378=_0x817ae0;if(!this[_0x4d7378(0x75)](_0x1a64e9))throw new _0x16b832(_0x4d7378(0x81),null);this[_0x4d7378(0x6d)](_0x1a64e9[_0x4d7378(0x6f)][_0x4d7378(0x7b)]),this[_0x4d7378(0x6d)](_0x1a64e9[_0x4d7378(0x8c)]);for(const _0x42ee43 of _0x1a64e9[_0x4d7378(0x8c)])this[_0x4d7378(0x71)][_0x4d7378(0x8d)](_0x42ee43);return this[_0x4d7378(0x72)][_0x4d7378(0x80)](_0x1a64e9[_0x4d7378(0x6f)]),this[_0x4d7378(0x89)][_0x4d7378(0x80)](_0x1a64e9[_0x4d7378(0x83)]),super[_0x4d7378(0x8d)](_0x1a64e9);}[_0x817ae0(0x76)](_0x5bc08d){const _0x3973d1=_0x817ae0;return this[_0x3973d1(0x89)][_0x3973d1(0x8f)](_0x5bc08d);}[_0x817ae0(0x6b)](_0x1a7390){const _0x1fb0af=_0x817ae0;return this[_0x1fb0af(0x72)][_0x1fb0af(0x8f)](_0x1a7390);}[_0x817ae0(0x70)](){const _0x262820=_0x817ae0;super[_0x262820(0x6a)](),this[_0x262820(0x6d)](),this[_0x262820(0x89)][_0x262820(0x6a)](),this[_0x262820(0x72)][_0x262820(0x6a)](),this[_0x262820(0x71)][_0x262820(0x70)]();}[_0x817ae0(0x79)](){const _0x2aed39=_0x817ae0;for(const _0x464678 of this)_0x464678[_0x2aed39(0x69)]();this[_0x2aed39(0x84)]();}[_0x817ae0(0x84)](){const _0x5d9f12=_0x817ae0,_0x15b888=Array[_0x5d9f12(0x7a)](this)[_0x5d9f12(0x85)]((_0x26edb0,_0x291417)=>w(_0x26edb0[_0x5d9f12(0x6f)][_0x5d9f12(0x7f)],_0x291417[_0x5d9f12(0x6f)][_0x5d9f12(0x7f)]));for(let _0x4ed89a=_0x15b888[_0x5d9f12(0x78)]-0x1;_0x4ed89a>0x0;_0x4ed89a--){const _0x5aa6e9=_0x15b888[_0x4ed89a];_0x4ed89a!==this[_0x5d9f12(0x8a)](_0x5aa6e9)&&(this[_0x5d9f12(0x8d)](_0x5aa6e9),this[_0x5d9f12(0x7d)](_0x5aa6e9));}}[_0x817ae0(0x8b)](_0x27e39d){const _0x293b91=_0x817ae0;let _0x388709=0x0;if(!_0x27e39d)return this[_0x293b91(0x78)];for(const _0x134353 of this){const _0x468f82=_0x134353[_0x293b91(0x6f)][_0x293b91(0x7f)];if(_0x468f82){if(w(_0x27e39d,_0x468f82)<0x0)return _0x388709;_0x388709++;}}return _0x388709;}}export function bindAnnotationCollections({source:_0x3dd4c5,target:_0x4b6822,filter:_0x136f1d}){const _0x370247=_0x817ae0;for(const _0x2bb1fe of _0x3dd4c5)_0x136f1d(_0x2bb1fe)&&_0x4b6822[_0x370247(0x7d)](_0x2bb1fe);_0x4b6822[_0x370247(0x87)](_0x3dd4c5,_0x370247(0x7d),(_0x18f524,_0x1a41eb)=>{const _0x16725c=_0x370247;_0x136f1d(_0x1a41eb)&&_0x4b6822[_0x16725c(0x7d)](_0x1a41eb);}),_0x4b6822[_0x370247(0x87)](_0x3dd4c5,_0x370247(0x8d),(_0x403882,_0xaa80b1)=>{const _0x563fcf=_0x370247;_0x4b6822[_0x563fcf(0x75)](_0xaa80b1)&&_0x4b6822[_0x563fcf(0x8d)](_0xaa80b1);});}function w(_0x27751,_0x213cee){const _0x526cbf=_0x817ae0;if(null===_0x27751&&null===_0x213cee)return 0x0;if(null===_0x27751)return-0x1;if(null===_0x213cee)return 0x1;const _0x53b6a3=_0x27751[_0x526cbf(0x77)]-_0x213cee[_0x526cbf(0x77)];return 0x0==_0x53b6a3?_0x27751[_0x526cbf(0x8e)]-_0x213cee[_0x526cbf(0x8e)]:_0x53b6a3;}