@lionweb/utilities 0.6.9-beta.2 → 0.6.9-beta.3
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/README.md +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/m1/reference-utils.d.ts +54 -0
- package/dist/m1/reference-utils.d.ts.map +1 -0
- package/dist/m1/reference-utils.js +78 -0
- package/dist/m1/reference-utils.js.map +1 -0
- package/dist/m3/index.d.ts +2 -1
- package/dist/m3/index.d.ts.map +1 -1
- package/dist/m3/index.js +2 -1
- package/dist/m3/index.js.map +1 -1
- package/dist/m3/textualizer.d.ts.map +1 -1
- package/dist/m3/textualizer.js +6 -1
- package/dist/m3/textualizer.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,6 +28,10 @@ It contains utilities on top of the `core` package, such as:
|
|
|
28
28
|
|
|
29
29
|
* Make `withoutAnnotations` _not_ modify the original serialization chunk.
|
|
30
30
|
* (Use the `littoral-templates` package for textualization — of M2s, so far. This is a technical change, not a functional one, except for maybe some extra whitespace.)
|
|
31
|
+
* Add reference utilities that all return `ReferenceValue` objects:
|
|
32
|
+
* `referenceValues(<source node>, <extraction facade>)`: all references within the given scope.
|
|
33
|
+
* `incomingReferences(<target node(s)>, <search scope>, <extraction facade>)`: all (unique) references coming into the given target node(s) from the search scope.
|
|
34
|
+
* `referencesToOutOfScopeNodes(<scope>, <extraction facade>)` all reference targets that are not in the given scope.
|
|
31
35
|
|
|
32
36
|
### 0.6.8
|
|
33
37
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./hashing.js";
|
|
2
|
-
export * from "./utils
|
|
2
|
+
export * from "./m1/reference-utils.js";
|
|
3
3
|
export * from "./m3/index.js";
|
|
4
4
|
export * from "./serialization/index.js";
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./utils/json.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./hashing.js";
|
|
2
|
-
export * from "./utils
|
|
2
|
+
export * from "./m1/reference-utils.js";
|
|
3
3
|
export * from "./m3/index.js";
|
|
4
4
|
export * from "./serialization/index.js";
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./utils/json.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ExtractionFacade, Node, Reference } from "@lionweb/core";
|
|
2
|
+
/**
|
|
3
|
+
* Represents information about a source and target node related through a {@link Reference}.
|
|
4
|
+
* An index of `null` means that the reference is (at most) single-valued.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ReferenceValue<NT extends Node> {
|
|
7
|
+
readonly sourceNode: NT;
|
|
8
|
+
readonly targetNode: NT;
|
|
9
|
+
readonly reference: Reference;
|
|
10
|
+
readonly index: number | null;
|
|
11
|
+
constructor(sourceNode: NT, targetNode: NT, reference: Reference, index: number | null);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Finds all references within the given scope, as {@link ReferenceValue reference values}.
|
|
15
|
+
* To search within all nodes under a collection of root nodes,
|
|
16
|
+
* use _child extraction_ to compute all nodes in the forest hanging off of those root nodes as scope.
|
|
17
|
+
* Note that any reference is found uniquely,
|
|
18
|
+
* i.e. the returned {@link ReferenceValue reference values} are pairwise distinct,
|
|
19
|
+
* even if the scope passed contains duplicate nodes.
|
|
20
|
+
*
|
|
21
|
+
* @param scope - the {@link Node nodes} that are searched for references
|
|
22
|
+
* @param extractionFacade - an {@link ExtractionFacade} to reflect on nodes.
|
|
23
|
+
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
24
|
+
*/
|
|
25
|
+
export declare const referenceValues: <NT extends Node>(scope: NT[], extractionFacade: ExtractionFacade<NT>) => ReferenceValue<NT>[];
|
|
26
|
+
/**
|
|
27
|
+
* Finds all references coming into the given target node or any of the given target nodes,
|
|
28
|
+
* within the given scope, as {@link ReferenceValue reference values}.
|
|
29
|
+
* To search within all nodes under a collection of root nodes,
|
|
30
|
+
* use _child extraction_ to compute all nodes in the forest hanging off of those root nodes as scope.
|
|
31
|
+
* Note that any reference is found uniquely,
|
|
32
|
+
* i.e. the returned {@link ReferenceValue reference values} are pairwise distinct,
|
|
33
|
+
* even if the given target nodes or scope contain duplicate nodes.
|
|
34
|
+
*
|
|
35
|
+
* @param targetNodeOrNodes - one or more target {@link Node nodes} for which the incoming references are searched
|
|
36
|
+
* @param scope - the {@link Node nodes} that are searched for references
|
|
37
|
+
* @param extractionFacade - an {@link ExtractionFacade} to reflect on nodes.
|
|
38
|
+
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
39
|
+
*/
|
|
40
|
+
export declare const incomingReferences: <NT extends Node>(targetNodeOrNodes: NT | NT[], scope: NT[], extractionFacade: ExtractionFacade<NT>) => ReferenceValue<NT>[];
|
|
41
|
+
/**
|
|
42
|
+
* Finds all references to nodes that are not in the given scope, as {@link ReferenceValue reference values}.
|
|
43
|
+
* To search within all nodes under a collection of root nodes,
|
|
44
|
+
* use _child extraction_ to compute all nodes in the forest hanging off of those root nodes as scope.
|
|
45
|
+
* Note that any reference is found uniquely,
|
|
46
|
+
* i.e. the returned {@link ReferenceValue reference values} are pairwise distinct,
|
|
47
|
+
* even if the given scope contains duplicate nodes.
|
|
48
|
+
*
|
|
49
|
+
* @param scope - the {@link Node nodes} that form the scope of “reachable” nodes
|
|
50
|
+
* @param extractionFacade - an {@link ExtractionFacade} to reflect on nodes.
|
|
51
|
+
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
52
|
+
*/
|
|
53
|
+
export declare const referencesToOutOfScopeNodes: <NT extends Node>(scope: NT[], extractionFacade: ExtractionFacade<NT>) => ReferenceValue<NT>[];
|
|
54
|
+
//# sourceMappingURL=reference-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-utils.d.ts","sourceRoot":"","sources":["../../src/m1/reference-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAC,MAAM,eAAe,CAAA;AAG9E;;;GAGG;AACH,qBAAa,cAAc,CAAC,EAAE,SAAS,IAAI;aAEnB,UAAU,EAAE,EAAE;aACd,UAAU,EAAE,EAAE;aACd,SAAS,EAAE,SAAS;aACpB,KAAK,EAAE,MAAM,GAAG,IAAI;gBAHpB,UAAU,EAAE,EAAE,EACd,UAAU,EAAE,EAAE,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,GAAG,IAAI;CAE3C;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,gGA4B3B,CAAA;AAGD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,8HAQ9B,CAAA;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B,gGAK4C,CAAA"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { allFeaturesOf, Reference } from "@lionweb/core";
|
|
2
|
+
/**
|
|
3
|
+
* Represents information about a source and target node related through a {@link Reference}.
|
|
4
|
+
* An index of `null` means that the reference is (at most) single-valued.
|
|
5
|
+
*/
|
|
6
|
+
export class ReferenceValue {
|
|
7
|
+
constructor(sourceNode, targetNode, reference, index) {
|
|
8
|
+
this.sourceNode = sourceNode;
|
|
9
|
+
this.targetNode = targetNode;
|
|
10
|
+
this.reference = reference;
|
|
11
|
+
this.index = index;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Finds all references within the given scope, as {@link ReferenceValue reference values}.
|
|
16
|
+
* To search within all nodes under a collection of root nodes,
|
|
17
|
+
* use _child extraction_ to compute all nodes in the forest hanging off of those root nodes as scope.
|
|
18
|
+
* Note that any reference is found uniquely,
|
|
19
|
+
* i.e. the returned {@link ReferenceValue reference values} are pairwise distinct,
|
|
20
|
+
* even if the scope passed contains duplicate nodes.
|
|
21
|
+
*
|
|
22
|
+
* @param scope - the {@link Node nodes} that are searched for references
|
|
23
|
+
* @param extractionFacade - an {@link ExtractionFacade} to reflect on nodes.
|
|
24
|
+
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
25
|
+
*/
|
|
26
|
+
export const referenceValues = (scope, extractionFacade) => {
|
|
27
|
+
const visit = (sourceNode, reference) => {
|
|
28
|
+
if (reference.multiple) {
|
|
29
|
+
const targetNodes = extractionFacade.getFeatureValue(sourceNode, reference) ?? [];
|
|
30
|
+
return targetNodes
|
|
31
|
+
.map((targetNode, index) => new ReferenceValue(sourceNode, targetNode, reference, index));
|
|
32
|
+
}
|
|
33
|
+
const targetNode = extractionFacade.getFeatureValue(sourceNode, reference);
|
|
34
|
+
if (targetNode !== undefined) {
|
|
35
|
+
return [new ReferenceValue(sourceNode, targetNode, reference, null)];
|
|
36
|
+
}
|
|
37
|
+
return [];
|
|
38
|
+
};
|
|
39
|
+
return [...new Set(scope)] // ~ .distinct()
|
|
40
|
+
.flatMap((sourceNode) => allFeaturesOf(extractionFacade.classifierOf(sourceNode))
|
|
41
|
+
.filter((feature) => feature instanceof Reference)
|
|
42
|
+
.map((feature) => feature)
|
|
43
|
+
.flatMap((reference) => visit(sourceNode, reference)));
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Finds all references coming into the given target node or any of the given target nodes,
|
|
47
|
+
* within the given scope, as {@link ReferenceValue reference values}.
|
|
48
|
+
* To search within all nodes under a collection of root nodes,
|
|
49
|
+
* use _child extraction_ to compute all nodes in the forest hanging off of those root nodes as scope.
|
|
50
|
+
* Note that any reference is found uniquely,
|
|
51
|
+
* i.e. the returned {@link ReferenceValue reference values} are pairwise distinct,
|
|
52
|
+
* even if the given target nodes or scope contain duplicate nodes.
|
|
53
|
+
*
|
|
54
|
+
* @param targetNodeOrNodes - one or more target {@link Node nodes} for which the incoming references are searched
|
|
55
|
+
* @param scope - the {@link Node nodes} that are searched for references
|
|
56
|
+
* @param extractionFacade - an {@link ExtractionFacade} to reflect on nodes.
|
|
57
|
+
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
58
|
+
*/
|
|
59
|
+
export const incomingReferences = (targetNodeOrNodes, scope, extractionFacade) => {
|
|
60
|
+
const targetNodes = Array.isArray(targetNodeOrNodes) ? targetNodeOrNodes : [targetNodeOrNodes];
|
|
61
|
+
return referenceValues(scope, extractionFacade)
|
|
62
|
+
.filter((referenceValue) => targetNodes.indexOf(referenceValue.targetNode) > -1);
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Finds all references to nodes that are not in the given scope, as {@link ReferenceValue reference values}.
|
|
66
|
+
* To search within all nodes under a collection of root nodes,
|
|
67
|
+
* use _child extraction_ to compute all nodes in the forest hanging off of those root nodes as scope.
|
|
68
|
+
* Note that any reference is found uniquely,
|
|
69
|
+
* i.e. the returned {@link ReferenceValue reference values} are pairwise distinct,
|
|
70
|
+
* even if the given scope contains duplicate nodes.
|
|
71
|
+
*
|
|
72
|
+
* @param scope - the {@link Node nodes} that form the scope of “reachable” nodes
|
|
73
|
+
* @param extractionFacade - an {@link ExtractionFacade} to reflect on nodes.
|
|
74
|
+
* _Note_ that it's assumed that its {@link getFeatureValue} function doesn't throw.
|
|
75
|
+
*/
|
|
76
|
+
export const referencesToOutOfScopeNodes = (scope, extractionFacade) => referenceValues(scope, extractionFacade)
|
|
77
|
+
.filter((referenceValue) => scope.indexOf(referenceValue.targetNode) === -1);
|
|
78
|
+
//# sourceMappingURL=reference-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-utils.js","sourceRoot":"","sources":["../../src/m1/reference-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAA0B,SAAS,EAAC,MAAM,eAAe,CAAA;AAG9E;;;GAGG;AACH,MAAM,OAAO,cAAc;IACvB,YACoB,UAAc,EACd,UAAc,EACd,SAAoB,EACpB,KAAoB;QAHpB,eAAU,GAAV,UAAU,CAAI;QACd,eAAU,GAAV,UAAU,CAAI;QACd,cAAS,GAAT,SAAS,CAAW;QACpB,UAAK,GAAL,KAAK,CAAe;IACrC,CAAC;CACP;AAGD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC3B,KAAW,EACX,gBAAsC,EAClB,EAAE;IACtB,MAAM,KAAK,GAAG,CAAC,UAAc,EAAE,SAAoB,EAAwB,EAAE;QACzE,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,WAAW,GAAG,gBAAgB,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAS,IAAI,EAAE,CAAA;YACzF,OAA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O,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AACxF,CAAC,CAAA;AAGD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACvC,KAAW,EACX,gBAAsC,EAClB,EAAE,CACtB,eAAe,CAAC,KAAK,EAAE,gBAAgB,CAAC;KACnC,MAAM,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA"}
|
package/dist/m3/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./diagrams/Mermaid-generator.js";
|
|
2
2
|
export * from "./diagrams/PlantUML-generator.js";
|
|
3
|
-
export * from "./
|
|
3
|
+
export * from "./infer-languages.js";
|
|
4
4
|
export * from "./textualizer.js";
|
|
5
|
+
export * from "./ts-generation/ts-types-generator.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/m3/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/m3/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/m3/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uCAAuC,CAAA"}
|
package/dist/m3/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./diagrams/Mermaid-generator.js";
|
|
2
2
|
export * from "./diagrams/PlantUML-generator.js";
|
|
3
|
-
export * from "./
|
|
3
|
+
export * from "./infer-languages.js";
|
|
4
4
|
export * from "./textualizer.js";
|
|
5
|
+
export * from "./ts-generation/ts-types-generator.js";
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/m3/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/m3/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/m3/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uCAAuC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textualizer.d.ts","sourceRoot":"","sources":["../../src/m3/textualizer.ts"],"names":[],"mappings":"AAAA,OAAO,EASH,QAAQ,EASX,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"textualizer.d.ts","sourceRoot":"","sources":["../../src/m3/textualizer.ts"],"names":[],"mappings":"AAAA,OAAO,EASH,QAAQ,EASX,MAAM,eAAe,CAAA;AA0FtB,eAAO,MAAM,cAAc,aAAc,QAAQ,WACnB,CAAA;AAE9B,eAAO,MAAM,eAAe,cAAe,QAAQ,EAAE,KAAG,MAGnD,CAAA"}
|
package/dist/m3/textualizer.js
CHANGED
|
@@ -45,7 +45,12 @@ const asText = (node) => {
|
|
|
45
45
|
`language ${node.name}`,
|
|
46
46
|
indented([
|
|
47
47
|
`version: ${node.version}`,
|
|
48
|
-
|
|
48
|
+
node.dependsOn.length === 0
|
|
49
|
+
? []
|
|
50
|
+
: [
|
|
51
|
+
`dependsOn:`,
|
|
52
|
+
indented(node.dependsOn.map((language) => `${language.name} (${language.version})`))
|
|
53
|
+
],
|
|
49
54
|
`entities (↓name):`,
|
|
50
55
|
``,
|
|
51
56
|
indented(nameSorted(node.entities).map((entity) => [asText(entity), ``]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textualizer.js","sourceRoot":"","sources":["../../src/m3/textualizer.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EAEV,OAAO,EACP,WAAW,EACX,WAAW,EACX,kBAAkB,EAElB,SAAS,EACT,QAAQ,EACR,IAAI,EAEJ,MAAM,EACN,UAAU,EACV,aAAa,EACb,QAAQ,EAER,UAAU,EACb,MAAM,eAAe,CAAA;AACtB,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAe,MAAM,oBAAoB,CAAA;AAGrE,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AAEtC,MAAM,SAAS,GAAG,CAAmB,GAAiB,EAAU,EAAE,CAC9D,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAA;AAEzC,MAAM,OAAO,GAAG,CAAmB,EAAO,EAAE,MAAc,EAAE,OAA+B,MAAM,EAAgB,EAAE,CAC/G,EAAE,CAAC,MAAM,KAAK,CAAC;IACX,CAAC,CAAC,EAAE;IACJ,CAAC,CAAC,QAAQ,CAAC;QACP,MAAM;QACN,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACzB,CAAC,CAAA;AAEV,MAAM,UAAU,GAAG,CAAC,UAAsB,EAAgB,EAAE,CACxD,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,CAAA;AAEjE,MAAM,MAAM,GAAG,CAAC,IAAY,EAAgB,EAAE;IAE1C,IAAI,IAAI,YAAY,UAAU,EAAE,CAAC;QAC7B,OAAO;YACH,cAAc,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,SAAS,CAAC,IAAI,C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