@cudoment/cudoc 0.1.0 → 0.3.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.
Files changed (101) hide show
  1. package/README.md +20 -47
  2. package/dist/dataset.d.ts +10 -0
  3. package/dist/dataset.d.ts.map +1 -0
  4. package/dist/dataset.js +44 -0
  5. package/dist/dataset.js.map +1 -0
  6. package/dist/document.d.ts +80 -0
  7. package/dist/document.d.ts.map +1 -0
  8. package/dist/document.js +436 -0
  9. package/dist/document.js.map +1 -0
  10. package/dist/internal/core/ast/validate.d.ts.map +1 -1
  11. package/dist/internal/core/ast/validate.js +9 -2
  12. package/dist/internal/core/ast/validate.js.map +1 -1
  13. package/dist/internal/core/query/nodes.d.ts.map +1 -1
  14. package/dist/internal/core/query/nodes.js +3 -1
  15. package/dist/internal/core/query/nodes.js.map +1 -1
  16. package/dist/internal/core/query/sections.d.ts.map +1 -1
  17. package/dist/internal/core/query/sections.js +2 -1
  18. package/dist/internal/core/query/sections.js.map +1 -1
  19. package/dist/internal/core/syntax/heading-metadata.js +1 -1
  20. package/dist/internal/core/syntax/heading-metadata.js.map +1 -1
  21. package/dist/internal/transforms/table-cell-list/build-table-cell-children.d.ts +5 -0
  22. package/dist/internal/transforms/table-cell-list/build-table-cell-children.d.ts.map +1 -0
  23. package/dist/internal/transforms/table-cell-list/build-table-cell-children.js +169 -0
  24. package/dist/internal/transforms/table-cell-list/build-table-cell-children.js.map +1 -0
  25. package/dist/internal/transforms/table-cell-list/elements.d.ts +15 -0
  26. package/dist/internal/transforms/table-cell-list/elements.d.ts.map +1 -0
  27. package/dist/internal/transforms/table-cell-list/elements.js +16 -0
  28. package/dist/internal/transforms/table-cell-list/elements.js.map +1 -0
  29. package/dist/internal/transforms/table-cell-list/index.d.ts +18 -0
  30. package/dist/internal/transforms/table-cell-list/index.d.ts.map +1 -0
  31. package/dist/internal/transforms/table-cell-list/index.js +45 -0
  32. package/dist/internal/transforms/table-cell-list/index.js.map +1 -0
  33. package/dist/internal/transforms/table-cell-list/nodes.d.ts +9 -0
  34. package/dist/internal/transforms/table-cell-list/nodes.d.ts.map +1 -0
  35. package/dist/internal/transforms/table-cell-list/nodes.js +24 -0
  36. package/dist/internal/transforms/table-cell-list/nodes.js.map +1 -0
  37. package/dist/internal/transforms/table-cell-list/parse-inline-markdown.d.ts +6 -0
  38. package/dist/internal/transforms/table-cell-list/parse-inline-markdown.d.ts.map +1 -0
  39. package/dist/internal/transforms/table-cell-list/parse-inline-markdown.js +101 -0
  40. package/dist/internal/transforms/table-cell-list/parse-inline-markdown.js.map +1 -0
  41. package/dist/internal/transforms/table-cell-list/parse-table-cell-list.d.ts +22 -0
  42. package/dist/internal/transforms/table-cell-list/parse-table-cell-list.d.ts.map +1 -0
  43. package/dist/internal/transforms/table-cell-list/parse-table-cell-list.js +315 -0
  44. package/dist/internal/transforms/table-cell-list/parse-table-cell-list.js.map +1 -0
  45. package/dist/internal/transforms/table-column-layout/create-table.d.ts +45 -0
  46. package/dist/internal/transforms/table-column-layout/create-table.d.ts.map +1 -0
  47. package/dist/internal/transforms/table-column-layout/create-table.js +121 -0
  48. package/dist/internal/transforms/table-column-layout/create-table.js.map +1 -0
  49. package/dist/internal/transforms/table-column-layout/index.d.ts +51 -0
  50. package/dist/internal/transforms/table-column-layout/index.d.ts.map +1 -0
  51. package/dist/internal/transforms/table-column-layout/index.js +100 -0
  52. package/dist/internal/transforms/table-column-layout/index.js.map +1 -0
  53. package/dist/internal/transforms/table-column-layout/split-cell.d.ts +24 -0
  54. package/dist/internal/transforms/table-column-layout/split-cell.d.ts.map +1 -0
  55. package/dist/internal/transforms/table-column-layout/split-cell.js +219 -0
  56. package/dist/internal/transforms/table-column-layout/split-cell.js.map +1 -0
  57. package/dist/markdown.d.ts +10 -0
  58. package/dist/markdown.d.ts.map +1 -0
  59. package/dist/markdown.js +47 -0
  60. package/dist/markdown.js.map +1 -0
  61. package/dist/node/cli.d.ts +3 -0
  62. package/dist/node/cli.d.ts.map +1 -0
  63. package/dist/node/cli.js +37 -0
  64. package/dist/node/cli.js.map +1 -0
  65. package/dist/node/dataset.d.ts +19 -0
  66. package/dist/node/dataset.d.ts.map +1 -0
  67. package/dist/node/dataset.js +51 -0
  68. package/dist/node/dataset.js.map +1 -0
  69. package/dist/node/library.d.ts +56 -0
  70. package/dist/node/library.d.ts.map +1 -0
  71. package/dist/node/library.js +163 -0
  72. package/dist/node/library.js.map +1 -0
  73. package/dist/node/paths.d.ts.map +1 -1
  74. package/dist/node/paths.js +1 -1
  75. package/dist/node/paths.js.map +1 -1
  76. package/dist/node/prepare-embeds.d.ts +13 -0
  77. package/dist/node/prepare-embeds.d.ts.map +1 -0
  78. package/dist/node/prepare-embeds.js +54 -0
  79. package/dist/node/prepare-embeds.js.map +1 -0
  80. package/dist/node/resolve-embed.d.ts +33 -0
  81. package/dist/node/resolve-embed.d.ts.map +1 -0
  82. package/dist/node/resolve-embed.js +386 -0
  83. package/dist/node/resolve-embed.js.map +1 -0
  84. package/dist/node/storage.d.ts +10 -0
  85. package/dist/node/storage.d.ts.map +1 -0
  86. package/dist/node/storage.js +85 -0
  87. package/dist/node/storage.js.map +1 -0
  88. package/dist/query.d.ts +1 -0
  89. package/dist/query.d.ts.map +1 -1
  90. package/dist/query.js +1 -0
  91. package/dist/query.js.map +1 -1
  92. package/dist/render.d.ts +11 -0
  93. package/dist/render.d.ts.map +1 -0
  94. package/dist/render.js +63 -0
  95. package/dist/render.js.map +1 -0
  96. package/dist/sections.d.ts +15 -0
  97. package/dist/sections.d.ts.map +1 -0
  98. package/dist/sections.js +40 -0
  99. package/dist/sections.js.map +1 -0
  100. package/package.json +66 -5
  101. package/styles.css +90 -0
