1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | (function (factory) {
|
---|
9 | if (typeof module === "object" && typeof module.exports === "object") {
|
---|
10 | var v = factory(require, exports);
|
---|
11 | if (v !== undefined) module.exports = v;
|
---|
12 | }
|
---|
13 | else if (typeof define === "function" && define.amd) {
|
---|
14 | define("@angular/compiler/src/output/ts_emitter", ["require", "exports", "tslib", "@angular/compiler/src/output/abstract_emitter", "@angular/compiler/src/output/output_ast"], factory);
|
---|
15 | }
|
---|
16 | })(function (require, exports) {
|
---|
17 | "use strict";
|
---|
18 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
19 | exports.TypeScriptEmitter = exports.debugOutputAstAsTypeScript = void 0;
|
---|
20 | var tslib_1 = require("tslib");
|
---|
21 | var abstract_emitter_1 = require("@angular/compiler/src/output/abstract_emitter");
|
---|
22 | var o = require("@angular/compiler/src/output/output_ast");
|
---|
23 | function debugOutputAstAsTypeScript(ast) {
|
---|
24 | var converter = new _TsEmitterVisitor();
|
---|
25 | var ctx = abstract_emitter_1.EmitterVisitorContext.createRoot();
|
---|
26 | var asts = Array.isArray(ast) ? ast : [ast];
|
---|
27 | asts.forEach(function (ast) {
|
---|
28 | if (ast instanceof o.Statement) {
|
---|
29 | ast.visitStatement(converter, ctx);
|
---|
30 | }
|
---|
31 | else if (ast instanceof o.Expression) {
|
---|
32 | ast.visitExpression(converter, ctx);
|
---|
33 | }
|
---|
34 | else if (ast instanceof o.Type) {
|
---|
35 | ast.visitType(converter, ctx);
|
---|
36 | }
|
---|
37 | else {
|
---|
38 | throw new Error("Don't know how to print debug info for " + ast);
|
---|
39 | }
|
---|
40 | });
|
---|
41 | return ctx.toSource();
|
---|
42 | }
|
---|
43 | exports.debugOutputAstAsTypeScript = debugOutputAstAsTypeScript;
|
---|
44 | var TypeScriptEmitter = /** @class */ (function () {
|
---|
45 | function TypeScriptEmitter() {
|
---|
46 | }
|
---|
47 | TypeScriptEmitter.prototype.emitStatementsAndContext = function (genFilePath, stmts, preamble, emitSourceMaps, referenceFilter, importFilter) {
|
---|
48 | if (preamble === void 0) { preamble = ''; }
|
---|
49 | if (emitSourceMaps === void 0) { emitSourceMaps = true; }
|
---|
50 | var converter = new _TsEmitterVisitor(referenceFilter, importFilter);
|
---|
51 | var ctx = abstract_emitter_1.EmitterVisitorContext.createRoot();
|
---|
52 | converter.visitAllStatements(stmts, ctx);
|
---|
53 | var preambleLines = preamble ? preamble.split('\n') : [];
|
---|
54 | converter.reexports.forEach(function (reexports, exportedModuleName) {
|
---|
55 | var reexportsCode = reexports.map(function (reexport) { return reexport.name + " as " + reexport.as; }).join(',');
|
---|
56 | preambleLines.push("export {" + reexportsCode + "} from '" + exportedModuleName + "';");
|
---|
57 | });
|
---|
58 | converter.importsWithPrefixes.forEach(function (prefix, importedModuleName) {
|
---|
59 | // Note: can't write the real word for import as it screws up system.js auto detection...
|
---|
60 | preambleLines.push("imp" +
|
---|
61 | ("ort * as " + prefix + " from '" + importedModuleName + "';"));
|
---|
62 | });
|
---|
63 | var sm = emitSourceMaps ?
|
---|
64 | ctx.toSourceMapGenerator(genFilePath, preambleLines.length).toJsComment() :
|
---|
65 | '';
|
---|
66 | var lines = tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(preambleLines)), [ctx.toSource(), sm]);
|
---|
67 | if (sm) {
|
---|
68 | // always add a newline at the end, as some tools have bugs without it.
|
---|
69 | lines.push('');
|
---|
70 | }
|
---|
71 | ctx.setPreambleLineCount(preambleLines.length);
|
---|
72 | return { sourceText: lines.join('\n'), context: ctx };
|
---|
73 | };
|
---|
74 | TypeScriptEmitter.prototype.emitStatements = function (genFilePath, stmts, preamble) {
|
---|
75 | if (preamble === void 0) { preamble = ''; }
|
---|
76 | return this.emitStatementsAndContext(genFilePath, stmts, preamble).sourceText;
|
---|
77 | };
|
---|
78 | return TypeScriptEmitter;
|
---|
79 | }());
|
---|
80 | exports.TypeScriptEmitter = TypeScriptEmitter;
|
---|
81 | var _TsEmitterVisitor = /** @class */ (function (_super) {
|
---|
82 | tslib_1.__extends(_TsEmitterVisitor, _super);
|
---|
83 | function _TsEmitterVisitor(referenceFilter, importFilter) {
|
---|
84 | var _this = _super.call(this, false) || this;
|
---|
85 | _this.referenceFilter = referenceFilter;
|
---|
86 | _this.importFilter = importFilter;
|
---|
87 | _this.typeExpression = 0;
|
---|
88 | _this.importsWithPrefixes = new Map();
|
---|
89 | _this.reexports = new Map();
|
---|
90 | return _this;
|
---|
91 | }
|
---|
92 | _TsEmitterVisitor.prototype.visitType = function (t, ctx, defaultType) {
|
---|
93 | if (defaultType === void 0) { defaultType = 'any'; }
|
---|
94 | if (t) {
|
---|
95 | this.typeExpression++;
|
---|
96 | t.visitType(this, ctx);
|
---|
97 | this.typeExpression--;
|
---|
98 | }
|
---|
99 | else {
|
---|
100 | ctx.print(null, defaultType);
|
---|
101 | }
|
---|
102 | };
|
---|
103 | _TsEmitterVisitor.prototype.visitLiteralExpr = function (ast, ctx) {
|
---|
104 | var value = ast.value;
|
---|
105 | if (value == null && ast.type != o.INFERRED_TYPE) {
|
---|
106 | ctx.print(ast, "(" + value + " as any)");
|
---|
107 | return null;
|
---|
108 | }
|
---|
109 | return _super.prototype.visitLiteralExpr.call(this, ast, ctx);
|
---|
110 | };
|
---|
111 | // Temporary workaround to support strictNullCheck enabled consumers of ngc emit.
|
---|
112 | // In SNC mode, [] have the type never[], so we cast here to any[].
|
---|
113 | // TODO: narrow the cast to a more explicit type, or use a pattern that does not
|
---|
114 | // start with [].concat. see https://github.com/angular/angular/pull/11846
|
---|
115 | _TsEmitterVisitor.prototype.visitLiteralArrayExpr = function (ast, ctx) {
|
---|
116 | if (ast.entries.length === 0) {
|
---|
117 | ctx.print(ast, '(');
|
---|
118 | }
|
---|
119 | var result = _super.prototype.visitLiteralArrayExpr.call(this, ast, ctx);
|
---|
120 | if (ast.entries.length === 0) {
|
---|
121 | ctx.print(ast, ' as any[])');
|
---|
122 | }
|
---|
123 | return result;
|
---|
124 | };
|
---|
125 | _TsEmitterVisitor.prototype.visitExternalExpr = function (ast, ctx) {
|
---|
126 | this._visitIdentifier(ast.value, ast.typeParams, ctx);
|
---|
127 | return null;
|
---|
128 | };
|
---|
129 | _TsEmitterVisitor.prototype.visitAssertNotNullExpr = function (ast, ctx) {
|
---|
130 | var result = _super.prototype.visitAssertNotNullExpr.call(this, ast, ctx);
|
---|
131 | ctx.print(ast, '!');
|
---|
132 | return result;
|
---|
133 | };
|
---|
134 | _TsEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {
|
---|
135 | if (stmt.hasModifier(o.StmtModifier.Exported) && stmt.value instanceof o.ExternalExpr &&
|
---|
136 | !stmt.type) {
|
---|
137 | // check for a reexport
|
---|
138 | var _a = stmt.value.value, name_1 = _a.name, moduleName = _a.moduleName;
|
---|
139 | if (moduleName) {
|
---|
140 | var reexports = this.reexports.get(moduleName);
|
---|
141 | if (!reexports) {
|
---|
142 | reexports = [];
|
---|
143 | this.reexports.set(moduleName, reexports);
|
---|
144 | }
|
---|
145 | reexports.push({ name: name_1, as: stmt.name });
|
---|
146 | return null;
|
---|
147 | }
|
---|
148 | }
|
---|
149 | if (stmt.hasModifier(o.StmtModifier.Exported)) {
|
---|
150 | ctx.print(stmt, "export ");
|
---|
151 | }
|
---|
152 | if (stmt.hasModifier(o.StmtModifier.Final)) {
|
---|
153 | ctx.print(stmt, "const");
|
---|
154 | }
|
---|
155 | else {
|
---|
156 | ctx.print(stmt, "var");
|
---|
157 | }
|
---|
158 | ctx.print(stmt, " " + stmt.name);
|
---|
159 | this._printColonType(stmt.type, ctx);
|
---|
160 | if (stmt.value) {
|
---|
161 | ctx.print(stmt, " = ");
|
---|
162 | stmt.value.visitExpression(this, ctx);
|
---|
163 | }
|
---|
164 | ctx.println(stmt, ";");
|
---|
165 | return null;
|
---|
166 | };
|
---|
167 | _TsEmitterVisitor.prototype.visitWrappedNodeExpr = function (ast, ctx) {
|
---|
168 | throw new Error('Cannot visit a WrappedNodeExpr when outputting Typescript.');
|
---|
169 | };
|
---|
170 | _TsEmitterVisitor.prototype.visitCastExpr = function (ast, ctx) {
|
---|
171 | ctx.print(ast, "(<");
|
---|
172 | ast.type.visitType(this, ctx);
|
---|
173 | ctx.print(ast, ">");
|
---|
174 | ast.value.visitExpression(this, ctx);
|
---|
175 | ctx.print(ast, ")");
|
---|
176 | return null;
|
---|
177 | };
|
---|
178 | _TsEmitterVisitor.prototype.visitInstantiateExpr = function (ast, ctx) {
|
---|
179 | ctx.print(ast, "new ");
|
---|
180 | this.typeExpression++;
|
---|
181 | ast.classExpr.visitExpression(this, ctx);
|
---|
182 | this.typeExpression--;
|
---|
183 | ctx.print(ast, "(");
|
---|
184 | this.visitAllExpressions(ast.args, ctx, ',');
|
---|
185 | ctx.print(ast, ")");
|
---|
186 | return null;
|
---|
187 | };
|
---|
188 | _TsEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {
|
---|
189 | var _this = this;
|
---|
190 | ctx.pushClass(stmt);
|
---|
191 | if (stmt.hasModifier(o.StmtModifier.Exported)) {
|
---|
192 | ctx.print(stmt, "export ");
|
---|
193 | }
|
---|
194 | ctx.print(stmt, "class " + stmt.name);
|
---|
195 | if (stmt.parent != null) {
|
---|
196 | ctx.print(stmt, " extends ");
|
---|
197 | this.typeExpression++;
|
---|
198 | stmt.parent.visitExpression(this, ctx);
|
---|
199 | this.typeExpression--;
|
---|
200 | }
|
---|
201 | ctx.println(stmt, " {");
|
---|
202 | ctx.incIndent();
|
---|
203 | stmt.fields.forEach(function (field) { return _this._visitClassField(field, ctx); });
|
---|
204 | if (stmt.constructorMethod != null) {
|
---|
205 | this._visitClassConstructor(stmt, ctx);
|
---|
206 | }
|
---|
207 | stmt.getters.forEach(function (getter) { return _this._visitClassGetter(getter, ctx); });
|
---|
208 | stmt.methods.forEach(function (method) { return _this._visitClassMethod(method, ctx); });
|
---|
209 | ctx.decIndent();
|
---|
210 | ctx.println(stmt, "}");
|
---|
211 | ctx.popClass();
|
---|
212 | return null;
|
---|
213 | };
|
---|
214 | _TsEmitterVisitor.prototype._visitClassField = function (field, ctx) {
|
---|
215 | if (field.hasModifier(o.StmtModifier.Private)) {
|
---|
216 | // comment out as a workaround for #10967
|
---|
217 | ctx.print(null, "/*private*/ ");
|
---|
218 | }
|
---|
219 | if (field.hasModifier(o.StmtModifier.Static)) {
|
---|
220 | ctx.print(null, 'static ');
|
---|
221 | }
|
---|
222 | ctx.print(null, field.name);
|
---|
223 | this._printColonType(field.type, ctx);
|
---|
224 | if (field.initializer) {
|
---|
225 | ctx.print(null, ' = ');
|
---|
226 | field.initializer.visitExpression(this, ctx);
|
---|
227 | }
|
---|
228 | ctx.println(null, ";");
|
---|
229 | };
|
---|
230 | _TsEmitterVisitor.prototype._visitClassGetter = function (getter, ctx) {
|
---|
231 | if (getter.hasModifier(o.StmtModifier.Private)) {
|
---|
232 | ctx.print(null, "private ");
|
---|
233 | }
|
---|
234 | ctx.print(null, "get " + getter.name + "()");
|
---|
235 | this._printColonType(getter.type, ctx);
|
---|
236 | ctx.println(null, " {");
|
---|
237 | ctx.incIndent();
|
---|
238 | this.visitAllStatements(getter.body, ctx);
|
---|
239 | ctx.decIndent();
|
---|
240 | ctx.println(null, "}");
|
---|
241 | };
|
---|
242 | _TsEmitterVisitor.prototype._visitClassConstructor = function (stmt, ctx) {
|
---|
243 | ctx.print(stmt, "constructor(");
|
---|
244 | this._visitParams(stmt.constructorMethod.params, ctx);
|
---|
245 | ctx.println(stmt, ") {");
|
---|
246 | ctx.incIndent();
|
---|
247 | this.visitAllStatements(stmt.constructorMethod.body, ctx);
|
---|
248 | ctx.decIndent();
|
---|
249 | ctx.println(stmt, "}");
|
---|
250 | };
|
---|
251 | _TsEmitterVisitor.prototype._visitClassMethod = function (method, ctx) {
|
---|
252 | if (method.hasModifier(o.StmtModifier.Private)) {
|
---|
253 | ctx.print(null, "private ");
|
---|
254 | }
|
---|
255 | ctx.print(null, method.name + "(");
|
---|
256 | this._visitParams(method.params, ctx);
|
---|
257 | ctx.print(null, ")");
|
---|
258 | this._printColonType(method.type, ctx, 'void');
|
---|
259 | ctx.println(null, " {");
|
---|
260 | ctx.incIndent();
|
---|
261 | this.visitAllStatements(method.body, ctx);
|
---|
262 | ctx.decIndent();
|
---|
263 | ctx.println(null, "}");
|
---|
264 | };
|
---|
265 | _TsEmitterVisitor.prototype.visitFunctionExpr = function (ast, ctx) {
|
---|
266 | if (ast.name) {
|
---|
267 | ctx.print(ast, 'function ');
|
---|
268 | ctx.print(ast, ast.name);
|
---|
269 | }
|
---|
270 | ctx.print(ast, "(");
|
---|
271 | this._visitParams(ast.params, ctx);
|
---|
272 | ctx.print(ast, ")");
|
---|
273 | this._printColonType(ast.type, ctx, 'void');
|
---|
274 | if (!ast.name) {
|
---|
275 | ctx.print(ast, " => ");
|
---|
276 | }
|
---|
277 | ctx.println(ast, '{');
|
---|
278 | ctx.incIndent();
|
---|
279 | this.visitAllStatements(ast.statements, ctx);
|
---|
280 | ctx.decIndent();
|
---|
281 | ctx.print(ast, "}");
|
---|
282 | return null;
|
---|
283 | };
|
---|
284 | _TsEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {
|
---|
285 | if (stmt.hasModifier(o.StmtModifier.Exported)) {
|
---|
286 | ctx.print(stmt, "export ");
|
---|
287 | }
|
---|
288 | ctx.print(stmt, "function " + stmt.name + "(");
|
---|
289 | this._visitParams(stmt.params, ctx);
|
---|
290 | ctx.print(stmt, ")");
|
---|
291 | this._printColonType(stmt.type, ctx, 'void');
|
---|
292 | ctx.println(stmt, " {");
|
---|
293 | ctx.incIndent();
|
---|
294 | this.visitAllStatements(stmt.statements, ctx);
|
---|
295 | ctx.decIndent();
|
---|
296 | ctx.println(stmt, "}");
|
---|
297 | return null;
|
---|
298 | };
|
---|
299 | _TsEmitterVisitor.prototype.visitTryCatchStmt = function (stmt, ctx) {
|
---|
300 | ctx.println(stmt, "try {");
|
---|
301 | ctx.incIndent();
|
---|
302 | this.visitAllStatements(stmt.bodyStmts, ctx);
|
---|
303 | ctx.decIndent();
|
---|
304 | ctx.println(stmt, "} catch (" + abstract_emitter_1.CATCH_ERROR_VAR.name + ") {");
|
---|
305 | ctx.incIndent();
|
---|
306 | var catchStmts = [abstract_emitter_1.CATCH_STACK_VAR.set(abstract_emitter_1.CATCH_ERROR_VAR.prop('stack', null)).toDeclStmt(null, [
|
---|
307 | o.StmtModifier.Final
|
---|
308 | ])].concat(stmt.catchStmts);
|
---|
309 | this.visitAllStatements(catchStmts, ctx);
|
---|
310 | ctx.decIndent();
|
---|
311 | ctx.println(stmt, "}");
|
---|
312 | return null;
|
---|
313 | };
|
---|
314 | _TsEmitterVisitor.prototype.visitBuiltinType = function (type, ctx) {
|
---|
315 | var typeStr;
|
---|
316 | switch (type.name) {
|
---|
317 | case o.BuiltinTypeName.Bool:
|
---|
318 | typeStr = 'boolean';
|
---|
319 | break;
|
---|
320 | case o.BuiltinTypeName.Dynamic:
|
---|
321 | typeStr = 'any';
|
---|
322 | break;
|
---|
323 | case o.BuiltinTypeName.Function:
|
---|
324 | typeStr = 'Function';
|
---|
325 | break;
|
---|
326 | case o.BuiltinTypeName.Number:
|
---|
327 | typeStr = 'number';
|
---|
328 | break;
|
---|
329 | case o.BuiltinTypeName.Int:
|
---|
330 | typeStr = 'number';
|
---|
331 | break;
|
---|
332 | case o.BuiltinTypeName.String:
|
---|
333 | typeStr = 'string';
|
---|
334 | break;
|
---|
335 | case o.BuiltinTypeName.None:
|
---|
336 | typeStr = 'never';
|
---|
337 | break;
|
---|
338 | default:
|
---|
339 | throw new Error("Unsupported builtin type " + type.name);
|
---|
340 | }
|
---|
341 | ctx.print(null, typeStr);
|
---|
342 | return null;
|
---|
343 | };
|
---|
344 | _TsEmitterVisitor.prototype.visitExpressionType = function (ast, ctx) {
|
---|
345 | var _this = this;
|
---|
346 | ast.value.visitExpression(this, ctx);
|
---|
347 | if (ast.typeParams !== null) {
|
---|
348 | ctx.print(null, '<');
|
---|
349 | this.visitAllObjects(function (type) { return _this.visitType(type, ctx); }, ast.typeParams, ctx, ',');
|
---|
350 | ctx.print(null, '>');
|
---|
351 | }
|
---|
352 | return null;
|
---|
353 | };
|
---|
354 | _TsEmitterVisitor.prototype.visitArrayType = function (type, ctx) {
|
---|
355 | this.visitType(type.of, ctx);
|
---|
356 | ctx.print(null, "[]");
|
---|
357 | return null;
|
---|
358 | };
|
---|
359 | _TsEmitterVisitor.prototype.visitMapType = function (type, ctx) {
|
---|
360 | ctx.print(null, "{[key: string]:");
|
---|
361 | this.visitType(type.valueType, ctx);
|
---|
362 | ctx.print(null, "}");
|
---|
363 | return null;
|
---|
364 | };
|
---|
365 | _TsEmitterVisitor.prototype.getBuiltinMethodName = function (method) {
|
---|
366 | var name;
|
---|
367 | switch (method) {
|
---|
368 | case o.BuiltinMethod.ConcatArray:
|
---|
369 | name = 'concat';
|
---|
370 | break;
|
---|
371 | case o.BuiltinMethod.SubscribeObservable:
|
---|
372 | name = 'subscribe';
|
---|
373 | break;
|
---|
374 | case o.BuiltinMethod.Bind:
|
---|
375 | name = 'bind';
|
---|
376 | break;
|
---|
377 | default:
|
---|
378 | throw new Error("Unknown builtin method: " + method);
|
---|
379 | }
|
---|
380 | return name;
|
---|
381 | };
|
---|
382 | _TsEmitterVisitor.prototype._visitParams = function (params, ctx) {
|
---|
383 | var _this = this;
|
---|
384 | this.visitAllObjects(function (param) {
|
---|
385 | ctx.print(null, param.name);
|
---|
386 | _this._printColonType(param.type, ctx);
|
---|
387 | }, params, ctx, ',');
|
---|
388 | };
|
---|
389 | _TsEmitterVisitor.prototype._visitIdentifier = function (value, typeParams, ctx) {
|
---|
390 | var _this = this;
|
---|
391 | var name = value.name, moduleName = value.moduleName;
|
---|
392 | if (this.referenceFilter && this.referenceFilter(value)) {
|
---|
393 | ctx.print(null, '(null as any)');
|
---|
394 | return;
|
---|
395 | }
|
---|
396 | if (moduleName && (!this.importFilter || !this.importFilter(value))) {
|
---|
397 | var prefix = this.importsWithPrefixes.get(moduleName);
|
---|
398 | if (prefix == null) {
|
---|
399 | prefix = "i" + this.importsWithPrefixes.size;
|
---|
400 | this.importsWithPrefixes.set(moduleName, prefix);
|
---|
401 | }
|
---|
402 | ctx.print(null, prefix + ".");
|
---|
403 | }
|
---|
404 | ctx.print(null, name);
|
---|
405 | if (this.typeExpression > 0) {
|
---|
406 | // If we are in a type expression that refers to a generic type then supply
|
---|
407 | // the required type parameters. If there were not enough type parameters
|
---|
408 | // supplied, supply any as the type. Outside a type expression the reference
|
---|
409 | // should not supply type parameters and be treated as a simple value reference
|
---|
410 | // to the constructor function itself.
|
---|
411 | var suppliedParameters = typeParams || [];
|
---|
412 | if (suppliedParameters.length > 0) {
|
---|
413 | ctx.print(null, "<");
|
---|
414 | this.visitAllObjects(function (type) { return type.visitType(_this, ctx); }, typeParams, ctx, ',');
|
---|
415 | ctx.print(null, ">");
|
---|
416 | }
|
---|
417 | }
|
---|
418 | };
|
---|
419 | _TsEmitterVisitor.prototype._printColonType = function (type, ctx, defaultType) {
|
---|
420 | if (type !== o.INFERRED_TYPE) {
|
---|
421 | ctx.print(null, ':');
|
---|
422 | this.visitType(type, ctx, defaultType);
|
---|
423 | }
|
---|
424 | };
|
---|
425 | return _TsEmitterVisitor;
|
---|
426 | }(abstract_emitter_1.AbstractEmitterVisitor));
|
---|
427 | });
|
---|
428 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNfZW1pdHRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy9vdXRwdXQvdHNfZW1pdHRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTU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