@ckeditor/ckeditor5-operations-compressor 39.0.1 → 40.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/LICENSE.md +7 -7
  3. package/README.md +9 -9
  4. package/package.json +2 -6
  5. package/src/actioncompressor/actioncompressor.d.ts +60 -60
  6. package/src/actioncompressor/actioncompressor.js +1 -1
  7. package/src/actioncompressor/deletingactioncompressor.d.ts +28 -28
  8. package/src/actioncompressor/deletingactioncompressor.js +1 -1
  9. package/src/actioncompressor/forwarddeletingactioncompressor.d.ts +28 -28
  10. package/src/actioncompressor/forwarddeletingactioncompressor.js +1 -1
  11. package/src/actioncompressor/typingactioncompressor.d.ts +28 -28
  12. package/src/actioncompressor/typingactioncompressor.js +1 -1
  13. package/src/actioncompressor/userselectionactioncompressor.d.ts +16 -16
  14. package/src/actioncompressor/userselectionactioncompressor.js +1 -1
  15. package/src/compressor.d.ts +45 -45
  16. package/src/compressor.js +1 -1
  17. package/src/lib/compiledmessages.js +1 -1
  18. package/src/operationcompressor/annotationmarkeroperationcompressor.d.ts +22 -22
  19. package/src/operationcompressor/annotationmarkeroperationcompressor.js +1 -1
  20. package/src/operationcompressor/attributeoperationcompressor.d.ts +17 -17
  21. package/src/operationcompressor/attributeoperationcompressor.js +1 -1
  22. package/src/operationcompressor/insertoperationcompressor.d.ts +17 -17
  23. package/src/operationcompressor/insertoperationcompressor.js +1 -1
  24. package/src/operationcompressor/markeroperationcompressor.d.ts +13 -13
  25. package/src/operationcompressor/markeroperationcompressor.js +1 -1
  26. package/src/operationcompressor/nooperationcompressor.d.ts +20 -20
  27. package/src/operationcompressor/nooperationcompressor.js +1 -1
  28. package/src/operationcompressor/operationcompressor.d.ts +28 -28
  29. package/src/operationcompressor/operationcompressor.js +1 -1
  30. package/src/protobufdescriptions.d.ts +4 -4
  31. package/src/protobufdescriptions.js +1 -1
  32. package/src/protobuffactory.d.ts +5 -5
  33. package/src/protobuffactory.js +1 -1
  34. package/src/utils.d.ts +30 -30
  35. package/src/utils.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x54f4=['__className','buffers','_serializeOneOf','Boolean','_deserializeOneOf','types','newValue','oldValue','_protobufDescriptor','stringify','compress','Json','push','decompress','shift','_id','boolean'];(function(_0x50e55d,_0x54f4ce){const _0x1c6a47=function(_0x5a1d22){while(--_0x5a1d22){_0x50e55d['push'](_0x50e55d['shift']());}};_0x1c6a47(++_0x54f4ce);}(_0x54f4,0x1b8));const _0x1c6a=function(_0x50e55d,_0x54f4ce){_0x50e55d=_0x50e55d-0x0;let _0x1c6a47=_0x54f4[_0x50e55d];return _0x1c6a47;};import _0x4398f0 from'./operationcompressor';import{parsePositionBeforeCompression as _0x488ab8,parsePositionAfterCompression as _0x432072}from'../utils';export default class i extends _0x4398f0{[_0x1c6a('0xc')](_0xea28e2,_0x17ebbe){const _0x5b9c7f=_0x17ebbe[_0x1c6a('0x10')]();return this['_serializeOneOf'](_0x1c6a('0x9'),_0x5b9c7f),this['_serializeOneOf'](_0x1c6a('0x8'),_0x5b9c7f),_0x488ab8(_0x5b9c7f),_0xea28e2[_0x1c6a('0x3')][_0x1c6a('0xe')](this[_0x1c6a('0xa')]['compress'](_0x5b9c7f)),_0xea28e2[_0x1c6a('0x7')]['push'](this[_0x1c6a('0x0')]),!0x0;}[_0x1c6a('0xf')](_0x424f02,_0x28d5f5){const {types:_0xc67491,buffers:_0x3c2984}=_0x28d5f5,_0x590dd8=this[_0x1c6a('0xa')][_0x1c6a('0xf')](_0x3c2984[_0x1c6a('0x10')]());_0xc67491[_0x1c6a('0x10')](),this[_0x1c6a('0x6')](_0x1c6a('0x9'),_0x590dd8),this[_0x1c6a('0x6')]('newValue',_0x590dd8),_0x432072(_0x590dd8),_0x590dd8[_0x1c6a('0x2')]=this['_operationName'],_0x424f02['push'](_0x590dd8);}[_0x1c6a('0x4')](_0x620ab5,_0x384905){const _0x3bb970=_0x384905[_0x620ab5];_0x1c6a('0x1')==typeof _0x3bb970?_0x384905[_0x620ab5+'Boolean']=_0x3bb970:_0x384905[_0x620ab5+_0x1c6a('0xd')]=JSON[_0x1c6a('0xb')](_0x3bb970);}['_deserializeOneOf'](_0x4c01a7,_0x4ee47a){const _0x5ed003=_0x4c01a7+_0x1c6a('0xd');_0x4ee47a[_0x5ed003]?(_0x4ee47a[_0x4c01a7]=JSON['parse'](_0x4ee47a[_0x5ed003]),delete _0x4ee47a[_0x5ed003]):(_0x4ee47a[_0x4c01a7]=_0x4ee47a[_0x4c01a7+_0x1c6a('0x5')],delete _0x4ee47a[_0x4c01a7+'Boolean']);}}
