@fluid-experimental/property-changeset 2.0.0-internal.3.0.5 → 2.0.0-internal.3.1.1

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 (113) hide show
  1. package/README.md +1 -0
  2. package/dist/changeset.d.ts +2 -2
  3. package/dist/changeset.d.ts.map +1 -1
  4. package/dist/changeset.js +61 -45
  5. package/dist/changeset.js.map +1 -1
  6. package/dist/changeset_operations/array.d.ts +6 -6
  7. package/dist/changeset_operations/array.d.ts.map +1 -1
  8. package/dist/changeset_operations/array.js +87 -56
  9. package/dist/changeset_operations/array.js.map +1 -1
  10. package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
  11. package/dist/changeset_operations/arrayChangesetIterator.js +43 -41
  12. package/dist/changeset_operations/arrayChangesetIterator.js.map +1 -1
  13. package/dist/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
  14. package/dist/changeset_operations/changesetConflictTypes.js.map +1 -1
  15. package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
  16. package/dist/changeset_operations/indexedCollection.js +76 -44
  17. package/dist/changeset_operations/indexedCollection.js.map +1 -1
  18. package/dist/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
  19. package/dist/changeset_operations/isEmptyChangeset.js +2 -1
  20. package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
  21. package/dist/changeset_operations/operationTypes.d.ts.map +1 -1
  22. package/dist/changeset_operations/operationTypes.js.map +1 -1
  23. package/dist/helpers/typeidHelper.d.ts +10 -10
  24. package/dist/helpers/typeidHelper.d.ts.map +1 -1
  25. package/dist/helpers/typeidHelper.js +19 -17
  26. package/dist/helpers/typeidHelper.js.map +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/isReservedKeyword.d.ts.map +1 -1
  30. package/dist/isReservedKeyword.js.map +1 -1
  31. package/dist/pathHelper.d.ts.map +1 -1
  32. package/dist/pathHelper.js +16 -10
  33. package/dist/pathHelper.js.map +1 -1
  34. package/dist/rebase.d.ts.map +1 -1
  35. package/dist/rebase.js +20 -13
  36. package/dist/rebase.js.map +1 -1
  37. package/dist/templateSchema.d.ts.map +1 -1
  38. package/dist/templateSchema.js +10 -11
  39. package/dist/templateSchema.js.map +1 -1
  40. package/dist/templateValidator.d.ts.map +1 -1
  41. package/dist/templateValidator.js +135 -102
  42. package/dist/templateValidator.js.map +1 -1
  43. package/dist/test/array.spec.js +141 -343
  44. package/dist/test/array.spec.js.map +1 -1
  45. package/dist/test/pathHelper.spec.js +299 -166
  46. package/dist/test/pathHelper.spec.js.map +1 -1
  47. package/dist/test/reversibleCs.spec.js.map +1 -1
  48. package/dist/test/schemaValidator.js +3 -1
  49. package/dist/test/schemaValidator.js.map +1 -1
  50. package/dist/test/schemas/badBothPropertiesAndTypeid.js +8 -8
  51. package/dist/test/schemas/badBothPropertiesAndTypeid.js.map +1 -1
  52. package/dist/test/schemas/badInvalidSemverInTypeid.js +18 -16
  53. package/dist/test/schemas/badInvalidSemverInTypeid.js.map +1 -1
  54. package/dist/test/schemas/badMissingSemverInTypeid.js +18 -16
  55. package/dist/test/schemas/badMissingSemverInTypeid.js.map +1 -1
  56. package/dist/test/schemas/badNestedProperties.js +18 -17
  57. package/dist/test/schemas/badNestedProperties.js.map +1 -1
  58. package/dist/test/schemas/badPrimitiveTypeid.js +9 -8
  59. package/dist/test/schemas/badPrimitiveTypeid.js.map +1 -1
  60. package/dist/test/schemas/badVersionedTypeid.js +19 -17
  61. package/dist/test/schemas/badVersionedTypeid.js.map +1 -1
  62. package/dist/test/schemas/goodColorPalette.js +4 -4
  63. package/dist/test/schemas/goodColorPalette.js.map +1 -1
  64. package/dist/test/schemas/goodDraftAsVersion.js +2 -4
  65. package/dist/test/schemas/goodDraftAsVersion.js.map +1 -1
  66. package/dist/test/schemas/goodPointId.js +18 -16
  67. package/dist/test/schemas/goodPointId.js.map +1 -1
  68. package/dist/test/schemas/goodReferenceAndRegular.js +5 -5
  69. package/dist/test/schemas/goodReferenceAndRegular.js.map +1 -1
  70. package/dist/test/schemas/goodReservedTypes.js +8 -7
  71. package/dist/test/schemas/goodReservedTypes.js.map +1 -1
  72. package/dist/test/schemas/goodUIBorder.js +19 -16
  73. package/dist/test/schemas/goodUIBorder.js.map +1 -1
  74. package/dist/test/tsconfig.tsbuildinfo +1 -1
  75. package/dist/test/validator/templateSyntax.spec.js.map +1 -1
  76. package/dist/test/validator/templateValidator.spec.js +329 -306
  77. package/dist/test/validator/templateValidator.spec.js.map +1 -1
  78. package/dist/test/validator/typeidHelper.spec.js +98 -65
  79. package/dist/test/validator/typeidHelper.spec.js.map +1 -1
  80. package/dist/utils.d.ts +1 -1
  81. package/dist/utils.d.ts.map +1 -1
  82. package/dist/utils.js +149 -95
  83. package/dist/utils.js.map +1 -1
  84. package/dist/validationResultBuilder.d.ts.map +1 -1
  85. package/dist/validationResultBuilder.js.map +1 -1
  86. package/lib/changeset.js +63 -47
  87. package/lib/changeset.js.map +1 -1
  88. package/lib/changeset_operations/array.js +88 -57
  89. package/lib/changeset_operations/array.js.map +1 -1
  90. package/lib/changeset_operations/arrayChangesetIterator.js +43 -41
  91. package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
  92. package/lib/changeset_operations/changesetConflictTypes.js.map +1 -1
  93. package/lib/changeset_operations/indexedCollection.js +76 -44
  94. package/lib/changeset_operations/indexedCollection.js.map +1 -1
  95. package/lib/changeset_operations/isEmptyChangeset.js +2 -1
  96. package/lib/changeset_operations/isEmptyChangeset.js.map +1 -1
  97. package/lib/changeset_operations/operationTypes.js.map +1 -1
  98. package/lib/helpers/typeidHelper.js +19 -17
  99. package/lib/helpers/typeidHelper.js.map +1 -1
  100. package/lib/index.js.map +1 -1
  101. package/lib/isReservedKeyword.js.map +1 -1
  102. package/lib/pathHelper.js +17 -11
  103. package/lib/pathHelper.js.map +1 -1
  104. package/lib/rebase.js +20 -13
  105. package/lib/rebase.js.map +1 -1
  106. package/lib/templateSchema.js +10 -11
  107. package/lib/templateSchema.js.map +1 -1
  108. package/lib/templateValidator.js +135 -102
  109. package/lib/templateValidator.js.map +1 -1
  110. package/lib/utils.js +149 -95
  111. package/lib/utils.js.map +1 -1
  112. package/lib/validationResultBuilder.js.map +1 -1
  113. package/package.json +100 -100
