@kodexa-ai/document-wasm-ts 8.0.0-develop-20663153063 → 8.0.0-develop-20664344428

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.
@@ -0,0 +1,370 @@
1
+ /**
2
+ * KodexaWorkerDocument - Document Proxy for Web Worker WASM
3
+ *
4
+ * This class provides a document API that mirrors KddbDocument but
5
+ * routes all operations through the web worker via RPC.
6
+ */
7
+ import { KodexaWorkerNode } from './KodexaWorkerNode';
8
+ /**
9
+ * Document proxy that routes operations to the web worker.
10
+ */
11
+ export class KodexaWorkerDocument {
12
+ /**
13
+ * Create a new document proxy.
14
+ * This should not be called directly - use KodexaWorker.createDocument() instead.
15
+ *
16
+ * @param worker The worker instance to route calls through
17
+ * @param docRef The document reference from the worker
18
+ */
19
+ constructor(worker, docRef) {
20
+ this.worker = worker;
21
+ this.docRef = docRef;
22
+ this.disposed = false;
23
+ }
24
+ /**
25
+ * Get the document reference (for internal use).
26
+ */
27
+ getDocumentRef() {
28
+ this.checkDisposed();
29
+ return this.docRef;
30
+ }
31
+ /**
32
+ * Check if the document has been disposed.
33
+ */
34
+ checkDisposed() {
35
+ if (this.disposed) {
36
+ throw new Error('Document has been disposed');
37
+ }
38
+ }
39
+ /**
40
+ * Parse JSON result, handling null and error cases.
41
+ */
42
+ parseJson(json) {
43
+ if (json === null || json === undefined || json === 'null') {
44
+ return null;
45
+ }
46
+ if (typeof json === 'string') {
47
+ try {
48
+ return JSON.parse(json);
49
+ }
50
+ catch {
51
+ return json;
52
+ }
53
+ }
54
+ return json;
55
+ }
56
+ // ============================================================================
57
+ // Core Document Operations
58
+ // ============================================================================
59
+ /**
60
+ * Get the root content node.
61
+ */
62
+ async getRoot() {
63
+ this.checkDisposed();
64
+ const resultJson = await this.worker.call('documentGetRoot', this.docRef);
65
+ const data = this.parseJson(resultJson);
66
+ if (!data)
67
+ return null;
68
+ return new KodexaWorkerNode(this.worker, data);
69
+ }
70
+ /**
71
+ * Get the root content node (alias for getRoot).
72
+ */
73
+ async getRootNode() {
74
+ return this.getRoot();
75
+ }
76
+ /**
77
+ * Convert document to JSON string.
78
+ */
79
+ async toJson() {
80
+ this.checkDisposed();
81
+ return this.worker.call('documentToJson', this.docRef);
82
+ }
83
+ /**
84
+ * Convert document to KDDB bytes.
85
+ */
86
+ async toKddbBytes() {
87
+ this.checkDisposed();
88
+ const result = await this.worker.call('documentToKddbBytes', this.docRef);
89
+ // The result might be a regular array, convert if needed
90
+ if (Array.isArray(result)) {
91
+ return new Uint8Array(result);
92
+ }
93
+ return result;
94
+ }
95
+ /**
96
+ * Get the document UUID.
97
+ */
98
+ async getUUID() {
99
+ this.checkDisposed();
100
+ return this.worker.call('documentGetUUID', this.docRef);
101
+ }
102
+ // ============================================================================
103
+ // Node Operations
104
+ // ============================================================================
105
+ /**
106
+ * Create a new node.
107
+ *
108
+ * @param nodeType The type of node to create (e.g., 'page', 'paragraph')
109
+ */
110
+ async createNode(nodeType) {
111
+ this.checkDisposed();
112
+ const resultJson = await this.worker.call('createNode', this.docRef, nodeType);
113
+ const data = this.parseJson(resultJson);
114
+ if (!data) {
115
+ throw new Error('Failed to create node');
116
+ }
117
+ return new KodexaWorkerNode(this.worker, data);
118
+ }
119
+ /**
120
+ * Find a node by its UUID.
121
+ */
122
+ async findNodeByUUID(uuid) {
123
+ this.checkDisposed();
124
+ const resultJson = await this.worker.call('documentGetNodeByUUID', this.docRef, uuid);
125
+ const data = this.parseJson(resultJson);
126
+ if (!data)
127
+ return null;
128
+ return new KodexaWorkerNode(this.worker, data);
129
+ }
130
+ /**
131
+ * Get node by ID (alias for findNodeByUUID).
132
+ */
133
+ async getNodeById(nodeId) {
134
+ return this.findNodeByUUID(nodeId);
135
+ }
136
+ // ============================================================================
137
+ // Selection Operations
138
+ // ============================================================================
139
+ /**
140
+ * Select nodes using a selector expression.
141
+ *
142
+ * @param selector Kodexa selector expression (e.g., '//paragraph', '//page[1]')
143
+ */
144
+ async select(selector) {
145
+ this.checkDisposed();
146
+ const resultJson = await this.worker.call('documentSelect', this.docRef, selector);
147
+ const results = this.parseJson(resultJson);
148
+ if (!results || !Array.isArray(results)) {
149
+ return [];
150
+ }
151
+ return results.map(data => new KodexaWorkerNode(this.worker, data));
152
+ }
153
+ /**
154
+ * Select the first node matching a selector.
155
+ *
156
+ * @param selector Kodexa selector expression
157
+ */
158
+ async selectFirst(selector) {
159
+ this.checkDisposed();
160
+ const resultJson = await this.worker.call('documentSelectFirst', this.docRef, selector);
161
+ const data = this.parseJson(resultJson);
162
+ if (!data)
163
+ return null;
164
+ return new KodexaWorkerNode(this.worker, data);
165
+ }
166
+ // ============================================================================
167
+ // Metadata Operations
168
+ // ============================================================================
169
+ /**
170
+ * Get all metadata.
171
+ */
172
+ async getMetadata() {
173
+ this.checkDisposed();
174
+ const resultJson = await this.worker.call('documentGetMetadata', this.docRef);
175
+ const metadata = this.parseJson(resultJson);
176
+ return metadata || {};
177
+ }
178
+ /**
179
+ * Set metadata from object.
180
+ */
181
+ async setMetadata(metadata) {
182
+ this.checkDisposed();
183
+ await this.worker.call('documentSetMetadata', this.docRef, JSON.stringify(metadata));
184
+ }
185
+ // ============================================================================
186
+ // Exception Operations
187
+ // ============================================================================
188
+ /**
189
+ * Get all exceptions.
190
+ */
191
+ async getExceptions() {
192
+ this.checkDisposed();
193
+ const resultJson = await this.worker.call('documentGetExceptions', this.docRef);
194
+ const exceptions = this.parseJson(resultJson);
195
+ return Array.isArray(exceptions) ? exceptions : [];
196
+ }
197
+ /**
198
+ * Add an exception.
199
+ */
200
+ async addException(exception) {
201
+ this.checkDisposed();
202
+ await this.worker.call('documentAddException', this.docRef, JSON.stringify(exception));
203
+ }
204
+ // ============================================================================
205
+ // Tag Operations
206
+ // ============================================================================
207
+ /**
208
+ * Get all tags in the document.
209
+ */
210
+ async getAllTags() {
211
+ this.checkDisposed();
212
+ const resultJson = await this.worker.call('documentGetAllTags', this.docRef);
213
+ const tags = this.parseJson(resultJson);
214
+ return Array.isArray(tags) ? tags : [];
215
+ }
216
+ /**
217
+ * Get tags by prefix.
218
+ */
219
+ async getTagsByPrefix(prefix) {
220
+ this.checkDisposed();
221
+ const resultJson = await this.worker.call('documentGetTagsByPrefix', this.docRef, prefix);
222
+ const tags = this.parseJson(resultJson);
223
+ return Array.isArray(tags) ? tags : [];
224
+ }
225
+ /**
226
+ * Find nodes by tag UUID.
227
+ */
228
+ async findNodesByTagUuid(tagUuid) {
229
+ this.checkDisposed();
230
+ const resultJson = await this.worker.call('documentFindNodesByTagUUID', this.docRef, tagUuid);
231
+ const results = this.parseJson(resultJson);
232
+ if (!results || !Array.isArray(results)) {
233
+ return [];
234
+ }
235
+ return results.map(data => new KodexaWorkerNode(this.worker, data));
236
+ }
237
+ // ============================================================================
238
+ // Document Statistics
239
+ // ============================================================================
240
+ /**
241
+ * Get document statistics.
242
+ */
243
+ async getStatistics() {
244
+ this.checkDisposed();
245
+ const resultJson = await this.worker.call('documentGetStatistics', this.docRef);
246
+ return this.parseJson(resultJson);
247
+ }
248
+ /**
249
+ * Get the number of pages.
250
+ */
251
+ async getNumPages() {
252
+ this.checkDisposed();
253
+ return this.worker.call('documentGetNodeCountByType', this.docRef, 'page');
254
+ }
255
+ /**
256
+ * Get document lines.
257
+ */
258
+ async getLines() {
259
+ this.checkDisposed();
260
+ const resultJson = await this.worker.call('documentGetLines', this.docRef);
261
+ const lines = this.parseJson(resultJson);
262
+ return Array.isArray(lines) ? lines : [];
263
+ }
264
+ // ============================================================================
265
+ // Source and Labels
266
+ // ============================================================================
267
+ /**
268
+ * Get document source.
269
+ */
270
+ async getSource() {
271
+ this.checkDisposed();
272
+ return this.worker.call('documentGetSource', this.docRef);
273
+ }
274
+ /**
275
+ * Set document source.
276
+ */
277
+ async setSource(source) {
278
+ this.checkDisposed();
279
+ await this.worker.call('documentSetSource', this.docRef, source);
280
+ }
281
+ /**
282
+ * Get document labels.
283
+ */
284
+ async getLabels() {
285
+ this.checkDisposed();
286
+ const resultJson = await this.worker.call('documentGetLabels', this.docRef);
287
+ const labels = this.parseJson(resultJson);
288
+ return Array.isArray(labels) ? labels : [];
289
+ }
290
+ /**
291
+ * Add a label.
292
+ */
293
+ async addLabel(label) {
294
+ this.checkDisposed();
295
+ await this.worker.call('documentAddLabel', this.docRef, label);
296
+ }
297
+ /**
298
+ * Remove a label.
299
+ */
300
+ async removeLabel(label) {
301
+ this.checkDisposed();
302
+ await this.worker.call('documentRemoveLabel', this.docRef, label);
303
+ }
304
+ // ============================================================================
305
+ // External Data
306
+ // ============================================================================
307
+ /**
308
+ * Get external data by key.
309
+ */
310
+ async getExternalData(key) {
311
+ this.checkDisposed();
312
+ const resultJson = await this.worker.call('documentGetExternalData', this.docRef, key);
313
+ return this.parseJson(resultJson);
314
+ }
315
+ /**
316
+ * Set external data.
317
+ */
318
+ async setExternalData(key, data) {
319
+ this.checkDisposed();
320
+ await this.worker.call('documentSetExternalData', this.docRef, key, JSON.stringify(data));
321
+ }
322
+ /**
323
+ * Get external data keys.
324
+ */
325
+ async getExternalDataKeys() {
326
+ this.checkDisposed();
327
+ const resultJson = await this.worker.call('documentGetExternalDataKeys', this.docRef);
328
+ const keys = this.parseJson(resultJson);
329
+ return Array.isArray(keys) ? keys : [];
330
+ }
331
+ // ============================================================================
332
+ // Processing Steps
333
+ // ============================================================================
334
+ /**
335
+ * Get processing steps.
336
+ */
337
+ async getSteps() {
338
+ this.checkDisposed();
339
+ const resultJson = await this.worker.call('documentGetSteps', this.docRef);
340
+ const steps = this.parseJson(resultJson);
341
+ return Array.isArray(steps) ? steps : [];
342
+ }
343
+ /**
344
+ * Set processing steps.
345
+ */
346
+ async setSteps(steps) {
347
+ this.checkDisposed();
348
+ await this.worker.call('documentSetSteps', this.docRef, JSON.stringify(steps));
349
+ }
350
+ // ============================================================================
351
+ // Lifecycle
352
+ // ============================================================================
353
+ /**
354
+ * Dispose of the document and free resources.
355
+ */
356
+ async dispose() {
357
+ if (this.disposed) {
358
+ return;
359
+ }
360
+ this.disposed = true;
361
+ await this.worker.call('freeDocument', this.docRef);
362
+ }
363
+ /**
364
+ * Alias for dispose() for compatibility.
365
+ */
366
+ async destroy() {
367
+ return this.dispose();
368
+ }
369
+ }
370
+ //# sourceMappingURL=KodexaWorkerDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KodexaWorkerDocument.js","sourceRoot":"","sources":["../../src/worker/KodexaWorkerDocument.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAuBtD;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAG/B;;;;;;OAMG;IACH,YACU,MAAoB,EACpB,MAAc;QADd,WAAM,GAAN,MAAM,CAAc;QACpB,WAAM,GAAN,MAAM,CAAQ;QAXhB,aAAQ,GAAG,KAAK,CAAC;IAYtB,CAAC;IAEJ;;OAEG;IACH,cAAc;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;OAEG;IACK,aAAa;QACnB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED;;OAEG;IACK,SAAS,CAAC,IAAa;QAC7B,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,+EAA+E;IAC/E,2BAA2B;IAC3B,+EAA+E;IAE/E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routes all operations through the web worker via RPC.
6
+ *
7
+ * Core properties (id, type, content, etc.) are hydrated at creation
8
+ * and can be accessed synchronously. Methods that require database
9
+ * operations are async and route through the worker.
10
+ */
11
+ import type { KodexaWorker } from './KodexaWorker';
12
+ import type { WorkerNodeData } from './types';
13
+ /**
14
+ * Bounding box for spatial operations.
15
+ */
16
+ export interface BoundingBox {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ }
22
+ /**
23
+ * Feature attached to a node.
24
+ */
25
+ export interface ContentFeature {
26
+ featureType: string;
27
+ name: string;
28
+ value: unknown[];
29
+ single: boolean;
30
+ start?: number;
31
+ end?: number;
32
+ uuid?: string;
33
+ }
34
+ /**
35
+ * Tag options for tagging operations.
36
+ */
37
+ export interface TagOptions {
38
+ confidence?: number;
39
+ value?: unknown;
40
+ uuid?: string;
41
+ start?: number;
42
+ end?: number;
43
+ }
44
+ /**
45
+ * Node proxy that routes operations to the web worker.
46
+ */
47
+ export declare class KodexaWorkerNode {
48
+ private worker;
49
+ private nodeRef;
50
+ private disposed;
51
+ readonly id: number;
52
+ readonly parentId: number | null;
53
+ type: string;
54
+ content: string;
55
+ index: number | null;
56
+ virtual: boolean;
57
+ confidence: number | null;
58
+ /**
59
+ * Create a new node proxy.
60
+ * This should not be called directly - nodes are returned from document operations.
61
+ *
62
+ * @param worker The worker instance to route calls through
63
+ * @param data The node data from the worker
64
+ */
65
+ constructor(worker: KodexaWorker, data: WorkerNodeData);
66
+ /**
67
+ * Check if the node has been disposed.
68
+ */
69
+ private checkDisposed;
70
+ /**
71
+ * Parse JSON result, handling null and error cases.
72
+ */
73
+ private parseJson;
74
+ /**
75
+ * Get the node reference (for internal use).
76
+ */
77
+ getNodeRef(): number;
78
+ /**
79
+ * Get the UUID of this node (string representation of ID).
80
+ */
81
+ get uuid(): string;
82
+ /**
83
+ * Save all mutable properties to the database.
84
+ *
85
+ * Modify properties directly (type, content, index, virtual, confidence),
86
+ * then call save() to persist the changes.
87
+ *
88
+ * @example
89
+ * node.content = "Updated text";
90
+ * node.type = "paragraph";
91
+ * await node.save();
92
+ */
93
+ save(): Promise<void>;
94
+ /**
95
+ * Get node content (refreshes from worker).
96
+ */
97
+ getContent(): Promise<string>;
98
+ /**
99
+ * Set node content.
100
+ */
101
+ setContent(content: string): Promise<void>;
102
+ /**
103
+ * Get all content from this node and descendants.
104
+ */
105
+ getAllContent(): Promise<string>;
106
+ /**
107
+ * Get the parent node.
108
+ */
109
+ getParent(): Promise<KodexaWorkerNode | null>;
110
+ /**
111
+ * Get child nodes.
112
+ */
113
+ getChildren(): Promise<KodexaWorkerNode[]>;
114
+ /**
115
+ * Get number of children.
116
+ */
117
+ getChildCount(): Promise<number>;
118
+ /**
119
+ * Get a specific child by index.
120
+ */
121
+ getChild(index: number): Promise<KodexaWorkerNode | null>;
122
+ /**
123
+ * Get the first child.
124
+ */
125
+ getFirstChild(): Promise<KodexaWorkerNode | null>;
126
+ /**
127
+ * Get the last child.
128
+ */
129
+ getLastChild(): Promise<KodexaWorkerNode | null>;
130
+ /**
131
+ * Get the next sibling.
132
+ */
133
+ getNextSibling(): Promise<KodexaWorkerNode | null>;
134
+ /**
135
+ * Get the previous sibling.
136
+ */
137
+ getPreviousSibling(): Promise<KodexaWorkerNode | null>;
138
+ /**
139
+ * Get all siblings.
140
+ */
141
+ getSiblings(): Promise<KodexaWorkerNode[]>;
142
+ /**
143
+ * Get all ancestors.
144
+ */
145
+ getAncestors(): Promise<KodexaWorkerNode[]>;
146
+ /**
147
+ * Get all descendants.
148
+ */
149
+ getDescendants(): Promise<KodexaWorkerNode[]>;
150
+ /**
151
+ * Check if this is the root node.
152
+ */
153
+ isRoot(): Promise<boolean>;
154
+ /**
155
+ * Check if this is a leaf node (no children).
156
+ */
157
+ isLeaf(): Promise<boolean>;
158
+ /**
159
+ * Get the depth of this node in the tree.
160
+ */
161
+ getDepth(): Promise<number>;
162
+ /**
163
+ * Get the path of this node.
164
+ */
165
+ getPath(): Promise<string>;
166
+ /**
167
+ * Add a child node.
168
+ */
169
+ addChild(child: KodexaWorkerNode): Promise<void>;
170
+ /**
171
+ * Remove a child node.
172
+ */
173
+ removeChild(child: KodexaWorkerNode): Promise<void>;
174
+ /**
175
+ * Insert a child at a specific index.
176
+ */
177
+ insertChild(child: KodexaWorkerNode, index: number): Promise<void>;
178
+ /**
179
+ * Select nodes relative to this node.
180
+ */
181
+ select(selector: string): Promise<KodexaWorkerNode[]>;
182
+ /**
183
+ * Select first node relative to this node.
184
+ */
185
+ selectFirst(selector: string): Promise<KodexaWorkerNode | null>;
186
+ /**
187
+ * Check if this node matches a selector.
188
+ */
189
+ matches(selector: string): Promise<boolean>;
190
+ /**
191
+ * Add a tag to this node.
192
+ */
193
+ tag(tagName: string, options?: TagOptions): Promise<void>;
194
+ /**
195
+ * Get all tags on this node.
196
+ */
197
+ getTags(): Promise<string[]>;
198
+ /**
199
+ * Check if this node has a specific tag.
200
+ */
201
+ hasTag(tagName: string): Promise<boolean>;
202
+ /**
203
+ * Get the value of a tag.
204
+ */
205
+ getTagValue(tagName: string): Promise<unknown>;
206
+ /**
207
+ * Remove a tag from this node.
208
+ */
209
+ removeTag(tagName: string): Promise<void>;
210
+ /**
211
+ * Remove all tags from this node.
212
+ */
213
+ removeAllTags(): Promise<void>;
214
+ /**
215
+ * Set a feature on this node.
216
+ */
217
+ setFeature(featureType: string, name: string, value: unknown, config?: Record<string, unknown>): Promise<void>;
218
+ /**
219
+ * Get a feature from this node.
220
+ */
221
+ getFeature(featureType: string, name: string): Promise<ContentFeature | null>;
222
+ /**
223
+ * Get all features on this node.
224
+ */
225
+ getFeatures(): Promise<ContentFeature[]>;
226
+ /**
227
+ * Get features by type.
228
+ */
229
+ getFeaturesByType(featureType: string): Promise<ContentFeature[]>;
230
+ /**
231
+ * Check if this node has a specific feature.
232
+ */
233
+ hasFeature(featureType: string, name: string): Promise<boolean>;
234
+ /**
235
+ * Get the value of a feature.
236
+ */
237
+ getFeatureValue(featureType: string, name: string): Promise<unknown>;
238
+ /**
239
+ * Remove a feature from this node.
240
+ */
241
+ removeFeature(featureType: string, name: string): Promise<void>;
242
+ /**
243
+ * Remove all features from this node.
244
+ */
245
+ removeAllFeatures(): Promise<void>;
246
+ /**
247
+ * Get the bounding box of this node.
248
+ */
249
+ getBBox(): Promise<BoundingBox | null>;
250
+ /**
251
+ * Set the bounding box of this node.
252
+ */
253
+ setBBox(x: number, y: number, width: number, height: number): Promise<void>;
254
+ /**
255
+ * Clear the bounding box of this node.
256
+ */
257
+ clearBBox(): Promise<void>;
258
+ /**
259
+ * Check if this node has a bounding box.
260
+ */
261
+ hasBBox(): Promise<boolean>;
262
+ /**
263
+ * Convert this node to JSON.
264
+ */
265
+ toJson(): Promise<string>;
266
+ /**
267
+ * Delete this node from the document.
268
+ */
269
+ delete(): Promise<void>;
270
+ /**
271
+ * Dispose of this node proxy.
272
+ * Note: This only disposes the proxy, not the node in the document.
273
+ */
274
+ dispose(): void;
275
+ }
276
+ //# sourceMappingURL=KodexaWorkerNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KodexaWorkerNode.d.ts","sourceRoot":"","sources":["../../src/worker/KodexaWorkerNode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,C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