@astl/editor 0.0.0 → 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 (161) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/LICENSE +202 -0
  3. package/README.md +43 -0
  4. package/dist/authoring.d.ts +284 -0
  5. package/dist/authoring.d.ts.map +1 -0
  6. package/dist/authoring.js +566 -0
  7. package/dist/authoring.js.map +1 -0
  8. package/dist/define.d.ts +8 -0
  9. package/dist/define.d.ts.map +1 -0
  10. package/dist/define.js +35 -0
  11. package/dist/define.js.map +1 -0
  12. package/dist/edit.d.ts +45 -0
  13. package/dist/edit.d.ts.map +1 -0
  14. package/dist/edit.js +150 -0
  15. package/dist/edit.js.map +1 -0
  16. package/dist/elements/base.d.ts +31 -0
  17. package/dist/elements/base.d.ts.map +1 -0
  18. package/dist/elements/base.js +75 -0
  19. package/dist/elements/base.js.map +1 -0
  20. package/dist/elements/color-control.d.ts +25 -0
  21. package/dist/elements/color-control.d.ts.map +1 -0
  22. package/dist/elements/color-control.js +139 -0
  23. package/dist/elements/color-control.js.map +1 -0
  24. package/dist/elements/help-form.d.ts +31 -0
  25. package/dist/elements/help-form.d.ts.map +1 -0
  26. package/dist/elements/help-form.js +371 -0
  27. package/dist/elements/help-form.js.map +1 -0
  28. package/dist/elements/insert-menu.d.ts +79 -0
  29. package/dist/elements/insert-menu.d.ts.map +1 -0
  30. package/dist/elements/insert-menu.js +362 -0
  31. package/dist/elements/insert-menu.js.map +1 -0
  32. package/dist/elements/inspector.d.ts +24 -0
  33. package/dist/elements/inspector.d.ts.map +1 -0
  34. package/dist/elements/inspector.js +846 -0
  35. package/dist/elements/inspector.js.map +1 -0
  36. package/dist/elements/issue-list.d.ts +18 -0
  37. package/dist/elements/issue-list.d.ts.map +1 -0
  38. package/dist/elements/issue-list.js +85 -0
  39. package/dist/elements/issue-list.js.map +1 -0
  40. package/dist/elements/issues.d.ts +24 -0
  41. package/dist/elements/issues.d.ts.map +1 -0
  42. package/dist/elements/issues.js +81 -0
  43. package/dist/elements/issues.js.map +1 -0
  44. package/dist/elements/picture-dialog.d.ts +40 -0
  45. package/dist/elements/picture-dialog.d.ts.map +1 -0
  46. package/dist/elements/picture-dialog.js +433 -0
  47. package/dist/elements/picture-dialog.js.map +1 -0
  48. package/dist/elements/picture-field.d.ts +33 -0
  49. package/dist/elements/picture-field.d.ts.map +1 -0
  50. package/dist/elements/picture-field.js +692 -0
  51. package/dist/elements/picture-field.js.map +1 -0
  52. package/dist/elements/preview.d.ts +34 -0
  53. package/dist/elements/preview.d.ts.map +1 -0
  54. package/dist/elements/preview.js +165 -0
  55. package/dist/elements/preview.js.map +1 -0
  56. package/dist/elements/style-form.d.ts +30 -0
  57. package/dist/elements/style-form.d.ts.map +1 -0
  58. package/dist/elements/style-form.js +640 -0
  59. package/dist/elements/style-form.js.map +1 -0
  60. package/dist/elements/style-load.d.ts +26 -0
  61. package/dist/elements/style-load.d.ts.map +1 -0
  62. package/dist/elements/style-load.js +50 -0
  63. package/dist/elements/style-load.js.map +1 -0
  64. package/dist/elements/style-popups.d.ts +39 -0
  65. package/dist/elements/style-popups.d.ts.map +1 -0
  66. package/dist/elements/style-popups.js +173 -0
  67. package/dist/elements/style-popups.js.map +1 -0
  68. package/dist/elements/style-rules.d.ts +21 -0
  69. package/dist/elements/style-rules.d.ts.map +1 -0
  70. package/dist/elements/style-rules.js +274 -0
  71. package/dist/elements/style-rules.js.map +1 -0
  72. package/dist/elements/styles.d.ts +9 -0
  73. package/dist/elements/styles.d.ts.map +1 -0
  74. package/dist/elements/styles.js +161 -0
  75. package/dist/elements/styles.js.map +1 -0
  76. package/dist/elements/toolbar.d.ts +65 -0
  77. package/dist/elements/toolbar.d.ts.map +1 -0
  78. package/dist/elements/toolbar.js +1270 -0
  79. package/dist/elements/toolbar.js.map +1 -0
  80. package/dist/help.d.ts +33 -0
  81. package/dist/help.d.ts.map +1 -0
  82. package/dist/help.js +111 -0
  83. package/dist/help.js.map +1 -0
  84. package/dist/index.d.ts +32 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.js +17 -0
  87. package/dist/index.js.map +1 -0
  88. package/dist/inspect.d.ts +251 -0
  89. package/dist/inspect.d.ts.map +1 -0
  90. package/dist/inspect.js +428 -0
  91. package/dist/inspect.js.map +1 -0
  92. package/dist/messages/en.json +252 -0
  93. package/dist/messages/help/en.json +18 -0
  94. package/dist/messages/help/pl.json +18 -0
  95. package/dist/messages/pl.json +252 -0
  96. package/dist/messages/style/en.json +67 -0
  97. package/dist/messages/style/pl.json +67 -0
  98. package/dist/messages.d.ts +5 -0
  99. package/dist/messages.d.ts.map +1 -0
  100. package/dist/messages.js +9 -0
  101. package/dist/messages.js.map +1 -0
  102. package/dist/pages.d.ts +28 -0
  103. package/dist/pages.d.ts.map +1 -0
  104. package/dist/pages.js +147 -0
  105. package/dist/pages.js.map +1 -0
  106. package/dist/scan.d.ts +82 -0
  107. package/dist/scan.d.ts.map +1 -0
  108. package/dist/scan.js +329 -0
  109. package/dist/scan.js.map +1 -0
  110. package/dist/style-messages.d.ts +7 -0
  111. package/dist/style-messages.d.ts.map +1 -0
  112. package/dist/style-messages.js +12 -0
  113. package/dist/style-messages.js.map +1 -0
  114. package/dist/style-model.d.ts +50 -0
  115. package/dist/style-model.d.ts.map +1 -0
  116. package/dist/style-model.js +76 -0
  117. package/dist/style-model.js.map +1 -0
  118. package/dist/style-placing.d.ts +38 -0
  119. package/dist/style-placing.d.ts.map +1 -0
  120. package/dist/style-placing.js +98 -0
  121. package/dist/style-placing.js.map +1 -0
  122. package/dist/textarea.d.ts +17 -0
  123. package/dist/textarea.d.ts.map +1 -0
  124. package/dist/textarea.js +175 -0
  125. package/dist/textarea.js.map +1 -0
  126. package/package.json +54 -4
  127. package/src/authoring.ts +896 -0
  128. package/src/define.ts +34 -0
  129. package/src/edit.ts +195 -0
  130. package/src/elements/base.ts +93 -0
  131. package/src/elements/color-control.ts +159 -0
  132. package/src/elements/help-form.ts +404 -0
  133. package/src/elements/insert-menu.ts +481 -0
  134. package/src/elements/inspector.ts +941 -0
  135. package/src/elements/issue-list.ts +103 -0
  136. package/src/elements/issues.ts +89 -0
  137. package/src/elements/picture-dialog.ts +461 -0
  138. package/src/elements/picture-field.ts +770 -0
  139. package/src/elements/preview.ts +186 -0
  140. package/src/elements/style-form.ts +751 -0
  141. package/src/elements/style-load.ts +64 -0
  142. package/src/elements/style-popups.ts +257 -0
  143. package/src/elements/style-rules.ts +294 -0
  144. package/src/elements/styles.ts +162 -0
  145. package/src/elements/toolbar.ts +1386 -0
  146. package/src/help.ts +156 -0
  147. package/src/index.ts +81 -0
  148. package/src/inspect.ts +774 -0
  149. package/src/messages/en.json +252 -0
  150. package/src/messages/help/en.json +18 -0
  151. package/src/messages/help/pl.json +18 -0
  152. package/src/messages/pl.json +252 -0
  153. package/src/messages/style/en.json +67 -0
  154. package/src/messages/style/pl.json +67 -0
  155. package/src/messages.ts +11 -0
  156. package/src/pages.ts +158 -0
  157. package/src/scan.ts +382 -0
  158. package/src/style-messages.ts +13 -0
  159. package/src/style-model.ts +125 -0
  160. package/src/style-placing.ts +117 -0
  161. package/src/textarea.ts +182 -0
