@ui-doc/html-renderer 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +251 -0
  3. package/dist/HtmlCurlyBraceLexer.d.ts +25 -0
  4. package/dist/HtmlRenderer.d.ts +21 -0
  5. package/dist/InlineReader.d.ts +18 -0
  6. package/dist/NodeParser.d.ts +12 -0
  7. package/dist/TemplateLoader.d.ts +9 -0
  8. package/dist/assets/app.d.ts +1 -0
  9. package/dist/assets/src/base.d.ts +1 -0
  10. package/dist/assets/src/example.d.ts +1 -0
  11. package/dist/assets/src/sidebar.d.ts +1 -0
  12. package/dist/assets/ui-doc.cjs +81 -0
  13. package/dist/assets/ui-doc.cjs.map +1 -0
  14. package/dist/assets/ui-doc.css +359 -0
  15. package/dist/assets/ui-doc.css.map +1 -0
  16. package/dist/assets/ui-doc.js.map +1 -0
  17. package/dist/assets/ui-doc.min.css +1 -0
  18. package/dist/assets/ui-doc.min.js +1 -0
  19. package/dist/assets/ui-doc.mjs +79 -0
  20. package/dist/assets/ui-doc.mjs.map +1 -0
  21. package/dist/errors/HtmlRendererError.d.ts +3 -0
  22. package/dist/errors/HtmlRendererSyntaxError.d.ts +13 -0
  23. package/dist/errors/ParserError.d.ts +3 -0
  24. package/dist/errors/TagNodeError.d.ts +3 -0
  25. package/dist/errors/index.d.ts +4 -0
  26. package/dist/index.cjs +981 -0
  27. package/dist/index.cjs.map +1 -0
  28. package/dist/index.d.ts +9 -0
  29. package/dist/index.mjs +958 -0
  30. package/dist/index.mjs.map +1 -0
  31. package/dist/nodes/CommentNode.d.ts +6 -0
  32. package/dist/nodes/Node.d.ts +14 -0
  33. package/dist/nodes/TagNode.d.ts +4 -0
  34. package/dist/nodes/TemplateNode.d.ts +6 -0
  35. package/dist/nodes/index.d.ts +10 -0
  36. package/dist/nodes/tags/debug.d.ts +11 -0
  37. package/dist/nodes/tags/for.d.ts +13 -0
  38. package/dist/nodes/tags/if.d.ts +18 -0
  39. package/dist/nodes/tags/index.d.ts +3 -0
  40. package/dist/nodes/tags/page.d.ts +13 -0
  41. package/dist/nodes/tags/partial.d.ts +13 -0
  42. package/dist/nodes/tags/var.d.ts +13 -0
  43. package/dist/types/base.d.ts +1 -0
  44. package/dist/types/index.d.ts +6 -0
  45. package/dist/types/lexer.d.ts +23 -0
  46. package/dist/types/parser.d.ts +25 -0
  47. package/dist/types/reader.d.ts +35 -0
  48. package/dist/types/renderer.d.ts +14 -0
  49. package/dist/types/token.d.ts +40 -0
  50. package/dist/utils/index.d.ts +2 -0
  51. package/package.json +71 -0
  52. package/scripts/app.ts +8 -0
  53. package/scripts/src/base.ts +7 -0
  54. package/scripts/src/example.ts +31 -0
  55. package/scripts/src/sidebar.ts +46 -0
  56. package/styles/01_resets/initial.css +18 -0
  57. package/styles/01_resets/root.css +36 -0
  58. package/styles/01_resets/typography.css +67 -0
  59. package/styles/02_objects/background.css +7 -0
  60. package/styles/02_objects/control.css +25 -0
  61. package/styles/02_objects/margin.css +44 -0
  62. package/styles/02_objects/padding.css +44 -0
  63. package/styles/02_objects/text.css +3 -0
  64. package/styles/02_objects/width.css +16 -0
  65. package/styles/03_components/example-markup.css +31 -0
  66. package/styles/03_components/nav/list.css +42 -0
  67. package/styles/03_components/nav/main.css +39 -0
  68. package/styles/03_components/text-flow.css +5 -0
  69. package/styles/04_layouts/page.css +68 -0
  70. package/styles/index.css +17 -0
  71. package/templates/layouts/default.html +24 -0
  72. package/templates/layouts/example.html +29 -0
  73. package/templates/pages/default.html +14 -0
  74. package/templates/pages/index.html +3 -0
  75. package/templates/partials/code.html +5 -0
  76. package/templates/partials/content.html +7 -0
  77. package/templates/partials/example.html +5 -0
  78. package/templates/partials/nav-main.html +9 -0
  79. package/templates/partials/nav-sidebar.html +18 -0
  80. package/templates/partials/section-inner.html +5 -0
  81. package/templates/partials/section.html +1 -0
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,251 @@
1
+ # UI-Doc HTML Renderer
2
+
3
+ Simple and light HTML Rendering Engine. Its purpose is to create HTML from a Context Object by using a simple template syntax and have no dependencies. This project should not be used for complexer projects, because of it's simplicity.
4
+
5
+ ## Tags
6
+
7
+ Tags are used to get a bit of functionality into the html generation process.
8
+
9
+ ### var
10
+
11
+ Output value of a variable.
12
+
13
+ ```
14
+ <h1>{{var:title}}</h1>
15
+ ```
16
+
17
+ To escape the variable use `{{var:title escape}}`.
18
+
19
+ ### if
20
+
21
+ Use a if condition to decide when our when not to render something. Please not that currently there is no `else` or `ifelse`
22
+
23
+ ```
24
+ {{if:show}}
25
+ <p>Show this if show inside the context is a true statement</p>
26
+ {{/if}}
27
+ ```
28
+
29
+ #### Conditions
30
+
31
+ You can use conditions
32
+
33
+ ```
34
+ {{if:title === "foo"}}
35
+ {{if:show === true}}
36
+ {{if:page.number === 3}}
37
+ ```
38
+
39
+ **Operators:**
40
+
41
+ - `===`
42
+ - `==`
43
+ - `!==`
44
+ - `!=`
45
+ - `<`
46
+ - `<=`
47
+ - `>`
48
+ - `>=`
49
+
50
+ ### for
51
+
52
+ Use for to loop over objects and arrays. Please not that a loop will change the context to help you access inside your loop target and give you loop specific context like index and object keys.
53
+
54
+ #### array loop
55
+
56
+ ```
57
+ <!-- context: {"list": ["foo", "bar", "baz"]} -->
58
+ <ul>
59
+ {{for:list}}
60
+ <li>{{var:_loop.value}}, index: {{var:_loop.index}}</li>
61
+ {{/for}}
62
+ </ul>
63
+
64
+ <!-- Output: -->
65
+ <ul>
66
+ <li>foo, index: 0</li>
67
+ <li>bar, index: 1</li>
68
+ <li>baz, index: 2</li>
69
+ </ul>
70
+ ```
71
+
72
+ #### object loop
73
+
74
+ ```
75
+ <!-- context: {"list": {"foo": "FOO", "bar": "BAR", "baz": "BAZ"}} -->
76
+ <ul>
77
+ {{for:list}}
78
+ <li>{{var:_loop.value}}, key: {{var:_loop.key}}, index: {{var:_loop.index}}</li>
79
+ {{/for}}
80
+ </ul>
81
+
82
+ <!-- Output: -->
83
+ <ul>
84
+ <li>FOO, key: foo, index: 0</li>
85
+ <li>BAR, key: bar, index: 1</li>
86
+ <li>BAZ, key: baz, index: 2</li>
87
+ </ul>
88
+ ```
89
+
90
+ #### loop items as objects
91
+
92
+ You can loop over an array or object of objects. The object items will directly be accessible inside the for context.
93
+
94
+ ```
95
+ <!-- context: {"sections": [{"title": "Section 1", content: "<p>Section 1 content</p>"}, {"title": "Section 2", content: "<p>Section 2 content</p>"}]} -->
96
+
97
+ {{for:sections}}
98
+ <section>
99
+ <h2>{{var::title}}</h2>
100
+ {{var:content}}
101
+ </section>
102
+ {{/for}}
103
+
104
+ <!-- Output: -->
105
+ <section>
106
+ <h2>Section 1</h2>
107
+ <p>Section 1 content</p>
108
+ </section>
109
+ <section>
110
+ <h2>Section 2</h2>
111
+ <p>Section 2 content</p>
112
+ </section>
113
+ ```
114
+
115
+ ### page
116
+
117
+ Use page to output registered page templates (see Templates > Page). `{{page:foo}}` this will try to render the `foo` page. If no page with this name is registered the system will fallback to the `default` page. If you want to use the default page you can also just use `{{page}}`. As second parameter you can give a context if you like to change the context `{{page:layout newContext}}`.
118
+
119
+ ```
120
+ <!-- context: {"title": "Document Title", "page": {"title": "Page title", "content": "Page content"}} -->
121
+
122
+ <html>
123
+ <head>
124
+ <title>{{var:title}}</title>
125
+ </head>
126
+ <body>
127
+ <!-- using default layout with new context `page` -->
128
+ {{page:default page}}
129
+ </body>
130
+ </html>
131
+
132
+ <!-- default page template with change context -->
133
+ <!-- context: {"title": "Page title", "content": "Page content"} -->
134
+
135
+ <main>
136
+ <h1>{{var:title}}</h1>
137
+ <p>{{var:content}}</p>
138
+ </main>
139
+
140
+ <!-- Output: -->
141
+ <html>
142
+ <head>
143
+ <title>Document Title</title>
144
+ </head>
145
+ <body>
146
+ <main>
147
+ <h1>Page title</h1>
148
+ <p>Page content</p>
149
+ </main>
150
+ </body>
151
+ </html>
152
+ ```
153
+
154
+ ### partial
155
+
156
+ Use partial to render registered partial templates (see Templates > Partial). If the given partial name was not found nothing will be generated
157
+
158
+ ```
159
+ {{partial:foo}} > output foo partial
160
+ ```
161
+
162
+ As second parameter you can give a context definition to change the context
163
+
164
+ ```
165
+ {{partial:foo bar}} > output foo partial using bar of the current context as new context
166
+ ```
167
+
168
+ ### debug
169
+
170
+ Use debug to output the current context or parts of the context. The context will be outputted as JSON.
171
+
172
+ ```
173
+ <!-- context: {"title": "Document Title", "page": {"title": "Page title", "content": "Page content"}} -->
174
+
175
+ {{debug}}
176
+ <!-- Output: -->
177
+ {"title": "Document Title", "page": {"title": "Page title", "content": "Page content"}}
178
+
179
+ {{debug:page}}
180
+ <!-- Output: -->
181
+ {"title": "Page title", "content": "Page content"}
182
+
183
+ ```
184
+
185
+ ## Templates
186
+
187
+ You can register different template parts to the renderer these templates can then be reused wile generation.
188
+
189
+ ### Layouts
190
+
191
+ Define the HTML basic structure.
192
+
193
+ ### Page
194
+
195
+ Define a page specific template. You can use the `{{page:your-page-template-name}}` tag to render a specific page template. Page templates are not necessary but they help to keep layouts smaller and easier to read.
196
+
197
+ ### Partial
198
+
199
+ Define a partial that can be reused, to get the same output inside layouts, pages and even in other partials. You can use the `{{partial:your-partial-name}}` tag to render the partial.
200
+
201
+ ## Usage
202
+
203
+ ```
204
+ import { HtmlRenderer } from '@ui-doc/html-renderer'
205
+
206
+ const layout = `
207
+ <html>
208
+ <head>
209
+ <meta charset="utf-8">
210
+ <title>{{var:title}}</title>
211
+ </head>
212
+ <body>
213
+ {{page:default}}
214
+ </body>
215
+ </html>`
216
+
217
+ const page = `
218
+ <h1>{{var:title}}</h1>
219
+
220
+ {{if:excerpt}}
221
+ <div>{{var:excerpt}}</div>
222
+ {{/if}}
223
+
224
+ {{for:sections}}
225
+ {{partial:section}}
226
+ {{/for}}`
227
+
228
+ const section = `
229
+ <h2>{{var:title}}</h2>
230
+
231
+ {{var:content}}
232
+ `
233
+
234
+ const renderer = new HtmlRenderer()
235
+
236
+ renderer.addLayout('default', layout)
237
+ renderer.addPage('default', page)
238
+ renderer.addPartial('section', section)
239
+
240
+ renderer.generate({
241
+ title: 'Example',
242
+ page: {
243
+ title: 'Example Page Title',
244
+ sections: [
245
+ {; content: "<p>Section 1 content</p>" },
246
+ {; title: "Section 2"; content: "<p>Section 2 content</p>" },
247
+ ],
248
+ },
249
+ })
250
+
251
+ ```
@@ -0,0 +1,25 @@
1
+ import type { Lexer, PositiveInteger, Reader, Token, TokenBoolean, TokenComment, TokenIdentifier, TokenNumber, TokenOperator, TokenReturn, TokenString, TokenTemplate, TokenTypeIdentifier } from './types';
2
+ export declare class HtmlCurlyBraceLexer implements Lexer {
3
+ protected reader: Reader;
4
+ protected currentTokens: (Token | undefined)[];
5
+ protected tagConsuming: boolean;
6
+ protected tagIdentified: boolean;
7
+ constructor(reader: Reader);
8
+ debug(): ReturnType<Reader['debug']>;
9
+ peek<T extends PositiveInteger = 1>(k?: T): TokenReturn<T>;
10
+ consume<T extends PositiveInteger = 1>(k?: T): TokenReturn<T>;
11
+ protected consumeNextTokens(k?: PositiveInteger): void;
12
+ protected consumeNextToken(): Token | undefined;
13
+ protected consumeTagOpen(): Token;
14
+ protected consumeTagClose(): Token;
15
+ protected consumeTagSeparator(): Token;
16
+ protected consumeComment(): TokenComment;
17
+ protected consumeTemplate(): TokenTemplate;
18
+ protected progressTag(): Token | undefined;
19
+ protected consumeTagEnd(): Token;
20
+ protected consumeString(): TokenString;
21
+ protected consumeNumber(): TokenNumber;
22
+ protected consumeBoolean(value: boolean): TokenBoolean;
23
+ protected consumeOperator(): TokenOperator;
24
+ protected consumeIdentifier(type?: TokenTypeIdentifier): TokenIdentifier;
25
+ }
@@ -0,0 +1,21 @@
1
+ import type { GenerateContext } from '@ui-doc/core';
2
+ import type { Node } from './nodes';
3
+ import type { RenderContext, Renderer, SourceInput } from './types';
4
+ import type { Parser } from './types/parser';
5
+ export declare class HtmlRenderer implements Renderer {
6
+ protected parser: Parser;
7
+ protected layouts: Record<string, Node>;
8
+ protected partials: Record<string, Node>;
9
+ protected pages: Record<string, Node>;
10
+ constructor(parser: Parser);
11
+ addLayout(name: string, layout: SourceInput): this;
12
+ addPartial(name: string, partial: SourceInput): this;
13
+ addPage(name: string, page: SourceInput): this;
14
+ protected parse(input: SourceInput): Node;
15
+ generate(context: GenerateContext, layout?: string): string;
16
+ page(name: string, context: RenderContext): string;
17
+ partial(name: string, context?: RenderContext): string;
18
+ protected render(rootNode: Node, context: RenderContext): string;
19
+ protected generateContext(context: GenerateContext): RenderContext;
20
+ protected makeAttributes(attrs?: Record<string, string>): string;
21
+ }
@@ -0,0 +1,18 @@
1
+ import type { PositiveInteger, Reader } from './types';
2
+ export declare class InlineReader implements Reader {
3
+ protected input: string;
4
+ protected source: string;
5
+ protected currentLine: number;
6
+ protected currentPos: number;
7
+ protected currentContent: string;
8
+ constructor(input: string, source?: string);
9
+ peak(k?: PositiveInteger): string;
10
+ consume(k?: PositiveInteger): string;
11
+ isEof(): boolean;
12
+ debug(): {
13
+ content: string;
14
+ line: number;
15
+ pos: number;
16
+ source: string;
17
+ };
18
+ }
@@ -0,0 +1,12 @@
1
+ import { HtmlCurlyBraceLexer } from './HtmlCurlyBraceLexer';
2
+ import type { TagNode } from './nodes';
3
+ import { Node } from './nodes/Node';
4
+ import type { Parser, Reader, TagNodeParse } from './types';
5
+ export declare class NodeParser implements Parser {
6
+ protected tags: Record<string, TagNodeParse>;
7
+ static init(): NodeParser;
8
+ registerTagParser(tag: TagNodeParse): this;
9
+ parse(reader: Reader): Node;
10
+ protected parseChildren(lexer: HtmlCurlyBraceLexer, parent: Node): Node;
11
+ protected parseTag(lexer: HtmlCurlyBraceLexer): TagNode;
12
+ }
@@ -0,0 +1,9 @@
1
+ import type { FileSystem } from '@ui-doc/core';
2
+ import type { HtmlRenderer } from './HtmlRenderer';
3
+ export declare class TemplateLoader {
4
+ static load({ renderer, fileSystem, templateBasePath, }: {
5
+ renderer: HtmlRenderer;
6
+ fileSystem: FileSystem;
7
+ templateBasePath?: string;
8
+ }): Promise<void>;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare function ready(callback: () => void): void;
@@ -0,0 +1 @@
1
+ export declare function initExample(): void;
@@ -0,0 +1 @@
1
+ export declare function initSidebar(): void;
@@ -0,0 +1,81 @@
1
+ 'use strict';
2
+
3
+ function ready(callback) {
4
+ if (document.readyState !== 'loading') {
5
+ callback();
6
+ }
7
+ else {
8
+ document.addEventListener('DOMContentLoaded', callback);
9
+ }
10
+ }
11
+
12
+ function initExample() {
13
+ document.querySelectorAll('[data-example] > iframe').forEach(iframe => {
14
+ var _a, _b;
15
+ const document = (_a = iframe.contentDocument) !== null && _a !== void 0 ? _a : (_b = iframe.contentWindow) === null || _b === void 0 ? void 0 : _b.document;
16
+ if (!document) {
17
+ return;
18
+ }
19
+ const action = () => {
20
+ const changeHeight = () => {
21
+ iframe.style.height = `${document.body.scrollHeight}px`;
22
+ };
23
+ changeHeight();
24
+ const observer = new MutationObserver(changeHeight);
25
+ observer.observe(document.body, {
26
+ attributes: true,
27
+ childList: true,
28
+ subtree: true,
29
+ });
30
+ };
31
+ if (document.readyState === 'complete') {
32
+ action();
33
+ }
34
+ else {
35
+ iframe.addEventListener('load', action);
36
+ }
37
+ });
38
+ }
39
+
40
+ function createSidebar(sidebar) {
41
+ const links = {};
42
+ const observer = new IntersectionObserver(entries => {
43
+ var _a, _b, _c;
44
+ const activeEntries = entries.filter(entry => entry.isIntersecting);
45
+ if (activeEntries.length <= 0) {
46
+ return;
47
+ }
48
+ Object.keys(links).forEach(id => {
49
+ links[id].classList.remove('active');
50
+ });
51
+ const activeLink = links[activeEntries[0].target.id];
52
+ activeLink.classList.add('active');
53
+ if (((_b = (_a = activeLink === null || activeLink === void 0 ? void 0 : activeLink.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) instanceof HTMLLIElement) {
54
+ (_c = activeLink.parentElement.parentElement.parentElement
55
+ .querySelector('a')) === null || _c === void 0 ? void 0 : _c.classList.add('active');
56
+ }
57
+ }, {
58
+ root: null,
59
+ rootMargin: '0px 0px -90% 0px',
60
+ threshold: 0.5,
61
+ });
62
+ sidebar.querySelectorAll('a[href^="#"]').forEach(link => {
63
+ const id = link.href.split('#')[1];
64
+ const target = document.getElementById(id);
65
+ if (target) {
66
+ observer.observe(target);
67
+ links[id] = link;
68
+ }
69
+ });
70
+ }
71
+ function initSidebar() {
72
+ document.querySelectorAll('[data-sidebar]').forEach(sidebar => {
73
+ createSidebar(sidebar);
74
+ });
75
+ }
76
+
77
+ ready(() => {
78
+ initExample();
79
+ initSidebar();
80
+ });
81
+ //# sourceMappingURL=ui-doc.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-doc.cjs","sources":["../../../scripts/src/base.ts","../../../scripts/src/example.ts","../../../scripts/src/sidebar.ts","../../../scripts/app.ts"],"sourcesContent":["export function ready(callback: () => void) {\n if (document.readyState !== 'loading') {\n callback()\n } else {\n document.addEventListener('DOMContentLoaded', callback)\n }\n}\n","export function initExample() {\n document.querySelectorAll<HTMLIFrameElement>('[data-example] > iframe').forEach(iframe => {\n const document = iframe.contentDocument ?? iframe.contentWindow?.document\n\n if (!document) {\n return\n }\n\n const action = () => {\n const changeHeight = () => {\n iframe.style.height = `${document.body.scrollHeight}px`\n }\n\n changeHeight()\n\n const observer = new MutationObserver(changeHeight)\n\n observer.observe(document.body, {\n attributes: true,\n childList: true,\n subtree: true,\n })\n }\n\n if (document.readyState === 'complete') {\n action()\n } else {\n iframe.addEventListener('load', action)\n }\n })\n}\n","function createSidebar(sidebar: HTMLElement) {\n const links: Record<string, HTMLLinkElement> = {}\n const observer = new IntersectionObserver(\n entries => {\n const activeEntries = entries.filter(entry => entry.isIntersecting)\n\n if (activeEntries.length <= 0) {\n return\n }\n\n Object.keys(links).forEach(id => {\n links[id].classList.remove('active')\n })\n\n const activeLink = links[activeEntries[0].target.id]\n\n activeLink.classList.add('active')\n if (activeLink?.parentElement?.parentElement?.parentElement instanceof HTMLLIElement) {\n activeLink.parentElement.parentElement.parentElement\n .querySelector('a')\n ?.classList.add('active')\n }\n },\n {\n root: null,\n rootMargin: '0px 0px -90% 0px',\n threshold: 0.5,\n },\n )\n\n sidebar.querySelectorAll<HTMLLinkElement>('a[href^=\"#\"]').forEach(link => {\n const id = link.href.split('#')[1]\n const target = document.getElementById(id)\n\n if (target) {\n observer.observe(target)\n links[id] = link\n }\n })\n}\n\nexport function initSidebar() {\n document.querySelectorAll('[data-sidebar]').forEach(sidebar => {\n createSidebar(sidebar as HTMLElement)\n })\n}\n","import { ready } from './src/base'\nimport { initExample } from './src/example'\nimport { initSidebar } from './src/sidebar'\n\nready(() => {\n initExample()\n initSidebar()\n})\n"],"names":[],"mappings":";;AAAM,SAAU,KAAK,CAAC,QAAoB,EAAA;AACxC,IAAA,IAAI,QAAQ,CAAC,UAAU,KAAK,S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