@reactra/language-tools 0.1.0-alpha.0
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 +21 -0
- package/README.md +109 -0
- package/dist/cli/reactra-tsc.d.ts +3 -0
- package/dist/cli/reactra-tsc.d.ts.map +1 -0
- package/dist/cli/reactra-tsc.js +25 -0
- package/dist/cli/reactra-tsc.js.map +1 -0
- package/dist/diagnostic-plugin.d.ts +12 -0
- package/dist/diagnostic-plugin.d.ts.map +1 -0
- package/dist/diagnostic-plugin.js +112 -0
- package/dist/diagnostic-plugin.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/language-plugin.d.ts +44 -0
- package/dist/language-plugin.d.ts.map +1 -0
- package/dist/language-plugin.js +323 -0
- package/dist/language-plugin.js.map +1 -0
- package/dist/lsp/server.cjs +68546 -0
- package/dist/shadow/emitter.d.ts +15 -0
- package/dist/shadow/emitter.d.ts.map +1 -0
- package/dist/shadow/emitter.js +871 -0
- package/dist/shadow/emitter.js.map +1 -0
- package/dist/shadow/index.d.ts +3 -0
- package/dist/shadow/index.d.ts.map +1 -0
- package/dist/shadow/index.js +4 -0
- package/dist/shadow/index.js.map +1 -0
- package/dist/shadow/mapper.d.ts +55 -0
- package/dist/shadow/mapper.d.ts.map +1 -0
- package/dist/shadow/mapper.js +111 -0
- package/dist/shadow/mapper.js.map +1 -0
- package/dist/ts-plugin/impl.cjs +50132 -0
- package/dist/ts-plugin/index.cjs +3 -0
- package/dist/ts-plugin/package.json +8 -0
- package/package.json +58 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
// Volar LanguagePlugin for the Reactra DSL.
|
|
2
|
+
// Per plan/phase-4-language-tools-spec.md §5 (Volar LanguagePlugin design).
|
|
3
|
+
//
|
|
4
|
+
// Registers .tsx files whose first 4KB contains DSL keywords as "reactra"
|
|
5
|
+
// language files, then generates a TypeScript shadow (virtual code) so Volar
|
|
6
|
+
// surfaces type errors and completions at their original DSL positions.
|
|
7
|
+
//
|
|
8
|
+
// The `typescript.getServiceScript` hook (per @volar/typescript module
|
|
9
|
+
// augmentation) tells the Volar TS proxy which embedded VirtualCode to use
|
|
10
|
+
// as the TypeScript language service target. Required for diagnostic
|
|
11
|
+
// transformation and goto-def to work via `createProxyLanguageService`.
|
|
12
|
+
// A5: the LSP consumes only `.graph` + `.rewrites`, so it runs `compileToGraph`
|
|
13
|
+
// (preprocess → parse → extract → read-sets) and skips Pass 9 codegen — no
|
|
14
|
+
// wasted per-keystroke emission. `compile` and `compileToGraph` share one
|
|
15
|
+
// pipeline prefix, so the graph here never drifts from what `compile` emits.
|
|
16
|
+
// §B1 / C3: import via the package surface, not a cross-package relative path.
|
|
17
|
+
import { compileToGraph } from "@reactra/babel-plugin";
|
|
18
|
+
// Reuse the compiler's own DSL-detection predicate so the editor gate can't drift
|
|
19
|
+
// from the grammar (the babel-plugin REACTRA_CONTAINER_RE — covers every v2 container
|
|
20
|
+
// form incl. `export <lifetime> store` / `subtree store`, which a hand-rolled regex here
|
|
21
|
+
// previously missed).
|
|
22
|
+
import { containsReactraDsl, preprocess } from "@reactra/babel-plugin";
|
|
23
|
+
import { emitShadow } from "./shadow/emitter.js";
|
|
24
|
+
import { preprocessedToDslOffset } from "./shadow/mapper.js";
|
|
25
|
+
const REACTRA_LANG_ID = "reactra";
|
|
26
|
+
/** Heuristic: does this file look like Reactra DSL? */
|
|
27
|
+
const couldBeDsl = (scriptId) => {
|
|
28
|
+
if (!scriptId.endsWith(".tsx"))
|
|
29
|
+
return false;
|
|
30
|
+
return true; // detection deferred to createVirtualCode (parse-time check)
|
|
31
|
+
};
|
|
32
|
+
/** Create a minimal script snapshot from a string. */
|
|
33
|
+
const createSnapshotFromString = (text) => ({
|
|
34
|
+
getText: (start, end) => text.slice(start, end),
|
|
35
|
+
getLength: () => text.length,
|
|
36
|
+
getChangeRange: () => undefined,
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* An empty virtual code returned when compile() throws (DSL syntax error).
|
|
40
|
+
* `parseError` annotates it (C2) so the diagnostic plugin can surface LSP011;
|
|
41
|
+
* omit it for the transient no-DSL / not-yet-typed cases that shouldn't squiggle.
|
|
42
|
+
*/
|
|
43
|
+
const emptyVirtualCode = (_content, parseError) => ({
|
|
44
|
+
id: "shadow",
|
|
45
|
+
languageId: "typescript",
|
|
46
|
+
snapshot: createSnapshotFromString(`// [reactra] parse error — shadow unavailable\nexport {}`),
|
|
47
|
+
mappings: [],
|
|
48
|
+
embeddedCodes: [],
|
|
49
|
+
...(parseError ? { reactraParseError: parseError } : {}),
|
|
50
|
+
});
|
|
51
|
+
/** Strip the trailing `(line:col)` babel appends — the range conveys position. */
|
|
52
|
+
const cleanBabelMessage = (err) => {
|
|
53
|
+
const raw = err instanceof Error ? err.message : String(err);
|
|
54
|
+
return raw.replace(/\s*\(\d+:\d+\)\s*$/, "");
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Translate one ShadowMapping to a Volar CodeMapping.
|
|
58
|
+
* `sourceOffsets` maps to DSL source positions; `generatedOffsets` to shadow positions.
|
|
59
|
+
* All four language features are enabled so Volar surfaces errors, completions,
|
|
60
|
+
* hover, and goto-definition at the original DSL site (per spec §5).
|
|
61
|
+
*/
|
|
62
|
+
const toVolarMapping = (m) => ({
|
|
63
|
+
sourceOffsets: [m.sourceOffset],
|
|
64
|
+
generatedOffsets: [m.generatedOffset],
|
|
65
|
+
lengths: [m.length],
|
|
66
|
+
data: {
|
|
67
|
+
verification: true,
|
|
68
|
+
completion: true,
|
|
69
|
+
semantic: true,
|
|
70
|
+
navigation: true,
|
|
71
|
+
structure: false,
|
|
72
|
+
format: false,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
// A `.` that ends an expression mid-typing — not part of a number, spread, or a
|
|
76
|
+
// member access that already has a property name. Two shapes:
|
|
77
|
+
// - `obj.` / `obj?.` followed by `}`, `)`, `;`, a newline… (typed at the end)
|
|
78
|
+
// - `obj?..prop` — the dot typed with the cursor BEFORE an existing member
|
|
79
|
+
// access (`summary.data?|.highestValue` + '.'), leaving a double dot.
|
|
80
|
+
// Both are the moment the user just typed the dot and wants member completions;
|
|
81
|
+
// the file is transiently unparseable right then.
|
|
82
|
+
const DANGLING_DOT_RE = /(?<![.\d])\.(?![.\dA-Za-z_$])|(?<![.\d])\.(?=\.[A-Za-z_$])/g;
|
|
83
|
+
// Property name inserted after a dangling dot so Babel can parse the file.
|
|
84
|
+
// tsserver serves member completions at the position right after the dot even
|
|
85
|
+
// with this identifier following (verified against plain TS), so the dummy
|
|
86
|
+
// stays in the shadow text.
|
|
87
|
+
const COMPLETION_DUMMY = "__reactraDot__";
|
|
88
|
+
/**
|
|
89
|
+
* Map a Babel parse error to a DSL source offset. compile() parses the
|
|
90
|
+
* PREPROCESSED text, so the error's pos/loc are preprocessed coordinates;
|
|
91
|
+
* preprocess() is deterministic, so re-running it yields the rewrites needed
|
|
92
|
+
* to translate back. Returns null when the error carries no usable position.
|
|
93
|
+
*/
|
|
94
|
+
const parseErrorDslOffset = (err, content) => {
|
|
95
|
+
try {
|
|
96
|
+
const e = err;
|
|
97
|
+
const { code: pp, rewrites } = preprocess(content);
|
|
98
|
+
let ppPos = typeof e.pos === "number" ? e.pos : null;
|
|
99
|
+
if (ppPos === null &&
|
|
100
|
+
typeof e.loc?.line === "number" &&
|
|
101
|
+
typeof e.loc?.column === "number") {
|
|
102
|
+
const lines = pp.split("\n");
|
|
103
|
+
ppPos =
|
|
104
|
+
lines.slice(0, e.loc.line - 1).reduce((n, l) => n + l.length + 1, 0) +
|
|
105
|
+
e.loc.column;
|
|
106
|
+
}
|
|
107
|
+
if (ppPos === null)
|
|
108
|
+
return null;
|
|
109
|
+
return preprocessedToDslOffset(ppPos, rewrites);
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Adjust patched-source mappings back to real-source coordinates.
|
|
117
|
+
* `insertions` are dummy start offsets in PATCHED coordinates (ascending).
|
|
118
|
+
* A mapping that spans a dummy is SPLIT around it: the segment before ends at
|
|
119
|
+
* the just-typed dot (whose end boundary is the completion position), and the
|
|
120
|
+
* segment after keeps the rest of the line mapped (hover etc. mid-edit).
|
|
121
|
+
* Segments inside a dummy are dropped; later mappings shift left.
|
|
122
|
+
*/
|
|
123
|
+
const adjustForInsertions = (mappings, insertions) => {
|
|
124
|
+
const dummyLen = COMPLETION_DUMMY.length;
|
|
125
|
+
const out = [];
|
|
126
|
+
for (const m of mappings) {
|
|
127
|
+
let patchedPos = m.sourceOffset;
|
|
128
|
+
let genPos = m.generatedOffset;
|
|
129
|
+
let remaining = m.length;
|
|
130
|
+
let shift = insertions.filter((ins) => ins + dummyLen <= patchedPos).length * dummyLen;
|
|
131
|
+
// Starts mid-dummy — skip to the dummy's end before emitting segments.
|
|
132
|
+
const enclosing = insertions.find((ins) => patchedPos > ins && patchedPos < ins + dummyLen);
|
|
133
|
+
if (enclosing !== undefined) {
|
|
134
|
+
const skip = enclosing + dummyLen - patchedPos;
|
|
135
|
+
patchedPos += skip;
|
|
136
|
+
genPos += skip;
|
|
137
|
+
remaining -= skip;
|
|
138
|
+
shift += dummyLen;
|
|
139
|
+
}
|
|
140
|
+
while (remaining > 0) {
|
|
141
|
+
const nextIns = insertions.find((ins) => ins >= patchedPos && ins < patchedPos + remaining);
|
|
142
|
+
if (nextIns === undefined) {
|
|
143
|
+
out.push({ ...m, sourceOffset: patchedPos - shift, generatedOffset: genPos, length: remaining });
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
const segLen = nextIns - patchedPos;
|
|
147
|
+
if (segLen > 0) {
|
|
148
|
+
out.push({ ...m, sourceOffset: patchedPos - shift, generatedOffset: genPos, length: segLen });
|
|
149
|
+
}
|
|
150
|
+
patchedPos = nextIns + dummyLen;
|
|
151
|
+
genPos += segLen + dummyLen;
|
|
152
|
+
remaining -= segLen + dummyLen;
|
|
153
|
+
shift += dummyLen;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return out;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Build a VirtualCode from a file snapshot by running the full
|
|
160
|
+
* compile() + emitShadow() pipeline.
|
|
161
|
+
*
|
|
162
|
+
* On a compile() error: if the error looks like a just-typed dangling dot
|
|
163
|
+
* (`store.` / `summary.data?.`), retry with a dummy property name patched in —
|
|
164
|
+
* the resulting shadow serves member completions at the dot, which is exactly
|
|
165
|
+
* the moment completions matter most. Otherwise returns an empty shadow
|
|
166
|
+
* (updateVirtualCode then keeps the last-known-good one).
|
|
167
|
+
*/
|
|
168
|
+
const buildVirtualCode = (snapshot) => {
|
|
169
|
+
const content = snapshot.getText(0, snapshot.getLength());
|
|
170
|
+
// Only process files that contain a DSL container. Reuse the compiler's predicate
|
|
171
|
+
// (single grammar source of truth) — a duplicate regex here drifts (it missed the
|
|
172
|
+
// v2 `export app store` / `subtree store` forms).
|
|
173
|
+
if (!containsReactraDsl(content)) {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
let compileResult;
|
|
177
|
+
let mappingAdjust;
|
|
178
|
+
let shadowSource = content;
|
|
179
|
+
try {
|
|
180
|
+
compileResult = compileToGraph(content);
|
|
181
|
+
}
|
|
182
|
+
catch (err) {
|
|
183
|
+
// B2 (C2/C4): the mapped DSL offset + cleaned message for the diagnostic.
|
|
184
|
+
// Computed once up front so BOTH failure-return paths annotate identically.
|
|
185
|
+
const errDsl = parseErrorDslOffset(err, content);
|
|
186
|
+
const parseError = { dslOffset: errDsl, message: cleanBabelMessage(err) };
|
|
187
|
+
const matches = [...content.matchAll(DANGLING_DOT_RE)];
|
|
188
|
+
// C3: the no-dot-match early failure — annotate (genuine syntax error).
|
|
189
|
+
if (matches.length === 0)
|
|
190
|
+
return emptyVirtualCode(content, parseError);
|
|
191
|
+
// Scope the patch to the dot NEAREST the parse error: the regex also hits
|
|
192
|
+
// sentence-ending periods in comments, import-path strings, and JSX text —
|
|
193
|
+
// patching those corrupts unrelated imports and mappings. Fall back to
|
|
194
|
+
// patching every match only when the targeted attempt doesn't parse.
|
|
195
|
+
const nearest = errDsl === null
|
|
196
|
+
? null
|
|
197
|
+
: matches.reduce((best, m) => Math.abs(m.index - errDsl) < Math.abs(best.index - errDsl) ? m : best);
|
|
198
|
+
const candidateSets = [];
|
|
199
|
+
if (nearest)
|
|
200
|
+
candidateSets.push([nearest.index]);
|
|
201
|
+
candidateSets.push(matches.map((m) => m.index));
|
|
202
|
+
for (const dotIndices of candidateSets) {
|
|
203
|
+
try {
|
|
204
|
+
let patched = "";
|
|
205
|
+
let prev = 0;
|
|
206
|
+
const insertions = [];
|
|
207
|
+
for (const idx of dotIndices) {
|
|
208
|
+
patched += content.slice(prev, idx + 1);
|
|
209
|
+
insertions.push(patched.length);
|
|
210
|
+
patched += COMPLETION_DUMMY;
|
|
211
|
+
prev = idx + 1;
|
|
212
|
+
}
|
|
213
|
+
patched += content.slice(prev);
|
|
214
|
+
const patchedResult = compileToGraph(patched);
|
|
215
|
+
if (patchedResult.graph.containers.length === 0)
|
|
216
|
+
continue;
|
|
217
|
+
compileResult = patchedResult;
|
|
218
|
+
shadowSource = patched;
|
|
219
|
+
mappingAdjust = (ms) => adjustForInsertions(ms, insertions);
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
catch {
|
|
223
|
+
// this candidate set doesn't parse — try the next
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
// C3: dangling-dot recovery FAILED for every candidate set → this is a
|
|
227
|
+
// genuine syntax error, not a transient just-typed dot → annotate. When
|
|
228
|
+
// recovery SUCCEEDED (compileResult set above), we fall through WITHOUT
|
|
229
|
+
// annotating — no B2 diagnostic for a transient dot the editor can complete.
|
|
230
|
+
if (compileResult === undefined)
|
|
231
|
+
return emptyVirtualCode(content, parseError);
|
|
232
|
+
}
|
|
233
|
+
// Additional guard: only treat as DSL if the compiler found containers.
|
|
234
|
+
if (compileResult.graph.containers.length === 0)
|
|
235
|
+
return undefined;
|
|
236
|
+
const { text, mappings } = emitShadow(compileResult.graph, shadowSource, compileResult.rewrites);
|
|
237
|
+
const finalMappings = mappingAdjust ? mappingAdjust(mappings) : mappings;
|
|
238
|
+
return {
|
|
239
|
+
id: "shadow",
|
|
240
|
+
languageId: "typescript",
|
|
241
|
+
snapshot: createSnapshotFromString(text),
|
|
242
|
+
mappings: finalMappings.map(toVolarMapping),
|
|
243
|
+
embeddedCodes: [],
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Create the Reactra Volar language plugin.
|
|
248
|
+
*
|
|
249
|
+
* Register this plugin with a Volar language service to enable type-checking,
|
|
250
|
+
* completions, hover, and goto-definition for Reactra DSL `.tsx` files.
|
|
251
|
+
*
|
|
252
|
+
* The `typescript.getServiceScript` property is required by `@volar/typescript`'s
|
|
253
|
+
* `createProxyLanguageService` to route TypeScript diagnostics from the shadow
|
|
254
|
+
* back to DSL positions. Without it, `getSemanticDiagnostics` returns nothing.
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```ts
|
|
258
|
+
* import { createReactraLanguagePlugin } from "@reactra/language-tools/language-plugin"
|
|
259
|
+
* const plugin = createReactraLanguagePlugin()
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
export const createReactraLanguagePlugin = () => ({
|
|
263
|
+
getLanguageId(scriptId) {
|
|
264
|
+
if (couldBeDsl(scriptId))
|
|
265
|
+
return REACTRA_LANG_ID;
|
|
266
|
+
return undefined;
|
|
267
|
+
},
|
|
268
|
+
createVirtualCode(_scriptId, languageId, snapshot,
|
|
269
|
+
// ctx is required by the interface but unused — we don't cross-reference scripts.
|
|
270
|
+
_ctx) {
|
|
271
|
+
if (languageId !== REACTRA_LANG_ID)
|
|
272
|
+
return undefined;
|
|
273
|
+
return buildVirtualCode(snapshot);
|
|
274
|
+
},
|
|
275
|
+
updateVirtualCode(_scriptId, virtualCode, newSnapshot, _ctx) {
|
|
276
|
+
const next = buildVirtualCode(newSnapshot);
|
|
277
|
+
// Last-known-good: mid-edit the DSL is transiently unparseable (the user
|
|
278
|
+
// just typed `store.` — exactly when completions matter most). A fresh
|
|
279
|
+
// build would collapse the shadow to `export {}` and kill every TS
|
|
280
|
+
// feature; serving the previous shadow keeps completions/hover alive on
|
|
281
|
+
// slightly-stale positions until the file parses again.
|
|
282
|
+
//
|
|
283
|
+
// B2 (C2/C7): parse errors now surface via the standalone Volar LSP's
|
|
284
|
+
// diagnostic service plugin (LSP011) — NOT the legacy VS Code bridge (that
|
|
285
|
+
// is a separate stack covering VS Code; the hybrid tsserver path does not
|
|
286
|
+
// carry these). To keep BOTH the last-known-good completions AND the
|
|
287
|
+
// squiggle, we carry the fresh build's `reactraParseError` forward onto the
|
|
288
|
+
// served stale shadow (the diagnostic plugin reads it off the root).
|
|
289
|
+
if (next === undefined)
|
|
290
|
+
return undefined; // no longer DSL — serve the file raw
|
|
291
|
+
if (next.mappings.length === 0 && virtualCode.mappings.length > 0) {
|
|
292
|
+
const parseError = next.reactraParseError;
|
|
293
|
+
if (parseError) {
|
|
294
|
+
return { ...virtualCode, reactraParseError: parseError };
|
|
295
|
+
}
|
|
296
|
+
// Transient (dangling-dot recovered, or no annotation) — clear any prior
|
|
297
|
+
// error on the stale shadow so a fixed→re-broken cycle doesn't go stale.
|
|
298
|
+
const { reactraParseError: _drop, ...clean } = virtualCode;
|
|
299
|
+
return clean;
|
|
300
|
+
}
|
|
301
|
+
return next;
|
|
302
|
+
},
|
|
303
|
+
typescript: {
|
|
304
|
+
extraFileExtensions: [],
|
|
305
|
+
getServiceScript(root) {
|
|
306
|
+
if (root.languageId === "typescript") {
|
|
307
|
+
return {
|
|
308
|
+
code: root,
|
|
309
|
+
extension: ".tsx",
|
|
310
|
+
// Literal 4 = ts.ScriptKind.TSX (stable public enum value) — written as a
|
|
311
|
+
// literal so "typescript" stays a type-only import (see import note above).
|
|
312
|
+
scriptKind: 4,
|
|
313
|
+
// The shadow is a standalone file (not appended to the DSL source in a
|
|
314
|
+
// virtual buffer). preventLeadingOffset tells Volar not to subtract
|
|
315
|
+
// sourceScript.snapshot.getLength() from diagnostic positions.
|
|
316
|
+
preventLeadingOffset: true,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
return undefined;
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
});
|
|
323
|
+
//# sourceMappingURL=language-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-plugin.js","sourceRoot":"","sources":["../src/language-plugin.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,4EAA4E;AAC5E,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,wEAAwE;AACxE,EAAE;AACF,uEAAuE;AACvE,2EAA2E;AAC3E,qEAAqE;AACrE,wEAAwE;AAexE,gFAAgF;AAChF,2EAA2E;AAC3E,0EAA0E;AAC1E,6EAA6E;AAC7E,+EAA+E;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,kFAAkF;AAClF,sFAAsF;AACtF,yFAAyF;AACzF,sBAAsB;AACtB,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,MAAM,eAAe,GAAG,SAAS,CAAA;AAEjC,uDAAuD;AACvD,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAW,EAAE;IAC/C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAA;IAC5C,OAAO,IAAI,CAAA,CAAC,6DAA6D;AAC3E,CAAC,CAAA;AAED,sDAAsD;AACtD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