@@ -0,0 +1,284 @@
1
+ /**
2
+ * createAuthoring: the editor-independent logic of the authoring kit. Pure (no DOM), so hosts, agents and tests can
3
+ * use it in any runtime; the web components and adapters are thin layers on top.
4
+ */
5
+ import { type AttemptPolicy, type EditorDescriptor, type EditorTemplate, type Engine, type Issue, type MessageCatalog, type MessageParams, type StyleTemplate, type UrlPolicy, type ValidationReport } from '@astl/core';
6
+ import { type LocalChecker } from '@astl/engine';
7
+ import type { ElementEntry } from '@astl/player';
8
+ import { type InspectorChange } from './edit.js';
9
+ import { type InspectorModel } from './inspect.js';
10
+ import { type EditorFont, type EditorStylePreset } from './style-model.js';
11
+ export interface AuthoringOptions {
12
+ readonly engine: Engine;
13
+ /** One per component type authors can insert and inspect. Each tag must be registered in the engine. */
14
+ readonly descriptors: readonly EditorDescriptor[];
15
+ /** Player elements for `<astl-preview>`, eager or lazy. */
16
+ readonly elements?: readonly ElementEntry[];
17
+ /** The author's UI locale: labels, issues, template texts. */
18
+ readonly locale: string;
19
+ /** More or overriding catalogs (any namespace), e.g. another UI locale. */
20
+ readonly catalogs?: readonly MessageCatalog[];
21
+ /**
22
+ * Catalogs only insert menus show (the one-line descriptions), loaded when a menu first opens rather than with the
23
+ * editor (`loadMenuMessages`): the built-ins' are the components package's `builtInMenuMessages`. The host's
24
+ * `catalogs` override them.
25
+ */
26
+ readonly menuMessages?: () => Promise<readonly MessageCatalog[]>;
27
+ /**
28
+ * Style templates authors can pick (register the same ones with the engine and the player): the inspector offers
29
+ * them per component and for the whole document, labelled from their catalogs; `<astl-preview>` renders them.
30
+ */
31
+ readonly styleTemplates?: readonly StyleTemplate[];
32
+ /**
33
+ * The engine's URL policy (`createEngine({ urlPolicy })`): the preview's player cleans with it and editors check
34
+ * picture addresses with it before they show them. Default `isSafeUrl`.
35
+ */
36
+ readonly urlPolicy?: UrlPolicy;
37
+ /**
38
+ * The fonts the style controls offer, in order. Default `DEFAULT_FONTS`, stacks every system has. A stack the style
39
+ * allow-list refuses throws.
40
+ */
41
+ readonly fonts?: readonly EditorFont[];
42
+ /**
43
+ * The ready styles the style menu and the style form offer, in order; `[]`: none. Default `DEFAULT_STYLES`. A name
44
+ * `isStyleName` refuses, a declaration the style allow-list refuses, or a name given twice throws.
45
+ */
46
+ readonly styles?: readonly EditorStylePreset[];
47
+ /**
48
+ * Stores a picture file and returns its address (and size): the host's upload, used by the picture dialog, by
49
+ * pictures pasted or dropped into the editor and by picture fields; also by `url` fields with `accept` (a video,
50
+ * its captions). The address must pass `urlPolicy`. Without it, files are added by address only (pictures also
51
+ * from `pickPicture`). `signal` aborts when the author cancels or picks another file. The file's type is the
52
+ * browser's guess: check type and size on the server, and serve SVG with `nosniff`. Reject with `UploadRefused` to
53
+ * tell the author why.
54
+ */
55
+ readonly uploadAsset?: UploadAsset;
56
+ /**
57
+ * Opens the host's own picture library: the picture dialog and picture fields offer it beside the upload. The
58
+ * address it gives must pass `urlPolicy`. The picture dialog closes while the library is open, keeping what the
59
+ * author typed, so a modal of the host's own takes the pointer and the keys; it opens again when the library
60
+ * settles. Reject with `UploadRefused` to tell the author why.
61
+ */
62
+ readonly pickPicture?: PickPicture;
63
+ }
64
+ /** A stored picture, as `uploadAsset` and `pickPicture` give it: its address, and its size in pixels when known. */
65
+ export interface UploadedAsset {
66
+ readonly src: string;
67
+ readonly width?: number;
68
+ readonly height?: number;
69
+ }
70
+ export type UploadAsset = (file: File, options: {
71
+ readonly signal: AbortSignal;
72
+ }) => Promise<UploadedAsset>;
73
+ /**
74
+ * Opens the host's own picture library and resolves with the chosen picture (its address, and its size when known),
75
+ * or null when the author closes it without one. The address must pass `urlPolicy`. Settle once the library has
76
+ * closed: the picture dialog and the picture fields then give the focus back themselves. `signal` aborts when the
77
+ * editor no longer waits for it (the picture dialog was asked for another picture or left the page, the picture field
78
+ * started another upload or pick): the host should then close its library.
79
+ */
80
+ export type PickPicture = (options: {
81
+ readonly signal: AbortSignal;
82
+ }) => Promise<UploadedAsset | null>;
83
+ /**
84
+ * What a host's `uploadAsset` or `pickPicture` rejects with to tell the author why: its message, already in the
85
+ * editor's locale, is shown as it is, instead of the generic failure text.
86
+ */
87
+ export declare class UploadRefused extends Error {
88
+ constructor(message: string, options?: ErrorOptions);
89
+ }
90
+ /**
91
+ * The words of a host's refusal: the message of an `UploadRefused`, known by its name so that another copy of this
92
+ * package counts too; undefined for any other error and for a refusal without words.
93
+ */
94
+ export declare function refusalOf(error: unknown): string | undefined;
95
+ /** A picture as the picture dialog asks for it: `alt` is `''` for a decorative picture. */
96
+ export interface PictureFields {
97
+ readonly src: string;
98
+ readonly alt: string;
99
+ readonly width?: number;
100
+ readonly height?: number;
101
+ /** A caption makes the picture a figure. */
102
+ readonly caption?: string;
103
+ }
104
+ /**
105
+ * A picture's width or height as the content format takes it: a positive whole number of pixels (a safe integer),
106
+ * from a number or its written form; anything else is no size.
107
+ */
108
+ export declare function pictureSize(value: unknown): number | undefined;
109
+ /**
110
+ * The source HTML of a picture: an `<img>` that sits in text, or with a caption a `<figure>` that stands on its own.
111
+ * Every value is read once and escaped, and only the attributes of the content format are written.
112
+ */
113
+ export declare function pictureHtml(picture: PictureFields): string;
114
+ export interface OutlineComponent {
115
+ readonly id: string | null;
116
+ readonly tag: string;
117
+ /** Translated type label (the tag when there is no descriptor). */
118
+ readonly label: string;
119
+ /** Its `points` (default 1) when the type is graded, else null. */
120
+ readonly points: number | null;
121
+ /** Issues located on this component or its children. */
122
+ readonly errors: number;
123
+ readonly warnings: number;
124
+ }
125
+ /**
126
+ * One block of a page (`EditorBlockPlace`): a block component directly on the page, or the content between two of
127
+ * them (paragraphs, headings, lists, quotes, pictures, with the inline components in their text).
128
+ */
129
+ export interface OutlineBlock {
130
+ readonly kind: 'component' | 'text';
131
+ /** The component's source id (null when it has none), or null for a text block. */
132
+ readonly id: string | null;
133
+ /** The component's tag, or null for a text block. */
134
+ readonly tag: string | null;
135
+ /**
136
+ * The block's type: the component's label, else `block.gap` ("Gap") for text that holds a graded component and
137
+ * `block.text` ("Text") for the rest.
138
+ */
139
+ readonly label: string;
140
+ /** The sum of its components' points, or null when none of them is graded. */
141
+ readonly points: number | null;
142
+ /** Its component, or the components in its text, in document order. */
143
+ readonly components: readonly OutlineComponent[];
144
+ /** Issues located on its components. */
145
+ readonly errors: number;
146
+ readonly warnings: number;
147
+ }
148
+ export interface OutlinePage {
149
+ /** null for the implicit page of a document without pages. */
150
+ readonly id: string | null;
151
+ readonly label: string | null;
152
+ /** Issues located on the page, its content and its components. */
153
+ readonly errors: number;
154
+ readonly warnings: number;
155
+ readonly components: readonly OutlineComponent[];
156
+ /** Its content as blocks, in order. */
157
+ readonly blocks: readonly OutlineBlock[];
158
+ /** The sum of its blocks' points, or null when nothing on it is graded. */
159
+ readonly points: number | null;
160
+ }
161
+ export interface Outline {
162
+ readonly pages: readonly OutlinePage[];
163
+ /** Every issue of the document. */
164
+ readonly errors: number;
165
+ readonly warnings: number;
166
+ /** The sum of its pages' points, or null when nothing is graded. */
167
+ readonly points: number | null;
168
+ }
169
+ /** A playable preview, or the issues that block compiling. */
170
+ /** How `Authoring.preview` grades. */
171
+ export interface PreviewOptions {
172
+ /**
173
+ * The policy of the local grading, the one the host plays the result under: a host whose students get less help than
174
+ * practice offers (no hints, no check of one interaction) previews with that. Default `PRACTICE_POLICY`.
175
+ */
176
+ readonly policy?: AttemptPolicy;
177
+ }
178
+ export type PreviewResult = {
179
+ readonly ok: true;
180
+ readonly view: string;
181
+ /** Local grading for this preview, under its policy (`PreviewOptions.policy`, practice by default). */
182
+ readonly checker: LocalChecker;
183
+ /** Warnings. */
184
+ readonly issues: readonly Issue[];
185
+ } | {
186
+ readonly ok: false;
187
+ readonly issues: readonly Issue[];
188
+ };
189
+ /** How `Authoring.describe` names a component. */
190
+ export interface DescribeOptions {
191
+ /**
192
+ * Whether the name says the component's page when the document has pages: "Question 2 on page 1" (default true), or
193
+ * "Question 2" (false) for a host that shows the page apart.
194
+ */
195
+ readonly page?: boolean;
196
+ }
197
+ export interface Authoring {
198
+ readonly engine: Engine;
199
+ readonly locale: string;
200
+ readonly descriptors: readonly EditorDescriptor[];
201
+ readonly elements: readonly ElementEntry[];
202
+ readonly styleTemplates: readonly StyleTemplate[];
203
+ readonly urlPolicy: UrlPolicy;
204
+ /** The fonts the style controls offer, each stack in the allow-list's normal form. */
205
+ readonly fonts: readonly EditorFont[];
206
+ /**
207
+ * The ready styles the style menu and the style form offer, each style in the allow-list's normal form and each with
208
+ * its label: the host's, else the kit's message `style.preset.<name>` in the authoring locale, else the name.
209
+ */
210
+ readonly styles: readonly (EditorStylePreset & {
211
+ readonly label: string;
212
+ })[];
213
+ /** The host's upload, or null: files are added by address only. */
214
+ readonly uploadAsset: UploadAsset | null;
215
+ /** The host's picture library, or null. */
216
+ readonly pickPicture: PickPicture | null;
217
+ /** The descriptor of a component tag, or null. */
218
+ descriptor(tag: string): EditorDescriptor | null;
219
+ /** The named starters of a component tag (`EditorDescriptor.templates`); none without a descriptor. */
220
+ templates(tag: string): readonly EditorTemplate[];
221
+ /** A message in the authoring locale: kit (`astl.editor`), descriptor, engine and extra catalogs. */
222
+ t(namespace: string, key: string, params?: MessageParams): string;
223
+ /**
224
+ * Loads the `menuMessages` option's catalogs (what only insert menus show) once; `t` has them when it resolves. A
225
+ * failed load resolves too, and the next call tries again.
226
+ */
227
+ loadMenuMessages(): Promise<void>;
228
+ /**
229
+ * Adds the catalogs of a part of the kit that loads later, under the host's `catalogs`, which may override them; `t`
230
+ * has them at once. Adding the same ones again does nothing.
231
+ */
232
+ addMessages(catalogs: readonly MessageCatalog[]): void;
233
+ /**
234
+ * The descriptor's template, or its named starter `templateId`, ready to insert into `source`: `{{id}}` becomes
235
+ * `<idPrefix>-<n>` with the smallest n whose id `source` does not use, `{{selection}}` the escaped `selection` (the
236
+ * text the author selected, `EditorAdapter.selectedText`; default `''`), `{{t:key}}` an escaped message of the
237
+ * manifest namespace, and other components written without an id get fresh ones too. An element of a type with a
238
+ * `companion` and an empty attribute names the first such element of the template, else of `source`, else the one
239
+ * `withCompanion` adds. Throws for a tag without a descriptor or an unknown starter.
240
+ */
241
+ instantiate(tag: string, source: string, templateId?: string, selection?: string): string;
242
+ /**
243
+ * `source` (with an inserted `tag` element) where that element, the one with the id `id` (default: the first whose
244
+ * companion attribute names none on its page), names a companion element of its own page, as pages play one at a
245
+ * time: the first one there, else the descriptor's `companion` template, added at the end of that page (of the
246
+ * document, without pages). Null when nothing changes: the type has no companion, or the element names one of its
247
+ * page already.
248
+ */
249
+ withCompanion(tag: string, source: string, id?: string): string | null;
250
+ /**
251
+ * The inspector model of one component element (source HTML), or null for elements it does not know. With the
252
+ * whole document (`source`), fields offer what other elements hold (the words of the bank a drop takes its words
253
+ * from); without it they show the attribute's own control.
254
+ */
255
+ inspect(elementHtml: string, source?: string): InspectorModel | null;
256
+ /**
257
+ * The document's own settings (its style template) as an inspector model for `<astl-doc>`, or null when the source
258
+ * has no `<astl-doc>` root or there is nothing to set. Apply its changes with `update(source, change)`: the first
259
+ * element of the source is the document, so only its start tag changes.
260
+ */
261
+ inspectDocument(source: string): InspectorModel | null;
262
+ /** The element HTML with one inspector change applied; everything else stays byte-identical. */
263
+ update(elementHtml: string, change: InspectorChange): string;
264
+ validate(source: string): ValidationReport;
265
+ /**
266
+ * An issue as a sentence in the authoring locale. With the document it is about (`source`), a component's issue
267
+ * names the component as the author sees it, never by its id (the id stays in `issue.at` for "Show"): a block
268
+ * component by the number of its block on its page, as its card's head shows it ("Question 2 on page 1" for block 2),
269
+ * a component in text by its number among the components of its type on its page ("Gap 3 on page 1"); with
270
+ * `page: false`, without its page ("Question 2").
271
+ */
272
+ describe(issue: Issue, source?: string, options?: DescribeOptions): string;
273
+ /** `source` with fresh ids on pages and components that lack one (or have an empty one). */
274
+ assignIds(source: string): string;
275
+ /** Pages, their blocks and components, points and issue counts. */
276
+ outline(source: string): Outline;
277
+ /**
278
+ * Compiles with a random per-session salt and grades locally, under `options.policy` (default `PRACTICE_POLICY`). The
279
+ * source is not stored anywhere.
280
+ */
281
+ preview(source: string, options?: PreviewOptions): Promise<PreviewResult>;
282
+ }
283
+ export declare function createAuthoring(options: AuthoringOptions): Authoring;
284
+ //# sourceMappingURL=authoring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../src/authoring.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,KAAK,aAAa,EAMlB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAGnB,KAAK,MAAM,EAEX,KAAK,KAAK,EAIV,KAAK,cAAc,EACnB,KAAK,aAAa,EAOlB,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAkB,KAAK,YAAY,EAA2B,MAAM,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