@office-open/docx 0.6.7 → 0.6.9

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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { i as __toCommonJS, n as __exportAll, r as __reExport, t as __esmMin } from "./chunk-090QGkrx.mjs";
2
- import { AppProperties, BaseXmlComponent, BuilderElement, BuilderElement as BuilderElement$1, DOCX_NS, EMPTY_OBJECT, EmptyElement, Formatter, Formatter as Formatter$1, IgnoreIfEmptyXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, NextAttributeComponent, OoxmlMimeType, RawPassthrough, Relationships, TargetModeType, XmlAttributeComponent, XmlAttributeComponent as XmlAttributeComponent$1, XmlComponent, ZIP_STORED_LEVEL, addSmartArtRelationships, appendContentType, appendRelationship, attrObj, chartAttr, convertEmuToPixels, convertInchesToTwip, convertMillimetersToTwip, convertPixelsToEmu, convertToXmlComponent, createDefault, createOverride, createPacker, createReplacer, createTraverser, getNextRelationshipIndex, getReferencedMedia, hasPlaceholders, hashedId, hpsMeasureObj, hpsMeasureObj as hpsMeasureObj$1, numberValObj, numberValObj as numberValObj$1, onOffObj, onOffObj as onOffObj$1, parseArchive, parseCorePropsElement, replaceChartPlaceholders, replaceImagePlaceholders, replaceSmartArtPlaceholders, strFromU8, stringContainerObj, stringEnumValObj, stringEnumValObj as stringEnumValObj$1, stringValObj, stringValObj as stringValObj$1, toJson, uniqueId, uniqueNumericIdCreator, uniqueNumericIdCreator as uniqueNumericIdCreator$1, uniqueUuid, unzipSync, wrapEl, xsdVerticalMergeRev, zipAndConvert } from "@office-open/core";
1
+ import { i as __toCommonJS, n as __exportAll, r as __reExport, t as __esmMin } from "./chunk-DHfcOUro.mjs";
2
+ import { AppProperties, BaseXmlComponent, BuilderElement, BuilderElement as BuilderElement$1, DOCX_NS, EMPTY_OBJECT, EmptyElement, Formatter, Formatter as Formatter$1, IgnoreIfEmptyXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, OoxmlMimeType, RawPassthrough, Relationships, TargetModeType, XmlComponent, ZIP_STORED_LEVEL, addSmartArtRelationships, appendContentType, appendRelationship, attrObj, chartAttr, convertEmuToPixels, convertInchesToTwip, convertMillimetersToTwip, convertPixelsToEmu, convertToXmlComponent, createDefault, createOverride, createPacker, createReplacer, createTraverser, getNextRelationshipIndex, getReferencedMedia, hasPlaceholders, hashedId, hpsMeasureObj, hpsMeasureObj as hpsMeasureObj$1, numberValObj, numberValObj as numberValObj$1, onOffObj, onOffObj as onOffObj$1, parseArchive, parseCorePropsElement, replaceChartPlaceholders, replaceImagePlaceholders, replaceSmartArtPlaceholders, strFromU8, stringContainerObj, stringEnumValObj, stringEnumValObj as stringEnumValObj$1, stringValObj, stringValObj as stringValObj$1, toJson, uniqueId, uniqueNumericIdCreator, uniqueNumericIdCreator as uniqueNumericIdCreator$1, uniqueUuid, unzipSync, wrapEl, xsdVerticalMergeRev, zipAndConvert } from "@office-open/core";
3
3
  import { attr, attrBool, attrNum, children, colorAttr, findChild, findDeep, js2xml, textOf, xml, xml2js } from "@office-open/xml";
4
4
  import { toUint8Array } from "undio";
5
5
  import { PresetGeometry, buildFill, createBlipFill, createCustomGeometry, createEffectDag, createEffectList, createOutline, createScene3D, createShape3D, createTransform2D, extractBlipFillMedia } from "@office-open/core/drawingml";
@@ -10,46 +10,6 @@ export * from "@office-open/core/smartart";
10
10
  //#region src/file/xml-components/base.ts
11
11
  var init_base = __esmMin((() => {}));
12
12
  //#endregion
13
- //#region src/file/xml-components/attributes.ts
14
- /**
15
- * Common XML attributes module for WordprocessingML elements.
16
- *
17
- * This module provides a reusable Attributes class with commonly used
18
- * WordprocessingML attribute mappings.
19
- *
20
- * @module
21
- */
22
- var Attributes;
23
- var init_attributes = __esmMin((() => {
24
- Attributes = class extends XmlAttributeComponent$1 {
25
- xmlKeys = {
26
- bottom: "w:bottom",
27
- color: "w:color",
28
- fill: "w:fill",
29
- footer: "w:footer",
30
- gutter: "w:gutter",
31
- h: "w:h",
32
- header: "w:header",
33
- left: "w:left",
34
- linePitch: "w:linePitch",
35
- pos: "w:pos",
36
- right: "w:right",
37
- rsidR: "w:rsidR",
38
- rsidRPr: "w:rsidRPr",
39
- rsidSect: "w:rsidSect",
40
- space: "w:space",
41
- sz: "w:sz",
42
- themeColor: "w:themeColor",
43
- themeShade: "w:themeShade",
44
- themeTint: "w:themeTint",
45
- top: "w:top",
46
- type: "w:type",
47
- val: "w:val",
48
- w: "w:w"
49
- };
50
- };
51
- }));
52
- //#endregion
53
13
  //#region src/file/xml-components/simple-elements.ts
