@productcloudos/editor 1.0.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/CHANGELOG.md +95 -0
- package/LICENSE +21 -0
- package/README.md +377 -0
- package/dist/pc-editor.esm.js +24820 -0
- package/dist/pc-editor.esm.js.map +1 -0
- package/dist/pc-editor.js +24877 -0
- package/dist/pc-editor.js.map +1 -0
- package/dist/pc-editor.min.js +2 -0
- package/dist/pc-editor.min.js.map +1 -0
- package/dist/types/lib/clipboard/ClipboardManager.d.ts +77 -0
- package/dist/types/lib/clipboard/ClipboardManager.d.ts.map +1 -0
- package/dist/types/lib/clipboard/HtmlConverter.d.ts +43 -0
- package/dist/types/lib/clipboard/HtmlConverter.d.ts.map +1 -0
- package/dist/types/lib/clipboard/index.d.ts +9 -0
- package/dist/types/lib/clipboard/index.d.ts.map +1 -0
- package/dist/types/lib/clipboard/types.d.ts +76 -0
- package/dist/types/lib/clipboard/types.d.ts.map +1 -0
- package/dist/types/lib/controls/BaseControl.d.ts +72 -0
- package/dist/types/lib/controls/BaseControl.d.ts.map +1 -0
- package/dist/types/lib/controls/index.d.ts +11 -0
- package/dist/types/lib/controls/index.d.ts.map +1 -0
- package/dist/types/lib/controls/rulers/HorizontalRuler.d.ts +55 -0
- package/dist/types/lib/controls/rulers/HorizontalRuler.d.ts.map +1 -0
- package/dist/types/lib/controls/rulers/RulerControl.d.ts +98 -0
- package/dist/types/lib/controls/rulers/RulerControl.d.ts.map +1 -0
- package/dist/types/lib/controls/rulers/VerticalRuler.d.ts +65 -0
- package/dist/types/lib/controls/rulers/VerticalRuler.d.ts.map +1 -0
- package/dist/types/lib/controls/rulers/index.d.ts +8 -0
- package/dist/types/lib/controls/rulers/index.d.ts.map +1 -0
- package/dist/types/lib/controls/rulers/types.d.ts +62 -0
- package/dist/types/lib/controls/rulers/types.d.ts.map +1 -0
- package/dist/types/lib/controls/types.d.ts +51 -0
- package/dist/types/lib/controls/types.d.ts.map +1 -0
- package/dist/types/lib/core/Document.d.ts +34 -0
- package/dist/types/lib/core/Document.d.ts.map +1 -0
- package/dist/types/lib/core/PCEditor.d.ts +761 -0
- package/dist/types/lib/core/PCEditor.d.ts.map +1 -0
- package/dist/types/lib/core/Page.d.ts +40 -0
- package/dist/types/lib/core/Page.d.ts.map +1 -0
- package/dist/types/lib/data/DataBinder.d.ts +11 -0
- package/dist/types/lib/data/DataBinder.d.ts.map +1 -0
- package/dist/types/lib/events/EventEmitter.d.ts +11 -0
- package/dist/types/lib/events/EventEmitter.d.ts.map +1 -0
- package/dist/types/lib/hit-test/HitTestManager.d.ts +81 -0
- package/dist/types/lib/hit-test/HitTestManager.d.ts.map +1 -0
- package/dist/types/lib/hit-test/index.d.ts +32 -0
- package/dist/types/lib/hit-test/index.d.ts.map +1 -0
- package/dist/types/lib/hit-test/types.d.ts +113 -0
- package/dist/types/lib/hit-test/types.d.ts.map +1 -0
- package/dist/types/lib/import/ContentAnalyzer.d.ts +76 -0
- package/dist/types/lib/import/ContentAnalyzer.d.ts.map +1 -0
- package/dist/types/lib/import/DocumentBuilder.d.ts +44 -0
- package/dist/types/lib/import/DocumentBuilder.d.ts.map +1 -0
- package/dist/types/lib/import/PDFImporter.d.ts +65 -0
- package/dist/types/lib/import/PDFImporter.d.ts.map +1 -0
- package/dist/types/lib/import/PDFParser.d.ts +46 -0
- package/dist/types/lib/import/PDFParser.d.ts.map +1 -0
- package/dist/types/lib/import/index.d.ts +9 -0
- package/dist/types/lib/import/index.d.ts.map +1 -0
- package/dist/types/lib/import/types.d.ts +182 -0
- package/dist/types/lib/import/types.d.ts.map +1 -0
- package/dist/types/lib/index.d.ts +16 -0
- package/dist/types/lib/index.d.ts.map +1 -0
- package/dist/types/lib/layout/FlowManager.d.ts +29 -0
- package/dist/types/lib/layout/FlowManager.d.ts.map +1 -0
- package/dist/types/lib/layout/LayoutEngine.d.ts +39 -0
- package/dist/types/lib/layout/LayoutEngine.d.ts.map +1 -0
- package/dist/types/lib/objects/BaseEmbeddedObject.d.ts +133 -0
- package/dist/types/lib/objects/BaseEmbeddedObject.d.ts.map +1 -0
- package/dist/types/lib/objects/EmbeddedObjectFactory.d.ts +57 -0
- package/dist/types/lib/objects/EmbeddedObjectFactory.d.ts.map +1 -0
- package/dist/types/lib/objects/ImageObject.d.ts +60 -0
- package/dist/types/lib/objects/ImageObject.d.ts.map +1 -0
- package/dist/types/lib/objects/TextBoxObject.d.ts +208 -0
- package/dist/types/lib/objects/TextBoxObject.d.ts.map +1 -0
- package/dist/types/lib/objects/index.d.ts +9 -0
- package/dist/types/lib/objects/index.d.ts.map +1 -0
- package/dist/types/lib/objects/table/TableCell.d.ts +165 -0
- package/dist/types/lib/objects/table/TableCell.d.ts.map +1 -0
- package/dist/types/lib/objects/table/TableCellMerger.d.ts +66 -0
- package/dist/types/lib/objects/table/TableCellMerger.d.ts.map +1 -0
- package/dist/types/lib/objects/table/TableObject.d.ts +434 -0
- package/dist/types/lib/objects/table/TableObject.d.ts.map +1 -0
- package/dist/types/lib/objects/table/TableResizeHandler.d.ts +80 -0
- package/dist/types/lib/objects/table/TableResizeHandler.d.ts.map +1 -0
- package/dist/types/lib/objects/table/TableRow.d.ts +65 -0
- package/dist/types/lib/objects/table/TableRow.d.ts.map +1 -0
- package/dist/types/lib/objects/table/index.d.ts +12 -0
- package/dist/types/lib/objects/table/index.d.ts.map +1 -0
- package/dist/types/lib/objects/table/types.d.ts +239 -0
- package/dist/types/lib/objects/table/types.d.ts.map +1 -0
- package/dist/types/lib/objects/types.d.ts +135 -0
- package/dist/types/lib/objects/types.d.ts.map +1 -0
- package/dist/types/lib/rendering/CanvasManager.d.ts +282 -0
- package/dist/types/lib/rendering/CanvasManager.d.ts.map +1 -0
- package/dist/types/lib/rendering/FlowingTextRenderer.d.ts +348 -0
- package/dist/types/lib/rendering/FlowingTextRenderer.d.ts.map +1 -0
- package/dist/types/lib/rendering/PDFGenerator.d.ts +103 -0
- package/dist/types/lib/rendering/PDFGenerator.d.ts.map +1 -0
- package/dist/types/lib/rendering/pdf-utils.d.ts +54 -0
- package/dist/types/lib/rendering/pdf-utils.d.ts.map +1 -0
- package/dist/types/lib/text/EditableTextRegion.d.ts +105 -0
- package/dist/types/lib/text/EditableTextRegion.d.ts.map +1 -0
- package/dist/types/lib/text/EmbeddedObjectManager.d.ts +97 -0
- package/dist/types/lib/text/EmbeddedObjectManager.d.ts.map +1 -0
- package/dist/types/lib/text/FieldFormatter.d.ts +26 -0
- package/dist/types/lib/text/FieldFormatter.d.ts.map +1 -0
- package/dist/types/lib/text/FlowingTextContent.d.ts +571 -0
- package/dist/types/lib/text/FlowingTextContent.d.ts.map +1 -0
- package/dist/types/lib/text/HyperlinkManager.d.ts +110 -0
- package/dist/types/lib/text/HyperlinkManager.d.ts.map +1 -0
- package/dist/types/lib/text/MarkdownParser.d.ts +55 -0
- package/dist/types/lib/text/MarkdownParser.d.ts.map +1 -0
- package/dist/types/lib/text/ParagraphFormatting.d.ts +123 -0
- package/dist/types/lib/text/ParagraphFormatting.d.ts.map +1 -0
- package/dist/types/lib/text/RegionManager.d.ts +75 -0
- package/dist/types/lib/text/RegionManager.d.ts.map +1 -0
- package/dist/types/lib/text/RepeatingSectionManager.d.ts +99 -0
- package/dist/types/lib/text/RepeatingSectionManager.d.ts.map +1 -0
- package/dist/types/lib/text/SubstitutionFieldManager.d.ts +153 -0
- package/dist/types/lib/text/SubstitutionFieldManager.d.ts.map +1 -0
- package/dist/types/lib/text/TextFormatting.d.ts +85 -0
- package/dist/types/lib/text/TextFormatting.d.ts.map +1 -0
- package/dist/types/lib/text/TextLayout.d.ts +126 -0
- package/dist/types/lib/text/TextLayout.d.ts.map +1 -0
- package/dist/types/lib/text/TextMeasurer.d.ts +107 -0
- package/dist/types/lib/text/TextMeasurer.d.ts.map +1 -0
- package/dist/types/lib/text/TextPositionCalculator.d.ts +72 -0
- package/dist/types/lib/text/TextPositionCalculator.d.ts.map +1 -0
- package/dist/types/lib/text/TextState.d.ts +236 -0
- package/dist/types/lib/text/TextState.d.ts.map +1 -0
- package/dist/types/lib/text/index.d.ts +27 -0
- package/dist/types/lib/text/index.d.ts.map +1 -0
- package/dist/types/lib/text/regions/BodyTextRegion.d.ts +68 -0
- package/dist/types/lib/text/regions/BodyTextRegion.d.ts.map +1 -0
- package/dist/types/lib/text/regions/FooterTextRegion.d.ts +68 -0
- package/dist/types/lib/text/regions/FooterTextRegion.d.ts.map +1 -0
- package/dist/types/lib/text/regions/HeaderTextRegion.d.ts +68 -0
- package/dist/types/lib/text/regions/HeaderTextRegion.d.ts.map +1 -0
- package/dist/types/lib/text/regions/index.d.ts +7 -0
- package/dist/types/lib/text/regions/index.d.ts.map +1 -0
- package/dist/types/lib/text/types.d.ts +268 -0
- package/dist/types/lib/text/types.d.ts.map +1 -0
- package/dist/types/lib/types/index.d.ts +206 -0
- package/dist/types/lib/types/index.d.ts.map +1 -0
- package/dist/types/lib/undo/index.d.ts +8 -0
- package/dist/types/lib/undo/index.d.ts.map +1 -0
- package/dist/types/lib/undo/transaction/ContentDiscovery.d.ts +101 -0
- package/dist/types/lib/undo/transaction/ContentDiscovery.d.ts.map +1 -0
- package/dist/types/lib/undo/transaction/FocusTracker.d.ts +49 -0
- package/dist/types/lib/undo/transaction/FocusTracker.d.ts.map +1 -0
- package/dist/types/lib/undo/transaction/MutationUndo.d.ts +57 -0
- package/dist/types/lib/undo/transaction/MutationUndo.d.ts.map +1 -0
- package/dist/types/lib/undo/transaction/ObjectMutationObserver.d.ts +79 -0
- package/dist/types/lib/undo/transaction/ObjectMutationObserver.d.ts.map +1 -0
- package/dist/types/lib/undo/transaction/TextMutationObserver.d.ts +60 -0
- package/dist/types/lib/undo/transaction/TextMutationObserver.d.ts.map +1 -0
- package/dist/types/lib/undo/transaction/TransactionManager.d.ts +148 -0
- package/dist/types/lib/undo/transaction/TransactionManager.d.ts.map +1 -0
- package/dist/types/lib/undo/transaction/index.d.ts +17 -0
- package/dist/types/lib/undo/transaction/index.d.ts.map +1 -0
- package/dist/types/lib/undo/transaction/types.d.ts +269 -0
- package/dist/types/lib/undo/transaction/types.d.ts.map +1 -0
- package/dist/types/lib/utils/blob-utils.d.ts +2 -0
- package/dist/types/lib/utils/blob-utils.d.ts.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/text/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,OAAO,EACP,iBAAiB,EACjB,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,2BAA2B,EAC3B,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG3H,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/E,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAGhG,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG5F,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3G,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Rect } from '../../types';
|
|
2
|
+
import { FlowedLine, FlowedPage } from '../types';
|
|
3
|
+
import { FlowingTextContent } from '../FlowingTextContent';
|
|
4
|
+
import { BaseTextRegion, RegionType } from '../EditableTextRegion';
|
|
5
|
+
/**
|
|
6
|
+
* Callback to get a page by index for bounds calculation.
|
|
7
|
+
*/
|
|
8
|
+
export type PageBoundsProvider = (pageIndex: number) => {
|
|
9
|
+
getContentBounds(): {
|
|
10
|
+
position: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* Body text region - handles the main document content.
|
|
22
|
+
* Body text can span multiple pages.
|
|
23
|
+
*/
|
|
24
|
+
export declare class BodyTextRegion extends BaseTextRegion {
|
|
25
|
+
readonly id = "body";
|
|
26
|
+
readonly type: RegionType;
|
|
27
|
+
private _flowingContent;
|
|
28
|
+
private _getPage;
|
|
29
|
+
private _flowedPages;
|
|
30
|
+
private _availableWidth;
|
|
31
|
+
/**
|
|
32
|
+
* Create a body text region.
|
|
33
|
+
* @param flowingContent The FlowingTextContent for body text (from first page)
|
|
34
|
+
* @param getPage Callback to get page bounds by index
|
|
35
|
+
*/
|
|
36
|
+
constructor(flowingContent: FlowingTextContent, getPage: PageBoundsProvider);
|
|
37
|
+
get flowingContent(): FlowingTextContent;
|
|
38
|
+
/**
|
|
39
|
+
* Get the bounds of the body content area on a specific page.
|
|
40
|
+
*/
|
|
41
|
+
getRegionBounds(pageIndex: number): Rect | null;
|
|
42
|
+
/**
|
|
43
|
+
* Get flowed lines for a specific page.
|
|
44
|
+
*/
|
|
45
|
+
getFlowedLines(pageIndex: number): FlowedLine[];
|
|
46
|
+
/**
|
|
47
|
+
* Get all flowed pages.
|
|
48
|
+
*/
|
|
49
|
+
getFlowedPages(): FlowedPage[];
|
|
50
|
+
/**
|
|
51
|
+
* Get the available width for text.
|
|
52
|
+
*/
|
|
53
|
+
getAvailableWidth(): number;
|
|
54
|
+
/**
|
|
55
|
+
* Body text can span multiple pages.
|
|
56
|
+
*/
|
|
57
|
+
spansMultiplePages(): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Reflow the text content.
|
|
60
|
+
*/
|
|
61
|
+
reflow(ctx: CanvasRenderingContext2D): void;
|
|
62
|
+
/**
|
|
63
|
+
* Update the flowed pages from external source.
|
|
64
|
+
* This is useful when FlowingTextRenderer has already computed the flow.
|
|
65
|
+
*/
|
|
66
|
+
setFlowedPages(pages: FlowedPage[], availableWidth: number): void;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=BodyTextRegion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BodyTextRegion.d.ts","sourceRoot":"","sources":["../../../../../src/lib/text/regions/BodyTextRegion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK;IACtD,gBAAgB,IAAI;QAAE,QAAQ,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,IAAI,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CACrG,GAAG,IAAI,CAAC;AAET;;;GAGG;AACH,qBAAa,cAAe,SAAQ,cAAc;IAChD,QAAQ,CAAC,EAAE,UAAU;IACrB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAU;IAEnC,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,eAAe,CAAa;IAEpC;;;;OAIG;gBACS,cAAc,EAAE,kBAAkB,EAAE,OAAO,EAAE,kBAAkB;IAM3E,IAAI,cAAc,IAAI,kBAAkB,CAEvC;IAED;;OAEG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAa/C;;OAEG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,EAAE;IAO/C;;OAEG;IACH,cAAc,IAAI,UAAU,EAAE;IAI9B;;OAEG;IACH,iBAAiB,IAAI,MAAM;IAI3B;;OAEG;IACH,kBAAkB,IAAI,OAAO;IAI7B;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI;IAmB3C;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI;CAIlE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Rect } from '../../types';
|
|
2
|
+
import { FlowedLine, FlowedPage } from '../types';
|
|
3
|
+
import { FlowingTextContent } from '../FlowingTextContent';
|
|
4
|
+
import { BaseTextRegion, RegionType } from '../EditableTextRegion';
|
|
5
|
+
/**
|
|
6
|
+
* Callback to get footer bounds for a page.
|
|
7
|
+
*/
|
|
8
|
+
export type FooterBoundsProvider = (pageIndex: number) => {
|
|
9
|
+
getFooterBounds(): {
|
|
10
|
+
position: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* Footer text region - handles document footer content.
|
|
22
|
+
* Footer content is shared across all pages but renders at the bottom of each page.
|
|
23
|
+
*/
|
|
24
|
+
export declare class FooterTextRegion extends BaseTextRegion {
|
|
25
|
+
readonly id = "footer";
|
|
26
|
+
readonly type: RegionType;
|
|
27
|
+
private _flowingContent;
|
|
28
|
+
private _getPage;
|
|
29
|
+
private _flowedPage;
|
|
30
|
+
private _availableWidth;
|
|
31
|
+
/**
|
|
32
|
+
* Create a footer text region.
|
|
33
|
+
* @param flowingContent The FlowingTextContent for footer text
|
|
34
|
+
* @param getPage Callback to get page footer bounds by index
|
|
35
|
+
*/
|
|
36
|
+
constructor(flowingContent: FlowingTextContent, getPage: FooterBoundsProvider);
|
|
37
|
+
get flowingContent(): FlowingTextContent;
|
|
38
|
+
/**
|
|
39
|
+
* Get the bounds of the footer area on a specific page.
|
|
40
|
+
* Footer renders at the same position on every page.
|
|
41
|
+
*/
|
|
42
|
+
getRegionBounds(pageIndex: number): Rect | null;
|
|
43
|
+
/**
|
|
44
|
+
* Get flowed lines. Footer uses the same content on all pages.
|
|
45
|
+
*/
|
|
46
|
+
getFlowedLines(_pageIndex: number): FlowedLine[];
|
|
47
|
+
/**
|
|
48
|
+
* Get all flowed pages (footer has just one "page" of content).
|
|
49
|
+
*/
|
|
50
|
+
getFlowedPages(): FlowedPage[];
|
|
51
|
+
/**
|
|
52
|
+
* Get the available width for text.
|
|
53
|
+
*/
|
|
54
|
+
getAvailableWidth(): number;
|
|
55
|
+
/**
|
|
56
|
+
* Footer does not span multiple pages (content is shared).
|
|
57
|
+
*/
|
|
58
|
+
spansMultiplePages(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Reflow the text content.
|
|
61
|
+
*/
|
|
62
|
+
reflow(ctx: CanvasRenderingContext2D): void;
|
|
63
|
+
/**
|
|
64
|
+
* Update the flowed page from external source.
|
|
65
|
+
*/
|
|
66
|
+
setFlowedPage(page: FlowedPage | null, availableWidth: number): void;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=FooterTextRegion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FooterTextRegion.d.ts","sourceRoot":"","sources":["../../../../../src/lib/text/regions/FooterTextRegion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,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
2
|
+
import { FlowedLine, FlowedPage } from '../types';
|
|
3
|
+
import { FlowingTextContent } from '../FlowingTextContent';
|
|
4
|
+
import { BaseTextRegion, RegionType } from '../EditableTextRegion';
|
|
5
|
+
/**
|
|
6
|
+
* Callback to get header bounds for a page.
|
|
7
|
+
*/
|
|
8
|
+
export type HeaderBoundsProvider = (pageIndex: number) => {
|
|
9
|
+
getHeaderBounds(): {
|
|
10
|
+
position: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* Header text region - handles document header content.
|
|
22
|
+
* Header content is shared across all pages but renders at the top of each page.
|
|
23
|
+
*/
|
|
24
|
+
export declare class HeaderTextRegion extends BaseTextRegion {
|
|
25
|
+
readonly id = "header";
|
|
26
|
+
readonly type: RegionType;
|
|
27
|
+
private _flowingContent;
|
|
28
|
+
private _getPage;
|
|
29
|
+
private _flowedPage;
|
|
30
|
+
private _availableWidth;
|
|
31
|
+
/**
|
|
32
|
+
* Create a header text region.
|
|
33
|
+
* @param flowingContent The FlowingTextContent for header text
|
|
34
|
+
* @param getPage Callback to get page header bounds by index
|
|
35
|
+
*/
|
|
36
|
+
constructor(flowingContent: FlowingTextContent, getPage: HeaderBoundsProvider);
|
|
37
|
+
get flowingContent(): FlowingTextContent;
|
|
38
|
+
/**
|
|
39
|
+
* Get the bounds of the header area on a specific page.
|
|
40
|
+
* Header renders at the same position on every page.
|
|
41
|
+
*/
|
|
42
|
+
getRegionBounds(pageIndex: number): Rect | null;
|
|
43
|
+
/**
|
|
44
|
+
* Get flowed lines. Header uses the same content on all pages.
|
|
45
|
+
*/
|
|
46
|
+
getFlowedLines(_pageIndex: number): FlowedLine[];
|
|
47
|
+
/**
|
|
48
|
+
* Get all flowed pages (header has just one "page" of content).
|
|
49
|
+
*/
|
|
50
|
+
getFlowedPages(): FlowedPage[];
|
|
51
|
+
/**
|
|
52
|
+
* Get the available width for text.
|
|
53
|
+
*/
|
|
54
|
+
getAvailableWidth(): number;
|
|
55
|
+
/**
|
|
56
|
+
* Header does not span multiple pages (content is shared).
|
|
57
|
+
*/
|
|
58
|
+
spansMultiplePages(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Reflow the text content.
|
|
61
|
+
*/
|
|
62
|
+
reflow(ctx: CanvasRenderingContext2D): void;
|
|
63
|
+
/**
|
|
64
|
+
* Update the flowed page from external source.
|
|
65
|
+
*/
|
|
66
|
+
setFlowedPage(page: FlowedPage | null, availableWidth: number): void;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=HeaderTextRegion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderTextRegion.d.ts","sourceRoot":"","sources":["../../../../../src/lib/text/regions/HeaderTextRegion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK;IACxD,eAAe,IAAI;QAAE,QAAQ,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,IAAI,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CACpG,GAAG,IAAI,CAAC;AAET;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;IAClD,QAAQ,CAAC,EAAE,YAAY;IACvB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAY;IAErC,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,WAAW,CAA2B;IAC9C,OAAO,CAAC,eAAe,CAAa;IAEpC;;;;OAIG;gBACS,cAAc,EAAE,kBAAkB,EAAE,OAAO,EAAE,oBAAoB;IAM7E,IAAI,cAAc,IAAI,kBAAkB,CAEvC;IAED;;;OAGG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAa/C;;OAEG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,EAAE;IAIhD;;OAEG;IACH,cAAc,IAAI,UAAU,EAAE;IAI9B;;OAEG;IACH,iBAAiB,IAAI,MAAM;IAI3B;;OAEG;IACH,kBAAkB,IAAI,OAAO;IAI7B;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI;IAc3C;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI;CAIrE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { BodyTextRegion } from './BodyTextRegion';
|
|
2
|
+
export type { PageBoundsProvider } from './BodyTextRegion';
|
|
3
|
+
export { HeaderTextRegion } from './HeaderTextRegion';
|
|
4
|
+
export type { HeaderBoundsProvider } from './HeaderTextRegion';
|
|
5
|
+
export { FooterTextRegion } from './FooterTextRegion';
|
|
6
|
+
export type { FooterBoundsProvider } from './FooterTextRegion';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/text/regions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { BaseEmbeddedObject, ObjectPosition } from '../objects';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for controls that can receive keyboard focus.
|
|
4
|
+
* Only one Focusable can be active at a time in the editor.
|
|
5
|
+
*/
|
|
6
|
+
export interface Focusable {
|
|
7
|
+
/**
|
|
8
|
+
* Called when this control receives focus.
|
|
9
|
+
* Should start cursor blinking and prepare for keyboard input.
|
|
10
|
+
*/
|
|
11
|
+
focus(): void;
|
|
12
|
+
/**
|
|
13
|
+
* Called when this control loses focus.
|
|
14
|
+
* Should stop cursor blinking and hide cursor.
|
|
15
|
+
*/
|
|
16
|
+
blur(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Returns whether this control currently has focus.
|
|
19
|
+
*/
|
|
20
|
+
hasFocus(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Handle a keyboard event.
|
|
23
|
+
* @returns true if the event was handled, false otherwise
|
|
24
|
+
*/
|
|
25
|
+
handleKeyDown(e: KeyboardEvent): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Subscribe to cursor blink events (for re-rendering).
|
|
28
|
+
*/
|
|
29
|
+
onCursorBlink(handler: () => void): void;
|
|
30
|
+
/**
|
|
31
|
+
* Unsubscribe from cursor blink events.
|
|
32
|
+
*/
|
|
33
|
+
offCursorBlink(handler: () => void): void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Alignment options for paragraphs.
|
|
37
|
+
*/
|
|
38
|
+
export type TextAlignment = 'left' | 'center' | 'right' | 'justify';
|
|
39
|
+
/**
|
|
40
|
+
* Bullet point styles for unordered lists.
|
|
41
|
+
*/
|
|
42
|
+
export type BulletStyle = 'disc' | 'circle' | 'square' | 'dash' | 'none';
|
|
43
|
+
/**
|
|
44
|
+
* Numbering styles for ordered lists.
|
|
45
|
+
*/
|
|
46
|
+
export type NumberStyle = 'decimal' | 'lower-alpha' | 'upper-alpha' | 'lower-roman' | 'upper-roman';
|
|
47
|
+
/**
|
|
48
|
+
* Type of list (bullet, numbered, or none).
|
|
49
|
+
*/
|
|
50
|
+
export type ListType = 'bullet' | 'number' | 'none';
|
|
51
|
+
/**
|
|
52
|
+
* List formatting properties for a paragraph.
|
|
53
|
+
*/
|
|
54
|
+
export interface ListFormatting {
|
|
55
|
+
listType: ListType;
|
|
56
|
+
bulletStyle?: BulletStyle;
|
|
57
|
+
numberStyle?: NumberStyle;
|
|
58
|
+
nestingLevel: number;
|
|
59
|
+
startNumber?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Default list formatting values.
|
|
63
|
+
*/
|
|
64
|
+
export declare const DEFAULT_LIST_FORMATTING: ListFormatting;
|
|
65
|
+
/**
|
|
66
|
+
* Indent per nesting level in pixels.
|
|
67
|
+
*/
|
|
68
|
+
export declare const LIST_INDENT_PER_LEVEL = 24;
|
|
69
|
+
/**
|
|
70
|
+
* Paragraph formatting properties.
|
|
71
|
+
* Applied at paragraph level (delimited by \n characters).
|
|
72
|
+
*/
|
|
73
|
+
export interface ParagraphFormatting {
|
|
74
|
+
alignment: TextAlignment;
|
|
75
|
+
listFormatting?: ListFormatting;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Text formatting style applied to characters.
|
|
79
|
+
*/
|
|
80
|
+
export interface TextFormattingStyle {
|
|
81
|
+
fontFamily: string;
|
|
82
|
+
fontSize: number;
|
|
83
|
+
fontWeight?: string;
|
|
84
|
+
fontStyle?: string;
|
|
85
|
+
color: string;
|
|
86
|
+
backgroundColor?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* A run of text with consistent formatting.
|
|
90
|
+
*/
|
|
91
|
+
export interface TextRun {
|
|
92
|
+
text: string;
|
|
93
|
+
formatting: TextFormattingStyle;
|
|
94
|
+
startIndex: number;
|
|
95
|
+
endIndex: number;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Type of substitution field.
|
|
99
|
+
* - 'data': Regular field replaced by merge data
|
|
100
|
+
* - 'pageNumber': Replaced by current page number during rendering
|
|
101
|
+
* - 'pageCount': Replaced by total page count during rendering
|
|
102
|
+
*/
|
|
103
|
+
export type SubstitutionFieldType = 'data' | 'pageNumber' | 'pageCount';
|
|
104
|
+
/**
|
|
105
|
+
* Type of value expected for formatting purposes.
|
|
106
|
+
*/
|
|
107
|
+
export type FieldValueType = 'string' | 'number' | 'currency' | 'date' | 'markdown';
|
|
108
|
+
/**
|
|
109
|
+
* Predefined format patterns for numbers.
|
|
110
|
+
*/
|
|
111
|
+
export type NumberFormatPreset = 'integer' | 'decimal' | 'decimal-1' | 'decimal-3' | 'thousands' | 'percent' | 'scientific';
|
|
112
|
+
/**
|
|
113
|
+
* Predefined format patterns for currency.
|
|
114
|
+
*/
|
|
115
|
+
export type CurrencyFormatPreset = 'USD' | 'EUR' | 'GBP' | 'JPY' | 'custom';
|
|
116
|
+
/**
|
|
117
|
+
* Predefined format patterns for dates.
|
|
118
|
+
*/
|
|
119
|
+
export type DateFormatPreset = 'short' | 'medium' | 'long' | 'full' | 'iso' | 'time-short' | 'time-long' | 'datetime-short' | 'datetime-long';
|
|
120
|
+
/**
|
|
121
|
+
* Configuration for field value formatting.
|
|
122
|
+
*/
|
|
123
|
+
export interface FieldFormatConfig {
|
|
124
|
+
/** Type of value for formatting purposes */
|
|
125
|
+
valueType?: FieldValueType;
|
|
126
|
+
/** Preset or custom format pattern for numbers */
|
|
127
|
+
numberFormat?: NumberFormatPreset | string;
|
|
128
|
+
/** Number of decimal places */
|
|
129
|
+
decimalPlaces?: number;
|
|
130
|
+
/** Use thousands separator grouping */
|
|
131
|
+
useGrouping?: boolean;
|
|
132
|
+
/** Currency format preset */
|
|
133
|
+
currencyFormat?: CurrencyFormatPreset;
|
|
134
|
+
/** Custom currency symbol (when currencyFormat is 'custom') */
|
|
135
|
+
currencySymbol?: string;
|
|
136
|
+
/** Position of currency symbol */
|
|
137
|
+
currencyPosition?: 'before' | 'after';
|
|
138
|
+
/** Date format preset or custom pattern */
|
|
139
|
+
dateFormat?: DateFormatPreset | string;
|
|
140
|
+
/** Locale for formatting (e.g., 'en-US', 'de-DE') */
|
|
141
|
+
locale?: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Configuration for a substitution field.
|
|
145
|
+
*/
|
|
146
|
+
export interface SubstitutionFieldConfig {
|
|
147
|
+
displayFormat?: string;
|
|
148
|
+
defaultValue?: string;
|
|
149
|
+
fieldType?: SubstitutionFieldType;
|
|
150
|
+
formatting?: TextFormattingStyle;
|
|
151
|
+
/** Format configuration for value transformation */
|
|
152
|
+
formatConfig?: FieldFormatConfig;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* A substitution field - text placeholder for data merge or page numbers.
|
|
156
|
+
* Regular fields rendered as {{fieldName}} and replaced during merge.
|
|
157
|
+
* Page number fields rendered as the current page number.
|
|
158
|
+
*/
|
|
159
|
+
export interface SubstitutionField {
|
|
160
|
+
id: string;
|
|
161
|
+
textIndex: number;
|
|
162
|
+
fieldName: string;
|
|
163
|
+
fieldType?: SubstitutionFieldType;
|
|
164
|
+
displayFormat?: string;
|
|
165
|
+
defaultValue?: string;
|
|
166
|
+
formatting?: TextFormattingStyle;
|
|
167
|
+
/** Format configuration for value transformation during merge */
|
|
168
|
+
formatConfig?: FieldFormatConfig;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Reference to an embedded object within a flowed line.
|
|
172
|
+
*/
|
|
173
|
+
export interface FlowedEmbeddedObject {
|
|
174
|
+
object: BaseEmbeddedObject;
|
|
175
|
+
textIndex: number;
|
|
176
|
+
x: number;
|
|
177
|
+
isBlock?: boolean;
|
|
178
|
+
isAnchor?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Reference to a substitution field within a flowed line.
|
|
182
|
+
*/
|
|
183
|
+
export interface FlowedSubstitutionField {
|
|
184
|
+
field: SubstitutionField;
|
|
185
|
+
textIndex: number;
|
|
186
|
+
x: number;
|
|
187
|
+
width: number;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* List marker information for a line.
|
|
191
|
+
*/
|
|
192
|
+
export interface ListMarker {
|
|
193
|
+
text: string;
|
|
194
|
+
width: number;
|
|
195
|
+
indent: number;
|
|
196
|
+
isFirstLineOfListItem: boolean;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A single line of flowed text with its measurements and content.
|
|
200
|
+
*/
|
|
201
|
+
export interface FlowedLine {
|
|
202
|
+
text: string;
|
|
203
|
+
width: number;
|
|
204
|
+
height: number;
|
|
205
|
+
baseline: number;
|
|
206
|
+
runs: TextRun[];
|
|
207
|
+
substitutionFields: FlowedSubstitutionField[];
|
|
208
|
+
embeddedObjects: FlowedEmbeddedObject[];
|
|
209
|
+
startIndex: number;
|
|
210
|
+
endIndex: number;
|
|
211
|
+
endsWithNewline?: boolean;
|
|
212
|
+
endsWithPageBreak?: boolean;
|
|
213
|
+
alignment: TextAlignment;
|
|
214
|
+
extraWordSpacing?: number;
|
|
215
|
+
isBlockObjectLine?: boolean;
|
|
216
|
+
allowPageBreakBefore?: boolean;
|
|
217
|
+
listMarker?: ListMarker;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* A page of flowed text content.
|
|
221
|
+
*/
|
|
222
|
+
export interface FlowedPage {
|
|
223
|
+
lines: FlowedLine[];
|
|
224
|
+
height: number;
|
|
225
|
+
startIndex: number;
|
|
226
|
+
endIndex: number;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Default text formatting values.
|
|
230
|
+
*/
|
|
231
|
+
export declare const DEFAULT_FORMATTING: TextFormattingStyle;
|
|
232
|
+
/**
|
|
233
|
+
* Default paragraph formatting values.
|
|
234
|
+
*/
|
|
235
|
+
export declare const DEFAULT_PARAGRAPH_FORMATTING: ParagraphFormatting;
|
|
236
|
+
/**
|
|
237
|
+
* The Unicode Object Replacement Character used for embedded content.
|
|
238
|
+
* Both substitution fields and embedded objects use this character.
|
|
239
|
+
*/
|
|
240
|
+
export declare const OBJECT_REPLACEMENT_CHAR = "\uFFFC";
|
|
241
|
+
/**
|
|
242
|
+
* The Form Feed character used for page breaks.
|
|
243
|
+
* Inserted via Ctrl+Enter and forces content to start on a new page.
|
|
244
|
+
*/
|
|
245
|
+
export declare const PAGE_BREAK_CHAR = "\f";
|
|
246
|
+
/**
|
|
247
|
+
* Visual state of a repeating section, computed during render.
|
|
248
|
+
*/
|
|
249
|
+
export interface RepeatingSectionVisualState {
|
|
250
|
+
startPageIndex: number;
|
|
251
|
+
startY: number;
|
|
252
|
+
endPageIndex: number;
|
|
253
|
+
endY: number;
|
|
254
|
+
spansMultiplePages: boolean;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* A repeating section that loops over array data during merge.
|
|
258
|
+
* Starts and ends at paragraph boundaries.
|
|
259
|
+
*/
|
|
260
|
+
export interface RepeatingSection {
|
|
261
|
+
id: string;
|
|
262
|
+
fieldPath: string;
|
|
263
|
+
startIndex: number;
|
|
264
|
+
endIndex: number;
|
|
265
|
+
visualState?: RepeatingSectionVisualState;
|
|
266
|
+
}
|
|
267
|
+
export type { ObjectPosition };
|
|
268
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/text/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,KAAK,IAAI,IAAI,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