UNPKG

@ckeditor/ckeditor5-operations-compressor

Version:

CKEditor 5 operations compressor for real-time collaboration.

23 lines 5.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 _0x475a(_0x20ac6c,_0x158298){const _0x323520=_0x3235();return _0x475a=function(_0x475a1d,_0x38f275){_0x475a1d=_0x475a1d-0xd3;let _0x1fbed1=_0x323520[_0x475a1d];return _0x1fbed1;},_0x475a(_0x20ac6c,_0x158298);}const _0x2e8fd5=_0x475a;(function(_0x33b156,_0x1bda75){const _0x29b37a=_0x475a,_0x3abfb4=_0x33b156();while(!![]){try{const _0x188add=parseInt(_0x29b37a(0xd7))/0x1+-parseInt(_0x29b37a(0xd5))/0x2*(-parseInt(_0x29b37a(0xd3))/0x3)+-parseInt(_0x29b37a(0xf5))/0x4+-parseInt(_0x29b37a(0xe7))/0x5+parseInt(_0x29b37a(0xe3))/0x6*(-parseInt(_0x29b37a(0xe5))/0x7)+parseInt(_0x29b37a(0xf8))/0x8*(-parseInt(_0x29b37a(0xda))/0x9)+parseInt(_0x29b37a(0xe2))/0xa*(parseInt(_0x29b37a(0xe1))/0xb);if(_0x188add===_0x1bda75)break;else _0x3abfb4['push'](_0x3abfb4['shift']());}catch(_0x3c1fe9){_0x3abfb4['push'](_0x3abfb4['shift']());}}}(_0x3235,0x20462));import{ActionCompressor as _0x4361c9}from'./actioncompressor.js';import{arePositionsEqual as _0x558f70,getPositionShiftedBy as _0x4a2476}from'../utils.js';import{cloneDeep as _0x518a5c}from'es-toolkit/compat';export class TypingActionCompressor extends _0x4361c9{[_0x2e8fd5(0xea)](_0xc08fd4,_0x35edf2){const _0x5c03b1=_0x2e8fd5;return _0x35edf2[_0x5c03b1(0xdd)][0x0][_0x5c03b1(0xe4)]+=_0xc08fd4[_0x5c03b1(0xdd)][0x0][_0x5c03b1(0xe4)],_0x35edf2;}[_0x2e8fd5(0xf6)](_0xd4835e){const _0x37d546=_0x2e8fd5,_0x35e2bb=_0x518a5c(_0xd4835e),_0x488c8f=_0x35e2bb[_0x37d546(0xdd)][0x0],_0x3f8a8f=_0xd4835e[_0x37d546(0xdd)][0x0],_0x355776=_0x3f8a8f[_0x37d546(0xe4)][Symbol[_0x37d546(0xec)]]()[_0x37d546(0xe8)]()[_0x37d546(0xf2)],_0x3710e6=_0x355776[_0x37d546(0xd4)];return _0x488c8f[_0x37d546(0xe4)]=_0x355776,_0x3f8a8f[_0x37d546(0xe4)]=_0x3f8a8f[_0x37d546(0xe4)][_0x37d546(0xe6)](_0x3710e6),_0xd4835e[_0x37d546(0xf4)]=_0x4a2476(_0xd4835e[_0x37d546(0xf4)],_0x3710e6),_0x35e2bb;}[_0x2e8fd5(0xf1)](_0x1be3c5,_0x4edcaa){const _0x2770d9=_0x2e8fd5;if(this[_0x2770d9(0xed)](_0x1be3c5)&&this[_0x2770d9(0xed)](_0x4edcaa)){const _0xc11dae=_0x1be3c5[_0x2770d9(0xdd)][0x0][_0x2770d9(0xe4)][_0x2770d9(0xd4)],_0x38a9f3=_0x558f70(_0x4a2476(_0x1be3c5[_0x2770d9(0xf4)],_0xc11dae),_0x4edcaa[_0x2770d9(0xf4)]),_0x86dc85=_0x1be3c5[_0x2770d9(0xdd)][0x0],_0x559c96=_0x4edcaa[_0x2770d9(0xdd)][0x0];return _0x38a9f3&&this[_0x2770d9(0xd6)](_0x86dc85,_0x559c96);}return!0x1;}[_0x2e8fd5(0xd9)](_0x502333){const _0x15d382=_0x2e8fd5,_0x5ce0e3={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x15d382(0xee)][_0x15d382(0xdf)](_0x15d382(0xdc))[_0x15d382(0xdb)](_0x5ce0e3,[_0x502333]),_0x5ce0e3[_0x15d382(0xef)][0x0];}[_0x2e8fd5(0xde)](_0x4c4f85){const _0x1120ae=_0x2e8fd5,_0xeb7365=[];return this[_0x1120ae(0xee)][_0x1120ae(0xdf)](_0x1120ae(0xdc))[_0x1120ae(0xe9)](_0xeb7365,_0x4c4f85),_0xeb7365[0x0];}[_0x2e8fd5(0xed)](_0xc73d54){const _0x2c63ab=_0x2e8fd5;return _0x2c63ab(0xdc)==_0xc73d54[_0x2c63ab(0xf3)]&&0x1==_0xc73d54[_0x2c63ab(0xdd)][_0x2c63ab(0xd4)]&&_0xc73d54[_0x2c63ab(0xdd)][0x0][_0x2c63ab(0xe4)]&&!_0xc73d54[_0x2c63ab(0xd8)]&&0x1==Array[_0x2c63ab(0xe0)](_0xc73d54[_0x2c63ab(0xdd)][0x0][_0x2c63ab(0xe4)])[_0x2c63ab(0xd4)];}[_0x2e8fd5(0xd6)](_0x4cea55,_0x24b310){const _0x3eb4ad=_0x2e8fd5,_0x58e204=Object[_0x3eb4ad(0xf7)](_0x4cea55[_0x3eb4ad(0xf0)]||{}),_0x5cc87b=Object[_0x3eb4ad(0xf7)](_0x24b310[_0x3eb4ad(0xf0)]||{});return _0x58e204[_0x3eb4ad(0xd4)]===_0x5cc87b[_0x3eb4ad(0xd4)]&&_0x58e204[_0x3eb4ad(0xeb)](_0x98a6be=>_0x24b310[_0x3eb4ad(0xf0)][_0x98a6be]&&_0x24b310[_0x3eb4ad(0xf0)][_0x98a6be]===_0x4cea55[_0x3eb4ad(0xf0)][_0x98a6be]);}}function _0x3235(){const _0x4250fb=['iterator','_checkOperation','_context','buffers','attributes','_compareOperations','value','__className','position','159656yPiQus','_splitCurrent','keys','436784MixqNK','6wcFMix','length','244250uHnSbC','_compareAttributes','56787MgWCCS','wasUndone','_compressSingleOperation','18AgNgdi','compress','InsertOperation','nodes','_decompressSingleOperation','_getCompressorByName','from','77EEAhwF','321750eEUHxI','6jnRXwd','data','1573194LwaHJi','substr','101080GXGEZd','next','decompress','_combineNext','every'];_0x3235=function(){return _0x4250fb;};return _0x3235();}