23
+ const _0x9bf7=['Json','_serializeOneOf','push','compress','_deserializeOneOf','decompress','shift','oldValue','Boolean','_protobufDescriptor','boolean'];(function(_0x56c26e,_0x9bf7d5){const _0x45f7b3=function(_0x372af4){while(--_0x372af4){_0x56c26e['push'](_0x56c26e['shift']());}};_0x45f7b3(++_0x9bf7d5);}(_0x9bf7,0x1d0));const _0x45f7=function(_0x56c26e,_0x9bf7d5){_0x56c26e=_0x56c26e-0x0;let _0x45f7b3=_0x9bf7[_0x56c26e];return _0x45f7b3;};import _0x3c42c3 from'./operationcompressor';import{parsePositionBeforeCompression as _0xaa1d81,parsePositionAfterCompression as _0xbde172}from'../utils';export default class i extends _0x3c42c3{['compress'](_0x5575d3,_0x6e9596){const _0x5851b2=_0x6e9596[_0x45f7('0x4')]();return this[_0x45f7('0xa')](_0x45f7('0x5'),_0x5851b2),this[_0x45f7('0xa')]('newValue',_0x5851b2),_0xaa1d81(_0x5851b2),_0x5575d3['buffers'][_0x45f7('0x0')](this[_0x45f7('0x7')][_0x45f7('0x1')](_0x5851b2)),_0x5575d3['types'][_0x45f7('0x0')](this['_id']),!0x0;}['decompress'](_0x39b1ef,_0x39967a){const {types:_0x39bec5,buffers:_0x14f929}=_0x39967a,_0x1c0f35=this[_0x45f7('0x7')][_0x45f7('0x3')](_0x14f929[_0x45f7('0x4')]());_0x39bec5['shift'](),this[_0x45f7('0x2')]('oldValue',_0x1c0f35),this[_0x45f7('0x2')]('newValue',_0x1c0f35),_0xbde172(_0x1c0f35),_0x1c0f35['__className']=this['_operationName'],_0x39b1ef[_0x45f7('0x0')](_0x1c0f35);}['_serializeOneOf'](_0x585138,_0x187653){const _0x342ea4=_0x187653[_0x585138];_0x45f7('0x8')==typeof _0x342ea4?_0x187653[_0x585138+'Boolean']=_0x342ea4:_0x187653[_0x585138+_0x45f7('0x9')]=JSON['stringify'](_0x342ea4);}[_0x45f7('0x2')](_0x28222c,_0x3f1110){const _0x28c500=_0x28222c+'Json';_0x3f1110[_0x28c500]?(_0x3f1110[_0x28222c]=JSON['parse'](_0x3f1110[_0x28c500]),delete _0x3f1110[_0x28c500]):(_0x3f1110[_0x28222c]=_0x3f1110[_0x28222c+_0x45f7('0x6')],delete _0x3f1110[_0x28222c+_0x45f7('0x6')]);}}
@@ -1,17 +1,17 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import OperationCompressor from './operationcompressor';
6
- import type { CompressedOperationsData } from '../compressor';
7
- import type { InsertOperation } from 'ckeditor5/src/engine';
8
- export default class InsertOperationCompressor extends OperationCompressor {
9
- /**
10
- * @inheritDoc
11
- */
12
- compress(result: CompressedOperationsData, operations: Array<InsertOperation>): boolean;
13
- /**
14
- * @inheritDoc
15
- */
16
- decompress(result: Array<InsertOperation>, data: CompressedOperationsData): void;
17
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import OperationCompressor from './operationcompressor';
6
+ import type { CompressedOperationsData } from '../compressor';
7
+ import type { InsertOperation } from 'ckeditor5/src/engine';
8
+ export default class InsertOperationCompressor extends OperationCompressor {
9
+ /**
10
+ * @inheritDoc
11
+ */
12
+ compress(result: CompressedOperationsData, operations: Array<InsertOperation>): boolean;
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ decompress(result: Array<InsertOperation>, data: CompressedOperationsData): void;
17
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x203a=['_id','_operationName','_serializeNodesAttributes','buffers','decompress','__className','compress','push','shift','stringify','every','_protobufDescriptor','children','nodes','types','attributes','_areValuesBoolean','keys','attributesJson','attributesBoolean','_deserializeNodesAttributes','boolean'];(function(_0x51c695,_0x203a4b){const _0x354830=function(_0xe6611e){while(--_0xe6611e){_0x51c695['push'](_0x51c695['shift']());}};_0x354830(++_0x203a4b);}(_0x203a,0x1bb));const _0x3548=function(_0x51c695,_0x203a4b){_0x51c695=_0x51c695-0x0;let _0x354830=_0x203a[_0x51c695];return _0x354830;};import _0x316593 from'./operationcompressor';import{parsePositionBeforeCompression as _0x2e95d6,parsePositionAfterCompression as _0x52843f}from'../utils';export default class s extends _0x316593{[_0x3548('0x3')](_0x4a7a2a,_0x2e6ed0){const _0x3422e8=_0x2e6ed0[_0x3548('0x5')]();return this[_0x3548('0x15')](_0x3422e8[_0x3548('0xa')]),_0x2e95d6(_0x3422e8),_0x4a7a2a[_0x3548('0x0')]['push'](this['_protobufDescriptor'][_0x3548('0x3')](_0x3422e8)),_0x4a7a2a[_0x3548('0xb')][_0x3548('0x4')](this[_0x3548('0x13')]),!0x0;}[_0x3548('0x1')](_0x515a7a,_0x1375c3){const {types:_0x224ddf,buffers:_0x529161}=_0x1375c3,_0x13fea6=this[_0x3548('0x8')]['decompress'](_0x529161['shift']());_0x224ddf['shift'](),_0x13fea6['nodes']||(_0x13fea6[_0x3548('0xa')]=[]),this[_0x3548('0x11')](_0x13fea6[_0x3548('0xa')]),_0x52843f(_0x13fea6),_0x13fea6[_0x3548('0x2')]=this[_0x3548('0x14')],_0x515a7a[_0x3548('0x4')](_0x13fea6);}[_0x3548('0x15')](_0x5d4f23){for(const _0xa522f1 of _0x5d4f23){if(_0xa522f1[_0x3548('0xc')]){const _0x470df5=_0xa522f1['attributes'];this[_0x3548('0xd')](_0x470df5)?_0xa522f1[_0x3548('0x10')]=_0x470df5:_0xa522f1[_0x3548('0xf')]=JSON[_0x3548('0x6')](_0x470df5);}_0xa522f1[_0x3548('0x9')]&&this[_0x3548('0x15')](_0xa522f1[_0x3548('0x9')]);}}['_deserializeNodesAttributes'](_0x1a4633){for(const _0xec175d of _0x1a4633)(_0xec175d[_0x3548('0x10')]||_0xec175d[_0x3548('0xf')])&&(_0xec175d[_0x3548('0x10')]?(_0xec175d[_0x3548('0xc')]=_0xec175d['attributesBoolean'],delete _0xec175d['attributesBoolean']):(_0xec175d[_0x3548('0xc')]=JSON['parse'](_0xec175d[_0x3548('0xf')]),delete _0xec175d[_0x3548('0xf')])),_0xec175d['children']&&this['_deserializeNodesAttributes'](_0xec175d[_0x3548('0x9')]);}[_0x3548('0xd')](_0x56a616){return Object[_0x3548('0xe')](_0x56a616)[_0x3548('0x7')](_0xc420ea=>_0x3548('0x12')==typeof _0x56a616[_0xc420ea]);}}
23
+ const _0x5a43=['compress','decompress','_deserializeNodesAttributes','boolean','_serializeNodesAttributes','_operationName','__className','_areValuesBoolean','children','_id','shift','attributesJson','attributesBoolean','every','buffers','nodes','attributes','keys','_protobufDescriptor','push','parse','types'];(function(_0x177c1b,_0x5a4371){const _0x3f076e=function(_0x1a3ff9){while(--_0x1a3ff9){_0x177c1b['push'](_0x177c1b['shift']());}};_0x3f076e(++_0x5a4371);}(_0x5a43,0xc6));const _0x3f07=function(_0x177c1b,_0x5a4371){_0x177c1b=_0x177c1b-0x0;let _0x3f076e=_0x5a43[_0x177c1b];return _0x3f076e;};import _0x322ca8 from'./operationcompressor';import{parsePositionBeforeCompression as _0x2a3600,parsePositionAfterCompression as _0x5ce355}from'../utils';export default class s extends _0x322ca8{[_0x3f07('0x0')](_0x2cd5fd,_0x15e2fd){const _0x3f9c51=_0x15e2fd[_0x3f07('0xa')]();return this[_0x3f07('0x4')](_0x3f9c51[_0x3f07('0xf')]),_0x2a3600(_0x3f9c51),_0x2cd5fd[_0x3f07('0xe')]['push'](this[_0x3f07('0x12')][_0x3f07('0x0')](_0x3f9c51)),_0x2cd5fd[_0x3f07('0x15')]['push'](this[_0x3f07('0x9')]),!0x0;}[_0x3f07('0x1')](_0x26b59f,_0x3abc1a){const {types:_0x416cdf,buffers:_0x41368d}=_0x3abc1a,_0x52f2ae=this[_0x3f07('0x12')][_0x3f07('0x1')](_0x41368d[_0x3f07('0xa')]());_0x416cdf[_0x3f07('0xa')](),_0x52f2ae[_0x3f07('0xf')]||(_0x52f2ae[_0x3f07('0xf')]=[]),this[_0x3f07('0x2')](_0x52f2ae[_0x3f07('0xf')]),_0x5ce355(_0x52f2ae),_0x52f2ae[_0x3f07('0x6')]=this[_0x3f07('0x5')],_0x26b59f[_0x3f07('0x13')](_0x52f2ae);}['_serializeNodesAttributes'](_0x3afab0){for(const _0x27924c of _0x3afab0){if(_0x27924c[_0x3f07('0x10')]){const _0x4f01cb=_0x27924c[_0x3f07('0x10')];this[_0x3f07('0x7')](_0x4f01cb)?_0x27924c[_0x3f07('0xc')]=_0x4f01cb:_0x27924c[_0x3f07('0xb')]=JSON['stringify'](_0x4f01cb);}_0x27924c[_0x3f07('0x8')]&&this['_serializeNodesAttributes'](_0x27924c[_0x3f07('0x8')]);}}[_0x3f07('0x2')](_0x36df7d){for(const _0x32d55c of _0x36df7d)(_0x32d55c['attributesBoolean']||_0x32d55c[_0x3f07('0xb')])&&(_0x32d55c[_0x3f07('0xc')]?(_0x32d55c[_0x3f07('0x10')]=_0x32d55c[_0x3f07('0xc')],delete _0x32d55c['attributesBoolean']):(_0x32d55c[_0x3f07('0x10')]=JSON[_0x3f07('0x14')](_0x32d55c[_0x3f07('0xb')]),delete _0x32d55c['attributesJson'])),_0x32d55c[_0x3f07('0x8')]&&this[_0x3f07('0x2')](_0x32d55c[_0x3f07('0x8')]);}[_0x3f07('0x7')](_0x450936){return Object[_0x3f07('0x11')](_0x450936)[_0x3f07('0xd')](_0x3cec30=>_0x3f07('0x3')==typeof _0x450936[_0x3cec30]);}}
@@ -1,13 +1,13 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import OperationCompressor from './operationcompressor';
6
- import type { CompressedOperationsData } from '../compressor';
7
- import type { MarkerOperation } from 'ckeditor5/src/engine';
8
- export default class MarkerOperationCompressor extends OperationCompressor {
9
- /**
10
- * @inheritDoc
11
- */
12
- decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
13
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import OperationCompressor from './operationcompressor';
6
+ import type { CompressedOperationsData } from '../compressor';
7
+ import type { MarkerOperation } from 'ckeditor5/src/engine';
8
+ export default class MarkerOperationCompressor extends OperationCompressor {
9
+ /**
10
+ * @inheritDoc
11
+ */
12
+ decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
13
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x10f1=['oldRange','decompress','newRange','length'];(function(_0x2ffaea,_0x10f155){const _0x6a4a24=function(_0x158905){while(--_0x158905){_0x2ffaea['push'](_0x2ffaea['shift']());}};_0x6a4a24(++_0x10f155);}(_0x10f1,0x12d));const _0x6a4a=function(_0x2ffaea,_0x10f155){_0x2ffaea=_0x2ffaea-0x0;let _0x6a4a24=_0x10f1[_0x2ffaea];return _0x6a4a24;};import _0x123e03 from'./operationcompressor';export default class n extends _0x123e03{[_0x6a4a('0x0')](_0x2eca1c,_0x10c256){super[_0x6a4a('0x0')](_0x2eca1c,_0x10c256);const _0x3b5b81=_0x2eca1c[_0x2eca1c[_0x6a4a('0x2')]-0x1];_0x3b5b81[_0x6a4a('0x3')]||(_0x3b5b81[_0x6a4a('0x3')]=null),_0x3b5b81['newRange']||(_0x3b5b81[_0x6a4a('0x1')]=null);}}
23
+ const _0xb8b4=['decompress','length','newRange','oldRange'];(function(_0x5fea4a,_0xb8b4fa){const _0x1a76b9=function(_0x3e5762){while(--_0x3e5762){_0x5fea4a['push'](_0x5fea4a['shift']());}};_0x1a76b9(++_0xb8b4fa);}(_0xb8b4,0x7d));const _0x1a76=function(_0x5fea4a,_0xb8b4fa){_0x5fea4a=_0x5fea4a-0x0;let _0x1a76b9=_0xb8b4[_0x5fea4a];return _0x1a76b9;};import _0x104346 from'./operationcompressor';export default class n extends _0x104346{[_0x1a76('0x3')](_0x374b5b,_0x3bbbd9){super[_0x1a76('0x3')](_0x374b5b,_0x3bbbd9);const _0x41665c=_0x374b5b[_0x374b5b[_0x1a76('0x0')]-0x1];_0x41665c[_0x1a76('0x2')]||(_0x41665c['oldRange']=null),_0x41665c[_0x1a76('0x1')]||(_0x41665c[_0x1a76('0x1')]=null);}}
@@ -1,20 +1,20 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import OperationCompressor from './operationcompressor';
6
- import type { CompressedOperationsData } from '../compressor';
7
- import type { Operation } from 'ckeditor5/src/engine';
8
- /**
9
- * @extends OperationCompressor
10
- */
11
- export default class NoOperationCompressor extends OperationCompressor {
12
- /**
13
- * @inheritDoc
14
- */
15
- compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
16
- /**
17
- * @inheritDoc
18
- */
19
- decompress(result: Array<any>, data: CompressedOperationsData): void;
20
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import OperationCompressor from './operationcompressor';
6
+ import type { CompressedOperationsData } from '../compressor';
7
+ import type { Operation } from 'ckeditor5/src/engine';
8
+ /**
9
+ * @extends OperationCompressor
10
+ */
11
+ export default class NoOperationCompressor extends OperationCompressor {
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ decompress(result: Array<any>, data: CompressedOperationsData): void;
20
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0xb653=['push','types','_id','compress','shift'];(function(_0x57ba30,_0xb653fc){var _0x5b8818=function(_0x4dbf2b){while(--_0x4dbf2b){_0x57ba30['push'](_0x57ba30['shift']());}};_0x5b8818(++_0xb653fc);}(_0xb653,0x1d4));var _0x5b88=function(_0x57ba30,_0xb653fc){_0x57ba30=_0x57ba30-0x0;var _0x5b8818=_0xb653[_0x57ba30];return _0x5b8818;};import _0x2beca3 from'./operationcompressor';export default class p extends _0x2beca3{[_0x5b88('0x0')](_0xa8cad5,_0x589932){return _0x589932[_0x5b88('0x1')](),_0xa8cad5[_0x5b88('0x3')][_0x5b88('0x2')](this[_0x5b88('0x4')]),!0x0;}['decompress'](_0x3d65a7,_0x9ba0ac){_0x9ba0ac[_0x5b88('0x3')][_0x5b88('0x1')](),_0x3d65a7[_0x5b88('0x2')]({'__className':this['_operationName']});}}
23
+ var _0x86e0=['_operationName','_id','push','shift','types','compress','decompress'];(function(_0x1dcdc6,_0x86e0fc){var _0x30dc39=function(_0x31f054){while(--_0x31f054){_0x1dcdc6['push'](_0x1dcdc6['shift']());}};_0x30dc39(++_0x86e0fc);}(_0x86e0,0xe1));var _0x30dc=function(_0x1dcdc6,_0x86e0fc){_0x1dcdc6=_0x1dcdc6-0x0;var _0x30dc39=_0x86e0[_0x1dcdc6];return _0x30dc39;};import _0xae0fd9 from'./operationcompressor';export default class p extends _0xae0fd9{[_0x30dc('0x4')](_0x43979e,_0x32bb5b){return _0x32bb5b[_0x30dc('0x2')](),_0x43979e[_0x30dc('0x3')]['push'](this[_0x30dc('0x0')]),!0x0;}[_0x30dc('0x5')](_0x3acf84,_0x3056ca){_0x3056ca['types']['shift'](),_0x3acf84[_0x30dc('0x1')]({'__className':this[_0x30dc('0x6')]});}}
@@ -1,28 +1,28 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import type { CompressedOperationsData } from '../compressor';
6
- import type { ProtobufDescriptor } from '../protobuffactory';
7
- import type { Operation } from 'ckeditor5/src/engine';
8
- /**
9
- * Compresses and decompresses single operation to the binary format.
10
- */
11
- export default class OperationCompressor {
12
- constructor(id: number, operationName: string, protobufDescriptor: ProtobufDescriptor);
13
- /**
14
- * Serializes and consumes the first operation from the list.
15
- *
16
- * @param result Object to which compression result will be added.
17
- * @param operations List of operations to compress. The first one will be compressed
18
- * and removed from the list.
19
- */
20
- compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
21
- /**
22
- * Deserializes and consumes buffered operation.
23
- *
24
- * @param result Decompressed operation.
25
- * @param data Data to decompress.
26
- */
27
- decompress(result: Array<Operation>, data: CompressedOperationsData): void;
28
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import type { CompressedOperationsData } from '../compressor';
6
+ import type { ProtobufDescriptor } from '../protobuffactory';
7
+ import type { Operation } from 'ckeditor5/src/engine';
8
+ /**
9
+ * Compresses and decompresses single operation to the binary format.
10
+ */
11
+ export default class OperationCompressor {
12
+ constructor(id: number, operationName: string, protobufDescriptor: ProtobufDescriptor);
13
+ /**
14
+ * Serializes and consumes the first operation from the list.
15
+ *
16
+ * @param result Object to which compression result will be added.
17
+ * @param operations List of operations to compress. The first one will be compressed
18
+ * and removed from the list.
19
+ */
20
+ compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
21
+ /**
22
+ * Deserializes and consumes buffered operation.
23
+ *
24
+ * @param result Decompressed operation.
25
+ * @param data Data to decompress.
26
+ */
27
+ decompress(result: Array<Operation>, data: CompressedOperationsData): void;
28
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4486=['buffers','shift','_id','push','_operationName','types','decompress','_protobufDescriptor','compress'];(function(_0x3201af,_0x4486b9){const _0x2a525c=function(_0x4d0361){while(--_0x4d0361){_0x3201af['push'](_0x3201af['shift']());}};_0x2a525c(++_0x4486b9);}(_0x4486,0x136));const _0x2a52=function(_0x3201af,_0x4486b9){_0x3201af=_0x3201af-0x0;let _0x2a525c=_0x4486[_0x3201af];return _0x2a525c;};import{parsePositionBeforeCompression as _0x3ac857,parsePositionAfterCompression as _0x48db58}from'../utils';export default class e{constructor(_0x5452d4,_0x48edb0,_0x492f01){this[_0x2a52('0x7')]=_0x5452d4,this[_0x2a52('0x0')]=_0x48edb0,this[_0x2a52('0x3')]=_0x492f01;}[_0x2a52('0x4')](_0x1aa7ad,_0x2a6649){const _0xb9ab46=_0x2a6649[_0x2a52('0x6')]();return _0x3ac857(_0xb9ab46),_0x1aa7ad[_0x2a52('0x5')][_0x2a52('0x8')](this[_0x2a52('0x3')][_0x2a52('0x4')](_0xb9ab46)),_0x1aa7ad[_0x2a52('0x1')][_0x2a52('0x8')](this['_id']),!0x0;}[_0x2a52('0x2')](_0x165f1c,_0x3e6928){_0x3e6928[_0x2a52('0x1')]['shift']();const _0x36f29a=this[_0x2a52('0x3')][_0x2a52('0x2')](_0x3e6928[_0x2a52('0x5')]['shift']());_0x48db58(_0x36f29a),_0x36f29a['__className']=this[_0x2a52('0x0')],_0x165f1c['push'](_0x36f29a);}}
23
+ const _0x2849=['buffers','push','_id','types','shift','_operationName','_protobufDescriptor','decompress','compress'];(function(_0x5b7d98,_0x28496e){const _0x2e1b26=function(_0x3589e1){while(--_0x3589e1){_0x5b7d98['push'](_0x5b7d98['shift']());}};_0x2e1b26(++_0x28496e);}(_0x2849,0x1e4));const _0x2e1b=function(_0x5b7d98,_0x28496e){_0x5b7d98=_0x5b7d98-0x0;let _0x2e1b26=_0x2849[_0x5b7d98];return _0x2e1b26;};import{parsePositionBeforeCompression as _0x512a71,parsePositionAfterCompression as _0x4a61fe}from'../utils';export default class e{constructor(_0x17208c,_0x472b88,_0x647bfc){this[_0x2e1b('0x4')]=_0x17208c,this[_0x2e1b('0x7')]=_0x472b88,this['_protobufDescriptor']=_0x647bfc;}[_0x2e1b('0x1')](_0x21666a,_0x294ba1){const _0x37d908=_0x294ba1[_0x2e1b('0x6')]();return _0x512a71(_0x37d908),_0x21666a[_0x2e1b('0x2')][_0x2e1b('0x3')](this[_0x2e1b('0x8')][_0x2e1b('0x1')](_0x37d908)),_0x21666a[_0x2e1b('0x5')][_0x2e1b('0x3')](this[_0x2e1b('0x4')]),!0x0;}[_0x2e1b('0x0')](_0xf98cdd,_0x43e5b9){_0x43e5b9[_0x2e1b('0x5')][_0x2e1b('0x6')]();const _0x605790=this['_protobufDescriptor']['decompress'](_0x43e5b9[_0x2e1b('0x2')][_0x2e1b('0x6')]());_0x4a61fe(_0x605790),_0x605790['__className']=this[_0x2e1b('0x7')],_0xf98cdd['push'](_0x605790);}}
@@ -1,4 +1,4 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x4d7c=['string','uint32','Element','exports','repeated','bool','Position','Range'];(function(_0x46ddfa,_0x4d7c43){var _0xf99a24=function(_0x54bff0){while(--_0x54bff0){_0x46ddfa['push'](_0x46ddfa['shift']());}};_0xf99a24(++_0x4d7c43);}(_0x4d7c,0x18d));var _0xf99a=function(_0x46ddfa,_0x4d7c43){_0x46ddfa=_0x46ddfa-0x0;var _0xf99a24=_0x4d7c[_0x46ddfa];return _0xf99a24;};'use strict';module[_0xf99a('0x6')]={'AttributeOperation':{'fields':{'range':{'type':_0xf99a('0x2'),'id':0x1},'key':{'type':'string','id':0x2},'oldValueBoolean':{'type':_0xf99a('0x0'),'id':0x3},'oldValueJson':{'type':_0xf99a('0x3'),'id':0x4},'newValueBoolean':{'type':_0xf99a('0x0'),'id':0x5},'newValueJson':{'type':_0xf99a('0x3'),'id':0x6},'wasUndone':{'type':_0xf99a('0x0'),'id':0x7}}},'InsertOperation':{'fields':{'position':{'type':'Position','id':0x1},'nodes':{'rule':'repeated','type':_0xf99a('0x5'),'id':0x2},'shouldReceiveAttributes':{'type':_0xf99a('0x0'),'id':0x3},'wasUndone':{'type':_0xf99a('0x0'),'id':0x4}}},'MarkerOperation':{'fields':{'name':{'type':_0xf99a('0x3'),'id':0x1},'oldRange':{'type':_0xf99a('0x2'),'id':0x2},'newRange':{'type':_0xf99a('0x2'),'id':0x3},'affectsData':{'type':_0xf99a('0x0'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'MergeOperation':{'fields':{'sourcePosition':{'type':_0xf99a('0x1'),'id':0x1},'targetPosition':{'type':_0xf99a('0x1'),'id':0x2},'graveyardPosition':{'type':_0xf99a('0x1'),'id':0x3},'howMany':{'type':_0xf99a('0x4'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'MoveOperation':{'fields':{'sourcePosition':{'type':_0xf99a('0x1'),'id':0x1},'howMany':{'type':_0xf99a('0x4'),'id':0x2},'targetPosition':{'type':_0xf99a('0x1'),'id':0x3},'wasUndone':{'type':_0xf99a('0x0'),'id':0x4}}},'RenameOperation':{'fields':{'position':{'type':'Position','id':0x1},'oldName':{'type':'string','id':0x2},'newName':{'type':_0xf99a('0x3'),'id':0x3},'wasUndone':{'type':_0xf99a('0x0'),'id':0x4}}},'RootAttributeOperation':{'fields':{'root':{'type':_0xf99a('0x3'),'id':0x1},'key':{'type':_0xf99a('0x3'),'id':0x2},'oldValueBoolean':{'type':_0xf99a('0x0'),'id':0x3},'oldValueJson':{'type':'string','id':0x4},'newValueBoolean':{'type':_0xf99a('0x0'),'id':0x5},'newValueJson':{'type':_0xf99a('0x3'),'id':0x6},'wasUndone':{'type':'bool','id':0x7}}},'RootOperation':{'fields':{'rootName':{'type':_0xf99a('0x3'),'id':0x1},'elementName':{'type':'string','id':0x2},'isAdd':{'type':'bool','id':0x3},'wasUndone':{'type':'bool','id':0x4}}},'SplitOperation':{'fields':{'splitPosition':{'type':_0xf99a('0x1'),'id':0x1},'graveyardPosition':{'type':_0xf99a('0x1'),'id':0x2},'howMany':{'type':_0xf99a('0x4'),'id':0x3},'insertionPosition':{'type':_0xf99a('0x1'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'Position':{'fields':{'root':{'type':_0xf99a('0x3'),'id':0x1},'rootMain':{'type':'bool','id':0x2},'rootGraveyard':{'type':_0xf99a('0x0'),'id':0x3},'path':{'rule':_0xf99a('0x7'),'type':_0xf99a('0x4'),'id':0x4},'stickiness':{'type':_0xf99a('0x3'),'id':0x5}}},'Range':{'fields':{'start':{'type':_0xf99a('0x1'),'id':0x1},'end':{'type':'Position','id':0x2}}},'Element':{'fields':{'name':{'type':_0xf99a('0x3'),'id':0x1},'children':{'rule':_0xf99a('0x7'),'type':'Element','id':0x2},'data':{'type':'string','id':0x3},'attributesBoolean':{'keyType':_0xf99a('0x3'),'type':_0xf99a('0x0'),'id':0x4},'attributesJson':{'type':_0xf99a('0x3'),'id':0x5}}}};
23
+ var _0x25cc=['Range','Element','Position','uint32','repeated','string','bool'];(function(_0x3c3a1a,_0x25ccbb){var _0x17492e=function(_0x10c77a){while(--_0x10c77a){_0x3c3a1a['push'](_0x3c3a1a['shift']());}};_0x17492e(++_0x25ccbb);}(_0x25cc,0x161));var _0x1749=function(_0x3c3a1a,_0x25ccbb){_0x3c3a1a=_0x3c3a1a-0x0;var _0x17492e=_0x25cc[_0x3c3a1a];return _0x17492e;};'use strict';module['exports']={'AttributeOperation':{'fields':{'range':{'type':'Range','id':0x1},'key':{'type':'string','id':0x2},'oldValueBoolean':{'type':_0x1749('0x3'),'id':0x3},'oldValueJson':{'type':'string','id':0x4},'newValueBoolean':{'type':'bool','id':0x5},'newValueJson':{'type':_0x1749('0x2'),'id':0x6},'wasUndone':{'type':_0x1749('0x3'),'id':0x7}}},'InsertOperation':{'fields':{'position':{'type':_0x1749('0x6'),'id':0x1},'nodes':{'rule':_0x1749('0x1'),'type':_0x1749('0x5'),'id':0x2},'shouldReceiveAttributes':{'type':'bool','id':0x3},'wasUndone':{'type':_0x1749('0x3'),'id':0x4}}},'MarkerOperation':{'fields':{'name':{'type':_0x1749('0x2'),'id':0x1},'oldRange':{'type':_0x1749('0x4'),'id':0x2},'newRange':{'type':_0x1749('0x4'),'id':0x3},'affectsData':{'type':_0x1749('0x3'),'id':0x4},'wasUndone':{'type':_0x1749('0x3'),'id':0x5}}},'MergeOperation':{'fields':{'sourcePosition':{'type':_0x1749('0x6'),'id':0x1},'targetPosition':{'type':_0x1749('0x6'),'id':0x2},'graveyardPosition':{'type':_0x1749('0x6'),'id':0x3},'howMany':{'type':_0x1749('0x0'),'id':0x4},'wasUndone':{'type':_0x1749('0x3'),'id':0x5}}},'MoveOperation':{'fields':{'sourcePosition':{'type':_0x1749('0x6'),'id':0x1},'howMany':{'type':_0x1749('0x0'),'id':0x2},'targetPosition':{'type':_0x1749('0x6'),'id':0x3},'wasUndone':{'type':_0x1749('0x3'),'id':0x4}}},'RenameOperation':{'fields':{'position':{'type':'Position','id':0x1},'oldName':{'type':_0x1749('0x2'),'id':0x2},'newName':{'type':'string','id':0x3},'wasUndone':{'type':'bool','id':0x4}}},'RootAttributeOperation':{'fields':{'root':{'type':'string','id':0x1},'key':{'type':_0x1749('0x2'),'id':0x2},'oldValueBoolean':{'type':'bool','id':0x3},'oldValueJson':{'type':_0x1749('0x2'),'id':0x4},'newValueBoolean':{'type':_0x1749('0x3'),'id':0x5},'newValueJson':{'type':_0x1749('0x2'),'id':0x6},'wasUndone':{'type':_0x1749('0x3'),'id':0x7}}},'RootOperation':{'fields':{'rootName':{'type':_0x1749('0x2'),'id':0x1},'elementName':{'type':'string','id':0x2},'isAdd':{'type':'bool','id':0x3},'wasUndone':{'type':_0x1749('0x3'),'id':0x4}}},'SplitOperation':{'fields':{'splitPosition':{'type':_0x1749('0x6'),'id':0x1},'graveyardPosition':{'type':_0x1749('0x6'),'id':0x2},'howMany':{'type':'uint32','id':0x3},'insertionPosition':{'type':_0x1749('0x6'),'id':0x4},'wasUndone':{'type':_0x1749('0x3'),'id':0x5}}},'Position':{'fields':{'root':{'type':_0x1749('0x2'),'id':0x1},'rootMain':{'type':'bool','id':0x2},'rootGraveyard':{'type':_0x1749('0x3'),'id':0x3},'path':{'rule':_0x1749('0x1'),'type':_0x1749('0x0'),'id':0x4},'stickiness':{'type':'string','id':0x5}}},'Range':{'fields':{'start':{'type':_0x1749('0x6'),'id':0x1},'end':{'type':_0x1749('0x6'),'id':0x2}}},'Element':{'fields':{'name':{'type':_0x1749('0x2'),'id':0x1},'children':{'rule':'repeated','type':_0x1749('0x5'),'id':0x2},'data':{'type':_0x1749('0x2'),'id':0x3},'attributesBoolean':{'keyType':'string','type':'bool','id':0x4},'attributesJson':{'type':'string','id':0x5}}}};
@@ -1,5 +1,5 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- export {};
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3f7f=['_protobuf','toObject','create','finish','decompress','compress','encode','getDescriptor','_protobufRoot'];(function(_0x160148,_0x3f7f40){const _0x3461f8=function(_0xa1f9d4){while(--_0xa1f9d4){_0x160148['push'](_0x160148['shift']());}};_0x3461f8(++_0x3f7f40);}(_0x3f7f,0xc0));const _0x3461=function(_0x160148,_0x3f7f40){_0x160148=_0x160148-0x0;let _0x3461f8=_0x3f7f[_0x160148];return _0x3461f8;};import*as _0x3f84e1 from'./lib/compiledmessages';export default class r{constructor(){this[_0x3461('0x5')]=_0x3f84e1;}[_0x3461('0x4')](_0x2b4d8b){return new ProtobufDescriptor(this[_0x3461('0x5')][_0x2b4d8b]);}}export class ProtobufDescriptor{constructor(_0x204011){this['_protobuf']=_0x204011;}[_0x3461('0x2')](_0xaba39f){const _0x2939f2=this[_0x3461('0x6')]['verify'](_0xaba39f);if(_0x2939f2)throw Error(_0x2939f2);return this['_protobuf'][_0x3461('0x3')](this[_0x3461('0x6')][_0x3461('0x8')](_0xaba39f))[_0x3461('0x0')]();}[_0x3461('0x1')](_0x27a493){return this[_0x3461('0x6')][_0x3461('0x7')](this['_protobuf']['decode'](_0x27a493),{'oneofs':!0x0});}}
23
+ const _0x48d6=['finish','compress','_protobuf','decode','decompress','verify','encode'];(function(_0x5163d9,_0x48d604){const _0x5965bd=function(_0x263729){while(--_0x263729){_0x5163d9['push'](_0x5163d9['shift']());}};_0x5965bd(++_0x48d604);}(_0x48d6,0x1ba));const _0x5965=function(_0x5163d9,_0x48d604){_0x5163d9=_0x5163d9-0x0;let _0x5965bd=_0x48d6[_0x5163d9];return _0x5965bd;};import*as _0x868002 from'./lib/compiledmessages';export default class r{constructor(){this['_protobufRoot']=_0x868002;}['getDescriptor'](_0x2d27cc){return new ProtobufDescriptor(this['_protobufRoot'][_0x2d27cc]);}}export class ProtobufDescriptor{constructor(_0x3ed819){this[_0x5965('0x1')]=_0x3ed819;}[_0x5965('0x0')](_0x41bfc6){const _0x2968ad=this[_0x5965('0x1')][_0x5965('0x4')](_0x41bfc6);if(_0x2968ad)throw Error(_0x2968ad);return this[_0x5965('0x1')][_0x5965('0x5')](this['_protobuf']['create'](_0x41bfc6))[_0x5965('0x6')]();}[_0x5965('0x3')](_0x2b9f3e){return this[_0x5965('0x1')]['toObject'](this[_0x5965('0x1')][_0x5965('0x2')](_0x2b9f3e),{'oneofs':!0x0});}}
package/src/utils.d.ts CHANGED
@@ -1,30 +1,30 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * Return new position in JSON format shifted by given offset.
7
- *
8
- * @param positionJSON Position serialized to JSON.
9
- * @param shift Offset shift. Can be a negative value.
10
- * @returns New position in JSON format.
11
- */
12
- export declare function getPositionShiftedBy(positionJSON: any, shift: number): any;
13
- /**
14
- * Checks whether one position serialized to JSON is equal to other position serialized to JSON.
15
- */
16
- export declare function arePositionsEqual(positionA: any, positionB: any): boolean;
17
- /**
18
- * For the better compression result one of the two common roots (`main` or `$graveyard`)
19
- * is compressed to the `Boolean` format.
20
- *
21
- * Due tu the Protobuf limitation `Position` descriptor has no dedicated compressor
22
- * so we need to find and format all positions in the operation.
23
- */
24
- export declare function parsePositionBeforeCompression(operation: any): void;
25
- /**
26
- * Position reformatting after decompression.
27
- *
28
- * @see {parsePositionBeforeCompression}.
29
- */
30
- export declare function parsePositionAfterCompression(operation: any): void;
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * Return new position in JSON format shifted by given offset.
7
+ *
8
+ * @param positionJSON Position serialized to JSON.
9
+ * @param shift Offset shift. Can be a negative value.
10
+ * @returns New position in JSON format.
11
+ */
12
+ export declare function getPositionShiftedBy(positionJSON: any, shift: number): any;
13
+ /**
14
+ * Checks whether one position serialized to JSON is equal to other position serialized to JSON.
15
+ */
16
+ export declare function arePositionsEqual(positionA: any, positionB: any): boolean;
17
+ /**
18
+ * For the better compression result one of the two common roots (`main` or `$graveyard`)
19
+ * is compressed to the `Boolean` format.
20
+ *
21
+ * Due tu the Protobuf limitation `Position` descriptor has no dedicated compressor
22
+ * so we need to find and format all positions in the operation.
23
+ */
24
+ export declare function parsePositionBeforeCompression(operation: any): void;
25
+ /**
26
+ * Position reformatting after decompression.
27
+ *
28
+ * @see {parsePositionBeforeCompression}.
29
+ */
30
+ export declare function parsePositionAfterCompression(operation: any): void;
package/src/utils.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3740=['main','rootGraveyard','nodes','path','rootMain','root','length','$graveyard'];(function(_0x1f0d08,_0x374000){const _0x20e8c3=function(_0x9cc46a){while(--_0x9cc46a){_0x1f0d08['push'](_0x1f0d08['shift']());}};_0x20e8c3(++_0x374000);}(_0x3740,0xe6));const _0x20e8=function(_0x1f0d08,_0x374000){_0x1f0d08=_0x1f0d08-0x0;let _0x20e8c3=_0x3740[_0x1f0d08];return _0x20e8c3;};import{cloneDeep as _0x41e2c4,isEqual as _0x3ae72b,isObject as _0x212a22}from'lodash-es';export function getPositionShiftedBy(_0x23601a,_0x2dc28c){const _0x577ce8=_0x41e2c4(_0x23601a);return _0x577ce8[_0x20e8('0x5')][_0x577ce8[_0x20e8('0x5')][_0x20e8('0x0')]-0x1]+=_0x2dc28c,_0x577ce8;}export function arePositionsEqual(_0xafed44,_0x19f008){return _0xafed44[_0x20e8('0x7')]===_0x19f008[_0x20e8('0x7')]&&_0x3ae72b(_0xafed44[_0x20e8('0x5')],_0x19f008[_0x20e8('0x5')]);}export function parsePositionBeforeCompression(_0x3ac3e7){P(_0x3ac3e7,_0x4bc938=>(_0x20e8('0x2')==_0x4bc938[_0x20e8('0x7')]?(_0x4bc938[_0x20e8('0x6')]=!0x0,delete _0x4bc938[_0x20e8('0x7')]):_0x20e8('0x1')==_0x4bc938[_0x20e8('0x7')]&&(_0x4bc938['rootGraveyard']=!0x0,delete _0x4bc938[_0x20e8('0x7')]),_0x4bc938));}export function parsePositionAfterCompression(_0x1663df){P(_0x1663df,_0x4a4726=>(_0x4a4726[_0x20e8('0x6')]?(_0x4a4726['root']=_0x20e8('0x2'),delete _0x4a4726['rootMain']):_0x4a4726[_0x20e8('0x3')]&&(_0x4a4726['root']=_0x20e8('0x1'),delete _0x4a4726['rootGraveyard']),_0x4a4726));}function P(_0xbb2675,_0x183f1f){for(const _0x4fd487 in _0xbb2675){const _0xe2344d=_0xbb2675[_0x4fd487];_0x20e8('0x4')!==_0x4fd487&&_0x212a22(_0xe2344d)&&(_0xe2344d[_0x20e8('0x5')]&&(_0xe2344d[_0x20e8('0x7')]||_0xe2344d[_0x20e8('0x6')]||_0xe2344d[_0x20e8('0x3')])?_0xbb2675[_0x4fd487]=_0x183f1f(_0xe2344d):P(_0xe2344d,_0x183f1f));}return _0xbb2675;}
23
+ const _0xd8a1=['rootMain','root','path','rootGraveyard','length','main','nodes','$graveyard'];(function(_0x41a87a,_0xd8a15f){const _0x4276e3=function(_0x16e9a8){while(--_0x16e9a8){_0x41a87a['push'](_0x41a87a['shift']());}};_0x4276e3(++_0xd8a15f);}(_0xd8a1,0x178));const _0x4276=function(_0x41a87a,_0xd8a15f){_0x41a87a=_0x41a87a-0x0;let _0x4276e3=_0xd8a1[_0x41a87a];return _0x4276e3;};import{cloneDeep as _0x17acb8,isEqual as _0x55b28a,isObject as _0x34135b}from'lodash-es';export function getPositionShiftedBy(_0x5b2345,_0x2ddecd){const _0x4b7463=_0x17acb8(_0x5b2345);return _0x4b7463[_0x4276('0x2')][_0x4b7463[_0x4276('0x2')][_0x4276('0x4')]-0x1]+=_0x2ddecd,_0x4b7463;}export function arePositionsEqual(_0x236c79,_0x36658b){return _0x236c79['root']===_0x36658b[_0x4276('0x1')]&&_0x55b28a(_0x236c79[_0x4276('0x2')],_0x36658b[_0x4276('0x2')]);}export function parsePositionBeforeCompression(_0x3fe850){P(_0x3fe850,_0x459707=>('main'==_0x459707[_0x4276('0x1')]?(_0x459707[_0x4276('0x0')]=!0x0,delete _0x459707[_0x4276('0x1')]):_0x4276('0x7')==_0x459707[_0x4276('0x1')]&&(_0x459707[_0x4276('0x3')]=!0x0,delete _0x459707[_0x4276('0x1')]),_0x459707));}export function parsePositionAfterCompression(_0x60cd6d){P(_0x60cd6d,_0x66b08b=>(_0x66b08b[_0x4276('0x0')]?(_0x66b08b['root']=_0x4276('0x5'),delete _0x66b08b['rootMain']):_0x66b08b['rootGraveyard']&&(_0x66b08b[_0x4276('0x1')]='$graveyard',delete _0x66b08b[_0x4276('0x3')]),_0x66b08b));}function P(_0x3c08f0,_0x407037){for(const _0x24de77 in _0x3c08f0){const _0x56e718=_0x3c08f0[_0x24de77];_0x4276('0x6')!==_0x24de77&&_0x34135b(_0x56e718)&&(_0x56e718['path']&&(_0x56e718[_0x4276('0x1')]||_0x56e718[_0x4276('0x0')]||_0x56e718[_0x4276('0x3')])?_0x3c08f0[_0x24de77]=_0x407037(_0x56e718):P(_0x56e718,_0x407037));}return _0x3c08f0;}