@usejunior/docx-core 0.14.0 → 0.16.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/dist/.tsbuildinfo +1 -1
- package/dist/generation/index.d.ts +0 -1
- package/dist/generation/index.d.ts.map +1 -1
- package/dist/generation/index.js +0 -1
- package/dist/generation/index.js.map +1 -1
- package/dist/index.d.ts +7 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -47
- package/dist/index.js.map +1 -1
- package/dist/primitives/accept_ai_edits.d.ts +87 -0
- package/dist/primitives/accept_ai_edits.d.ts.map +1 -0
- package/dist/primitives/accept_ai_edits.js +253 -0
- package/dist/primitives/accept_ai_edits.js.map +1 -0
- package/dist/primitives/accept_changes.d.ts +13 -1
- package/dist/primitives/accept_changes.d.ts.map +1 -1
- package/dist/primitives/accept_changes.js +44 -29
- package/dist/primitives/accept_changes.js.map +1 -1
- package/dist/primitives/document.d.ts +51 -0
- package/dist/primitives/document.d.ts.map +1 -1
- package/dist/primitives/document.js +144 -1
- package/dist/primitives/document.js.map +1 -1
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -0
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/reject_changes.d.ts +4 -1
- package/dist/primitives/reject_changes.d.ts.map +1 -1
- package/dist/primitives/reject_changes.js +54 -30
- package/dist/primitives/reject_changes.js.map +1 -1
- package/dist/primitives/relationships.d.ts +33 -0
- package/dist/primitives/relationships.d.ts.map +1 -1
- package/dist/primitives/relationships.js +84 -1
- package/dist/primitives/relationships.js.map +1 -1
- package/package.json +8 -9
- package/dist/atomizer.d.ts +0 -273
- package/dist/atomizer.d.ts.map +0 -1
- package/dist/atomizer.js +0 -1002
- package/dist/atomizer.js.map +0 -1
- package/dist/baselines/atomizer/atomLcs.d.ts +0 -82
- package/dist/baselines/atomizer/atomLcs.d.ts.map +0 -1
- package/dist/baselines/atomizer/atomLcs.js +0 -376
- package/dist/baselines/atomizer/atomLcs.js.map +0 -1
- package/dist/baselines/atomizer/auxiliaryIdCollision.d.ts +0 -99
- package/dist/baselines/atomizer/auxiliaryIdCollision.d.ts.map +0 -1
- package/dist/baselines/atomizer/auxiliaryIdCollision.js +0 -415
- package/dist/baselines/atomizer/auxiliaryIdCollision.js.map +0 -1
- package/dist/baselines/atomizer/consumerCompatibility.d.ts +0 -2
- package/dist/baselines/atomizer/consumerCompatibility.d.ts.map +0 -1
- package/dist/baselines/atomizer/consumerCompatibility.js +0 -188
- package/dist/baselines/atomizer/consumerCompatibility.js.map +0 -1
- package/dist/baselines/atomizer/debug.d.ts +0 -41
- package/dist/baselines/atomizer/debug.d.ts.map +0 -1
- package/dist/baselines/atomizer/debug.js +0 -85
- package/dist/baselines/atomizer/debug.js.map +0 -1
- package/dist/baselines/atomizer/documentReconstructor.d.ts +0 -75
- package/dist/baselines/atomizer/documentReconstructor.d.ts.map +0 -1
- package/dist/baselines/atomizer/documentReconstructor.js +0 -1449
- package/dist/baselines/atomizer/documentReconstructor.js.map +0 -1
- package/dist/baselines/atomizer/formattingFidelity.d.ts +0 -99
- package/dist/baselines/atomizer/formattingFidelity.d.ts.map +0 -1
- package/dist/baselines/atomizer/formattingFidelity.js +0 -449
- package/dist/baselines/atomizer/formattingFidelity.js.map +0 -1
- package/dist/baselines/atomizer/hierarchicalLcs.d.ts +0 -121
- package/dist/baselines/atomizer/hierarchicalLcs.d.ts.map +0 -1
- package/dist/baselines/atomizer/hierarchicalLcs.js +0 -753
- package/dist/baselines/atomizer/hierarchicalLcs.js.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-bookmarks.d.ts +0 -37
- package/dist/baselines/atomizer/inPlaceModifier-bookmarks.d.ts.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-bookmarks.js +0 -189
- package/dist/baselines/atomizer/inPlaceModifier-bookmarks.js.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-containers.d.ts +0 -74
- package/dist/baselines/atomizer/inPlaceModifier-containers.d.ts.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-containers.js +0 -171
- package/dist/baselines/atomizer/inPlaceModifier-containers.js.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-deletion.d.ts +0 -88
- package/dist/baselines/atomizer/inPlaceModifier-deletion.d.ts.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-deletion.js +0 -326
- package/dist/baselines/atomizer/inPlaceModifier-deletion.js.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-postprocess.d.ts +0 -85
- package/dist/baselines/atomizer/inPlaceModifier-postprocess.d.ts.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-postprocess.js +0 -402
- package/dist/baselines/atomizer/inPlaceModifier-postprocess.js.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-presplit.d.ts +0 -39
- package/dist/baselines/atomizer/inPlaceModifier-presplit.d.ts.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-presplit.js +0 -265
- package/dist/baselines/atomizer/inPlaceModifier-presplit.js.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-shared.d.ts +0 -62
- package/dist/baselines/atomizer/inPlaceModifier-shared.d.ts.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-shared.js +0 -139
- package/dist/baselines/atomizer/inPlaceModifier-shared.js.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-wrappers.d.ts +0 -198
- package/dist/baselines/atomizer/inPlaceModifier-wrappers.d.ts.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier-wrappers.js +0 -475
- package/dist/baselines/atomizer/inPlaceModifier-wrappers.js.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier.d.ts +0 -27
- package/dist/baselines/atomizer/inPlaceModifier.d.ts.map +0 -1
- package/dist/baselines/atomizer/inPlaceModifier.js +0 -648
- package/dist/baselines/atomizer/inPlaceModifier.js.map +0 -1
- package/dist/baselines/atomizer/numberingIntegration.d.ts +0 -59
- package/dist/baselines/atomizer/numberingIntegration.d.ts.map +0 -1
- package/dist/baselines/atomizer/numberingIntegration.js +0 -209
- package/dist/baselines/atomizer/numberingIntegration.js.map +0 -1
- package/dist/baselines/atomizer/pipeline.d.ts +0 -103
- package/dist/baselines/atomizer/pipeline.d.ts.map +0 -1
- package/dist/baselines/atomizer/pipeline.js +0 -1160
- package/dist/baselines/atomizer/pipeline.js.map +0 -1
- package/dist/baselines/atomizer/premergeRuns.d.ts +0 -26
- package/dist/baselines/atomizer/premergeRuns.d.ts.map +0 -1
- package/dist/baselines/atomizer/premergeRuns.js +0 -153
- package/dist/baselines/atomizer/premergeRuns.js.map +0 -1
- package/dist/baselines/atomizer/trackChangesAcceptor.d.ts +0 -63
- package/dist/baselines/atomizer/trackChangesAcceptor.d.ts.map +0 -1
- package/dist/baselines/atomizer/trackChangesAcceptor.js +0 -254
- package/dist/baselines/atomizer/trackChangesAcceptor.js.map +0 -1
- package/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts +0 -64
- package/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts.map +0 -1
- package/dist/baselines/atomizer/trackChangesAcceptorAst.js +0 -642
- package/dist/baselines/atomizer/trackChangesAcceptorAst.js.map +0 -1
- package/dist/baselines/atomizer/xmlToWmlElement.d.ts +0 -65
- package/dist/baselines/atomizer/xmlToWmlElement.d.ts.map +0 -1
- package/dist/baselines/atomizer/xmlToWmlElement.js +0 -96
- package/dist/baselines/atomizer/xmlToWmlElement.js.map +0 -1
- package/dist/baselines/wmlcomparer/DocxodusWasm.d.ts +0 -51
- package/dist/baselines/wmlcomparer/DocxodusWasm.d.ts.map +0 -1
- package/dist/baselines/wmlcomparer/DocxodusWasm.js +0 -83
- package/dist/baselines/wmlcomparer/DocxodusWasm.js.map +0 -1
- package/dist/baselines/wmlcomparer/DotnetCli.d.ts +0 -40
- package/dist/baselines/wmlcomparer/DotnetCli.d.ts.map +0 -1
- package/dist/baselines/wmlcomparer/DotnetCli.js +0 -142
- package/dist/baselines/wmlcomparer/DotnetCli.js.map +0 -1
- package/dist/cli/compare-two.d.ts +0 -28
- package/dist/cli/compare-two.d.ts.map +0 -1
- package/dist/cli/compare-two.js +0 -112
- package/dist/cli/compare-two.js.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -25
- package/dist/cli/index.js.map +0 -1
- package/dist/compare-types.d.ts +0 -197
- package/dist/compare-types.d.ts.map +0 -1
- package/dist/compare-types.js +0 -2
- package/dist/compare-types.js.map +0 -1
- package/dist/format-detection.d.ts +0 -120
- package/dist/format-detection.d.ts.map +0 -1
- package/dist/format-detection.js +0 -339
- package/dist/format-detection.js.map +0 -1
- package/dist/generation/recipes.d.ts +0 -144
- package/dist/generation/recipes.d.ts.map +0 -1
- package/dist/generation/recipes.js +0 -358
- package/dist/generation/recipes.js.map +0 -1
- package/dist/move-detection.d.ts +0 -211
- package/dist/move-detection.d.ts.map +0 -1
- package/dist/move-detection.js +0 -390
- package/dist/move-detection.js.map +0 -1
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Legal-document recipes.
|
|
3
|
-
*
|
|
4
|
-
* Pure functions producing spec nodes from options — no own OOXML
|
|
5
|
-
* representation, no compiler hooks. Everything a recipe returns is built
|
|
6
|
-
* from the paragraph/table grammar, so its output is inlineable anywhere a
|
|
7
|
-
* BlockSpec is accepted and serializes through exactly the emitters the
|
|
8
|
-
* rest of the document uses. Signature lines are bottom-bordered cells, not
|
|
9
|
-
* VML shapes: Pages and Google Docs mangle VML, borders survive everywhere.
|
|
10
|
-
*/
|
|
11
|
-
const SINGLE = { style: 'single' };
|
|
12
|
-
const NONE = { style: 'none' };
|
|
13
|
-
const DEFAULT_SUBROW_COLOR_HEX = '595959';
|
|
14
|
-
const DEFAULT_SUBROW_LABEL_INDENT_TWIPS = 240;
|
|
15
|
-
const DEFAULT_FILLABLE_HIGHLIGHT = 'yellow';
|
|
16
|
-
/**
|
|
17
|
-
* A fixed-layout two-column label/value table for cover-terms blocks
|
|
18
|
-
* (scenario SDX-GEN-070), with optional house-style grouped/sub rows
|
|
19
|
-
* (SDX-GEN-106) and run styling + fillable placeholders (SDX-GEN-110).
|
|
20
|
-
*/
|
|
21
|
-
export function coverTermsTable(options) {
|
|
22
|
-
const [labelWidth, valueWidth] = options.columnWidthsTwips ?? [2880, 6480];
|
|
23
|
-
// The single-style borders honor an optional house-style color/weight; omitting
|
|
24
|
-
// both yields the bare `{ style: 'single' }` (w:sz="4" w:color="auto") as before.
|
|
25
|
-
const rule = {
|
|
26
|
-
style: 'single',
|
|
27
|
-
...(options.ruleSizeEighthPt !== undefined ? { sizeEighthPt: options.ruleSizeEighthPt } : {}),
|
|
28
|
-
...(options.ruleColorHex !== undefined ? { colorHex: options.ruleColorHex } : {}),
|
|
29
|
-
};
|
|
30
|
-
const borders = options.borderMode === 'horizontal-rules'
|
|
31
|
-
? { top: rule, bottom: rule, left: NONE, right: NONE, insideH: rule, insideV: NONE }
|
|
32
|
-
: { top: rule, bottom: rule, left: rule, right: rule, insideH: rule, insideV: rule };
|
|
33
|
-
const rowRhythm = rowRhythmProps(options);
|
|
34
|
-
const font = options.fontFamily;
|
|
35
|
-
const plainSize = options.sizePt;
|
|
36
|
-
const subSize = options.subrowSizePt ?? options.sizePt;
|
|
37
|
-
const fillHighlight = options.fillableHighlight ?? DEFAULT_FILLABLE_HIGHLIGHT;
|
|
38
|
-
const rows = [];
|
|
39
|
-
if (options.title !== undefined) {
|
|
40
|
-
rows.push({
|
|
41
|
-
header: true,
|
|
42
|
-
cells: [
|
|
43
|
-
{
|
|
44
|
-
gridSpan: 2,
|
|
45
|
-
shadingHex: 'D9D9D9',
|
|
46
|
-
vAlign: 'center',
|
|
47
|
-
...cellMarginProps(options),
|
|
48
|
-
blocks: [paragraph(options.title, { bold: true, alignment: 'center', font, sizePt: plainSize })],
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
for (const term of options.terms) {
|
|
54
|
-
if ('group' in term) {
|
|
55
|
-
rows.push({
|
|
56
|
-
...rowRhythm,
|
|
57
|
-
cells: [
|
|
58
|
-
{
|
|
59
|
-
gridSpan: 2,
|
|
60
|
-
vAlign: 'center',
|
|
61
|
-
...cellMarginProps(options),
|
|
62
|
-
blocks: [
|
|
63
|
-
paragraph(term.group, {
|
|
64
|
-
bold: true,
|
|
65
|
-
font,
|
|
66
|
-
sizePt: plainSize,
|
|
67
|
-
colorHex: options.groupColorHex ?? options.textColorHex,
|
|
68
|
-
}),
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
});
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
const subrow = 'subrow' in term && term.subrow === true;
|
|
76
|
-
const size = subrow ? subSize : plainSize;
|
|
77
|
-
const labelColor = subrow ? (options.subrowColorHex ?? DEFAULT_SUBROW_COLOR_HEX) : options.textColorHex;
|
|
78
|
-
const valueColor = subrow ? (options.subrowColorHex ?? DEFAULT_SUBROW_COLOR_HEX) : options.textColorHex;
|
|
79
|
-
const subrowIndent = (uniformLeft(options)) + (options.subrowLabelIndentTwips ?? DEFAULT_SUBROW_LABEL_INDENT_TWIPS);
|
|
80
|
-
rows.push({
|
|
81
|
-
...rowRhythm,
|
|
82
|
-
cells: [
|
|
83
|
-
{
|
|
84
|
-
...cellMarginProps(options, subrow ? { left: subrowIndent } : undefined),
|
|
85
|
-
blocks: [paragraph(term.label, { bold: !subrow, italic: subrow, colorHex: labelColor, font, sizePt: size })],
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
...cellMarginProps(options),
|
|
89
|
-
blocks: [
|
|
90
|
-
paragraph(term.value, {
|
|
91
|
-
italic: subrow,
|
|
92
|
-
colorHex: valueColor,
|
|
93
|
-
font,
|
|
94
|
-
sizePt: size,
|
|
95
|
-
...(term.fillable ? { bold: true, highlight: fillHighlight } : {}),
|
|
96
|
-
}),
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
kind: 'table',
|
|
104
|
-
layout: 'fixed',
|
|
105
|
-
columnWidthsTwips: [labelWidth, valueWidth],
|
|
106
|
-
borders,
|
|
107
|
-
rows,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Signature blocks rendered as borderless tables whose content cells carry
|
|
112
|
-
* only bottom borders — the signature lines. No VML, no images.
|
|
113
|
-
*
|
|
114
|
-
* - `single-column` (default): the historical stacked block — one table per
|
|
115
|
-
* party, a bottom-bordered line then name/title/date rows (SDX-GEN-071).
|
|
116
|
-
* - `two-column`: a paired signing grid, two signers per row, each a centered
|
|
117
|
-
* muted header over ruled Signature/Print Name/Title/Date lines with captions
|
|
118
|
-
* beneath (SDX-GEN-109).
|
|
119
|
-
* - `oa-stacked-ruled`: per party, a centered muted-caps header over a
|
|
120
|
-
* label-column / ruled-line table with tall signing rows (SDX-GEN-111).
|
|
121
|
-
*/
|
|
122
|
-
export function signatureBlock(options) {
|
|
123
|
-
const layout = options.layout ?? 'single-column';
|
|
124
|
-
if (layout === 'two-column')
|
|
125
|
-
return [twoColumnSignatureGrid(options)];
|
|
126
|
-
if (layout === 'oa-stacked-ruled')
|
|
127
|
-
return oaStackedRuledSignatures(options);
|
|
128
|
-
const width = options.lineWidthTwips ?? 4320;
|
|
129
|
-
const blocks = [];
|
|
130
|
-
options.parties.forEach((party, index) => {
|
|
131
|
-
if (index > 0)
|
|
132
|
-
blocks.push(paragraph(''));
|
|
133
|
-
blocks.push(paragraph(party.party, { bold: true }));
|
|
134
|
-
const rows = [
|
|
135
|
-
{ cells: [{ borders: { bottom: SINGLE }, blocks: [paragraph('')] }] },
|
|
136
|
-
{ cells: [{ blocks: [paragraph(`Name: ${party.name}`)] }] },
|
|
137
|
-
];
|
|
138
|
-
if (party.title !== undefined) {
|
|
139
|
-
rows.push({ cells: [{ blocks: [paragraph(`Title: ${party.title}`)] }] });
|
|
140
|
-
}
|
|
141
|
-
rows.push({ cells: [{ blocks: [paragraph(party.dateLabel ?? 'Date:')] }] });
|
|
142
|
-
blocks.push({
|
|
143
|
-
kind: 'table',
|
|
144
|
-
layout: 'fixed',
|
|
145
|
-
columnWidthsTwips: [width],
|
|
146
|
-
rows,
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
return blocks;
|
|
150
|
-
}
|
|
151
|
-
function paragraph(text, opts) {
|
|
152
|
-
return {
|
|
153
|
-
kind: 'paragraph',
|
|
154
|
-
...(opts?.alignment !== undefined ? { alignment: opts.alignment } : {}),
|
|
155
|
-
runs: [
|
|
156
|
-
{
|
|
157
|
-
kind: 'text',
|
|
158
|
-
text,
|
|
159
|
-
...(opts?.bold ? { bold: true } : {}),
|
|
160
|
-
...(opts?.italic ? { italic: true } : {}),
|
|
161
|
-
...(opts?.caps ? { caps: true } : {}),
|
|
162
|
-
...(opts?.colorHex !== undefined ? { colorHex: opts.colorHex } : {}),
|
|
163
|
-
...(opts?.font !== undefined ? { font: opts.font } : {}),
|
|
164
|
-
...(opts?.sizePt !== undefined ? { sizePt: opts.sizePt } : {}),
|
|
165
|
-
...(opts?.highlight !== undefined ? { highlight: opts.highlight } : {}),
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* OA stacked-ruled signatures: per party a centered uppercase muted header over
|
|
172
|
-
* a borderless `[label | ruled line]` two-column table with tall signing rows.
|
|
173
|
-
* Print Name / Title are pre-filled from the party data and optionally rendered
|
|
174
|
-
* as fillable (highlight + bold) placeholders.
|
|
175
|
-
*/
|
|
176
|
-
function oaStackedRuledSignatures(options) {
|
|
177
|
-
const total = options.totalWidthTwips ?? 9360;
|
|
178
|
-
const labelWidth = options.labelColumnTwips ?? 1800;
|
|
179
|
-
const lineWidth = Math.max(1, total - labelWidth);
|
|
180
|
-
const rowHeight = options.ruledRowHeightTwips ?? 620;
|
|
181
|
-
const muted = options.headerColorHex ?? DEFAULT_SUBROW_COLOR_HEX;
|
|
182
|
-
const font = options.fontFamily;
|
|
183
|
-
const fields = options.fields ?? ['signature', 'printName', 'title', 'date'];
|
|
184
|
-
// Caption overrides honor the same `ruledLineLabels` tuple as the two-column
|
|
185
|
-
// path ([Signature, Print Name, Title, Date]); the Date caption additionally
|
|
186
|
-
// honors a per-party `dateLabel`, matching single-column / two-column behavior.
|
|
187
|
-
const labels = options.ruledLineLabels ?? ['Signature', 'Print Name', 'Title', 'Date'];
|
|
188
|
-
const captionFor = (field, party) => {
|
|
189
|
-
switch (field) {
|
|
190
|
-
case 'signature':
|
|
191
|
-
return labels[0];
|
|
192
|
-
case 'printName':
|
|
193
|
-
return labels[1];
|
|
194
|
-
case 'title':
|
|
195
|
-
return labels[2];
|
|
196
|
-
case 'date':
|
|
197
|
-
return party.dateLabel ?? labels[3];
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
const fillHighlight = options.fillableHighlight ?? DEFAULT_FILLABLE_HIGHLIGHT;
|
|
201
|
-
const noBorders = { top: NONE, bottom: NONE, left: NONE, right: NONE, insideH: NONE, insideV: NONE };
|
|
202
|
-
// The ruled signing line honors an optional house-style color/weight; omitting
|
|
203
|
-
// both yields the bare `{ style: 'single' }` bottom border as before.
|
|
204
|
-
const lineBorder = {
|
|
205
|
-
style: 'single',
|
|
206
|
-
...(options.lineSizeEighthPt !== undefined ? { sizeEighthPt: options.lineSizeEighthPt } : {}),
|
|
207
|
-
...(options.lineColorHex !== undefined ? { colorHex: options.lineColorHex } : {}),
|
|
208
|
-
};
|
|
209
|
-
const blocks = [];
|
|
210
|
-
for (const party of options.parties) {
|
|
211
|
-
blocks.push(paragraph(party.party, {
|
|
212
|
-
alignment: 'center',
|
|
213
|
-
caps: true,
|
|
214
|
-
colorHex: muted,
|
|
215
|
-
font,
|
|
216
|
-
...(options.headerBold ? { bold: true } : {}),
|
|
217
|
-
...(options.headerSizePt !== undefined ? { sizePt: options.headerSizePt } : {}),
|
|
218
|
-
}));
|
|
219
|
-
const rows = fields.map((field) => {
|
|
220
|
-
const value = field === 'printName' ? party.name : field === 'title' ? (party.title ?? '') : '';
|
|
221
|
-
// Print Name / Title resolve their fillable flag per party, falling back to
|
|
222
|
-
// the block-level `fillable`; Signature / Date are never fillable. This lets
|
|
223
|
-
// a filled assignment stay un-highlighted while an unfilled placeholder is.
|
|
224
|
-
const fieldFillable = field === 'printName'
|
|
225
|
-
? (party.nameFillable ?? options.fillable)
|
|
226
|
-
: field === 'title'
|
|
227
|
-
? (party.titleFillable ?? options.fillable)
|
|
228
|
-
: false;
|
|
229
|
-
const fillableValue = fieldFillable === true && value !== '';
|
|
230
|
-
return {
|
|
231
|
-
heightTwips: rowHeight,
|
|
232
|
-
heightRule: 'atLeast',
|
|
233
|
-
cells: [
|
|
234
|
-
{
|
|
235
|
-
vAlign: 'bottom',
|
|
236
|
-
borders: noBorders,
|
|
237
|
-
blocks: [paragraph(captionFor(field, party), { bold: true, font })],
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
vAlign: 'bottom',
|
|
241
|
-
borders: { bottom: lineBorder },
|
|
242
|
-
blocks: [
|
|
243
|
-
paragraph(value, {
|
|
244
|
-
font,
|
|
245
|
-
...(fillableValue ? { bold: true, highlight: fillHighlight } : {}),
|
|
246
|
-
}),
|
|
247
|
-
],
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
};
|
|
251
|
-
});
|
|
252
|
-
blocks.push({
|
|
253
|
-
kind: 'table',
|
|
254
|
-
layout: 'fixed',
|
|
255
|
-
columnWidthsTwips: [labelWidth, lineWidth],
|
|
256
|
-
borders: noBorders,
|
|
257
|
-
rows,
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
return blocks;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Two-column signing grid: parties chunked into pairs across a 3-column table
|
|
264
|
-
* `[signer, gutter, signer]`, with an empty padding cell for an odd final
|
|
265
|
-
* signer. Each signer cell stacks a centered uppercase muted header over a
|
|
266
|
-
* nested one-column table of four ruled fields (Signature / Print Name / Title
|
|
267
|
-
* / Date), reusing the bottom-bordered-cell rule from the single-column path.
|
|
268
|
-
*/
|
|
269
|
-
function twoColumnSignatureGrid(options) {
|
|
270
|
-
const total = options.totalWidthTwips ?? 9360;
|
|
271
|
-
const gutter = options.gutterTwips ?? 360;
|
|
272
|
-
const signer = Math.max(1, Math.floor((total - gutter) / 2));
|
|
273
|
-
const mutedColor = options.headerColorHex ?? DEFAULT_SUBROW_COLOR_HEX;
|
|
274
|
-
const labels = options.ruledLineLabels ?? ['Signature', 'Print Name', 'Title', 'Date'];
|
|
275
|
-
const gutterCell = {
|
|
276
|
-
borders: { top: NONE, bottom: NONE, left: NONE, right: NONE },
|
|
277
|
-
blocks: [paragraph('')],
|
|
278
|
-
};
|
|
279
|
-
const paddingCell = {
|
|
280
|
-
borders: { top: NONE, bottom: NONE, left: NONE, right: NONE },
|
|
281
|
-
blocks: [paragraph('')],
|
|
282
|
-
};
|
|
283
|
-
const rows = [];
|
|
284
|
-
for (let i = 0; i < options.parties.length; i += 2) {
|
|
285
|
-
const left = options.parties[i];
|
|
286
|
-
if (left === undefined)
|
|
287
|
-
continue;
|
|
288
|
-
const right = options.parties[i + 1];
|
|
289
|
-
rows.push({
|
|
290
|
-
cells: [
|
|
291
|
-
signerCell(left, labels, mutedColor),
|
|
292
|
-
gutterCell,
|
|
293
|
-
right === undefined ? paddingCell : signerCell(right, labels, mutedColor),
|
|
294
|
-
],
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
return {
|
|
298
|
-
kind: 'table',
|
|
299
|
-
layout: 'fixed',
|
|
300
|
-
columnWidthsTwips: [signer, gutter, signer],
|
|
301
|
-
borders: { top: NONE, bottom: NONE, left: NONE, right: NONE, insideH: NONE, insideV: NONE },
|
|
302
|
-
rows,
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
function signerCell(party, labels, mutedColor) {
|
|
306
|
-
// Pre-fill Print Name / Title from the party data; Signature / Date stay blank.
|
|
307
|
-
const fields = [
|
|
308
|
-
['', labels[0]],
|
|
309
|
-
[party.name, labels[1]],
|
|
310
|
-
[party.title ?? '', labels[2]],
|
|
311
|
-
['', party.dateLabel ?? labels[3]],
|
|
312
|
-
];
|
|
313
|
-
return {
|
|
314
|
-
vAlign: 'top',
|
|
315
|
-
blocks: [
|
|
316
|
-
paragraph(party.party, { alignment: 'center', caps: true, colorHex: mutedColor }),
|
|
317
|
-
{
|
|
318
|
-
kind: 'table',
|
|
319
|
-
layout: 'fixed',
|
|
320
|
-
columnWidthsTwips: [4320],
|
|
321
|
-
borders: { top: NONE, bottom: NONE, left: NONE, right: NONE, insideH: NONE, insideV: NONE },
|
|
322
|
-
rows: fields.flatMap(([value, caption]) => ruledFieldRows(value, caption, mutedColor)),
|
|
323
|
-
},
|
|
324
|
-
],
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
/** A ruled field = the bottom-bordered value line, then its muted caption beneath. */
|
|
328
|
-
function ruledFieldRows(value, caption, mutedColor) {
|
|
329
|
-
return [
|
|
330
|
-
{ cells: [{ borders: { bottom: SINGLE }, blocks: [paragraph(value)] }] },
|
|
331
|
-
{ cells: [{ blocks: [paragraph(caption, { colorHex: mutedColor })] }] },
|
|
332
|
-
];
|
|
333
|
-
}
|
|
334
|
-
function rowRhythmProps(options) {
|
|
335
|
-
return options.rowHeightTwips === undefined ? {} : { heightTwips: options.rowHeightTwips, heightRule: 'atLeast' };
|
|
336
|
-
}
|
|
337
|
-
/** The effective uniform left margin (non-uniform margins win over uniform padding). */
|
|
338
|
-
function uniformLeft(options) {
|
|
339
|
-
if (options.cellMarginsTwips !== undefined)
|
|
340
|
-
return options.cellMarginsTwips.left ?? 0;
|
|
341
|
-
return options.cellPaddingTwips ?? 0;
|
|
342
|
-
}
|
|
343
|
-
function cellMarginProps(options, overrides) {
|
|
344
|
-
const base = options.cellMarginsTwips
|
|
345
|
-
? { ...options.cellMarginsTwips }
|
|
346
|
-
: options.cellPaddingTwips !== undefined
|
|
347
|
-
? {
|
|
348
|
-
top: options.cellPaddingTwips,
|
|
349
|
-
right: options.cellPaddingTwips,
|
|
350
|
-
bottom: options.cellPaddingTwips,
|
|
351
|
-
left: options.cellPaddingTwips,
|
|
352
|
-
}
|
|
353
|
-
: undefined;
|
|
354
|
-
if (base === undefined && overrides === undefined)
|
|
355
|
-
return {};
|
|
356
|
-
return { marginsTwips: { ...(base ?? {}), ...(overrides ?? {}) } };
|
|
357
|
-
}
|
|
358
|
-
//# sourceMappingURL=recipes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.js","sourceRoot":"","sources":["../../src/generation/recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,MAAM,GAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAC/C,MAAM,IAAI,GAAe,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3C,MAAM,wBAAwB,GAAG,QAAQ,CAAC;AAC1C,MAAM,iCAAiC,GAAG,GAAG,CAAC;AAC9C,MAAM,0BAA0B,GAAmB,QAAQ,CAAC;AAwD5D;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,OAA0B;IACxD,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,iBAAiB,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3E,gFAAgF;IAChF,kFAAkF;IAClF,MAAM,IAAI,GAAe;QACvB,KAAK,EAAE,QAAQ;QACf,GAAG,CAAC,OAAO,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,CAA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AM,IAAI,GAA4B,OAAO,CAAC,gBAAgB;QAC5D,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE;QACjC,CAAC,CAAC,OAAO,CAAC,gBAAgB,KAAK,SAAS;YACtC,CAAC,CAAC;gBACE,GAAG,EAAE,OAAO,CAAC,gBAAgB;gBAC7B,KAAK,EAAE,OAAO,CAAC,gBAAgB;gBAC/B,MAAM,EAAE,OAAO,CAAC,gBAAgB;gBAChC,IAAI,EAAE,OAAO,CAAC,gBAAgB;aAC/B;YACH,CAAC,CAAC,SAAS,CAAC;IAChB,IAAI,IAAI,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAC7D,OAAO,EAAE,YAAY,EAAE,EAAE,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;AACrE,CAAC"}
|
package/dist/move-detection.d.ts
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Move Detection Module
|
|
3
|
-
*
|
|
4
|
-
* Detects relocated content after LCS comparison by matching deleted blocks
|
|
5
|
-
* with inserted blocks using Jaccard word similarity.
|
|
6
|
-
*
|
|
7
|
-
* Pipeline position:
|
|
8
|
-
* LCS() → MarkRowsAsDeletedOrInserted() → FlattenToAtomList() → detectMovesInAtomList() → CoalesceRecurse()
|
|
9
|
-
*
|
|
10
|
-
* @see WmlComparer.cs DetectMovesInAtomList() line 3811
|
|
11
|
-
*/
|
|
12
|
-
import { AtomBlock, ComparisonUnitAtom, CorrelationStatus, MoveDetectionSettings } from './core-types.js';
|
|
13
|
-
/**
|
|
14
|
-
* Extract text content from an atom.
|
|
15
|
-
*
|
|
16
|
-
* @param atom - The atom to extract text from
|
|
17
|
-
* @returns The text content, or empty string for non-text atoms
|
|
18
|
-
*/
|
|
19
|
-
export declare function getAtomText(atom: ComparisonUnitAtom): string;
|
|
20
|
-
/**
|
|
21
|
-
* Extract text from a sequence of atoms.
|
|
22
|
-
*
|
|
23
|
-
* @param atoms - The atoms to extract text from
|
|
24
|
-
* @returns Combined text content
|
|
25
|
-
*/
|
|
26
|
-
export declare function getAtomsText(atoms: ComparisonUnitAtom[]): string;
|
|
27
|
-
/**
|
|
28
|
-
* Count words in text.
|
|
29
|
-
*
|
|
30
|
-
* @param text - The text to count words in
|
|
31
|
-
* @returns Number of words
|
|
32
|
-
*/
|
|
33
|
-
export declare function countWords(text: string): number;
|
|
34
|
-
/**
|
|
35
|
-
* Calculate Jaccard similarity between two texts based on word sets.
|
|
36
|
-
*
|
|
37
|
-
* Jaccard index = |intersection| / |union|
|
|
38
|
-
*
|
|
39
|
-
* Benefits:
|
|
40
|
-
* - Order-independent: "fox quick brown" matches "brown quick fox"
|
|
41
|
-
* - Handles insertions/deletions well: adding one word to a 10-word block only slightly reduces similarity
|
|
42
|
-
* - O(n) complexity where n = total words
|
|
43
|
-
*
|
|
44
|
-
* @param text1 - First text
|
|
45
|
-
* @param text2 - Second text
|
|
46
|
-
* @param caseInsensitive - Whether to ignore case (default: true)
|
|
47
|
-
* @returns Similarity score between 0 and 1
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* jaccardWordSimilarity("The quick brown fox", "The quick brown dog")
|
|
51
|
-
* // Returns 0.6 (3 common words / 5 total unique words)
|
|
52
|
-
*/
|
|
53
|
-
export declare function jaccardWordSimilarity(text1: string, text2: string, caseInsensitive?: boolean): number;
|
|
54
|
-
/**
|
|
55
|
-
* Group consecutive atoms by correlation status.
|
|
56
|
-
*
|
|
57
|
-
* Creates blocks of atoms with the same status (Deleted or Inserted).
|
|
58
|
-
*
|
|
59
|
-
* @param atoms - The atoms to group
|
|
60
|
-
* @returns Array of atom blocks
|
|
61
|
-
*/
|
|
62
|
-
export declare function groupIntoBlocks(atoms: ComparisonUnitAtom[]): AtomBlock[];
|
|
63
|
-
/**
|
|
64
|
-
* Result of finding the best match for a deleted block.
|
|
65
|
-
*/
|
|
66
|
-
interface MatchResult {
|
|
67
|
-
/** The matching inserted block */
|
|
68
|
-
block: AtomBlock;
|
|
69
|
-
/** Similarity score between 0 and 1 */
|
|
70
|
-
similarity: number;
|
|
71
|
-
/** Index in the insertedBlocks array */
|
|
72
|
-
index: number;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Find the best matching inserted block for a deleted block.
|
|
76
|
-
*
|
|
77
|
-
* @param deleted - The deleted block to match
|
|
78
|
-
* @param insertedBlocks - Available inserted blocks
|
|
79
|
-
* @param settings - Move detection settings
|
|
80
|
-
* @returns The best match, or undefined if no match meets threshold
|
|
81
|
-
*/
|
|
82
|
-
export declare function findBestMatch(deleted: AtomBlock, insertedBlocks: AtomBlock[], settings: MoveDetectionSettings): MatchResult | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* Mark atoms as part of a move operation.
|
|
85
|
-
*
|
|
86
|
-
* @param atoms - Atoms to mark
|
|
87
|
-
* @param status - New correlation status (MovedSource or MovedDestination)
|
|
88
|
-
* @param moveGroupId - ID linking source and destination
|
|
89
|
-
* @param moveName - Name for move tracking (e.g., "move1")
|
|
90
|
-
*/
|
|
91
|
-
export declare function markAsMove(atoms: ComparisonUnitAtom[], status: CorrelationStatus.MovedSource | CorrelationStatus.MovedDestination, moveGroupId: number, moveName: string): void;
|
|
92
|
-
/**
|
|
93
|
-
* Detect moves in a flat list of atoms.
|
|
94
|
-
*
|
|
95
|
-
* Runs after LCS comparison to identify deleted blocks that were actually
|
|
96
|
-
* moved to a new location. Updates atoms in place with move status.
|
|
97
|
-
*
|
|
98
|
-
* @param atoms - The atom list to process (modified in place)
|
|
99
|
-
* @param settings - Move detection settings (optional, uses defaults)
|
|
100
|
-
*
|
|
101
|
-
* @see WmlComparer.cs DetectMovesInAtomList() line 3811
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* const atoms = atomizeTree(document, [], part);
|
|
105
|
-
* runLCSComparison(atoms);
|
|
106
|
-
* detectMovesInAtomList(atoms); // Updates atoms in place
|
|
107
|
-
*/
|
|
108
|
-
export declare function detectMovesInAtomList(atoms: ComparisonUnitAtom[], settings?: MoveDetectionSettings): void;
|
|
109
|
-
/**
|
|
110
|
-
* Options for generating move markup.
|
|
111
|
-
*/
|
|
112
|
-
export interface MoveMarkupOptions {
|
|
113
|
-
/** Author name for revision tracking */
|
|
114
|
-
author: string;
|
|
115
|
-
/** Timestamp for revisions */
|
|
116
|
-
dateTime: Date;
|
|
117
|
-
/** Starting ID for range markers */
|
|
118
|
-
startId: number;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Generated move markup for a block.
|
|
122
|
-
*/
|
|
123
|
-
export interface MoveMarkup {
|
|
124
|
-
/** Range start element */
|
|
125
|
-
rangeStart: Element;
|
|
126
|
-
/** Move content wrapper element */
|
|
127
|
-
moveWrapper: Element;
|
|
128
|
-
/** Range end element */
|
|
129
|
-
rangeEnd: Element;
|
|
130
|
-
/** Next available ID after these elements */
|
|
131
|
-
nextId: number;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Generate move source markup (w:moveFrom with range markers).
|
|
135
|
-
*
|
|
136
|
-
* @param moveName - Name linking source and destination (e.g., "move1")
|
|
137
|
-
* @param content - Child elements to wrap
|
|
138
|
-
* @param options - Markup generation options
|
|
139
|
-
* @returns Move markup elements
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* Output structure:
|
|
143
|
-
* <w:moveFromRangeStart w:id="1" w:name="move1" w:author="..." w:date="..."/>
|
|
144
|
-
* <w:moveFrom w:id="2" w:author="..." w:date="...">
|
|
145
|
-
* <!-- content -->
|
|
146
|
-
* </w:moveFrom>
|
|
147
|
-
* <w:moveFromRangeEnd w:id="1"/>
|
|
148
|
-
*/
|
|
149
|
-
export declare function generateMoveSourceMarkup(moveName: string, content: Element[], options: MoveMarkupOptions): MoveMarkup;
|
|
150
|
-
/**
|
|
151
|
-
* Generate move destination markup (w:moveTo with range markers).
|
|
152
|
-
*
|
|
153
|
-
* @param moveName - Name linking source and destination (e.g., "move1")
|
|
154
|
-
* @param content - Child elements to wrap
|
|
155
|
-
* @param options - Markup generation options
|
|
156
|
-
* @returns Move markup elements
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* Output structure:
|
|
160
|
-
* <w:moveToRangeStart w:id="3" w:name="move1" w:author="..." w:date="..."/>
|
|
161
|
-
* <w:moveTo w:id="4" w:author="..." w:date="...">
|
|
162
|
-
* <!-- content -->
|
|
163
|
-
* </w:moveTo>
|
|
164
|
-
* <w:moveToRangeEnd w:id="3"/>
|
|
165
|
-
*/
|
|
166
|
-
export declare function generateMoveDestinationMarkup(moveName: string, content: Element[], options: MoveMarkupOptions): MoveMarkup;
|
|
167
|
-
/**
|
|
168
|
-
* State for tracking revision IDs during markup generation.
|
|
169
|
-
*/
|
|
170
|
-
export interface RevisionIdState {
|
|
171
|
-
/** Next available ID */
|
|
172
|
-
nextId: number;
|
|
173
|
-
/** Move name to range start ID mapping */
|
|
174
|
-
moveRangeIds: Map<string, {
|
|
175
|
-
sourceRangeId: number;
|
|
176
|
-
destRangeId: number;
|
|
177
|
-
}>;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Create initial revision ID state.
|
|
181
|
-
*
|
|
182
|
-
* @param startId - Starting ID (default: 1)
|
|
183
|
-
* @returns Initial state
|
|
184
|
-
*/
|
|
185
|
-
export declare function createRevisionIdState(startId?: number): RevisionIdState;
|
|
186
|
-
/**
|
|
187
|
-
* Allocate IDs for a move operation.
|
|
188
|
-
*
|
|
189
|
-
* Ensures source and destination use consistent IDs for proper linking.
|
|
190
|
-
*
|
|
191
|
-
* @param state - Revision ID state (modified in place)
|
|
192
|
-
* @param moveName - Move name (e.g., "move1")
|
|
193
|
-
* @returns IDs for source and destination markup
|
|
194
|
-
*/
|
|
195
|
-
export declare function allocateMoveIds(state: RevisionIdState, moveName: string): {
|
|
196
|
-
sourceRangeId: number;
|
|
197
|
-
sourceMoveId: number;
|
|
198
|
-
destRangeId: number;
|
|
199
|
-
destMoveId: number;
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* Fix up revision IDs after all moves have been processed.
|
|
203
|
-
*
|
|
204
|
-
* Ensures proper ID pairing between source and destination elements.
|
|
205
|
-
* This is a post-processing step after markup generation.
|
|
206
|
-
*
|
|
207
|
-
* @param state - The revision ID state
|
|
208
|
-
*/
|
|
209
|
-
export declare function fixUpRevisionIds(_state: RevisionIdState): void;
|
|
210
|
-
export {};
|
|
211
|
-
//# sourceMappingURL=move-detection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"move-detection.d.ts","sourceRoot":"","sources":["../src/move-detection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EAEjB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAQzB;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAmB5D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/C;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,eAAe,UAAO,GACrB,MAAM,CAoCR;AAMD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,SAAS,EAAE,CA6CxE;AAMD;;GAEG;AACH,UAAU,WAAW;IACnB,kCAAkC;IAClC,KAAK,EAAE,SAAS,CAAC;IACjB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,KAAK,EAA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