@fncts/schema 0.0.24 → 0.0.25
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/LICENSE +26 -0
- package/_cjs/AST.cjs +1093 -1226
- package/_cjs/AST.cjs.map +1 -1
- package/_cjs/ASTAnnotation.cjs +114 -85
- package/_cjs/ASTAnnotation.cjs.map +1 -1
- package/_cjs/ASTAnnotationMap.cjs +43 -41
- package/_cjs/ASTAnnotationMap.cjs.map +1 -1
- package/_cjs/Eq.cjs +113 -145
- package/_cjs/Eq.cjs.map +1 -1
- package/_cjs/Gen.cjs +131 -167
- package/_cjs/Gen.cjs.map +1 -1
- package/_cjs/Guard.cjs +167 -267
- package/_cjs/Guard.cjs.map +1 -1
- package/_cjs/InvalidInterpretationError.cjs +9 -10
- package/_cjs/InvalidInterpretationError.cjs.map +1 -1
- package/_cjs/ParseError/ParseError.cjs +283 -284
- package/_cjs/ParseError/ParseError.cjs.map +1 -1
- package/_cjs/ParseError/ParseErrorFormatter.cjs +0 -2
- package/_cjs/ParseError/PathFormatter.cjs +55 -87
- package/_cjs/ParseError/PathFormatter.cjs.map +1 -1
- package/_cjs/ParseError/TreeFormatter.cjs +70 -102
- package/_cjs/ParseError/TreeFormatter.cjs.map +1 -1
- package/_cjs/ParseError.cjs +35 -50
- package/_cjs/ParseResult.cjs +15 -15
- package/_cjs/ParseResult.cjs.map +1 -1
- package/_cjs/Parser/api.cjs +54 -50
- package/_cjs/Parser/api.cjs.map +1 -1
- package/_cjs/Parser/definition.cjs +17 -16
- package/_cjs/Parser/definition.cjs.map +1 -1
- package/_cjs/Parser/interpreter.cjs +276 -358
- package/_cjs/Parser/interpreter.cjs.map +1 -1
- package/_cjs/Parser.cjs +12 -39
- package/_cjs/Schema/api/conc.cjs +64 -59
- package/_cjs/Schema/api/conc.cjs.map +1 -1
- package/_cjs/Schema/api/either.cjs +73 -72
- package/_cjs/Schema/api/either.cjs.map +1 -1
- package/_cjs/Schema/api/hashMap.cjs +85 -85
- package/_cjs/Schema/api/hashMap.cjs.map +1 -1
- package/_cjs/Schema/api/hashSet.cjs +75 -69
- package/_cjs/Schema/api/hashSet.cjs.map +1 -1
- package/_cjs/Schema/api/list.cjs +74 -66
- package/_cjs/Schema/api/list.cjs.map +1 -1
- package/_cjs/Schema/api/map.cjs +81 -83
- package/_cjs/Schema/api/map.cjs.map +1 -1
- package/_cjs/Schema/api/maybe.cjs +56 -49
- package/_cjs/Schema/api/maybe.cjs.map +1 -1
- package/_cjs/Schema/api/set.cjs +68 -61
- package/_cjs/Schema/api/set.cjs.map +1 -1
- package/_cjs/Schema/api.cjs +332 -350
- package/_cjs/Schema/api.cjs.map +1 -1
- package/_cjs/Schema/definition.cjs +28 -26
- package/_cjs/Schema/definition.cjs.map +1 -1
- package/_cjs/Schema/derivations.cjs +85 -100
- package/_cjs/Schema/derivations.cjs.map +1 -1
- package/_cjs/Schema.cjs +95 -127
- package/_cjs/Show.cjs +91 -151
- package/_cjs/Show.cjs.map +1 -1
- package/_cjs/chunk.cjs +28 -0
- package/_cjs/global.cjs +0 -2
- package/_cjs/index.cjs +0 -2
- package/_cjs/utils.cjs +41 -46
- package/_cjs/utils.cjs.map +1 -1
- package/_mjs/AST.mjs +996 -1161
- package/_mjs/AST.mjs.map +1 -1
- package/_mjs/ASTAnnotation.mjs +77 -73
- package/_mjs/ASTAnnotation.mjs.map +1 -1
- package/_mjs/ASTAnnotationMap.mjs +31 -29
- package/_mjs/ASTAnnotationMap.mjs.map +1 -1
- package/_mjs/Eq.mjs +101 -134
- package/_mjs/Eq.mjs.map +1 -1
- package/_mjs/Gen.mjs +117 -157
- package/_mjs/Gen.mjs.map +1 -1
- package/_mjs/Guard.mjs +154 -257
- package/_mjs/Guard.mjs.map +1 -1
- package/_mjs/InvalidInterpretationError.mjs +8 -4
- package/_mjs/InvalidInterpretationError.mjs.map +1 -1
- package/_mjs/ParseError/ParseError.mjs +266 -262
- package/_mjs/ParseError/ParseError.mjs.map +1 -1
- package/_mjs/ParseError/ParseErrorFormatter.mjs +0 -2
- package/_mjs/ParseError/PathFormatter.mjs +51 -80
- package/_mjs/ParseError/PathFormatter.mjs.map +1 -1
- package/_mjs/ParseError/TreeFormatter.mjs +62 -94
- package/_mjs/ParseError/TreeFormatter.mjs.map +1 -1
- package/_mjs/ParseError.mjs +5 -6
- package/_mjs/ParseResult.mjs +13 -9
- package/_mjs/ParseResult.mjs.map +1 -1
- package/_mjs/Parser/api.mjs +43 -39
- package/_mjs/Parser/api.mjs.map +1 -1
- package/_mjs/Parser/definition.mjs +12 -8
- package/_mjs/Parser/definition.mjs.map +1 -1
- package/_mjs/Parser/interpreter.mjs +262 -348
- package/_mjs/Parser/interpreter.mjs.map +1 -1
- package/_mjs/Parser.mjs +4 -5
- package/_mjs/Schema/api/conc.mjs +41 -45
- package/_mjs/Schema/api/conc.mjs.map +1 -1
- package/_mjs/Schema/api/either.mjs +55 -61
- package/_mjs/Schema/api/either.mjs.map +1 -1
- package/_mjs/Schema/api/hashMap.mjs +61 -71
- package/_mjs/Schema/api/hashMap.mjs.map +1 -1
- package/_mjs/Schema/api/hashSet.mjs +53 -56
- package/_mjs/Schema/api/hashSet.mjs.map +1 -1
- package/_mjs/Schema/api/list.mjs +50 -53
- package/_mjs/Schema/api/list.mjs.map +1 -1
- package/_mjs/Schema/api/map.mjs +59 -69
- package/_mjs/Schema/api/map.mjs.map +1 -1
- package/_mjs/Schema/api/maybe.mjs +34 -36
- package/_mjs/Schema/api/maybe.mjs.map +1 -1
- package/_mjs/Schema/api/set.mjs +47 -48
- package/_mjs/Schema/api/set.mjs.map +1 -1
- package/_mjs/Schema/api.mjs +304 -346
- package/_mjs/Schema/api.mjs.map +1 -1
- package/_mjs/Schema/definition.mjs +21 -17
- package/_mjs/Schema/definition.mjs.map +1 -1
- package/_mjs/Schema/derivations.mjs +71 -90
- package/_mjs/Schema/derivations.mjs.map +1 -1
- package/_mjs/Schema.mjs +12 -15
- package/_mjs/Show.mjs +79 -139
- package/_mjs/Show.mjs.map +1 -1
- package/_mjs/global.mjs +0 -2
- package/_mjs/index.mjs +0 -2
- package/_mjs/utils.mjs +35 -37
- package/_mjs/utils.mjs.map +1 -1
- package/package.json +7 -3
- package/_cjs/ParseError/ParseErrorFormatter.cjs.map +0 -1
- package/_cjs/ParseError.cjs.map +0 -1
- package/_cjs/Parser.cjs.map +0 -1
- package/_cjs/Schema.cjs.map +0 -1
- package/_cjs/global.cjs.map +0 -1
- package/_cjs/index.cjs.map +0 -1
- package/_mjs/ParseError/ParseErrorFormatter.mjs.map +0 -1
- package/_mjs/ParseError.mjs.map +0 -1
- package/_mjs/Parser.mjs.map +0 -1
- package/_mjs/Schema.mjs.map +0 -1
- package/_mjs/global.mjs.map +0 -1
- package/_mjs/index.mjs.map +0 -1
|
@@ -1,304 +1,308 @@
|
|
|
1
1
|
import * as tsplus_module_1 from "@fncts/base/data/Equatable/definition";
|
|
2
|
+
//#region build/esm/ParseError/ParseError.js
|
|
2
3
|
function hasTag(u, tag) {
|
|
3
|
-
|
|
4
|
+
return typeof u === "object" && u !== null && "_tag" in u && u._tag === tag;
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
7
|
+
* @tsplus companion fncts.schema.ParseError.DeclarationError
|
|
8
|
+
*/
|
|
9
|
+
var DeclarationError = class {
|
|
10
|
+
ast;
|
|
11
|
+
actual;
|
|
12
|
+
error;
|
|
13
|
+
_tag = 0;
|
|
14
|
+
constructor(ast, actual, error) {
|
|
15
|
+
this.ast = ast;
|
|
16
|
+
this.actual = actual;
|
|
17
|
+
this.error = error;
|
|
18
|
+
}
|
|
19
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
20
|
+
return hasTag(that, 0) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.error, that.error);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
22
23
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
* @tsplus static fncts.schema.ParseError.DeclarationError __call
|
|
25
|
+
* @tsplus static fncts.schema.ParseErrorOps DeclarationError
|
|
26
|
+
*/
|
|
27
|
+
function declarationError(ast, actual, error) {
|
|
28
|
+
return new DeclarationError(ast, actual, error);
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
31
|
+
* @tsplus companion fncts.schema.ParseError.TypeError
|
|
32
|
+
*/
|
|
33
|
+
var TypeError = class {
|
|
34
|
+
ast;
|
|
35
|
+
actual;
|
|
36
|
+
_tag = 1;
|
|
37
|
+
constructor(ast, actual) {
|
|
38
|
+
this.ast = ast;
|
|
39
|
+
this.actual = actual;
|
|
40
|
+
}
|
|
41
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
42
|
+
return hasTag(that, 1) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
44
45
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
* @tsplus static fncts.schema.ParseError.TypeError __call
|
|
47
|
+
* @tsplus static fncts.schema.ParseErrorOps TypeError
|
|
48
|
+
*/
|
|
49
|
+
function typeError(expected, actual) {
|
|
50
|
+
return new TypeError(expected, actual);
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
53
|
+
* @tsplus companion fncts.schema.ParseError.TypeLiteralError
|
|
54
|
+
*/
|
|
55
|
+
var TypeLiteralError = class {
|
|
56
|
+
ast;
|
|
57
|
+
actual;
|
|
58
|
+
errors;
|
|
59
|
+
output;
|
|
60
|
+
_tag = 9;
|
|
61
|
+
constructor(ast, actual, errors, output = {}) {
|
|
62
|
+
this.ast = ast;
|
|
63
|
+
this.actual = actual;
|
|
64
|
+
this.errors = errors;
|
|
65
|
+
this.output = output;
|
|
66
|
+
}
|
|
67
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
68
|
+
return hasTag(that, 9) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.errors, that.errors) && context.comparator(this.output, that.output);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
70
71
|
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
* @tsplus static fncts.schema.ParseError.TypeLiteralError __call
|
|
73
|
+
* @tsplus static fncts.schema.ParseErrorOps TypeLiteralError
|
|
74
|
+
*/
|
|
75
|
+
function typeLiteralError(ast, actual, errors, output = {}) {
|
|
76
|
+
return new TypeLiteralError(ast, actual, errors, output);
|
|
76
77
|
}
|
|
77
78
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
79
|
+
* @tsplus companion fncts.schema.ParseError.TupleError
|
|
80
|
+
*/
|
|
81
|
+
var TupleError = class {
|
|
82
|
+
ast;
|
|
83
|
+
actual;
|
|
84
|
+
errors;
|
|
85
|
+
output;
|
|
86
|
+
_tag = 10;
|
|
87
|
+
constructor(ast, actual, errors, output = []) {
|
|
88
|
+
this.ast = ast;
|
|
89
|
+
this.actual = actual;
|
|
90
|
+
this.errors = errors;
|
|
91
|
+
this.output = output;
|
|
92
|
+
}
|
|
93
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
94
|
+
return hasTag(that, 10) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.errors, that.errors) && context.comparator(this.output, that.output);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
96
97
|
/**
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
* @tsplus static fncts.schema.ParseError.TupleError __call
|
|
99
|
+
* @tsplus static fncts.schema.ParseErrorOps TupleError
|
|
100
|
+
*/
|
|
101
|
+
function tupleError(ast, actual, errors, output = []) {
|
|
102
|
+
return new TupleError(ast, actual, errors, output);
|
|
102
103
|
}
|
|
103
104
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
105
|
+
* @tsplus companion fncts.schema.ParseError.IndexError
|
|
106
|
+
*/
|
|
107
|
+
var IndexError = class {
|
|
108
|
+
index;
|
|
109
|
+
error;
|
|
110
|
+
_tag = 2;
|
|
111
|
+
constructor(index, error) {
|
|
112
|
+
this.index = index;
|
|
113
|
+
this.error = error;
|
|
114
|
+
}
|
|
115
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
116
|
+
return hasTag(that, 2) && context.comparator(this.index, that.index) && context.comparator(this.error, that.error);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
118
119
|
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
* @tsplus static fncts.schema.ParseError.IndexError __call
|
|
121
|
+
* @tsplus static fncts.schema.ParseErrorOps IndexError
|
|
122
|
+
*/
|
|
123
|
+
function indexError(index, error) {
|
|
124
|
+
return new IndexError(index, error);
|
|
124
125
|
}
|
|
125
126
|
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
127
|
+
* @tsplus companion fncts.schema.ParseError.KeyError
|
|
128
|
+
*/
|
|
129
|
+
var KeyError = class {
|
|
130
|
+
keyAST;
|
|
131
|
+
key;
|
|
132
|
+
error;
|
|
133
|
+
_tag = 3;
|
|
134
|
+
constructor(keyAST, key, error) {
|
|
135
|
+
this.keyAST = keyAST;
|
|
136
|
+
this.key = key;
|
|
137
|
+
this.error = error;
|
|
138
|
+
}
|
|
139
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
140
|
+
return hasTag(that, 3) && context.comparator(this.keyAST, that.keyAST) && context.comparator(this.key, that.key) && context.comparator(this.error, that.error);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
142
143
|
/**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
* @tsplus static fncts.schema.ParseError.KeyError __call
|
|
145
|
+
* @tsplus static fncts.schema.ParseErrorOps KeyError
|
|
146
|
+
*/
|
|
147
|
+
function keyError(keyAST, key, error) {
|
|
148
|
+
return new KeyError(keyAST, key, error);
|
|
148
149
|
}
|
|
149
150
|
/**
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
151
|
+
* @tsplus companion fncts.schema.ParseError.MissingError
|
|
152
|
+
*/
|
|
153
|
+
var MissingError = class {
|
|
154
|
+
_tag = 4;
|
|
155
|
+
[tsplus_module_1.equalsSymbol](that) {
|
|
156
|
+
return hasTag(that, 4);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
158
159
|
/**
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
* @tsplus static fncts.schema.ParseErrorOps MissingError
|
|
161
|
+
*/
|
|
162
|
+
const missingError = new MissingError();
|
|
162
163
|
/**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
164
|
+
* @tsplus companion fncts.schema.ParseError.UnexpectedError
|
|
165
|
+
*/
|
|
166
|
+
var UnexpectedError = class {
|
|
167
|
+
actual;
|
|
168
|
+
_tag = 5;
|
|
169
|
+
constructor(actual) {
|
|
170
|
+
this.actual = actual;
|
|
171
|
+
}
|
|
172
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
173
|
+
return hasTag(that, 5) && context.comparator(this.actual, that.actual);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
175
176
|
/**
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
* @tsplus static fncts.schema.ParseError.UnexpectedError __call
|
|
178
|
+
* @tsplus static fncts.schema.ParseErrorOps UnexpectedError
|
|
179
|
+
*/
|
|
180
|
+
function unexpectedError(actual) {
|
|
181
|
+
return new UnexpectedError(actual);
|
|
181
182
|
}
|
|
182
183
|
/**
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
184
|
+
* @tsplus companion fncts.schema.ParseError.UnionError
|
|
185
|
+
*/
|
|
186
|
+
var UnionError = class {
|
|
187
|
+
ast;
|
|
188
|
+
actual;
|
|
189
|
+
errors;
|
|
190
|
+
_tag = 11;
|
|
191
|
+
constructor(ast, actual, errors) {
|
|
192
|
+
this.ast = ast;
|
|
193
|
+
this.actual = actual;
|
|
194
|
+
this.errors = errors;
|
|
195
|
+
}
|
|
196
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
197
|
+
return hasTag(that, 11) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.errors, that.errors);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
199
200
|
/**
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
201
|
+
* @tsplus static fncts.schema.ParseError.UnionError __call
|
|
202
|
+
* @tsplus static fncts.schema.ParseErrorOps UnionError
|
|
203
|
+
*/
|
|
204
|
+
function unionError(ast, actual, errors) {
|
|
205
|
+
return new UnionError(ast, actual, errors);
|
|
205
206
|
}
|
|
206
207
|
/**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
208
|
+
* @tsplus companion fncts.schema.ParseError.UnionMemberError
|
|
209
|
+
*/
|
|
210
|
+
var UnionMemberError = class {
|
|
211
|
+
ast;
|
|
212
|
+
error;
|
|
213
|
+
_tag = 6;
|
|
214
|
+
constructor(ast, error) {
|
|
215
|
+
this.ast = ast;
|
|
216
|
+
this.error = error;
|
|
217
|
+
}
|
|
218
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
219
|
+
return hasTag(that, 6) && context.comparator(this.ast, that.ast) && context.comparator(this.error, that.error);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
221
222
|
/**
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
223
|
+
* @tsplus static fncts.schema.ParseError.UnionMemberError __call
|
|
224
|
+
* @tsplus static fncts.schema.ParseErrorOps UnionMemberError
|
|
225
|
+
*/
|
|
226
|
+
function unionMemberError(ast, error) {
|
|
227
|
+
return new UnionMemberError(ast, error);
|
|
227
228
|
}
|
|
228
229
|
/**
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
230
|
+
* @tsplus companion fncts.schema.ParseError.RefinementError
|
|
231
|
+
*/
|
|
232
|
+
var RefinementError = class {
|
|
233
|
+
ast;
|
|
234
|
+
actual;
|
|
235
|
+
kind;
|
|
236
|
+
error;
|
|
237
|
+
_tag = 7;
|
|
238
|
+
constructor(ast, actual, kind, error) {
|
|
239
|
+
this.ast = ast;
|
|
240
|
+
this.actual = actual;
|
|
241
|
+
this.kind = kind;
|
|
242
|
+
this.error = error;
|
|
243
|
+
}
|
|
244
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
245
|
+
return hasTag(that, 7) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.kind, that.kind) && context.comparator(this.error, that.error);
|
|
246
|
+
}
|
|
247
|
+
};
|
|
247
248
|
/**
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
* @tsplus static fncts.schema.ParseError.RefinementError __call
|
|
250
|
+
* @tsplus static fncts.schema.ParseErrorOps RefinementError
|
|
251
|
+
*/
|
|
252
|
+
function refinementError(ast, actual, kind, error) {
|
|
253
|
+
return new RefinementError(ast, actual, kind, error);
|
|
253
254
|
}
|
|
254
255
|
/**
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
256
|
+
* @tsplus companion fncts.schema.ParseError.TransformationError
|
|
257
|
+
*/
|
|
258
|
+
var TransformationError = class {
|
|
259
|
+
ast;
|
|
260
|
+
actual;
|
|
261
|
+
kind;
|
|
262
|
+
error;
|
|
263
|
+
_tag = 8;
|
|
264
|
+
constructor(ast, actual, kind, error) {
|
|
265
|
+
this.ast = ast;
|
|
266
|
+
this.actual = actual;
|
|
267
|
+
this.kind = kind;
|
|
268
|
+
this.error = error;
|
|
269
|
+
}
|
|
270
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
271
|
+
return hasTag(that, 8) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.kind, that.kind) && context.comparator(this.error, that.error);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
273
274
|
/**
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
* @tsplus static fncts.schema.ParseError.TransformationError __call
|
|
276
|
+
* @tsplus static fncts.schema.ParseErrorOps TransformationError
|
|
277
|
+
*/
|
|
278
|
+
function transformationError(ast, actual, kind, error) {
|
|
279
|
+
return new TransformationError(ast, actual, kind, error);
|
|
279
280
|
}
|
|
280
281
|
/**
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
282
|
+
* @tsplus companion fncts.schema.ParseError.IterableError
|
|
283
|
+
*/
|
|
284
|
+
var IterableError = class {
|
|
285
|
+
ast;
|
|
286
|
+
actual;
|
|
287
|
+
errors;
|
|
288
|
+
_tag = 12;
|
|
289
|
+
constructor(ast, actual, errors) {
|
|
290
|
+
this.ast = ast;
|
|
291
|
+
this.actual = actual;
|
|
292
|
+
this.errors = errors;
|
|
293
|
+
}
|
|
294
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
295
|
+
return hasTag(that, 12) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.errors, that.errors);
|
|
296
|
+
}
|
|
297
|
+
};
|
|
297
298
|
/**
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
299
|
+
* @tsplus static fncts.schema.ParseError.IterableError __call
|
|
300
|
+
* @tsplus static fncts.schema.ParseErrorOps IterableError
|
|
301
|
+
*/
|
|
302
|
+
function iterableError(ast, actual, errors) {
|
|
303
|
+
return new IterableError(ast, actual, errors);
|
|
303
304
|
}
|
|
305
|
+
//#endregion
|
|
306
|
+
export { DeclarationError, IndexError, IterableError, KeyError, MissingError, RefinementError, TransformationError, TupleError, TypeError, TypeLiteralError, UnexpectedError, UnionError, UnionMemberError, declarationError, indexError, iterableError, keyError, missingError, refinementError, transformationError, tupleError, typeError, typeLiteralError, unexpectedError, unionError, unionMemberError };
|
|
307
|
+
|
|
304
308
|
//# sourceMappingURL=ParseError.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParseError.mjs","names":["hasTag","u","tag","_tag","DeclarationError","ast","actual","error","constructor","tsplus_module_1","equalsSymbol","that","context","comparator","declarationError","TypeError","typeError","expected","TypeLiteralError","errors","output","typeLiteralError","TupleError","tupleError","IndexError","index","indexError","KeyError","keyAST","key","keyError","MissingError","missingError","UnexpectedError","unexpectedError","UnionError","unionError","UnionMemberError","unionMemberError","RefinementError","kind","refinementError","TransformationError","transformationError","IterableError","iterableError"],"sources":["../../_src/ParseError/ParseError.ts"],"sourcesContent":[null],"mappings":";AAmCA,SAASA,MAAMA,CAAmCC,CAAU,EAAEC,GAAM;EAClE,OAAO,OAAOD,CAAC,KAAK,QAAQ,IAAIA,CAAC,KAAK,IAAI,IAAI,MAAM,IAAIA,CAAC,IAAKA,CAAoB,CAACE,IAAI,KAAKD,GAAG;AACjG;AAEA;;;AAGA,OAAM,MAAOE,gBAAgB;EAGhBC,GAAA;EACAC,MAAA;EACAC,KAAA;EAJFJ,IAAI;EACbK,YACWH,GAAgB,EAChBC,MAAe,EACfC,KAAiB;IAFjB,KAAAF,GAAG,GAAHA,GAAG;IACH,KAAAC,MAAM,GAANA,MAAM;IACN,KAAAC,KAAK,GAALA,KAAK;EACb;EAEH,CAAAE,eAAA,CAAAC,YAAA,EAAgBC,IAAa,EAAEC,OAAsB;IACnD,OACEZ,MAAM,CAACW,IAAI,oCAA4B,IACvCC,OAAO,CAACC,UAAU,CAAC,IAAI,CAACR,GAAG,EAAEM,IAAI,CAACN,GAAG,CAAC,IACtCO,OAAO,CAACC,UAAU,CAAC,IAAI,CAACP,MAAM,EAAEK,IAAI,CAACL,MAAM,CAAC,IAC5CM,OAAO,CAACC,UAAU,CAAC,IAAI,CAACN,KAAK,EAAEI,IAAI,CAACJ,KAAK,CAAC;EAE9C;;AAGF;;;;AAIA,OAAM,SAAUO,gBAAgBA,CAACT,GAAgB,EAAEC,MAAe,EAAEC,KAAiB;EACnF,OAAO,IAAIH,gBAAgB,CAACC,GAAG,EAAEC,MAAM,EAAEC,KAAK,CAAC;AACjD;AAEA;;;AAGA,OAAM,MAAOQ,SAAS;EAGTV,GAAA;EACAC,MAAA;EAHFH,IAAI;EACbK,YACWH,GAAQ,EACRC,MAAe;IADf,KAAAD,GAAG,GAAHA,GAAG;IACH,KAAAC,MAAM,GAANA,MAAM;EACd;EAEH,CAAAG,eAAA,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EA;;;AAGA,OAAM,MAAOqC,aAAa;EAGbvC,GAAA;EACAC,MAAA;EACAa,MAAA;EAJFhB,IAAI;EACbK,YACWH,GAAQ,EACRC,MAAe,EACfa,MAAqC;IAFrC,KAAAd,GAAG,GAAHA,GAAG;IACH,KAAAC,MAAM,GAANA,MAAM;IACN,KAAAa,MAAM,GAANA,MAAM;EACd;EAEH,CAAAV,eAAA,CAAAC,YAAA,EAAgBC,IAAa,EAAEC,OAAsB;IACnD,OACEZ,MAAM,CAACW,IAAI,kCAAyB,IACpCC,OAAO,CAACC,UAAU,CAAC,IAAI,CAACR,GAAG,EAAEM,IAAI,CAACN,GAAG,CAAC,IACtCO,OAAO,CAACC,UAAU,CAAC,IAAI,CAACP,MAAM,EAAEK,IAAI,CAACL,MAAM,CAAC,IAC5CM,OAAO,CAACC,UAAU,CAAC,IAAI,CAACM,MAAM,EAAER,IAAI,CAACQ,MAAM,CAAC;EAEhD;;AAGF;;;;AAIA,OAAM,SAAU0B,aAAaA,CAACxC,GAAQ,EAAEC,MAAe,EAAEa,MAAqC;EAC5F,OAAO,IAAIyB,aAAa,CAACvC,GAAG,EAAEC,MAAM,EAAEa,MAAM,CAAC;AAC/C","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ParseError.mjs","names":[],"sources":["../../esm/ParseError/ParseError.js"],"sourcesContent":["import * as tsplus_module_1 from \"@fncts/base/data/Equatable/definition\";\nfunction hasTag(u, tag) {\n return typeof u === \"object\" && u !== null && \"_tag\" in u && u._tag === tag;\n}\n/**\n * @tsplus companion fncts.schema.ParseError.DeclarationError\n */\nexport class DeclarationError {\n ast;\n actual;\n error;\n _tag = 0 /* ParseErrorTag.Declaration */;\n constructor(ast, actual, error) {\n this.ast = ast;\n this.actual = actual;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 0 /* ParseErrorTag.Declaration */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.DeclarationError __call\n * @tsplus static fncts.schema.ParseErrorOps DeclarationError\n */\nexport function declarationError(ast, actual, error) {\n return new DeclarationError(ast, actual, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.TypeError\n */\nexport class TypeError {\n ast;\n actual;\n _tag = 1 /* ParseErrorTag.Type */;\n constructor(ast, actual) {\n this.ast = ast;\n this.actual = actual;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 1 /* ParseErrorTag.Type */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.TypeError __call\n * @tsplus static fncts.schema.ParseErrorOps TypeError\n */\nexport function typeError(expected, actual) {\n return new TypeError(expected, actual);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.TypeLiteralError\n */\nexport class TypeLiteralError {\n ast;\n actual;\n errors;\n output;\n _tag = 9 /* ParseErrorTag.TypeLiteral */;\n constructor(ast, actual, errors, output = {}) {\n this.ast = ast;\n this.actual = actual;\n this.errors = errors;\n this.output = output;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 9 /* ParseErrorTag.TypeLiteral */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.errors, that.errors) &&\n context.comparator(this.output, that.output));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.TypeLiteralError __call\n * @tsplus static fncts.schema.ParseErrorOps TypeLiteralError\n */\nexport function typeLiteralError(ast, actual, errors, output = {}) {\n return new TypeLiteralError(ast, actual, errors, output);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.TupleError\n */\nexport class TupleError {\n ast;\n actual;\n errors;\n output;\n _tag = 10 /* ParseErrorTag.Tuple */;\n constructor(ast, actual, errors, output = []) {\n this.ast = ast;\n this.actual = actual;\n this.errors = errors;\n this.output = output;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 10 /* ParseErrorTag.Tuple */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.errors, that.errors) &&\n context.comparator(this.output, that.output));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.TupleError __call\n * @tsplus static fncts.schema.ParseErrorOps TupleError\n */\nexport function tupleError(ast, actual, errors, output = []) {\n return new TupleError(ast, actual, errors, output);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.IndexError\n */\nexport class IndexError {\n index;\n error;\n _tag = 2 /* ParseErrorTag.Index */;\n constructor(index, error) {\n this.index = index;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 2 /* ParseErrorTag.Index */) &&\n context.comparator(this.index, that.index) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.IndexError __call\n * @tsplus static fncts.schema.ParseErrorOps IndexError\n */\nexport function indexError(index, error) {\n return new IndexError(index, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.KeyError\n */\nexport class KeyError {\n keyAST;\n key;\n error;\n _tag = 3 /* ParseErrorTag.Key */;\n constructor(keyAST, key, error) {\n this.keyAST = keyAST;\n this.key = key;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 3 /* ParseErrorTag.Key */) &&\n context.comparator(this.keyAST, that.keyAST) &&\n context.comparator(this.key, that.key) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.KeyError __call\n * @tsplus static fncts.schema.ParseErrorOps KeyError\n */\nexport function keyError(keyAST, key, error) {\n return new KeyError(keyAST, key, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.MissingError\n */\nexport class MissingError {\n _tag = 4 /* ParseErrorTag.Missing */;\n [tsplus_module_1.equalsSymbol](that) {\n return hasTag(that, 4 /* ParseErrorTag.Missing */);\n }\n}\n/**\n * @tsplus static fncts.schema.ParseErrorOps MissingError\n */\nexport const missingError = new MissingError();\n/**\n * @tsplus companion fncts.schema.ParseError.UnexpectedError\n */\nexport class UnexpectedError {\n actual;\n _tag = 5 /* ParseErrorTag.Unexpected */;\n constructor(actual) {\n this.actual = actual;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return hasTag(that, 5 /* ParseErrorTag.Unexpected */) && context.comparator(this.actual, that.actual);\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.UnexpectedError __call\n * @tsplus static fncts.schema.ParseErrorOps UnexpectedError\n */\nexport function unexpectedError(actual) {\n return new UnexpectedError(actual);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.UnionError\n */\nexport class UnionError {\n ast;\n actual;\n errors;\n _tag = 11 /* ParseErrorTag.Union */;\n constructor(ast, actual, errors) {\n this.ast = ast;\n this.actual = actual;\n this.errors = errors;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 11 /* ParseErrorTag.Union */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.errors, that.errors));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.UnionError __call\n * @tsplus static fncts.schema.ParseErrorOps UnionError\n */\nexport function unionError(ast, actual, errors) {\n return new UnionError(ast, actual, errors);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.UnionMemberError\n */\nexport class UnionMemberError {\n ast;\n error;\n _tag = 6 /* ParseErrorTag.UnionMember */;\n constructor(ast, error) {\n this.ast = ast;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 6 /* ParseErrorTag.UnionMember */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.UnionMemberError __call\n * @tsplus static fncts.schema.ParseErrorOps UnionMemberError\n */\nexport function unionMemberError(ast, error) {\n return new UnionMemberError(ast, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.RefinementError\n */\nexport class RefinementError {\n ast;\n actual;\n kind;\n error;\n _tag = 7 /* ParseErrorTag.Refinement */;\n constructor(ast, actual, kind, error) {\n this.ast = ast;\n this.actual = actual;\n this.kind = kind;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 7 /* ParseErrorTag.Refinement */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.kind, that.kind) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.RefinementError __call\n * @tsplus static fncts.schema.ParseErrorOps RefinementError\n */\nexport function refinementError(ast, actual, kind, error) {\n return new RefinementError(ast, actual, kind, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.TransformationError\n */\nexport class TransformationError {\n ast;\n actual;\n kind;\n error;\n _tag = 8 /* ParseErrorTag.Transformation */;\n constructor(ast, actual, kind, error) {\n this.ast = ast;\n this.actual = actual;\n this.kind = kind;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 8 /* ParseErrorTag.Transformation */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.kind, that.kind) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.TransformationError __call\n * @tsplus static fncts.schema.ParseErrorOps TransformationError\n */\nexport function transformationError(ast, actual, kind, error) {\n return new TransformationError(ast, actual, kind, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.IterableError\n */\nexport class IterableError {\n ast;\n actual;\n errors;\n _tag = 12 /* ParseErrorTag.Iterable */;\n constructor(ast, actual, errors) {\n this.ast = ast;\n this.actual = actual;\n this.errors = errors;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 12 /* ParseErrorTag.Iterable */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.errors, that.errors));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.IterableError __call\n * @tsplus static fncts.schema.ParseErrorOps IterableError\n */\nexport function iterableError(ast, actual, errors) {\n return new IterableError(ast, actual, errors);\n}\n//# sourceMappingURL=ParseError.js.map"],"mappings":";;AACA,SAAS,OAAO,GAAG,KAAK;AACpB,QAAO,OAAO,MAAM,YAAY,MAAM,QAAQ,UAAU,KAAK,EAAE,SAAS;;;;;AAK5E,IAAa,mBAAb,MAA8B;CAC1B;CACA;CACA;CACA,OAAO;CACP,YAAY,KAAK,QAAQ,OAAO;AAC5B,OAAK,MAAM;AACX,OAAK,SAAS;AACd,OAAK,QAAQ;;CAEjB,CAAC,gBAAgB,cAAc,MAAM,SAAS;AAC1C,SAAQ,OAAO,MAAM,EAAkC,IACnD,QAAQ,WAAW,KAAK,KAAK,KAAK,IAAI,IACtC,QAAQ,WAAW,KAAK,QAAQ,KAAK,OAAO,IAC5C,QAAQ,WAAW,KAAK,OAAO,KAAK,MAAM;;;;;;;AAOtD,SAAgB,iBAAiB,KAAK,QAAQ,OAAO;AACjD,QAAO,IAAI,iBAAiB,KAAK,QAAQ,MAAM;;;;;AAKnD,IAAa,YAAb,MAAuB;CACnB;CACA;CACA,OAAO;CACP,YAAY,KAAK,QAAQ;AACrB,OAAK,MAAM;AACX,OAAK,SAAS;;CAElB,CAAC,gBAAgB,cAAc,MAAM,SAAS;AAC1C,SAAQ,OAAO,MAAM,EAA2B,IAC5C,QAAQ,WAAW,KAAK,KAAK,KAAK,IAAI,IACtC,QAAQ,WAAW,KAAK,QAAQ,KAAK,OAAO;;;;;;;AAOxD,SAAgB,UAAU,UAAU,QAAQ;AACxC,QAAO,IAAI,UAAU,UAAU,OAAO;;;;;AAK1C,IAAa,mBAAb,MAA8B;CAC1B;CACA;CACA;CACA;CACA,OAAO;CACP,YAAY,KAAK,QAAQ,QAAQ,SAAS,EAAE,EAAE;AAC1C,OAAK,MAAM;AACX,OAAK,SAAS;AACd,OAAK,SAAS;AACd,OAAK,SAAS;;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