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.84 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 _0x20fc(_0x2f8ffb,_0x530279){const _0x5f1857=_0x5f18();return _0x20fc=function(_0x20fceb,_0x8855b5){_0x20fceb=_0x20fceb-0x1e5;let _0x57c425=_0x5f1857[_0x20fceb];return _0x57c425;},_0x20fc(_0x2f8ffb,_0x530279);}(function(_0x48f9b9,_0x43fc8d){const _0x57bc9c=_0x20fc,_0x1c53f6=_0x48f9b9();while(!![]){try{const _0x5f06da=parseInt(_0x57bc9c(0x1f9))/0x1+parseInt(_0x57bc9c(0x1fc))/0x2*(parseInt(_0x57bc9c(0x1f3))/0x3)+parseInt(_0x57bc9c(0x1ef))/0x4*(-parseInt(_0x57bc9c(0x1fe))/0x5)+-parseInt(_0x57bc9c(0x1fa))/0x6+-parseInt(_0x57bc9c(0x1e6))/0x7+parseInt(_0x57bc9c(0x1e5))/0x8+parseInt(_0x57bc9c(0x1eb))/0x9*(parseInt(_0x57bc9c(0x1fb))/0xa);if(_0x5f06da===_0x43fc8d)break;else _0x1c53f6['push'](_0x1c53f6['shift']());}catch(_0x24658e){_0x1c53f6['push'](_0x1c53f6['shift']());}}}(_0x5f18,0x74301));function _0x5f18(){const _0x8bda1e=['domConverter','length','sort','view','name','175725aeYoJT','2810682bcrMWR','3971570FBXmxA','136358TZGQxx','mapViewToDom','261805TXEgKu','6592552yyPYpE','5955971kAPOEm','from','push','mapper','values','18hwibYn','item','getClientRects','markerNameToElements','52gXPyrT','domElement','map','filter','30JStSNt'];_0x5f18=function(){return _0x8bda1e;};return _0x5f18();}import{first as _0x1db4a8}from'ckeditor5/src/utils.js';export default function A(_0xc5dbe3,_0x422720){const _0xeff8e5=_0x20fc,_0x42bdba=_0xc5dbe3[_0xeff8e5(0x1e9)][_0xeff8e5(0x1ee)](_0x422720[_0xeff8e5(0x1f8)]);if(!_0x42bdba)return null;const _0x2e9e2e=_0x1db4a8(_0x42bdba[_0xeff8e5(0x1ea)]());return _0xc5dbe3[_0xeff8e5(0x1f7)][_0xeff8e5(0x1f4)][_0xeff8e5(0x1fd)](_0x2e9e2e)||null;}export function getAllMarkersDomElementsSorted(_0x3b667e,_0x30b72e){const _0x227ec6=_0x20fc;if(0x0===_0x30b72e[_0x227ec6(0x1f5)])return null;const _0x34125b=[],_0x1e59e7=_0x3b667e[_0x227ec6(0x1f7)][_0x227ec6(0x1f4)];for(const _0x2f3524 of _0x30b72e){const _0x2ad9a1=_0x3b667e[_0x227ec6(0x1e9)][_0x227ec6(0x1ee)](_0x2f3524[_0x227ec6(0x1f8)]);if(!_0x2ad9a1)continue;const _0x1f49cb=Array[_0x227ec6(0x1e7)](_0x2ad9a1)[_0x227ec6(0x1f1)](_0x3af7ca=>_0x1e59e7[_0x227ec6(0x1fd)](_0x3af7ca))[_0x227ec6(0x1f2)](_0xbaee86=>!!_0xbaee86);_0x34125b[_0x227ec6(0x1e8)](..._0x1f49cb);}if(0x0===_0x34125b[_0x227ec6(0x1f5)])return null;const _0x33aab2=[];for(const _0x2ad477 of _0x34125b){const _0x144346=_0x2ad477[_0x227ec6(0x1ed)]()[_0x227ec6(0x1ec)](0x0);_0x144346&&_0x33aab2[_0x227ec6(0x1e8)]({'x':_0x144346['x'],'y':_0x144346['y'],'domElement':_0x2ad477});}return 0x0===_0x33aab2[_0x227ec6(0x1f5)]?null:(_0x33aab2[_0x227ec6(0x1f6)]((_0x1b0eec,_0x2d46e5)=>_0x1b0eec['y']-_0x2d46e5['y']||_0x1b0eec['x']-_0x2d46e5['x']),_0x33aab2[_0x227ec6(0x1f1)](_0xaf0a8e=>_0xaf0a8e[_0x227ec6(0x1f0)]));}