@harbour-enterprises/superdoc 1.5.0 → 1.6.0-next.2

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.
@@ -4410,6 +4410,60 @@ const COMMENTS_XML_DEF = {
4410
4410
  }
4411
4411
  ]
4412
4412
  };
4413
+ const FOOTNOTES_XML_DEF = {
4414
+ declaration: {
4415
+ attributes: {
4416
+ version: "1.0",
4417
+ encoding: "UTF-8",
4418
+ standalone: "yes"
4419
+ }
4420
+ },
4421
+ elements: [
4422
+ {
4423
+ type: "element",
4424
+ name: "w:footnotes",
4425
+ attributes: {
4426
+ "xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
4427
+ "xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex",
4428
+ "xmlns:cx1": "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",
4429
+ "xmlns:cx2": "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",
4430
+ "xmlns:cx3": "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",
4431
+ "xmlns:cx4": "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",
4432
+ "xmlns:cx5": "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",
4433
+ "xmlns:cx6": "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",
4434
+ "xmlns:cx7": "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",
4435
+ "xmlns:cx8": "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",
4436
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
4437
+ "xmlns:aink": "http://schemas.microsoft.com/office/drawing/2016/ink",
4438
+ "xmlns:am3d": "http://schemas.microsoft.com/office/drawing/2017/model3d",
4439
+ "xmlns:o": "urn:schemas-microsoft-com:office:office",
4440
+ "xmlns:oel": "http://schemas.microsoft.com/office/2019/extlst",
4441
+ "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
4442
+ "xmlns:m": "http://schemas.openxmlformats.org/officeDocument/2006/math",
4443
+ "xmlns:v": "urn:schemas-microsoft-com:vml",
4444
+ "xmlns:wp14": "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",
4445
+ "xmlns:wp": "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
4446
+ "xmlns:w10": "urn:schemas-microsoft-com:office:word",
4447
+ "xmlns:w": "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
4448
+ "xmlns:w14": "http://schemas.microsoft.com/office/word/2010/wordml",
4449
+ "xmlns:w15": "http://schemas.microsoft.com/office/word/2012/wordml",
4450
+ "xmlns:w16cex": "http://schemas.microsoft.com/office/word/2018/wordml/cex",
4451
+ "xmlns:w16cid": "http://schemas.microsoft.com/office/word/2016/wordml/cid",
4452
+ "xmlns:w16": "http://schemas.microsoft.com/office/word/2018/wordml",
4453
+ "xmlns:w16du": "http://schemas.microsoft.com/office/word/2023/wordml/word16du",
4454
+ "xmlns:w16sdtdh": "http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",
4455
+ "xmlns:w16sdtfl": "http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock",
4456
+ "xmlns:w16se": "http://schemas.microsoft.com/office/word/2015/wordml/symex",
4457
+ "xmlns:wpg": "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",
4458
+ "xmlns:wpi": "http://schemas.microsoft.com/office/word/2010/wordprocessingInk",
4459
+ "xmlns:wne": "http://schemas.microsoft.com/office/word/2006/wordml",
4460
+ "xmlns:wps": "http://schemas.microsoft.com/office/word/2010/wordprocessingShape",
4461
+ "mc:Ignorable": "w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"
4462
+ },
4463
+ elements: []
4464
+ }
4465
+ ]
4466
+ };
4413
4467
  const COMMENTS_EXTENDED_XML_DEF = {
4414
4468
  declaration: {
4415
4469
  attributes: {
@@ -6240,37 +6294,37 @@ class NodeTranslator {
6240
6294
  return `NodeTranslator(${this.xmlName}, priority=${this.priority})`;
6241
6295
  }
6242
6296
  }
6243
- const encode$_ = (attributes) => {
6297
+ const encode$11 = (attributes) => {
6244
6298
  return attributes["w:type"];
6245
6299
  };
6246
- const decode$10 = (attrs) => {
6300
+ const decode$13 = (attrs) => {
6247
6301
  const { lineBreakType } = attrs;
6248
6302
  return lineBreakType;
6249
6303
  };
6250
- const attrConfig$z = Object.freeze({
6304
+ const attrConfig$B = Object.freeze({
6251
6305
  xmlName: "w:type",
6252
6306
  sdName: "lineBreakType",
6253
- encode: encode$_,
6254
- decode: decode$10
6307
+ encode: encode$11,
6308
+ decode: decode$13
6255
6309
  });
6256
- const encode$Z = (attributes) => {
6310
+ const encode$10 = (attributes) => {
6257
6311
  const xmlAttrValue = attributes["w:clear"];
6258
6312
  return xmlAttrValue;
6259
6313
  };
6260
- const decode$$ = (attrs) => {
6314
+ const decode$12 = (attrs) => {
6261
6315
  const { clear } = attrs;
6262
6316
  return clear;
6263
6317
  };
6264
- const attrConfig$y = Object.freeze({
6318
+ const attrConfig$A = Object.freeze({
6265
6319
  xmlName: "w:clear",
6266
6320
  sdName: "clear",
6267
- encode: encode$Z,
6268
- decode: decode$$
6321
+ encode: encode$10,
6322
+ decode: decode$12
6269
6323
  });
6270
- const validXmlAttributes$j = [attrConfig$z, attrConfig$y];
6271
- const XML_NODE_NAME$s = "w:br";
6272
- const SD_NODE_NAME$m = "lineBreak";
6273
- const encode$Y = (_2, encodedAttrs) => {
6324
+ const validXmlAttributes$j = [attrConfig$B, attrConfig$A];
6325
+ const XML_NODE_NAME$t = "w:br";
6326
+ const SD_NODE_NAME$n = "lineBreak";
6327
+ const encode$$ = (_2, encodedAttrs) => {
6274
6328
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
6275
6329
  const translated = {
6276
6330
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -6280,7 +6334,7 @@ const encode$Y = (_2, encodedAttrs) => {
6280
6334
  }
6281
6335
  return translated;
6282
6336
  };
6283
- const decode$_ = (params, decodedAttrs) => {
6337
+ const decode$11 = (params, decodedAttrs) => {
6284
6338
  const { node } = params;
6285
6339
  if (!node) return;
6286
6340
  const wBreak = { name: "w:br" };
@@ -6297,39 +6351,39 @@ const decode$_ = (params, decodedAttrs) => {
6297
6351
  };
6298
6352
  return translated;
6299
6353
  };
6300
- const config$r = {
6301
- xmlName: XML_NODE_NAME$s,
6302
- sdNodeOrKeyName: SD_NODE_NAME$m,
6354
+ const config$s = {
6355
+ xmlName: XML_NODE_NAME$t,
6356
+ sdNodeOrKeyName: SD_NODE_NAME$n,
6303
6357
  type: NodeTranslator.translatorTypes.NODE,
6304
- encode: encode$Y,
6305
- decode: decode$_,
6358
+ encode: encode$$,
6359
+ decode: decode$11,
6306
6360
  attributes: validXmlAttributes$j
6307
6361
  };
6308
- const translator$2s = NodeTranslator.from(config$r);
6309
- const encode$X = (attributes) => attributes?.["w:val"];
6310
- const decode$Z = (attrs) => attrs?.highlight;
6311
- const attrConfig$x = Object.freeze({
6362
+ const translator$2t = NodeTranslator.from(config$s);
6363
+ const encode$_ = (attributes) => attributes?.["w:val"];
6364
+ const decode$10 = (attrs) => attrs?.highlight;
6365
+ const attrConfig$z = Object.freeze({
6312
6366
  xmlName: "w:val",
6313
6367
  sdName: "highlight",
6314
- encode: encode$X,
6315
- decode: decode$Z
6368
+ encode: encode$_,
6369
+ decode: decode$10
6316
6370
  });
6317
- const validXmlAttributes$i = [attrConfig$x];
6318
- const XML_NODE_NAME$r = "w:highlight";
6371
+ const validXmlAttributes$i = [attrConfig$z];
6372
+ const XML_NODE_NAME$s = "w:highlight";
6319
6373
  const SD_ATTR_KEY$4 = "highlight";
6320
6374
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
6321
- const encode$W = (params, encodedAttrs = {}) => {
6375
+ const encode$Z = (params, encodedAttrs = {}) => {
6322
6376
  const { nodes } = params;
6323
6377
  const node = nodes?.[0];
6324
6378
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
6325
6379
  return {
6326
6380
  type: "attr",
6327
- xmlName: XML_NODE_NAME$r,
6381
+ xmlName: XML_NODE_NAME$s,
6328
6382
  sdNodeOrKeyName: SD_ATTR_KEY$4,
6329
6383
  attributes: { "w:val": value ?? null }
6330
6384
  };
6331
6385
  };
6332
- const decode$Y = (params) => {
6386
+ const decode$$ = (params) => {
6333
6387
  const attrs = params?.node?.attrs || {};
6334
6388
  const highlightValue = attrs.highlight?.["w:val"] ?? attrs.highlight ?? attrs.color ?? null;
6335
6389
  if (!highlightValue) return void 0;
@@ -6337,14 +6391,14 @@ const decode$Y = (params) => {
6337
6391
  if (!normalizedValue) return void 0;
6338
6392
  if (DISABLED_TOKENS.has(normalizedValue)) {
6339
6393
  return {
6340
- name: XML_NODE_NAME$r,
6394
+ name: XML_NODE_NAME$s,
6341
6395
  attributes: { "w:val": "none" }
6342
6396
  };
6343
6397
  }
6344
6398
  const keyword = helpers.getDocxHighlightKeywordFromHex(highlightValue);
6345
6399
  if (keyword) {
6346
6400
  return {
6347
- name: XML_NODE_NAME$r,
6401
+ name: XML_NODE_NAME$s,
6348
6402
  attributes: { "w:val": keyword }
6349
6403
  };
6350
6404
  }
@@ -6359,64 +6413,64 @@ const decode$Y = (params) => {
6359
6413
  }
6360
6414
  };
6361
6415
  };
6362
- const config$q = {
6363
- xmlName: XML_NODE_NAME$r,
6416
+ const config$r = {
6417
+ xmlName: XML_NODE_NAME$s,
6364
6418
  sdNodeOrKeyName: SD_ATTR_KEY$4,
6365
6419
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
6366
- encode: encode$W,
6367
- decode: decode$Y,
6420
+ encode: encode$Z,
6421
+ decode: decode$$,
6368
6422
  attributes: validXmlAttributes$i
6369
6423
  };
6370
- const translator$2r = NodeTranslator.from(config$q);
6371
- const encode$V = (attributes) => {
6424
+ const translator$2s = NodeTranslator.from(config$r);
6425
+ const encode$Y = (attributes) => {
6372
6426
  return attributes["w:val"];
6373
6427
  };
6374
- const decode$X = (attrs) => {
6428
+ const decode$_ = (attrs) => {
6375
6429
  const { tabType } = attrs || {};
6376
6430
  return tabType;
6377
6431
  };
6378
- const attrConfig$w = Object.freeze({
6432
+ const attrConfig$y = Object.freeze({
6379
6433
  xmlName: "w:val",
6380
6434
  sdName: "tabType",
6381
- encode: encode$V,
6382
- decode: decode$X
6435
+ encode: encode$Y,
6436
+ decode: decode$_
6383
6437
  });
6384
- const encode$U = (attributes) => {
6438
+ const encode$X = (attributes) => {
6385
6439
  return attributes["w:leader"];
6386
6440
  };
6387
- const decode$W = (attrs) => {
6441
+ const decode$Z = (attrs) => {
6388
6442
  const { leader } = attrs || {};
6389
6443
  return leader;
6390
6444
  };
6391
- const attrConfig$v = Object.freeze({
6445
+ const attrConfig$x = Object.freeze({
6392
6446
  xmlName: "w:leader",
6393
6447
  sdName: "leader",
6394
- encode: encode$U,
6395
- decode: decode$W
6448
+ encode: encode$X,
6449
+ decode: decode$Z
6396
6450
  });
6397
- const encode$T = (attributes) => {
6451
+ const encode$W = (attributes) => {
6398
6452
  if (attributes["w:pos"] != null) return parseInt(attributes["w:pos"]);
6399
6453
  return null;
6400
6454
  };
6401
- const decode$V = (attrs) => {
6455
+ const decode$Y = (attrs) => {
6402
6456
  const { pos } = attrs || {};
6403
6457
  return pos?.toString();
6404
6458
  };
6405
- const attrConfig$u = Object.freeze({
6459
+ const attrConfig$w = Object.freeze({
6406
6460
  xmlName: "w:pos",
6407
6461
  sdName: "pos",
6408
- encode: encode$T,
6409
- decode: decode$V
6462
+ encode: encode$W,
6463
+ decode: decode$Y
6410
6464
  });
6411
- const validXmlAttributes$h = [attrConfig$w, attrConfig$u, attrConfig$v];
6412
- const XML_NODE_NAME$q = "w:tab";
6413
- const SD_NODE_NAME$l = "tab";
6414
- const encode$S = (_2, encodedAttrs = {}) => {
6465
+ const validXmlAttributes$h = [attrConfig$y, attrConfig$w, attrConfig$x];
6466
+ const XML_NODE_NAME$r = "w:tab";
6467
+ const SD_NODE_NAME$m = "tab";
6468
+ const encode$V = (_2, encodedAttrs = {}) => {
6415
6469
  const translated = { type: "tab" };
6416
6470
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
6417
6471
  return translated;
6418
6472
  };
6419
- function decode$U(params, decodedAttrs = {}) {
6473
+ function decode$X(params, decodedAttrs = {}) {
6420
6474
  const { node } = params || {};
6421
6475
  if (!node) return;
6422
6476
  const wTab = { name: "w:tab", elements: [] };
@@ -6438,15 +6492,15 @@ function decode$U(params, decodedAttrs = {}) {
6438
6492
  }
6439
6493
  return translated;
6440
6494
  }
6441
- const config$p = {
6442
- xmlName: XML_NODE_NAME$q,
6443
- sdNodeOrKeyName: SD_NODE_NAME$l,
6495
+ const config$q = {
6496
+ xmlName: XML_NODE_NAME$r,
6497
+ sdNodeOrKeyName: SD_NODE_NAME$m,
6444
6498
  type: NodeTranslator.translatorTypes.NODE,
6445
- encode: encode$S,
6446
- decode: decode$U,
6499
+ encode: encode$V,
6500
+ decode: decode$X,
6447
6501
  attributes: validXmlAttributes$h
6448
6502
  };
6449
- const translator$2q = NodeTranslator.from(config$p);
6503
+ const translator$2r = NodeTranslator.from(config$q);
6450
6504
  const carbonCopy = (obj) => {
6451
6505
  if (!obj) return void 0;
6452
6506
  try {
@@ -6772,54 +6826,54 @@ const integerToString = (value) => {
6772
6826
  const intValue = parseInteger(value);
6773
6827
  return intValue != void 0 ? String(intValue) : void 0;
6774
6828
  };
6775
- const translator$2p = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
6776
- const translator$2o = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
6777
- const translator$2n = NodeTranslator.from(createBorderPropertyHandler("w:bdr", "borders"));
6778
- const translator$2m = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
6779
- const encode$R = (attributes) => attributes?.["w:val"];
6780
- const decode$T = (attrs) => attrs?.underline;
6781
- const attrConfig$t = Object.freeze({
6829
+ const translator$2q = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
6830
+ const translator$2p = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
6831
+ const translator$2o = NodeTranslator.from(createBorderPropertyHandler("w:bdr", "borders"));
6832
+ const translator$2n = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
6833
+ const encode$U = (attributes) => attributes?.["w:val"];
6834
+ const decode$W = (attrs) => attrs?.underline;
6835
+ const attrConfig$v = Object.freeze({
6782
6836
  xmlName: "w:val",
6783
6837
  sdName: "underline",
6784
- encode: encode$R,
6785
- decode: decode$T
6838
+ encode: encode$U,
6839
+ decode: decode$W
6786
6840
  });
6787
- const encode$Q = (attributes) => attributes?.["w:color"];
6788
- const decode$S = (attrs) => attrs?.color;
6789
- const attrConfig$s = Object.freeze({
6841
+ const encode$T = (attributes) => attributes?.["w:color"];
6842
+ const decode$V = (attrs) => attrs?.color;
6843
+ const attrConfig$u = Object.freeze({
6790
6844
  xmlName: "w:color",
6791
6845
  sdName: "color",
6792
- encode: encode$Q,
6793
- decode: decode$S
6846
+ encode: encode$T,
6847
+ decode: decode$V
6794
6848
  });
6795
- const encode$P = (attributes) => attributes?.["w:themeColor"];
6796
- const decode$R = (attrs) => attrs?.themeColor;
6797
- const attrConfig$r = Object.freeze({
6849
+ const encode$S = (attributes) => attributes?.["w:themeColor"];
6850
+ const decode$U = (attrs) => attrs?.themeColor;
6851
+ const attrConfig$t = Object.freeze({
6798
6852
  xmlName: "w:themeColor",
6799
6853
  sdName: "themeColor",
6800
- encode: encode$P,
6801
- decode: decode$R
6854
+ encode: encode$S,
6855
+ decode: decode$U
6802
6856
  });
6803
- const encode$O = (attributes) => attributes?.["w:themeTint"];
6804
- const decode$Q = (attrs) => attrs?.themeTint;
6805
- const attrConfig$q = Object.freeze({
6857
+ const encode$R = (attributes) => attributes?.["w:themeTint"];
6858
+ const decode$T = (attrs) => attrs?.themeTint;
6859
+ const attrConfig$s = Object.freeze({
6806
6860
  xmlName: "w:themeTint",
6807
6861
  sdName: "themeTint",
6808
- encode: encode$O,
6809
- decode: decode$Q
6862
+ encode: encode$R,
6863
+ decode: decode$T
6810
6864
  });
6811
- const encode$N = (attributes) => attributes?.["w:themeShade"];
6812
- const decode$P = (attrs) => attrs?.themeShade;
6813
- const attrConfig$p = Object.freeze({
6865
+ const encode$Q = (attributes) => attributes?.["w:themeShade"];
6866
+ const decode$S = (attrs) => attrs?.themeShade;
6867
+ const attrConfig$r = Object.freeze({
6814
6868
  xmlName: "w:themeShade",
6815
6869
  sdName: "themeShade",
6816
- encode: encode$N,
6817
- decode: decode$P
6870
+ encode: encode$Q,
6871
+ decode: decode$S
6818
6872
  });
6819
- const validXmlAttributes$g = [attrConfig$t, attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p];
6820
- const XML_NODE_NAME$p = "w:u";
6873
+ const validXmlAttributes$g = [attrConfig$v, attrConfig$u, attrConfig$t, attrConfig$s, attrConfig$r];
6874
+ const XML_NODE_NAME$q = "w:u";
6821
6875
  const SD_ATTR_KEY$3 = "underline";
6822
- const encode$M = (params, encodedAttrs = {}) => {
6876
+ const encode$P = (params, encodedAttrs = {}) => {
6823
6877
  const { nodes } = params;
6824
6878
  const node = nodes?.[0];
6825
6879
  const sourceAttrs = node?.attributes || {};
@@ -6835,12 +6889,12 @@ const encode$M = (params, encodedAttrs = {}) => {
6835
6889
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
6836
6890
  return {
6837
6891
  type: "attr",
6838
- xmlName: XML_NODE_NAME$p,
6892
+ xmlName: XML_NODE_NAME$q,
6839
6893
  sdNodeOrKeyName: SD_ATTR_KEY$3,
6840
6894
  attributes
6841
6895
  };
6842
6896
  };
6843
- const decode$O = (params) => {
6897
+ const decode$R = (params) => {
6844
6898
  const attrs = params?.node?.attrs?.underline || params?.node?.attrs || {};
6845
6899
  const underlineType = attrs.underlineType ?? attrs.underline ?? attrs["w:val"] ?? null;
6846
6900
  const color = attrs.underlineColor ?? attrs.color ?? attrs["w:color"] ?? null;
@@ -6858,22 +6912,22 @@ const decode$O = (params) => {
6858
6912
  if (themeTint) attributes["w:themeTint"] = themeTint;
6859
6913
  if (themeShade) attributes["w:themeShade"] = themeShade;
6860
6914
  return {
6861
- name: XML_NODE_NAME$p,
6915
+ name: XML_NODE_NAME$q,
6862
6916
  attributes
6863
6917
  };
6864
6918
  };
6865
- const config$o = {
6866
- xmlName: XML_NODE_NAME$p,
6919
+ const config$p = {
6920
+ xmlName: XML_NODE_NAME$q,
6867
6921
  sdNodeOrKeyName: SD_ATTR_KEY$3,
6868
6922
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
6869
- encode: encode$M,
6870
- decode: decode$O,
6923
+ encode: encode$P,
6924
+ decode: decode$R,
6871
6925
  attributes: validXmlAttributes$g
6872
6926
  };
6873
- const translator$2l = NodeTranslator.from(config$o);
6874
- const translator$2k = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
6875
- const translator$2j = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
6876
- const translator$2i = NodeTranslator.from({
6927
+ const translator$2m = NodeTranslator.from(config$p);
6928
+ const translator$2l = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
6929
+ const translator$2k = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
6930
+ const translator$2j = NodeTranslator.from({
6877
6931
  xmlName: "w:color",
6878
6932
  sdNodeOrKeyName: "color",
6879
6933
  attributes: [
@@ -6890,7 +6944,7 @@ const translator$2i = NodeTranslator.from({
6890
6944
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
6891
6945
  }
6892
6946
  });
6893
- const translator$2h = NodeTranslator.from({
6947
+ const translator$2i = NodeTranslator.from({
6894
6948
  xmlName: "w:rFonts",
6895
6949
  sdNodeOrKeyName: "fontFamily",
6896
6950
  attributes: [
@@ -6921,16 +6975,16 @@ const translator$2h = NodeTranslator.from({
6921
6975
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
6922
6976
  }
6923
6977
  });
6924
- const translator$2g = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
6925
- const translator$2f = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
6926
- const translator$2e = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
6927
- const translator$2d = NodeTranslator.from({
6978
+ const translator$2h = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
6979
+ const translator$2g = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
6980
+ const translator$2f = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
6981
+ const translator$2e = NodeTranslator.from({
6928
6982
  xmlName: "w:caps",
6929
6983
  sdNodeOrKeyName: "textTransform",
6930
6984
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1") ? "uppercase" : "none",
6931
6985
  decode: ({ node }) => node.attrs["textTransform"] != null ? { name: "w:caps", attributes: { "w:val": booleanToString(node.attrs["textTransform"] === "uppercase") } } : void 0
6932
6986
  });
6933
- const translator$2c = NodeTranslator.from({
6987
+ const translator$2d = NodeTranslator.from({
6934
6988
  xmlName: "w:shd",
6935
6989
  sdNodeOrKeyName: "shading",
6936
6990
  attributes: [
@@ -6952,7 +7006,7 @@ const translator$2c = NodeTranslator.from({
6952
7006
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
6953
7007
  }
6954
7008
  });
6955
- const translator$2b = NodeTranslator.from({
7009
+ const translator$2c = NodeTranslator.from({
6956
7010
  xmlName: "w:lang",
6957
7011
  sdNodeOrKeyName: "lang",
6958
7012
  attributes: [createAttributeHandler("w:val"), createAttributeHandler("w:eastAsia"), createAttributeHandler("w:bidi")],
@@ -6964,24 +7018,24 @@ const translator$2b = NodeTranslator.from({
6964
7018
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
6965
7019
  }
6966
7020
  });
6967
- const translator$2a = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
6968
- const translator$29 = NodeTranslator.from(createSingleAttrPropertyHandler("w:vertAlign"));
6969
- const translator$28 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:smallCaps"));
6970
- const translator$27 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
6971
- const translator$26 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:emboss"));
6972
- const translator$25 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:imprint"));
6973
- const translator$24 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:noProof"));
6974
- const translator$23 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:oMath"));
6975
- const translator$22 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:outline"));
6976
- const translator$21 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:shadow"));
6977
- const translator$20 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:vanish"));
6978
- const translator$1$ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:specVanish"));
6979
- const translator$1_ = NodeTranslator.from(createSingleAttrPropertyHandler("w:effect"));
6980
- const translator$1Z = NodeTranslator.from(createSingleAttrPropertyHandler("w:em"));
6981
- const translator$1Y = NodeTranslator.from(createSingleAttrPropertyHandler("w:w"));
6982
- const translator$1X = NodeTranslator.from(createSingleIntegerPropertyHandler("w:kern"));
6983
- const translator$1W = NodeTranslator.from(createSingleIntegerPropertyHandler("w:position"));
6984
- const translator$1V = NodeTranslator.from({
7021
+ const translator$2b = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
7022
+ const translator$2a = NodeTranslator.from(createSingleAttrPropertyHandler("w:vertAlign"));
7023
+ const translator$29 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:smallCaps"));
7024
+ const translator$28 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
7025
+ const translator$27 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:emboss"));
7026
+ const translator$26 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:imprint"));
7027
+ const translator$25 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:noProof"));
7028
+ const translator$24 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:oMath"));
7029
+ const translator$23 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:outline"));
7030
+ const translator$22 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:shadow"));
7031
+ const translator$21 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:vanish"));
7032
+ const translator$20 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:specVanish"));
7033
+ const translator$1$ = NodeTranslator.from(createSingleAttrPropertyHandler("w:effect"));
7034
+ const translator$1_ = NodeTranslator.from(createSingleAttrPropertyHandler("w:em"));
7035
+ const translator$1Z = NodeTranslator.from(createSingleAttrPropertyHandler("w:w"));
7036
+ const translator$1Y = NodeTranslator.from(createSingleIntegerPropertyHandler("w:kern"));
7037
+ const translator$1X = NodeTranslator.from(createSingleIntegerPropertyHandler("w:position"));
7038
+ const translator$1W = NodeTranslator.from({
6985
7039
  xmlName: "w:fitText",
6986
7040
  sdNodeOrKeyName: "fitText",
6987
7041
  attributes: [createIntegerAttributeHandler("w:val"), createIntegerAttributeHandler("w:id")],
@@ -6993,7 +7047,7 @@ const translator$1V = NodeTranslator.from({
6993
7047
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
6994
7048
  }
6995
7049
  });
6996
- const translator$1U = NodeTranslator.from({
7050
+ const translator$1V = NodeTranslator.from({
6997
7051
  xmlName: "w:eastAsianLayout",
6998
7052
  sdNodeOrKeyName: "eastAsianLayout",
6999
7053
  attributes: [
@@ -7011,52 +7065,52 @@ const translator$1U = NodeTranslator.from({
7011
7065
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7012
7066
  }
7013
7067
  });
7014
- const translator$1T = NodeTranslator.from(createSingleBooleanPropertyHandler("w:rtl"));
7015
- const translator$1S = NodeTranslator.from(createSingleBooleanPropertyHandler("w:cs"));
7016
- const translator$1R = NodeTranslator.from(createSingleBooleanPropertyHandler("w:iCs"));
7017
- const translator$1Q = NodeTranslator.from(createSingleBooleanPropertyHandler("w:webHidden"));
7068
+ const translator$1U = NodeTranslator.from(createSingleBooleanPropertyHandler("w:rtl"));
7069
+ const translator$1T = NodeTranslator.from(createSingleBooleanPropertyHandler("w:cs"));
7070
+ const translator$1S = NodeTranslator.from(createSingleBooleanPropertyHandler("w:iCs"));
7071
+ const translator$1R = NodeTranslator.from(createSingleBooleanPropertyHandler("w:webHidden"));
7018
7072
  const propertyTranslators$c = [
7019
- translator$2o,
7020
7073
  translator$2p,
7021
- translator$2n,
7022
- translator$2d,
7023
- translator$2i,
7024
- translator$1S,
7074
+ translator$2q,
7075
+ translator$2o,
7076
+ translator$2e,
7025
7077
  translator$2j,
7026
- translator$1U,
7027
- translator$1_,
7028
- translator$1Z,
7029
- translator$26,
7078
+ translator$1T,
7079
+ translator$2k,
7030
7080
  translator$1V,
7031
- translator$2h,
7032
- translator$2e,
7081
+ translator$1$,
7082
+ translator$1_,
7083
+ translator$27,
7084
+ translator$1W,
7085
+ translator$2i,
7033
7086
  translator$2f,
7034
- translator$2r,
7035
- translator$25,
7036
- translator$2m,
7037
- translator$1R,
7038
- translator$1X,
7087
+ translator$2g,
7088
+ translator$2s,
7089
+ translator$26,
7090
+ translator$2n,
7091
+ translator$1S,
7092
+ translator$1Y,
7093
+ translator$2c,
7039
7094
  translator$2b,
7040
- translator$2a,
7095
+ translator$25,
7041
7096
  translator$24,
7042
7097
  translator$23,
7098
+ translator$1X,
7099
+ translator$1U,
7100
+ translator$2h,
7043
7101
  translator$22,
7044
- translator$1W,
7045
- translator$1T,
7046
- translator$2g,
7047
- translator$21,
7048
- translator$2c,
7102
+ translator$2d,
7103
+ translator$29,
7049
7104
  translator$28,
7050
- translator$27,
7051
- translator$1$,
7052
- translator$2k,
7053
- translator$2l,
7054
7105
  translator$20,
7055
- translator$29,
7056
- translator$1Q,
7057
- translator$1Y
7106
+ translator$2l,
7107
+ translator$2m,
7108
+ translator$21,
7109
+ translator$2a,
7110
+ translator$1R,
7111
+ translator$1Z
7058
7112
  ];
7059
- const translator$1P = NodeTranslator.from(
7113
+ const translator$1Q = NodeTranslator.from(
7060
7114
  createNestedPropertiesTranslator("w:rPr", "runProperties", propertyTranslators$c)
7061
7115
  );
7062
7116
  const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
@@ -7073,10 +7127,10 @@ const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
7073
7127
  "w16sdtfl",
7074
7128
  "w16se"
7075
7129
  ]);
7076
- const XML_NODE_NAME$o = "mc:AlternateContent";
7077
- const SD_NODE_NAME$k = [];
7130
+ const XML_NODE_NAME$p = "mc:AlternateContent";
7131
+ const SD_NODE_NAME$l = [];
7078
7132
  const validXmlAttributes$f = [];
7079
- function encode$L(params) {
7133
+ function encode$O(params) {
7080
7134
  const { nodeListHandler } = params;
7081
7135
  const { node } = params.extraParams;
7082
7136
  if (!node || !node.type) {
@@ -7092,7 +7146,7 @@ function encode$L(params) {
7092
7146
  path: buildPath(params.path, node, branch)
7093
7147
  });
7094
7148
  }
7095
- function decode$N(params) {
7149
+ function decode$Q(params) {
7096
7150
  const { node } = params;
7097
7151
  const { drawingContent } = node.attrs;
7098
7152
  const drawing = {
@@ -7109,12 +7163,12 @@ function decode$N(params) {
7109
7163
  elements: [choice]
7110
7164
  };
7111
7165
  }
7112
- const config$n = {
7113
- xmlName: XML_NODE_NAME$o,
7114
- sdNodeOrKeyName: SD_NODE_NAME$k,
7166
+ const config$o = {
7167
+ xmlName: XML_NODE_NAME$p,
7168
+ sdNodeOrKeyName: SD_NODE_NAME$l,
7115
7169
  type: NodeTranslator.translatorTypes.NODE,
7116
- encode: encode$L,
7117
- decode: decode$N,
7170
+ encode: encode$O,
7171
+ decode: decode$Q,
7118
7172
  attributes: validXmlAttributes$f
7119
7173
  };
7120
7174
  function selectAlternateContentElements(node) {
@@ -7138,18 +7192,18 @@ function selectAlternateContentElements(node) {
7138
7192
  elements: carbonCopy(selectedElements)
7139
7193
  };
7140
7194
  }
7141
- const translator$1O = NodeTranslator.from(config$n);
7195
+ const translator$1P = NodeTranslator.from(config$o);
7142
7196
  function buildPath(existingPath = [], node, branch) {
7143
7197
  const path = [...existingPath];
7144
7198
  if (node) path.push(node);
7145
7199
  if (branch) path.push(branch);
7146
7200
  return path;
7147
7201
  }
7148
- const translator$1N = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
7149
- const translator$1M = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
7150
- const translator$1L = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
7151
- const translator$1K = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
7152
- const translator$1J = NodeTranslator.from({
7202
+ const translator$1O = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
7203
+ const translator$1N = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
7204
+ const translator$1M = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
7205
+ const translator$1L = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
7206
+ const translator$1K = NodeTranslator.from({
7153
7207
  xmlName: "w:cnfStyle",
7154
7208
  sdNodeOrKeyName: "cnfStyle",
7155
7209
  attributes: [
@@ -7175,9 +7229,9 @@ const translator$1J = NodeTranslator.from({
7175
7229
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7176
7230
  }
7177
7231
  });
7178
- const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
7179
- const translator$1H = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
7180
- const translator$1G = NodeTranslator.from({
7232
+ const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
7233
+ const translator$1I = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
7234
+ const translator$1H = NodeTranslator.from({
7181
7235
  xmlName: "w:framePr",
7182
7236
  sdNodeOrKeyName: "framePr",
7183
7237
  attributes: [
@@ -7205,7 +7259,7 @@ const translator$1G = NodeTranslator.from({
7205
7259
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7206
7260
  }
7207
7261
  });
7208
- const translator$1F = NodeTranslator.from({
7262
+ const translator$1G = NodeTranslator.from({
7209
7263
  xmlName: "w:ind",
7210
7264
  sdNodeOrKeyName: "indent",
7211
7265
  attributes: [
@@ -7230,12 +7284,12 @@ const translator$1F = NodeTranslator.from({
7230
7284
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7231
7285
  }
7232
7286
  });
7233
- const translator$1E = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
7234
- const translator$1D = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
7235
- const translator$1C = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
7236
- const translator$1B = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
7237
- const translator$1A = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
7238
- const translator$1z = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
7287
+ const translator$1F = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
7288
+ const translator$1E = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
7289
+ const translator$1D = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
7290
+ const translator$1C = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
7291
+ const translator$1B = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
7292
+ const translator$1A = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
7239
7293
  const createTrackStyleMark = (marks) => {
7240
7294
  const trackStyleMark = marks.find((mark) => mark.type === "trackFormat");
7241
7295
  if (trackStyleMark) {
@@ -7253,7 +7307,7 @@ const createTrackStyleMark = (marks) => {
7253
7307
  }
7254
7308
  return void 0;
7255
7309
  };
7256
- const XML_NODE_NAME$n = "w:ins";
7310
+ const XML_NODE_NAME$o = "w:ins";
7257
7311
  const SD_ATTR_KEY$2 = "trackInsert";
7258
7312
  const validXmlAttributes$e = [
7259
7313
  createAttributeHandler("w:id", "id"),
@@ -7261,7 +7315,7 @@ const validXmlAttributes$e = [
7261
7315
  createAttributeHandler("w:author", "author"),
7262
7316
  createAttributeHandler("w:authorEmail", "authorEmail")
7263
7317
  ];
7264
- const encode$K = (params, encodedAttrs = {}) => {
7318
+ const encode$N = (params, encodedAttrs = {}) => {
7265
7319
  const { nodeListHandler, extraParams = {}, converter } = params;
7266
7320
  const { node } = extraParams;
7267
7321
  if (encodedAttrs.id && converter?.trackedChangeIdMap?.has(encodedAttrs.id)) {
@@ -7290,7 +7344,7 @@ const encode$K = (params, encodedAttrs = {}) => {
7290
7344
  });
7291
7345
  return subs;
7292
7346
  };
7293
- function decode$M(params) {
7347
+ function decode$P(params) {
7294
7348
  const { node } = params;
7295
7349
  if (!node || !node.type) {
7296
7350
  return null;
@@ -7315,49 +7369,49 @@ function decode$M(params) {
7315
7369
  elements: [translatedTextNode]
7316
7370
  };
7317
7371
  }
7318
- const config$m = {
7319
- xmlName: XML_NODE_NAME$n,
7372
+ const config$n = {
7373
+ xmlName: XML_NODE_NAME$o,
7320
7374
  sdNodeOrKeyName: SD_ATTR_KEY$2,
7321
7375
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
7322
- encode: encode$K,
7323
- decode: decode$M,
7376
+ encode: encode$N,
7377
+ decode: decode$P,
7324
7378
  attributes: validXmlAttributes$e
7325
7379
  };
7326
- const translator$1y = NodeTranslator.from(config$m);
7327
- const translator$1x = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
7328
- const propertyTranslators$b = [translator$1O, translator$1z, translator$1y, translator$1x];
7329
- const translator$1w = NodeTranslator.from(
7380
+ const translator$1z = NodeTranslator.from(config$n);
7381
+ const translator$1y = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
7382
+ const propertyTranslators$b = [translator$1P, translator$1A, translator$1z, translator$1y];
7383
+ const translator$1x = NodeTranslator.from(
7330
7384
  createNestedPropertiesTranslator("w:numPr", "numberingProperties", propertyTranslators$b)
7331
7385
  );
7332
- const translator$1v = NodeTranslator.from(
7386
+ const translator$1w = NodeTranslator.from(
7333
7387
  createSingleAttrPropertyHandler("w:outlineLvl", "outlineLvl", "w:val", parseInteger, integerToString)
7334
7388
  );
7335
- const translator$1u = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
7336
- const translator$1t = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
7337
- const translator$1s = NodeTranslator.from(createBorderPropertyHandler("w:between"));
7338
- const translator$1r = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
7339
- const translator$1q = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
7340
- const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:left"));
7341
- const translator$1o = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
7342
- const translator$1n = NodeTranslator.from(createBorderPropertyHandler("w:right"));
7343
- const translator$1m = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
7344
- const translator$1l = NodeTranslator.from(createBorderPropertyHandler("w:top"));
7345
- const translator$1k = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
7389
+ const translator$1v = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
7390
+ const translator$1u = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
7391
+ const translator$1t = NodeTranslator.from(createBorderPropertyHandler("w:between"));
7392
+ const translator$1s = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
7393
+ const translator$1r = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
7394
+ const translator$1q = NodeTranslator.from(createBorderPropertyHandler("w:left"));
7395
+ const translator$1p = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
7396
+ const translator$1o = NodeTranslator.from(createBorderPropertyHandler("w:right"));
7397
+ const translator$1n = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
7398
+ const translator$1m = NodeTranslator.from(createBorderPropertyHandler("w:top"));
7399
+ const translator$1l = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
7346
7400
  const propertyTranslators$a = [
7347
- translator$1O,
7401
+ translator$1P,
7402
+ translator$1u,
7348
7403
  translator$1t,
7349
7404
  translator$1s,
7350
- translator$1r,
7351
- translator$1p,
7352
- translator$1n,
7353
- translator$1l
7405
+ translator$1q,
7406
+ translator$1o,
7407
+ translator$1m
7354
7408
  ];
7355
- const translator$1j = NodeTranslator.from(
7409
+ const translator$1k = NodeTranslator.from(
7356
7410
  createNestedPropertiesTranslator("w:pBdr", "borders", propertyTranslators$a)
7357
7411
  );
7358
- const translator$1i = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
7359
- const translator$1h = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
7360
- const translator$1g = NodeTranslator.from({
7412
+ const translator$1j = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
7413
+ const translator$1i = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
7414
+ const translator$1h = NodeTranslator.from({
7361
7415
  xmlName: "w:spacing",
7362
7416
  sdNodeOrKeyName: "spacing",
7363
7417
  attributes: [
@@ -7378,20 +7432,21 @@ const translator$1g = NodeTranslator.from({
7378
7432
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7379
7433
  }
7380
7434
  });
7381
- const translator$1f = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
7382
- const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
7383
- const translator$1d = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
7384
- const propertyTranslators$9 = [translator$1O, translator$2q];
7385
- const translator$1c = NodeTranslator.from(
7435
+ const translator$1g = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
7436
+ const translator$1f = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
7437
+ const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
7438
+ const propertyTranslators$9 = [translator$1P, translator$2r];
7439
+ const translator$1d = NodeTranslator.from(
7386
7440
  createNestedArrayPropertyHandler("w:tabs", "tabStops", propertyTranslators$9, { skipRun: true })
7387
7441
  );
7388
- const translator$1b = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
7389
- const translator$1a = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
7390
- const translator$19 = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
7391
- const translator$18 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
7392
- const translator$17 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
7393
- const translator$16 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
7442
+ const translator$1c = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
7443
+ const translator$1b = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
7444
+ const translator$1a = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
7445
+ const translator$19 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
7446
+ const translator$18 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
7447
+ const translator$17 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
7394
7448
  const propertyTranslators$8 = [
7449
+ translator$1P,
7395
7450
  translator$1O,
7396
7451
  translator$1N,
7397
7452
  translator$1M,
@@ -7406,15 +7461,15 @@ const propertyTranslators$8 = [
7406
7461
  translator$1D,
7407
7462
  translator$1C,
7408
7463
  translator$1B,
7409
- translator$1A,
7464
+ translator$1x,
7410
7465
  translator$1w,
7411
7466
  translator$1v,
7412
- translator$1u,
7467
+ translator$1k,
7413
7468
  translator$1j,
7414
7469
  translator$1i,
7470
+ translator$2d,
7471
+ translator$28,
7415
7472
  translator$1h,
7416
- translator$2c,
7417
- translator$27,
7418
7473
  translator$1g,
7419
7474
  translator$1f,
7420
7475
  translator$1e,
@@ -7425,10 +7480,9 @@ const propertyTranslators$8 = [
7425
7480
  translator$19,
7426
7481
  translator$18,
7427
7482
  translator$17,
7428
- translator$16,
7429
- translator$1P
7483
+ translator$1Q
7430
7484
  ];
7431
- const translator$15 = NodeTranslator.from(
7485
+ const translator$16 = NodeTranslator.from(
7432
7486
  createNestedPropertiesTranslator("w:pPr", "paragraphProperties", propertyTranslators$8)
7433
7487
  );
7434
7488
  function getUnderlineCssString({ type = "single", color = null, thickness = null, approximate = true } = {}) {
@@ -7843,7 +7897,7 @@ function resolveDocxFontFamily(attributes, docx, toCssFontFamily) {
7843
7897
  }
7844
7898
  return resolved;
7845
7899
  }
7846
- const ooxmlResolver = createOoxmlResolver({ pPr: translator$15, rPr: translator$1P });
7900
+ const ooxmlResolver = createOoxmlResolver({ pPr: translator$16, rPr: translator$1Q });
7847
7901
  const getToCssFontFamily = () => {
7848
7902
  return SuperConverter.toCssFontFamily;
7849
7903
  };
@@ -8537,7 +8591,7 @@ function handleStyleChangeMarksV2(rPrChange, currentMarks, params) {
8537
8591
  let submarks = [];
8538
8592
  const rPr = rPrChange.elements?.find((el) => el.name === "w:rPr");
8539
8593
  if (rPr) {
8540
- const runProperties = translator$1P.encode({ ...params, nodes: [rPr] });
8594
+ const runProperties = translator$1Q.encode({ ...params, nodes: [rPr] });
8541
8595
  submarks = encodeMarksFromRPr(runProperties, params?.docx);
8542
8596
  }
8543
8597
  return [{ type: TrackFormatMarkName, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
@@ -8706,7 +8760,7 @@ const handleParagraphNode$1 = (params) => {
8706
8760
  const pPr = node.elements?.find((el) => el.name === "w:pPr");
8707
8761
  let inlineParagraphProperties = {};
8708
8762
  if (pPr) {
8709
- inlineParagraphProperties = translator$15.encode({ ...params, nodes: [pPr] }) || {};
8763
+ inlineParagraphProperties = translator$16.encode({ ...params, nodes: [pPr] }) || {};
8710
8764
  }
8711
8765
  const insideTable = (params.path || []).some((ancestor) => ancestor.name === "w:tc");
8712
8766
  const tableStyleId = getTableStyleId(params.path || []);
@@ -8761,7 +8815,7 @@ function generateParagraphProperties(params) {
8761
8815
  const { node } = params;
8762
8816
  const { attrs = {} } = node;
8763
8817
  const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
8764
- let pPr = translator$15.decode({ node: { ...node, attrs: { paragraphProperties } } });
8818
+ let pPr = translator$16.decode({ node: { ...node, attrs: { paragraphProperties } } });
8765
8819
  const sectPr = node.attrs?.paragraphProperties?.sectPr;
8766
8820
  if (sectPr) {
8767
8821
  if (!pPr) {
@@ -8794,102 +8848,102 @@ function translateParagraphNode(params) {
8794
8848
  };
8795
8849
  return result;
8796
8850
  }
8797
- const encode$J = (attributes) => {
8851
+ const encode$M = (attributes) => {
8798
8852
  return attributes["w:rsidDel"];
8799
8853
  };
8800
- const decode$L = (attrs) => {
8854
+ const decode$O = (attrs) => {
8801
8855
  return attrs.rsidDel;
8802
8856
  };
8803
- const attrConfig$o = Object.freeze({
8857
+ const attrConfig$q = Object.freeze({
8804
8858
  xmlName: "w:rsidDel",
8805
8859
  sdName: "rsidDel",
8806
- encode: encode$J,
8807
- decode: decode$L
8860
+ encode: encode$M,
8861
+ decode: decode$O
8808
8862
  });
8809
- const encode$I = (attributes) => {
8863
+ const encode$L = (attributes) => {
8810
8864
  return attributes["w:rsidP"];
8811
8865
  };
8812
- const decode$K = (attrs) => {
8866
+ const decode$N = (attrs) => {
8813
8867
  return attrs.rsidP;
8814
8868
  };
8815
- const attrConfig$n = Object.freeze({
8869
+ const attrConfig$p = Object.freeze({
8816
8870
  xmlName: "w:rsidP",
8817
8871
  sdName: "rsidP",
8818
- encode: encode$I,
8819
- decode: decode$K
8872
+ encode: encode$L,
8873
+ decode: decode$N
8820
8874
  });
8821
- const encode$H = (attributes) => {
8875
+ const encode$K = (attributes) => {
8822
8876
  return attributes["w:rsidR"];
8823
8877
  };
8824
- const decode$J = (attrs) => {
8878
+ const decode$M = (attrs) => {
8825
8879
  return attrs.rsidR;
8826
8880
  };
8827
- const attrConfig$m = Object.freeze({
8881
+ const attrConfig$o = Object.freeze({
8828
8882
  xmlName: "w:rsidR",
8829
8883
  sdName: "rsidR",
8830
- encode: encode$H,
8831
- decode: decode$J
8884
+ encode: encode$K,
8885
+ decode: decode$M
8832
8886
  });
8833
- const encode$G = (attributes) => {
8887
+ const encode$J = (attributes) => {
8834
8888
  return attributes["w:rsidRPr"];
8835
8889
  };
8836
- const decode$I = (attrs) => {
8890
+ const decode$L = (attrs) => {
8837
8891
  return attrs.rsidRPr;
8838
8892
  };
8839
- const attrConfig$l = Object.freeze({
8893
+ const attrConfig$n = Object.freeze({
8840
8894
  xmlName: "w:rsidRPr",
8841
8895
  sdName: "rsidRPr",
8842
- encode: encode$G,
8843
- decode: decode$I
8896
+ encode: encode$J,
8897
+ decode: decode$L
8844
8898
  });
8845
- const encode$F = (attributes) => {
8899
+ const encode$I = (attributes) => {
8846
8900
  return attributes["w:rsidRDefault"];
8847
8901
  };
8848
- const decode$H = (attrs) => {
8902
+ const decode$K = (attrs) => {
8849
8903
  return attrs.rsidRDefault;
8850
8904
  };
8851
- const attrConfig$k = Object.freeze({
8905
+ const attrConfig$m = Object.freeze({
8852
8906
  xmlName: "w:rsidRDefault",
8853
8907
  sdName: "rsidRDefault",
8854
- encode: encode$F,
8855
- decode: decode$H
8908
+ encode: encode$I,
8909
+ decode: decode$K
8856
8910
  });
8857
- const encode$E = (attributes) => {
8911
+ const encode$H = (attributes) => {
8858
8912
  return attributes["w14:paraId"];
8859
8913
  };
8860
- const decode$G = (attrs) => {
8914
+ const decode$J = (attrs) => {
8861
8915
  return attrs.paraId;
8862
8916
  };
8863
- const attrConfig$j = Object.freeze({
8917
+ const attrConfig$l = Object.freeze({
8864
8918
  xmlName: "w14:paraId",
8865
8919
  sdName: "paraId",
8866
- encode: encode$E,
8867
- decode: decode$G
8920
+ encode: encode$H,
8921
+ decode: decode$J
8868
8922
  });
8869
- const encode$D = (attributes) => {
8923
+ const encode$G = (attributes) => {
8870
8924
  return attributes["w14:textId"];
8871
8925
  };
8872
- const decode$F = (attrs) => {
8926
+ const decode$I = (attrs) => {
8873
8927
  return attrs.textId;
8874
8928
  };
8875
- const attrConfig$i = Object.freeze({
8929
+ const attrConfig$k = Object.freeze({
8876
8930
  xmlName: "w14:textId",
8877
8931
  sdName: "textId",
8878
- encode: encode$D,
8879
- decode: decode$F
8932
+ encode: encode$G,
8933
+ decode: decode$I
8880
8934
  });
8881
8935
  const validXmlAttributes$d = [
8882
- attrConfig$j,
8883
- attrConfig$i,
8884
- attrConfig$m,
8936
+ attrConfig$l,
8885
8937
  attrConfig$k,
8938
+ attrConfig$o,
8939
+ attrConfig$m,
8940
+ attrConfig$p,
8886
8941
  attrConfig$n,
8887
- attrConfig$l,
8888
- attrConfig$o
8942
+ attrConfig$q
8889
8943
  ];
8890
- const XML_NODE_NAME$m = "w:p";
8891
- const SD_NODE_NAME$j = "paragraph";
8892
- const encode$C = (params, encodedAttrs = {}) => {
8944
+ const XML_NODE_NAME$n = "w:p";
8945
+ const SD_NODE_NAME$k = "paragraph";
8946
+ const encode$F = (params, encodedAttrs = {}) => {
8893
8947
  const node = handleParagraphNode$1(params);
8894
8948
  if (!node) return void 0;
8895
8949
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -8897,7 +8951,7 @@ const encode$C = (params, encodedAttrs = {}) => {
8897
8951
  }
8898
8952
  return node;
8899
8953
  };
8900
- const decode$E = (params, decodedAttrs = {}) => {
8954
+ const decode$H = (params, decodedAttrs = {}) => {
8901
8955
  const translated = translateParagraphNode(params);
8902
8956
  if (!translated) return void 0;
8903
8957
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -8905,15 +8959,15 @@ const decode$E = (params, decodedAttrs = {}) => {
8905
8959
  }
8906
8960
  return translated;
8907
8961
  };
8908
- const config$l = {
8909
- xmlName: XML_NODE_NAME$m,
8910
- sdNodeOrKeyName: SD_NODE_NAME$j,
8962
+ const config$m = {
8963
+ xmlName: XML_NODE_NAME$n,
8964
+ sdNodeOrKeyName: SD_NODE_NAME$k,
8911
8965
  type: NodeTranslator.translatorTypes.NODE,
8912
- encode: encode$C,
8913
- decode: decode$E,
8966
+ encode: encode$F,
8967
+ decode: decode$H,
8914
8968
  attributes: validXmlAttributes$d
8915
8969
  };
8916
- const translator$14 = NodeTranslator.from(config$l);
8970
+ const translator$15 = NodeTranslator.from(config$m);
8917
8971
  const EAST_ASIAN_CHARACTER_REGEX = /[\u1100-\u11FF\u2E80-\u2EFF\u2F00-\u2FDF\u3040-\u30FF\u3100-\u312F\u3130-\u318F\u31A0-\u31BF\u3400-\u4DBF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uF900-\uFAFF\uFF00-\uFFEF]/u;
8918
8972
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
8919
8973
  const resolveFontFamily = (textStyleAttrs, text) => {
@@ -9086,8 +9140,8 @@ function generateRandom32BitHex() {
9086
9140
  const val = Math.floor(Math.random() * 2147483647);
9087
9141
  return val.toString(16).toUpperCase().padStart(8, "0");
9088
9142
  }
9089
- const XML_NODE_NAME$l = "w:hyperlink";
9090
- const SD_NODE_NAME$i = "link";
9143
+ const XML_NODE_NAME$m = "w:hyperlink";
9144
+ const SD_NODE_NAME$j = "link";
9091
9145
  const _createAttributeHandler = (xmlName, sdName) => ({
9092
9146
  xmlName,
9093
9147
  sdName,
@@ -9107,10 +9161,10 @@ const validXmlAttributes$c = [
9107
9161
  _createAttributeHandler("r:id", "rId"),
9108
9162
  _createAttributeHandler("w:tgtFrame", "target")
9109
9163
  ];
9110
- const encode$B = (params, encodedAttrs) => {
9164
+ const encode$E = (params, encodedAttrs) => {
9111
9165
  const { nodes, docx, nodeListHandler } = params;
9112
9166
  const node = nodes[0];
9113
- let href = _resolveHref(docx, encodedAttrs);
9167
+ let href = _resolveHref(docx, encodedAttrs, params.filename);
9114
9168
  const linkMark = { type: "link", attrs: { ...encodedAttrs, href } };
9115
9169
  const referenceNodeTypes = ["sd:pageReference", "sd:autoPageNumber", "sd:totalPageNumber"];
9116
9170
  const contentNodes = node.elements.filter((el) => el.name === "w:r" || referenceNodeTypes.includes(el.name));
@@ -9126,22 +9180,24 @@ const encode$B = (params, encodedAttrs) => {
9126
9180
  });
9127
9181
  return updatedNode;
9128
9182
  };
9129
- const _resolveHref = (docx, encodedAttrs) => {
9130
- const rels = docx["word/_rels/document.xml.rels"];
9131
- const relationships = rels.elements.find((el) => el.name === "Relationships");
9132
- const { elements } = relationships;
9183
+ const _resolveHref = (docx, encodedAttrs, filename) => {
9184
+ const currentFile = filename || "document.xml";
9185
+ let rels = docx?.[`word/_rels/${currentFile}.rels`];
9186
+ if (!rels) rels = docx?.["word/_rels/document.xml.rels"];
9187
+ const relationships = rels?.elements?.find((el) => el.name === "Relationships");
9188
+ const elements = relationships?.elements || [];
9133
9189
  const { rId, anchor } = encodedAttrs;
9134
9190
  let href;
9135
9191
  if (!rId && anchor) {
9136
9192
  href = `#${anchor}`;
9137
9193
  } else if (rId) {
9138
- const rel = elements.find((el) => el.attributes["Id"] === rId) || {};
9194
+ const rel = elements.find((el) => el.attributes?.["Id"] === rId) || {};
9139
9195
  const { attributes: relAttributes = {} } = rel;
9140
9196
  href = relAttributes["Target"];
9141
9197
  }
9142
9198
  return href;
9143
9199
  };
9144
- function decode$D(params) {
9200
+ function decode$G(params) {
9145
9201
  const { hyperlinkGroup = [params.node] } = params.extraParams || {};
9146
9202
  const node = hyperlinkGroup[0];
9147
9203
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -9190,53 +9246,53 @@ function _addNewLinkRelationship(params, link) {
9190
9246
  });
9191
9247
  return `rId${id}`;
9192
9248
  }
9193
- const config$k = {
9194
- xmlName: XML_NODE_NAME$l,
9195
- sdNodeOrKeyName: SD_NODE_NAME$i,
9249
+ const config$l = {
9250
+ xmlName: XML_NODE_NAME$m,
9251
+ sdNodeOrKeyName: SD_NODE_NAME$j,
9196
9252
  type: NodeTranslator.translatorTypes.NODE,
9197
- encode: encode$B,
9198
- decode: decode$D,
9253
+ encode: encode$E,
9254
+ decode: decode$G,
9199
9255
  attributes: validXmlAttributes$c
9200
9256
  };
9201
- const translator$13 = NodeTranslator.from(config$k);
9202
- const encode$A = (attributes) => {
9257
+ const translator$14 = NodeTranslator.from(config$l);
9258
+ const encode$D = (attributes) => {
9203
9259
  return attributes["w:rsidR"];
9204
9260
  };
9205
- const decode$C = (attrs) => {
9261
+ const decode$F = (attrs) => {
9206
9262
  return attrs.rsidR;
9207
9263
  };
9208
- const attrConfig$h = Object.freeze({
9264
+ const attrConfig$j = Object.freeze({
9209
9265
  xmlName: "w:rsidR",
9210
9266
  sdName: "rsidR",
9211
- encode: encode$A,
9212
- decode: decode$C
9267
+ encode: encode$D,
9268
+ decode: decode$F
9213
9269
  });
9214
- const encode$z = (attributes) => {
9270
+ const encode$C = (attributes) => {
9215
9271
  return attributes["w:rsidRPr"];
9216
9272
  };
9217
- const decode$B = (attrs) => {
9273
+ const decode$E = (attrs) => {
9218
9274
  return attrs.rsidRPr;
9219
9275
  };
9220
- const attrConfig$g = Object.freeze({
9276
+ const attrConfig$i = Object.freeze({
9221
9277
  xmlName: "w:rsidRPr",
9222
9278
  sdName: "rsidRPr",
9223
- encode: encode$z,
9224
- decode: decode$B
9279
+ encode: encode$C,
9280
+ decode: decode$E
9225
9281
  });
9226
- const encode$y = (attributes) => {
9282
+ const encode$B = (attributes) => {
9227
9283
  return attributes["w:rsidDel"];
9228
9284
  };
9229
- const decode$A = (attrs) => {
9285
+ const decode$D = (attrs) => {
9230
9286
  return attrs.rsidDel;
9231
9287
  };
9232
- const attrConfig$f = Object.freeze({
9288
+ const attrConfig$h = Object.freeze({
9233
9289
  xmlName: "w:rsidDel",
9234
9290
  sdName: "rsidDel",
9235
- encode: encode$y,
9236
- decode: decode$A
9291
+ encode: encode$B,
9292
+ decode: decode$D
9237
9293
  });
9238
- const validXmlAttributes$b = [attrConfig$h, attrConfig$g, attrConfig$f];
9239
- const XML_NODE_NAME$k = "w:r";
9294
+ const validXmlAttributes$b = [attrConfig$j, attrConfig$i, attrConfig$h];
9295
+ const XML_NODE_NAME$l = "w:r";
9240
9296
  const SD_KEY_NAME = "run";
9241
9297
  const createRunNodeWithContent = (content, encodedAttrs, runLevelMarks, runProperties) => {
9242
9298
  const node = {
@@ -9249,13 +9305,13 @@ const createRunNodeWithContent = (content, encodedAttrs, runLevelMarks, runPrope
9249
9305
  }
9250
9306
  return node;
9251
9307
  };
9252
- const encode$x = (params, encodedAttrs = {}) => {
9308
+ const encode$A = (params, encodedAttrs = {}) => {
9253
9309
  const { nodes = [], nodeListHandler } = params || {};
9254
9310
  const runNode = nodes[0];
9255
9311
  if (!runNode) return void 0;
9256
9312
  const elements = Array.isArray(runNode.elements) ? runNode.elements : [];
9257
9313
  const rPrNode = elements.find((child) => child?.name === "w:rPr");
9258
- const runProperties = rPrNode ? translator$1P.encode({ ...params, nodes: [rPrNode] }) : {};
9314
+ const runProperties = rPrNode ? translator$1Q.encode({ ...params, nodes: [rPrNode] }) : {};
9259
9315
  const paragraphProperties = params?.extraParams?.paragraphProperties || {};
9260
9316
  const resolvedRunProperties = resolveRunProperties(params, runProperties ?? {}, paragraphProperties);
9261
9317
  const marksResult = encodeMarksFromRPr(resolvedRunProperties, params?.docx);
@@ -9318,7 +9374,7 @@ const encode$x = (params, encodedAttrs = {}) => {
9318
9374
  finalizeTextChunk();
9319
9375
  return splitRuns;
9320
9376
  };
9321
- const decode$z = (params, decodedAttrs = {}) => {
9377
+ const decode$C = (params, decodedAttrs = {}) => {
9322
9378
  const { node } = params || {};
9323
9379
  if (!node) return void 0;
9324
9380
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -9327,7 +9383,7 @@ const decode$z = (params, decodedAttrs = {}) => {
9327
9383
  ...params.extraParams,
9328
9384
  linkProcessed: true
9329
9385
  };
9330
- return translator$13.decode({ ...params, extraParams });
9386
+ return translator$14.decode({ ...params, extraParams });
9331
9387
  }
9332
9388
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
9333
9389
  const runAttrs = runNodeForExport.attrs || {};
@@ -9341,7 +9397,7 @@ const decode$z = (params, decodedAttrs = {}) => {
9341
9397
  exportParams.editor = { extensionService: { extensions: [] } };
9342
9398
  }
9343
9399
  const childElements = translateChildNodes(exportParams) || [];
9344
- let runPropertiesElement = translator$1P.decode({
9400
+ let runPropertiesElement = translator$1Q.decode({
9345
9401
  ...params,
9346
9402
  node: { attrs: { runProperties } }
9347
9403
  });
@@ -9389,7 +9445,7 @@ const decode$z = (params, decodedAttrs = {}) => {
9389
9445
  runs.push(commentRangeClone);
9390
9446
  return;
9391
9447
  }
9392
- const runWrapper = { name: XML_NODE_NAME$k, elements: [] };
9448
+ const runWrapper = { name: XML_NODE_NAME$l, elements: [] };
9393
9449
  applyBaseRunProps(runWrapper);
9394
9450
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
9395
9451
  runWrapper.elements.push(cloneXmlNode(child));
@@ -9397,7 +9453,7 @@ const decode$z = (params, decodedAttrs = {}) => {
9397
9453
  });
9398
9454
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
9399
9455
  if (!trackedRuns.length) {
9400
- const emptyRun = { name: XML_NODE_NAME$k, elements: [] };
9456
+ const emptyRun = { name: XML_NODE_NAME$l, elements: [] };
9401
9457
  applyBaseRunProps(emptyRun);
9402
9458
  trackedRuns.push(emptyRun);
9403
9459
  }
@@ -9411,17 +9467,17 @@ const decode$z = (params, decodedAttrs = {}) => {
9411
9467
  }
9412
9468
  return trackedRuns;
9413
9469
  };
9414
- const config$j = {
9415
- xmlName: XML_NODE_NAME$k,
9470
+ const config$k = {
9471
+ xmlName: XML_NODE_NAME$l,
9416
9472
  sdNodeOrKeyName: SD_KEY_NAME,
9417
9473
  type: NodeTranslator.translatorTypes.NODE,
9418
- encode: encode$x,
9419
- decode: decode$z,
9474
+ encode: encode$A,
9475
+ decode: decode$C,
9420
9476
  attributes: validXmlAttributes$b
9421
9477
  };
9422
- const translator$12 = NodeTranslator.from(config$j);
9423
- const translator$11 = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
9424
- const translator$10 = NodeTranslator.from(
9478
+ const translator$13 = NodeTranslator.from(config$k);
9479
+ const translator$12 = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
9480
+ const translator$11 = NodeTranslator.from(
9425
9481
  createSingleAttrPropertyHandler(
9426
9482
  "w:gridSpan",
9427
9483
  null,
@@ -9430,33 +9486,33 @@ const translator$10 = NodeTranslator.from(
9430
9486
  (v2) => integerToString(v2)
9431
9487
  )
9432
9488
  );
9433
- const translator$$ = NodeTranslator.from(
9489
+ const translator$10 = NodeTranslator.from(
9434
9490
  createSingleAttrPropertyHandler("w:vMerge", null, "w:val", (val) => !val ? "continue" : val)
9435
9491
  );
9436
- const translator$_ = NodeTranslator.from(createBorderPropertyHandler("w:end"));
9437
- const translator$Z = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
9438
- const translator$Y = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
9439
- const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
9440
- const translator$W = NodeTranslator.from(createBorderPropertyHandler("w:start"));
9441
- const translator$V = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
9442
- const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
9443
- const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
9492
+ const translator$$ = NodeTranslator.from(createBorderPropertyHandler("w:end"));
9493
+ const translator$_ = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
9494
+ const translator$Z = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
9495
+ const translator$Y = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
9496
+ const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:start"));
9497
+ const translator$W = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
9498
+ const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
9499
+ const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
9444
9500
  const propertyTranslators$7 = [
9445
- translator$1l,
9446
- translator$W,
9447
- translator$1p,
9448
- translator$1r,
9449
- translator$_,
9450
- translator$1n,
9451
- translator$Y,
9501
+ translator$1m,
9452
9502
  translator$X,
9453
- translator$U,
9454
- translator$T
9503
+ translator$1q,
9504
+ translator$1s,
9505
+ translator$$,
9506
+ translator$1o,
9507
+ translator$Z,
9508
+ translator$Y,
9509
+ translator$V,
9510
+ translator$U
9455
9511
  ];
9456
- const translator$S = NodeTranslator.from(
9512
+ const translator$T = NodeTranslator.from(
9457
9513
  createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$7)
9458
9514
  );
9459
- const translator$R = NodeTranslator.from(
9515
+ const translator$S = NodeTranslator.from(
9460
9516
  createSingleAttrPropertyHandler(
9461
9517
  "w:noWrap",
9462
9518
  null,
@@ -9466,17 +9522,17 @@ const translator$R = NodeTranslator.from(
9466
9522
  )
9467
9523
  );
9468
9524
  const propertyTranslators$6 = [
9469
- translator$1q,
9470
- translator$Z,
9471
- translator$1o,
9472
- translator$1m,
9473
- translator$V,
9474
- translator$1k
9525
+ translator$1r,
9526
+ translator$_,
9527
+ translator$1p,
9528
+ translator$1n,
9529
+ translator$W,
9530
+ translator$1l
9475
9531
  ];
9476
- const translator$Q = NodeTranslator.from(
9532
+ const translator$R = NodeTranslator.from(
9477
9533
  createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$6)
9478
9534
  );
9479
- const translator$P = NodeTranslator.from(
9535
+ const translator$Q = NodeTranslator.from(
9480
9536
  createSingleAttrPropertyHandler(
9481
9537
  "w:tcFitText",
9482
9538
  null,
@@ -9485,8 +9541,8 @@ const translator$P = NodeTranslator.from(
9485
9541
  (v2) => booleanToString(v2)
9486
9542
  )
9487
9543
  );
9488
- const translator$O = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
9489
- const translator$N = NodeTranslator.from(
9544
+ const translator$P = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
9545
+ const translator$O = NodeTranslator.from(
9490
9546
  createSingleAttrPropertyHandler(
9491
9547
  "w:hideMark",
9492
9548
  null,
@@ -9495,26 +9551,26 @@ const translator$N = NodeTranslator.from(
9495
9551
  (v2) => booleanToString(v2)
9496
9552
  )
9497
9553
  );
9498
- const translator$M = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
9499
- const translator$L = NodeTranslator.from(
9500
- createNestedArrayPropertyHandler("w:headers", "headers", [translator$M])
9554
+ const translator$N = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
9555
+ const translator$M = NodeTranslator.from(
9556
+ createNestedArrayPropertyHandler("w:headers", "headers", [translator$N])
9501
9557
  );
9502
9558
  const propertyTranslators$5 = [
9503
- translator$1J,
9559
+ translator$1K,
9560
+ translator$12,
9504
9561
  translator$11,
9505
9562
  translator$10,
9506
- translator$$,
9563
+ translator$T,
9564
+ translator$2d,
9507
9565
  translator$S,
9508
- translator$2c,
9509
9566
  translator$R,
9567
+ translator$1b,
9510
9568
  translator$Q,
9511
- translator$1a,
9512
9569
  translator$P,
9513
9570
  translator$O,
9514
- translator$N,
9515
- translator$L
9571
+ translator$M
9516
9572
  ];
9517
- const translator$K = NodeTranslator.from(
9573
+ const translator$L = NodeTranslator.from(
9518
9574
  createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators$5)
9519
9575
  );
9520
9576
  function handleTableCellNode({
@@ -9538,7 +9594,7 @@ function handleTableCellNode({
9538
9594
  const attributes = {};
9539
9595
  const referencedStyles = _referencedStyles ?? { fontSize: null, fonts: {}, cellMargins: {} };
9540
9596
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
9541
- const tableCellProperties = tcPr ? translator$K.encode({ ...params, nodes: [tcPr] }) ?? {} : {};
9597
+ const tableCellProperties = tcPr ? translator$L.encode({ ...params, nodes: [tcPr] }) ?? {} : {};
9542
9598
  attributes["tableCellProperties"] = tableCellProperties;
9543
9599
  const effectiveTotalColumns = totalColumns ?? (allColumnWidths.length || 1);
9544
9600
  const effectiveTotalRows = totalRows ?? (table?.elements?.filter((el) => el.name === "w:tr").length || 1);
@@ -9942,13 +9998,13 @@ function generateTableCellProperties(node) {
9942
9998
  } else if (tableCellProperties?.borders) {
9943
9999
  delete tableCellProperties.borders;
9944
10000
  }
9945
- const result = translator$K.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
10001
+ const result = translator$L.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
9946
10002
  return result;
9947
10003
  }
9948
- const XML_NODE_NAME$j = "w:tc";
9949
- const SD_NODE_NAME$h = "tableCell";
10004
+ const XML_NODE_NAME$k = "w:tc";
10005
+ const SD_NODE_NAME$i = "tableCell";
9950
10006
  const validXmlAttributes$a = [];
9951
- function encode$w(params, encodedAttrs) {
10007
+ function encode$z(params, encodedAttrs) {
9952
10008
  const {
9953
10009
  node,
9954
10010
  table,
@@ -9987,42 +10043,42 @@ function encode$w(params, encodedAttrs) {
9987
10043
  }
9988
10044
  return schemaNode;
9989
10045
  }
9990
- function decode$y(params, decodedAttrs) {
10046
+ function decode$B(params, decodedAttrs) {
9991
10047
  const translated = translateTableCell(params);
9992
10048
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
9993
10049
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
9994
10050
  }
9995
10051
  return translated;
9996
10052
  }
9997
- const config$i = {
9998
- xmlName: XML_NODE_NAME$j,
9999
- sdNodeOrKeyName: SD_NODE_NAME$h,
10053
+ const config$j = {
10054
+ xmlName: XML_NODE_NAME$k,
10055
+ sdNodeOrKeyName: SD_NODE_NAME$i,
10000
10056
  type: NodeTranslator.translatorTypes.NODE,
10001
- encode: encode$w,
10002
- decode: decode$y,
10057
+ encode: encode$z,
10058
+ decode: decode$B,
10003
10059
  attributes: validXmlAttributes$a
10004
10060
  };
10005
- const translator$J = NodeTranslator.from(config$i);
10061
+ const translator$K = NodeTranslator.from(config$j);
10006
10062
  const propertyTranslators$4 = [
10007
- translator$1r,
10008
- translator$_,
10063
+ translator$1s,
10064
+ translator$$,
10065
+ translator$Z,
10009
10066
  translator$Y,
10067
+ translator$1q,
10068
+ translator$1o,
10010
10069
  translator$X,
10011
- translator$1p,
10012
- translator$1n,
10013
- translator$W,
10014
- translator$1l
10070
+ translator$1m
10015
10071
  ];
10016
- const translator$I = NodeTranslator.from(
10072
+ const translator$J = NodeTranslator.from(
10017
10073
  createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$4)
10018
10074
  );
10019
- const translator$H = NodeTranslator.from({
10075
+ const translator$I = NodeTranslator.from({
10020
10076
  xmlName: "w:cantSplit",
10021
10077
  sdNodeOrKeyName: "cantSplit",
10022
10078
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
10023
10079
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
10024
10080
  });
10025
- const translator$G = NodeTranslator.from(
10081
+ const translator$H = NodeTranslator.from(
10026
10082
  createSingleAttrPropertyHandler(
10027
10083
  "w:gridAfter",
10028
10084
  null,
@@ -10031,7 +10087,7 @@ const translator$G = NodeTranslator.from(
10031
10087
  (v2) => integerToString(v2)
10032
10088
  )
10033
10089
  );
10034
- const translator$F = NodeTranslator.from(
10090
+ const translator$G = NodeTranslator.from(
10035
10091
  createSingleAttrPropertyHandler(
10036
10092
  "w:gridBefore",
10037
10093
  null,
@@ -10040,20 +10096,20 @@ const translator$F = NodeTranslator.from(
10040
10096
  (v2) => integerToString(v2)
10041
10097
  )
10042
10098
  );
10043
- const translator$E = NodeTranslator.from({
10099
+ const translator$F = NodeTranslator.from({
10044
10100
  xmlName: "w:hidden",
10045
10101
  sdNodeOrKeyName: "hidden",
10046
10102
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
10047
10103
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
10048
10104
  });
10049
- const translator$D = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
10050
- const translator$C = NodeTranslator.from({
10105
+ const translator$E = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
10106
+ const translator$D = NodeTranslator.from({
10051
10107
  xmlName: "w:tblHeader",
10052
10108
  sdNodeOrKeyName: "repeatHeader",
10053
10109
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
10054
10110
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
10055
10111
  });
10056
- const translator$B = NodeTranslator.from({
10112
+ const translator$C = NodeTranslator.from({
10057
10113
  xmlName: "w:trHeight",
10058
10114
  sdNodeOrKeyName: "rowHeight",
10059
10115
  encode: ({ nodes }) => {
@@ -10080,23 +10136,23 @@ const translator$B = NodeTranslator.from({
10080
10136
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
10081
10137
  }
10082
10138
  });
10083
- const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
10084
- const translator$z = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
10139
+ const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
10140
+ const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
10085
10141
  const propertyTranslators$3 = [
10142
+ translator$I,
10143
+ translator$1K,
10144
+ translator$1I,
10086
10145
  translator$H,
10087
- translator$1J,
10088
- translator$1H,
10089
10146
  translator$G,
10090
10147
  translator$F,
10148
+ translator$1F,
10091
10149
  translator$E,
10092
- translator$1E,
10093
10150
  translator$D,
10094
10151
  translator$C,
10095
10152
  translator$B,
10096
- translator$A,
10097
- translator$z
10153
+ translator$A
10098
10154
  ];
10099
- const translator$y = NodeTranslator.from(
10155
+ const translator$z = NodeTranslator.from(
10100
10156
  createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$3, {
10101
10157
  cantSplit: false,
10102
10158
  hidden: false,
@@ -10165,8 +10221,8 @@ const isPlaceholderCell = (cell) => {
10165
10221
  }
10166
10222
  return false;
10167
10223
  };
10168
- const XML_NODE_NAME$i = "w:tr";
10169
- const SD_NODE_NAME$g = "tableRow";
10224
+ const XML_NODE_NAME$j = "w:tr";
10225
+ const SD_NODE_NAME$h = "tableRow";
10170
10226
  const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
10171
10227
  (xmlName) => createAttributeHandler(xmlName)
10172
10228
  );
@@ -10175,12 +10231,12 @@ const getColspan$1 = (cell) => {
10175
10231
  const numericColspan = typeof rawColspan === "string" ? parseInt(rawColspan, 10) : rawColspan;
10176
10232
  return Number.isFinite(numericColspan) && numericColspan > 0 ? numericColspan : 1;
10177
10233
  };
10178
- const encode$v = (params, encodedAttrs) => {
10234
+ const encode$y = (params, encodedAttrs) => {
10179
10235
  const { row, tableLook } = params.extraParams;
10180
10236
  let tableRowProperties = {};
10181
10237
  const tPr = row.elements.find((el) => el.name === "w:trPr");
10182
10238
  if (tPr) {
10183
- tableRowProperties = translator$y.encode({
10239
+ tableRowProperties = translator$z.encode({
10184
10240
  ...params,
10185
10241
  nodes: [tPr]
10186
10242
  });
@@ -10224,7 +10280,7 @@ const encode$v = (params, encodedAttrs) => {
10224
10280
  skipOccupiedColumns();
10225
10281
  const startColumn = currentColumnIndex;
10226
10282
  const columnWidth = gridColumnWidths?.[startColumn] || null;
10227
- const result = translator$J.encode({
10283
+ const result = translator$K.encode({
10228
10284
  ...params,
10229
10285
  path: [...params.path || [], node],
10230
10286
  extraParams: {
@@ -10276,7 +10332,7 @@ function getRowBorders({ params, row, baseBorders }) {
10276
10332
  if (!tblBorders) {
10277
10333
  return rowBaseBorders;
10278
10334
  }
10279
- const rawOverrides = translator$I.encode({ ...params, nodes: [tblBorders] }) || {};
10335
+ const rawOverrides = translator$J.encode({ ...params, nodes: [tblBorders] }) || {};
10280
10336
  const overrides = processRawTableBorders(rawOverrides);
10281
10337
  if (!Object.keys(overrides).length) {
10282
10338
  console.info(
@@ -10306,7 +10362,7 @@ function processRawTableBorders(rawBorders) {
10306
10362
  });
10307
10363
  return borders;
10308
10364
  }
10309
- const decode$x = (params, decodedAttrs) => {
10365
+ const decode$A = (params, decodedAttrs) => {
10310
10366
  const { node } = params;
10311
10367
  const cells = node.content || [];
10312
10368
  let leadingPlaceholders = 0;
@@ -10366,7 +10422,7 @@ const decode$x = (params, decodedAttrs) => {
10366
10422
  }
10367
10423
  }
10368
10424
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
10369
- const trPr = translator$y.decode({
10425
+ const trPr = translator$z.decode({
10370
10426
  ...params,
10371
10427
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
10372
10428
  });
@@ -10378,15 +10434,15 @@ const decode$x = (params, decodedAttrs) => {
10378
10434
  elements
10379
10435
  };
10380
10436
  };
10381
- const config$h = {
10382
- xmlName: XML_NODE_NAME$i,
10383
- sdNodeOrKeyName: SD_NODE_NAME$g,
10437
+ const config$i = {
10438
+ xmlName: XML_NODE_NAME$j,
10439
+ sdNodeOrKeyName: SD_NODE_NAME$h,
10384
10440
  type: NodeTranslator.translatorTypes.NODE,
10385
- encode: encode$v,
10386
- decode: decode$x,
10441
+ encode: encode$y,
10442
+ decode: decode$A,
10387
10443
  attributes: validXmlAttributes$9
10388
10444
  };
10389
- const translator$x = NodeTranslator.from(config$h);
10445
+ const translator$y = NodeTranslator.from(config$i);
10390
10446
  function parseTagValueJSON(json) {
10391
10447
  if (typeof json !== "string") {
10392
10448
  return {};
@@ -25077,8 +25133,8 @@ function translateAnchorNode(params) {
25077
25133
  elements: mergedElements
25078
25134
  };
25079
25135
  }
25080
- const XML_NODE_NAME$h = "wp:anchor";
25081
- const SD_NODE_NAME$f = ["image", "shapeGroup", "vectorShape", "contentBlock"];
25136
+ const XML_NODE_NAME$i = "wp:anchor";
25137
+ const SD_NODE_NAME$g = ["image", "shapeGroup", "vectorShape", "contentBlock"];
25082
25138
  const validXmlAttributes$8 = [
25083
25139
  "distT",
25084
25140
  "distB",
@@ -25093,29 +25149,29 @@ const validXmlAttributes$8 = [
25093
25149
  "wp14:anchorId",
25094
25150
  "wp14:editId"
25095
25151
  ].map((xmlName) => createAttributeHandler(xmlName));
25096
- function encode$u(params) {
25152
+ function encode$x(params) {
25097
25153
  const { node } = params.extraParams;
25098
25154
  if (!node || !node.name) {
25099
25155
  return null;
25100
25156
  }
25101
25157
  return handleAnchorNode(params);
25102
25158
  }
25103
- function decode$w(params) {
25159
+ function decode$z(params) {
25104
25160
  const { node } = params;
25105
25161
  if (!node || !node.type) {
25106
25162
  return null;
25107
25163
  }
25108
25164
  return translateAnchorNode(params);
25109
25165
  }
25110
- const config$g = {
25111
- xmlName: XML_NODE_NAME$h,
25112
- sdNodeOrKeyName: SD_NODE_NAME$f,
25166
+ const config$h = {
25167
+ xmlName: XML_NODE_NAME$i,
25168
+ sdNodeOrKeyName: SD_NODE_NAME$g,
25113
25169
  type: NodeTranslator.translatorTypes.NODE,
25114
- encode: encode$u,
25115
- decode: decode$w,
25170
+ encode: encode$x,
25171
+ decode: decode$z,
25116
25172
  attributes: validXmlAttributes$8
25117
25173
  };
25118
- const translator$w = NodeTranslator.from(config$g);
25174
+ const translator$x = NodeTranslator.from(config$h);
25119
25175
  function handleInlineNode(params) {
25120
25176
  const { node } = params.extraParams;
25121
25177
  if (node.name !== "wp:inline") {
@@ -25142,43 +25198,43 @@ function translateInlineNode(params) {
25142
25198
  elements: mergedElements
25143
25199
  };
25144
25200
  }
25145
- const XML_NODE_NAME$g = "wp:inline";
25146
- const SD_NODE_NAME$e = ["image", "shapeGroup", "vectorShape", "contentBlock"];
25201
+ const XML_NODE_NAME$h = "wp:inline";
25202
+ const SD_NODE_NAME$f = ["image", "shapeGroup", "vectorShape", "contentBlock"];
25147
25203
  const validXmlAttributes$7 = ["distT", "distB", "distL", "distR", "wp14:anchorId", "wp14:editId"].map(
25148
25204
  (xmlName) => createAttributeHandler(xmlName)
25149
25205
  );
25150
- function encode$t(params) {
25206
+ function encode$w(params) {
25151
25207
  const { node } = params.extraParams;
25152
25208
  if (!node || !node.name) {
25153
25209
  return null;
25154
25210
  }
25155
25211
  return handleInlineNode(params);
25156
25212
  }
25157
- function decode$v(params) {
25213
+ function decode$y(params) {
25158
25214
  const { node } = params;
25159
25215
  if (!node || !node.type) {
25160
25216
  return null;
25161
25217
  }
25162
25218
  return translateInlineNode(params);
25163
25219
  }
25164
- const config$f = {
25165
- xmlName: XML_NODE_NAME$g,
25166
- sdNodeOrKeyName: SD_NODE_NAME$e,
25220
+ const config$g = {
25221
+ xmlName: XML_NODE_NAME$h,
25222
+ sdNodeOrKeyName: SD_NODE_NAME$f,
25167
25223
  type: NodeTranslator.translatorTypes.NODE,
25168
- encode: encode$t,
25169
- decode: decode$v,
25224
+ encode: encode$w,
25225
+ decode: decode$y,
25170
25226
  attributes: validXmlAttributes$7
25171
25227
  };
25172
- const translator$v = NodeTranslator.from(config$f);
25173
- const XML_NODE_NAME$f = "w:drawing";
25174
- const SD_NODE_NAME$d = [];
25228
+ const translator$w = NodeTranslator.from(config$g);
25229
+ const XML_NODE_NAME$g = "w:drawing";
25230
+ const SD_NODE_NAME$e = [];
25175
25231
  const validXmlAttributes$6 = [];
25176
- function encode$s(params) {
25232
+ function encode$v(params) {
25177
25233
  const nodes = params.nodes;
25178
25234
  const node = nodes[0];
25179
25235
  const translatorByChildName = {
25180
- "wp:anchor": translator$w,
25181
- "wp:inline": translator$v
25236
+ "wp:anchor": translator$x,
25237
+ "wp:inline": translator$w
25182
25238
  };
25183
25239
  const result = (node.elements || []).reduce((acc, child) => {
25184
25240
  if (acc) return acc;
@@ -25196,12 +25252,12 @@ function encode$s(params) {
25196
25252
  }
25197
25253
  };
25198
25254
  }
25199
- function decode$u(params) {
25255
+ function decode$x(params) {
25200
25256
  const { node } = params;
25201
25257
  if (!node || !node.type) {
25202
25258
  return null;
25203
25259
  }
25204
- const childTranslator = node.attrs.isAnchor ? translator$w : translator$v;
25260
+ const childTranslator = node.attrs.isAnchor ? translator$x : translator$w;
25205
25261
  const resultNode = childTranslator.decode(params);
25206
25262
  return wrapTextInRun(
25207
25263
  {
@@ -25211,15 +25267,15 @@ function decode$u(params) {
25211
25267
  []
25212
25268
  );
25213
25269
  }
25214
- const config$e = {
25215
- xmlName: XML_NODE_NAME$f,
25216
- sdNodeOrKeyName: SD_NODE_NAME$d,
25270
+ const config$f = {
25271
+ xmlName: XML_NODE_NAME$g,
25272
+ sdNodeOrKeyName: SD_NODE_NAME$e,
25217
25273
  type: NodeTranslator.translatorTypes.NODE,
25218
- encode: encode$s,
25219
- decode: decode$u,
25274
+ encode: encode$v,
25275
+ decode: decode$x,
25220
25276
  attributes: validXmlAttributes$6
25221
25277
  };
25222
- const translator$u = NodeTranslator.from(config$e);
25278
+ const translator$v = NodeTranslator.from(config$f);
25223
25279
  function getTextNodeForExport(text, marks, params) {
25224
25280
  const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text);
25225
25281
  const space = hasLeadingOrTrailingSpace ? "preserve" : null;
@@ -25228,7 +25284,7 @@ function getTextNodeForExport(text, marks, params) {
25228
25284
  const textRunProperties = decodeRPrFromMarks(marks || []);
25229
25285
  const parentRunProperties = params.extraParams?.runProperties || {};
25230
25286
  const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
25231
- const rPrNode = translator$1P.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
25287
+ const rPrNode = translator$1Q.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
25232
25288
  textNodes.push({
25233
25289
  name: "w:t",
25234
25290
  elements: [{ text, type: "text" }],
@@ -25627,7 +25683,7 @@ function prepareTextAnnotation(params) {
25627
25683
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params);
25628
25684
  }
25629
25685
  function prepareImageAnnotation(params, imageSize) {
25630
- return translator$u.decode({
25686
+ return translator$v.decode({
25631
25687
  ...params,
25632
25688
  imageSize
25633
25689
  });
@@ -25712,7 +25768,7 @@ function prepareUrlAnnotation(params) {
25712
25768
  }
25713
25769
  ]
25714
25770
  };
25715
- return translator$13.decode({
25771
+ return translator$14.decode({
25716
25772
  ...params,
25717
25773
  node: linkTextNode
25718
25774
  });
@@ -26050,10 +26106,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
26050
26106
  };
26051
26107
  return result;
26052
26108
  }
26053
- const XML_NODE_NAME$e = "w:sdt";
26054
- const SD_NODE_NAME$c = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
26109
+ const XML_NODE_NAME$f = "w:sdt";
26110
+ const SD_NODE_NAME$d = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
26055
26111
  const validXmlAttributes$5 = [];
26056
- function encode$r(params) {
26112
+ function encode$u(params) {
26057
26113
  const nodes = params.nodes;
26058
26114
  const node = nodes[0];
26059
26115
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -26063,7 +26119,7 @@ function encode$r(params) {
26063
26119
  const result = handler2(params);
26064
26120
  return result;
26065
26121
  }
26066
- function decode$t(params) {
26122
+ function decode$w(params) {
26067
26123
  const { node } = params;
26068
26124
  if (!node || !node.type) {
26069
26125
  return null;
@@ -26081,15 +26137,15 @@ function decode$t(params) {
26081
26137
  const result = decoder();
26082
26138
  return result;
26083
26139
  }
26084
- const config$d = {
26085
- xmlName: XML_NODE_NAME$e,
26086
- sdNodeOrKeyName: SD_NODE_NAME$c,
26140
+ const config$e = {
26141
+ xmlName: XML_NODE_NAME$f,
26142
+ sdNodeOrKeyName: SD_NODE_NAME$d,
26087
26143
  type: NodeTranslator.translatorTypes.NODE,
26088
- encode: encode$r,
26089
- decode: decode$t,
26144
+ encode: encode$u,
26145
+ decode: decode$w,
26090
26146
  attributes: validXmlAttributes$5
26091
26147
  };
26092
- const translator$t = NodeTranslator.from(config$d);
26148
+ const translator$u = NodeTranslator.from(config$e);
26093
26149
  const getColspan = (cell) => {
26094
26150
  const rawColspan = cell?.attrs?.colspan;
26095
26151
  const numericColspan = typeof rawColspan === "string" ? parseInt(rawColspan, 10) : rawColspan;
@@ -26180,16 +26236,16 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
26180
26236
  }
26181
26237
  return table;
26182
26238
  }
26183
- const translator$s = NodeTranslator.from({
26239
+ const translator$t = NodeTranslator.from({
26184
26240
  xmlName: "w:bidiVisual",
26185
26241
  sdNodeOrKeyName: "rightToLeft",
26186
26242
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26187
26243
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
26188
26244
  });
26189
- const translator$r = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
26190
- const translator$q = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
26191
- const translator$p = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
26192
- const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
26245
+ const translator$s = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
26246
+ const translator$r = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
26247
+ const translator$q = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
26248
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
26193
26249
  const tblLookBitmask = Object.freeze({
26194
26250
  firstRow: 32,
26195
26251
  lastRow: 64,
@@ -26208,7 +26264,7 @@ const decodeTblLookVal = (val) => {
26208
26264
  if (!Number.isFinite(numeric)) return null;
26209
26265
  return Object.fromEntries(Object.entries(tblLookBitmask).map(([key, mask]) => [key, (numeric & mask) === mask]));
26210
26266
  };
26211
- const translator$n = NodeTranslator.from({
26267
+ const translator$o = NodeTranslator.from({
26212
26268
  xmlName: "w:tblLook",
26213
26269
  sdNodeOrKeyName: "tblLook",
26214
26270
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -26228,16 +26284,16 @@ const translator$n = NodeTranslator.from({
26228
26284
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
26229
26285
  }
26230
26286
  });
26231
- const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
26232
- const translator$l = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
26233
- const translator$k = NodeTranslator.from(
26287
+ const translator$n = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
26288
+ const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
26289
+ const translator$l = NodeTranslator.from(
26234
26290
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
26235
26291
  );
26236
- const translator$j = NodeTranslator.from(
26292
+ const translator$k = NodeTranslator.from(
26237
26293
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
26238
26294
  );
26239
- const translator$i = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
26240
- const translator$h = NodeTranslator.from({
26295
+ const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
26296
+ const translator$i = NodeTranslator.from({
26241
26297
  xmlName: "w:tblpPr",
26242
26298
  sdNodeOrKeyName: "floatingTableProperties",
26243
26299
  attributes: ["w:leftFromText", "w:rightFromText", "w:topFromText", "w:bottomFromText", "w:tblpX", "w:tblpY"].map((attr) => createAttributeHandler(attr, null, parseInteger, integerToString)).concat(["w:horzAnchor", "w:vertAnchor", "w:tblpXSpec", "w:tblpYSpec"].map((attr) => createAttributeHandler(attr))),
@@ -26250,22 +26306,23 @@ const translator$h = NodeTranslator.from({
26250
26306
  }
26251
26307
  });
26252
26308
  const propertyTranslators$2 = [
26253
- translator$1q,
26254
- translator$Z,
26255
- translator$1o,
26256
- translator$1m,
26257
- translator$V,
26258
- translator$1k
26309
+ translator$1r,
26310
+ translator$_,
26311
+ translator$1p,
26312
+ translator$1n,
26313
+ translator$W,
26314
+ translator$1l
26259
26315
  ];
26260
- const translator$g = NodeTranslator.from(
26316
+ const translator$h = NodeTranslator.from(
26261
26317
  createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$2)
26262
26318
  );
26263
26319
  const propertyTranslators$1 = [
26320
+ translator$t,
26321
+ translator$1F,
26322
+ translator$2d,
26264
26323
  translator$s,
26265
- translator$1E,
26266
- translator$2c,
26324
+ translator$E,
26267
26325
  translator$r,
26268
- translator$D,
26269
26326
  translator$q,
26270
26327
  translator$p,
26271
26328
  translator$o,
@@ -26275,14 +26332,13 @@ const propertyTranslators$1 = [
26275
26332
  translator$k,
26276
26333
  translator$j,
26277
26334
  translator$i,
26278
- translator$h,
26279
- translator$I,
26280
- translator$g
26335
+ translator$J,
26336
+ translator$h
26281
26337
  ];
26282
- const translator$f = NodeTranslator.from(
26338
+ const translator$g = NodeTranslator.from(
26283
26339
  createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators$1)
26284
26340
  );
26285
- const translator$e = NodeTranslator.from(
26341
+ const translator$f = NodeTranslator.from(
26286
26342
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
26287
26343
  );
26288
26344
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -26332,24 +26388,24 @@ const resolveFallbackColumnWidthTwips = (params, totalColumns, cellMinWidthTwips
26332
26388
  }
26333
26389
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
26334
26390
  };
26335
- const XML_NODE_NAME$d = "w:tblGrid";
26391
+ const XML_NODE_NAME$e = "w:tblGrid";
26336
26392
  const SD_ATTR_KEY$1 = "grid";
26337
26393
  const cellMinWidth = helpers.pixelsToTwips(10);
26338
- const encode$q = (params) => {
26394
+ const encode$t = (params) => {
26339
26395
  const { nodes } = params;
26340
26396
  const node = nodes[0];
26341
26397
  const attributes = encodeProperties(
26342
26398
  { ...params, nodes: [node] },
26343
- { [translator$e.xmlName]: translator$e },
26399
+ { [translator$f.xmlName]: translator$f },
26344
26400
  true
26345
26401
  );
26346
26402
  return {
26347
- xmlName: XML_NODE_NAME$d,
26403
+ xmlName: XML_NODE_NAME$e,
26348
26404
  sdNodeOrKeyName: SD_ATTR_KEY$1,
26349
26405
  attributes
26350
26406
  };
26351
26407
  };
26352
- const decode$s = (params) => {
26408
+ const decode$v = (params) => {
26353
26409
  const { grid: rawGrid } = params.node.attrs || {};
26354
26410
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
26355
26411
  const { firstRow = {}, preferTableGrid = false, totalColumns: requestedColumns } = params.extraParams || {};
@@ -26382,10 +26438,10 @@ const decode$s = (params) => {
26382
26438
  const roundedWidth = Math.round(numericWidth);
26383
26439
  const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
26384
26440
  const safeWidth = Math.max(roundedWidth, minimumWidth);
26385
- const decoded = translator$e.decode({
26441
+ const decoded = translator$f.decode({
26386
26442
  node: { type: (
26387
26443
  /** @type {string} */
26388
- translator$e.sdNodeOrKeyName
26444
+ translator$f.sdNodeOrKeyName
26389
26445
  ), attrs: { col: safeWidth } }
26390
26446
  });
26391
26447
  if (decoded) elements.push(decoded);
@@ -26415,21 +26471,21 @@ const decode$s = (params) => {
26415
26471
  pushColumn(cellWidthTwips, { enforceMinimum });
26416
26472
  }
26417
26473
  const newNode = {
26418
- name: XML_NODE_NAME$d,
26474
+ name: XML_NODE_NAME$e,
26419
26475
  attributes: {},
26420
26476
  elements
26421
26477
  };
26422
26478
  return newNode;
26423
26479
  };
26424
- const config$c = {
26425
- xmlName: XML_NODE_NAME$d,
26480
+ const config$d = {
26481
+ xmlName: XML_NODE_NAME$e,
26426
26482
  sdNodeOrKeyName: SD_ATTR_KEY$1,
26427
- encode: encode$q,
26428
- decode: decode$s
26483
+ encode: encode$t,
26484
+ decode: decode$v
26429
26485
  };
26430
- const translator$d = NodeTranslator.from(config$c);
26431
- const propertyTranslators = [translator$f, translator$K];
26432
- const translator$c = NodeTranslator.from(
26486
+ const translator$e = NodeTranslator.from(config$d);
26487
+ const propertyTranslators = [translator$g, translator$L];
26488
+ const translator$d = NodeTranslator.from(
26433
26489
  createNestedPropertiesTranslator("w:tblStylePr", "tableStyleProperties", propertyTranslators)
26434
26490
  );
26435
26491
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
@@ -26494,21 +26550,21 @@ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasure
26494
26550
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
26495
26551
  };
26496
26552
  };
26497
- const XML_NODE_NAME$c = "w:tbl";
26498
- const SD_NODE_NAME$b = "table";
26499
- const encode$p = (params, encodedAttrs) => {
26553
+ const XML_NODE_NAME$d = "w:tbl";
26554
+ const SD_NODE_NAME$c = "table";
26555
+ const encode$s = (params, encodedAttrs) => {
26500
26556
  const { nodes } = params;
26501
26557
  const node = nodes[0];
26502
26558
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
26503
26559
  if (tblPr) {
26504
- const encodedProperties = translator$f.encode({ ...params, nodes: [tblPr] });
26560
+ const encodedProperties = translator$g.encode({ ...params, nodes: [tblPr] });
26505
26561
  encodedAttrs["tableProperties"] = encodedProperties || {};
26506
26562
  } else {
26507
26563
  encodedAttrs["tableProperties"] ||= {};
26508
26564
  }
26509
26565
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
26510
26566
  if (tblGrid) {
26511
- encodedAttrs["grid"] = translator$d.encode({ ...params, nodes: [tblGrid] }).attributes;
26567
+ encodedAttrs["grid"] = translator$e.encode({ ...params, nodes: [tblGrid] }).attributes;
26512
26568
  }
26513
26569
  [
26514
26570
  "tableStyleId",
@@ -26574,7 +26630,7 @@ const encode$p = (params, encodedAttrs) => {
26574
26630
  const totalRows = rows.length;
26575
26631
  const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
26576
26632
  rows.forEach((row, rowIndex) => {
26577
- const result = translator$x.encode({
26633
+ const result = translator$y.encode({
26578
26634
  ...params,
26579
26635
  path: [...params.path || [], node],
26580
26636
  nodes: [row],
@@ -26632,7 +26688,7 @@ const encode$p = (params, encodedAttrs) => {
26632
26688
  attrs: encodedAttrs
26633
26689
  };
26634
26690
  };
26635
- const decode$r = (params, decodedAttrs) => {
26691
+ const decode$u = (params, decodedAttrs) => {
26636
26692
  params.node = preProcessVerticalMergeCells(params.node, params);
26637
26693
  const { node } = params;
26638
26694
  const rawGrid = node.attrs?.grid;
@@ -26646,7 +26702,7 @@ const decode$r = (params, decodedAttrs) => {
26646
26702
  };
26647
26703
  const elements = translateChildNodes({ ...params, extraParams });
26648
26704
  const firstRow = node.content?.find((n) => n.type === "tableRow");
26649
- const element = translator$d.decode({
26705
+ const element = translator$e.decode({
26650
26706
  ...params,
26651
26707
  node: { ...node, attrs: { ...node.attrs, grid } },
26652
26708
  extraParams: {
@@ -26657,7 +26713,7 @@ const decode$r = (params, decodedAttrs) => {
26657
26713
  if (element) elements.unshift(element);
26658
26714
  if (node.attrs?.tableProperties) {
26659
26715
  const properties = { ...node.attrs.tableProperties };
26660
- const element2 = translator$f.decode({
26716
+ const element2 = translator$g.decode({
26661
26717
  ...params,
26662
26718
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties } }
26663
26719
  });
@@ -26719,7 +26775,7 @@ function _getReferencedTableStyles(tableStyleReference, params) {
26719
26775
  if (baseTblPr && baseTblPr.elements) {
26720
26776
  tblPr.elements = [...baseTblPr.elements, ...tblPr.elements];
26721
26777
  }
26722
- const tableProperties = translator$f.encode({ ...params, nodes: [tblPr] });
26778
+ const tableProperties = translator$g.encode({ ...params, nodes: [tblPr] });
26723
26779
  if (tableProperties) {
26724
26780
  const borders = _processTableBorders(tableProperties.borders || {});
26725
26781
  if (borders || Object.keys(borders).length) stylesToReturn.borders = borders;
@@ -26739,7 +26795,7 @@ function _getReferencedTableStyles(tableStyleReference, params) {
26739
26795
  let styleProps = {};
26740
26796
  if (tblStylePr) {
26741
26797
  styleProps = tblStylePr.reduce((acc, el) => {
26742
- acc[el.attributes["w:type"]] = translator$c.encode({ ...params, nodes: [el] });
26798
+ acc[el.attributes["w:type"]] = translator$d.encode({ ...params, nodes: [el] });
26743
26799
  return acc;
26744
26800
  }, {});
26745
26801
  }
@@ -26748,85 +26804,85 @@ function _getReferencedTableStyles(tableStyleReference, params) {
26748
26804
  ...styleProps
26749
26805
  };
26750
26806
  }
26751
- const config$b = {
26752
- xmlName: XML_NODE_NAME$c,
26753
- sdNodeOrKeyName: SD_NODE_NAME$b,
26807
+ const config$c = {
26808
+ xmlName: XML_NODE_NAME$d,
26809
+ sdNodeOrKeyName: SD_NODE_NAME$c,
26754
26810
  type: NodeTranslator.translatorTypes.NODE,
26755
- encode: encode$p,
26756
- decode: decode$r,
26811
+ encode: encode$s,
26812
+ decode: decode$u,
26757
26813
  attributes: []
26758
26814
  };
26759
- const translator$b = NodeTranslator.from(config$b);
26760
- const encode$o = (attributes) => {
26815
+ const translator$c = NodeTranslator.from(config$c);
26816
+ const encode$r = (attributes) => {
26761
26817
  return attributes["w:id"];
26762
26818
  };
26763
- const decode$q = (attrs) => {
26819
+ const decode$t = (attrs) => {
26764
26820
  return attrs.id;
26765
26821
  };
26766
- const attrConfig$e = Object.freeze({
26822
+ const attrConfig$g = Object.freeze({
26767
26823
  xmlName: "w:id",
26768
26824
  sdName: "id",
26769
- encode: encode$o,
26770
- decode: decode$q
26825
+ encode: encode$r,
26826
+ decode: decode$t
26771
26827
  });
26772
- const encode$n = (attributes) => {
26828
+ const encode$q = (attributes) => {
26773
26829
  return attributes["w:name"];
26774
26830
  };
26775
- const decode$p = (attrs) => {
26831
+ const decode$s = (attrs) => {
26776
26832
  return attrs.name;
26777
26833
  };
26778
- const attrConfig$d = Object.freeze({
26834
+ const attrConfig$f = Object.freeze({
26779
26835
  xmlName: "w:name",
26780
26836
  sdName: "name",
26781
- encode: encode$n,
26782
- decode: decode$p
26837
+ encode: encode$q,
26838
+ decode: decode$s
26783
26839
  });
26784
- const encode$m = (attributes) => {
26840
+ const encode$p = (attributes) => {
26785
26841
  return attributes["w:colFirst"];
26786
26842
  };
26787
- const decode$o = (attrs) => {
26843
+ const decode$r = (attrs) => {
26788
26844
  return attrs.colFirst;
26789
26845
  };
26790
- const attrConfig$c = Object.freeze({
26846
+ const attrConfig$e = Object.freeze({
26791
26847
  xmlName: "w:colFirst",
26792
26848
  sdName: "colFirst",
26793
- encode: encode$m,
26794
- decode: decode$o
26849
+ encode: encode$p,
26850
+ decode: decode$r
26795
26851
  });
26796
- const encode$l = (attributes) => {
26852
+ const encode$o = (attributes) => {
26797
26853
  return attributes["w:colLast"];
26798
26854
  };
26799
- const decode$n = (attrs) => {
26855
+ const decode$q = (attrs) => {
26800
26856
  return attrs.colLast;
26801
26857
  };
26802
- const attrConfig$b = Object.freeze({
26858
+ const attrConfig$d = Object.freeze({
26803
26859
  xmlName: "w:colLast",
26804
26860
  sdName: "colLast",
26805
- encode: encode$l,
26806
- decode: decode$n
26861
+ encode: encode$o,
26862
+ decode: decode$q
26807
26863
  });
26808
- const encode$k = (attributes) => {
26864
+ const encode$n = (attributes) => {
26809
26865
  return attributes["w:displacedByCustomXml"];
26810
26866
  };
26811
- const decode$m = (attrs) => {
26867
+ const decode$p = (attrs) => {
26812
26868
  return attrs.displacedByCustomXml;
26813
26869
  };
26814
- const attrConfig$a = Object.freeze({
26870
+ const attrConfig$c = Object.freeze({
26815
26871
  xmlName: "w:displacedByCustomXml",
26816
26872
  sdName: "displacedByCustomXml",
26817
- encode: encode$k,
26818
- decode: decode$m
26873
+ encode: encode$n,
26874
+ decode: decode$p
26819
26875
  });
26820
- const bookmarkStartAttrConfigs = [attrConfig$e, attrConfig$d, attrConfig$c, attrConfig$b, attrConfig$a];
26821
- const XML_NODE_NAME$b = "w:bookmarkStart";
26822
- const SD_NODE_NAME$a = "bookmarkStart";
26823
- const encode$j = (params, encodedAttrs = {}) => {
26876
+ const bookmarkStartAttrConfigs = [attrConfig$g, attrConfig$f, attrConfig$e, attrConfig$d, attrConfig$c];
26877
+ const XML_NODE_NAME$c = "w:bookmarkStart";
26878
+ const SD_NODE_NAME$b = "bookmarkStart";
26879
+ const encode$m = (params, encodedAttrs = {}) => {
26824
26880
  return {
26825
26881
  type: "bookmarkStart",
26826
26882
  attrs: encodedAttrs
26827
26883
  };
26828
26884
  };
26829
- const decode$l = (params, decodedAttrs = {}) => {
26885
+ const decode$o = (params, decodedAttrs = {}) => {
26830
26886
  const result = {
26831
26887
  name: "w:bookmarkStart",
26832
26888
  elements: []
@@ -26836,49 +26892,49 @@ const decode$l = (params, decodedAttrs = {}) => {
26836
26892
  }
26837
26893
  return result;
26838
26894
  };
26839
- const config$a = {
26840
- xmlName: XML_NODE_NAME$b,
26841
- sdNodeOrKeyName: SD_NODE_NAME$a,
26895
+ const config$b = {
26896
+ xmlName: XML_NODE_NAME$c,
26897
+ sdNodeOrKeyName: SD_NODE_NAME$b,
26842
26898
  type: NodeTranslator.translatorTypes.NODE,
26843
- encode: encode$j,
26844
- decode: decode$l,
26899
+ encode: encode$m,
26900
+ decode: decode$o,
26845
26901
  attributes: bookmarkStartAttrConfigs
26846
26902
  };
26847
- const translator$a = NodeTranslator.from(config$a);
26848
- const encode$i = (attributes) => {
26903
+ const translator$b = NodeTranslator.from(config$b);
26904
+ const encode$l = (attributes) => {
26849
26905
  return attributes["w:id"];
26850
26906
  };
26851
- const decode$k = (attrs) => {
26907
+ const decode$n = (attrs) => {
26852
26908
  return attrs.id;
26853
26909
  };
26854
- const attrConfig$9 = Object.freeze({
26910
+ const attrConfig$b = Object.freeze({
26855
26911
  xmlName: "w:id",
26856
26912
  sdName: "id",
26857
- encode: encode$i,
26858
- decode: decode$k
26913
+ encode: encode$l,
26914
+ decode: decode$n
26859
26915
  });
26860
- const encode$h = (attributes) => {
26916
+ const encode$k = (attributes) => {
26861
26917
  return attributes["w:displacedByCustomXml"];
26862
26918
  };
26863
- const decode$j = (attrs) => {
26919
+ const decode$m = (attrs) => {
26864
26920
  return attrs.displacedByCustomXml;
26865
26921
  };
26866
- const attrConfig$8 = Object.freeze({
26922
+ const attrConfig$a = Object.freeze({
26867
26923
  xmlName: "w:displacedByCustomXml",
26868
26924
  sdName: "displacedByCustomXml",
26869
- encode: encode$h,
26870
- decode: decode$j
26925
+ encode: encode$k,
26926
+ decode: decode$m
26871
26927
  });
26872
- const bookmarkEndAttrConfigs = [attrConfig$9, attrConfig$8];
26873
- const XML_NODE_NAME$a = "w:bookmarkEnd";
26874
- const SD_NODE_NAME$9 = "bookmarkEnd";
26875
- const encode$g = (params, encodedAttrs = {}) => {
26928
+ const bookmarkEndAttrConfigs = [attrConfig$b, attrConfig$a];
26929
+ const XML_NODE_NAME$b = "w:bookmarkEnd";
26930
+ const SD_NODE_NAME$a = "bookmarkEnd";
26931
+ const encode$j = (params, encodedAttrs = {}) => {
26876
26932
  return {
26877
26933
  type: "bookmarkEnd",
26878
26934
  attrs: encodedAttrs
26879
26935
  };
26880
26936
  };
26881
- const decode$i = (params, decodedAttrs = {}) => {
26937
+ const decode$l = (params, decodedAttrs = {}) => {
26882
26938
  const result = {
26883
26939
  name: "w:bookmarkEnd",
26884
26940
  elements: []
@@ -26888,27 +26944,27 @@ const decode$i = (params, decodedAttrs = {}) => {
26888
26944
  }
26889
26945
  return result;
26890
26946
  };
26891
- const config$9 = {
26892
- xmlName: XML_NODE_NAME$a,
26893
- sdNodeOrKeyName: SD_NODE_NAME$9,
26947
+ const config$a = {
26948
+ xmlName: XML_NODE_NAME$b,
26949
+ sdNodeOrKeyName: SD_NODE_NAME$a,
26894
26950
  type: NodeTranslator.translatorTypes.NODE,
26895
- encode: encode$g,
26896
- decode: decode$i,
26951
+ encode: encode$j,
26952
+ decode: decode$l,
26897
26953
  attributes: bookmarkEndAttrConfigs
26898
26954
  };
26899
- const translator$9 = NodeTranslator.from(config$9);
26900
- const decode$h = (attrs) => attrs?.["w:id"];
26901
- const attrConfig$7 = Object.freeze({
26955
+ const translator$a = NodeTranslator.from(config$a);
26956
+ const decode$k = (attrs) => attrs?.["w:id"];
26957
+ const attrConfig$9 = Object.freeze({
26902
26958
  xmlName: "w:id",
26903
26959
  sdName: "w:id",
26904
26960
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
26905
26961
  encode: () => {
26906
26962
  },
26907
- decode: decode$h
26963
+ decode: decode$k
26908
26964
  });
26909
- const XML_NODE_NAME$9 = "w:commentRange";
26910
- const SD_NODE_NAME$8 = "commentRange";
26911
- const decode$g = (params) => {
26965
+ const XML_NODE_NAME$a = "w:commentRange";
26966
+ const SD_NODE_NAME$9 = "commentRange";
26967
+ const decode$j = (params) => {
26912
26968
  const { node, comments, commentsExportType, exportedCommentDefs } = params;
26913
26969
  if (!node) return;
26914
26970
  if (!comments) return;
@@ -26949,10 +27005,10 @@ const getCommentSchema = (type, commentIndex) => {
26949
27005
  };
26950
27006
  };
26951
27007
  const getConfig = (type) => {
26952
- const sdName = `${SD_NODE_NAME$8}${type}`;
27008
+ const sdName = `${SD_NODE_NAME$9}${type}`;
26953
27009
  const isStart = type === "Start";
26954
27010
  return {
26955
- xmlName: `${XML_NODE_NAME$9}${type}`,
27011
+ xmlName: `${XML_NODE_NAME$a}${type}`,
26956
27012
  sdNodeOrKeyName: sdName,
26957
27013
  type: NodeTranslator.translatorTypes.NODE,
26958
27014
  encode: ({ nodes }) => {
@@ -26964,84 +27020,84 @@ const getConfig = (type) => {
26964
27020
  attrs
26965
27021
  };
26966
27022
  },
26967
- decode: decode$g,
26968
- attributes: [attrConfig$7]
27023
+ decode: decode$j,
27024
+ attributes: [attrConfig$9]
26969
27025
  };
26970
27026
  };
26971
27027
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
26972
27028
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
26973
- const encode$f = (attributes) => {
27029
+ const encode$i = (attributes) => {
26974
27030
  return attributes["w:id"];
26975
27031
  };
26976
- const decode$f = (attrs) => {
27032
+ const decode$i = (attrs) => {
26977
27033
  return attrs.id;
26978
27034
  };
26979
- const attrConfig$6 = Object.freeze({
27035
+ const attrConfig$8 = Object.freeze({
26980
27036
  xmlName: "w:id",
26981
27037
  sdName: "id",
26982
- encode: encode$f,
26983
- decode: decode$f
27038
+ encode: encode$i,
27039
+ decode: decode$i
26984
27040
  });
26985
- const encode$e = (attributes) => {
27041
+ const encode$h = (attributes) => {
26986
27042
  return attributes["w:edGrp"];
26987
27043
  };
26988
- const decode$e = (attrs) => {
27044
+ const decode$h = (attrs) => {
26989
27045
  return attrs.edGrp;
26990
27046
  };
26991
- const attrConfig$5 = Object.freeze({
27047
+ const attrConfig$7 = Object.freeze({
26992
27048
  xmlName: "w:edGrp",
26993
27049
  sdName: "edGrp",
26994
- encode: encode$e,
26995
- decode: decode$e
27050
+ encode: encode$h,
27051
+ decode: decode$h
26996
27052
  });
26997
- const encode$d = (attributes) => {
27053
+ const encode$g = (attributes) => {
26998
27054
  return attributes["w:ed"];
26999
27055
  };
27000
- const decode$d = (attrs) => {
27056
+ const decode$g = (attrs) => {
27001
27057
  return attrs.ed;
27002
27058
  };
27003
- const attrConfig$4 = Object.freeze({
27059
+ const attrConfig$6 = Object.freeze({
27004
27060
  xmlName: "w:ed",
27005
27061
  sdName: "ed",
27006
- encode: encode$d,
27007
- decode: decode$d
27062
+ encode: encode$g,
27063
+ decode: decode$g
27008
27064
  });
27009
- const encode$c = (attributes) => {
27065
+ const encode$f = (attributes) => {
27010
27066
  return parseInteger(attributes["w:colFirst"]);
27011
27067
  };
27012
- const decode$c = (attrs) => {
27068
+ const decode$f = (attrs) => {
27013
27069
  return integerToString(attrs.colFirst);
27014
27070
  };
27015
- const attrConfig$3 = Object.freeze({
27071
+ const attrConfig$5 = Object.freeze({
27016
27072
  xmlName: "w:colFirst",
27017
27073
  sdName: "colFirst",
27018
- encode: encode$c,
27019
- decode: decode$c
27074
+ encode: encode$f,
27075
+ decode: decode$f
27020
27076
  });
27021
- const encode$b = (attributes) => {
27077
+ const encode$e = (attributes) => {
27022
27078
  return parseInteger(attributes["w:colLast"]);
27023
27079
  };
27024
- const decode$b = (attrs) => {
27080
+ const decode$e = (attrs) => {
27025
27081
  return integerToString(attrs.colLast);
27026
27082
  };
27027
- const attrConfig$2 = Object.freeze({
27083
+ const attrConfig$4 = Object.freeze({
27028
27084
  xmlName: "w:colLast",
27029
27085
  sdName: "colLast",
27030
- encode: encode$b,
27031
- decode: decode$b
27086
+ encode: encode$e,
27087
+ decode: decode$e
27032
27088
  });
27033
- const validXmlAttributes$4 = [attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3, attrConfig$2];
27034
- const XML_NODE_NAME$8 = "w:permStart";
27035
- const SD_NODE_NAME$7 = "permStart";
27036
- const encode$a = (params, encodedAttrs = {}) => {
27089
+ const validXmlAttributes$4 = [attrConfig$8, attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4];
27090
+ const XML_NODE_NAME$9 = "w:permStart";
27091
+ const SD_NODE_NAME$8 = "permStart";
27092
+ const encode$d = (params, encodedAttrs = {}) => {
27037
27093
  return {
27038
27094
  type: "permStart",
27039
27095
  attrs: encodedAttrs
27040
27096
  };
27041
27097
  };
27042
- const decode$a = (params, decodedAttrs = {}) => {
27098
+ const decode$d = (params, decodedAttrs = {}) => {
27043
27099
  const result = {
27044
- name: XML_NODE_NAME$8,
27100
+ name: XML_NODE_NAME$9,
27045
27101
  elements: []
27046
27102
  };
27047
27103
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -27049,51 +27105,51 @@ const decode$a = (params, decodedAttrs = {}) => {
27049
27105
  }
27050
27106
  return result;
27051
27107
  };
27052
- const config$8 = {
27053
- xmlName: XML_NODE_NAME$8,
27054
- sdNodeOrKeyName: SD_NODE_NAME$7,
27108
+ const config$9 = {
27109
+ xmlName: XML_NODE_NAME$9,
27110
+ sdNodeOrKeyName: SD_NODE_NAME$8,
27055
27111
  type: NodeTranslator.translatorTypes.NODE,
27056
- encode: encode$a,
27057
- decode: decode$a,
27112
+ encode: encode$d,
27113
+ decode: decode$d,
27058
27114
  attributes: validXmlAttributes$4
27059
27115
  };
27060
- const translator$8 = NodeTranslator.from(config$8);
27061
- const encode$9 = (attributes) => {
27116
+ const translator$9 = NodeTranslator.from(config$9);
27117
+ const encode$c = (attributes) => {
27062
27118
  return attributes["w:id"];
27063
27119
  };
27064
- const decode$9 = (attrs) => {
27120
+ const decode$c = (attrs) => {
27065
27121
  return attrs.id;
27066
27122
  };
27067
- const attrConfig$1 = Object.freeze({
27123
+ const attrConfig$3 = Object.freeze({
27068
27124
  xmlName: "w:id",
27069
27125
  sdName: "id",
27070
- encode: encode$9,
27071
- decode: decode$9
27126
+ encode: encode$c,
27127
+ decode: decode$c
27072
27128
  });
27073
- const encode$8 = (attributes) => {
27129
+ const encode$b = (attributes) => {
27074
27130
  return attributes["w:displacedByCustomXml"];
27075
27131
  };
27076
- const decode$8 = (attrs) => {
27132
+ const decode$b = (attrs) => {
27077
27133
  return attrs.displacedByCustomXml;
27078
27134
  };
27079
- const attrConfig = Object.freeze({
27135
+ const attrConfig$2 = Object.freeze({
27080
27136
  xmlName: "w:displacedByCustomXml",
27081
27137
  sdName: "displacedByCustomXml",
27082
- encode: encode$8,
27083
- decode: decode$8
27138
+ encode: encode$b,
27139
+ decode: decode$b
27084
27140
  });
27085
- const validXmlAttributes$3 = [attrConfig$1, attrConfig];
27086
- const XML_NODE_NAME$7 = "w:permEnd";
27087
- const SD_NODE_NAME$6 = "permEnd";
27088
- const encode$7 = (params, encodedAttrs = {}) => {
27141
+ const validXmlAttributes$3 = [attrConfig$3, attrConfig$2];
27142
+ const XML_NODE_NAME$8 = "w:permEnd";
27143
+ const SD_NODE_NAME$7 = "permEnd";
27144
+ const encode$a = (params, encodedAttrs = {}) => {
27089
27145
  return {
27090
27146
  type: "permEnd",
27091
27147
  attrs: encodedAttrs
27092
27148
  };
27093
27149
  };
27094
- const decode$7 = (params, decodedAttrs = {}) => {
27150
+ const decode$a = (params, decodedAttrs = {}) => {
27095
27151
  const result = {
27096
- name: XML_NODE_NAME$7,
27152
+ name: XML_NODE_NAME$8,
27097
27153
  elements: []
27098
27154
  };
27099
27155
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -27101,18 +27157,18 @@ const decode$7 = (params, decodedAttrs = {}) => {
27101
27157
  }
27102
27158
  return result;
27103
27159
  };
27104
- const config$7 = {
27105
- xmlName: XML_NODE_NAME$7,
27106
- sdNodeOrKeyName: SD_NODE_NAME$6,
27160
+ const config$8 = {
27161
+ xmlName: XML_NODE_NAME$8,
27162
+ sdNodeOrKeyName: SD_NODE_NAME$7,
27107
27163
  type: NodeTranslator.translatorTypes.NODE,
27108
- encode: encode$7,
27109
- decode: decode$7,
27164
+ encode: encode$a,
27165
+ decode: decode$a,
27110
27166
  attributes: validXmlAttributes$3
27111
27167
  };
27112
- const translator$7 = NodeTranslator.from(config$7);
27113
- const XML_NODE_NAME$6 = "sd:pageReference";
27114
- const SD_NODE_NAME$5 = "pageReference";
27115
- const encode$6 = (params) => {
27168
+ const translator$8 = NodeTranslator.from(config$8);
27169
+ const XML_NODE_NAME$7 = "sd:pageReference";
27170
+ const SD_NODE_NAME$6 = "pageReference";
27171
+ const encode$9 = (params) => {
27116
27172
  const { nodes = [], nodeListHandler } = params || {};
27117
27173
  const node = nodes[0];
27118
27174
  const processedText = nodeListHandler.handler({
@@ -27129,7 +27185,7 @@ const encode$6 = (params) => {
27129
27185
  };
27130
27186
  return processedNode;
27131
27187
  };
27132
- const decode$6 = (params) => {
27188
+ const decode$9 = (params) => {
27133
27189
  const { node } = params;
27134
27190
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
27135
27191
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params, node: n }));
@@ -27202,17 +27258,17 @@ const decode$6 = (params) => {
27202
27258
  ];
27203
27259
  return translated;
27204
27260
  };
27205
- const config$6 = {
27206
- xmlName: XML_NODE_NAME$6,
27207
- sdNodeOrKeyName: SD_NODE_NAME$5,
27261
+ const config$7 = {
27262
+ xmlName: XML_NODE_NAME$7,
27263
+ sdNodeOrKeyName: SD_NODE_NAME$6,
27208
27264
  type: NodeTranslator.translatorTypes.NODE,
27209
- encode: encode$6,
27210
- decode: decode$6
27265
+ encode: encode$9,
27266
+ decode: decode$9
27211
27267
  };
27212
- const translator$6 = NodeTranslator.from(config$6);
27213
- const XML_NODE_NAME$5 = "sd:tableOfContents";
27214
- const SD_NODE_NAME$4 = "tableOfContents";
27215
- const encode$5 = (params) => {
27268
+ const translator$7 = NodeTranslator.from(config$7);
27269
+ const XML_NODE_NAME$6 = "sd:tableOfContents";
27270
+ const SD_NODE_NAME$5 = "tableOfContents";
27271
+ const encode$8 = (params) => {
27216
27272
  const { nodes = [], nodeListHandler } = params || {};
27217
27273
  const node = nodes[0];
27218
27274
  const processedContent = nodeListHandler.handler({
@@ -27228,7 +27284,7 @@ const encode$5 = (params) => {
27228
27284
  };
27229
27285
  return processedNode;
27230
27286
  };
27231
- const decode$5 = (params) => {
27287
+ const decode$8 = (params) => {
27232
27288
  const { node } = params;
27233
27289
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params, node: n }));
27234
27290
  const tocBeginElements = [
@@ -27275,17 +27331,17 @@ const decode$5 = (params) => {
27275
27331
  }
27276
27332
  return contentNodes;
27277
27333
  };
27278
- const config$5 = {
27279
- xmlName: XML_NODE_NAME$5,
27280
- sdNodeOrKeyName: SD_NODE_NAME$4,
27334
+ const config$6 = {
27335
+ xmlName: XML_NODE_NAME$6,
27336
+ sdNodeOrKeyName: SD_NODE_NAME$5,
27281
27337
  type: NodeTranslator.translatorTypes.NODE,
27282
- encode: encode$5,
27283
- decode: decode$5
27338
+ encode: encode$8,
27339
+ decode: decode$8
27284
27340
  };
27285
- const translator$5 = NodeTranslator.from(config$5);
27286
- const XML_NODE_NAME$4 = "sd:autoPageNumber";
27287
- const SD_NODE_NAME$3 = "page-number";
27288
- const encode$4 = (params) => {
27341
+ const translator$6 = NodeTranslator.from(config$6);
27342
+ const XML_NODE_NAME$5 = "sd:autoPageNumber";
27343
+ const SD_NODE_NAME$4 = "page-number";
27344
+ const encode$7 = (params) => {
27289
27345
  const { nodes = [] } = params || {};
27290
27346
  const node = nodes[0];
27291
27347
  const rPr = node.elements?.find((el) => el.name === "w:rPr");
@@ -27298,7 +27354,7 @@ const encode$4 = (params) => {
27298
27354
  };
27299
27355
  return processedNode;
27300
27356
  };
27301
- const decode$4 = (params) => {
27357
+ const decode$7 = (params) => {
27302
27358
  const { node } = params;
27303
27359
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
27304
27360
  const translated = [
@@ -27369,17 +27425,17 @@ const decode$4 = (params) => {
27369
27425
  ];
27370
27426
  return translated;
27371
27427
  };
27372
- const config$4 = {
27373
- xmlName: XML_NODE_NAME$4,
27374
- sdNodeOrKeyName: SD_NODE_NAME$3,
27428
+ const config$5 = {
27429
+ xmlName: XML_NODE_NAME$5,
27430
+ sdNodeOrKeyName: SD_NODE_NAME$4,
27375
27431
  type: NodeTranslator.translatorTypes.NODE,
27376
- encode: encode$4,
27377
- decode: decode$4
27432
+ encode: encode$7,
27433
+ decode: decode$7
27378
27434
  };
27379
- const translator$4 = NodeTranslator.from(config$4);
27380
- const XML_NODE_NAME$3 = "sd:totalPageNumber";
27381
- const SD_NODE_NAME$2 = "total-page-number";
27382
- const encode$3 = (params) => {
27435
+ const translator$5 = NodeTranslator.from(config$5);
27436
+ const XML_NODE_NAME$4 = "sd:totalPageNumber";
27437
+ const SD_NODE_NAME$3 = "total-page-number";
27438
+ const encode$6 = (params) => {
27383
27439
  const { nodes = [] } = params || {};
27384
27440
  const node = nodes[0];
27385
27441
  const rPr = node.elements?.find((el) => el.name === "w:rPr");
@@ -27392,7 +27448,7 @@ const encode$3 = (params) => {
27392
27448
  };
27393
27449
  return processedNode;
27394
27450
  };
27395
- const decode$3 = (params) => {
27451
+ const decode$6 = (params) => {
27396
27452
  const { node } = params;
27397
27453
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
27398
27454
  const translated = [
@@ -27463,14 +27519,14 @@ const decode$3 = (params) => {
27463
27519
  ];
27464
27520
  return translated;
27465
27521
  };
27466
- const config$3 = {
27467
- xmlName: XML_NODE_NAME$3,
27468
- sdNodeOrKeyName: SD_NODE_NAME$2,
27522
+ const config$4 = {
27523
+ xmlName: XML_NODE_NAME$4,
27524
+ sdNodeOrKeyName: SD_NODE_NAME$3,
27469
27525
  type: NodeTranslator.translatorTypes.NODE,
27470
- encode: encode$3,
27471
- decode: decode$3
27526
+ encode: encode$6,
27527
+ decode: decode$6
27472
27528
  };
27473
- const translator$3 = NodeTranslator.from(config$3);
27529
+ const translator$4 = NodeTranslator.from(config$4);
27474
27530
  function parseInlineStyles(styleString) {
27475
27531
  if (!styleString) return {};
27476
27532
  return styleString.split(";").filter((style) => !!style.trim()).reduce((acc, style) => {
@@ -27522,7 +27578,7 @@ function handleVRectImport({ pNode, pict, params }) {
27522
27578
  if (isHorizontalRule) {
27523
27579
  schemaAttrs.horizontalRule = true;
27524
27580
  }
27525
- const pElement = translator$14.encode({
27581
+ const pElement = translator$15.encode({
27526
27582
  ...params,
27527
27583
  nodes: [{ ...pNode, elements: pNode.elements.filter((el) => el.name !== "w:r") }]
27528
27584
  });
@@ -27582,7 +27638,7 @@ const handleDrawingNode = (params) => {
27582
27638
  return { nodes: [], consumed: 0 };
27583
27639
  }
27584
27640
  const translatorParams = { ...params, nodes: [node] };
27585
- const schemaNode = translator$u.encode(translatorParams);
27641
+ const schemaNode = translator$v.encode(translatorParams);
27586
27642
  const newNodes = schemaNode ? [schemaNode] : [];
27587
27643
  return { nodes: newNodes, consumed: 1 };
27588
27644
  };
@@ -27590,7 +27646,7 @@ const drawingNodeHandlerEntity = {
27590
27646
  handlerName: "drawingNodeHandler",
27591
27647
  handler: handleDrawingNode
27592
27648
  };
27593
- const XML_NODE_NAME$2 = "w:del";
27649
+ const XML_NODE_NAME$3 = "w:del";
27594
27650
  const SD_ATTR_KEY = "trackDelete";
27595
27651
  const validXmlAttributes$2 = [
27596
27652
  createAttributeHandler("w:id", "id"),
@@ -27598,7 +27654,7 @@ const validXmlAttributes$2 = [
27598
27654
  createAttributeHandler("w:author", "author"),
27599
27655
  createAttributeHandler("w:authorEmail", "authorEmail")
27600
27656
  ];
27601
- const encode$2 = (params, encodedAttrs = {}) => {
27657
+ const encode$5 = (params, encodedAttrs = {}) => {
27602
27658
  const { nodeListHandler, extraParams = {}, converter } = params;
27603
27659
  const { node } = extraParams;
27604
27660
  if (encodedAttrs.id && converter?.trackedChangeIdMap?.has(encodedAttrs.id)) {
@@ -27627,7 +27683,7 @@ const encode$2 = (params, encodedAttrs = {}) => {
27627
27683
  });
27628
27684
  return subs;
27629
27685
  };
27630
- function decode$2(params) {
27686
+ function decode$5(params) {
27631
27687
  const { node } = params;
27632
27688
  if (!node || !node.type) {
27633
27689
  return null;
@@ -27654,15 +27710,15 @@ function decode$2(params) {
27654
27710
  elements: [translatedTextNode]
27655
27711
  };
27656
27712
  }
27657
- const config$2 = {
27658
- xmlName: XML_NODE_NAME$2,
27713
+ const config$3 = {
27714
+ xmlName: XML_NODE_NAME$3,
27659
27715
  sdNodeOrKeyName: SD_ATTR_KEY,
27660
27716
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
27661
- encode: encode$2,
27662
- decode: decode$2,
27717
+ encode: encode$5,
27718
+ decode: decode$5,
27663
27719
  attributes: validXmlAttributes$2
27664
27720
  };
27665
- const translator$2 = NodeTranslator.from(config$2);
27721
+ const translator$3 = NodeTranslator.from(config$3);
27666
27722
  const isTrackChangeElement = (node) => node?.name === "w:del" || node?.name === "w:ins";
27667
27723
  const unwrapTrackChangeNode = (node) => {
27668
27724
  if (!node) {
@@ -27701,7 +27757,7 @@ const handleTrackChangeNode = (params) => {
27701
27757
  };
27702
27758
  switch (mainNode.name) {
27703
27759
  case "w:del":
27704
- result = translator$2.encode({
27760
+ result = translator$3.encode({
27705
27761
  ...translatorParams,
27706
27762
  extraParams: {
27707
27763
  ...translatorParams.extraParams,
@@ -27710,7 +27766,7 @@ const handleTrackChangeNode = (params) => {
27710
27766
  });
27711
27767
  break;
27712
27768
  case "w:ins":
27713
- result = translator$1y.encode({
27769
+ result = translator$1z.encode({
27714
27770
  ...translatorParams,
27715
27771
  extraParams: {
27716
27772
  ...translatorParams.extraParams,
@@ -27725,12 +27781,12 @@ const trackChangeNodeHandlerEntity = {
27725
27781
  handlerName: "trackChangeNodeHandler",
27726
27782
  handler: handleTrackChangeNode
27727
27783
  };
27728
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$13);
27729
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$12);
27730
- const XML_NODE_NAME$1 = "w:t";
27731
- const SD_NODE_NAME$1 = "text";
27784
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$14);
27785
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$13);
27786
+ const XML_NODE_NAME$2 = "w:t";
27787
+ const SD_NODE_NAME$2 = "text";
27732
27788
  const validXmlAttributes$1 = [createAttributeHandler("xml:space", "xmlSpace")];
27733
- const encode$1 = (params, encodedAttrs = {}) => {
27789
+ const encode$4 = (params, encodedAttrs = {}) => {
27734
27790
  const { node } = params.extraParams;
27735
27791
  const { elements, type, attributes } = node;
27736
27792
  let text;
@@ -27759,7 +27815,7 @@ const encode$1 = (params, encodedAttrs = {}) => {
27759
27815
  marks: []
27760
27816
  };
27761
27817
  };
27762
- const decode$1 = (params) => {
27818
+ const decode$4 = (params) => {
27763
27819
  const { node, extraParams } = params;
27764
27820
  if (!node || !node.type) {
27765
27821
  return null;
@@ -27769,34 +27825,34 @@ const decode$1 = (params) => {
27769
27825
  if (trackedMark) {
27770
27826
  switch (trackedMark.type) {
27771
27827
  case "trackDelete":
27772
- return translator$2.decode(params);
27828
+ return translator$3.decode(params);
27773
27829
  case "trackInsert":
27774
- return translator$1y.decode(params);
27830
+ return translator$1z.decode(params);
27775
27831
  }
27776
27832
  }
27777
27833
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
27778
27834
  if (isLinkNode && !extraParams?.linkProcessed) {
27779
- return translator$13.decode(params);
27835
+ return translator$14.decode(params);
27780
27836
  }
27781
27837
  const { text, marks = [] } = node;
27782
27838
  return getTextNodeForExport(text, marks, params);
27783
27839
  };
27784
- const config$1 = {
27785
- xmlName: XML_NODE_NAME$1,
27786
- sdNodeOrKeyName: SD_NODE_NAME$1,
27840
+ const config$2 = {
27841
+ xmlName: XML_NODE_NAME$2,
27842
+ sdNodeOrKeyName: SD_NODE_NAME$2,
27787
27843
  type: NodeTranslator.translatorTypes.NODE,
27788
- encode: encode$1,
27789
- decode: decode$1,
27844
+ encode: encode$4,
27845
+ decode: decode$4,
27790
27846
  attributes: validXmlAttributes$1
27791
27847
  };
27792
- const translator$1 = NodeTranslator.from(config$1);
27848
+ const translator$2 = NodeTranslator.from(config$2);
27793
27849
  const handleTextNode = (params) => {
27794
27850
  const { nodes, insideTrackChange } = params;
27795
27851
  if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
27796
27852
  return { nodes: [], consumed: 0 };
27797
27853
  }
27798
27854
  const node = nodes[0];
27799
- const resultNode = translator$1.encode({
27855
+ const resultNode = translator$2.encode({
27800
27856
  ...params,
27801
27857
  extraParams: {
27802
27858
  ...params.extraParams || {},
@@ -27818,7 +27874,7 @@ const handleParagraphNode = (params) => {
27818
27874
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
27819
27875
  return { nodes: [], consumed: 0 };
27820
27876
  }
27821
- const schemaNode = translator$14.encode(params);
27877
+ const schemaNode = translator$15.encode(params);
27822
27878
  const newNodes = schemaNode ? [schemaNode] : [];
27823
27879
  return { nodes: newNodes, consumed: 1 };
27824
27880
  };
@@ -27831,7 +27887,7 @@ const handleSdtNode = (params) => {
27831
27887
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
27832
27888
  return { nodes: [], consumed: 0 };
27833
27889
  }
27834
- const result = translator$t.encode(params);
27890
+ const result = translator$u.encode(params);
27835
27891
  if (!result) {
27836
27892
  return { nodes: [], consumed: 0 };
27837
27893
  }
@@ -27845,154 +27901,205 @@ const sdtNodeHandlerEntity = {
27845
27901
  handlerName: "sdtNodeHandler",
27846
27902
  handler: handleSdtNode
27847
27903
  };
27904
+ const encode$3 = (attributes) => {
27905
+ return attributes?.["w:id"];
27906
+ };
27907
+ const decode$3 = (attrs) => {
27908
+ return attrs?.id;
27909
+ };
27910
+ const attrConfig$1 = Object.freeze({
27911
+ xmlName: "w:id",
27912
+ sdName: "id",
27913
+ encode: encode$3,
27914
+ decode: decode$3
27915
+ });
27916
+ const encode$2 = (attributes) => {
27917
+ const val = attributes?.["w:customMarkFollows"];
27918
+ return val === "1" || val === "true" || val === true ? true : void 0;
27919
+ };
27920
+ const decode$2 = (attrs) => {
27921
+ return attrs?.customMarkFollows ? "1" : void 0;
27922
+ };
27923
+ const attrConfig = Object.freeze({
27924
+ xmlName: "w:customMarkFollows",
27925
+ sdName: "customMarkFollows",
27926
+ encode: encode$2,
27927
+ decode: decode$2
27928
+ });
27929
+ const XML_NODE_NAME$1 = "w:footnoteReference";
27930
+ const SD_NODE_NAME$1 = "footnoteReference";
27931
+ const encode$1 = (_2, encodedAttrs) => {
27932
+ const translated = { type: SD_NODE_NAME$1 };
27933
+ if (encodedAttrs && Object.keys(encodedAttrs).length > 0) {
27934
+ translated.attrs = { ...encodedAttrs };
27935
+ }
27936
+ return translated;
27937
+ };
27938
+ const decode$1 = (_params, decodedAttrs) => {
27939
+ const ref = { name: XML_NODE_NAME$1, elements: [] };
27940
+ if (decodedAttrs && Object.keys(decodedAttrs).length > 0) {
27941
+ ref.attributes = { ...decodedAttrs };
27942
+ }
27943
+ return ref;
27944
+ };
27945
+ const config$1 = {
27946
+ xmlName: XML_NODE_NAME$1,
27947
+ sdNodeOrKeyName: SD_NODE_NAME$1,
27948
+ type: NodeTranslator.translatorTypes.NODE,
27949
+ encode: encode$1,
27950
+ decode: decode$1,
27951
+ attributes: [attrConfig$1, attrConfig]
27952
+ };
27953
+ const translator$1 = NodeTranslator.from(config$1);
27848
27954
  const translatorList = Array.from(
27849
27955
  /* @__PURE__ */ new Set([
27850
- translator$1O,
27956
+ translator$1P,
27957
+ translator$7,
27851
27958
  translator$6,
27852
27959
  translator$5,
27853
27960
  translator$4,
27854
- translator$3,
27961
+ translator$1O,
27855
27962
  translator$1N,
27856
27963
  translator$1M,
27857
- translator$1L,
27964
+ translator$2q,
27965
+ translator$1u,
27858
27966
  translator$2p,
27859
- translator$1t,
27860
27967
  translator$2o,
27861
- translator$2n,
27862
- translator$s,
27863
- translator$9,
27968
+ translator$t,
27864
27969
  translator$a,
27865
- translator$1r,
27866
- translator$2s,
27867
- translator$H,
27868
- translator$2d,
27970
+ translator$b,
27971
+ translator$1s,
27972
+ translator$2t,
27973
+ translator$I,
27974
+ translator$2e,
27975
+ translator$1K,
27976
+ translator$2j,
27869
27977
  translator$1J,
27870
- translator$2i,
27978
+ translator$1T,
27979
+ translator$3,
27871
27980
  translator$1I,
27872
- translator$1S,
27873
- translator$2,
27874
- translator$1H,
27875
- translator$u,
27876
- translator$2j,
27877
- translator$1U,
27878
- translator$1_,
27879
- translator$1Z,
27880
- translator$26,
27881
- translator$_,
27981
+ translator$v,
27982
+ translator$2k,
27882
27983
  translator$1V,
27883
- translator$1G,
27984
+ translator$1$,
27985
+ translator$1_,
27986
+ translator$27,
27987
+ translator$$,
27988
+ translator$1,
27989
+ translator$1W,
27990
+ translator$1H,
27991
+ translator$H,
27884
27992
  translator$G,
27885
- translator$F,
27886
- translator$e,
27887
- translator$10,
27888
- translator$M,
27889
- translator$L,
27890
- translator$E,
27993
+ translator$f,
27994
+ translator$11,
27891
27995
  translator$N,
27892
- translator$2r,
27893
- translator$13,
27894
- translator$2m,
27895
- translator$1R,
27996
+ translator$M,
27997
+ translator$F,
27998
+ translator$O,
27999
+ translator$2s,
28000
+ translator$14,
28001
+ translator$2n,
28002
+ translator$1S,
28003
+ translator$1A,
28004
+ translator$1G,
28005
+ translator$26,
27896
28006
  translator$1z,
27897
- translator$1F,
27898
- translator$25,
27899
- translator$1y,
28007
+ translator$Z,
27900
28008
  translator$Y,
27901
- translator$X,
28009
+ translator$1F,
27902
28010
  translator$1E,
27903
28011
  translator$1D,
28012
+ translator$1Y,
27904
28013
  translator$1C,
27905
- translator$1X,
28014
+ translator$2c,
28015
+ translator$1q,
27906
28016
  translator$1B,
27907
- translator$2b,
27908
- translator$1p,
27909
- translator$1A,
27910
- translator$24,
27911
- translator$R,
28017
+ translator$25,
28018
+ translator$S,
28019
+ translator$1y,
27912
28020
  translator$1x,
28021
+ translator$23,
27913
28022
  translator$1w,
27914
- translator$22,
27915
28023
  translator$1v,
27916
- translator$1u,
27917
- translator$23,
27918
- translator$14,
27919
- translator$1h,
27920
- translator$1j,
27921
- translator$1W,
28024
+ translator$24,
27922
28025
  translator$15,
27923
28026
  translator$1i,
28027
+ translator$1k,
28028
+ translator$1X,
28029
+ translator$16,
28030
+ translator$1j,
28031
+ translator$9,
27924
28032
  translator$8,
27925
- translator$7,
27926
- translator$12,
28033
+ translator$13,
28034
+ translator$2i,
28035
+ translator$1Q,
27927
28036
  translator$2h,
27928
- translator$1P,
27929
- translator$2g,
27930
- translator$1T,
27931
- translator$1n,
27932
- translator$t,
27933
- translator$21,
27934
- translator$2c,
28037
+ translator$1U,
28038
+ translator$1o,
28039
+ translator$u,
28040
+ translator$22,
28041
+ translator$2d,
28042
+ translator$29,
27935
28043
  translator$28,
27936
- translator$27,
28044
+ translator$1h,
27937
28045
  translator$1g,
27938
28046
  translator$1f,
27939
28047
  translator$1e,
27940
- translator$1d,
27941
- translator$1$,
27942
- translator$W,
27943
- translator$2k,
28048
+ translator$20,
28049
+ translator$X,
28050
+ translator$2l,
28051
+ translator$2g,
27944
28052
  translator$2f,
27945
- translator$2e,
27946
- translator$1,
27947
- translator$2q,
27948
- translator$1c,
27949
- translator$b,
27950
- translator$I,
28053
+ translator$2,
28054
+ translator$2r,
28055
+ translator$1d,
28056
+ translator$c,
28057
+ translator$J,
28058
+ translator$s,
28059
+ translator$h,
28060
+ translator$E,
27951
28061
  translator$r,
27952
- translator$g,
28062
+ translator$e,
27953
28063
  translator$D,
27954
28064
  translator$q,
27955
- translator$d,
27956
- translator$C,
27957
28065
  translator$p,
27958
28066
  translator$o,
27959
28067
  translator$n,
28068
+ translator$g,
27960
28069
  translator$m,
27961
- translator$f,
27962
28070
  translator$l,
27963
28071
  translator$k,
27964
28072
  translator$j,
27965
28073
  translator$i,
27966
- translator$h,
27967
- translator$J,
27968
- translator$S,
27969
- translator$P,
27970
- translator$Q,
27971
28074
  translator$K,
27972
- translator$11,
27973
- translator$1a,
27974
- translator$U,
27975
- translator$x,
27976
28075
  translator$T,
27977
- translator$B,
27978
- translator$y,
28076
+ translator$Q,
28077
+ translator$R,
28078
+ translator$L,
28079
+ translator$12,
27979
28080
  translator$1b,
28081
+ translator$V,
28082
+ translator$y,
28083
+ translator$U,
28084
+ translator$C,
28085
+ translator$z,
28086
+ translator$1c,
28087
+ translator$1a,
27980
28088
  translator$19,
27981
- translator$18,
27982
- translator$1l,
27983
- translator$2l,
27984
- translator$O,
27985
- translator$20,
27986
- translator$29,
27987
- translator$$,
27988
- translator$1Y,
28089
+ translator$1m,
28090
+ translator$2m,
28091
+ translator$P,
28092
+ translator$21,
28093
+ translator$2a,
28094
+ translator$10,
28095
+ translator$1Z,
28096
+ translator$B,
27989
28097
  translator$A,
27990
- translator$z,
27991
- translator$1Q,
28098
+ translator$1R,
28099
+ translator$18,
27992
28100
  translator$17,
27993
- translator$16,
28101
+ translator$x,
27994
28102
  translator$w,
27995
- translator$v,
27996
28103
  commentRangeStartTranslator,
27997
28104
  commentRangeEndTranslator
27998
28105
  ])
@@ -28097,7 +28204,7 @@ const handler = (params) => {
28097
28204
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
28098
28205
  return { nodes: [], consumed: 0 };
28099
28206
  }
28100
- const result = translator$2s.encode(params);
28207
+ const result = translator$2t.encode(params);
28101
28208
  if (!result) return { nodes: [], consumed: 0 };
28102
28209
  return {
28103
28210
  nodes: [result],
@@ -28145,7 +28252,7 @@ const handleBookmarkNode = (params) => {
28145
28252
  consumed: translatedText.length + 2
28146
28253
  };
28147
28254
  }
28148
- const encoded = translator$a.encode({ ...params, nodes: [node] });
28255
+ const encoded = translator$b.encode({ ...params, nodes: [node] });
28149
28256
  if (!encoded) {
28150
28257
  return { nodes: [], consumed: 0 };
28151
28258
  }
@@ -28159,7 +28266,7 @@ const handleBookmarkStartNode = (params) => {
28159
28266
  if (isCustomMarkBookmark(nodes[0], params.editor)) {
28160
28267
  return handleBookmarkNode(params);
28161
28268
  }
28162
- const node = translator$a.encode(params);
28269
+ const node = translator$b.encode(params);
28163
28270
  if (!node) return { nodes: [], consumed: 0 };
28164
28271
  return { nodes: [node], consumed: 1 };
28165
28272
  };
@@ -28191,7 +28298,7 @@ const handleBookmarkEndNode = (params) => {
28191
28298
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
28192
28299
  return { nodes: [], consumed: 0 };
28193
28300
  }
28194
- const node = translator$9.encode(params);
28301
+ const node = translator$a.encode(params);
28195
28302
  if (!node) return { nodes: [], consumed: 0 };
28196
28303
  return { nodes: [node], consumed: 1 };
28197
28304
  };
@@ -28241,7 +28348,7 @@ const handleAlternateChoice = (params) => {
28241
28348
  ...currentNode,
28242
28349
  type: "element"
28243
28350
  };
28244
- const translated = translator$1O.encode({
28351
+ const translated = translator$1P.encode({
28245
28352
  ...params,
28246
28353
  nodes: [nodeForTranslator],
28247
28354
  extraParams: { ...params.extraParams || {}, node: nodeForTranslator }
@@ -28267,9 +28374,9 @@ const alternateChoiceHandler = {
28267
28374
  handlerName: "alternateChoiceHandler",
28268
28375
  handler: handleAlternateChoice
28269
28376
  };
28270
- const autoPageHandlerEntity = generateV2HandlerEntity("autoPageNumberHandler", translator$4);
28271
- const autoTotalPageCountEntity = generateV2HandlerEntity("autoTotalPageCountEntity", translator$3);
28272
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$6);
28377
+ const autoPageHandlerEntity = generateV2HandlerEntity("autoPageNumberHandler", translator$5);
28378
+ const autoTotalPageCountEntity = generateV2HandlerEntity("autoTotalPageCountEntity", translator$4);
28379
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$7);
28273
28380
  const handlePictNode = (params) => {
28274
28381
  const { nodes } = params;
28275
28382
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -28674,6 +28781,77 @@ const applyParentRelationships = (comments, parentMap, trackedChangeParentMap =
28674
28781
  return comment;
28675
28782
  });
28676
28783
  };
28784
+ const stripFootnoteMarkerNodes = (nodes) => {
28785
+ if (!Array.isArray(nodes) || nodes.length === 0) return nodes;
28786
+ const walk = (list) => {
28787
+ if (!Array.isArray(list) || list.length === 0) return;
28788
+ for (let i = list.length - 1; i >= 0; i--) {
28789
+ const node = list[i];
28790
+ if (!node) continue;
28791
+ if (node.type === "passthroughInline" && node.attrs?.originalName === "w:footnoteRef") {
28792
+ list.splice(i, 1);
28793
+ continue;
28794
+ }
28795
+ if (Array.isArray(node.content)) {
28796
+ walk(node.content);
28797
+ }
28798
+ }
28799
+ };
28800
+ const copy2 = JSON.parse(JSON.stringify(nodes));
28801
+ walk(copy2);
28802
+ return copy2;
28803
+ };
28804
+ function importFootnoteData({ docx, editor, converter, nodeListHandler, numbering } = {}) {
28805
+ const handler2 = nodeListHandler || defaultNodeListHandler();
28806
+ const footnotes = docx?.["word/footnotes.xml"];
28807
+ if (!footnotes?.elements?.length) return [];
28808
+ const root = footnotes.elements[0];
28809
+ const elements = Array.isArray(root?.elements) ? root.elements : [];
28810
+ const footnoteElements = elements.filter((el) => el?.name === "w:footnote");
28811
+ if (footnoteElements.length === 0) return [];
28812
+ const results = [];
28813
+ const lists = {};
28814
+ const inlineDocumentFonts = [];
28815
+ footnoteElements.forEach((el) => {
28816
+ const idRaw = el?.attributes?.["w:id"];
28817
+ if (idRaw === void 0 || idRaw === null) return;
28818
+ const id = String(idRaw);
28819
+ const idNumber = Number(id);
28820
+ const originalXml = carbonCopy(el);
28821
+ const type = el?.attributes?.["w:type"] || null;
28822
+ if (type === "separator" || type === "continuationSeparator") {
28823
+ results.push({
28824
+ id,
28825
+ type,
28826
+ originalXml,
28827
+ content: []
28828
+ });
28829
+ return;
28830
+ }
28831
+ if (!Number.isFinite(idNumber) || idNumber < 0) return;
28832
+ const childElements = Array.isArray(el.elements) ? el.elements : [];
28833
+ const converted = handler2.handler({
28834
+ nodes: childElements,
28835
+ nodeListHandler: handler2,
28836
+ docx,
28837
+ editor,
28838
+ converter,
28839
+ numbering,
28840
+ lists,
28841
+ inlineDocumentFonts,
28842
+ filename: "footnotes.xml",
28843
+ path: [el]
28844
+ });
28845
+ const stripped = stripFootnoteMarkerNodes(converted);
28846
+ results.push({
28847
+ id,
28848
+ type,
28849
+ originalXml,
28850
+ content: stripped
28851
+ });
28852
+ });
28853
+ return results;
28854
+ }
28677
28855
  const RELATIONSHIP_TYPES = (
28678
28856
  /** @type {const} */
28679
28857
  {
@@ -29168,15 +29346,16 @@ const handleTabNode = (params) => {
29168
29346
  if (!nodes.length || nodes[0].name !== "w:tab") {
29169
29347
  return { nodes: [], consumed: 0 };
29170
29348
  }
29171
- const node = translator$2q.encode(params);
29349
+ const node = translator$2r.encode(params);
29172
29350
  return { nodes: [node], consumed: 1 };
29173
29351
  };
29174
29352
  const tabNodeEntityHandler = {
29175
29353
  handlerName: "w:tabTranslator",
29176
29354
  handler: handleTabNode
29177
29355
  };
29178
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$b);
29179
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$5);
29356
+ const footnoteReferenceHandlerEntity = generateV2HandlerEntity("footnoteReferenceHandler", translator$1);
29357
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$c);
29358
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$6);
29180
29359
  function preProcessPageInstruction(nodesToCombine, _instrText, fieldRunRPr = null) {
29181
29360
  const pageNumNode = {
29182
29361
  name: "sd:autoPageNumber",
@@ -29537,8 +29716,8 @@ const commentRangeEndHandlerEntity = generateV2HandlerEntity(
29537
29716
  "commentRangeEndHandler",
29538
29717
  commentRangeEndTranslator
29539
29718
  );
29540
- const permStartHandlerEntity = generateV2HandlerEntity("permStartHandler", translator$8);
29541
- const permEndHandlerEntity = generateV2HandlerEntity("permEndHandler", translator$7);
29719
+ const permStartHandlerEntity = generateV2HandlerEntity("permStartHandler", translator$9);
29720
+ const permEndHandlerEntity = generateV2HandlerEntity("permEndHandler", translator$8);
29542
29721
  const detectDocumentOrigin = (docx) => {
29543
29722
  const commentsExtended = docx["word/commentsExtended.xml"];
29544
29723
  if (commentsExtended) {
@@ -29561,6 +29740,7 @@ const createDocumentJson = (docx, converter, editor) => {
29561
29740
  const json = carbonCopy(getInitialJSON(docx));
29562
29741
  if (!json) return null;
29563
29742
  if (converter) {
29743
+ importFootnotePropertiesFromSettings(docx, converter);
29564
29744
  converter.documentOrigin = detectDocumentOrigin(docx);
29565
29745
  }
29566
29746
  if (converter?.telemetry) {
@@ -29610,10 +29790,11 @@ const createDocumentJson = (docx, converter, editor) => {
29610
29790
  }
29611
29791
  const contentElements = node.elements?.filter((n) => n.name !== "w:sectPr") ?? [];
29612
29792
  const content = pruneIgnoredNodes(contentElements);
29613
- const comments = importCommentData({ docx, converter, editor });
29614
29793
  const lists = {};
29615
29794
  const inlineDocumentFonts = [];
29616
29795
  const numbering = getNumberingDefinitions(docx);
29796
+ const comments = importCommentData({ docx, converter, editor });
29797
+ const footnotes = importFootnoteData({ docx, nodeListHandler, converter, editor, numbering });
29617
29798
  let parsedContent = nodeListHandler.handler({
29618
29799
  nodes: content,
29619
29800
  nodeListHandler,
@@ -29647,6 +29828,7 @@ const createDocumentJson = (docx, converter, editor) => {
29647
29828
  savedTagsToRestore: node,
29648
29829
  pageStyles: getDocumentStyles(node, docx, converter, editor),
29649
29830
  comments,
29831
+ footnotes,
29650
29832
  inlineDocumentFonts,
29651
29833
  linkedStyles: getStyleDefinitions(docx),
29652
29834
  numbering: getNumberingDefinitions(docx, converter),
@@ -29672,6 +29854,7 @@ const defaultNodeListHandler = () => {
29672
29854
  drawingNodeHandlerEntity,
29673
29855
  trackChangeNodeHandlerEntity,
29674
29856
  tableNodeHandlerEntity,
29857
+ footnoteReferenceHandlerEntity,
29675
29858
  tabNodeEntityHandler,
29676
29859
  tableOfContentsHandlerEntity,
29677
29860
  autoPageHandlerEntity,
@@ -29816,6 +29999,39 @@ const createNodeListHandler = (nodeHandlers) => {
29816
29999
  };
29817
30000
  return nodeListHandlerFn;
29818
30001
  };
30002
+ function parseFootnoteProperties(footnotePrElement, source) {
30003
+ if (!footnotePrElement) return null;
30004
+ const props = { source };
30005
+ const elements = Array.isArray(footnotePrElement.elements) ? footnotePrElement.elements : [];
30006
+ elements.forEach((el) => {
30007
+ const val = el?.attributes?.["w:val"];
30008
+ switch (el.name) {
30009
+ case "w:numFmt":
30010
+ if (val) props.numFmt = val;
30011
+ break;
30012
+ case "w:numStart":
30013
+ if (val) props.numStart = val;
30014
+ break;
30015
+ case "w:numRestart":
30016
+ if (val) props.numRestart = val;
30017
+ break;
30018
+ case "w:pos":
30019
+ if (val) props.pos = val;
30020
+ break;
30021
+ }
30022
+ });
30023
+ props.originalXml = carbonCopy(footnotePrElement);
30024
+ return props;
30025
+ }
30026
+ function importFootnotePropertiesFromSettings(docx, converter) {
30027
+ if (!docx || !converter || converter.footnoteProperties) return;
30028
+ const settings = docx["word/settings.xml"];
30029
+ const settingsRoot = settings?.elements?.[0];
30030
+ const elements = Array.isArray(settingsRoot?.elements) ? settingsRoot.elements : [];
30031
+ const footnotePr = elements.find((el) => el?.name === "w:footnotePr");
30032
+ if (!footnotePr) return;
30033
+ converter.footnoteProperties = parseFootnoteProperties(footnotePr, "settings");
30034
+ }
29819
30035
  function getDocumentStyles(node, docx, converter, editor, numbering) {
29820
30036
  const sectPr = node.elements?.find((n) => n.name === "w:sectPr");
29821
30037
  const styles = {};
@@ -29854,6 +30070,12 @@ function getDocumentStyles(node, docx, converter, editor, numbering) {
29854
30070
  break;
29855
30071
  case "w:titlePg":
29856
30072
  converter.headerIds.titlePg = true;
30073
+ break;
30074
+ case "w:footnotePr":
30075
+ if (!converter.footnoteProperties) {
30076
+ converter.footnoteProperties = parseFootnoteProperties(el, "sectPr");
30077
+ }
30078
+ break;
29857
30079
  }
29858
30080
  });
29859
30081
  importHeadersFooters(docx, converter, editor);
@@ -30063,6 +30285,7 @@ function filterOutRootInlineNodes(content = []) {
30063
30285
  "commentRangeStart",
30064
30286
  "commentRangeEnd",
30065
30287
  "commentReference",
30288
+ "footnoteReference",
30066
30289
  "structuredContent"
30067
30290
  ]);
30068
30291
  const PRESERVABLE_INLINE_XML_NAMES = {
@@ -30746,7 +30969,7 @@ function translateContentBlock(params) {
30746
30969
  if (vmlAttributes || horizontalRule) {
30747
30970
  return translateVRectContentBlock(params);
30748
30971
  }
30749
- const alternateContent = translator$1O.decode(params);
30972
+ const alternateContent = translator$1P.decode(params);
30750
30973
  return wrapTextInRun(alternateContent);
30751
30974
  }
30752
30975
  function translateVRectContentBlock(params) {
@@ -31213,37 +31436,38 @@ function exportSchemaToJson(params) {
31213
31436
  doc: translateDocumentNode,
31214
31437
  body: translateBodyNode,
31215
31438
  heading: translateHeadingNode,
31216
- paragraph: translator$14,
31217
- run: translator$12,
31218
- text: translator$1,
31219
- lineBreak: translator$2s,
31220
- table: translator$b,
31221
- tableRow: translator$x,
31222
- tableCell: translator$J,
31223
- bookmarkStart: translator$a,
31224
- bookmarkEnd: translator$9,
31225
- fieldAnnotation: translator$t,
31226
- tab: translator$2q,
31227
- image: translator$u,
31228
- hardBreak: translator$2s,
31439
+ paragraph: translator$15,
31440
+ run: translator$13,
31441
+ text: translator$2,
31442
+ lineBreak: translator$2t,
31443
+ table: translator$c,
31444
+ tableRow: translator$y,
31445
+ tableCell: translator$K,
31446
+ bookmarkStart: translator$b,
31447
+ bookmarkEnd: translator$a,
31448
+ fieldAnnotation: translator$u,
31449
+ tab: translator$2r,
31450
+ image: translator$v,
31451
+ hardBreak: translator$2t,
31229
31452
  commentRangeStart: commentRangeStartTranslator,
31230
31453
  commentRangeEnd: commentRangeEndTranslator,
31231
- permStart: translator$8,
31232
- permEnd: translator$7,
31454
+ permStart: translator$9,
31455
+ permEnd: translator$8,
31233
31456
  commentReference: () => null,
31457
+ footnoteReference: translator$1,
31234
31458
  shapeContainer: translator,
31235
31459
  shapeTextbox: translator,
31236
31460
  contentBlock: translator,
31237
31461
  vectorShape: translateVectorShape,
31238
31462
  shapeGroup: translateShapeGroup,
31239
- structuredContent: translator$t,
31240
- structuredContentBlock: translator$t,
31241
- documentPartObject: translator$t,
31242
- documentSection: translator$t,
31243
- "page-number": translator$4,
31244
- "total-page-number": translator$3,
31245
- pageReference: translator$6,
31246
- tableOfContents: translator$5,
31463
+ structuredContent: translator$u,
31464
+ structuredContentBlock: translator$u,
31465
+ documentPartObject: translator$u,
31466
+ documentSection: translator$u,
31467
+ "page-number": translator$5,
31468
+ "total-page-number": translator$4,
31469
+ pageReference: translator$7,
31470
+ tableOfContents: translator$6,
31247
31471
  passthroughBlock: translatePassthroughNode,
31248
31472
  passthroughInline: translatePassthroughNode
31249
31473
  };
@@ -31289,6 +31513,11 @@ function translateBodyNode(params) {
31289
31513
  const defaultFooter = generateDefaultHeaderFooter("footer", params.converter.footerIds?.default);
31290
31514
  sectPr.elements.push(defaultFooter);
31291
31515
  }
31516
+ const hasFootnotePr = sectPr.elements?.some((n) => n.name === "w:footnotePr");
31517
+ const footnoteProperties = params.converter.footnoteProperties;
31518
+ if (!hasFootnotePr && footnoteProperties?.source === "sectPr" && footnoteProperties.originalXml) {
31519
+ sectPr.elements.push(carbonCopy(footnoteProperties.originalXml));
31520
+ }
31292
31521
  }
31293
31522
  const elements = translateChildNodes(params);
31294
31523
  if (params.isHeaderFooter) {
@@ -31324,7 +31553,7 @@ function translateHeadingNode(params) {
31324
31553
  // Maps to Heading1, Heading2, etc. in Word
31325
31554
  }
31326
31555
  };
31327
- return translator$14.decode({ ...params, node: paragraphNode });
31556
+ return translator$15.decode({ ...params, node: paragraphNode });
31328
31557
  }
31329
31558
  function translateDocumentNode(params) {
31330
31559
  const bodyNode = {
@@ -31393,7 +31622,7 @@ function translateMark(mark) {
31393
31622
  markElement.type = "element";
31394
31623
  break;
31395
31624
  case "underline": {
31396
- const translated = translator$2l.decode({
31625
+ const translated = translator$2m.decode({
31397
31626
  node: {
31398
31627
  attrs: {
31399
31628
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -31457,7 +31686,7 @@ function translateMark(mark) {
31457
31686
  break;
31458
31687
  case "highlight": {
31459
31688
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
31460
- const translated = translator$2r.decode({ node: { attrs: { highlight: highlightValue } } });
31689
+ const translated = translator$2s.decode({ node: { attrs: { highlight: highlightValue } } });
31461
31690
  return translated || {};
31462
31691
  }
31463
31692
  case "strike":
@@ -31591,7 +31820,7 @@ const prepareCommentParaIds = (comment) => {
31591
31820
  return newComment;
31592
31821
  };
31593
31822
  const getCommentDefinition = (comment, commentId, allComments, editor) => {
31594
- const translatedText = translator$14.decode({ editor, node: comment.commentJSON });
31823
+ const translatedText = translator$15.decode({ editor, node: comment.commentJSON });
31595
31824
  const attributes = {
31596
31825
  "w:id": String(commentId),
31597
31826
  "w:author": comment.creatorName || comment.importedAuthor?.name,
@@ -31830,6 +32059,169 @@ const mergeRelationshipElements = (existingRelationships = [], newRelationships
31830
32059
  const result = additions.length ? [...existingRelationships, ...additions] : existingRelationships;
31831
32060
  return result;
31832
32061
  };
32062
+ const RELS_XMLNS = "http://schemas.openxmlformats.org/package/2006/relationships";
32063
+ const FOOTNOTES_RELS_PATH = "word/_rels/footnotes.xml.rels";
32064
+ const paragraphHasFootnoteRef = (node) => {
32065
+ if (!node) return false;
32066
+ if (node.name === "w:footnoteRef") return true;
32067
+ const children = Array.isArray(node.elements) ? node.elements : [];
32068
+ return children.some((child) => paragraphHasFootnoteRef(child));
32069
+ };
32070
+ const insertFootnoteRefIntoParagraph = (paragraph) => {
32071
+ if (!paragraph || paragraph.name !== "w:p") return;
32072
+ if (!Array.isArray(paragraph.elements)) paragraph.elements = [];
32073
+ if (paragraphHasFootnoteRef(paragraph)) return;
32074
+ const footnoteRef = { type: "element", name: "w:footnoteRef", elements: [] };
32075
+ const footnoteRefRun = {
32076
+ type: "element",
32077
+ name: "w:r",
32078
+ elements: [
32079
+ {
32080
+ type: "element",
32081
+ name: "w:rPr",
32082
+ elements: [{ type: "element", name: "w:rStyle", attributes: { "w:val": "FootnoteReference" } }]
32083
+ },
32084
+ footnoteRef
32085
+ ]
32086
+ };
32087
+ const pPrIndex = paragraph.elements.findIndex((el) => el?.name === "w:pPr");
32088
+ const insertAt = pPrIndex >= 0 ? pPrIndex + 1 : 0;
32089
+ paragraph.elements.splice(insertAt, 0, footnoteRefRun);
32090
+ };
32091
+ const ensureFootnoteRefMarker = (elements) => {
32092
+ if (!Array.isArray(elements)) return;
32093
+ const firstParagraphIndex = elements.findIndex((el) => el?.name === "w:p");
32094
+ if (firstParagraphIndex >= 0) {
32095
+ insertFootnoteRefIntoParagraph(elements[firstParagraphIndex]);
32096
+ return;
32097
+ }
32098
+ const paragraph = {
32099
+ type: "element",
32100
+ name: "w:p",
32101
+ elements: []
32102
+ };
32103
+ insertFootnoteRefIntoParagraph(paragraph);
32104
+ elements.unshift(paragraph);
32105
+ };
32106
+ const translateFootnoteContent = (content, exportContext) => {
32107
+ if (!Array.isArray(content) || content.length === 0) return [];
32108
+ const translated = [];
32109
+ content.forEach((node) => {
32110
+ if (!node) return;
32111
+ const result = exportSchemaToJson({ ...exportContext, node });
32112
+ if (Array.isArray(result)) {
32113
+ result.filter(Boolean).forEach((entry) => translated.push(entry));
32114
+ return;
32115
+ }
32116
+ if (result) translated.push(result);
32117
+ });
32118
+ return translated;
32119
+ };
32120
+ const createFootnoteElement = (footnote, exportContext) => {
32121
+ if (!footnote) return null;
32122
+ const { id, content, type, originalXml } = footnote;
32123
+ if ((type === "separator" || type === "continuationSeparator") && originalXml) {
32124
+ return carbonCopy(originalXml);
32125
+ }
32126
+ const attributes = { "w:id": String(id) };
32127
+ if (type) attributes["w:type"] = type;
32128
+ const translatedContent = translateFootnoteContent(content, exportContext);
32129
+ const originalHadFootnoteRef = originalXml ? paragraphHasFootnoteRef(originalXml) : true;
32130
+ if (originalHadFootnoteRef) {
32131
+ ensureFootnoteRefMarker(translatedContent);
32132
+ }
32133
+ const base = originalXml ? carbonCopy(originalXml) : {
32134
+ type: "element",
32135
+ name: "w:footnote",
32136
+ attributes: {},
32137
+ elements: []
32138
+ };
32139
+ base.attributes = { ...base.attributes || {}, ...attributes };
32140
+ base.elements = translatedContent;
32141
+ return base;
32142
+ };
32143
+ const applyFootnotePropertiesToSettings = (converter, convertedXml) => {
32144
+ const props = converter?.footnoteProperties;
32145
+ if (!props || props.source !== "settings" || !props.originalXml) {
32146
+ return convertedXml;
32147
+ }
32148
+ const settingsXml = convertedXml["word/settings.xml"];
32149
+ const settingsRoot = settingsXml?.elements?.[0];
32150
+ if (!settingsRoot) return convertedXml;
32151
+ const updatedSettings = carbonCopy(settingsXml);
32152
+ const updatedRoot = updatedSettings.elements?.[0];
32153
+ if (!updatedRoot) return convertedXml;
32154
+ const elements = Array.isArray(updatedRoot.elements) ? updatedRoot.elements : [];
32155
+ const nextElements = elements.filter((el) => el?.name !== "w:footnotePr");
32156
+ nextElements.push(carbonCopy(props.originalXml));
32157
+ updatedRoot.elements = nextElements;
32158
+ return { ...convertedXml, "word/settings.xml": updatedSettings };
32159
+ };
32160
+ const buildFootnotesRelsXml = (converter, convertedXml, relationships) => {
32161
+ if (!relationships.length) return null;
32162
+ const existingRels = convertedXml[FOOTNOTES_RELS_PATH];
32163
+ const existingRoot = existingRels?.elements?.find((el) => el.name === "Relationships");
32164
+ const existingElements = Array.isArray(existingRoot?.elements) ? existingRoot.elements : [];
32165
+ const merged = mergeRelationshipElements(existingElements, relationships);
32166
+ const declaration = existingRels?.declaration ?? converter?.initialJSON?.declaration;
32167
+ const relsXml = {
32168
+ ...declaration ? { declaration } : {},
32169
+ elements: [
32170
+ {
32171
+ name: "Relationships",
32172
+ attributes: { xmlns: RELS_XMLNS },
32173
+ elements: merged
32174
+ }
32175
+ ]
32176
+ };
32177
+ return relsXml;
32178
+ };
32179
+ const prepareFootnotesXmlForExport = ({ footnotes, editor, converter, convertedXml }) => {
32180
+ let updatedXml = applyFootnotePropertiesToSettings(converter, convertedXml);
32181
+ if (!footnotes || !Array.isArray(footnotes) || footnotes.length === 0) {
32182
+ return { updatedXml, relationships: [], media: {} };
32183
+ }
32184
+ const footnoteRelationships = [];
32185
+ const footnoteMedia = {};
32186
+ const exportContext = {
32187
+ editor,
32188
+ editorSchema: editor?.schema,
32189
+ converter,
32190
+ relationships: footnoteRelationships,
32191
+ media: footnoteMedia
32192
+ };
32193
+ const footnoteElements = footnotes.map((fn) => createFootnoteElement(fn, exportContext)).filter(Boolean);
32194
+ if (footnoteElements.length === 0) {
32195
+ return { updatedXml, relationships: [], media: footnoteMedia };
32196
+ }
32197
+ let footnotesXml = updatedXml["word/footnotes.xml"];
32198
+ if (!footnotesXml) {
32199
+ footnotesXml = carbonCopy(FOOTNOTES_XML_DEF);
32200
+ } else {
32201
+ footnotesXml = carbonCopy(footnotesXml);
32202
+ }
32203
+ if (footnotesXml.elements && footnotesXml.elements[0]) {
32204
+ footnotesXml.elements[0].elements = footnoteElements;
32205
+ }
32206
+ updatedXml = { ...updatedXml, "word/footnotes.xml": footnotesXml };
32207
+ if (footnoteRelationships.length > 0) {
32208
+ const footnotesRelsXml = buildFootnotesRelsXml(converter, updatedXml, footnoteRelationships);
32209
+ if (footnotesRelsXml) {
32210
+ updatedXml = { ...updatedXml, [FOOTNOTES_RELS_PATH]: footnotesRelsXml };
32211
+ }
32212
+ }
32213
+ const relationships = [
32214
+ {
32215
+ type: "element",
32216
+ name: "Relationship",
32217
+ attributes: {
32218
+ Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",
32219
+ Target: "footnotes.xml"
32220
+ }
32221
+ }
32222
+ ];
32223
+ return { updatedXml, relationships, media: footnoteMedia };
32224
+ };
31833
32225
  const FONT_FAMILY_FALLBACKS = Object.freeze({
31834
32226
  swiss: "Arial, sans-serif",
31835
32227
  roman: "Times New Roman, serif",
@@ -31961,6 +32353,8 @@ class SuperConverter {
31961
32353
  this.fonts = params?.fonts || {};
31962
32354
  this.addedMedia = {};
31963
32355
  this.comments = [];
32356
+ this.footnotes = [];
32357
+ this.footnoteProperties = null;
31964
32358
  this.inlineDocumentFonts = [];
31965
32359
  this.docHiglightColors = /* @__PURE__ */ new Set([]);
31966
32360
  this.xml = params?.xml;
@@ -32276,7 +32670,7 @@ class SuperConverter {
32276
32670
  static getStoredSuperdocVersion(docx) {
32277
32671
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
32278
32672
  }
32279
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.5.0") {
32673
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.6.0-next.2") {
32280
32674
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
32281
32675
  }
32282
32676
  /**
@@ -32551,6 +32945,7 @@ class SuperConverter {
32551
32945
  this.pageStyles = result.pageStyles;
32552
32946
  this.numbering = result.numbering;
32553
32947
  this.comments = result.comments;
32948
+ this.footnotes = result.footnotes;
32554
32949
  this.linkedStyles = result.linkedStyles;
32555
32950
  this.inlineDocumentFonts = result.inlineDocumentFonts;
32556
32951
  this.themeColors = result.themeColors ?? null;
@@ -32581,10 +32976,22 @@ class SuperConverter {
32581
32976
  if (exportJsonOnly) return result;
32582
32977
  const exporter = new DocxExporter(this);
32583
32978
  const xml = exporter.schemaToXml(result);
32979
+ const {
32980
+ updatedXml: footnotesUpdatedXml,
32981
+ relationships: footnotesRels,
32982
+ media: footnotesMedia
32983
+ } = prepareFootnotesXmlForExport({
32984
+ footnotes: this.footnotes,
32985
+ editor,
32986
+ converter: this,
32987
+ convertedXml: this.convertedXml
32988
+ });
32989
+ this.convertedXml = { ...this.convertedXml, ...footnotesUpdatedXml };
32584
32990
  await this.#exportProcessMediaFiles(
32585
32991
  {
32586
32992
  ...documentMedia,
32587
32993
  ...params.media,
32994
+ ...footnotesMedia,
32588
32995
  ...this.media
32589
32996
  },
32590
32997
  editor
@@ -32602,7 +33009,7 @@ class SuperConverter {
32602
33009
  }
32603
33010
  this.convertedXml = { ...this.convertedXml, ...updatedXml };
32604
33011
  const headFootRels = this.#exportProcessHeadersFooters({ isFinalDoc });
32605
- this.#exportProcessNewRelationships([...params.relationships, ...commentsRels, ...headFootRels]);
33012
+ this.#exportProcessNewRelationships([...params.relationships, ...commentsRels, ...footnotesRels, ...headFootRels]);
32606
33013
  SuperConverter.setStoredSuperdocVersion(this.convertedXml);
32607
33014
  if (this.documentModified || this.documentGuid) {
32608
33015
  if (!this.documentGuid) {
@@ -32985,8 +33392,8 @@ exports.registeredHandlers = registeredHandlers;
32985
33392
  exports.replaceStep = replaceStep;
32986
33393
  exports.resolveDocxFontFamily = resolveDocxFontFamily;
32987
33394
  exports.resolveRunProperties = resolveRunProperties;
32988
- exports.translator = translator$1P;
32989
- exports.translator$1 = translator$15;
33395
+ exports.translator = translator$1Q;
33396
+ exports.translator$1 = translator$16;
32990
33397
  exports.unflattenListsInHtml = unflattenListsInHtml;
32991
33398
  exports.updateNumberingProperties = updateNumberingProperties;
32992
33399
  exports.wrapTextsInRuns = wrapTextsInRuns;