@ckeditor/ckeditor5-operations-compressor 41.2.1 → 41.3.0-alpha.2
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.
- package/dist/content-index.css +4 -0
- package/dist/editor-index.css +4 -0
- package/dist/index.css +4 -0
- package/dist/types/actioncompressor/actioncompressor.d.ts +64 -0
- package/dist/types/actioncompressor/deletingactioncompressor.d.ts +32 -0
- package/dist/types/actioncompressor/forwarddeletingactioncompressor.d.ts +32 -0
- package/dist/types/actioncompressor/typingactioncompressor.d.ts +32 -0
- package/dist/types/actioncompressor/userselectionactioncompressor.d.ts +20 -0
- package/dist/types/compressor.d.ts +49 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/operationcompressor/annotationmarkeroperationcompressor.d.ts +26 -0
- package/dist/types/operationcompressor/attributeoperationcompressor.d.ts +21 -0
- package/dist/types/operationcompressor/insertoperationcompressor.d.ts +21 -0
- package/dist/types/operationcompressor/markeroperationcompressor.d.ts +17 -0
- package/dist/types/operationcompressor/nooperationcompressor.d.ts +24 -0
- package/dist/types/operationcompressor/operationcompressor.d.ts +32 -0
- package/dist/types/protobufdescriptions.d.ts +8 -0
- package/dist/types/protobuffactory.d.ts +9 -0
- package/dist/types/utils.d.ts +34 -0
- package/package.json +3 -2
- package/src/actioncompressor/actioncompressor.js +1 -1
- package/src/actioncompressor/deletingactioncompressor.js +1 -1
- package/src/actioncompressor/forwarddeletingactioncompressor.js +1 -1
- package/src/actioncompressor/typingactioncompressor.js +1 -1
- package/src/actioncompressor/userselectionactioncompressor.js +1 -1
- package/src/compressor.js +1 -1
- package/src/index.d.ts +5 -0
- package/src/index.js +23 -0
- package/src/lib/compiledmessages.js +1 -1
- package/src/operationcompressor/annotationmarkeroperationcompressor.js +1 -1
- package/src/operationcompressor/attributeoperationcompressor.js +1 -1
- package/src/operationcompressor/insertoperationcompressor.js +1 -1
- package/src/operationcompressor/markeroperationcompressor.js +1 -1
- package/src/operationcompressor/nooperationcompressor.js +1 -1
- package/src/operationcompressor/operationcompressor.js +1 -1
- package/src/protobufdescriptions.js +1 -1
- package/src/protobuffactory.js +1 -1
- package/src/utils.js +1 -1
package/dist/index.css
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { CompressedOperationsData, default as Compressor } from '../compressor.js';
|
|
10
|
+
/**
|
|
11
|
+
* * Compresses and decompresses multiple operations into the one buffer.
|
|
12
|
+
*/
|
|
13
|
+
export default abstract class ActionCompressor {
|
|
14
|
+
constructor(id: number, context: Compressor);
|
|
15
|
+
/**
|
|
16
|
+
* Combines and compress operations from the list.
|
|
17
|
+
* Operations are consumed as long as match this compressor.
|
|
18
|
+
*
|
|
19
|
+
* @param result Object to which compression result should be added.
|
|
20
|
+
* @param operations List of operations in JSON format to compress.
|
|
21
|
+
* @returns `true` when operation is consumed `false` otherwise.
|
|
22
|
+
*/
|
|
23
|
+
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Decompress and split compressed operations. Decompressed operations are consumed (removed from the input data).
|
|
26
|
+
*
|
|
27
|
+
* @param result Decompressed operations in JSON format.
|
|
28
|
+
* @param data Compressed operations data.
|
|
29
|
+
*/
|
|
30
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
31
|
+
/**
|
|
32
|
+
* Compresses single operation using a proper compressor.
|
|
33
|
+
*
|
|
34
|
+
* @param operation Operation in JSON format.
|
|
35
|
+
* @returns Operation JSON compressed to the binary format.
|
|
36
|
+
*/
|
|
37
|
+
protected abstract _compressSingleOperation(operation: any): Uint8Array;
|
|
38
|
+
/**
|
|
39
|
+
* Decompresses combined operation using a proper compressor.
|
|
40
|
+
*
|
|
41
|
+
* @param data Data to compress.
|
|
42
|
+
* @returns Decompressed operation in JSON format.
|
|
43
|
+
*/
|
|
44
|
+
protected abstract _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
45
|
+
/**
|
|
46
|
+
* Combine next operation into the combined one.
|
|
47
|
+
*
|
|
48
|
+
* @param nextOperation Operation to combine in JSON format.
|
|
49
|
+
* @param combined Combined operation in JSON format.
|
|
50
|
+
* @returns Combined operation in JSON format.
|
|
51
|
+
*/
|
|
52
|
+
protected abstract _combineNext(nextOperation: any, combined: any): any;
|
|
53
|
+
/**
|
|
54
|
+
* Split operation from combined one.
|
|
55
|
+
*
|
|
56
|
+
* @param combined Combined operation in JSON format.
|
|
57
|
+
* @returns Split operation in JSON format.
|
|
58
|
+
*/
|
|
59
|
+
protected abstract _splitCurrent(combined: any): any;
|
|
60
|
+
/**
|
|
61
|
+
* Checks if two operations can be combined.
|
|
62
|
+
*/
|
|
63
|
+
protected abstract _compareOperations(opA: any, opB: any): boolean;
|
|
64
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import ActionCompressor from './actioncompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
export default class DeletingActionCompressor extends ActionCompressor {
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _splitCurrent(combined: any): any;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import ActionCompressor from './actioncompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
export default class ForwardDeletingActionCompressor extends ActionCompressor {
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _splitCurrent(combined: any): any;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import ActionCompressor from './actioncompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
export default class TypingActionCompressor extends ActionCompressor {
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDocs
|
|
14
|
+
*/
|
|
15
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _splitCurrent(combined: any): any;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import ActionCompressor from './actioncompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
export default class UserSelectionActionCompressor extends ActionCompressor {
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Compresses and decompresses given set of operations in JSON format to/from the binary format using `Protocol Buffers`.
|
|
11
|
+
*/
|
|
12
|
+
export default class Compressor {
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Compress given list of operations in JSON format.
|
|
16
|
+
*
|
|
17
|
+
* **Note** It tries to combine typing-like or deleting-like operations into the one buffer.
|
|
18
|
+
* **Note** Input data will be consumed and modified during compression process. If you need untouched data
|
|
19
|
+
* you need to copy it before the compression.
|
|
20
|
+
*/
|
|
21
|
+
compress(operations: Array<any>): CompressedOperationsData;
|
|
22
|
+
/**
|
|
23
|
+
* Decompress given data to the list of operations in JSON format.
|
|
24
|
+
*
|
|
25
|
+
* **Note** Input data will be consumed during decompression process. If you need untouched data
|
|
26
|
+
* you need to copy it before the decompression.
|
|
27
|
+
*
|
|
28
|
+
* @param data Compressed operations.
|
|
29
|
+
* @returns List of operations in JSON format.
|
|
30
|
+
*/
|
|
31
|
+
decompress(data: CompressedOperationsData): Array<any>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Compressed operations data.
|
|
35
|
+
*/
|
|
36
|
+
export type CompressedOperationsData = {
|
|
37
|
+
/**
|
|
38
|
+
* List of operations compressed to the binary format.
|
|
39
|
+
*/
|
|
40
|
+
buffers: Array<Uint8Array>;
|
|
41
|
+
/**
|
|
42
|
+
* List of compressor identifiers. According to this types a proper compressor will be used for the decompression.
|
|
43
|
+
*/
|
|
44
|
+
types: Array<number>;
|
|
45
|
+
/**
|
|
46
|
+
* Base version of the first compressed operation.
|
|
47
|
+
*/
|
|
48
|
+
baseVersion: number;
|
|
49
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
export * from './compressor.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import MarkerOperationCompressor from './markeroperationcompressor.js';
|
|
10
|
+
import type { ProtobufDescriptor } from '../protobuffactory.js';
|
|
11
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
12
|
+
import type { MarkerOperation } from 'ckeditor5/src/engine.js';
|
|
13
|
+
export default class AnnotationMarkerOperationCompressor extends MarkerOperationCompressor {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
constructor(id: number, name: string, descriptor: ProtobufDescriptor, namespaceToOmit: string);
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
compress(result: CompressedOperationsData, operations: Array<MarkerOperation>): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import OperationCompressor from './operationcompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
import type { AttributeOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
export default class AttributeOperationCompressor extends OperationCompressor {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
compress(result: CompressedOperationsData, operations: Array<AttributeOperation>): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
decompress(result: Array<AttributeOperation>, data: CompressedOperationsData): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import OperationCompressor from './operationcompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
import type { InsertOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
export default class InsertOperationCompressor extends OperationCompressor {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
compress(result: CompressedOperationsData, operations: Array<InsertOperation>): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
decompress(result: Array<InsertOperation>, data: CompressedOperationsData): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import OperationCompressor from './operationcompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
import type { MarkerOperation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
export default class MarkerOperationCompressor extends OperationCompressor {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
decompress(result: Array<MarkerOperation>, data: CompressedOperationsData): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import OperationCompressor from './operationcompressor.js';
|
|
10
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
11
|
+
import type { Operation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
/**
|
|
13
|
+
* @extends OperationCompressor
|
|
14
|
+
*/
|
|
15
|
+
export default class NoOperationCompressor extends OperationCompressor {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { CompressedOperationsData } from '../compressor.js';
|
|
10
|
+
import type { ProtobufDescriptor } from '../protobuffactory.js';
|
|
11
|
+
import type { Operation } from 'ckeditor5/src/engine.js';
|
|
12
|
+
/**
|
|
13
|
+
* Compresses and decompresses single operation to the binary format.
|
|
14
|
+
*/
|
|
15
|
+
export default class OperationCompressor {
|
|
16
|
+
constructor(id: number, operationName: string, protobufDescriptor: ProtobufDescriptor);
|
|
17
|
+
/**
|
|
18
|
+
* Serializes and consumes the first operation from the list.
|
|
19
|
+
*
|
|
20
|
+
* @param result Object to which compression result will be added.
|
|
21
|
+
* @param operations List of operations to compress. The first one will be compressed
|
|
22
|
+
* and removed from the list.
|
|
23
|
+
*/
|
|
24
|
+
compress(result: CompressedOperationsData, operations: Array<Operation>): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Deserializes and consumes buffered operation.
|
|
27
|
+
*
|
|
28
|
+
* @param result Decompressed operation.
|
|
29
|
+
* @param data Data to decompress.
|
|
30
|
+
*/
|
|
31
|
+
decompress(result: Array<Operation>, data: CompressedOperationsData): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Return new position in JSON format shifted by given offset.
|
|
11
|
+
*
|
|
12
|
+
* @param positionJSON Position serialized to JSON.
|
|
13
|
+
* @param shift Offset shift. Can be a negative value.
|
|
14
|
+
* @returns New position in JSON format.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getPositionShiftedBy(positionJSON: any, shift: number): any;
|
|
17
|
+
/**
|
|
18
|
+
* Checks whether one position serialized to JSON is equal to other position serialized to JSON.
|
|
19
|
+
*/
|
|
20
|
+
export declare function arePositionsEqual(positionA: any, positionB: any): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* For the better compression result one of the two common roots (`main` or `$graveyard`)
|
|
23
|
+
* is compressed to the `Boolean` format.
|
|
24
|
+
*
|
|
25
|
+
* Due tu the Protobuf limitation `Position` descriptor has no dedicated compressor
|
|
26
|
+
* so we need to find and format all positions in the operation.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parsePositionBeforeCompression(operation: any): void;
|
|
29
|
+
/**
|
|
30
|
+
* Position reformatting after decompression.
|
|
31
|
+
*
|
|
32
|
+
* @see {parsePositionBeforeCompression}.
|
|
33
|
+
*/
|
|
34
|
+
export declare function parsePositionAfterCompression(operation: any): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-operations-compressor",
|
|
3
|
-
"version": "41.2
|
|
3
|
+
"version": "41.3.0-alpha.2",
|
|
4
4
|
"description": "CKEditor 5 operations compressor for real-time collaboration.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://ckeditor.com/collaboration/real-time/",
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"type": "module",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"ckeditor5": "41.2
|
|
34
|
+
"ckeditor5": "41.3.0-alpha.2",
|
|
35
35
|
"lodash-es": "4.17.21",
|
|
36
36
|
"protobufjs": "7.2.4"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
|
+
"dist",
|
|
39
40
|
"src/**/*.js",
|
|
40
41
|
"src/**/*.d.ts",
|
|
41
42
|
"CHANGELOG.md"
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
const _0x3b1fac=_0x229d;function _0x229d(_0x14162b,_0x4c9792){const _0x9cf1c4=_0x9cf1();return _0x229d=function(_0x229dc7,_0x743a74){_0x229dc7=_0x229dc7-0xd9;let _0xfa281a=_0x9cf1c4[_0x229dc7];return _0xfa281a;},_0x229d(_0x14162b,_0x4c9792);}function _0x9cf1(){const _0xc3a4f7=['_compressSingleOperation','6472571PtlqkU','2CzUGWt','types','compress','496278JivxVf','shift','1377345YlzNIW','5183640DPqqTc','6PYDqqH','buffers','_splitCurrent','push','_decompressSingleOperation','8886456bRtFsG','3421810FgnmeT','_compareOperations','860319XbbGOH','length','190POGwQY','decompress','_id','_combineNext','_context'];_0x9cf1=function(){return _0xc3a4f7;};return _0x9cf1();}(function(_0x5501c7,_0x157656){const _0x48f123=_0x229d,_0x234e58=_0x5501c7();while(!![]){try{const _0x5482d5=-parseInt(_0x48f123(0xe3))/0x1*(-parseInt(_0x48f123(0xde))/0x2)+parseInt(_0x48f123(0xe1))/0x3+-parseInt(_0x48f123(0xe4))/0x4+parseInt(_0x48f123(0xeb))/0x5+parseInt(_0x48f123(0xe5))/0x6*(-parseInt(_0x48f123(0xdd))/0x7)+-parseInt(_0x48f123(0xea))/0x8+-parseInt(_0x48f123(0xed))/0x9*(-parseInt(_0x48f123(0xef))/0xa);if(_0x5482d5===_0x157656)break;else _0x234e58['push'](_0x234e58['shift']());}catch(_0x1de332){_0x234e58['push'](_0x234e58['shift']());}}}(_0x9cf1,0xadd38));import{cloneDeep as _0xa7280a}from'lodash-es';export default class b{constructor(_0x48e48c,_0x2aa38a){const _0x94ccd5=_0x229d;this[_0x94ccd5(0xd9)]=_0x48e48c,this[_0x94ccd5(0xdb)]=_0x2aa38a;}[_0x3b1fac(0xe0)](_0x11b0ca,_0x4e9e36){const _0x223eff=_0x3b1fac;let _0x472df0;for(;_0x4e9e36[_0x223eff(0xee)]>0x1&&this[_0x223eff(0xec)](_0x4e9e36[0x0],_0x4e9e36[0x1]);)_0x472df0?(_0x472df0=this[_0x223eff(0xda)](_0x4e9e36[_0x223eff(0xe2)](),_0x472df0),_0x11b0ca[_0x223eff(0xdf)][_0x223eff(0xe8)](0x0)):(_0x472df0=_0xa7280a(_0x4e9e36[_0x223eff(0xe2)]()),_0x11b0ca[_0x223eff(0xdf)][_0x223eff(0xe8)](this[_0x223eff(0xd9)]));return!!_0x472df0&&(_0x472df0=this[_0x223eff(0xda)](_0x4e9e36[_0x223eff(0xe2)](),_0x472df0),_0x11b0ca[_0x223eff(0xdf)][_0x223eff(0xe8)](0x0),_0x11b0ca[_0x223eff(0xe6)][_0x223eff(0xe8)](this[_0x223eff(0xdc)](_0x472df0)),!0x0);}[_0x3b1fac(0xf0)](_0x411f00,_0x190083){const _0x38be08=_0x3b1fac,_0x31a300=this[_0x38be08(0xe9)](_0x190083);for(;0x0==_0x190083[_0x38be08(0xdf)][0x0];)_0x190083[_0x38be08(0xdf)][_0x38be08(0xe2)](),_0x411f00[_0x38be08(0xe8)](this[_0x38be08(0xe7)](_0x31a300));_0x411f00[_0x38be08(0xe8)](_0x31a300);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
const _0x366572=_0x4f2a;function _0x4f2a(_0x54c3be,_0xe7c08e){const _0x11059b=_0x1105();return _0x4f2a=function(_0x4f2a49,_0x14afb5){_0x4f2a49=_0x4f2a49-0xdc;let _0x486694=_0x11059b[_0x4f2a49];return _0x486694;},_0x4f2a(_0x54c3be,_0xe7c08e);}(function(_0x2625a8,_0x51acbd){const _0x1f186d=_0x4f2a,_0x403222=_0x2625a8();while(!![]){try{const _0x5050b0=-parseInt(_0x1f186d(0xe4))/0x1+-parseInt(_0x1f186d(0xe6))/0x2*(-parseInt(_0x1f186d(0xe3))/0x3)+parseInt(_0x1f186d(0xec))/0x4+parseInt(_0x1f186d(0xfa))/0x5*(parseInt(_0x1f186d(0xdc))/0x6)+-parseInt(_0x1f186d(0xf1))/0x7*(-parseInt(_0x1f186d(0xe2))/0x8)+-parseInt(_0x1f186d(0xf8))/0x9*(parseInt(_0x1f186d(0xf6))/0xa)+parseInt(_0x1f186d(0xf4))/0xb*(parseInt(_0x1f186d(0xe7))/0xc);if(_0x5050b0===_0x51acbd)break;else _0x403222['push'](_0x403222['shift']());}catch(_0x22f751){_0x403222['push'](_0x403222['shift']());}}}(_0x1105,0xef727));import _0x46b156 from'./actioncompressor.js';import{arePositionsEqual as _0x47a7f4,getPositionShiftedBy as _0x1f2fda}from'../utils.js';function _0x1105(){const _0x2453e0=['74832IpTQFt','_compressSingleOperation','_checkOperation','__className','_compareOperations','5582252qfKfFG','buffers','_splitCurrent','$graveyard','MoveOperation','18480dZROoA','_decompressSingleOperation','_getCompressorByName','627tlShhR','targetPosition','9770JFblFQ','howMany','5868UtLgwb','decompress','198185rvkQoX','78KIgRta','_combineNext','root','_context','sourcePosition','compress','488Nobcba','172704rhsjtF','924693eZYjyx','wasUndone','4zFJKHs'];_0x1105=function(){return _0x2453e0;};return _0x1105();}import{cloneDeep as _0x29a926}from'lodash-es';export default class c extends _0x46b156{[_0x366572(0xdd)](_0x39a3bf,_0x3616ce){const _0x3d1f1f=_0x366572;return _0x3616ce[_0x3d1f1f(0xf7)]++,_0x3616ce[_0x3d1f1f(0xe0)]=_0x29a926(_0x39a3bf[_0x3d1f1f(0xe0)]),_0x3616ce;}[_0x366572(0xee)](_0x31c169){const _0x5086bf=_0x366572,_0x1ebd65=_0x29a926(_0x31c169);return _0x31c169[_0x5086bf(0xf7)]--,_0x1ebd65[_0x5086bf(0xf7)]=0x1,_0x1ebd65[_0x5086bf(0xe0)]=_0x1f2fda(_0x1ebd65[_0x5086bf(0xe0)],_0x31c169[_0x5086bf(0xf7)]),_0x1ebd65;}[_0x366572(0xeb)](_0x23e47e,_0x33bbb0){const _0x650ede=_0x366572;return!(!this[_0x650ede(0xe9)](_0x23e47e)||!this[_0x650ede(0xe9)](_0x33bbb0))&&(_0x47a7f4(_0x1f2fda(_0x23e47e[_0x650ede(0xe0)],-0x1),_0x33bbb0[_0x650ede(0xe0)])&&_0x47a7f4(_0x23e47e[_0x650ede(0xf5)],_0x33bbb0[_0x650ede(0xf5)]));}[_0x366572(0xe8)](_0x3b744a){const _0x3301d1=_0x366572,_0x556478={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x3301d1(0xdf)][_0x3301d1(0xf3)](_0x3301d1(0xf0))[_0x3301d1(0xe1)](_0x556478,[_0x3b744a]),_0x556478[_0x3301d1(0xed)][0x0];}[_0x366572(0xf2)](_0x5ede1b){const _0x50affb=_0x366572,_0x2f2771=[];return this[_0x50affb(0xdf)][_0x50affb(0xf3)](_0x50affb(0xf0))[_0x50affb(0xf9)](_0x2f2771,_0x5ede1b),_0x2f2771[0x0];}[_0x366572(0xe9)](_0x1c9959){const _0x6d6fd9=_0x366572;return _0x6d6fd9(0xf0)==_0x1c9959[_0x6d6fd9(0xea)]&&_0x6d6fd9(0xef)==_0x1c9959[_0x6d6fd9(0xf5)][_0x6d6fd9(0xde)]&&0x1==_0x1c9959[_0x6d6fd9(0xf7)]&&!_0x1c9959[_0x6d6fd9(0xe5)];}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x41af2c=_0x85f2;(function(_0x3ed98b,_0x35a421){const _0x44ed25=_0x85f2,_0x4eee7c=_0x3ed98b();while(!![]){try{const _0x52aef9=parseInt(_0x44ed25(0x105))/0x1*(-parseInt(_0x44ed25(0x11b))/0x2)+parseInt(_0x44ed25(0x109))/0x3*(parseInt(_0x44ed25(0x11f))/0x4)+-parseInt(_0x44ed25(0x123))/0x5*(-parseInt(_0x44ed25(0x10e))/0x6)+parseInt(_0x44ed25(0x115))/0x7+-parseInt(_0x44ed25(0x107))/0x8+-parseInt(_0x44ed25(0x10a))/0x9*(-parseInt(_0x44ed25(0x121))/0xa)+-parseInt(_0x44ed25(0x10c))/0xb*(parseInt(_0x44ed25(0x11c))/0xc);if(_0x52aef9===_0x35a421)break;else _0x4eee7c['push'](_0x4eee7c['shift']());}catch(_0x39f81b){_0x4eee7c['push'](_0x4eee7c['shift']());}}}(_0x49a3,0xd003a));import _0x31c951 from'./actioncompressor.js';import{arePositionsEqual as _0x4a217c}from'../utils.js';import{cloneDeep as _0x5d54e2}from'lodash-es';function _0x85f2(_0x31a055,_0x356bb0){const _0x49a3cd=_0x49a3();return _0x85f2=function(_0x85f237,_0xc733da){_0x85f237=_0x85f237-0x105;let _0x484480=_0x49a3cd[_0x85f237];return _0x484480;},_0x85f2(_0x31a055,_0x356bb0);}export default class h extends _0x31c951{[_0x41af2c(0x119)](_0x5eaab8,_0x5af223){const _0x2f2b8e=_0x41af2c;return _0x5af223[_0x2f2b8e(0x110)]++,_0x5af223;}[_0x41af2c(0x106)](_0x47deae){const _0x425acd=_0x41af2c,_0x4b1510=_0x5d54e2(_0x47deae);return _0x4b1510[_0x425acd(0x110)]=0x1,_0x47deae[_0x425acd(0x110)]--,_0x4b1510;}[_0x41af2c(0x111)](_0x4908cd,_0xae2b95){const _0x583cbf=_0x41af2c;return!(!this[_0x583cbf(0x117)](_0x4908cd)||!this[_0x583cbf(0x117)](_0xae2b95))&&(_0x4a217c(_0x4908cd[_0x583cbf(0x11d)],_0xae2b95[_0x583cbf(0x11d)])&&_0x4a217c(_0x4908cd[_0x583cbf(0x10b)],_0xae2b95[_0x583cbf(0x10b)]));}[_0x41af2c(0x118)](_0x20b7e8){const _0x4791df=_0x41af2c,_0x4f77d4={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x4791df(0x11a)][_0x4791df(0x114)](_0x4791df(0x113))[_0x4791df(0x112)](_0x4f77d4,[_0x20b7e8]),_0x4f77d4[_0x4791df(0x116)][0x0];}[_0x41af2c(0x10f)](_0x422176){const _0x3477e0=_0x41af2c,_0x56bb68=[];return this[_0x3477e0(0x11a)][_0x3477e0(0x114)](_0x3477e0(0x113))[_0x3477e0(0x10d)](_0x56bb68,_0x422176),_0x56bb68[0x0];}[_0x41af2c(0x117)](_0x2dd5ed){const _0xfaadbe=_0x41af2c;return _0xfaadbe(0x113)==_0x2dd5ed[_0xfaadbe(0x120)]&&_0xfaadbe(0x122)==_0x2dd5ed[_0xfaadbe(0x10b)][_0xfaadbe(0x11e)]&&0x1==_0x2dd5ed[_0xfaadbe(0x110)]&&!_0x2dd5ed[_0xfaadbe(0x108)];}}function _0x49a3(){const _0x3c7613=['buffers','_checkOperation','_compressSingleOperation','_combineNext','_context','520084goxbgB','2668584bngmzp','sourcePosition','root','3439784uZhxdy','__className','78710jilgSx','$graveyard','59440wgpXzS','5gPYpmU','_splitCurrent','3699960gLeavF','wasUndone','3usvojE','549xlyjrB','targetPosition','55JEIivv','decompress','354jeTDPO','_decompressSingleOperation','howMany','_compareOperations','compress','MoveOperation','_getCompressorByName','11796204cQUymh'];_0x49a3=function(){return _0x3c7613;};return _0x49a3();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5baf12=_0x42e2;function _0x42e2(_0x45c924,_0x8451d0){const _0x5773ad=_0x5773();return _0x42e2=function(_0x42e2f1,_0x39bd2b){_0x42e2f1=_0x42e2f1-0x114;let _0x800c16=_0x5773ad[_0x42e2f1];return _0x800c16;},_0x42e2(_0x45c924,_0x8451d0);}(function(_0x27e02d,_0x2db377){const _0x929130=_0x42e2,_0x3653da=_0x27e02d();while(!![]){try{const _0x3b8a93=-parseInt(_0x929130(0x125))/0x1+-parseInt(_0x929130(0x137))/0x2*(-parseInt(_0x929130(0x135))/0x3)+-parseInt(_0x929130(0x122))/0x4*(parseInt(_0x929130(0x130))/0x5)+parseInt(_0x929130(0x133))/0x6+parseInt(_0x929130(0x117))/0x7*(-parseInt(_0x929130(0x11f))/0x8)+parseInt(_0x929130(0x12d))/0x9+-parseInt(_0x929130(0x12f))/0xa;if(_0x3b8a93===_0x2db377)break;else _0x3653da['push'](_0x3653da['shift']());}catch(_0x1e8963){_0x3653da['push'](_0x3653da['shift']());}}}(_0x5773,0x2d705));function _0x5773(){const _0x174e74=['attributes','486428wipnrz','_compareAttributes','next','111954tdtqts','length','data','_context','_splitCurrent','keys','position','wasUndone','2941830vjTlYP','_getCompressorByName','3944910CqscPn','5FjNuXb','from','__className','1530450iYCNmz','value','39wgifiv','substr','55700SNCbML','buffers','compress','_compareOperations','_compressSingleOperation','3269BOALhH','iterator','_combineNext','every','InsertOperation','nodes','decompress','_checkOperation','2224eaIfLD','_decompressSingleOperation'];_0x5773=function(){return _0x174e74;};return _0x5773();}import _0x262197 from'./actioncompressor.js';import{arePositionsEqual as _0x744d45,getPositionShiftedBy as _0x1aacd2}from'../utils.js';import{cloneDeep as _0x18d550}from'lodash-es';export default class m extends _0x262197{[_0x5baf12(0x119)](_0x19a2d7,_0x11d86d){const _0x57ebc9=_0x5baf12;return _0x11d86d[_0x57ebc9(0x11c)][0x0][_0x57ebc9(0x127)]+=_0x19a2d7[_0x57ebc9(0x11c)][0x0][_0x57ebc9(0x127)],_0x11d86d;}[_0x5baf12(0x129)](_0x34a5ed){const _0x11ec7b=_0x5baf12,_0x15b5ab=_0x18d550(_0x34a5ed),_0x5f2f94=_0x15b5ab[_0x11ec7b(0x11c)][0x0],_0x9dabf6=_0x34a5ed[_0x11ec7b(0x11c)][0x0],_0x1e63ea=_0x9dabf6[_0x11ec7b(0x127)][Symbol[_0x11ec7b(0x118)]]()[_0x11ec7b(0x124)]()[_0x11ec7b(0x134)],_0x71c768=_0x1e63ea[_0x11ec7b(0x126)];return _0x5f2f94[_0x11ec7b(0x127)]=_0x1e63ea,_0x9dabf6[_0x11ec7b(0x127)]=_0x9dabf6[_0x11ec7b(0x127)][_0x11ec7b(0x136)](_0x71c768),_0x34a5ed[_0x11ec7b(0x12b)]=_0x1aacd2(_0x34a5ed[_0x11ec7b(0x12b)],_0x71c768),_0x15b5ab;}[_0x5baf12(0x115)](_0x17173b,_0x428963){const _0x4c481b=_0x5baf12;if(this[_0x4c481b(0x11e)](_0x17173b)&&this[_0x4c481b(0x11e)](_0x428963)){const _0x4f41af=_0x17173b[_0x4c481b(0x11c)][0x0][_0x4c481b(0x127)][_0x4c481b(0x126)],_0x462bc5=_0x744d45(_0x1aacd2(_0x17173b[_0x4c481b(0x12b)],_0x4f41af),_0x428963[_0x4c481b(0x12b)]),_0x4a64ac=_0x17173b[_0x4c481b(0x11c)][0x0],_0x40e07d=_0x428963[_0x4c481b(0x11c)][0x0];return _0x462bc5&&this[_0x4c481b(0x123)](_0x4a64ac,_0x40e07d);}return!0x1;}[_0x5baf12(0x116)](_0x4fedd2){const _0x3c5c30=_0x5baf12,_0x16258c={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x3c5c30(0x128)][_0x3c5c30(0x12e)](_0x3c5c30(0x11b))[_0x3c5c30(0x114)](_0x16258c,[_0x4fedd2]),_0x16258c[_0x3c5c30(0x138)][0x0];}[_0x5baf12(0x120)](_0x2ed4b2){const _0x5542ed=_0x5baf12,_0x5e427f=[];return this[_0x5542ed(0x128)][_0x5542ed(0x12e)](_0x5542ed(0x11b))[_0x5542ed(0x11d)](_0x5e427f,_0x2ed4b2),_0x5e427f[0x0];}[_0x5baf12(0x11e)](_0xc8203d){const _0x2e2b13=_0x5baf12;return _0x2e2b13(0x11b)==_0xc8203d[_0x2e2b13(0x132)]&&0x1==_0xc8203d[_0x2e2b13(0x11c)][_0x2e2b13(0x126)]&&_0xc8203d[_0x2e2b13(0x11c)][0x0][_0x2e2b13(0x127)]&&!_0xc8203d[_0x2e2b13(0x12c)]&&0x1==Array[_0x2e2b13(0x131)](_0xc8203d[_0x2e2b13(0x11c)][0x0][_0x2e2b13(0x127)])[_0x2e2b13(0x126)];}[_0x5baf12(0x123)](_0x2cd3e2,_0x173e0c){const _0x2f4e5f=_0x5baf12,_0x5c9337=Object[_0x2f4e5f(0x12a)](_0x2cd3e2[_0x2f4e5f(0x121)]||{}),_0x45a069=Object[_0x2f4e5f(0x12a)](_0x173e0c[_0x2f4e5f(0x121)]||{});return _0x5c9337[_0x2f4e5f(0x126)]===_0x45a069[_0x2f4e5f(0x126)]&&_0x5c9337[_0x2f4e5f(0x11a)](_0x95029b=>_0x173e0c[_0x2f4e5f(0x121)][_0x95029b]&&_0x173e0c[_0x2f4e5f(0x121)][_0x95029b]===_0x2cd3e2[_0x2f4e5f(0x121)][_0x95029b]);}}
|