@test2doc/playwright 0.12.1 → 0.14.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.
- package/LICENSE +201 -0
- package/README.md +19 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -97,14 +97,14 @@ The `TEST2DOC=true` is required to activate the test2doc metadata to pass to the
|
|
|
97
97
|
...
|
|
98
98
|
"scripts": {
|
|
99
99
|
...
|
|
100
|
-
"
|
|
100
|
+
"doc:gen": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts"
|
|
101
101
|
}
|
|
102
102
|
...
|
|
103
103
|
}
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
## Verify installation
|
|
107
|
-
To verify your setup works, run `npm run
|
|
107
|
+
To verify your setup works, run `npm run doc:gen` and check that markdown files appear in your `./doc/docs` directory, or wherever you specified the output directory in the `playwright-test2doc.config.ts` file.
|
|
108
108
|
|
|
109
109
|
## Filtering Tests
|
|
110
110
|
It is possible you may wish to opt-in some tests or opt-out other tests from doc generation. This is possible with playwright tags.
|
|
@@ -151,7 +151,7 @@ Run only tests with the `@test2doc` tag.
|
|
|
151
151
|
...
|
|
152
152
|
"scripts": {
|
|
153
153
|
...
|
|
154
|
-
"
|
|
154
|
+
"doc:gen": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts --grep @test2doc"
|
|
155
155
|
}
|
|
156
156
|
...
|
|
157
157
|
}
|
|
@@ -168,7 +168,7 @@ Skip tests with the `@skip-docs` tag.
|
|
|
168
168
|
...
|
|
169
169
|
"scripts": {
|
|
170
170
|
...
|
|
171
|
-
"
|
|
171
|
+
"doc:gen": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts --grep-invert @skip-docs"
|
|
172
172
|
}
|
|
173
173
|
...
|
|
174
174
|
}
|
|
@@ -180,6 +180,17 @@ After this setup, every time you run your Playwright tests, the `@test2doc/playw
|
|
|
180
180
|
|
|
181
181
|
> **Note:** Any test files with a `.setup.ts` (or `.setup.js`) extension are automatically ignored and will not generate documentation. This is to prevent Playwright global setup/auth files from appearing in your docs.
|
|
182
182
|
|
|
183
|
+
### Cleanup Step
|
|
184
|
+
The cleanup step is designed to maintain a tidy output directory by removing outdated files and directories created by the Test2Doc reporter.
|
|
185
|
+
|
|
186
|
+
The cleanup step runs after all the successful test have ran and just before generating the documentation.
|
|
187
|
+
|
|
188
|
+
#### What Happens During Cleanup
|
|
189
|
+
- **File Deletion**: Any files prefixed with `test2doc-` (e.g., `test2doc-login.md`) will be deleted from the output directory. This ensures that only the most recent documentation files are retained.
|
|
190
|
+
- **Directory Management**: Directories that contain files not generated by the Test2Doc reporter will not be deleted. This prevents the loss of any handwritten documentation or other important files.
|
|
191
|
+
|
|
192
|
+
**Note** It is safe to place your handwritten files in directories generated by Test2Doc. However, be mindful that if you clean up tests associated with that directory and put handwritten files into it, that the directory may become an orphan and only contain the handwritten files.
|
|
193
|
+
|
|
183
194
|
### Adding Docusaurus Page Metadata
|
|
184
195
|
Docusaurus supports [markdown front matter](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter) to allow for more control of pages and to help position links in the sidebar.
|
|
185
196
|
|
|
@@ -350,9 +361,9 @@ To style the highlight and label we expose a few properties on the `annotation`
|
|
|
350
361
|
- **Default**: `2`
|
|
351
362
|
|
|
352
363
|
- **`position`**:
|
|
353
|
-
- **Type**: `"above" | "below" | "left" | "right"`
|
|
354
|
-
- **Description**: Determines the position of the label text relative to the highlighted element.
|
|
355
|
-
- **Default**:
|
|
364
|
+
- **Type**: `"above" | "below" | "left" | "right" | number`
|
|
365
|
+
- **Description**: Determines the position of the label text relative to the highlighted element. Uses clock convention where 0° = top, 90° = right, etc. If a number is provided, it positions the label at that degree angle. Defaults to automatically positioning towards the screen center.
|
|
366
|
+
- **Default**: Automatically positions label towards the center of the screen.
|
|
356
367
|
- **`showArrow`**:
|
|
357
368
|
- **Type**: `boolean`
|
|
358
369
|
- **Description**: Whether to display an arrow pointing from the label to the highlighted element. When enabled, creates a visual connection between the annotation text and the target element.
|
|
@@ -428,7 +439,6 @@ export default defineConfig({
|
|
|
428
439
|
})
|
|
429
440
|
```
|
|
430
441
|
|
|
431
|
-
|
|
432
442
|
#### Highlight multiple elements
|
|
433
443
|
In the event that you need to highlight multiple elements, you can pass in an array with `MultiLocatorScreenshot` objects.
|
|
434
444
|
|
|
@@ -458,7 +468,7 @@ test.describe(withDocMeta("describe block"), async () => {
|
|
|
458
468
|
options: {
|
|
459
469
|
annotation: {
|
|
460
470
|
text: "Sidebar Element",
|
|
461
|
-
position:
|
|
471
|
+
position: 270,
|
|
462
472
|
showArrow: true,
|
|
463
473
|
arrowStrokeStyle: "red",
|
|
464
474
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare class Test2DocReporter implements Reporter {
|
|
|
27
27
|
onEnd(): void;
|
|
28
28
|
private buildDocFiles;
|
|
29
29
|
private generateScreenshots;
|
|
30
|
-
private
|
|
30
|
+
private cleanupTest2DocFiles;
|
|
31
31
|
private extractDocMetadata;
|
|
32
32
|
private generateHeader;
|
|
33
33
|
private generateTitle;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,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AkB;IAW1B,OAAO,CAAC,cAAc;IAiCtB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,gBAAgB;CA6BzB;AAOD,eAAe,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdirSync, readdirSync, statSync, unlinkSync, writeFileSync, } from "node:fs";
|
|
1
|
+
import { mkdirSync, readdirSync, rmdirSync, statSync, unlinkSync, writeFileSync, } from "node:fs";
|
|
2
2
|
import { activateTest2Doc } from "./DocMeta.js";
|
|
3
3
|
import { convertToKebabCase } from "./utils.js";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -124,7 +124,7 @@ class Test2DocReporter {
|
|
|
124
124
|
onEnd() {
|
|
125
125
|
writeLine("\n");
|
|
126
126
|
writeLine("Cleaning up old screenshots...");
|
|
127
|
-
this.
|
|
127
|
+
this.cleanupTest2DocFiles(this.outputDir);
|
|
128
128
|
writeLine("Generating documentation files...");
|
|
129
129
|
this.docs.forEach((doc) => {
|
|
130
130
|
this.buildDocFiles(doc);
|
|
@@ -138,12 +138,12 @@ class Test2DocReporter {
|
|
|
138
138
|
if (metaType === "page") {
|
|
139
139
|
const markdownHeader = this.generateHeader(metadata);
|
|
140
140
|
const markdown = markdownHeader + this.generateMarkdown({ ...doc, title }, 1);
|
|
141
|
-
const filePath = `${outputDir}
|
|
141
|
+
const filePath = `${outputDir}/test2doc-${convertToKebabCase(title)}.md`;
|
|
142
142
|
writeFileSync(filePath, markdown);
|
|
143
143
|
this.generateScreenshots(outputDir);
|
|
144
144
|
}
|
|
145
145
|
else if (metaType === "category") {
|
|
146
|
-
const filePath = `${outputDir}
|
|
146
|
+
const filePath = `${outputDir}/test2doc-${convertToKebabCase(title)}`;
|
|
147
147
|
mkdirSync(filePath, { recursive: true });
|
|
148
148
|
writeFileSync(`${filePath}/_category_.json`, JSON.stringify(metadata, null, 2));
|
|
149
149
|
doc.children.forEach((child) => {
|
|
@@ -153,7 +153,7 @@ class Test2DocReporter {
|
|
|
153
153
|
}
|
|
154
154
|
else {
|
|
155
155
|
const markdown = this.generateMarkdown(doc, 1);
|
|
156
|
-
const filePath = `${outputDir}
|
|
156
|
+
const filePath = `${outputDir}/test2doc-${convertToKebabCase(doc.title)}.md`;
|
|
157
157
|
writeFileSync(filePath, markdown);
|
|
158
158
|
this.generateScreenshots(outputDir);
|
|
159
159
|
}
|
|
@@ -165,12 +165,20 @@ class Test2DocReporter {
|
|
|
165
165
|
});
|
|
166
166
|
this.screenshotMoveQueue = [];
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
cleanupTest2DocFiles(output) {
|
|
169
169
|
for (const file of readdirSync(output)) {
|
|
170
170
|
const filePath = join(output, file);
|
|
171
171
|
const stat = statSync(filePath);
|
|
172
172
|
if (stat.isDirectory()) {
|
|
173
|
-
this.
|
|
173
|
+
this.cleanupTest2DocFiles(filePath);
|
|
174
|
+
const filesInDir = readdirSync(filePath);
|
|
175
|
+
if (filesInDir.length === 0) {
|
|
176
|
+
rmdirSync(filePath);
|
|
177
|
+
}
|
|
178
|
+
else if (filesInDir.length === 1 &&
|
|
179
|
+
filesInDir.at(0) === "_category_.json") {
|
|
180
|
+
rmdirSync(filePath, { recursive: true });
|
|
181
|
+
}
|
|
174
182
|
}
|
|
175
183
|
else if (stat.isFile() && file.startsWith("test2doc-")) {
|
|
176
184
|
unlinkSync(filePath);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAM/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AA4ChC,0EA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