54
14
  /**
55
15
  * Docx-specific simple element helpers.
@@ -70,7 +30,6 @@ var init_simple_elements = __esmMin((() => {
70
30
  //#region src/file/xml-components/index.ts
71
31
  var init_xml_components = __esmMin((() => {
72
32
  init_base();
73
- init_attributes();
74
33
  init_simple_elements();
75
34
  }));
76
35
  //#endregion
@@ -1761,7 +1720,7 @@ var init_shape_properties = __esmMin((() => {
1761
1720
  if (scene3d) this.root.push(createScene3D(scene3d));
1762
1721
  if (shape3d) this.root.push(createShape3D(shape3d));
1763
1722
  }
1764
- prepForXml(context) {
1723
+ toXml(context) {
1765
1724
  const media = this.fillOptions ? extractBlipFillMedia(this.fillOptions) : void 0;
1766
1725
  if (media) context.file.media.addImage(media.fileName, {
1767
1726
  data: media.data,
@@ -1778,7 +1737,7 @@ var init_shape_properties = __esmMin((() => {
1778
1737
  }
1779
1738
  }
1780
1739
  });
1781
- return super.prepForXml(context);
1740
+ return super.toXml(context);
1782
1741
  }
1783
1742
  };
1784
1743
  }));
@@ -1929,7 +1888,7 @@ var createTextBoxContent;
1929
1888
  var init_text_box_content = __esmMin((() => {
1930
1889
  init_xml_components();
1931
1890
  createTextBoxContent = (children) => new BuilderElement({
1932
- children: [...children],
1891
+ children,
1933
1892
  name: "wps:txbxContent"
1934
1893
  });
1935
1894
  }));
@@ -2032,9 +1991,7 @@ var init_hyperlink = __esmMin((() => {
2032
1991
  if (props.tooltip !== void 0) attr["w:tooltip"] = props.tooltip;
2033
1992
  if (props.tgtFrame !== void 0) attr["w:tgtFrame"] = props.tgtFrame;
2034
1993
  this.root.push({ _attr: attr });
2035
- children.forEach((child) => {
2036
- this.root.push(child);
2037
- });
1994
+ for (const child of children) this.root.push(child);
2038
1995
  }
2039
1996
  };
2040
1997
  InternalHyperlink = class extends ConcreteHyperlink {
@@ -2046,6 +2003,7 @@ var init_hyperlink = __esmMin((() => {
2046
2003
  }
2047
2004
  };
2048
2005
  ExternalHyperlink = class extends XmlComponent {
2006
+ options;
2049
2007
  constructor(options) {
2050
2008
  super("w:externalHyperlink");
2051
2009
  this.options = options;
@@ -2076,7 +2034,8 @@ var init_non_visual_properties = __esmMin((() => {
2076
2034
  descr: ""
2077
2035
  } });
2078
2036
  }
2079
- prepForXml(context) {
2037
+ toXml(context) {
2038
+ const start = this.root.length;
2080
2039
  let hasStackClick = false;
2081
2040
  for (let i = context.stack.length - 1; i >= 0; i--) {
2082
2041
  const element = context.stack[i];
@@ -2097,7 +2056,9 @@ var init_non_visual_properties = __esmMin((() => {
2097
2056
  this.root.push(buildHyperlinkHoverObj(linkId, false));
2098
2057
  }
2099
2058
  }
2100
- return super.prepForXml(context);
2059
+ const result = super.toXml(context);
2060
+ this.root.length = start;
2061
+ return result;
2101
2062
  }
2102
2063
  };
2103
2064
  }));
@@ -2719,7 +2680,8 @@ var init_doc_properties = __esmMin((() => {
2719
2680
  if (title !== null && title !== void 0) attributes.title = title;
2720
2681
  this.root.push({ _attr: attributes });
2721
2682
  }
2722
- prepForXml(context) {
2683
+ toXml(context) {
2684
+ const start = this.root.length;
2723
2685
  let hasStackClick = false;
2724
2686
  for (let i = context.stack.length - 1; i >= 0; i--) {
2725
2687
  const element = context.stack[i];
@@ -2740,7 +2702,9 @@ var init_doc_properties = __esmMin((() => {
2740
2702
  this.root.push(buildHyperlinkHoverObj(linkId, true));
2741
2703
  }
2742
2704
  }
2743
- return super.prepForXml(context);
2705
+ const result = super.toXml(context);
2706
+ this.root.length = start;
2707
+ return result;
2744
2708
  }
2745
2709
  };
2746
2710
  }));
@@ -3249,10 +3213,10 @@ var init_wpg_group_run = __esmMin((() => {
3249
3213
  this.extraChildren.push(drawing);
3250
3214
  }
3251
3215
  prepForXml(context) {
3252
- this.mediaDatas.forEach((child) => {
3216
+ for (const child of this.mediaDatas) {
3253
3217
  context.file.media.addImage(child.fileName, child);
3254
3218
  if (child.type === "svg") context.file.media.addImage(child.fallback.fileName, child.fallback);
3255
- });
3219
+ }
3256
3220
  return super.prepForXml(context);
3257
3221
  }
3258
3222
  };
@@ -3498,6 +3462,7 @@ var init_font_wrapper = __esmMin((() => {
3498
3462
  init_convenience_functions();
3499
3463
  init_font_table();
3500
3464
  FontWrapper = class {
3465
+ options;
3501
3466
  fontTable;
3502
3467
  relationships;
3503
3468
  fontOptionsWithKey = [];
@@ -6283,22 +6248,7 @@ var init_properties = __esmMin((() => {
6283
6248
  this.root.push(item);
6284
6249
  }
6285
6250
  /**
6286
- * Prepares the paragraph properties for XML serialization.
6287
- *
6288
- * This method creates concrete numbering instances for any numbering references
6289
- * before the properties are converted to XML.
6290
- *
6291
- * @param context - The XML context containing document and file information
6292
- * @returns The prepared XML object, or undefined if the component should be ignored
6293
- */
6294
- prepForXml(context) {
6295
- if (!(context.viewWrapper instanceof FontWrapper)) for (const reference of this.numberingReferences) context.file.numbering.createConcreteNumberingInstance(reference.reference, reference.instance);
6296
- return super.prepForXml(context);
6297
- }
6298
- /**
6299
6251
  * Register numbering references (side effect) before serialization.
6300
- * toXml() bypasses prepForXml(), so numbering registration must be
6301
- * triggered explicitly here.
6302
6252
  */
