UNPKG

@ckeditor/ckeditor5-collaboration-core

Version:

Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich text editor.

23 lines 3.9 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ function _0x17bd(_0x193c63,_0x1169ff){const _0x515d61=_0x515d();return _0x17bd=function(_0x17bdfc,_0x1674ba){_0x17bdfc=_0x17bdfc-0x66;let _0x402632=_0x515d61[_0x17bdfc];return _0x402632;},_0x17bd(_0x193c63,_0x1169ff);}function _0x515d(){const _0x7d5f8d=['push','from','sort','29805444SbYVgY','377684Jvzaoj','76hHGOcZ','4fQGZhy','9puAcvk','178878nYkHHq','mapViewToDom','markerNameToElements','getClientRects','view','2702966fSnXsa','414524UVryix','values','filter','5mOaSND','10367984VrQpgW','1759254yghxHt','name','item','map','mapper','domConverter','domElement','10YPhTsu','length'];_0x515d=function(){return _0x7d5f8d;};return _0x515d();}(function(_0x1407cd,_0x1167dc){const _0x3032b8=_0x17bd,_0x2a7a23=_0x1407cd();while(!![]){try{const _0x2ad756=parseInt(_0x3032b8(0x7b))/0x1*(parseInt(_0x3032b8(0x7d))/0x2)+-parseInt(_0x3032b8(0x7f))/0x3*(-parseInt(_0x3032b8(0x7c))/0x4)+parseInt(_0x3032b8(0x6c))/0x5*(-parseInt(_0x3032b8(0x6e))/0x6)+parseInt(_0x3032b8(0x68))/0x7+-parseInt(_0x3032b8(0x6d))/0x8*(-parseInt(_0x3032b8(0x7e))/0x9)+parseInt(_0x3032b8(0x75))/0xa*(parseInt(_0x3032b8(0x69))/0xb)+-parseInt(_0x3032b8(0x7a))/0xc;if(_0x2ad756===_0x1167dc)break;else _0x2a7a23['push'](_0x2a7a23['shift']());}catch(_0x390901){_0x2a7a23['push'](_0x2a7a23['shift']());}}}(_0x515d,0xcae6e));import{first as _0x10dabe}from'ckeditor5/src/utils.js';export function getMarkerDomElement(_0x190be7,_0x530fdd){const _0x1ad5ed=_0x17bd,_0x16a670=_0x190be7[_0x1ad5ed(0x72)][_0x1ad5ed(0x81)](_0x530fdd[_0x1ad5ed(0x6f)]);if(!_0x16a670)return null;const _0x5af577=_0x10dabe(_0x16a670[_0x1ad5ed(0x6a)]());return _0x190be7[_0x1ad5ed(0x67)][_0x1ad5ed(0x73)][_0x1ad5ed(0x80)](_0x5af577)||null;}export function getAllMarkersDomElementsSorted(_0x3ebdf1,_0x141811){const _0x35bafe=_0x17bd;if(0x0===_0x141811[_0x35bafe(0x76)])return null;const _0xb6b115=[],_0x73ba94=_0x3ebdf1[_0x35bafe(0x67)][_0x35bafe(0x73)];for(const _0x22d48a of _0x141811){const _0x275745=_0x3ebdf1[_0x35bafe(0x72)][_0x35bafe(0x81)](_0x22d48a[_0x35bafe(0x6f)]);if(!_0x275745)continue;const _0x46c934=Array[_0x35bafe(0x78)](_0x275745)[_0x35bafe(0x71)](_0x441ee0=>_0x73ba94[_0x35bafe(0x80)](_0x441ee0))[_0x35bafe(0x6b)](_0x5e50fe=>!!_0x5e50fe);_0xb6b115[_0x35bafe(0x77)](..._0x46c934);}if(0x0===_0xb6b115[_0x35bafe(0x76)])return null;const _0x360855=[];for(const _0x2bd70e of _0xb6b115){const _0x30fa81=_0x2bd70e[_0x35bafe(0x66)]()[_0x35bafe(0x70)](0x0);_0x30fa81&&_0x360855[_0x35bafe(0x77)]({'x':_0x30fa81['x'],'y':_0x30fa81['y'],'domElement':_0x2bd70e});}return 0x0===_0x360855[_0x35bafe(0x76)]?null:(_0x360855[_0x35bafe(0x79)]((_0x5b4d05,_0x5569b3)=>_0x5b4d05['y']-_0x5569b3['y']||_0x5b4d05['x']-_0x5569b3['x']),_0x360855[_0x35bafe(0x71)](_0x533cfe=>_0x533cfe[_0x35bafe(0x74)]));}