package/README.md CHANGED
@@ -1,58 +1,31 @@
1
1
  # @cudoment/cudoc
2
2
 
3
- Reuse document sections and tables from compiled MDX ASTs. Export a snapshot during compilation, load it on the server, select content by a stable anchor and render it with your site's components.
3
+ Markdown document semantics, compilation, AST queries, cross-document embedding and dataset projection.
4
4
 
5
- ```bash
6
- npm install @cudoment/cudoc
7
- ```
8
-
9
- ## Embedding
10
-
11
- Add the export plugin after the transforms whose results you want to store:
5
+ ESM · Node.js 20+
12
6
 
13
- ```js
14
- import exportAst from "@cudoment/cudoc/embed"
15
-
16
- const remarkPlugins = [
17
- // Your remark transforms go here.
18
- [exportAst, { sourceRoot: "docs", outDir: ".cudoc/ast" }],
19
- ]
7
+ ```sh
8
+ npm install @cudoment/cudoc
20
9
  ```
21
10
 
22
- Once the source document has compiled, read it in a server component or build script:
23
-
24
11
  ```js
25
- import { loadAst, sliceSectionByAnchorId } from "@cudoment/cudoc/embed"
26
-
27
- const document = loadAst("guide/limits", { outDir: ".cudoc/ast" })
28
- const section = sliceSectionByAnchorId(document, "rate-limits")
29
- if (!section) throw new Error("Missing section: rate-limits")
30
- // Render section.children with your site's components.
12
+ import { compileDocument } from "@cudoment/cudoc/markdown"
13
+ import { renderDocument } from "@cudoment/cudoc/render"
14
+
15
+ const { tree } = compileDocument(
16
+ "## Setup (#setup)\n\n> [!NOTE] Requirements\n> Node.js 20+.",
17
+ { format: "md", syntax: {} },
18
+ )
19
+ const html = renderDocument(tree)
31
20
  ```
32
21
 
33
- The snapshot is the host's remark tree at the export plugin. Later host transforms and MDX component execution are outside it. Export and load validate the same AST contract and schema version. Section slices preserve referenced link, image and footnote definitions.
34
-
35
- Source compilation must finish before loading an embed. Keep compiler caches and exported ASTs together, and include the JSON files in deployments that read them at runtime. Queries do not execute MDX expressions; rendering and missing-reference policy belong to the consuming site.
36
-
37
- ## Entry points
38
-
39
- | Import | Runtime | Purpose |
40
- | ---------------------------------------------------------------------- | --------------- | ------------------------------------------------------- |
41
- | `@cudoment/cudoc` | Browser or Node | AST contract, validation, traversal, syntax and queries |
42
- | `@cudoment/cudoc/query` | Browser or Node | Sections, headings, text and table queries |
43
- | `@cudoment/cudoc/ast`, `@cudoment/cudoc/syntax`, `@cudoment/cudoc/mdx` | Browser or Node | Focused common APIs |
44
- | `@cudoment/cudoc/embed` | Node | AST export, loading and queries together |
45
- | `@cudoment/cudoc/node/load-ast-file` | Node | Load a known JSON file without build-time path mapping |
46
- | `@cudoment/cudoc/node/export-ast`, `@cudoment/cudoc/node/paths` | Node | Focused export and path APIs |
47
-
48
- All entries share one internal core. Internal source paths are not public exports and the core is not a separate npm package. Browser imports never depend on the Node entry points.
49
-
50
- For a server bundle that traces files, use `loadAstFile` from `@cudoment/cudoc/node/load-ast-file` with a concrete file path and configure your host's output file tracing.
51
-
52
- The optional `cudoc-remark`, `cudoc-docusaurus` and `cudoc-nextra` packages provide syntax transforms and host integration. Their publication is separate from this package.
53
-
54
- See the [embedding guide](https://github.com/cudoment/cudoc/blob/main/docs/embedding.md) and [project README](https://github.com/cudoment/cudoc#readme).
22
+ The root and query APIs provide reusable AST operations. Import compilation from `/markdown`, rendering from `/render`, and collection from `/node/library`. Node entry points belong in build/server code. `/embed` handles individual AST snapshots; complete libraries and fenced embeds use the explicit `node/*` APIs. The core has no React runtime dependency.
55
23
 
56
- ## License
24
+ Choose `host`, `cudoc` or `both` independently for `headingAnchor`, `badge`, `tableCellList`, `callout` and `link`. The representative callout is `> [!NOTE] Title`. Authors do not register cudoc React components in the recommended setup. Syntax-only rendering needs no stored JSON; cross-document embedding requires document collection.
57
25
 
58
- [MIT](./LICENSE)
26
+ - [Usage guide](https://github.com/cudoment/cudoc/tree/main/README.md#getting-started) · [한국어 가이드](https://github.com/cudoment/cudoc/tree/main/README.ko.md#시작하기)
27
+ - [Markdown syntax](https://github.com/cudoment/cudoc/tree/main/docs/syntax.md)
28
+ - [Embedding](https://github.com/cudoment/cudoc/tree/main/docs/embedding.md)
29
+ - [Standalone HTML alongside a host](https://github.com/cudoment/cudoc/tree/main/docs/html.md#export-alongside-an-existing-site)
30
+ - [API reference](https://github.com/cudoment/cudoc/tree/main/docs/api-reference/README.md)
31
+ - [Runnable examples](https://github.com/cudoment/cudoc/tree/main/examples/README.md)
@@ -0,0 +1,10 @@
1
+ import type { Root } from "mdast";
2
+ export type ProjectionOptions = {
3
+ excludeNodeTypes?: string[];
4
+ excludeComponents?: string[];
5
+ stripProperties?: string[];
6
+ };
7
+ export declare const docsDatasetProjection: ProjectionOptions;
8
+ /** Immutable recursive projection of already compiled ASTs, including nested nodes. */
9
+ export declare function projectAst(tree: Root, options?: ProjectionOptions): Root;
10
+ //# sourceMappingURL=dataset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../src/dataset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAIjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;CAC3B,CAAA;AACD,eAAO,MAAM,qBAAqB,EAAE,iBAUnC,CAAA;AAED,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE,iBAAsB,GAAG,IAAI,CAgC5E"}
@@ -0,0 +1,44 @@
1
+ import { validateAstContract } from "./internal/core/ast/validate.js";
2
+ export const docsDatasetProjection = {
3
+ excludeComponents: [
4
+ "Table",
5
+ "TableHeader",
6
+ "TableBody",
7
+ "TableRow",
8
+ "TableHead",
9
+ "TableCell",
10
+ "DocDataEmbed",
11
+ ],
12
+ };
13
+ /** Immutable recursive projection of already compiled ASTs, including nested nodes. */
14
+ export function projectAst(tree, options = {}) {
15
+ validateAstContract(tree);
16
+ const strip = new Set(options.stripProperties ?? []);
17
+ if (["type", "children"].some((key) => strip.has(key)))
18
+ throw new Error("cudoc: cannot strip structural AST properties");
19
+ const project = (value) => {
20
+ if (Array.isArray(value))
21
+ return value.flatMap((item) => {
22
+ const result = project(item);
23
+ return result === undefined ? [] : [result];
24
+ });
25
+ if (!value || typeof value !== "object")
26
+ return value;
27
+ const node = value;
28
+ if (options.excludeNodeTypes?.includes(node.type) ||
29
+ (node.type?.startsWith("mdxJsx") &&
30
+ node.name &&
31
+ options.excludeComponents?.includes(node.name)))
32
+ return undefined;
33
+ return Object.fromEntries(Object.entries(value)
34
+ .filter(([key]) => !strip.has(key))
35
+ .flatMap(([key, item]) => {
36
+ const result = project(item);
37
+ return result === undefined ? [] : [[key, result]];
38
+ }));
39
+ };
40
+ const result = project(tree);
41
+ validateAstContract(result);
42
+ return result;
43
+ }
44
+ //# sourceMappingURL=dataset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset.js","sourceRoot":"","sources":["../src/dataset.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAOrE,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,iBAAiB,EAAE;QACjB,OAAO;QACP,aAAa;QACb,WAAW;QACX,UAAU;QACV,WAAW;QACX,WAAW;QACX,cAAc;KACf;CACF,CAAA;AAED,uFAAuF;AACvF,MAAM,UAAU,UAAU,CAAC,IAAU,EAAE,UAA6B,EAAE;IACpE,mBAAmB,CAAC,IAAI,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,CAAA;IACpD,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;IAClE,MAAM,OAAO,GAAG,CAAC,KAAc,EAAW,EAAE;QAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YACtB,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC5B,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;gBAC5B,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;YAC7C,CAAC,CAAC,CAAA;QACJ,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAA;QACrD,MAAM,IAAI,GAAG,KAAqB,CAAA;QAClC,IACE,OAAO,CAAC,gBAAgB,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAC7C,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;gBAC9B,IAAI,CAAC,IAAI;gBACT,OAAO,CAAC,iBAAiB,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAEjD,OAAO,SAAS,CAAA;QAClB,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aAClB,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;aAClC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE;YACvB,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;YAC5B,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAA;QACpD,CAAC,CAAC,CACL,CAAA;IACH,CAAC,CAAA;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAS,CAAA;IACpC,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAC3B,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,80 @@
1
+ /** Portable document semantics. Parser and rendering adapters share this model. */
2
+ import type { Root, PhrasingContent } from "mdast";
3
+ import type { Position } from "unist";
4
+ import { type TableColumnLayoutOptions } from "./internal/transforms/table-column-layout/index.js";
5
+ declare module "mdast" {
6
+ interface RootData {
7
+ cudocEmbedPrefix?: string;
8
+ /**
9
+ * The schema version, under its default field name. A caller may rename the
10
+ * field through `AstVersionOptions.field`, so reading it back generically
11
+ * still goes through `resolveAstVersion`.
12
+ */
13
+ cudocAstVersion?: number;
14
+ }
15
+ }
16
+ export type SyntaxMode = "host" | "cudoc" | "both";
17
+ export type SyntaxOptions = Partial<Record<"headingAnchor" | "badge" | "tableCellList" | "callout" | "link", SyntaxMode>>;
18
+ export type Host = "markdown" | "next" | "docusaurus" | "nextra" | "vitepress" | "eleventy" | "html" | "docs";
19
+ export type DocumentDiagnostic = {
20
+ code: string;
21
+ message: string;
22
+ position?: Position;
23
+ };
24
+ export type DocumentOptions = {
25
+ syntax?: SyntaxOptions;
26
+ host?: Host;
27
+ format?: "md" | "mdx";
28
+ calloutTypes?: string[];
29
+ components?: Record<string, {
30
+ kind: "callout" | "link" | "badge";
31
+ typeAttribute?: string;
32
+ titleAttribute?: string;
33
+ urlAttribute?: string;
34
+ }>;
35
+ tableColumnLayout?: TableColumnLayoutOptions[];
36
+ /** Hosts use their native slugger later. Standalone compilers assign IDs here. */
37
+ headingIds?: "host" | "generate";
38
+ };
39
+ export type DocumentData = {
40
+ hName?: string;
41
+ hProperties?: Record<string, unknown>;
42
+ cudoc?: {
43
+ kind: string;
44
+ type?: string;
45
+ title?: string;
46
+ badge?: string;
47
+ explicitId?: boolean;
48
+ };
49
+ [key: string]: unknown;
50
+ };
51
+ export type DocumentNode = {
52
+ type: string;
53
+ value?: string;
54
+ name?: string | null;
55
+ depth?: number;
56
+ url?: string;
57
+ identifier?: string;
58
+ label?: string;
59
+ attributes?: unknown;
60
+ children?: DocumentNode[];
61
+ position?: Position;
62
+ data?: DocumentData;
63
+ [key: string]: unknown;
64
+ };
65
+ export declare const DEFAULT_SYNTAX: Required<SyntaxOptions>;
66
+ export declare function resolveSyntax(syntax?: SyntaxOptions): Required<SyntaxOptions>;
67
+ export declare const visibleHeadingText: (node: DocumentNode) => string;
68
+ export declare const nodeText: (node: DocumentNode) => string;
69
+ export declare const isCudoc: (mode: SyntaxMode) => mode is "cudoc" | "both";
70
+ export declare const isHost: (mode: SyntaxMode) => mode is "host" | "both";
71
+ /** Read static JSX/directive attributes without evaluating expressions. */
72
+ export declare function staticAttributes(node: DocumentNode): Record<string, unknown>;
73
+ export declare function hasDynamicAttributes(node: DocumentNode): boolean;
74
+ export declare const canonicalCalloutType: (type: string) => string;
75
+ export declare function makeCallout(type: string, title: DocumentNode[], children: DocumentNode[], position?: Position): DocumentNode;
76
+ /** Convert generated/static native JSX to mdast data understood by mdast-to-hast. */
77
+ export declare function lowerNativeElements(tree: Root): void;
78
+ /** Mutates the compiler's actual tree. It never reparses the source document. */
79
+ export declare function normalizeDocument(tree: Root, source: string, options?: DocumentOptions, inlineParser?: (source: string) => PhrasingContent[]): DocumentDiagnostic[];
80
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../src/document.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAQrC,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,oDAAoD,CAAA;AAE3D,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,QAAQ;QAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB;;;;WAIG;QACH,eAAe,CAAC,EAAE,MAAM,CAAA;KACzB;CACF;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AAClD,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC,MAAM,CACJ,eAAe,GAAG,OAAO,GAAG,eAAe,GAAG,SAAS,GAAG,MAAM,EAChE,UAAU,CACX,CACF,CAAA;AACD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