@@ -11,98 +11,131 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  const chai_1 = require("chai");
12
12
  const typeidHelper_1 = require("../../helpers/typeidHelper");
13
13
  (function () {
14
- describe('Typeid helper', function () {
15
- var MSG = require('@fluid-experimental/property-common').constants.MSG;
16
- it('getPrimitiveTypeId() should return all primitive typeids', () => {
14
+ describe("Typeid helper", function () {
15
+ var MSG = require("@fluid-experimental/property-common").constants.MSG;
16
+ it("getPrimitiveTypeId() should return all primitive typeids", () => {
17
17
  const result = typeidHelper_1.TypeIdHelper.getPrimitiveTypeIds();
18
- (0, chai_1.expect)(result).to.have.members(['Float32', 'Float64', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32',
19
- 'Uint32', 'Bool', 'String', 'Reference', 'Enum', 'Int64', 'Uint64',
18
+ (0, chai_1.expect)(result).to.have.members([
19
+ "Float32",
20
+ "Float64",
21
+ "Int8",
22
+ "Uint8",
23
+ "Int16",
24
+ "Uint16",
25
+ "Int32",
26
+ "Uint32",
27
+ "Bool",
28
+ "String",
29
+ "Reference",
30
+ "Enum",
31
+ "Int64",
32
+ "Uint64",
20
33
  ]);
21
34
  });
22
- it('getReservedTypeId() should return all reserved typeids', () => {
35
+ it("getReservedTypeId() should return all reserved typeids", () => {
23
36
  const result = typeidHelper_1.TypeIdHelper.getReservedTypeIds();
24
- (0, chai_1.expect)(result).to.have.members(['BaseProperty', 'ContainerProperty', 'NamedProperty', 'NodeProperty',
25
- 'NamedNodeProperty', 'RelationshipProperty',
37
+ (0, chai_1.expect)(result).to.have.members([
38
+ "BaseProperty",
39
+ "ContainerProperty",
40
+ "NamedProperty",
41
+ "NodeProperty",
42
+ "NamedNodeProperty",
43
+ "RelationshipProperty",
26
44
  ]);
27
45
  });
28
- describe('nativeInheritsFrom() method', function () {
29
- it('should throw an error if the input is undefine', () => {
30
- (0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom(undefined, 'BaseProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);
31
- // @ts-ignore
32
- (0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);
33
- // @ts-ignore
34
- (0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom(); }).to.throw(MSG.TYPEID_NOT_DEFINED);
46
+ describe("nativeInheritsFrom() method", function () {
47
+ it("should throw an error if the input is undefine", () => {
48
+ (0, chai_1.expect)(() => {
49
+ typeidHelper_1.TypeIdHelper.nativeInheritsFrom(undefined, "BaseProperty");
50
+ }).to.throw(MSG.TYPEID_NOT_DEFINED);
51
+ (0, chai_1.expect)(() => {
52
+ // @ts-ignore
53
+ typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NodeProperty");
54
+ }).to.throw(MSG.TYPEID_NOT_DEFINED);
55
+ (0, chai_1.expect)(() => {
56
+ // @ts-ignore
57
+ typeidHelper_1.TypeIdHelper.nativeInheritsFrom();
58
+ }).to.throw(MSG.TYPEID_NOT_DEFINED);
35
59
  });
36
- it('should throw an error if the inputs are not native typeids', () => {
37
- (0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('template1', 'BaseProperty'); })
38
- .to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');
39
- (0, chai_1.expect)(() => { typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'template1'); })
40
- .to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');
60
+ it("should throw an error if the inputs are not native typeids", () => {
61
+ (0, chai_1.expect)(() => {
62
+ typeidHelper_1.TypeIdHelper.nativeInheritsFrom("template1", "BaseProperty");
63
+ }).to.throw(MSG.TYPEID_NOT_NATIVE + "template1");
64
+ (0, chai_1.expect)(() => {
65
+ typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NodeProperty", "template1");
66
+ }).to.throw(MSG.TYPEID_NOT_NATIVE + "template1");
41
67
  });
42
- it('should recognize that all the native type inherit from BaseProperty', () => {
43
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int8', 'BaseProperty')).to.be.true;
44
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint8', 'BaseProperty')).to.be.true;
45
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int16', 'BaseProperty')).to.be.true;
46
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint16', 'BaseProperty')).to.be.true;
47
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int32', 'BaseProperty')).to.be.true;
48
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint32', 'BaseProperty')).to.be.true;
49
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Float32', 'BaseProperty')).to.be.true;
50
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Int64', 'BaseProperty')).to.be.true;
51
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Uint64', 'BaseProperty')).to.be.true;
52
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Float64', 'BaseProperty')).to.be.true;
53
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Bool', 'BaseProperty')).to.be.true;
54
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Reference', 'BaseProperty')).to.be.true;
55
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Enum', 'BaseProperty')).to.be.true;
56
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('String', 'BaseProperty')).to.be.true;
57
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'BaseProperty')).to.be.true;
58
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('ContainerProperty', 'BaseProperty')).to.be.true;
59
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedProperty', 'BaseProperty')).to.be.true;
60
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'BaseProperty')).to.be.true;
61
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'BaseProperty')).to.be.true;
62
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'Reference')).to.be.true;
63
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'Reference<NodeProperty>')).to.be.false;
68
+ it("should recognize that all the native type inherit from BaseProperty", () => {
69
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Int8", "BaseProperty")).to.be.true;
70
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Uint8", "BaseProperty")).to.be.true;
71
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Int16", "BaseProperty")).to.be.true;
72
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Uint16", "BaseProperty")).to.be.true;
73
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Int32", "BaseProperty")).to.be.true;
74
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Uint32", "BaseProperty")).to.be.true;
75
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Float32", "BaseProperty")).to.be.true;
76
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Int64", "BaseProperty")).to.be.true;
77
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Uint64", "BaseProperty")).to.be.true;
78
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Float64", "BaseProperty")).to.be.true;
79
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Bool", "BaseProperty")).to.be.true;
80
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Reference", "BaseProperty")).to.be.true;
81
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Enum", "BaseProperty")).to.be.true;
82
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("String", "BaseProperty")).to.be.true;
83
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NodeProperty", "BaseProperty")).to.be.true;
84
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("ContainerProperty", "BaseProperty")).to.be
85
+ .true;
86
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NamedProperty", "BaseProperty")).to.be.true;
87
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NamedNodeProperty", "BaseProperty")).to.be
88
+ .true;
89
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("RelationshipProperty", "BaseProperty")).to
90
+ .be.true;
91
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Reference<NodeProperty>", "Reference")).to
92
+ .be.true;
93
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NodeProperty", "Reference<NodeProperty>"))
94
+ .to.be.false;
64
95
  });
65
- it('should recognize that the Reference<NodeProperty> inherits from BaseProperty', () => {
66
- const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'BaseProperty');
96
+ it("should recognize that the Reference<NodeProperty> inherits from BaseProperty", () => {
97
+ const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Reference<NodeProperty>", "BaseProperty");
67
98
  (0, chai_1.expect)(result).to.be.true;
68
99
  });
69
- it('should throw an error if in_typeid is enum<> ', () => {
100
+ it("should throw an error if in_typeid is enum<> ", () => {
70
101
  (0, chai_1.expect)(() => {
71
- typeidHelper_1.TypeIdHelper.nativeInheritsFrom('enum<NodeProperty>', 'BaseProperty');
72
- }).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');
102
+ typeidHelper_1.TypeIdHelper.nativeInheritsFrom("enum<NodeProperty>", "BaseProperty");
103
+ }).to.throw(MSG.TYPEID_NOT_NATIVE + "enum<NodeProperty>");
73
104
  });
74
- it('should throw an error if base_typeid is enum<> ', () => {
105
+ it("should throw an error if base_typeid is enum<> ", () => {
75
106
  (0, chai_1.expect)(() => {
76
- typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'enum<NodeProperty>');
77
- }).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');
107
+ typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NodeProperty", "enum<NodeProperty>");
108
+ }).to.throw(MSG.TYPEID_NOT_NATIVE + "enum<NodeProperty>");
78
109
  });
79
- it('should recognize that the Enum inherits from Int32', () => {
80
- const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('Enum', 'Int32');
110
+ it("should recognize that the Enum inherits from Int32", () => {
111
+ const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom("Enum", "Int32");
81
112
  (0, chai_1.expect)(result).to.be.true;
82
113
  });
83
- it('should recognize that the NodeProperty inherits from ContainerProperty', () => {
84
- const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NodeProperty', 'ContainerProperty');
114
+ it("should recognize that the NodeProperty inherits from ContainerProperty", () => {
115
+ const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NodeProperty", "ContainerProperty");
85
116
  (0, chai_1.expect)(result).to.be.true;
86
117
  });
87
- it('should recognize that the NamedProperty inherits from ContainerProperty', () => {
88
- const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedProperty', 'ContainerProperty');
118
+ it("should recognize that the NamedProperty inherits from ContainerProperty", () => {
119
+ const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NamedProperty", "ContainerProperty");
89
120
  (0, chai_1.expect)(result).to.be.true;
90
121
  });
91
- it('should recognize that the String inherits from ContainerProperty', () => {
92
- const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('String', 'ContainerProperty');
122
+ it("should recognize that the String inherits from ContainerProperty", () => {
123
+ const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom("String", "ContainerProperty");
93
124
  (0, chai_1.expect)(result).to.be.true;
94
125
  });
95
- it('should recognize that the NamedNodeProperty inherits from NamedProperty', () => {
96
- const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NamedProperty');
126
+ it("should recognize that the NamedNodeProperty inherits from NamedProperty", () => {
127
+ const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NamedNodeProperty", "NamedProperty");
97
128
  (0, chai_1.expect)(result).to.be.true;
98
129
  });
99
- it('should recognize that the NamedNodeProperty inherits from NodeProperty', () => {
100
- const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NodeProperty');
130
+ it("should recognize that the NamedNodeProperty inherits from NodeProperty", () => {
131
+ const result = typeidHelper_1.TypeIdHelper.nativeInheritsFrom("NamedNodeProperty", "NodeProperty");
101
132
  (0, chai_1.expect)(result).to.be.true;
102
133
  });
103
- it('should recognize that the RelationshipProperty inherits from NodeProperty and NamedProperty', () => {
104
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NodeProperty')).to.be.true;
105
- (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NamedProperty')).to.be.true;
134
+ it("should recognize that the RelationshipProperty inherits from NodeProperty and NamedProperty", () => {
135
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("RelationshipProperty", "NodeProperty")).to
136
+ .be.true;
137
+ (0, chai_1.expect)(typeidHelper_1.TypeIdHelper.nativeInheritsFrom("RelationshipProperty", "NamedProperty")).to
138
+ .be.true;
106
139
  });
107
140
  });
108
141
  });
@@ -1 +1 @@
1
- {"version":3,"file":"typeidHelper.spec.js","sourceRoot":"","sources":["../../../src/test/validator/typeidHelper.spec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,qCAAqC;AAErC;;GAEG;AAEH,+BAA8B;AAC9B,6DAA0D;AAE1D,CAAC;IACG,QAAQ,CAAC,eAAe,EAAE;QACtB,IAAI,GAAG,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC;QAEvE,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;YAChE,MAAM,MAAM,GAAG,2BAAY,CAAC,mBAAmB,EAAE,CAAC;YAClD,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO;gBAC7F,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ;aACrE,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;YAC9D,MAAM,MAAM,GAAG,2BAAY,CAAC,kBAAkB,EAAE,CAAC;YAEjD,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,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CAAC,6FAA6F,EAAE,GAAG,EAAE;gBACnG,IAAA,aAAM,EAAC,2BAAY,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;gBAC3F,IAAA,aAAM,EAAC,2BAAY,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YAChG,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint no-unused-expressions: 0 */\n\n/**\n * @fileoverview In this file, we will test typeid_helper functions.\n */\n\nimport { expect } from \"chai\";\nimport { TypeIdHelper } from '../../helpers/typeidHelper';\n\n(function() {\n describe('Typeid helper', function() {\n var MSG = require('@fluid-experimental/property-common').constants.MSG;\n\n it('getPrimitiveTypeId() should return all primitive typeids', () => {\n const result = TypeIdHelper.getPrimitiveTypeIds();\n expect(result).to.have.members(['Float32', 'Float64', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32',\n 'Uint32', 'Bool', 'String', 'Reference', 'Enum', 'Int64', 'Uint64',\n ]);\n });\n\n it('getReservedTypeId() should return all reserved typeids', () => {\n const result = TypeIdHelper.getReservedTypeIds();\n\n expect(result).to.have.members(['BaseProperty', 'ContainerProperty', 'NamedProperty', 'NodeProperty',\n 'NamedNodeProperty', 'RelationshipProperty',\n ]);\n });\n\n describe('nativeInheritsFrom() method', function() {\n it('should throw an error if the input is undefine', () => {\n expect(() => { TypeIdHelper.nativeInheritsFrom(undefined, 'BaseProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n // @ts-ignore\n expect(() => { TypeIdHelper.nativeInheritsFrom('NodeProperty'); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n // @ts-ignore\n expect(() => { TypeIdHelper.nativeInheritsFrom(); }).to.throw(MSG.TYPEID_NOT_DEFINED);\n });\n\n it('should throw an error if the inputs are not native typeids', () => {\n expect(() => { TypeIdHelper.nativeInheritsFrom('template1', 'BaseProperty'); })\n .to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');\n expect(() => { TypeIdHelper.nativeInheritsFrom('NodeProperty', 'template1'); })\n .to.throw(MSG.TYPEID_NOT_NATIVE + 'template1');\n });\n\n it('should recognize that all the native type inherit from BaseProperty', () => {\n expect(TypeIdHelper.nativeInheritsFrom('Int8', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint8', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int16', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint16', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Float32', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Int64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Uint64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Float64', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Bool', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Reference', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Enum', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('String', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NodeProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('ContainerProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NamedProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'BaseProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'Reference')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('NodeProperty', 'Reference<NodeProperty>')).to.be.false;\n });\n\n it('should recognize that the Reference<NodeProperty> inherits from BaseProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('Reference<NodeProperty>', 'BaseProperty');\n\n expect(result).to.be.true;\n });\n\n it('should throw an error if in_typeid is enum<> ', () => {\n expect(() => {\n TypeIdHelper.nativeInheritsFrom('enum<NodeProperty>', 'BaseProperty');\n }).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');\n });\n\n it('should throw an error if base_typeid is enum<> ', () => {\n expect(() => {\n TypeIdHelper.nativeInheritsFrom('NodeProperty', 'enum<NodeProperty>');\n }).to.throw(MSG.TYPEID_NOT_NATIVE + 'enum<NodeProperty>');\n });\n\n it('should recognize that the Enum inherits from Int32', () => {\n const result = TypeIdHelper.nativeInheritsFrom('Enum', 'Int32');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NodeProperty inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NodeProperty', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedProperty inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedProperty', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the String inherits from ContainerProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('String', 'ContainerProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedNodeProperty inherits from NamedProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NamedProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the NamedNodeProperty inherits from NodeProperty', () => {\n const result = TypeIdHelper.nativeInheritsFrom('NamedNodeProperty', 'NodeProperty');\n\n expect(result).to.be.true;\n });\n\n it('should recognize that the RelationshipProperty inherits from NodeProperty and NamedProperty', () => {\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NodeProperty')).to.be.true;\n expect(TypeIdHelper.nativeInheritsFrom('RelationshipProperty', 'NamedProperty')).to.be.true;\n });\n });\n });\n})();\n"]}
1
+ {"version":3,"file":"typeidHelper.spec.js","sourceRoot":"","sources":["../../../src/test/validator/typeidHelper.spec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,qCAAqC;AAErC;;GAEG;AAEH,+BAA8B;AAC9B,6DAA0D;AAE1D,CAAC;IACA,QAAQ,CAAC,eAAe,EAAE;QACzB,IAAI,GAAG,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC;QAEvE,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;YACnE,MAAM,MAAM,GAAG,2BAAY,CAAC,mBAAmB,EAAE,CAAC;YAClD,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC9B,SAAS;gBACT,SAAS;gBACT,MAAM;gBACN,OAAO;gBACP,OAAO;gBACP,QAAQ;gBACR,OAAO;gBACP,QAAQ;gBACR,MAAM;gBACN,QAAQ;gBACR,WAAW;gBACX,MAAM;gBACN,OAAO;gBACP,QAAQ;aACR,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;YACjE,MAAM,MAAM,GAAG,2BAAY,CAAC,kBAAkB,EAAE,CAAC;YAEjD,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC9B,cAAc;gBACd,mBAAmB;gBACnB,eAAe;gBACf,cAAc;g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2BAAY,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE;qBAChF,EAAE,CAAC,IAAI,CAAC;gBACV,IAAA,aAAM,EAAC,2BAAY,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE;qBACjF,EAAE,CAAC,IAAI,CAAC;YACX,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint no-unused-expressions: 0 */\n\n/**\n * @fileoverview In this file, we will test typeid_helper functions.\n */\n\nimport { expect } from \"chai\";\nimport { TypeIdHelper } from \"../../helpers/typeidHelper\";\n\n(function () {\n\tdescribe(\"Typeid helper\", function () {\n\t\tvar MSG = require(\"@fluid-experimental/property-common\").constants.MSG;\n\n\t\tit(\"getPrimitiveTypeId() should return all primitive typeids\", () => {\n\t\t\tconst result = TypeIdHelper.getPrimitiveTypeIds();\n\t\t\texpect(result).to.have.members([\n\t\t\t\t\"Float32\",\n\t\t\t\t\"Float64\",\n\t\t\t\t\"Int8\",\n\t\t\t\t\"Uint8\",\n\t\t\t\t\"Int16\",\n\t\t\t\t\"Uint16\",\n\t\t\t\t\"Int32\",\n\t\t\t\t\"Uint32\",\n\t\t\t\t\"Bool\",\n\t\t\t\t\"String\",\n\t\t\t\t\"Reference\",\n\t\t\t\t\"Enum\",\n\t\t\t\t\"Int64\",\n\t\t\t\t\"Uint64\",\n\t\t\t]);\n\t\t});\n\n\t\tit(\"getReservedTypeId() should return all reserved typeids\", () => {\n\t\t\tconst result = TypeIdHelper.getReservedTypeIds();\n\n\t\t\texpect(result).to.have.members([\n\t\t\t\t\"BaseProperty\",\n\t\t\t\t\"ContainerProperty\",\n\t\t\t\t\"NamedProperty\",\n\t\t\t\t\"NodeProperty\",\n\t\t\t\t\"NamedNodeProperty\",\n\t\t\t\t\"RelationshipProperty\",\n\t\t\t]);\n\t\t});\n\n\t\tdescribe(\"nativeInheritsFrom() method\", function () {\n\t\t\tit(\"should throw an error if the input is undefine\", () => {\n\t\t\t\texpect(() => {\n\t\t\t\t\tTypeIdHelper.nativeInheritsFrom(undefined, \"BaseProperty\");\n\t\t\t\t}).to.throw(MSG.TYPEID_NOT_DEFINED);\n\t\t\t\texpect(() => {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tTypeIdHelper.nativeInheritsFrom(\"NodeProperty\");\n\t\t\t\t}).to.throw(MSG.TYPEID_NOT_DEFINED);\n\t\t\t\texpect(() => {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tTypeIdHelper.nativeInheritsFrom();\n\t\t\t\t}).to.throw(MSG.TYPEID_NOT_DEFINED);\n\t\t\t});\n\n\t\t\tit(\"should throw an error if the inputs are not native typeids\", () => {\n\t\t\t\texpect(() => {\n\t\t\t\t\tTypeIdHelper.nativeInheritsFrom(\"template1\", \"BaseProperty\");\n\t\t\t\t}).to.throw(MSG.TYPEID_NOT_NATIVE + \"template1\");\n\t\t\t\texpect(() => {\n\t\t\t\t\tTypeIdHelper.nativeInheritsFrom(\"NodeProperty\", \"template1\");\n\t\t\t\t}).to.throw(MSG.TYPEID_NOT_NATIVE + \"template1\");\n\t\t\t});\n\n\t\t\tit(\"should recognize that all the native type inherit from BaseProperty\", () => {\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Int8\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Uint8\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Int16\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Uint16\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Int32\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Uint32\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Float32\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Int64\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Uint64\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Float64\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Bool\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Reference\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Enum\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"String\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"NodeProperty\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"ContainerProperty\", \"BaseProperty\")).to.be\n\t\t\t\t\t.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"NamedProperty\", \"BaseProperty\")).to.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"NamedNodeProperty\", \"BaseProperty\")).to.be\n\t\t\t\t\t.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"RelationshipProperty\", \"BaseProperty\")).to\n\t\t\t\t\t.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"Reference<NodeProperty>\", \"Reference\")).to\n\t\t\t\t\t.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"NodeProperty\", \"Reference<NodeProperty>\"))\n\t\t\t\t\t.to.be.false;\n\t\t\t});\n\n\t\t\tit(\"should recognize that the Reference<NodeProperty> inherits from BaseProperty\", () => {\n\t\t\t\tconst result = TypeIdHelper.nativeInheritsFrom(\n\t\t\t\t\t\"Reference<NodeProperty>\",\n\t\t\t\t\t\"BaseProperty\",\n\t\t\t\t);\n\n\t\t\t\texpect(result).to.be.true;\n\t\t\t});\n\n\t\t\tit(\"should throw an error if in_typeid is enum<> \", () => {\n\t\t\t\texpect(() => {\n\t\t\t\t\tTypeIdHelper.nativeInheritsFrom(\"enum<NodeProperty>\", \"BaseProperty\");\n\t\t\t\t}).to.throw(MSG.TYPEID_NOT_NATIVE + \"enum<NodeProperty>\");\n\t\t\t});\n\n\t\t\tit(\"should throw an error if base_typeid is enum<> \", () => {\n\t\t\t\texpect(() => {\n\t\t\t\t\tTypeIdHelper.nativeInheritsFrom(\"NodeProperty\", \"enum<NodeProperty>\");\n\t\t\t\t}).to.throw(MSG.TYPEID_NOT_NATIVE + \"enum<NodeProperty>\");\n\t\t\t});\n\n\t\t\tit(\"should recognize that the Enum inherits from Int32\", () => {\n\t\t\t\tconst result = TypeIdHelper.nativeInheritsFrom(\"Enum\", \"Int32\");\n\n\t\t\t\texpect(result).to.be.true;\n\t\t\t});\n\n\t\t\tit(\"should recognize that the NodeProperty inherits from ContainerProperty\", () => {\n\t\t\t\tconst result = TypeIdHelper.nativeInheritsFrom(\"NodeProperty\", \"ContainerProperty\");\n\n\t\t\t\texpect(result).to.be.true;\n\t\t\t});\n\n\t\t\tit(\"should recognize that the NamedProperty inherits from ContainerProperty\", () => {\n\t\t\t\tconst result = TypeIdHelper.nativeInheritsFrom(\n\t\t\t\t\t\"NamedProperty\",\n\t\t\t\t\t\"ContainerProperty\",\n\t\t\t\t);\n\n\t\t\t\texpect(result).to.be.true;\n\t\t\t});\n\n\t\t\tit(\"should recognize that the String inherits from ContainerProperty\", () => {\n\t\t\t\tconst result = TypeIdHelper.nativeInheritsFrom(\"String\", \"ContainerProperty\");\n\n\t\t\t\texpect(result).to.be.true;\n\t\t\t});\n\n\t\t\tit(\"should recognize that the NamedNodeProperty inherits from NamedProperty\", () => {\n\t\t\t\tconst result = TypeIdHelper.nativeInheritsFrom(\n\t\t\t\t\t\"NamedNodeProperty\",\n\t\t\t\t\t\"NamedProperty\",\n\t\t\t\t);\n\n\t\t\t\texpect(result).to.be.true;\n\t\t\t});\n\n\t\t\tit(\"should recognize that the NamedNodeProperty inherits from NodeProperty\", () => {\n\t\t\t\tconst result = TypeIdHelper.nativeInheritsFrom(\"NamedNodeProperty\", \"NodeProperty\");\n\n\t\t\t\texpect(result).to.be.true;\n\t\t\t});\n\n\t\t\tit(\"should recognize that the RelationshipProperty inherits from NodeProperty and NamedProperty\", () => {\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"RelationshipProperty\", \"NodeProperty\")).to\n\t\t\t\t\t.be.true;\n\t\t\t\texpect(TypeIdHelper.nativeInheritsFrom(\"RelationshipProperty\", \"NamedProperty\")).to\n\t\t\t\t\t.be.true;\n\t\t\t});\n\t\t});\n\t});\n})();\n"]}
package/dist/utils.d.ts CHANGED
@@ -6,7 +6,7 @@ import { PathTree } from "./pathHelper";
6
6
  * Utils
7
7
  * @alias property-changeset.Utils
8
8
  * @class
9
- */
9
+ */
10
10
  export declare namespace Utils {
11
11
  export type OperationType = "modify" | "insert" | "remove";
12
12
  export type PropertyContainerType = "array" | "map" | "set" | "root" | "NodeProperty" | "template";
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAA4B,aAAa,EAA+B,MAAM,OAAO,CAAC;AAW7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAc,QAAQ,EAAE,MAAM,cAAc,CAAC;AAOpD;;;;EAIE;AAEF,yBAAiB,KAAK,CAAC;IACnB,MAAM,MAAM,aAAa,GAA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