6303
6253
  toXml(context) {
6304
6254
  if (!(context.viewWrapper instanceof FontWrapper)) for (const reference of this.numberingReferences) context.file.numbering.createConcreteNumberingInstance(reference.reference, reference.instance);
@@ -6357,102 +6307,6 @@ var init_paragraph$1 = __esmMin((() => {
6357
6307
  this._props = buildParagraphProperties(this.options);
6358
6308
  this._textRun = this.options.text ? new TextRun(this.options.text) : void 0;
6359
6309
  }
6360
- prepForXml(context) {
6361
- const children = [];
6362
- const { xml: pPrObj, numberingReferences } = this._props;
6363
- if (!(context.viewWrapper instanceof FontWrapper)) for (const reference of numberingReferences) context.file.numbering.createConcreteNumberingInstance(reference.reference, reference.instance);
6364
- let finalPPrObj = pPrObj;
6365
- if (this.sectionProperties) {
6366
- const sectPrObj = this.sectionProperties.prepForXml(context);
6367
- if (sectPrObj) if (finalPPrObj) finalPPrObj["w:pPr"].push(sectPrObj);
6368
- else finalPPrObj = { "w:pPr": [sectPrObj] };
6369
- }
6370
- if (finalPPrObj) children.push(finalPPrObj);
6371
- for (const run of this.frontRuns) {
6372
- const obj = run.prepForXml(context);
6373
- if (obj) children.push(obj);
6374
- }
6375
- if (this._textRun) {
6376
- const obj = this._textRun.prepForXml(context);
6377
- if (obj) children.push(obj);
6378
- }
6379
- if (this.options.children) for (const rawChild of this.options.children) {
6380
- if (rawChild instanceof ExternalHyperlink) {
6381
- const concreteHyperlink = new ConcreteHyperlink(rawChild.options.children, uniqueId(), { tooltip: rawChild.options.tooltip });
6382
- context.viewWrapper.relationships.addRelationship(concreteHyperlink.linkId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", rawChild.options.link, TargetModeType.EXTERNAL);
6383
- const obj = concreteHyperlink.prepForXml(context);
6384
- if (obj) children.push(obj);
6385
- continue;
6386
- }
6387
- if (rawChild instanceof Bookmark) {
6388
- const startObj = rawChild.start.prepForXml(context);
6389
- if (startObj) children.push(startObj);
6390
- for (const textRun of rawChild.children) if (textRun instanceof BaseXmlComponent) {
6391
- const obj = textRun.prepForXml(context);
6392
- if (obj) children.push(obj);
6393
- }
6394
- const endObj = rawChild.end.prepForXml(context);
6395
- if (endObj) children.push(endObj);
6396
- continue;
6397
- }
6398
- let child;
6399
- if (typeof rawChild === "string") child = new TextRun(rawChild);
6400
- else if (rawChild instanceof BaseXmlComponent) child = rawChild;
6401
- else if ("chart" in rawChild) child = new ChartRun(rawChild.chart);
6402
- else if ("smartArt" in rawChild) child = new SmartArtRun(rawChild.smartArt);
6403
- else if ("image" in rawChild) child = new ImageRun(rawChild.image);
6404
- else if (typeof rawChild === "object" && rawChild !== null && "hyperlink" in rawChild) {
6405
- const { hyperlink, ...runOpts } = rawChild;
6406
- const hlChildren = hyperlink.children;
6407
- const textRuns = [];
6408
- if (hlChildren && hlChildren.length > 0) for (const rc of hlChildren) textRuns.push(new TextRun(rc));
6409
- else textRuns.push(new TextRun(runOpts));
6410
- if ("link" in hyperlink) {
6411
- const ext = new ExternalHyperlink({
6412
- link: hyperlink.link,
6413
- tooltip: hyperlink.tooltip,
6414
- children: textRuns
6415
- });
6416
- const concrete = new ConcreteHyperlink(ext.options.children, uniqueId(), { tooltip: ext.options.tooltip });
6417
- context.viewWrapper.relationships.addRelationship(concrete.linkId, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", ext.options.link, TargetModeType.EXTERNAL);
6418
- const obj = concrete.prepForXml(context);
6419
- if (obj) children.push(obj);
6420
- } else if ("anchor" in hyperlink) {
6421
- const obj = new InternalHyperlink({
6422
- anchor: hyperlink.anchor,
6423
- tooltip: hyperlink.tooltip,
6424
- children: textRuns
6425
- }).prepForXml(context);
6426
- if (obj) children.push(obj);
6427
- }
6428
- continue;
6429
- } else if ("math" in rawChild && typeof rawChild === "object" && rawChild !== null && typeof rawChild.math === "object" && rawChild.math !== null) {
6430
- const coercedChildren = rawChild.math.children?.map(coerceMathJson);
6431
- child = new Math$1(coercedChildren ? { children: coercedChildren } : { children: [] });
6432
- } else if ("symbolRun" in rawChild) child = new SymbolRun(rawChild.symbolRun);
6433
- else if ("footnoteReference" in rawChild) child = new FootnoteReferenceRun(rawChild.footnoteReference);
6434
- else if ("endnoteReference" in rawChild) child = new EndnoteReferenceRun(rawChild.endnoteReference);
6435
- else if ("pageBreak" in rawChild) child = new PageBreak();
6436
- else if ("columnBreak" in rawChild) child = new ColumnBreak();
6437
- else if ("commentRangeStart" in rawChild) child = new CommentRangeStart(rawChild.commentRangeStart);
6438
- else if ("commentRangeEnd" in rawChild) child = new CommentRangeEnd(rawChild.commentRangeEnd);
6439
- else if ("commentReference" in rawChild) child = new TextRun({ children: [new CommentReference(rawChild.commentReference)] });
6440
- else if ("bookmarkStart" in rawChild) {
6441
- const startObj = new BookmarkStart(rawChild.bookmarkStart.name, rawChild.bookmarkStart.id).prepForXml(context);
6442
- if (startObj) children.push(startObj);
6443
- continue;
6444
- } else if ("bookmarkEnd" in rawChild) {
6445
- const endObj = new BookmarkEnd(rawChild.bookmarkEnd).prepForXml(context);
6446
- if (endObj) children.push(endObj);
6447
- continue;
6448
- } else if ("insertion" in rawChild) child = new InsertedTextRun(rawChild.insertion);
6449
- else if ("deletion" in rawChild) child = new DeletedTextRun(rawChild.deletion);
6450
- else child = new TextRun(rawChild);
6451
- const obj = child.prepForXml(context);
6452
- if (obj) children.push(obj);
6453
- }
6454
- return { "w:p": children.length > 0 ? children : {} };
6455
- }
6456
6310
  addRunToFront(run) {
6457
6311
  this.frontRuns.push(run);
6458
6312
  return this;
@@ -6968,10 +6822,9 @@ var init_alt_chunk = __esmMin((() => {
6968
6822
  this.root.push(altChunkPr);
6969
6823
  }
6970
6824
  }
6971
- prepForXml(context) {
6825
+ toXml(context) {
6972
6826
  const relId = uniqueId();
6973
6827
  const extension = this.options.extension;
6974
- this.root.splice(0, 0, { _attr: { "r:id": `rId${relId}` } });
6975
6828
  const partPath = `afchunks/afchunk${relId}.${extension}`;
6976
6829
  const rawData = typeof this.options.data === "string" ? new TextEncoder().encode(this.options.data) : this.options.data;
6977
6830
  const data = this.options.contentType === "text/html" && typeof this.options.data === "string" ? new TextEncoder().encode(wrapHtmlDocument(this.options.data)) : rawData;
@@ -6984,7 +6837,10 @@ var init_alt_chunk = __esmMin((() => {
6984
6837
  contentType: this.options.contentType
6985
6838
  });
6986
6839
  context.file.contentTypes.addAltChunk(`/word/${partPath}`, this.options.contentType, extension);
6987
- return super.prepForXml(context);
6840
+ this.root.splice(0, 0, { _attr: { "r:id": `rId${relId}` } });
6841
+ const result = super.toXml(context);
6842
+ this.root.splice(0, 1);
6843
+ return result;
6988
6844
  }
6989
6845
  };
6990
6846
  }));
@@ -7363,10 +7219,9 @@ var init_sub_doc = __esmMin((() => {
7363
7219
  super("w:subDoc");
7364
7220
  this.options = options;
7365
7221
  }
7366
- prepForXml(context) {
7222
+ toXml(context) {
7367
7223
  const relId = uniqueId();
7368
7224
  const partPath = `subdocs/subdoc${relId}.docx`;
7369
- this.root.splice(0, 0, { _attr: { "r:id": `rId${relId}` } });
7370
7225
  const data = typeof this.options.data === "string" ? new TextEncoder().encode(this.options.data) : this.options.data;
7371
7226
  context.viewWrapper.relationships.addRelationship(relId, SUBDOC_RELATIONSHIP_TYPE, partPath);
7372
7227
  context.file.subDocs.addSubDoc(relId, {
@@ -7374,7 +7229,10 @@ var init_sub_doc = __esmMin((() => {
7374
7229
  path: partPath
7375
7230
  });
7376
7231
  context.file.contentTypes.addSubDoc(`/word/${partPath}`);
7377
- return super.prepForXml(context);
7232
+ this.root.splice(0, 0, { _attr: { "r:id": `rId${relId}` } });
7233
+ const result = super.toXml(context);
7234
+ this.root.splice(0, 1);
7235
+ return result;
7378
7236
  }
7379
7237
  };
7380
7238
  }));
@@ -8388,6 +8246,7 @@ var init_table_row$1 = __esmMin((() => {
8388
8246
  init_table_property_exceptions();
8389
8247
  init_table_row_properties();
8390
8248
  TableRow = class extends BaseXmlComponent {
8249
+ options;
8391
8250
  extraCells = [];
8392
8251
  coercedChildren;
8393
8252
  constructor(options) {
@@ -8431,26 +8290,6 @@ var init_table_row$1 = __esmMin((() => {
8431
8290
  }
8432
8291
  return idx;
8433
8292
  }
8434
- prepForXml(context) {
8435
- const children = [];
8436
- if (this.options.propertyExceptions) {
8437
- const obj = new TablePropertyExceptions(this.options.propertyExceptions).prepForXml(context);
8438
- if (obj) children.push(obj);
8439
- }
8440
- const trPrObj = buildTableRowProperties(this.options);
8441
- if (trPrObj) children.push(trPrObj);
8442
- const prefixCount = children.length;
8443
- for (const child of this.coercedChildren) {
8444
- const obj = child.prepForXml(context);
8445
- if (obj) children.push(obj);
8446
- }
8447
- if (this.extraCells.length > 0) for (const { cell, columnIndex } of this.extraCells) {
8448
- const insertIdx = this.findInsertIndex(columnIndex, prefixCount);
8449
- const obj = cell.prepForXml(context);
8450
- if (obj) children.splice(insertIdx, 0, obj);
8451
- }
8452
- return { "w:tr": children.length ? children : EMPTY_OBJECT };
8453
- }
8454
8293
  toXml(context) {
8455
8294
  const parts = [];
8456
8295
  if (this.options.propertyExceptions) parts.push(new TablePropertyExceptions(this.options.propertyExceptions).toXml(context));
@@ -8632,22 +8471,11 @@ var init_table_cell = __esmMin((() => {
8632
8471
  init_xml_components();
8633
8472
  init_table_cell_properties();
8634
8473
  TableCell = class extends BaseXmlComponent {
8474
+ options;
8635
8475
  constructor(options) {
8636
8476
  super("w:tc");
8637
8477
  this.options = options;
8638
8478
  }
8639
- prepForXml(context) {
8640
- const children = [];
8641
- const tPrObj = buildTableCellProperties(this.options);
8642
- if (tPrObj) children.push(tPrObj);
8643
- const coerced = this.options.children.map((c) => c instanceof BaseXmlComponent ? c : lazyCoerce(c));
8644
- for (const child of coerced) {
8645
- const obj = child.prepForXml(context);
8646
- if (obj) children.push(obj);
8647
- }
8648
- if (!(coerced[coerced.length - 1] instanceof Paragraph)) children.push(new Paragraph({}).prepForXml(context));
8649
- return { "w:tc": children };
8650
- }
8651
8479
  toXml(context) {
8652
8480
  const parts = [];
8653
8481
  const tPrObj = buildTableCellProperties(this.options);
@@ -8744,11 +8572,11 @@ var init_table = __esmMin((() => {
8744
8572
  this.options = options;
8745
8573
  this.rows = options.rows.map((row) => row instanceof TableRow || row instanceof StructuredDocumentTagRow ? row : new TableRow(row));
8746
8574
  this.columnWidths = options.columnWidths ?? Array(Math.max(...this.rows.map((row) => row.cellCount))).fill(100);
8747
- this.rows.forEach((row, rowIndex) => {
8748
- if (rowIndex === this.rows.length - 1) return;
8749
- if (!(row instanceof TableRow)) return;
8575
+ for (let rowIndex = 0; rowIndex < this.rows.length - 1; rowIndex++) {
8576
+ const row = this.rows[rowIndex];
8577
+ if (!(row instanceof TableRow)) continue;
8750
8578
  let columnIndex = 0;
8751
- row.cells.forEach((cell) => {
8579
+ for (const cell of row.cells) {
8752
8580
  if (cell.options.rowSpan && cell.options.rowSpan > 1) {
8753
8581
  const nextRow = this.rows[rowIndex + 1];
8754
8582
  if (nextRow instanceof TableRow) {
@@ -8763,37 +8591,8 @@ var init_table = __esmMin((() => {
8763
8591
  }
8764
8592
  }
8765
8593
  columnIndex += cell.options.columnSpan || 1;
8766
- });
8767
- });
8768
- }
8769
- prepForXml(context) {
8770
- const children = [];
8771
- const tblPrObj = new TableProperties({
8772
- alignment: this.options.alignment,
8773
- borders: this.options.borders ?? {},
8774
- caption: this.options.caption,
8775
- cellMargin: this.options.margins,
8776
- cellSpacing: this.options.cellSpacing,
8777
- description: this.options.description,
8778
- float: this.options.float,
8779
- indent: this.options.indent,
8780
- layout: this.options.layout,
8781
- revision: this.options.revision,
8782
- style: this.options.style,
8783
- styleColBandSize: this.options.styleColBandSize,
8784
- styleRowBandSize: this.options.styleRowBandSize,
8785
- tableLook: this.options.tableLook,
8786
- visuallyRightToLeft: this.options.visuallyRightToLeft,
8787
- width: this.options.width ?? { size: 100 }
8788
- }).prepForXml(context);
8789
- if (tblPrObj) children.push(tblPrObj);
8790
- const gridObj = new TableGrid(this.columnWidths, this.options.columnWidthsRevision).prepForXml(context);
8791
- if (gridObj) children.push(gridObj);
8792
- for (const row of this.rows) {
8793
- const obj = row.prepForXml(context);
8794
- if (obj) children.push(obj);
8594
+ }
8795
8595
  }
8796
- return { "w:tbl": children };
8797
8596
  }
8798
8597
  toXml(context) {
8799
8598
  const parts = [];
@@ -9478,12 +9277,10 @@ var CustomProperties = class extends XmlComponent {
9478
9277
  this.nextId = 2;
9479
9278
  for (const property of properties) this.addCustomProperty(property);
9480
9279
  }
9481
- prepForXml(context) {
9482
- this.properties.forEach((x) => this.root.push(x));
9483
- return super.prepForXml(context);
9484
- }
9485
9280
  addCustomProperty(property) {
9486
- this.properties.push(new CustomProperty(this.nextId++, property));
9281
+ const prop = new CustomProperty(this.nextId++, property);
9282
+ this.properties.push(prop);
9283
+ this.root.push(prop);
9487
9284
  }
9488
9285
  };
9489
9286
  //#endregion
@@ -10575,22 +10372,6 @@ var Body = class extends XmlComponent {
10575
10372
  this.sections.push(new SectionProperties(options));
10576
10373
  }
10577
10374
  /**
10578
- * Prepares the body element for XML serialization.
10579
- *
10580
- * Ensures that the last section's properties are placed as a direct child of the body
10581
- * element, as required by the OOXML specification.
10582
- *
10583
- * @param context - The XML serialization context
10584
- * @returns The prepared XML object or undefined
10585
- */
10586
- prepForXml(context) {
10587
- if (this.sections.length === 1) {
10588
- this.root.splice(0, 1);
10589
- this.root.push(this.sections.pop());
10590
- }
10591
- return super.prepForXml(context);
10592
- }
10593
- /**
10594
10375
  * Direct XML serialization — ensures section properties are appended
10595
10376
  * before delegating to the default XmlComponent.toXml() traversal.
10596
10377
  */
@@ -10713,7 +10494,7 @@ var DocumentBackground = class extends XmlComponent {
10713
10494
  };
10714
10495
  }
10715
10496
  }
10716
- prepForXml(context) {
10497
+ toXml(context) {
10717
10498
  if (this.imageData) {
10718
10499
  context.file.media.addImage(this.imageData.fileName, {
10719
10500
  type: this.imageData.type,
@@ -10759,7 +10540,7 @@ var DocumentBackground = class extends XmlComponent {
10759
10540
  name: "v:background"
10760
10541
  }));
10761
10542
  }
10762
- return super.prepForXml(context);
10543
+ return super.toXml(context);
10763
10544
  }
10764
10545
  };
10765
10546
  //#endregion
@@ -12389,18 +12170,13 @@ var Numbering = class extends XmlComponent {
12389
12170
  this.referenceConfigMap.set(con.reference, con.levels);
12390
12171
  }
12391
12172
  }
12392
- /**
12393
- * Prepares the numbering definitions for XML serialization.
12394
- *
12395
- * Adds all abstract and concrete numbering definitions to the XML tree.
12396
- *
12397
- * @param context - The XML context
12398
- * @returns The prepared XML object
12399
- */
12400
- prepForXml(context) {
12173
+ toXml(context) {
12174
+ const start = this.root.length;
12401
12175
  for (const numbering of this.abstractNumberingMap.values()) this.root.push(numbering);
12402
12176
  for (const numbering of this.concreteNumberingMap.values()) this.root.push(numbering);
12403
- return super.prepForXml(context);
12177
+ const result = super.toXml(context);
12178
+ this.root.length = start;
12179
+ return result;
12404
12180
  }
12405
12181
  /**
12406
12182
  * Creates a concrete numbering instance from an abstract numbering definition.
@@ -14267,7 +14043,6 @@ var file_exports = /* @__PURE__ */ __exportAll({
14267
14043
  AltChunk: () => AltChunk,
14268
14044
  AltChunkCollection: () => AltChunkCollection,
14269
14045
  AnnotationReference: () => AnnotationReference,
14270
- Attributes: () => Attributes,
14271
14046
  BaseXmlComponent: () => BaseXmlComponent,
14272
14047
  Bdo: () => Bdo,
14273
14048
  Bibliography: () => Bibliography,
@@ -14402,7 +14177,6 @@ var file_exports = /* @__PURE__ */ __exportAll({
14402
14177
  MoveToRangeStart: () => MoveToRangeStart,
14403
14178
  MovedFromTextRun: () => MovedFromTextRun,
14404
14179
  MovedToTextRun: () => MovedToTextRun,
14405
- NextAttributeComponent: () => NextAttributeComponent,
14406
14180
  NoBreakHyphen: () => NoBreakHyphen,
14407
14181
  NumberFormat: () => NumberFormat,
14408
14182
  NumberProperties: () => NumberProperties,
@@ -14512,7 +14286,6 @@ var file_exports = /* @__PURE__ */ __exportAll({
14512
14286
  WidthType: () => WidthType,
14513
14287
  WpgGroupRun: () => WpgGroupRun,
14514
14288
  WpsShapeRun: () => WpsShapeRun,
14515
- XmlAttributeComponent: () => XmlAttributeComponent,
14516
14289
  XmlComponent: () => XmlComponent,
14517
14290
  YearLong: () => YearLong,
14518
14291
  YearShort: () => YearShort,
@@ -14800,14 +14573,14 @@ var Compiler = class {
14800
14573
  path: "docProps/app.xml"
14801
14574
  },
14802
14575
  Comments: {
14803
- data: replaceNumberingPlaceholders(commentMediaDatas.length > 0 ? replaceImagePlaceholders(commentXmlData, commentMediaDatas, commentRelationshipCount, "rId") : commentXmlData, file.numbering.concreteNumbering),
14576
+ data: (() => {
14577
+ return replaceNumberingPlaceholders(commentMediaDatas.length > 0 ? replaceImagePlaceholders(commentXmlData, commentMediaDatas, commentRelationshipCount, "rId") : commentXmlData, file.numbering.concreteNumbering);
14578
+ })(),
14804
14579
  path: "word/comments.xml"
14805
14580
  },
14806
14581
  CommentsRelationships: {
14807
14582
  data: (() => {
14808
- commentMediaDatas.forEach((mediaData, i) => {
14809
- file.comments.relationships.addRelationship(commentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${mediaData.fileName}`);
14810
- });
14583
+ for (let i = 0; i < commentMediaDatas.length; i++) file.comments.relationships.addRelationship(commentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${commentMediaDatas[i].fileName}`);
14811
14584
  return this.formatter.formatToXml(file.comments.relationships, mkCtx({
14812
14585
  relationships: file.comments.relationships,
14813
14586
  view: file.comments
@@ -14817,16 +14590,14 @@ var Compiler = class {
14817
14590
  },
14818
14591
  ContentTypes: {
14819
14592
  data: (() => {
14820
- file.charts.array.forEach((_, i) => {
14821
- file.contentTypes.addChart(i + 1);
14822
- });
14823
- file.smartArts.array.forEach((_, i) => {
14593
+ for (let i = 0; i < file.charts.array.length; i++) file.contentTypes.addChart(i + 1);
14594
+ for (let i = 0; i < file.smartArts.array.length; i++) {
14824
14595
  file.contentTypes.addDiagramData(i + 1);
14825
14596
  file.contentTypes.addDiagramLayout(i + 1);
14826
14597
  file.contentTypes.addDiagramStyle(i + 1);
14827
14598
  file.contentTypes.addDiagramColors(i + 1);
14828
14599
  file.contentTypes.addDiagramDrawing(i + 1);
14829
- });
14600
+ }
14830
14601
  return this.formatter.formatToXml(file.contentTypes, mkCtx(file.document));
14831
14602
  })(),
14832
14603
  path: "[Content_Types].xml"
@@ -14864,18 +14635,18 @@ var Compiler = class {
14864
14635
  path: "word/fontTable.xml"
14865
14636
  },
14866
14637
  FontTableRelationships: {
14867
- data: this.formatter.formatToXml(file.fontTable.relationships, mkCtx(file.document)),
14638
+ data: (() => this.formatter.formatToXml(file.fontTable.relationships, mkCtx(file.document)))(),
14868
14639
  path: "word/_rels/fontTable.xml.rels"
14869
14640
  },
14870
14641
  FootNotes: {
14871
- data: replaceNumberingPlaceholders(footnoteMediaDatas.length > 0 ? replaceImagePlaceholders(footnoteXmlData, footnoteMediaDatas, footnoteRelationshipCount, "rId") : footnoteXmlData, file.numbering.concreteNumbering),
14642
+ data: (() => {
14643
+ return replaceNumberingPlaceholders(footnoteMediaDatas.length > 0 ? replaceImagePlaceholders(footnoteXmlData, footnoteMediaDatas, footnoteRelationshipCount, "rId") : footnoteXmlData, file.numbering.concreteNumbering);
14644
+ })(),
14872
14645
  path: "word/footnotes.xml"
14873
14646
  },
14874
14647
  FootNotesRelationships: {
14875
14648
  data: (() => {
14876
- footnoteMediaDatas.forEach((mediaData, i) => {
14877
- file.footNotes.relationships.addRelationship(footnoteRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${mediaData.fileName}`);
14878
- });
14649
+ for (let i = 0; i < footnoteMediaDatas.length; i++) file.footNotes.relationships.addRelationship(footnoteRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${footnoteMediaDatas[i].fileName}`);
14879
14650
  return this.formatter.formatToXml(file.footNotes.relationships, mkCtx(file.footNotes));
14880
14651
  })(),
14881
14652
  path: "word/_rels/footnotes.xml.rels"
@@ -14883,9 +14654,8 @@ var Compiler = class {
14883
14654
  FooterRelationships: file.footers.map((footerWrapper, index) => {
14884
14655
  const xmlData = this.formatter.formatToXml(footerWrapper.view, mkCtx(footerWrapper));
14885
14656
  footerFormattedViews.set(index, xmlData);
14886
- getReferencedMedia(xmlData, file.media.array).forEach((mediaData, i) => {
14887
- footerWrapper.relationships.addRelationship(i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${mediaData.fileName}`);
14888
- });
14657
+ const mediaDatas = getReferencedMedia(xmlData, file.media.array);
14658
+ for (let i = 0; i < mediaDatas.length; i++) footerWrapper.relationships.addRelationship(i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${mediaDatas[i].fileName}`);
14889
14659
  return {
14890
14660
  data: this.formatter.formatToXml(footerWrapper.relationships, mkCtx(footerWrapper)),
14891
14661
  path: `word/_rels/footer${index + 1}.xml.rels`
@@ -14902,9 +14672,8 @@ var Compiler = class {
14902
14672
  HeaderRelationships: file.headers.map((headerWrapper, index) => {
14903
14673
  const xmlData = this.formatter.formatToXml(headerWrapper.view, mkCtx(headerWrapper));
14904
14674
  headerFormattedViews.set(index, xmlData);
14905
- getReferencedMedia(xmlData, file.media.array).forEach((mediaData, i) => {
14906
- headerWrapper.relationships.addRelationship(i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${mediaData.fileName}`);
14907
- });
14675
+ const mediaDatas = getReferencedMedia(xmlData, file.media.array);
14676
+ for (let i = 0; i < mediaDatas.length; i++) headerWrapper.relationships.addRelationship(i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${mediaDatas[i].fileName}`);
14908
14677
  return {
14909
14678
  data: this.formatter.formatToXml(headerWrapper.relationships, mkCtx(headerWrapper)),
14910
14679
  path: `word/_rels/header${index + 1}.xml.rels`
@@ -14928,13 +14697,9 @@ var Compiler = class {
14928
14697
  },
14929
14698
  Relationships: {
14930
14699
  data: (() => {
14931
- documentMediaDatas.forEach((mediaData, i) => {
14932
- file.document.relationships.addRelationship(documentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${mediaData.fileName}`);
14933
- });
14700
+ for (let i = 0; i < documentMediaDatas.length; i++) file.document.relationships.addRelationship(documentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${documentMediaDatas[i].fileName}`);
14934
14701
  const chartOffset = documentRelationshipCount + documentMediaDatas.length;
14935
- file.charts.array.forEach((_chartData, i) => {
14936
- file.document.relationships.addRelationship(chartOffset + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", `charts/chart${i + 1}.xml`);
14937
- });
14702
+ for (let i = 0; i < file.charts.array.length; i++) file.document.relationships.addRelationship(chartOffset + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", `charts/chart${i + 1}.xml`);
14938
14703
  addSmartArtRelationships(file.smartArts.array.map((s) => s.key), (id, type, target) => {
14939
14704
  file.document.relationships.addRelationship(id, type, target);
14940
14705
  }, documentRelationshipCount + documentMediaDatas.length + file.charts.array.length, 0, {
@@ -14951,7 +14716,9 @@ var Compiler = class {
14951
14716
  path: "word/settings.xml"
14952
14717
  },
14953
14718
  Styles: {
14954
- data: replaceNumberingPlaceholders(this.formatter.formatToXml(file.styles, mkCtx(file.document)), file.numbering.concreteNumbering),
14719
+ data: (() => {
14720
+ return replaceNumberingPlaceholders(this.formatter.formatToXml(file.styles, mkCtx(file.document)), file.numbering.concreteNumbering);
14721
+ })(),
14955
14722
  path: "word/styles.xml"
14956
14723
  },
14957
14724
  ...file.bibliography ? { Bibliography: {
@@ -15241,7 +15008,7 @@ const createRelationshipFile = () => ({
15241
15008
  *
15242
15009
  * // Use detected placeholders to create patches
15243
15010
  * const patches = {};
15244
- * placeholders.forEach(key => {
15011
+ * for (const key of placeholders) {
15245
15012
  * patches[key] = {
15246
15013
  * type: PatchType.PARAGRAPH,
15247
15014
  * children: [new TextRun(getUserData(key))],
@@ -15257,7 +15024,7 @@ const patchDetector = async ({ data }) => {
15257
15024
  if (key.startsWith("word/") && !key.endsWith(".xml.rels")) {
15258
15025
  const json = toJson(strFromU8(value));
15259
15026
  const { traverse } = createTraverser(DOCX_NS);
15260
- traverse(json).forEach((p) => findPatchKeys(p.text).forEach((patch) => patches.add(patch)));
15027
+ for (const p of traverse(json)) for (const patch of findPatchKeys(p.text)) patches.add(patch);
15261
15028
  }
15262
15029
  }
15263
15030
  return [...patches];
@@ -16912,6 +16679,9 @@ function findDeep$1(parent, name) {
16912
16679
  //#endregion
16913
16680
  //#region src/parse/context.ts
16914
16681
  var ParseContext = class {
16682
+ docx;
16683
+ styleCache;
16684
+ numberingCache;
16915
16685
  constructor(docx, styleCache, numberingCache) {
16916
16686
  this.docx = docx;
16917
16687
  this.styleCache = styleCache;
@@ -17825,7 +17595,6 @@ var src_exports = /* @__PURE__ */ __exportAll({
17825
17595
  AltChunk: () => AltChunk,
17826
17596
  AltChunkCollection: () => AltChunkCollection,
17827
17597
  AnnotationReference: () => AnnotationReference,
17828
- Attributes: () => Attributes,
17829
17598
  BaseXmlComponent: () => BaseXmlComponent,
17830
17599
  Bdo: () => Bdo,
17831
17600
  Bibliography: () => Bibliography,
@@ -17960,7 +17729,6 @@ var src_exports = /* @__PURE__ */ __exportAll({
17960
17729
  MoveToRangeStart: () => MoveToRangeStart,
17961
17730
  MovedFromTextRun: () => MovedFromTextRun,
17962
17731
  MovedToTextRun: () => MovedToTextRun,
17963
- NextAttributeComponent: () => NextAttributeComponent,
17964
17732
  NoBreakHyphen: () => NoBreakHyphen,
17965
17733
  NumberFormat: () => NumberFormat,
17966
17734
  NumberProperties: () => NumberProperties,
@@ -18072,7 +17840,6 @@ var src_exports = /* @__PURE__ */ __exportAll({
18072
17840
  WidthType: () => WidthType,
18073
17841
  WpgGroupRun: () => WpgGroupRun,
18074
17842
  WpsShapeRun: () => WpsShapeRun,
18075
- XmlAttributeComponent: () => XmlAttributeComponent,
18076
17843
  XmlComponent: () => XmlComponent,
18077
17844
  YearLong: () => YearLong,
18078
17845
  YearShort: () => YearShort,
@@ -18219,6 +17986,6 @@ var src_exports = /* @__PURE__ */ __exportAll({
18219
17986
  __reExport(src_exports, file_exports);
18220
17987
  __reExport(src_exports, util_exports);
18221
17988
  //#endregion
18222
- export { AbstractNumbering, AlignmentType, AltChunk, AltChunkCollection, AnnotationReference, Attributes, BaseXmlComponent, Bdo, Bibliography, Body, Bookmark, BookmarkEnd, BookmarkStart, Border, BorderStyle, BuilderElement, COLOR_CATEGORIES, CarriageReturn, CellMerge, CharacterSet, ChartCollection, ChartRun, ChartSpace, CheckBox, CheckBoxSymbolElement, CheckBoxUtil, Column, ColumnBreak, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments, ConcreteHyperlink, ConcreteNumbering, ContinuationSeparator, DEFAULT_DRAWING_XML, DayLong, DayShort, DeletedTableCell, DeletedTableRow, DeletedTextRun, Dir, File as Document, File, DocumentAttributeNamespaces, DocumentBackground, DocumentDefaults, DocumentGridType, Drawing, DropCapType, EMPTY_OBJECT, EditGroupType, EmphasisMarkType, EmptyElement, EndnoteIdReference, EndnoteReference, EndnoteReferenceRun, Endnotes, ExternalHyperlink, FootNotes, Footer, FooterWrapper, FootnoteReference, FootnoteReferenceElement, FootnoteReferenceRun, FormFieldTextType, FractionType, FrameAnchorType, FrameWrap, GridSpan, Header, HeaderFooterReferenceType, HeaderFooterType, HeaderWrapper, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HyperlinkType, IgnoreIfEmptyXmlComponent, ImageRun, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InsertedTableCell, InsertedTableRow, InsertedTextRun, InternalHyperlink, LAYOUT_CATEGORIES, LastRenderedPageBreak, LeaderType, Level, LevelBase, LevelForOverride, LevelFormat, LevelOverride, LevelSuffix, LineNumberRestartFormat, LineRuleType, Math$1 as Math, MathAngledBrackets, MathBorderBox, MathBox, MathCurlyBrackets, MathDegree, MathDenominator, MathEqArr, MathFraction, MathFunction, MathFunctionName, MathGroupChr, MathIntegral, MathLimit, MathLimitLower, MathLimitUpper, MathMatrix, MathNumerator, MathParagraph, MathPhant, MathPreSubSuperScript, MathRadical, MathRadicalProperties, MathRoundBrackets, MathRun, MathSquareBrackets, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Media, MonthLong, MonthShort, MoveFromRangeEnd, MoveFromRangeStart, MoveToRangeEnd, MoveToRangeStart, MovedFromTextRun, MovedToTextRun, NextAttributeComponent, NoBreakHyphen, NumberFormat, NumberProperties, NumberedItemReference, NumberedItemReferenceFormat, Numbering, OverlapType, Packer, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBorders, PageBreak, PageBreakBefore, PageNumber, PageNumberElement, PageNumberSeparator, PageOrientation, PageReference, PageTextDirection, PageTextDirectionType, Paragraph, ParagraphProperties, ParagraphPropertiesChange, ParagraphPropertiesDefaults, ParagraphRunProperties, PatchType, PermEnd, PermStart, PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, RelativeHorizontalPosition, RelativeVerticalPosition, RubyAlign, Run, RunProperties, RunPropertiesChange, RunPropertiesDefaults, STYLE_CATEGORIES, SdtDateMappingType, SdtLock, SectionProperties, SectionPropertiesChange, SectionType, Separator, SequentialIdentifier, ShadingType, SimpleField, SimpleMailMergeField, SmartArtCollection, SmartArtRun, SoftHyphen, SpaceType, StructuredDocumentTagBlock, StructuredDocumentTagCell, StructuredDocumentTagContent, StructuredDocumentTagProperties, StructuredDocumentTagRow, StructuredDocumentTagRun, StyleForCharacter, StyleForParagraph, StyleLevel, Styles, SubDoc, SubDocCollection, SymbolRun, TDirection, Tab, TabStopPosition, TabStopType, Table, TableAnchorType, TableBorders, TableCell, TableCellBorders, TableLayoutType, TableOfContents, TableProperties, TablePropertyExceptions, TableRow, TableRowProperties, TableRowPropertiesChange, TextAlignmentType, TextBodyWrappingType, TextDirection, TextEffect, TextHorzOverflowType, TextRun, TextVertOverflowType, TextVerticalType, TextWrappingSide, TextWrappingType, Textbox, TextboxTightWrapType, ThematicBreak, UnderlineType, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMerge, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WORKAROUND4, WidthType, WpgGroupRun, WpsShapeRun, XmlAttributeComponent, XmlComponent, YearLong, YearShort, abstractNumUniqueNumericIdGen, attrObj, bookmarkUniqueNumericIdGen, buildBorderObj, buildCellMergeObj, buildCnfStyleObj, buildDeletedTableCellObj, buildDeletedTableRowObj, buildDivIdObj, buildDocumentAttributes, buildEmphasisMarkObj, buildFramePropertiesObj, buildGridSpan, buildIndentObj, buildInsertedTableCellObj, buildInsertedTableRowObj, buildNumberProperties, buildOutlineLevelObj, buildParagraphBorders, buildParagraphProperties, buildRunFontsObj, buildRunProperties, buildShadingObj, buildSpacingObj, buildTabStopObj, buildTableBorders, buildTableCellBorders, buildTableFloatPropertiesObj, buildTableProperties, buildTableRowProperties, buildTableRowPropertiesChangeObj, buildTableWidthObj, buildTextDirection, buildThematicBreakObj, buildUnderlineObj, buildVerticalMerge, chartAttr, coerceMathJson, coerceSectionChild, concreteNumUniqueNumericIdGen, convertInchesToTwip, convertMillimetersToTwip, convertToXmlComponent, createAlignment, createBodyProperties, createBorderElement, createBreak, createCnfStyle, createColumns, createDataModel, createDivId, createDocumentGrid, createDotEmphasisMark, createEmphasisMark, createFormFieldData, createFrameProperties, createHeaderFooterReference, createHorizontalPosition, createIndent, createLineNumberType, createMathAccent, createMathAccentCharacter, createMathAccentProperties, createMathBar, createMathBarProperties, createMathBase, createMathBorderBoxProperties, createMathBoxProperties, createMathControlProperties, createMathEqArrProperties, createMathFractionProperties, createMathFunctionProperties, createMathGroupChrProperties, createMathLimitLocation, createMathLimitLowProperties, createMathLimitUpperProperties, createMathMatrixProperties, createMathNAryProperties, createMathPhantProperties, createMathPreSubSuperScriptProperties, createMathProperties, createMathRunProperties, createMathSubScriptElement, createMathSubScriptProperties, createMathSubSuperScriptProperties, createMathSuperScriptElement, createMathSuperScriptProperties, createOutlineLevel, createPageMargin, createPageNumberType, createPageSize, createParagraphStyle, createRuby, createRunFonts, createSectionType, createShading, createSimplePos, createSpacing, createStringElement, createTabStop, createTabStopItem, createTableFloatProperties, createTableLayout, createTableLook, createTableOverlap, createTableRowHeight, createTableWidthElement, createTransformation, createUnderline, createVerticalAlign, createVerticalPosition, createWrapNone, createWrapSquare, createWrapThrough, createWrapTight, createWrapTopAndBottom, docPropertiesUniqueNumericIdGen, getColorXml, getLayoutXml, getStyleXml, hashedId, hpsMeasureObj, numberValObj, onOffObj, parseArchive, parseDocument, parseDocx, parseMathChildren, patchDetector, patchDocument, sectionMarginDefaults, sectionPageSizeDefaults, stringContainerObj, stringEnumValObj, stringValObj, uniqueId, uniqueNumericIdCreator, uniqueUuid, wrapEl };
17989
+ export { AbstractNumbering, AlignmentType, AltChunk, AltChunkCollection, AnnotationReference, BaseXmlComponent, Bdo, Bibliography, Body, Bookmark, BookmarkEnd, BookmarkStart, Border, BorderStyle, BuilderElement, COLOR_CATEGORIES, CarriageReturn, CellMerge, CharacterSet, ChartCollection, ChartRun, ChartSpace, CheckBox, CheckBoxSymbolElement, CheckBoxUtil, Column, ColumnBreak, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments, ConcreteHyperlink, ConcreteNumbering, ContinuationSeparator, DEFAULT_DRAWING_XML, DayLong, DayShort, DeletedTableCell, DeletedTableRow, DeletedTextRun, Dir, File as Document, File, DocumentAttributeNamespaces, DocumentBackground, DocumentDefaults, DocumentGridType, Drawing, DropCapType, EMPTY_OBJECT, EditGroupType, EmphasisMarkType, EmptyElement, EndnoteIdReference, EndnoteReference, EndnoteReferenceRun, Endnotes, ExternalHyperlink, FootNotes, Footer, FooterWrapper, FootnoteReference, FootnoteReferenceElement, FootnoteReferenceRun, FormFieldTextType, FractionType, FrameAnchorType, FrameWrap, GridSpan, Header, HeaderFooterReferenceType, HeaderFooterType, HeaderWrapper, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HyperlinkType, IgnoreIfEmptyXmlComponent, ImageRun, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InsertedTableCell, InsertedTableRow, InsertedTextRun, InternalHyperlink, LAYOUT_CATEGORIES, LastRenderedPageBreak, LeaderType, Level, LevelBase, LevelForOverride, LevelFormat, LevelOverride, LevelSuffix, LineNumberRestartFormat, LineRuleType, Math$1 as Math, MathAngledBrackets, MathBorderBox, MathBox, MathCurlyBrackets, MathDegree, MathDenominator, MathEqArr, MathFraction, MathFunction, MathFunctionName, MathGroupChr, MathIntegral, MathLimit, MathLimitLower, MathLimitUpper, MathMatrix, MathNumerator, MathParagraph, MathPhant, MathPreSubSuperScript, MathRadical, MathRadicalProperties, MathRoundBrackets, MathRun, MathSquareBrackets, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Media, MonthLong, MonthShort, MoveFromRangeEnd, MoveFromRangeStart, MoveToRangeEnd, MoveToRangeStart, MovedFromTextRun, MovedToTextRun, NoBreakHyphen, NumberFormat, NumberProperties, NumberedItemReference, NumberedItemReferenceFormat, Numbering, OverlapType, Packer, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBorders, PageBreak, PageBreakBefore, PageNumber, PageNumberElement, PageNumberSeparator, PageOrientation, PageReference, PageTextDirection, PageTextDirectionType, Paragraph, ParagraphProperties, ParagraphPropertiesChange, ParagraphPropertiesDefaults, ParagraphRunProperties, PatchType, PermEnd, PermStart, PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, RelativeHorizontalPosition, RelativeVerticalPosition, RubyAlign, Run, RunProperties, RunPropertiesChange, RunPropertiesDefaults, STYLE_CATEGORIES, SdtDateMappingType, SdtLock, SectionProperties, SectionPropertiesChange, SectionType, Separator, SequentialIdentifier, ShadingType, SimpleField, SimpleMailMergeField, SmartArtCollection, SmartArtRun, SoftHyphen, SpaceType, StructuredDocumentTagBlock, StructuredDocumentTagCell, StructuredDocumentTagContent, StructuredDocumentTagProperties, StructuredDocumentTagRow, StructuredDocumentTagRun, StyleForCharacter, StyleForParagraph, StyleLevel, Styles, SubDoc, SubDocCollection, SymbolRun, TDirection, Tab, TabStopPosition, TabStopType, Table, TableAnchorType, TableBorders, TableCell, TableCellBorders, TableLayoutType, TableOfContents, TableProperties, TablePropertyExceptions, TableRow, TableRowProperties, TableRowPropertiesChange, TextAlignmentType, TextBodyWrappingType, TextDirection, TextEffect, TextHorzOverflowType, TextRun, TextVertOverflowType, TextVerticalType, TextWrappingSide, TextWrappingType, Textbox, TextboxTightWrapType, ThematicBreak, UnderlineType, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMerge, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WORKAROUND4, WidthType, WpgGroupRun, WpsShapeRun, XmlComponent, YearLong, YearShort, abstractNumUniqueNumericIdGen, attrObj, bookmarkUniqueNumericIdGen, buildBorderObj, buildCellMergeObj, buildCnfStyleObj, buildDeletedTableCellObj, buildDeletedTableRowObj, buildDivIdObj, buildDocumentAttributes, buildEmphasisMarkObj, buildFramePropertiesObj, buildGridSpan, buildIndentObj, buildInsertedTableCellObj, buildInsertedTableRowObj, buildNumberProperties, buildOutlineLevelObj, buildParagraphBorders, buildParagraphProperties, buildRunFontsObj, buildRunProperties, buildShadingObj, buildSpacingObj, buildTabStopObj, buildTableBorders, buildTableCellBorders, buildTableFloatPropertiesObj, buildTableProperties, buildTableRowProperties, buildTableRowPropertiesChangeObj, buildTableWidthObj, buildTextDirection, buildThematicBreakObj, buildUnderlineObj, buildVerticalMerge, chartAttr, coerceMathJson, coerceSectionChild, concreteNumUniqueNumericIdGen, convertInchesToTwip, convertMillimetersToTwip, convertToXmlComponent, createAlignment, createBodyProperties, createBorderElement, createBreak, createCnfStyle, createColumns, createDataModel, createDivId, createDocumentGrid, createDotEmphasisMark, createEmphasisMark, createFormFieldData, createFrameProperties, createHeaderFooterReference, createHorizontalPosition, createIndent, createLineNumberType, createMathAccent, createMathAccentCharacter, createMathAccentProperties, createMathBar, createMathBarProperties, createMathBase, createMathBorderBoxProperties, createMathBoxProperties, createMathControlProperties, createMathEqArrProperties, createMathFractionProperties, createMathFunctionProperties, createMathGroupChrProperties, createMathLimitLocation, createMathLimitLowProperties, createMathLimitUpperProperties, createMathMatrixProperties, createMathNAryProperties, createMathPhantProperties, createMathPreSubSuperScriptProperties, createMathProperties, createMathRunProperties, createMathSubScriptElement, createMathSubScriptProperties, createMathSubSuperScriptProperties, createMathSuperScriptElement, createMathSuperScriptProperties, createOutlineLevel, createPageMargin, createPageNumberType, createPageSize, createParagraphStyle, createRuby, createRunFonts, createSectionType, createShading, createSimplePos, createSpacing, createStringElement, createTabStop, createTabStopItem, createTableFloatProperties, createTableLayout, createTableLook, createTableOverlap, createTableRowHeight, createTableWidthElement, createTransformation, createUnderline, createVerticalAlign, createVerticalPosition, createWrapNone, createWrapSquare, createWrapThrough, createWrapTight, createWrapTopAndBottom, docPropertiesUniqueNumericIdGen, getColorXml, getLayoutXml, getStyleXml, hashedId, hpsMeasureObj, numberValObj, onOffObj, parseArchive, parseDocument, parseDocx, parseMathChildren, patchDetector, patchDocument, sectionMarginDefaults, sectionPageSizeDefaults, stringContainerObj, stringEnumValObj, stringValObj, uniqueId, uniqueNumericIdCreator, uniqueUuid, wrapEl };
18223
17990
 
18224
17991
  //# sourceMappingURL=index.mjs.map