@harbour-enterprises/superdoc 0.24.0-next.1 → 0.24.0-next.3

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.
Files changed (40) hide show
  1. package/dist/chunks/{PdfViewer-DbOqZXrQ.es.js → PdfViewer-DEWI6Uts.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-JCz8O4m9.cjs → PdfViewer-skWUtg2N.cjs} +1 -1
  3. package/dist/chunks/{index-BppAJo0E.cjs → index-2QL0aZ2S.cjs} +2 -2
  4. package/dist/chunks/{index-BRpb9ulj.es.js → index-C_AMhrHP.es.js} +2 -2
  5. package/dist/chunks/{super-editor.es-B6zt2zq-.cjs → super-editor.es-CfK_qBM9.cjs} +1496 -897
  6. package/dist/chunks/{super-editor.es-BkjovEJQ.es.js → super-editor.es-iMAoOYOw.es.js} +1496 -897
  7. package/dist/core/types/index.d.ts.map +1 -1
  8. package/dist/style.css +5 -4
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-CTR0TlK4.js → converter-BueCftlx.js} +1179 -858
  11. package/dist/super-editor/chunks/{docx-zipper-DUHu_gKU.js → docx-zipper-C9jmfWYZ.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-uVrxFmWV.js → editor-BsuNqVvp.js} +332 -53
  13. package/dist/super-editor/chunks/{toolbar-CotoiG3_.js → toolbar-DxhfgAoa.js} +2 -2
  14. package/dist/super-editor/converter.es.js +1 -1
  15. package/dist/super-editor/docx-zipper.es.js +2 -2
  16. package/dist/super-editor/editor.es.js +3 -3
  17. package/dist/super-editor/file-zipper.es.js +1 -1
  18. package/dist/super-editor/style.css +5 -4
  19. package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts +5 -0
  20. package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts +22 -0
  21. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +1 -0
  22. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/trackChangesImporter.d.ts +5 -0
  23. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +1 -0
  24. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/helpers.d.ts +1 -0
  25. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/del-translator.d.ts +7 -0
  26. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/index.d.ts +1 -0
  27. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/index.d.ts +1 -0
  28. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/ins-translator.d.ts +7 -0
  29. package/dist/super-editor/super-editor/src/extensions/image/image.d.ts +1 -1
  30. package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/index.d.ts +1 -0
  31. package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/legacyAttributes.d.ts +17 -0
  32. package/dist/super-editor/super-editor.es.js +7 -7
  33. package/dist/super-editor/toolbar.es.js +2 -2
  34. package/dist/super-editor.cjs +1 -1
  35. package/dist/super-editor.es.js +1 -1
  36. package/dist/superdoc.cjs +2 -2
  37. package/dist/superdoc.es.js +2 -2
  38. package/dist/superdoc.umd.js +1496 -897
  39. package/dist/superdoc.umd.js.map +1 -1
  40. package/package.json +1 -1
@@ -22832,14 +22832,21 @@
22832
22832
  function twipsToPixels(twips) {
22833
22833
  if (twips == null) return;
22834
22834
  const inches = twipsToInches(twips);
22835
+ return inchesToPixels(inches);
22836
+ }
22837
+ function pixelsToTwips(pixels) {
22838
+ const inches = pixelsToInches(pixels);
22839
+ return inchesToTwips(inches);
22840
+ }
22841
+ function inchesToPixels(inches) {
22835
22842
  if (inches == null) return;
22836
22843
  const pixels = inches * 96;
22837
22844
  return Math.round(pixels * 1e3) / 1e3;
22838
22845
  }
22839
- function pixelsToTwips(pixels) {
22846
+ function pixelsToInches(pixels) {
22840
22847
  if (pixels == null) return;
22841
22848
  const inches = Number(pixels) / 96;
22842
- return inchesToTwips(inches);
22849
+ return inches;
22843
22850
  }
22844
22851
  function twipsToLines(twips) {
22845
22852
  if (twips == null) return;
@@ -22890,6 +22897,71 @@
22890
22897
  if (degrees == null) return;
22891
22898
  return degrees * 6e4;
22892
22899
  }
22900
+ function pixelsToPolygonUnits(pixels) {
22901
+ if (pixels == null) return;
22902
+ const pu = pixels * 96;
22903
+ return Math.round(pu);
22904
+ }
22905
+ function polygonUnitsToPixels(pu) {
22906
+ if (pu == null) return;
22907
+ const pixels = Number(pu) / 96;
22908
+ return Math.round(pixels * 1e3) / 1e3;
22909
+ }
22910
+ function polygonToObj(polygonNode) {
22911
+ if (!polygonNode) return null;
22912
+ const points = [];
22913
+ polygonNode.elements.forEach((element) => {
22914
+ if (["wp:start", "wp:lineTo"].includes(element.name)) {
22915
+ const { x, y: y2 } = element.attributes;
22916
+ points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
22917
+ }
22918
+ });
22919
+ if (points.length > 1) {
22920
+ const firstPoint = points[0];
22921
+ const lastPoint = points[points.length - 1];
22922
+ if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1]) {
22923
+ points.pop();
22924
+ }
22925
+ }
22926
+ return points;
22927
+ }
22928
+ function objToPolygon(points) {
22929
+ if (!points || !Array.isArray(points)) return null;
22930
+ const polygonNode = {
22931
+ name: "wp:wrapPolygon",
22932
+ type: "wp:wrapPolygon",
22933
+ attributes: {
22934
+ edited: "0"
22935
+ },
22936
+ elements: []
22937
+ };
22938
+ points.forEach((point, index2) => {
22939
+ const [x, y2] = point;
22940
+ const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
22941
+ const pointNode = {
22942
+ name: tagName,
22943
+ type: tagName,
22944
+ attributes: {
22945
+ x: pixelsToPolygonUnits(x),
22946
+ y: pixelsToPolygonUnits(y2)
22947
+ }
22948
+ };
22949
+ polygonNode.elements.push(pointNode);
22950
+ });
22951
+ if (points.length > 0) {
22952
+ const [startX, startY] = points[0];
22953
+ const closePointNode = {
22954
+ name: "wp:lineTo",
22955
+ type: "wp:lineTo",
22956
+ attributes: {
22957
+ x: pixelsToPolygonUnits(startX),
22958
+ y: pixelsToPolygonUnits(startY)
22959
+ }
22960
+ };
22961
+ polygonNode.elements.push(closePointNode);
22962
+ }
22963
+ return polygonNode;
22964
+ }
22893
22965
  const getTextIndentExportValue = (indent) => {
22894
22966
  const [value, unit] = parseSizeUnit(indent);
22895
22967
  const functionsMap = {
@@ -32205,37 +32277,37 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32205
32277
  };
32206
32278
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
32207
32279
  let NodeTranslator = _NodeTranslator;
32208
- const encode$1c = (attributes) => {
32280
+ const encode$1e = (attributes) => {
32209
32281
  return attributes["w:type"];
32210
32282
  };
32211
- const decode$14 = (attrs) => {
32283
+ const decode$16 = (attrs) => {
32212
32284
  const { lineBreakType } = attrs;
32213
32285
  return lineBreakType;
32214
32286
  };
32215
32287
  const attrConfig$G = Object.freeze({
32216
32288
  xmlName: "w:type",
32217
32289
  sdName: "lineBreakType",
32218
- encode: encode$1c,
32219
- decode: decode$14
32290
+ encode: encode$1e,
32291
+ decode: decode$16
32220
32292
  });
32221
- const encode$1b = (attributes) => {
32293
+ const encode$1d = (attributes) => {
32222
32294
  const xmlAttrValue = attributes["w:clear"];
32223
32295
  return xmlAttrValue;
32224
32296
  };
32225
- const decode$13 = (attrs) => {
32297
+ const decode$15 = (attrs) => {
32226
32298
  const { clear } = attrs;
32227
32299
  return clear;
32228
32300
  };
32229
32301
  const attrConfig$F = Object.freeze({
32230
32302
  xmlName: "w:clear",
32231
32303
  sdName: "clear",
32232
- encode: encode$1b,
32233
- decode: decode$13
32304
+ encode: encode$1d,
32305
+ decode: decode$15
32234
32306
  });
32235
- const validXmlAttributes$n = [attrConfig$G, attrConfig$F];
32236
- const XML_NODE_NAME$z = "w:br";
32307
+ const validXmlAttributes$p = [attrConfig$G, attrConfig$F];
32308
+ const XML_NODE_NAME$B = "w:br";
32237
32309
  const SD_NODE_NAME$h = "lineBreak";
32238
- const encode$1a = (_2, encodedAttrs) => {
32310
+ const encode$1c = (_2, encodedAttrs) => {
32239
32311
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
32240
32312
  const translated = {
32241
32313
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -32245,7 +32317,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32245
32317
  }
32246
32318
  return translated;
32247
32319
  };
32248
- const decode$12 = (params2, decodedAttrs) => {
32320
+ const decode$14 = (params2, decodedAttrs) => {
32249
32321
  const { node } = params2;
32250
32322
  if (!node) return;
32251
32323
  const wBreak = { name: "w:br" };
@@ -32262,39 +32334,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32262
32334
  };
32263
32335
  return translated;
32264
32336
  };
32265
- const config$w = {
32266
- xmlName: XML_NODE_NAME$z,
32337
+ const config$y = {
32338
+ xmlName: XML_NODE_NAME$B,
32267
32339
  sdNodeOrKeyName: SD_NODE_NAME$h,
32268
32340
  type: NodeTranslator.translatorTypes.NODE,
32269
- encode: encode$1a,
32270
- decode: decode$12,
32271
- attributes: validXmlAttributes$n
32341
+ encode: encode$1c,
32342
+ decode: decode$14,
32343
+ attributes: validXmlAttributes$p
32272
32344
  };
32273
- const translator$1a = NodeTranslator.from(config$w);
32274
- const encode$19 = (attributes) => attributes?.["w:val"];
32275
- const decode$11 = (attrs) => attrs?.highlight;
32345
+ const translator$1c = NodeTranslator.from(config$y);
32346
+ const encode$1b = (attributes) => attributes?.["w:val"];
32347
+ const decode$13 = (attrs) => attrs?.highlight;
32276
32348
  const attrConfig$E = Object.freeze({
32277
32349
  xmlName: "w:val",
32278
32350
  sdName: "highlight",
32279
- encode: encode$19,
32280
- decode: decode$11
32351
+ encode: encode$1b,
32352
+ decode: decode$13
32281
32353
  });
32282
- const validXmlAttributes$m = [attrConfig$E];
32283
- const XML_NODE_NAME$y = "w:highlight";
32284
- const SD_ATTR_KEY$g = "highlight";
32354
+ const validXmlAttributes$o = [attrConfig$E];
32355
+ const XML_NODE_NAME$A = "w:highlight";
32356
+ const SD_ATTR_KEY$i = "highlight";
32285
32357
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
32286
- const encode$18 = (params2, encodedAttrs = {}) => {
32358
+ const encode$1a = (params2, encodedAttrs = {}) => {
32287
32359
  const { nodes } = params2;
32288
32360
  const node = nodes?.[0];
32289
32361
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
32290
32362
  return {
32291
32363
  type: "attr",
32292
- xmlName: XML_NODE_NAME$y,
32293
- sdNodeOrKeyName: SD_ATTR_KEY$g,
32364
+ xmlName: XML_NODE_NAME$A,
32365
+ sdNodeOrKeyName: SD_ATTR_KEY$i,
32294
32366
  attributes: { "w:val": value ?? null }
32295
32367
  };
32296
32368
  };
32297
- const decode$10 = (params2) => {
32369
+ const decode$12 = (params2) => {
32298
32370
  const attrs = params2?.node?.attrs || {};
32299
32371
  const highlightValue = attrs.highlight ?? attrs.color ?? null;
32300
32372
  if (!highlightValue) return void 0;
@@ -32302,14 +32374,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32302
32374
  if (!normalizedValue) return void 0;
32303
32375
  if (DISABLED_TOKENS.has(normalizedValue)) {
32304
32376
  return {
32305
- name: XML_NODE_NAME$y,
32377
+ name: XML_NODE_NAME$A,
32306
32378
  attributes: { "w:val": "none" }
32307
32379
  };
32308
32380
  }
32309
32381
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
32310
32382
  if (keyword) {
32311
32383
  return {
32312
- name: XML_NODE_NAME$y,
32384
+ name: XML_NODE_NAME$A,
32313
32385
  attributes: { "w:val": keyword }
32314
32386
  };
32315
32387
  }
@@ -32324,63 +32396,63 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32324
32396
  }
32325
32397
  };
32326
32398
  };
32327
- const config$v = {
32328
- xmlName: XML_NODE_NAME$y,
32329
- sdNodeOrKeyName: SD_ATTR_KEY$g,
32399
+ const config$x = {
32400
+ xmlName: XML_NODE_NAME$A,
32401
+ sdNodeOrKeyName: SD_ATTR_KEY$i,
32330
32402
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
32331
- encode: encode$18,
32332
- decode: decode$10,
32333
- attributes: validXmlAttributes$m
32403
+ encode: encode$1a,
32404
+ decode: decode$12,
32405
+ attributes: validXmlAttributes$o
32334
32406
  };
32335
- const translator$19 = NodeTranslator.from(config$v);
32336
- const encode$17 = (attributes) => {
32407
+ const translator$1b = NodeTranslator.from(config$x);
32408
+ const encode$19 = (attributes) => {
32337
32409
  return attributes["w:val"];
32338
32410
  };
32339
- const decode$$ = (attrs) => {
32411
+ const decode$11 = (attrs) => {
32340
32412
  const { tabSize } = attrs || {};
32341
32413
  return tabSize;
32342
32414
  };
32343
32415
  const attrConfig$D = Object.freeze({
32344
32416
  xmlName: "w:val",
32345
32417
  sdName: "tabSize",
32346
- encode: encode$17,
32347
- decode: decode$$
32418
+ encode: encode$19,
32419
+ decode: decode$11
32348
32420
  });
32349
- const encode$16 = (attributes) => {
32421
+ const encode$18 = (attributes) => {
32350
32422
  return attributes["w:leader"];
32351
32423
  };
32352
- const decode$_ = (attrs) => {
32424
+ const decode$10 = (attrs) => {
32353
32425
  const { leader } = attrs || {};
32354
32426
  return leader;
32355
32427
  };
32356
32428
  const attrConfig$C = Object.freeze({
32357
32429
  xmlName: "w:leader",
32358
32430
  sdName: "leader",
32359
- encode: encode$16,
32360
- decode: decode$_
32431
+ encode: encode$18,
32432
+ decode: decode$10
32361
32433
  });
32362
- const encode$15 = (attributes) => {
32434
+ const encode$17 = (attributes) => {
32363
32435
  return attributes["w:pos"];
32364
32436
  };
32365
- const decode$Z = (attrs) => {
32437
+ const decode$$ = (attrs) => {
32366
32438
  const { pos } = attrs || {};
32367
32439
  return pos;
32368
32440
  };
32369
32441
  const attrConfig$B = Object.freeze({
32370
32442
  xmlName: "w:pos",
32371
32443
  sdName: "pos",
32372
- encode: encode$15,
32373
- decode: decode$Z
32444
+ encode: encode$17,
32445
+ decode: decode$$
32374
32446
  });
32375
- const validXmlAttributes$l = [attrConfig$D, attrConfig$B, attrConfig$C];
32376
- const XML_NODE_NAME$x = "w:tab";
32447
+ const validXmlAttributes$n = [attrConfig$D, attrConfig$B, attrConfig$C];
32448
+ const XML_NODE_NAME$z = "w:tab";
32377
32449
  const SD_NODE_NAME$g = "tab";
32378
- const encode$14 = (_2, encodedAttrs = {}) => {
32450
+ const encode$16 = (_2, encodedAttrs = {}) => {
32379
32451
  const translated = { type: "tab" };
32380
32452
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
32381
32453
  return translated;
32382
32454
  };
32383
- const decode$Y = (params2, decodedAttrs = {}) => {
32455
+ const decode$_ = (params2, decodedAttrs = {}) => {
32384
32456
  const { node } = params2 || {};
32385
32457
  if (!node) return;
32386
32458
  const wTab = { name: "w:tab" };
@@ -32396,15 +32468,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32396
32468
  }
32397
32469
  return translated;
32398
32470
  };
32399
- const config$u = {
32400
- xmlName: XML_NODE_NAME$x,
32471
+ const config$w = {
32472
+ xmlName: XML_NODE_NAME$z,
32401
32473
  sdNodeOrKeyName: SD_NODE_NAME$g,
32402
32474
  type: NodeTranslator.translatorTypes.NODE,
32403
- encode: encode$14,
32404
- decode: decode$Y,
32405
- attributes: validXmlAttributes$l
32475
+ encode: encode$16,
32476
+ decode: decode$_,
32477
+ attributes: validXmlAttributes$n
32406
32478
  };
32407
- const translator$18 = NodeTranslator.from(config$u);
32479
+ const translator$1a = NodeTranslator.from(config$w);
32408
32480
  const mergeTextNodes = (nodes) => {
32409
32481
  if (!nodes || !Array.isArray(nodes)) {
32410
32482
  return nodes;
@@ -32922,91 +32994,91 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32922
32994
  }
32923
32995
  return schemaNode;
32924
32996
  };
32925
- const encode$13 = (attributes) => {
32997
+ const encode$15 = (attributes) => {
32926
32998
  return attributes["w:rsidDel"];
32927
32999
  };
32928
- const decode$X = (attrs) => {
33000
+ const decode$Z = (attrs) => {
32929
33001
  return attrs.rsidDel;
32930
33002
  };
32931
33003
  const attrConfig$A = Object.freeze({
32932
33004
  xmlName: "w:rsidDel",
32933
33005
  sdName: "rsidDel",
32934
- encode: encode$13,
32935
- decode: decode$X
33006
+ encode: encode$15,
33007
+ decode: decode$Z
32936
33008
  });
32937
- const encode$12 = (attributes) => {
33009
+ const encode$14 = (attributes) => {
32938
33010
  return attributes["w:rsidP"];
32939
33011
  };
32940
- const decode$W = (attrs) => {
33012
+ const decode$Y = (attrs) => {
32941
33013
  return attrs.rsidP;
32942
33014
  };
32943
33015
  const attrConfig$z = Object.freeze({
32944
33016
  xmlName: "w:rsidP",
32945
33017
  sdName: "rsidP",
32946
- encode: encode$12,
32947
- decode: decode$W
33018
+ encode: encode$14,
33019
+ decode: decode$Y
32948
33020
  });
32949
- const encode$11 = (attributes) => {
33021
+ const encode$13 = (attributes) => {
32950
33022
  return attributes["w:rsidR"];
32951
33023
  };
32952
- const decode$V = (attrs) => {
33024
+ const decode$X = (attrs) => {
32953
33025
  return attrs.rsidR;
32954
33026
  };
32955
33027
  const attrConfig$y = Object.freeze({
32956
33028
  xmlName: "w:rsidR",
32957
33029
  sdName: "rsidR",
32958
- encode: encode$11,
32959
- decode: decode$V
33030
+ encode: encode$13,
33031
+ decode: decode$X
32960
33032
  });
32961
- const encode$10 = (attributes) => {
33033
+ const encode$12 = (attributes) => {
32962
33034
  return attributes["w:rsidRPr"];
32963
33035
  };
32964
- const decode$U = (attrs) => {
33036
+ const decode$W = (attrs) => {
32965
33037
  return attrs.rsidRPr;
32966
33038
  };
32967
33039
  const attrConfig$x = Object.freeze({
32968
33040
  xmlName: "w:rsidRPr",
32969
33041
  sdName: "rsidRPr",
32970
- encode: encode$10,
32971
- decode: decode$U
33042
+ encode: encode$12,
33043
+ decode: decode$W
32972
33044
  });
32973
- const encode$$ = (attributes) => {
33045
+ const encode$11 = (attributes) => {
32974
33046
  return attributes["w:rsidRDefault"];
32975
33047
  };
32976
- const decode$T = (attrs) => {
33048
+ const decode$V = (attrs) => {
32977
33049
  return attrs.rsidRDefault;
32978
33050
  };
32979
33051
  const attrConfig$w = Object.freeze({
32980
33052
  xmlName: "w:rsidRDefault",
32981
33053
  sdName: "rsidRDefault",
32982
- encode: encode$$,
32983
- decode: decode$T
33054
+ encode: encode$11,
33055
+ decode: decode$V
32984
33056
  });
32985
- const encode$_ = (attributes) => {
33057
+ const encode$10 = (attributes) => {
32986
33058
  return attributes["w14:paraId"];
32987
33059
  };
32988
- const decode$S = (attrs) => {
33060
+ const decode$U = (attrs) => {
32989
33061
  return attrs.paraId;
32990
33062
  };
32991
33063
  const attrConfig$v = Object.freeze({
32992
33064
  xmlName: "w14:paraId",
32993
33065
  sdName: "paraId",
32994
- encode: encode$_,
32995
- decode: decode$S
33066
+ encode: encode$10,
33067
+ decode: decode$U
32996
33068
  });
32997
- const encode$Z = (attributes) => {
33069
+ const encode$$ = (attributes) => {
32998
33070
  return attributes["w14:textId"];
32999
33071
  };
33000
- const decode$R = (attrs) => {
33072
+ const decode$T = (attrs) => {
33001
33073
  return attrs.textId;
33002
33074
  };
33003
33075
  const attrConfig$u = Object.freeze({
33004
33076
  xmlName: "w14:textId",
33005
33077
  sdName: "textId",
33006
- encode: encode$Z,
33007
- decode: decode$R
33078
+ encode: encode$$,
33079
+ decode: decode$T
33008
33080
  });
33009
- const validXmlAttributes$k = [
33081
+ const validXmlAttributes$m = [
33010
33082
  attrConfig$v,
33011
33083
  attrConfig$u,
33012
33084
  attrConfig$y,
@@ -33015,9 +33087,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33015
33087
  attrConfig$x,
33016
33088
  attrConfig$A
33017
33089
  ];
33018
- const XML_NODE_NAME$w = "w:p";
33090
+ const XML_NODE_NAME$y = "w:p";
33019
33091
  const SD_NODE_NAME$f = "paragraph";
33020
- const encode$Y = (params2, encodedAttrs = {}) => {
33092
+ const encode$_ = (params2, encodedAttrs = {}) => {
33021
33093
  const node = handleParagraphNode$1(params2);
33022
33094
  if (!node) return void 0;
33023
33095
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -33025,7 +33097,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33025
33097
  }
33026
33098
  return node;
33027
33099
  };
33028
- const decode$Q = (params2, decodedAttrs = {}) => {
33100
+ const decode$S = (params2, decodedAttrs = {}) => {
33029
33101
  const translated = translateParagraphNode(params2);
33030
33102
  if (!translated) return void 0;
33031
33103
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -33033,16 +33105,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33033
33105
  }
33034
33106
  return translated;
33035
33107
  };
33036
- const config$t = {
33037
- xmlName: XML_NODE_NAME$w,
33108
+ const config$v = {
33109
+ xmlName: XML_NODE_NAME$y,
33038
33110
  sdNodeOrKeyName: SD_NODE_NAME$f,
33039
33111
  type: NodeTranslator.translatorTypes.NODE,
33040
- encode: encode$Y,
33041
- decode: decode$Q,
33042
- attributes: validXmlAttributes$k
33112
+ encode: encode$_,
33113
+ decode: decode$S,
33114
+ attributes: validXmlAttributes$m
33043
33115
  };
33044
- const translator$17 = NodeTranslator.from(config$t);
33045
- const encode$X = (attributes) => {
33116
+ const translator$19 = NodeTranslator.from(config$v);
33117
+ const encode$Z = (attributes) => {
33046
33118
  const raw = attributes?.["w:val"];
33047
33119
  if (raw === void 0 || raw === null) return void 0;
33048
33120
  if (typeof raw === "boolean") return raw;
@@ -33052,24 +33124,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33052
33124
  if (val === "1" || val === "true" || val === "on") return true;
33053
33125
  return void 0;
33054
33126
  };
33055
- const decode$P = (runProps) => {
33127
+ const decode$R = (runProps) => {
33056
33128
  if (runProps?.bold === false) return "0";
33057
33129
  return void 0;
33058
33130
  };
33059
33131
  const attrConfig$t = Object.freeze({
33060
33132
  xmlName: "w:val",
33061
33133
  sdName: "bold",
33062
- encode: encode$X,
33063
- decode: decode$P
33134
+ encode: encode$Z,
33135
+ decode: decode$R
33064
33136
  });
33065
- const validXmlAttributes$j = [attrConfig$t];
33066
- const XML_NODE_NAME$v = "w:b";
33067
- const SD_ATTR_KEY$f = "bold";
33068
- const encode$W = (params2, encodedAttrs = {}) => {
33137
+ const validXmlAttributes$l = [attrConfig$t];
33138
+ const XML_NODE_NAME$x = "w:b";
33139
+ const SD_ATTR_KEY$h = "bold";
33140
+ const encode$Y = (params2, encodedAttrs = {}) => {
33069
33141
  const { nodes } = params2;
33070
33142
  const node = nodes[0];
33071
33143
  if (!node) return void 0;
33072
- const val = encodedAttrs?.[SD_ATTR_KEY$f];
33144
+ const val = encodedAttrs?.[SD_ATTR_KEY$h];
33073
33145
  let attributes;
33074
33146
  if (val === false) attributes = { "w:val": "0" };
33075
33147
  else if (val === true)
@@ -33077,85 +33149,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33077
33149
  else attributes = node.attributes || {};
33078
33150
  return {
33079
33151
  type: "attr",
33080
- xmlName: XML_NODE_NAME$v,
33081
- sdNodeOrKeyName: SD_ATTR_KEY$f,
33152
+ xmlName: XML_NODE_NAME$x,
33153
+ sdNodeOrKeyName: SD_ATTR_KEY$h,
33082
33154
  attributes
33083
33155
  };
33084
33156
  };
33085
- const config$s = {
33086
- xmlName: XML_NODE_NAME$v,
33087
- sdNodeOrKeyName: SD_ATTR_KEY$f,
33157
+ const config$u = {
33158
+ xmlName: XML_NODE_NAME$x,
33159
+ sdNodeOrKeyName: SD_ATTR_KEY$h,
33088
33160
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33089
- encode: encode$W,
33090
- attributes: validXmlAttributes$j
33161
+ encode: encode$Y,
33162
+ attributes: validXmlAttributes$l
33091
33163
  };
33092
- const translator$16 = NodeTranslator.from(config$s);
33093
- const XML_NODE_NAME$u = "w:i";
33094
- const SD_ATTR_KEY$e = "italic";
33095
- const encode$V = (params2) => {
33164
+ const translator$18 = NodeTranslator.from(config$u);
33165
+ const XML_NODE_NAME$w = "w:i";
33166
+ const SD_ATTR_KEY$g = "italic";
33167
+ const encode$X = (params2) => {
33096
33168
  const { nodes } = params2;
33097
33169
  const node = nodes?.[0];
33098
33170
  if (!node) return void 0;
33099
33171
  return {
33100
33172
  type: "attr",
33101
- xmlName: XML_NODE_NAME$u,
33102
- sdNodeOrKeyName: SD_ATTR_KEY$e,
33173
+ xmlName: XML_NODE_NAME$w,
33174
+ sdNodeOrKeyName: SD_ATTR_KEY$g,
33103
33175
  attributes: {
33104
33176
  "w:val": node.attributes?.["w:val"] ?? null
33105
33177
  }
33106
33178
  };
33107
33179
  };
33108
- const config$r = {
33109
- xmlName: XML_NODE_NAME$u,
33110
- sdNodeOrKeyName: SD_ATTR_KEY$e,
33180
+ const config$t = {
33181
+ xmlName: XML_NODE_NAME$w,
33182
+ sdNodeOrKeyName: SD_ATTR_KEY$g,
33111
33183
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33112
- encode: encode$V
33184
+ encode: encode$X
33113
33185
  };
33114
- const translator$15 = NodeTranslator.from(config$r);
33115
- const encode$U = (attributes) => attributes?.["w:val"];
33116
- const decode$O = (attrs) => attrs?.underline;
33186
+ const translator$17 = NodeTranslator.from(config$t);
33187
+ const encode$W = (attributes) => attributes?.["w:val"];
33188
+ const decode$Q = (attrs) => attrs?.underline;
33117
33189
  const attrConfig$s = Object.freeze({
33118
33190
  xmlName: "w:val",
33119
33191
  sdName: "underline",
33120
- encode: encode$U,
33121
- decode: decode$O
33192
+ encode: encode$W,
33193
+ decode: decode$Q
33122
33194
  });
33123
- const encode$T = (attributes) => attributes?.["w:color"];
33124
- const decode$N = (attrs) => attrs?.color;
33195
+ const encode$V = (attributes) => attributes?.["w:color"];
33196
+ const decode$P = (attrs) => attrs?.color;
33125
33197
  const attrConfig$r = Object.freeze({
33126
33198
  xmlName: "w:color",
33127
33199
  sdName: "color",
33128
- encode: encode$T,
33129
- decode: decode$N
33200
+ encode: encode$V,
33201
+ decode: decode$P
33130
33202
  });
33131
- const encode$S = (attributes) => attributes?.["w:themeColor"];
33132
- const decode$M = (attrs) => attrs?.themeColor;
33203
+ const encode$U = (attributes) => attributes?.["w:themeColor"];
33204
+ const decode$O = (attrs) => attrs?.themeColor;
33133
33205
  const attrConfig$q = Object.freeze({
33134
33206
  xmlName: "w:themeColor",
33135
33207
  sdName: "themeColor",
33136
- encode: encode$S,
33137
- decode: decode$M
33208
+ encode: encode$U,
33209
+ decode: decode$O
33138
33210
  });
33139
- const encode$R = (attributes) => attributes?.["w:themeTint"];
33140
- const decode$L = (attrs) => attrs?.themeTint;
33211
+ const encode$T = (attributes) => attributes?.["w:themeTint"];
33212
+ const decode$N = (attrs) => attrs?.themeTint;
33141
33213
  const attrConfig$p = Object.freeze({
33142
33214
  xmlName: "w:themeTint",
33143
33215
  sdName: "themeTint",
33144
- encode: encode$R,
33145
- decode: decode$L
33216
+ encode: encode$T,
33217
+ decode: decode$N
33146
33218
  });
33147
- const encode$Q = (attributes) => attributes?.["w:themeShade"];
33148
- const decode$K = (attrs) => attrs?.themeShade;
33219
+ const encode$S = (attributes) => attributes?.["w:themeShade"];
33220
+ const decode$M = (attrs) => attrs?.themeShade;
33149
33221
  const attrConfig$o = Object.freeze({
33150
33222
  xmlName: "w:themeShade",
33151
33223
  sdName: "themeShade",
33152
- encode: encode$Q,
33153
- decode: decode$K
33224
+ encode: encode$S,
33225
+ decode: decode$M
33154
33226
  });
33155
- const validXmlAttributes$i = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
33156
- const XML_NODE_NAME$t = "w:u";
33157
- const SD_ATTR_KEY$d = "underline";
33158
- const encode$P = (params2, encodedAttrs = {}) => {
33227
+ const validXmlAttributes$k = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
33228
+ const XML_NODE_NAME$v = "w:u";
33229
+ const SD_ATTR_KEY$f = "underline";
33230
+ const encode$R = (params2, encodedAttrs = {}) => {
33159
33231
  const { nodes } = params2;
33160
33232
  const node = nodes?.[0];
33161
33233
  const sourceAttrs = node?.attributes || {};
@@ -33171,12 +33243,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33171
33243
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
33172
33244
  return {
33173
33245
  type: "attr",
33174
- xmlName: XML_NODE_NAME$t,
33175
- sdNodeOrKeyName: SD_ATTR_KEY$d,
33246
+ xmlName: XML_NODE_NAME$v,
33247
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
33176
33248
  attributes
33177
33249
  };
33178
33250
  };
33179
- const decode$J = (params2) => {
33251
+ const decode$L = (params2) => {
33180
33252
  const attrs = params2?.node?.attrs || {};
33181
33253
  const underlineType = attrs.underlineType ?? attrs.underline ?? null;
33182
33254
  const color = attrs.underlineColor ?? attrs.color ?? null;
@@ -33194,20 +33266,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33194
33266
  if (themeTint) attributes["w:themeTint"] = themeTint;
33195
33267
  if (themeShade) attributes["w:themeShade"] = themeShade;
33196
33268
  return {
33197
- name: XML_NODE_NAME$t,
33269
+ name: XML_NODE_NAME$v,
33198
33270
  attributes
33199
33271
  };
33200
33272
  };
33201
- const config$q = {
33202
- xmlName: XML_NODE_NAME$t,
33203
- sdNodeOrKeyName: SD_ATTR_KEY$d,
33273
+ const config$s = {
33274
+ xmlName: XML_NODE_NAME$v,
33275
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
33204
33276
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33205
- encode: encode$P,
33206
- decode: decode$J,
33207
- attributes: validXmlAttributes$i
33277
+ encode: encode$R,
33278
+ decode: decode$L,
33279
+ attributes: validXmlAttributes$k
33208
33280
  };
33209
- const translator$14 = NodeTranslator.from(config$q);
33210
- const encode$O = (attributes) => {
33281
+ const translator$16 = NodeTranslator.from(config$s);
33282
+ const encode$Q = (attributes) => {
33211
33283
  const raw = attributes?.["w:val"];
33212
33284
  if (raw === void 0 || raw === null) return void 0;
33213
33285
  if (typeof raw === "boolean") return raw;
@@ -33217,24 +33289,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33217
33289
  if (val === "1" || val === "true" || val === "on") return true;
33218
33290
  return void 0;
33219
33291
  };
33220
- const decode$I = (attrs) => {
33292
+ const decode$K = (attrs) => {
33221
33293
  if (attrs?.strike === false) return "0";
33222
33294
  return void 0;
33223
33295
  };
33224
33296
  const attrConfig$n = Object.freeze({
33225
33297
  xmlName: "w:val",
33226
33298
  sdName: "strike",
33227
- encode: encode$O,
33228
- decode: decode$I
33299
+ encode: encode$Q,
33300
+ decode: decode$K
33229
33301
  });
33230
- const validXmlAttributes$h = [attrConfig$n];
33231
- const XML_NODE_NAME$s = "w:strike";
33232
- const SD_ATTR_KEY$c = "strike";
33233
- const encode$N = (params2, encodedAttrs = {}) => {
33302
+ const validXmlAttributes$j = [attrConfig$n];
33303
+ const XML_NODE_NAME$u = "w:strike";
33304
+ const SD_ATTR_KEY$e = "strike";
33305
+ const encode$P = (params2, encodedAttrs = {}) => {
33234
33306
  const { nodes } = params2;
33235
33307
  const node = nodes?.[0];
33236
33308
  if (!node) return void 0;
33237
- const val = encodedAttrs?.[SD_ATTR_KEY$c];
33309
+ const val = encodedAttrs?.[SD_ATTR_KEY$e];
33238
33310
  let attributes;
33239
33311
  if (val === false) attributes = { "w:val": "0" };
33240
33312
  else if (val === true) attributes = {};
@@ -33243,55 +33315,55 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33243
33315
  else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
33244
33316
  return {
33245
33317
  type: "attr",
33246
- xmlName: XML_NODE_NAME$s,
33247
- sdNodeOrKeyName: SD_ATTR_KEY$c,
33318
+ xmlName: XML_NODE_NAME$u,
33319
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
33248
33320
  attributes
33249
33321
  };
33250
33322
  };
33251
- const config$p = {
33252
- xmlName: XML_NODE_NAME$s,
33253
- sdNodeOrKeyName: SD_ATTR_KEY$c,
33323
+ const config$r = {
33324
+ xmlName: XML_NODE_NAME$u,
33325
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
33254
33326
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33255
- encode: encode$N,
33256
- attributes: validXmlAttributes$h
33327
+ encode: encode$P,
33328
+ attributes: validXmlAttributes$j
33257
33329
  };
33258
- const translator$13 = NodeTranslator.from(config$p);
33259
- const encode$M = (attributes) => attributes?.["w:val"];
33260
- const decode$H = (attrs) => attrs?.color;
33330
+ const translator$15 = NodeTranslator.from(config$r);
33331
+ const encode$O = (attributes) => attributes?.["w:val"];
33332
+ const decode$J = (attrs) => attrs?.color;
33261
33333
  const attrConfig$m = Object.freeze({
33262
33334
  xmlName: "w:val",
33263
33335
  sdName: "color",
33264
- encode: encode$M,
33265
- decode: decode$H
33336
+ encode: encode$O,
33337
+ decode: decode$J
33266
33338
  });
33267
- const encode$L = (attributes) => attributes?.["w:themeColor"];
33268
- const decode$G = (attrs) => attrs?.themeColor;
33339
+ const encode$N = (attributes) => attributes?.["w:themeColor"];
33340
+ const decode$I = (attrs) => attrs?.themeColor;
33269
33341
  const attrConfig$l = Object.freeze({
33270
33342
  xmlName: "w:themeColor",
33271
33343
  sdName: "themeColor",
33272
- encode: encode$L,
33273
- decode: decode$G
33344
+ encode: encode$N,
33345
+ decode: decode$I
33274
33346
  });
33275
- const encode$K = (attributes) => attributes?.["w:themeTint"];
33276
- const decode$F = (attrs) => attrs?.themeTint;
33347
+ const encode$M = (attributes) => attributes?.["w:themeTint"];
33348
+ const decode$H = (attrs) => attrs?.themeTint;
33277
33349
  const attrConfig$k = Object.freeze({
33278
33350
  xmlName: "w:themeTint",
33279
33351
  sdName: "themeTint",
33280
- encode: encode$K,
33281
- decode: decode$F
33352
+ encode: encode$M,
33353
+ decode: decode$H
33282
33354
  });
33283
- const encode$J = (attributes) => attributes?.["w:themeShade"];
33284
- const decode$E = (attrs) => attrs?.themeShade;
33355
+ const encode$L = (attributes) => attributes?.["w:themeShade"];
33356
+ const decode$G = (attrs) => attrs?.themeShade;
33285
33357
  const attrConfig$j = Object.freeze({
33286
33358
  xmlName: "w:themeShade",
33287
33359
  sdName: "themeShade",
33288
- encode: encode$J,
33289
- decode: decode$E
33360
+ encode: encode$L,
33361
+ decode: decode$G
33290
33362
  });
33291
- const validXmlAttributes$g = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
33292
- const XML_NODE_NAME$r = "w:color";
33293
- const SD_ATTR_KEY$b = "color";
33294
- const encode$I = (params2, encodedAttrs = {}) => {
33363
+ const validXmlAttributes$i = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
33364
+ const XML_NODE_NAME$t = "w:color";
33365
+ const SD_ATTR_KEY$d = "color";
33366
+ const encode$K = (params2, encodedAttrs = {}) => {
33295
33367
  const { nodes } = params2;
33296
33368
  const node = nodes?.[0];
33297
33369
  const sourceAttrs = node?.attributes || {};
@@ -33306,63 +33378,63 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33306
33378
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
33307
33379
  return {
33308
33380
  type: "attr",
33309
- xmlName: XML_NODE_NAME$r,
33310
- sdNodeOrKeyName: SD_ATTR_KEY$b,
33381
+ xmlName: XML_NODE_NAME$t,
33382
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
33311
33383
  attributes
33312
33384
  };
33313
33385
  };
33314
- const config$o = {
33315
- xmlName: XML_NODE_NAME$r,
33316
- sdNodeOrKeyName: SD_ATTR_KEY$b,
33386
+ const config$q = {
33387
+ xmlName: XML_NODE_NAME$t,
33388
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
33317
33389
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33318
- encode: encode$I,
33319
- attributes: validXmlAttributes$g
33390
+ encode: encode$K,
33391
+ attributes: validXmlAttributes$i
33320
33392
  };
33321
- const translator$12 = NodeTranslator.from(config$o);
33322
- const encode$H = (attributes) => attributes?.["w:eastAsia"];
33323
- const decode$D = (attrs) => attrs?.eastAsia;
33393
+ const translator$14 = NodeTranslator.from(config$q);
33394
+ const encode$J = (attributes) => attributes?.["w:eastAsia"];
33395
+ const decode$F = (attrs) => attrs?.eastAsia;
33324
33396
  const attrConfig$i = Object.freeze({
33325
33397
  xmlName: "w:eastAsia",
33326
33398
  sdName: "eastAsia",
33327
- encode: encode$H,
33328
- decode: decode$D
33399
+ encode: encode$J,
33400
+ decode: decode$F
33329
33401
  });
33330
- const encode$G = (attributes) => attributes?.["w:ascii"];
33331
- const decode$C = (attrs) => attrs?.ascii;
33402
+ const encode$I = (attributes) => attributes?.["w:ascii"];
33403
+ const decode$E = (attrs) => attrs?.ascii;
33332
33404
  const attrConfig$h = Object.freeze({
33333
33405
  xmlName: "w:ascii",
33334
33406
  sdName: "ascii",
33335
- encode: encode$G,
33336
- decode: decode$C
33407
+ encode: encode$I,
33408
+ decode: decode$E
33337
33409
  });
33338
- const encode$F = (attributes) => attributes?.["w:hAnsi"];
33339
- const decode$B = (attrs) => attrs?.hAnsi;
33410
+ const encode$H = (attributes) => attributes?.["w:hAnsi"];
33411
+ const decode$D = (attrs) => attrs?.hAnsi;
33340
33412
  const attrConfig$g = Object.freeze({
33341
33413
  xmlName: "w:hAnsi",
33342
33414
  sdName: "hAnsi",
33343
- encode: encode$F,
33344
- decode: decode$B
33415
+ encode: encode$H,
33416
+ decode: decode$D
33345
33417
  });
33346
- const encode$E = (attributes) => attributes?.["w:cs"];
33347
- const decode$A = (attrs) => attrs?.cs;
33418
+ const encode$G = (attributes) => attributes?.["w:cs"];
33419
+ const decode$C = (attrs) => attrs?.cs;
33348
33420
  const attrConfig$f = Object.freeze({
33349
33421
  xmlName: "w:cs",
33350
33422
  sdName: "cs",
33351
- encode: encode$E,
33352
- decode: decode$A
33423
+ encode: encode$G,
33424
+ decode: decode$C
33353
33425
  });
33354
- const encode$D = (attributes) => attributes?.["w:val"];
33355
- const decode$z = (attrs) => attrs?.value;
33426
+ const encode$F = (attributes) => attributes?.["w:val"];
33427
+ const decode$B = (attrs) => attrs?.value;
33356
33428
  const attrConfig$e = Object.freeze({
33357
33429
  xmlName: "w:val",
33358
33430
  sdName: "value",
33359
- encode: encode$D,
33360
- decode: decode$z
33431
+ encode: encode$F,
33432
+ decode: decode$B
33361
33433
  });
33362
- const validXmlAttributes$f = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
33363
- const XML_NODE_NAME$q = "w:rFonts";
33364
- const SD_ATTR_KEY$a = "fontFamily";
33365
- const encode$C = (params2, encodedAttrs = {}) => {
33434
+ const validXmlAttributes$h = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
33435
+ const XML_NODE_NAME$s = "w:rFonts";
33436
+ const SD_ATTR_KEY$c = "fontFamily";
33437
+ const encode$E = (params2, encodedAttrs = {}) => {
33366
33438
  const { nodes } = params2;
33367
33439
  const node = nodes?.[0];
33368
33440
  const sourceAttrs = node?.attributes || {};
@@ -33388,109 +33460,109 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33388
33460
  if (attributes["w:val"] === void 0) delete attributes["w:val"];
33389
33461
  return {
33390
33462
  type: "attr",
33391
- xmlName: XML_NODE_NAME$q,
33392
- sdNodeOrKeyName: SD_ATTR_KEY$a,
33463
+ xmlName: XML_NODE_NAME$s,
33464
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
33393
33465
  attributes
33394
33466
  };
33395
33467
  };
33396
- const config$n = {
33397
- xmlName: XML_NODE_NAME$q,
33398
- sdNodeOrKeyName: SD_ATTR_KEY$a,
33468
+ const config$p = {
33469
+ xmlName: XML_NODE_NAME$s,
33470
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
33399
33471
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33400
- encode: encode$C,
33401
- attributes: validXmlAttributes$f
33472
+ encode: encode$E,
33473
+ attributes: validXmlAttributes$h
33402
33474
  };
33403
- const translator$11 = NodeTranslator.from(config$n);
33404
- const encode$B = (attributes) => attributes?.["w:val"];
33405
- const decode$y = (attrs) => attrs?.styleId;
33475
+ const translator$13 = NodeTranslator.from(config$p);
33476
+ const encode$D = (attributes) => attributes?.["w:val"];
33477
+ const decode$A = (attrs) => attrs?.styleId;
33406
33478
  const attrConfig$d = Object.freeze({
33407
33479
  xmlName: "w:val",
33408
33480
  sdName: "styleId",
33409
- encode: encode$B,
33410
- decode: decode$y
33481
+ encode: encode$D,
33482
+ decode: decode$A
33411
33483
  });
33412
- const validXmlAttributes$e = [attrConfig$d];
33413
- const XML_NODE_NAME$p = "w:rStyle";
33414
- const SD_ATTR_KEY$9 = "styleId";
33415
- const encode$A = (params2, encodedAttrs = {}) => {
33484
+ const validXmlAttributes$g = [attrConfig$d];
33485
+ const XML_NODE_NAME$r = "w:rStyle";
33486
+ const SD_ATTR_KEY$b = "styleId";
33487
+ const encode$C = (params2, encodedAttrs = {}) => {
33416
33488
  const { nodes } = params2;
33417
33489
  const node = nodes?.[0];
33418
33490
  const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
33419
33491
  return {
33420
33492
  type: "attr",
33421
- xmlName: XML_NODE_NAME$p,
33422
- sdNodeOrKeyName: SD_ATTR_KEY$9,
33493
+ xmlName: XML_NODE_NAME$r,
33494
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
33423
33495
  attributes: { "w:val": value ?? null }
33424
33496
  };
33425
33497
  };
33426
- const config$m = {
33427
- xmlName: XML_NODE_NAME$p,
33428
- sdNodeOrKeyName: SD_ATTR_KEY$9,
33498
+ const config$o = {
33499
+ xmlName: XML_NODE_NAME$r,
33500
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
33429
33501
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33430
- encode: encode$A,
33431
- attributes: validXmlAttributes$e
33502
+ encode: encode$C,
33503
+ attributes: validXmlAttributes$g
33432
33504
  };
33433
- const translator$10 = NodeTranslator.from(config$m);
33434
- const encode$z = (attributes) => attributes?.["w:val"];
33435
- const decode$x = (attrs) => attrs?.fontSize;
33505
+ const translator$12 = NodeTranslator.from(config$o);
33506
+ const encode$B = (attributes) => attributes?.["w:val"];
33507
+ const decode$z = (attrs) => attrs?.fontSize;
33436
33508
  const attrConfig$c = Object.freeze({
33437
33509
  xmlName: "w:val",
33438
33510
  sdName: "fontSize",
33439
- encode: encode$z,
33440
- decode: decode$x
33511
+ encode: encode$B,
33512
+ decode: decode$z
33441
33513
  });
33442
- const validXmlAttributes$d = [attrConfig$c];
33443
- const XML_NODE_NAME$o = "w:sz";
33444
- const SD_ATTR_KEY$8 = "fontSize";
33445
- const encode$y = (params2, encodedAttrs = {}) => {
33514
+ const validXmlAttributes$f = [attrConfig$c];
33515
+ const XML_NODE_NAME$q = "w:sz";
33516
+ const SD_ATTR_KEY$a = "fontSize";
33517
+ const encode$A = (params2, encodedAttrs = {}) => {
33446
33518
  const { nodes } = params2;
33447
33519
  const node = nodes?.[0];
33448
33520
  const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
33449
33521
  return {
33450
33522
  type: "attr",
33451
- xmlName: XML_NODE_NAME$o,
33452
- sdNodeOrKeyName: SD_ATTR_KEY$8,
33523
+ xmlName: XML_NODE_NAME$q,
33524
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
33453
33525
  attributes: { "w:val": value ?? null }
33454
33526
  };
33455
33527
  };
33456
- const config$l = {
33457
- xmlName: XML_NODE_NAME$o,
33458
- sdNodeOrKeyName: SD_ATTR_KEY$8,
33528
+ const config$n = {
33529
+ xmlName: XML_NODE_NAME$q,
33530
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
33459
33531
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33460
- encode: encode$y,
33461
- attributes: validXmlAttributes$d
33532
+ encode: encode$A,
33533
+ attributes: validXmlAttributes$f
33462
33534
  };
33463
- const translator$$ = NodeTranslator.from(config$l);
33464
- const encode$x = (attributes) => attributes?.["w:val"];
33465
- const decode$w = (attrs) => attrs?.fontSizeCs;
33535
+ const translator$11 = NodeTranslator.from(config$n);
33536
+ const encode$z = (attributes) => attributes?.["w:val"];
33537
+ const decode$y = (attrs) => attrs?.fontSizeCs;
33466
33538
  const attrConfig$b = Object.freeze({
33467
33539
  xmlName: "w:val",
33468
33540
  sdName: "fontSizeCs",
33469
- encode: encode$x,
33470
- decode: decode$w
33541
+ encode: encode$z,
33542
+ decode: decode$y
33471
33543
  });
33472
- const validXmlAttributes$c = [attrConfig$b];
33473
- const XML_NODE_NAME$n = "w:szCs";
33474
- const SD_ATTR_KEY$7 = "fontSizeCs";
33475
- const encode$w = (params2, encodedAttrs = {}) => {
33544
+ const validXmlAttributes$e = [attrConfig$b];
33545
+ const XML_NODE_NAME$p = "w:szCs";
33546
+ const SD_ATTR_KEY$9 = "fontSizeCs";
33547
+ const encode$y = (params2, encodedAttrs = {}) => {
33476
33548
  const { nodes } = params2;
33477
33549
  const node = nodes?.[0];
33478
33550
  const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
33479
33551
  return {
33480
33552
  type: "attr",
33481
- xmlName: XML_NODE_NAME$n,
33482
- sdNodeOrKeyName: SD_ATTR_KEY$7,
33553
+ xmlName: XML_NODE_NAME$p,
33554
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
33483
33555
  attributes: { "w:val": value ?? null }
33484
33556
  };
33485
33557
  };
33486
- const config$k = {
33487
- xmlName: XML_NODE_NAME$n,
33488
- sdNodeOrKeyName: SD_ATTR_KEY$7,
33558
+ const config$m = {
33559
+ xmlName: XML_NODE_NAME$p,
33560
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
33489
33561
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33490
- encode: encode$w,
33491
- attributes: validXmlAttributes$c
33562
+ encode: encode$y,
33563
+ attributes: validXmlAttributes$e
33492
33564
  };
33493
- const translator$_ = NodeTranslator.from(config$k);
33565
+ const translator$10 = NodeTranslator.from(config$m);
33494
33566
  const generateV2HandlerEntity = (handlerName, translator2) => ({
33495
33567
  handlerName,
33496
33568
  handler: (params2) => {
@@ -33624,9 +33696,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33624
33696
  const intValue = parseInteger(value);
33625
33697
  return intValue != void 0 ? String(intValue) : void 0;
33626
33698
  };
33627
- const XML_NODE_NAME$m = "w:caps";
33628
- const SD_ATTR_KEY$6 = "textTransform";
33629
- const encode$v = (params2, encodedAttrs = {}) => {
33699
+ const XML_NODE_NAME$o = "w:caps";
33700
+ const SD_ATTR_KEY$8 = "textTransform";
33701
+ const encode$x = (params2, encodedAttrs = {}) => {
33630
33702
  const { nodes } = params2;
33631
33703
  const node = nodes[0];
33632
33704
  if (!node) return void 0;
@@ -33638,31 +33710,31 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33638
33710
  }
33639
33711
  return {
33640
33712
  type: "attr",
33641
- xmlName: XML_NODE_NAME$m,
33642
- sdNodeOrKeyName: SD_ATTR_KEY$6,
33643
- attributes: { [SD_ATTR_KEY$6]: result }
33713
+ xmlName: XML_NODE_NAME$o,
33714
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
33715
+ attributes: { [SD_ATTR_KEY$8]: result }
33644
33716
  };
33645
33717
  };
33646
- const config$j = {
33647
- xmlName: XML_NODE_NAME$m,
33648
- sdNodeOrKeyName: SD_ATTR_KEY$6,
33718
+ const config$l = {
33719
+ xmlName: XML_NODE_NAME$o,
33720
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
33649
33721
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33650
- encode: encode$v,
33722
+ encode: encode$x,
33651
33723
  attributes: [createAttributeHandler("w:val")]
33652
33724
  };
33653
- const translator$Z = NodeTranslator.from(config$j);
33725
+ const translator$$ = NodeTranslator.from(config$l);
33654
33726
  const runPropertyTranslators = Object.freeze({
33655
- "w:b": translator$16,
33656
- "w:i": translator$15,
33657
- "w:u": translator$14,
33658
- "w:strike": translator$13,
33659
- "w:color": translator$12,
33660
- "w:highlight": translator$19,
33661
- "w:rFonts": translator$11,
33662
- "w:rStyle": translator$10,
33663
- "w:sz": translator$$,
33664
- "w:szCs": translator$_,
33665
- "w:caps": translator$Z
33727
+ "w:b": translator$18,
33728
+ "w:i": translator$17,
33729
+ "w:u": translator$16,
33730
+ "w:strike": translator$15,
33731
+ "w:color": translator$14,
33732
+ "w:highlight": translator$1b,
33733
+ "w:rFonts": translator$13,
33734
+ "w:rStyle": translator$12,
33735
+ "w:sz": translator$11,
33736
+ "w:szCs": translator$10,
33737
+ "w:caps": translator$$
33666
33738
  });
33667
33739
  const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
33668
33740
  const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
@@ -33676,9 +33748,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33676
33748
  attributes: { ...candidate.attributes || {} }
33677
33749
  };
33678
33750
  };
33679
- const XML_NODE_NAME$l = "w:rPr";
33680
- const SD_ATTR_KEY$5 = "runProperties";
33681
- const encode$u = (params2) => {
33751
+ const XML_NODE_NAME$n = "w:rPr";
33752
+ const SD_ATTR_KEY$7 = "runProperties";
33753
+ const encode$w = (params2) => {
33682
33754
  const { nodes } = params2;
33683
33755
  const node = nodes?.[0] || {};
33684
33756
  const contents = Array.isArray(node.elements) ? node.elements : [];
@@ -33712,16 +33784,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33712
33784
  attributes: runPropsArray
33713
33785
  };
33714
33786
  };
33715
- const config$i = {
33716
- xmlName: XML_NODE_NAME$l,
33717
- sdNodeOrKeyName: SD_ATTR_KEY$5,
33787
+ const config$k = {
33788
+ xmlName: XML_NODE_NAME$n,
33789
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
33718
33790
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33719
- encode: encode$u
33791
+ encode: encode$w
33720
33792
  };
33721
- const translator$Y = NodeTranslator.from(config$i);
33793
+ const translator$_ = NodeTranslator.from(config$k);
33722
33794
  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;
33723
33795
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
33724
- const collectRunProperties = (params2, rPrNode, translator2 = translator$Y) => {
33796
+ const collectRunProperties = (params2, rPrNode, translator2 = translator$_) => {
33725
33797
  if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
33726
33798
  const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
33727
33799
  let entries = [];
@@ -34194,7 +34266,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34194
34266
  }
34195
34267
  return runs;
34196
34268
  };
34197
- const XML_NODE_NAME$k = "w:hyperlink";
34269
+ const XML_NODE_NAME$m = "w:hyperlink";
34198
34270
  const SD_NODE_NAME$e = "link";
34199
34271
  const _createAttributeHandler = (xmlName, sdName) => ({
34200
34272
  xmlName,
@@ -34202,7 +34274,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34202
34274
  encode: (attributes) => attributes[xmlName],
34203
34275
  decode: (attributes) => attributes[sdName]
34204
34276
  });
34205
- const validXmlAttributes$b = [
34277
+ const validXmlAttributes$d = [
34206
34278
  _createAttributeHandler("w:anchor", "anchor"),
34207
34279
  _createAttributeHandler("w:docLocation", "docLocation"),
34208
34280
  {
@@ -34215,7 +34287,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34215
34287
  _createAttributeHandler("r:id", "rId"),
34216
34288
  _createAttributeHandler("w:tgtFrame", "target")
34217
34289
  ];
34218
- const encode$t = (params2, encodedAttrs) => {
34290
+ const encode$v = (params2, encodedAttrs) => {
34219
34291
  const { nodes, docx, nodeListHandler } = params2;
34220
34292
  const node = nodes[0];
34221
34293
  let href = _resolveHref(docx, encodedAttrs);
@@ -34249,7 +34321,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34249
34321
  }
34250
34322
  return href;
34251
34323
  };
34252
- function decode$v(params2) {
34324
+ function decode$x(params2) {
34253
34325
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
34254
34326
  const node = hyperlinkGroup[0];
34255
34327
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -34298,55 +34370,55 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34298
34370
  });
34299
34371
  return id;
34300
34372
  }
34301
- const config$h = {
34302
- xmlName: XML_NODE_NAME$k,
34373
+ const config$j = {
34374
+ xmlName: XML_NODE_NAME$m,
34303
34375
  sdNodeOrKeyName: SD_NODE_NAME$e,
34304
34376
  type: NodeTranslator.translatorTypes.NODE,
34305
- encode: encode$t,
34306
- decode: decode$v,
34307
- attributes: validXmlAttributes$b
34377
+ encode: encode$v,
34378
+ decode: decode$x,
34379
+ attributes: validXmlAttributes$d
34308
34380
  };
34309
- const translator$X = NodeTranslator.from(config$h);
34310
- const encode$s = (attributes) => {
34381
+ const translator$Z = NodeTranslator.from(config$j);
34382
+ const encode$u = (attributes) => {
34311
34383
  return attributes["w:rsidR"];
34312
34384
  };
34313
- const decode$u = (attrs) => {
34385
+ const decode$w = (attrs) => {
34314
34386
  return attrs.rsidR;
34315
34387
  };
34316
34388
  const attrConfig$a = Object.freeze({
34317
34389
  xmlName: "w:rsidR",
34318
34390
  sdName: "rsidR",
34319
- encode: encode$s,
34320
- decode: decode$u
34391
+ encode: encode$u,
34392
+ decode: decode$w
34321
34393
  });
34322
- const encode$r = (attributes) => {
34394
+ const encode$t = (attributes) => {
34323
34395
  return attributes["w:rsidRPr"];
34324
34396
  };
34325
- const decode$t = (attrs) => {
34397
+ const decode$v = (attrs) => {
34326
34398
  return attrs.rsidRPr;
34327
34399
  };
34328
34400
  const attrConfig$9 = Object.freeze({
34329
34401
  xmlName: "w:rsidRPr",
34330
34402
  sdName: "rsidRPr",
34331
- encode: encode$r,
34332
- decode: decode$t
34403
+ encode: encode$t,
34404
+ decode: decode$v
34333
34405
  });
34334
- const encode$q = (attributes) => {
34406
+ const encode$s = (attributes) => {
34335
34407
  return attributes["w:rsidDel"];
34336
34408
  };
34337
- const decode$s = (attrs) => {
34409
+ const decode$u = (attrs) => {
34338
34410
  return attrs.rsidDel;
34339
34411
  };
34340
34412
  const attrConfig$8 = Object.freeze({
34341
34413
  xmlName: "w:rsidDel",
34342
34414
  sdName: "rsidDel",
34343
- encode: encode$q,
34344
- decode: decode$s
34415
+ encode: encode$s,
34416
+ decode: decode$u
34345
34417
  });
34346
- const validXmlAttributes$a = [attrConfig$a, attrConfig$9, attrConfig$8];
34347
- const XML_NODE_NAME$j = "w:r";
34418
+ const validXmlAttributes$c = [attrConfig$a, attrConfig$9, attrConfig$8];
34419
+ const XML_NODE_NAME$l = "w:r";
34348
34420
  const SD_KEY_NAME = "run";
34349
- const encode$p = (params2, encodedAttrs = {}) => {
34421
+ const encode$r = (params2, encodedAttrs = {}) => {
34350
34422
  const { nodes = [], nodeListHandler } = params2 || {};
34351
34423
  const runNode = nodes[0];
34352
34424
  if (!runNode) return void 0;
@@ -34394,11 +34466,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34394
34466
  }
34395
34467
  return runNodeResult;
34396
34468
  };
34397
- const decode$r = (params2, decodedAttrs = {}) => {
34469
+ const decode$t = (params2, decodedAttrs = {}) => {
34398
34470
  const { node } = params2 || {};
34399
34471
  if (!node) return void 0;
34400
34472
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
34401
- if (isLinkNode) return translator$X.decode(params2);
34473
+ if (isLinkNode) {
34474
+ const extraParams = {
34475
+ ...params2.extraParams,
34476
+ linkProcessed: true
34477
+ };
34478
+ return translator$Z.decode({ ...params2, extraParams });
34479
+ }
34402
34480
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
34403
34481
  const runAttrs = runNodeForExport.attrs || {};
34404
34482
  const runProperties = Array.isArray(runAttrs.runProperties) ? runAttrs.runProperties : [];
@@ -34453,7 +34531,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34453
34531
  runs.push(trackedClone);
34454
34532
  return;
34455
34533
  }
34456
- const runWrapper = { name: XML_NODE_NAME$j, elements: [] };
34534
+ const runWrapper = { name: XML_NODE_NAME$l, elements: [] };
34457
34535
  applyBaseRunProps(runWrapper);
34458
34536
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
34459
34537
  runWrapper.elements.push(cloneXmlNode(child));
@@ -34461,7 +34539,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34461
34539
  });
34462
34540
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
34463
34541
  if (!trackedRuns.length) {
34464
- const emptyRun = { name: XML_NODE_NAME$j, elements: [] };
34542
+ const emptyRun = { name: XML_NODE_NAME$l, elements: [] };
34465
34543
  applyBaseRunProps(emptyRun);
34466
34544
  trackedRuns.push(emptyRun);
34467
34545
  }
@@ -34475,15 +34553,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34475
34553
  }
34476
34554
  return trackedRuns;
34477
34555
  };
34478
- const config$g = {
34479
- xmlName: XML_NODE_NAME$j,
34556
+ const config$i = {
34557
+ xmlName: XML_NODE_NAME$l,
34480
34558
  sdNodeOrKeyName: SD_KEY_NAME,
34481
34559
  type: NodeTranslator.translatorTypes.NODE,
34482
- encode: encode$p,
34483
- decode: decode$r,
34484
- attributes: validXmlAttributes$a
34560
+ encode: encode$r,
34561
+ decode: decode$t,
34562
+ attributes: validXmlAttributes$c
34485
34563
  };
34486
- const translator$W = NodeTranslator.from(config$g);
34564
+ const translator$Y = NodeTranslator.from(config$i);
34487
34565
  function preProcessVerticalMergeCells(table, { editorSchema }) {
34488
34566
  if (!table || !Array.isArray(table.content)) {
34489
34567
  return table;
@@ -34524,13 +34602,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34524
34602
  }
34525
34603
  return table;
34526
34604
  }
34527
- const translator$V = NodeTranslator.from({
34605
+ const translator$X = NodeTranslator.from({
34528
34606
  xmlName: "w:cantSplit",
34529
34607
  sdNodeOrKeyName: "cantSplit",
34530
34608
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
34531
34609
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
34532
34610
  });
34533
- const translator$U = NodeTranslator.from({
34611
+ const translator$W = NodeTranslator.from({
34534
34612
  xmlName: "w:cnfStyle",
34535
34613
  sdNodeOrKeyName: "cnfStyle",
34536
34614
  attributes: [
@@ -34556,8 +34634,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34556
34634
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34557
34635
  }
34558
34636
  });
34559
- const translator$T = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
34560
- const translator$S = NodeTranslator.from(
34637
+ const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
34638
+ const translator$U = NodeTranslator.from(
34561
34639
  createSingleAttrPropertyHandler(
34562
34640
  "w:gridAfter",
34563
34641
  null,
@@ -34566,7 +34644,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34566
34644
  (v2) => integerToString(v2)
34567
34645
  )
34568
34646
  );
34569
- const translator$R = NodeTranslator.from(
34647
+ const translator$T = NodeTranslator.from(
34570
34648
  createSingleAttrPropertyHandler(
34571
34649
  "w:gridBefore",
34572
34650
  null,
@@ -34575,21 +34653,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34575
34653
  (v2) => integerToString(v2)
34576
34654
  )
34577
34655
  );
34578
- const translator$Q = NodeTranslator.from({
34656
+ const translator$S = NodeTranslator.from({
34579
34657
  xmlName: "w:hidden",
34580
34658
  sdNodeOrKeyName: "hidden",
34581
34659
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
34582
34660
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
34583
34661
  });
34584
- const translator$P = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
34585
- const translator$O = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
34586
- const translator$N = NodeTranslator.from({
34662
+ const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
34663
+ const translator$Q = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
34664
+ const translator$P = NodeTranslator.from({
34587
34665
  xmlName: "w:tblHeader",
34588
34666
  sdNodeOrKeyName: "repeatHeader",
34589
34667
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
34590
34668
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
34591
34669
  });
34592
- const translator$M = NodeTranslator.from({
34670
+ const translator$O = NodeTranslator.from({
34593
34671
  xmlName: "w:trHeight",
34594
34672
  sdNodeOrKeyName: "rowHeight",
34595
34673
  encode: ({ nodes }) => {
@@ -34616,11 +34694,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34616
34694
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
34617
34695
  }
34618
34696
  });
34619
- const translator$L = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
34620
- const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
34621
- const XML_NODE_NAME$i = "w:trPr";
34622
- const SD_ATTR_KEY$4 = "tableRowProperties";
34623
- const encode$o = (params2) => {
34697
+ const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
34698
+ const translator$M = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
34699
+ const XML_NODE_NAME$k = "w:trPr";
34700
+ const SD_ATTR_KEY$6 = "tableRowProperties";
34701
+ const encode$q = (params2) => {
34624
34702
  const { nodes } = params2;
34625
34703
  const node = nodes[0];
34626
34704
  let attributes = {
@@ -34634,12 +34712,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34634
34712
  };
34635
34713
  return {
34636
34714
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
34637
- xmlName: XML_NODE_NAME$i,
34638
- sdNodeOrKeyName: SD_ATTR_KEY$4,
34715
+ xmlName: XML_NODE_NAME$k,
34716
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
34639
34717
  attributes
34640
34718
  };
34641
34719
  };
34642
- const decode$q = (params2) => {
34720
+ const decode$s = (params2) => {
34643
34721
  const { tableRowProperties = {} } = params2.node.attrs || {};
34644
34722
  const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
34645
34723
  const newNode = {
@@ -34651,6 +34729,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34651
34729
  return newNode;
34652
34730
  };
34653
34731
  const propertyTranslators$3 = [
34732
+ translator$X,
34733
+ translator$W,
34654
34734
  translator$V,
34655
34735
  translator$U,
34656
34736
  translator$T,
@@ -34660,9 +34740,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34660
34740
  translator$P,
34661
34741
  translator$O,
34662
34742
  translator$N,
34663
- translator$M,
34664
- translator$L,
34665
- translator$K
34743
+ translator$M
34666
34744
  ];
34667
34745
  const propertyTranslatorsByXmlName$2 = {};
34668
34746
  propertyTranslators$3.forEach((translator2) => {
@@ -34672,25 +34750,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34672
34750
  propertyTranslators$3.forEach((translator2) => {
34673
34751
  propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
34674
34752
  });
34675
- const config$f = {
34676
- xmlName: XML_NODE_NAME$i,
34677
- sdNodeOrKeyName: SD_ATTR_KEY$4,
34753
+ const config$h = {
34754
+ xmlName: XML_NODE_NAME$k,
34755
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
34678
34756
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
34679
- encode: encode$o,
34680
- decode: decode$q
34757
+ encode: encode$q,
34758
+ decode: decode$s
34681
34759
  };
34682
- const translator$J = NodeTranslator.from(config$f);
34683
- const XML_NODE_NAME$h = "w:tr";
34760
+ const translator$L = NodeTranslator.from(config$h);
34761
+ const XML_NODE_NAME$j = "w:tr";
34684
34762
  const SD_NODE_NAME$d = "tableRow";
34685
- const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
34763
+ const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
34686
34764
  (xmlName) => createAttributeHandler(xmlName)
34687
34765
  );
34688
- const encode$n = (params2, encodedAttrs) => {
34766
+ const encode$p = (params2, encodedAttrs) => {
34689
34767
  const { row } = params2.extraParams;
34690
34768
  let tableRowProperties = {};
34691
34769
  const tPr = row.elements.find((el) => el.name === "w:trPr");
34692
34770
  if (tPr) {
34693
- ({ attributes: tableRowProperties } = translator$J.encode({
34771
+ ({ attributes: tableRowProperties } = translator$L.encode({
34694
34772
  ...params2,
34695
34773
  nodes: [tPr]
34696
34774
  }));
@@ -34703,7 +34781,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34703
34781
  let currentColumnIndex = 0;
34704
34782
  const content = cellNodes?.map((n) => {
34705
34783
  let columnWidth = gridColumnWidths?.[currentColumnIndex] || null;
34706
- const result = translator$a.encode({
34784
+ const result = translator$c.encode({
34707
34785
  ...params2,
34708
34786
  extraParams: {
34709
34787
  ...params2.extraParams,
@@ -34725,7 +34803,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34725
34803
  };
34726
34804
  return newNode;
34727
34805
  };
34728
- const decode$p = (params2, decodedAttrs) => {
34806
+ const decode$r = (params2, decodedAttrs) => {
34729
34807
  const { node } = params2;
34730
34808
  const elements = translateChildNodes(params2);
34731
34809
  if (node.attrs?.tableRowProperties) {
@@ -34737,7 +34815,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34737
34815
  }
34738
34816
  }
34739
34817
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
34740
- const trPr = translator$J.decode({
34818
+ const trPr = translator$L.decode({
34741
34819
  ...params2,
34742
34820
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
34743
34821
  });
@@ -34749,22 +34827,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34749
34827
  elements
34750
34828
  };
34751
34829
  };
34752
- const config$e = {
34753
- xmlName: XML_NODE_NAME$h,
34830
+ const config$g = {
34831
+ xmlName: XML_NODE_NAME$j,
34754
34832
  sdNodeOrKeyName: SD_NODE_NAME$d,
34755
34833
  type: NodeTranslator.translatorTypes.NODE,
34756
- encode: encode$n,
34757
- decode: decode$p,
34758
- attributes: validXmlAttributes$9
34834
+ encode: encode$p,
34835
+ decode: decode$r,
34836
+ attributes: validXmlAttributes$b
34759
34837
  };
34760
- const translator$I = NodeTranslator.from(config$e);
34761
- const translator$H = NodeTranslator.from({
34838
+ const translator$K = NodeTranslator.from(config$g);
34839
+ const translator$J = NodeTranslator.from({
34762
34840
  xmlName: "w:bidiVisual",
34763
34841
  sdNodeOrKeyName: "rightToLeft",
34764
34842
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
34765
34843
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
34766
34844
  });
34767
- const translator$G = NodeTranslator.from({
34845
+ const translator$I = NodeTranslator.from({
34768
34846
  xmlName: "w:shd",
34769
34847
  sdNodeOrKeyName: "shading",
34770
34848
  attributes: [
@@ -34786,11 +34864,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34786
34864
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34787
34865
  }
34788
34866
  });
34789
- const translator$F = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
34790
- const translator$E = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
34791
- const translator$D = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
34792
- const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
34793
- const translator$B = NodeTranslator.from({
34867
+ const translator$H = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
34868
+ const translator$G = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
34869
+ const translator$F = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
34870
+ const translator$E = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
34871
+ const translator$D = NodeTranslator.from({
34794
34872
  xmlName: "w:tblLook",
34795
34873
  sdNodeOrKeyName: "tblLook",
34796
34874
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -34802,16 +34880,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34802
34880
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34803
34881
  }
34804
34882
  });
34805
- const translator$A = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
34806
- const translator$z = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
34807
- const translator$y = NodeTranslator.from(
34883
+ const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
34884
+ const translator$B = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
34885
+ const translator$A = NodeTranslator.from(
34808
34886
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
34809
34887
  );
34810
- const translator$x = NodeTranslator.from(
34888
+ const translator$z = NodeTranslator.from(
34811
34889
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
34812
34890
  );
34813
- const translator$w = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
34814
- const translator$v = NodeTranslator.from({
34891
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
34892
+ const translator$x = NodeTranslator.from({
34815
34893
  xmlName: "w:tblpPr",
34816
34894
  sdNodeOrKeyName: "floatingTableProperties",
34817
34895
  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))),
@@ -34823,29 +34901,29 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34823
34901
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34824
34902
  }
34825
34903
  });
34826
- const translator$u = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
34827
- const translator$t = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
34828
- const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:end"));
34829
- const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
34830
- const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
34831
- const translator$p = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
34832
- const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:left"));
34833
- const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
34834
- const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:right"));
34835
- const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
34836
- const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:start"));
34837
- const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
34838
- const translator$i = NodeTranslator.from(createBorderPropertyHandler("w:top"));
34839
- const translator$h = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
34840
- const XML_NODE_NAME$g = "w:tblBorders";
34841
- const SD_ATTR_KEY$3 = "borders";
34842
- const encode$m = (params2) => {
34904
+ const translator$w = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
34905
+ const translator$v = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
34906
+ const translator$u = NodeTranslator.from(createBorderPropertyHandler("w:end"));
34907
+ const translator$t = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
34908
+ const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
34909
+ const translator$r = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
34910
+ const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:left"));
34911
+ const translator$p = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
34912
+ const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:right"));
34913
+ const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
34914
+ const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:start"));
34915
+ const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
34916
+ const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:top"));
34917
+ const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
34918
+ const XML_NODE_NAME$i = "w:tblBorders";
34919
+ const SD_ATTR_KEY$5 = "borders";
34920
+ const encode$o = (params2) => {
34843
34921
  const { nodes } = params2;
34844
34922
  const node = nodes[0];
34845
34923
  const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
34846
34924
  return Object.keys(attributes).length > 0 ? attributes : void 0;
34847
34925
  };
34848
- const decode$o = (params2) => {
34926
+ const decode$q = (params2) => {
34849
34927
  const { borders = {} } = params2.node.attrs || {};
34850
34928
  const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
34851
34929
  const newNode = {
@@ -34857,14 +34935,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34857
34935
  return newNode;
34858
34936
  };
34859
34937
  const propertyTranslators$2 = [
34938
+ translator$w,
34860
34939
  translator$u,
34861
34940
  translator$s,
34941
+ translator$r,
34862
34942
  translator$q,
34863
- translator$p,
34864
34943
  translator$o,
34865
34944
  translator$m,
34866
- translator$k,
34867
- translator$i
34945
+ translator$k
34868
34946
  ];
34869
34947
  const tblBordersTranslatorsByXmlName = {};
34870
34948
  const tblBordersTranslatorsBySdName = {};
@@ -34872,27 +34950,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34872
34950
  tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
34873
34951
  tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
34874
34952
  });
34875
- const translator$g = NodeTranslator.from({
34876
- xmlName: XML_NODE_NAME$g,
34877
- sdNodeOrKeyName: SD_ATTR_KEY$3,
34953
+ const translator$i = NodeTranslator.from({
34954
+ xmlName: XML_NODE_NAME$i,
34955
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
34878
34956
  type: NodeTranslator.translatorTypes.NODE,
34879
34957
  attributes: [],
34880
- encode: encode$m,
34881
- decode: decode$o
34958
+ encode: encode$o,
34959
+ decode: decode$q
34882
34960
  });
34883
- const XML_NODE_NAME$f = "w:tblCellMar";
34884
- const SD_ATTR_KEY$2 = "cellMargins";
34885
- const encode$l = (params2) => {
34961
+ const XML_NODE_NAME$h = "w:tblCellMar";
34962
+ const SD_ATTR_KEY$4 = "cellMargins";
34963
+ const encode$n = (params2) => {
34886
34964
  const { nodes } = params2;
34887
34965
  const node = nodes[0];
34888
34966
  const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
34889
34967
  return Object.keys(attributes).length > 0 ? attributes : void 0;
34890
34968
  };
34891
- const decode$n = (params2) => {
34969
+ const decode$p = (params2) => {
34892
34970
  const { cellMargins = {} } = params2.node.attrs || {};
34893
34971
  const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
34894
34972
  const newNode = {
34895
- name: XML_NODE_NAME$f,
34973
+ name: XML_NODE_NAME$h,
34896
34974
  type: "element",
34897
34975
  attributes: {},
34898
34976
  elements
@@ -34900,12 +34978,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34900
34978
  return newNode;
34901
34979
  };
34902
34980
  const propertyTranslators$1 = [
34981
+ translator$v,
34903
34982
  translator$t,
34904
- translator$r,
34983
+ translator$p,
34905
34984
  translator$n,
34906
34985
  translator$l,
34907
- translator$j,
34908
- translator$h
34986
+ translator$j
34909
34987
  ];
34910
34988
  const propertyTranslatorsByXmlName$1 = {};
34911
34989
  const propertyTranslatorsBySdName$1 = {};
@@ -34913,27 +34991,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34913
34991
  propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
34914
34992
  propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
34915
34993
  });
34916
- const translator$f = NodeTranslator.from({
34917
- xmlName: XML_NODE_NAME$f,
34918
- sdNodeOrKeyName: SD_ATTR_KEY$2,
34994
+ const translator$h = NodeTranslator.from({
34995
+ xmlName: XML_NODE_NAME$h,
34996
+ sdNodeOrKeyName: SD_ATTR_KEY$4,
34919
34997
  type: NodeTranslator.translatorTypes.NODE,
34920
34998
  attributes: [],
34921
- encode: encode$l,
34922
- decode: decode$n
34999
+ encode: encode$n,
35000
+ decode: decode$p
34923
35001
  });
34924
- const XML_NODE_NAME$e = "w:tblPr";
34925
- const SD_ATTR_KEY$1 = "tableProperties";
34926
- const encode$k = (params2) => {
35002
+ const XML_NODE_NAME$g = "w:tblPr";
35003
+ const SD_ATTR_KEY$3 = "tableProperties";
35004
+ const encode$m = (params2) => {
34927
35005
  const { nodes } = params2;
34928
35006
  const node = nodes[0];
34929
35007
  const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
34930
35008
  return {
34931
- xmlName: XML_NODE_NAME$e,
34932
- sdNodeOrKeyName: SD_ATTR_KEY$1,
35009
+ xmlName: XML_NODE_NAME$g,
35010
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
34933
35011
  attributes
34934
35012
  };
34935
35013
  };
34936
- const decode$m = (params2) => {
35014
+ const decode$o = (params2) => {
34937
35015
  const { tableProperties = {} } = params2.node.attrs || {};
34938
35016
  const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
34939
35017
  const newNode = {
@@ -34945,11 +35023,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34945
35023
  return newNode;
34946
35024
  };
34947
35025
  const propertyTranslators = [
35026
+ translator$J,
35027
+ translator$R,
35028
+ translator$I,
34948
35029
  translator$H,
34949
- translator$P,
35030
+ translator$Q,
34950
35031
  translator$G,
34951
35032
  translator$F,
34952
- translator$O,
34953
35033
  translator$E,
34954
35034
  translator$D,
34955
35035
  translator$C,
@@ -34958,10 +35038,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34958
35038
  translator$z,
34959
35039
  translator$y,
34960
35040
  translator$x,
34961
- translator$w,
34962
- translator$v,
34963
- translator$g,
34964
- translator$f
35041
+ translator$i,
35042
+ translator$h
34965
35043
  ];
34966
35044
  const propertyTranslatorsByXmlName = {};
34967
35045
  const propertyTranslatorsBySdName = {};
@@ -34969,14 +35047,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34969
35047
  propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
34970
35048
  propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
34971
35049
  });
34972
- const config$d = {
34973
- xmlName: XML_NODE_NAME$e,
34974
- sdNodeOrKeyName: SD_ATTR_KEY$1,
34975
- encode: encode$k,
34976
- decode: decode$m
35050
+ const config$f = {
35051
+ xmlName: XML_NODE_NAME$g,
35052
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
35053
+ encode: encode$m,
35054
+ decode: decode$o
34977
35055
  };
34978
- const translator$e = NodeTranslator.from(config$d);
34979
- const translator$d = NodeTranslator.from(
35056
+ const translator$g = NodeTranslator.from(config$f);
35057
+ const translator$f = NodeTranslator.from(
34980
35058
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
34981
35059
  );
34982
35060
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -35026,20 +35104,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35026
35104
  }
35027
35105
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
35028
35106
  };
35029
- const XML_NODE_NAME$d = "w:tblGrid";
35030
- const SD_ATTR_KEY = "grid";
35107
+ const XML_NODE_NAME$f = "w:tblGrid";
35108
+ const SD_ATTR_KEY$2 = "grid";
35031
35109
  const cellMinWidth = pixelsToTwips(10);
35032
- const encode$j = (params2) => {
35110
+ const encode$l = (params2) => {
35033
35111
  const { nodes } = params2;
35034
35112
  const node = nodes[0];
35035
- const attributes = encodeProperties(node, { [translator$d.xmlName]: translator$d }, true);
35113
+ const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
35036
35114
  return {
35037
- xmlName: XML_NODE_NAME$d,
35038
- sdNodeOrKeyName: SD_ATTR_KEY,
35115
+ xmlName: XML_NODE_NAME$f,
35116
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
35039
35117
  attributes
35040
35118
  };
35041
35119
  };
35042
- const decode$l = (params2) => {
35120
+ const decode$n = (params2) => {
35043
35121
  const { grid: rawGrid } = params2.node.attrs || {};
35044
35122
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
35045
35123
  const { firstRow = {} } = params2.extraParams || {};
@@ -35058,10 +35136,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35058
35136
  numericWidth = fallbackColumnWidthTwips;
35059
35137
  }
35060
35138
  numericWidth = Math.max(numericWidth, cellMinWidth);
35061
- const decoded = translator$d.decode({
35139
+ const decoded = translator$f.decode({
35062
35140
  node: { type: (
35063
35141
  /** @type {string} */
35064
- translator$d.sdNodeOrKeyName
35142
+ translator$f.sdNodeOrKeyName
35065
35143
  ), attrs: { col: numericWidth } }
35066
35144
  });
35067
35145
  if (decoded) elements.push(decoded);
@@ -35096,19 +35174,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35096
35174
  columnIndex++;
35097
35175
  }
35098
35176
  const newNode = {
35099
- name: XML_NODE_NAME$d,
35177
+ name: XML_NODE_NAME$f,
35100
35178
  attributes: {},
35101
35179
  elements
35102
35180
  };
35103
35181
  return newNode;
35104
35182
  };
35105
- const config$c = {
35106
- xmlName: XML_NODE_NAME$d,
35107
- sdNodeOrKeyName: SD_ATTR_KEY,
35108
- encode: encode$j,
35109
- decode: decode$l
35183
+ const config$e = {
35184
+ xmlName: XML_NODE_NAME$f,
35185
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
35186
+ encode: encode$l,
35187
+ decode: decode$n
35110
35188
  };
35111
- const translator$c = NodeTranslator.from(config$c);
35189
+ const translator$e = NodeTranslator.from(config$e);
35112
35190
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
35113
35191
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
35114
35192
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -35171,19 +35249,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35171
35249
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
35172
35250
  };
35173
35251
  };
35174
- const XML_NODE_NAME$c = "w:tbl";
35252
+ const XML_NODE_NAME$e = "w:tbl";
35175
35253
  const SD_NODE_NAME$c = "table";
35176
- const encode$i = (params2, encodedAttrs) => {
35254
+ const encode$k = (params2, encodedAttrs) => {
35177
35255
  const { nodes } = params2;
35178
35256
  const node = nodes[0];
35179
35257
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
35180
35258
  if (tblPr) {
35181
- const encodedProperties = translator$e.encode({ ...params2, nodes: [tblPr] });
35259
+ const encodedProperties = translator$g.encode({ ...params2, nodes: [tblPr] });
35182
35260
  encodedAttrs["tableProperties"] = encodedProperties?.attributes || {};
35183
35261
  }
35184
35262
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
35185
35263
  if (tblGrid) {
35186
- encodedAttrs["grid"] = translator$c.encode({ ...params2, nodes: [tblGrid] }).attributes;
35264
+ encodedAttrs["grid"] = translator$e.encode({ ...params2, nodes: [tblGrid] }).attributes;
35187
35265
  }
35188
35266
  [
35189
35267
  "tableStyleId",
@@ -35250,7 +35328,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35250
35328
  }
35251
35329
  const content = [];
35252
35330
  rows.forEach((row) => {
35253
- const result = translator$I.encode({
35331
+ const result = translator$K.encode({
35254
35332
  ...params2,
35255
35333
  nodes: [row],
35256
35334
  extraParams: {
@@ -35269,13 +35347,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35269
35347
  attrs: encodedAttrs
35270
35348
  };
35271
35349
  };
35272
- const decode$k = (params2, decodedAttrs) => {
35350
+ const decode$m = (params2, decodedAttrs) => {
35273
35351
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
35274
35352
  const { node } = params2;
35275
35353
  const elements = translateChildNodes(params2);
35276
35354
  const firstRow = node.content?.find((n) => n.type === "tableRow");
35277
35355
  const properties = node.attrs.grid;
35278
- const element = translator$c.decode({
35356
+ const element = translator$e.decode({
35279
35357
  ...params2,
35280
35358
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
35281
35359
  extraParams: {
@@ -35285,7 +35363,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35285
35363
  if (element) elements.unshift(element);
35286
35364
  if (node.attrs?.tableProperties) {
35287
35365
  const properties2 = { ...node.attrs.tableProperties };
35288
- const element2 = translator$e.decode({
35366
+ const element2 = translator$g.decode({
35289
35367
  ...params2,
35290
35368
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
35291
35369
  });
@@ -35351,7 +35429,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35351
35429
  if (baseTblPr && baseTblPr.elements) {
35352
35430
  tblPr.elements.push(...baseTblPr.elements);
35353
35431
  }
35354
- const tableProperties = translator$e.encode({ ...params2, nodes: [tblPr] }).attributes;
35432
+ const tableProperties = translator$g.encode({ ...params2, nodes: [tblPr] }).attributes;
35355
35433
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
35356
35434
  if (borders) stylesToReturn.borders = borders;
35357
35435
  if (rowBorders) stylesToReturn.rowBorders = rowBorders;
@@ -35368,16 +35446,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35368
35446
  }
35369
35447
  return stylesToReturn;
35370
35448
  }
35371
- const config$b = {
35372
- xmlName: XML_NODE_NAME$c,
35449
+ const config$d = {
35450
+ xmlName: XML_NODE_NAME$e,
35373
35451
  sdNodeOrKeyName: SD_NODE_NAME$c,
35374
35452
  type: NodeTranslator.translatorTypes.NODE,
35375
- encode: encode$i,
35376
- decode: decode$k,
35453
+ encode: encode$k,
35454
+ decode: decode$m,
35377
35455
  attributes: []
35378
35456
  };
35379
- const translator$b = NodeTranslator.from(config$b);
35380
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$b);
35457
+ const translator$d = NodeTranslator.from(config$d);
35458
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$d);
35381
35459
  function getReferencedTableStyles(tblStyleTag, docx) {
35382
35460
  if (!tblStyleTag) return null;
35383
35461
  const stylesToReturn = {};
@@ -35739,10 +35817,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35739
35817
  if (left2 != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left2) } });
35740
35818
  return elements;
35741
35819
  }
35742
- const XML_NODE_NAME$b = "w:tc";
35820
+ const XML_NODE_NAME$d = "w:tc";
35743
35821
  const SD_NODE_NAME$b = "tableCell";
35744
- const validXmlAttributes$8 = [];
35745
- function encode$h(params2, encodedAttrs) {
35822
+ const validXmlAttributes$a = [];
35823
+ function encode$j(params2, encodedAttrs) {
35746
35824
  const {
35747
35825
  node,
35748
35826
  table,
@@ -35769,22 +35847,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35769
35847
  }
35770
35848
  return schemaNode;
35771
35849
  }
35772
- function decode$j(params2, decodedAttrs) {
35850
+ function decode$l(params2, decodedAttrs) {
35773
35851
  const translated = translateTableCell(params2);
35774
35852
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
35775
35853
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
35776
35854
  }
35777
35855
  return translated;
35778
35856
  }
35779
- const config$a = {
35780
- xmlName: XML_NODE_NAME$b,
35857
+ const config$c = {
35858
+ xmlName: XML_NODE_NAME$d,
35781
35859
  sdNodeOrKeyName: SD_NODE_NAME$b,
35782
35860
  type: NodeTranslator.translatorTypes.NODE,
35783
- encode: encode$h,
35784
- decode: decode$j,
35785
- attributes: validXmlAttributes$8
35861
+ encode: encode$j,
35862
+ decode: decode$l,
35863
+ attributes: validXmlAttributes$a
35786
35864
  };
35787
- const translator$a = NodeTranslator.from(config$a);
35865
+ const translator$c = NodeTranslator.from(config$c);
35788
35866
  function parseTagValueJSON(json) {
35789
35867
  if (typeof json !== "string") {
35790
35868
  return {};
@@ -36211,8 +36289,64 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36211
36289
  const vRelativeFrom = positionVTag?.attributes.relativeFrom;
36212
36290
  const alignV = positionVTag?.elements?.find((el) => el.name === "wp:align")?.elements[0]?.text;
36213
36291
  const simplePos = node.elements.find((el) => el.name === "wp:simplePos");
36214
- const wrapSquare = node.elements.find((el) => el.name === "wp:wrapSquare");
36215
- const wrapTopAndBottom = node.elements.find((el) => el.name === "wp:wrapTopAndBottom");
36292
+ const wrapNode = isAnchor ? node.elements.find(
36293
+ (el) => ["wp:wrapNone", "wp:wrapSquare", "wp:wrapThrough", "wp:wrapTight", "wp:wrapTopAndBottom"].includes(el.name)
36294
+ ) : null;
36295
+ const wrap2 = isAnchor ? { type: wrapNode?.name.slice(7) || "None", attrs: {} } : { type: "Inline" };
36296
+ switch (wrap2.type) {
36297
+ case "Square":
36298
+ wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
36299
+ if ("distB" in (wrapNode.attributes || {})) {
36300
+ wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
36301
+ }
36302
+ if ("distL" in (wrapNode.attributes || {})) {
36303
+ wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
36304
+ }
36305
+ if ("distR" in (wrapNode.attributes || {})) {
36306
+ wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
36307
+ }
36308
+ if ("distT" in (wrapNode.attributes || {})) {
36309
+ wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
36310
+ }
36311
+ break;
36312
+ case "Tight":
36313
+ case "Through": {
36314
+ if ("distL" in (wrapNode.attributes || {})) {
36315
+ wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
36316
+ }
36317
+ if ("distR" in (wrapNode.attributes || {})) {
36318
+ wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
36319
+ }
36320
+ if ("distT" in (wrapNode.attributes || {})) {
36321
+ wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
36322
+ }
36323
+ if ("distB" in (wrapNode.attributes || {})) {
36324
+ wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
36325
+ }
36326
+ if ("wrapText" in (wrapNode.attributes || {})) {
36327
+ wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
36328
+ }
36329
+ const polygon = wrapNode.elements?.find((el) => el.name === "wp:wrapPolygon");
36330
+ if (polygon) {
36331
+ wrap2.attrs.polygon = polygonToObj(polygon);
36332
+ if (polygon.attributes?.edited !== void 0) {
36333
+ wrap2.attrs.polygonEdited = polygon.attributes.edited;
36334
+ }
36335
+ }
36336
+ break;
36337
+ }
36338
+ case "TopAndBottom":
36339
+ if ("distB" in (wrapNode.attributes || {})) {
36340
+ wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
36341
+ }
36342
+ if ("distT" in (wrapNode.attributes || {})) {
36343
+ wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
36344
+ }
36345
+ break;
36346
+ case "None":
36347
+ wrap2.attrs.behindDoc = node.attributes?.behindDoc === "1";
36348
+ break;
36349
+ }
36216
36350
  const docPr = node.elements.find((el) => el.name === "wp:docPr");
36217
36351
  let anchorData = null;
36218
36352
  if (hRelativeFrom || alignH || vRelativeFrom || alignV) {
@@ -36224,7 +36358,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36224
36358
  };
36225
36359
  }
36226
36360
  const marginOffset = {
36227
- left: positionHValue,
36361
+ horizontal: positionHValue,
36228
36362
  top: positionVValue
36229
36363
  };
36230
36364
  const { attributes: blipAttributes = {} } = blip;
@@ -36263,10 +36397,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36263
36397
  y: simplePos.attributes.y
36264
36398
  }
36265
36399
  },
36266
- ...wrapSquare && {
36267
- wrapText: wrapSquare.attributes.wrapText
36268
- },
36269
- wrapTopAndBottom: !!wrapTopAndBottom,
36400
+ wrap: wrap2,
36270
36401
  originalPadding: {
36271
36402
  distT: attributes["distT"],
36272
36403
  distB: attributes["distB"],
@@ -36614,7 +36745,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36614
36745
  function translateAnchorNode(params2) {
36615
36746
  const { attrs } = params2.node;
36616
36747
  const anchorElements = [];
36617
- const wrapElements = [];
36618
36748
  if (attrs.simplePos) {
36619
36749
  anchorElements.push({
36620
36750
  name: "wp:simplePos",
@@ -36626,10 +36756,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36626
36756
  }
36627
36757
  if (attrs.anchorData) {
36628
36758
  const hElements = [];
36629
- if (attrs.marginOffset.left !== void 0) {
36759
+ if (attrs.marginOffset.horizontal !== void 0) {
36630
36760
  hElements.push({
36631
36761
  name: "wp:posOffset",
36632
- elements: [{ type: "text", text: pixelsToEmu(attrs.marginOffset.left).toString() }]
36762
+ elements: [{ type: "text", text: pixelsToEmu(attrs.marginOffset.horizontal).toString() }]
36633
36763
  });
36634
36764
  }
36635
36765
  if (attrs.anchorData.alignH) {
@@ -36662,38 +36792,110 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36662
36792
  ...vElements.length && { elements: vElements }
36663
36793
  });
36664
36794
  }
36665
- if (attrs.wrapText) {
36666
- wrapElements.push({
36667
- name: "wp:wrapSquare",
36668
- attributes: {
36669
- wrapText: attrs.wrapText
36670
- }
36671
- });
36795
+ const nodeElements = translateImageNode(params2);
36796
+ const inlineAttrs = {
36797
+ ...attrs.originalAttributes || {},
36798
+ ...nodeElements.attributes || {}
36799
+ };
36800
+ if (inlineAttrs.relativeHeight == null) {
36801
+ inlineAttrs.relativeHeight = 1;
36672
36802
  }
36673
- if (attrs.wrapTopAndBottom) {
36674
- wrapElements.push({
36675
- name: "wp:wrapTopAndBottom"
36676
- });
36803
+ if (attrs.originalAttributes?.simplePos !== void 0) {
36804
+ inlineAttrs.simplePos = attrs.originalAttributes.simplePos;
36805
+ } else if (attrs.simplePos !== void 0) {
36806
+ inlineAttrs.simplePos = attrs.simplePos;
36677
36807
  }
36678
- if (!wrapElements.length) {
36679
- wrapElements.push({
36680
- name: "wp:wrapNone"
36681
- });
36808
+ if (attrs.originalAttributes?.locked !== void 0) {
36809
+ inlineAttrs.locked = attrs.originalAttributes.locked;
36682
36810
  }
36683
- const nodeElements = translateImageNode(params2);
36684
- const inlineAttrs = {
36685
- ...nodeElements.attributes,
36686
- simplePos: attrs.originalAttributes?.simplePos,
36687
- relativeHeight: 1,
36688
- behindDoc: attrs.originalAttributes?.behindDoc,
36689
- locked: attrs.originalAttributes?.locked,
36690
- layoutInCell: attrs.originalAttributes?.layoutInCell,
36691
- allowOverlap: attrs.originalAttributes?.allowOverlap
36811
+ if (attrs.originalAttributes?.layoutInCell !== void 0) {
36812
+ inlineAttrs.layoutInCell = attrs.originalAttributes.layoutInCell;
36813
+ }
36814
+ if (attrs.originalAttributes?.allowOverlap !== void 0) {
36815
+ inlineAttrs.allowOverlap = attrs.originalAttributes.allowOverlap;
36816
+ }
36817
+ const wrapElement = {
36818
+ name: `wp:wrap${attrs.wrap?.type || "None"}`
36819
+ // Important: wp:anchor will break if no wrapping is specified. We need to use wrapNone.
36692
36820
  };
36821
+ switch (attrs.wrap?.type) {
36822
+ case "Square":
36823
+ wrapElement.attributes = {
36824
+ wrapText: attrs.wrap.attrs.wrapText
36825
+ };
36826
+ if ("distBottom" in (attrs.wrap.attrs || {})) {
36827
+ wrapElement.attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
36828
+ }
36829
+ if ("distLeft" in (attrs.wrap.attrs || {})) {
36830
+ wrapElement.attributes.distL = pixelsToEmu(attrs.wrap.attrs.distLeft);
36831
+ }
36832
+ if ("distRight" in (attrs.wrap.attrs || {})) {
36833
+ wrapElement.attributes.distR = pixelsToEmu(attrs.wrap.attrs.distRight);
36834
+ }
36835
+ if ("distTop" in (attrs.wrap.attrs || {})) {
36836
+ wrapElement.attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
36837
+ }
36838
+ break;
36839
+ case "TopAndBottom": {
36840
+ const attributes = {};
36841
+ let hasKeys = false;
36842
+ if ("distBottom" in (attrs.wrap.attrs || {})) {
36843
+ attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
36844
+ hasKeys = true;
36845
+ }
36846
+ if ("distTop" in (attrs.wrap.attrs || {})) {
36847
+ attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
36848
+ hasKeys = true;
36849
+ }
36850
+ if (hasKeys) {
36851
+ wrapElement.attributes = attributes;
36852
+ }
36853
+ break;
36854
+ }
36855
+ case "Through":
36856
+ case "Tight": {
36857
+ const attributes = {};
36858
+ if ("distLeft" in (attrs.wrap.attrs || {})) {
36859
+ attributes.distL = pixelsToEmu(attrs.wrap.attrs.distLeft);
36860
+ }
36861
+ if ("distRight" in (attrs.wrap.attrs || {})) {
36862
+ attributes.distR = pixelsToEmu(attrs.wrap.attrs.distRight);
36863
+ }
36864
+ if ("distTop" in (attrs.wrap.attrs || {})) {
36865
+ attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
36866
+ }
36867
+ if ("distBottom" in (attrs.wrap.attrs || {})) {
36868
+ attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
36869
+ }
36870
+ const wrapText = attrs.wrap.attrs?.wrapText || "bothSides";
36871
+ {
36872
+ attributes.wrapText = wrapText;
36873
+ }
36874
+ if (Object.keys(attributes).length) {
36875
+ wrapElement.attributes = attributes;
36876
+ }
36877
+ if (attrs.wrap.attrs?.polygon) {
36878
+ const polygonNode = objToPolygon(attrs.wrap.attrs.polygon);
36879
+ if (polygonNode) {
36880
+ if (attrs.wrap.attrs?.polygonEdited !== void 0) {
36881
+ polygonNode.attributes = {
36882
+ ...polygonNode.attributes || {},
36883
+ edited: String(attrs.wrap.attrs.polygonEdited)
36884
+ };
36885
+ }
36886
+ wrapElement.elements = [polygonNode];
36887
+ }
36888
+ }
36889
+ break;
36890
+ }
36891
+ case "None":
36892
+ inlineAttrs.behindDoc = attrs.wrap.attrs?.behindDoc ? "1" : "0";
36893
+ break;
36894
+ }
36693
36895
  const effectIndex = nodeElements.elements.findIndex((el) => el.name === "wp:effectExtent");
36694
36896
  const elementsWithWrap = [
36695
36897
  ...nodeElements.elements.slice(0, effectIndex + 1),
36696
- ...wrapElements,
36898
+ wrapElement,
36697
36899
  ...nodeElements.elements.slice(effectIndex + 1)
36698
36900
  ];
36699
36901
  return {
@@ -36702,32 +36904,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36702
36904
  elements: [...anchorElements, ...elementsWithWrap]
36703
36905
  };
36704
36906
  }
36705
- const XML_NODE_NAME$a = "wp:anchor";
36907
+ const XML_NODE_NAME$c = "wp:anchor";
36706
36908
  const SD_NODE_NAME$a = ["image"];
36707
- const validXmlAttributes$7 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36708
- function encode$g(params2) {
36909
+ const validXmlAttributes$9 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36910
+ function encode$i(params2) {
36709
36911
  const { node } = params2.extraParams;
36710
36912
  if (!node || !node.type) {
36711
36913
  return null;
36712
36914
  }
36713
36915
  return handleAnchorNode(params2);
36714
36916
  }
36715
- function decode$i(params2) {
36917
+ function decode$k(params2) {
36716
36918
  const { node } = params2;
36717
36919
  if (!node || !node.type) {
36718
36920
  return null;
36719
36921
  }
36720
36922
  return translateAnchorNode(params2);
36721
36923
  }
36722
- const config$9 = {
36723
- xmlName: XML_NODE_NAME$a,
36924
+ const config$b = {
36925
+ xmlName: XML_NODE_NAME$c,
36724
36926
  sdNodeOrKeyName: SD_NODE_NAME$a,
36725
36927
  type: NodeTranslator.translatorTypes.NODE,
36726
- encode: encode$g,
36727
- decode: decode$i,
36728
- attributes: validXmlAttributes$7
36928
+ encode: encode$i,
36929
+ decode: decode$k,
36930
+ attributes: validXmlAttributes$9
36729
36931
  };
36730
- const translator$9 = NodeTranslator.from(config$9);
36932
+ const translator$b = NodeTranslator.from(config$b);
36731
36933
  function handleInlineNode(params2) {
36732
36934
  const { node } = params2.extraParams;
36733
36935
  if (node.name !== "wp:inline") {
@@ -36743,41 +36945,41 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36743
36945
  elements: nodeElements.elements
36744
36946
  };
36745
36947
  }
36746
- const XML_NODE_NAME$9 = "wp:inline";
36948
+ const XML_NODE_NAME$b = "wp:inline";
36747
36949
  const SD_NODE_NAME$9 = ["image"];
36748
- const validXmlAttributes$6 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36749
- function encode$f(params2) {
36950
+ const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36951
+ function encode$h(params2) {
36750
36952
  const { node } = params2.extraParams;
36751
36953
  if (!node || !node.type) {
36752
36954
  return null;
36753
36955
  }
36754
36956
  return handleInlineNode(params2);
36755
36957
  }
36756
- function decode$h(params2) {
36958
+ function decode$j(params2) {
36757
36959
  const { node } = params2;
36758
36960
  if (!node || !node.type) {
36759
36961
  return null;
36760
36962
  }
36761
36963
  return translateInlineNode(params2);
36762
36964
  }
36763
- const config$8 = {
36764
- xmlName: XML_NODE_NAME$9,
36965
+ const config$a = {
36966
+ xmlName: XML_NODE_NAME$b,
36765
36967
  sdNodeOrKeyName: SD_NODE_NAME$9,
36766
36968
  type: NodeTranslator.translatorTypes.NODE,
36767
- encode: encode$f,
36768
- decode: decode$h,
36769
- attributes: validXmlAttributes$6
36969
+ encode: encode$h,
36970
+ decode: decode$j,
36971
+ attributes: validXmlAttributes$8
36770
36972
  };
36771
- const translator$8 = NodeTranslator.from(config$8);
36772
- const XML_NODE_NAME$8 = "w:drawing";
36973
+ const translator$a = NodeTranslator.from(config$a);
36974
+ const XML_NODE_NAME$a = "w:drawing";
36773
36975
  const SD_NODE_NAME$8 = [];
36774
- const validXmlAttributes$5 = [];
36775
- function encode$e(params2) {
36976
+ const validXmlAttributes$7 = [];
36977
+ function encode$g(params2) {
36776
36978
  const nodes = params2.nodes;
36777
36979
  const node = nodes[0];
36778
36980
  const translatorByChildName = {
36779
- "wp:anchor": translator$9,
36780
- "wp:inline": translator$8
36981
+ "wp:anchor": translator$b,
36982
+ "wp:inline": translator$a
36781
36983
  };
36782
36984
  return node.elements.reduce((acc, child) => {
36783
36985
  if (acc) return acc;
@@ -36786,12 +36988,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36786
36988
  return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
36787
36989
  }, null);
36788
36990
  }
36789
- function decode$g(params2) {
36991
+ function decode$i(params2) {
36790
36992
  const { node } = params2;
36791
36993
  if (!node || !node.type) {
36792
36994
  return null;
36793
36995
  }
36794
- const childTranslator = node.attrs.isAnchor ? translator$9 : translator$8;
36996
+ const childTranslator = node.attrs.isAnchor ? translator$b : translator$a;
36795
36997
  const resultNode = childTranslator.decode(params2);
36796
36998
  return wrapTextInRun(
36797
36999
  {
@@ -36801,15 +37003,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36801
37003
  []
36802
37004
  );
36803
37005
  }
36804
- const config$7 = {
36805
- xmlName: XML_NODE_NAME$8,
37006
+ const config$9 = {
37007
+ xmlName: XML_NODE_NAME$a,
36806
37008
  sdNodeOrKeyName: SD_NODE_NAME$8,
36807
37009
  type: NodeTranslator.translatorTypes.NODE,
36808
- encode: encode$e,
36809
- decode: decode$g,
36810
- attributes: validXmlAttributes$5
37010
+ encode: encode$g,
37011
+ decode: decode$i,
37012
+ attributes: validXmlAttributes$7
36811
37013
  };
36812
- const translator$7 = NodeTranslator.from(config$7);
37014
+ const translator$9 = NodeTranslator.from(config$9);
36813
37015
  class CommandService {
36814
37016
  /**
36815
37017
  * @param {import('./commands/types/index.js').CommandServiceOptions} props
@@ -38157,7 +38359,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38157
38359
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
38158
38360
  }
38159
38361
  function prepareImageAnnotation(params2, imageSize) {
38160
- return translator$7.decode({
38362
+ return translator$9.decode({
38161
38363
  ...params2,
38162
38364
  imageSize
38163
38365
  });
@@ -38472,10 +38674,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38472
38674
  };
38473
38675
  return result;
38474
38676
  }
38475
- const XML_NODE_NAME$7 = "w:sdt";
38677
+ const XML_NODE_NAME$9 = "w:sdt";
38476
38678
  const SD_NODE_NAME$7 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
38477
- const validXmlAttributes$4 = [];
38478
- function encode$d(params2) {
38679
+ const validXmlAttributes$6 = [];
38680
+ function encode$f(params2) {
38479
38681
  const nodes = params2.nodes;
38480
38682
  const node = nodes[0];
38481
38683
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -38485,7 +38687,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38485
38687
  const result = handler2(params2);
38486
38688
  return result;
38487
38689
  }
38488
- function decode$f(params2) {
38690
+ function decode$h(params2) {
38489
38691
  const { node } = params2;
38490
38692
  if (!node || !node.type) {
38491
38693
  return null;
@@ -38503,85 +38705,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38503
38705
  const result = decoder();
38504
38706
  return result;
38505
38707
  }
38506
- const config$6 = {
38507
- xmlName: XML_NODE_NAME$7,
38708
+ const config$8 = {
38709
+ xmlName: XML_NODE_NAME$9,
38508
38710
  sdNodeOrKeyName: SD_NODE_NAME$7,
38509
38711
  type: NodeTranslator.translatorTypes.NODE,
38510
- encode: encode$d,
38511
- decode: decode$f,
38512
- attributes: validXmlAttributes$4
38712
+ encode: encode$f,
38713
+ decode: decode$h,
38714
+ attributes: validXmlAttributes$6
38513
38715
  };
38514
- const translator$6 = NodeTranslator.from(config$6);
38515
- const encode$c = (attributes) => {
38716
+ const translator$8 = NodeTranslator.from(config$8);
38717
+ const encode$e = (attributes) => {
38516
38718
  return attributes["w:id"];
38517
38719
  };
38518
- const decode$e = (attrs) => {
38720
+ const decode$g = (attrs) => {
38519
38721
  return attrs.id;
38520
38722
  };
38521
38723
  const attrConfig$7 = Object.freeze({
38522
38724
  xmlName: "w:id",
38523
38725
  sdName: "id",
38524
- encode: encode$c,
38525
- decode: decode$e
38726
+ encode: encode$e,
38727
+ decode: decode$g
38526
38728
  });
38527
- const encode$b = (attributes) => {
38729
+ const encode$d = (attributes) => {
38528
38730
  return attributes["w:name"];
38529
38731
  };
38530
- const decode$d = (attrs) => {
38732
+ const decode$f = (attrs) => {
38531
38733
  return attrs.name;
38532
38734
  };
38533
38735
  const attrConfig$6 = Object.freeze({
38534
38736
  xmlName: "w:name",
38535
38737
  sdName: "name",
38536
- encode: encode$b,
38537
- decode: decode$d
38738
+ encode: encode$d,
38739
+ decode: decode$f
38538
38740
  });
38539
- const encode$a = (attributes) => {
38741
+ const encode$c = (attributes) => {
38540
38742
  return attributes["w:colFirst"];
38541
38743
  };
38542
- const decode$c = (attrs) => {
38744
+ const decode$e = (attrs) => {
38543
38745
  return attrs.colFirst;
38544
38746
  };
38545
38747
  const attrConfig$5 = Object.freeze({
38546
38748
  xmlName: "w:colFirst",
38547
38749
  sdName: "colFirst",
38548
- encode: encode$a,
38549
- decode: decode$c
38750
+ encode: encode$c,
38751
+ decode: decode$e
38550
38752
  });
38551
- const encode$9 = (attributes) => {
38753
+ const encode$b = (attributes) => {
38552
38754
  return attributes["w:colLast"];
38553
38755
  };
38554
- const decode$b = (attrs) => {
38756
+ const decode$d = (attrs) => {
38555
38757
  return attrs.colLast;
38556
38758
  };
38557
38759
  const attrConfig$4 = Object.freeze({
38558
38760
  xmlName: "w:colLast",
38559
38761
  sdName: "colLast",
38560
- encode: encode$9,
38561
- decode: decode$b
38762
+ encode: encode$b,
38763
+ decode: decode$d
38562
38764
  });
38563
- const encode$8 = (attributes) => {
38765
+ const encode$a = (attributes) => {
38564
38766
  return attributes["w:displacedByCustomXml"];
38565
38767
  };
38566
- const decode$a = (attrs) => {
38768
+ const decode$c = (attrs) => {
38567
38769
  return attrs.displacedByCustomXml;
38568
38770
  };
38569
38771
  const attrConfig$3 = Object.freeze({
38570
38772
  xmlName: "w:displacedByCustomXml",
38571
38773
  sdName: "displacedByCustomXml",
38572
- encode: encode$8,
38573
- decode: decode$a
38774
+ encode: encode$a,
38775
+ decode: decode$c
38574
38776
  });
38575
- const validXmlAttributes$3 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
38576
- const XML_NODE_NAME$6 = "w:bookmarkStart";
38777
+ const validXmlAttributes$5 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
38778
+ const XML_NODE_NAME$8 = "w:bookmarkStart";
38577
38779
  const SD_NODE_NAME$6 = "bookmarkStart";
38578
- const encode$7 = (params2, encodedAttrs = {}) => {
38780
+ const encode$9 = (params2, encodedAttrs = {}) => {
38579
38781
  return {
38580
38782
  type: "bookmarkStart",
38581
38783
  attrs: encodedAttrs
38582
38784
  };
38583
38785
  };
38584
- const decode$9 = (params2, decodedAttrs = {}) => {
38786
+ const decode$b = (params2, decodedAttrs = {}) => {
38585
38787
  const result = {
38586
38788
  name: "w:bookmarkStart",
38587
38789
  elements: []
@@ -38591,49 +38793,49 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38591
38793
  }
38592
38794
  return result;
38593
38795
  };
38594
- const config$5 = {
38595
- xmlName: XML_NODE_NAME$6,
38796
+ const config$7 = {
38797
+ xmlName: XML_NODE_NAME$8,
38596
38798
  sdNodeOrKeyName: SD_NODE_NAME$6,
38597
38799
  type: NodeTranslator.translatorTypes.NODE,
38598
- encode: encode$7,
38599
- decode: decode$9,
38600
- attributes: validXmlAttributes$3
38800
+ encode: encode$9,
38801
+ decode: decode$b,
38802
+ attributes: validXmlAttributes$5
38601
38803
  };
38602
- const translator$5 = NodeTranslator.from(config$5);
38603
- const encode$6 = (attributes) => {
38804
+ const translator$7 = NodeTranslator.from(config$7);
38805
+ const encode$8 = (attributes) => {
38604
38806
  return attributes["w:id"];
38605
38807
  };
38606
- const decode$8 = (attrs) => {
38808
+ const decode$a = (attrs) => {
38607
38809
  return attrs.id;
38608
38810
  };
38609
38811
  const attrConfig$2 = Object.freeze({
38610
38812
  xmlName: "w:id",
38611
38813
  sdName: "id",
38612
- encode: encode$6,
38613
- decode: decode$8
38814
+ encode: encode$8,
38815
+ decode: decode$a
38614
38816
  });
38615
- const encode$5 = (attributes) => {
38817
+ const encode$7 = (attributes) => {
38616
38818
  return attributes["w:displacedByCustomXml"];
38617
38819
  };
38618
- const decode$7 = (attrs) => {
38820
+ const decode$9 = (attrs) => {
38619
38821
  return attrs.displacedByCustomXml;
38620
38822
  };
38621
38823
  const attrConfig$1 = Object.freeze({
38622
38824
  xmlName: "w:displacedByCustomXml",
38623
38825
  sdName: "displacedByCustomXml",
38624
- encode: encode$5,
38625
- decode: decode$7
38826
+ encode: encode$7,
38827
+ decode: decode$9
38626
38828
  });
38627
- const validXmlAttributes$2 = [attrConfig$2, attrConfig$1];
38628
- const XML_NODE_NAME$5 = "w:bookmarkEnd";
38829
+ const validXmlAttributes$4 = [attrConfig$2, attrConfig$1];
38830
+ const XML_NODE_NAME$7 = "w:bookmarkEnd";
38629
38831
  const SD_NODE_NAME$5 = "bookmarkEnd";
38630
- const encode$4 = (params2, encodedAttrs = {}) => {
38832
+ const encode$6 = (params2, encodedAttrs = {}) => {
38631
38833
  return {
38632
38834
  type: "bookmarkEnd",
38633
38835
  attrs: encodedAttrs
38634
38836
  };
38635
38837
  };
38636
- const decode$6 = (params2, decodedAttrs = {}) => {
38838
+ const decode$8 = (params2, decodedAttrs = {}) => {
38637
38839
  const result = {
38638
38840
  name: "w:bookmarkEnd",
38639
38841
  elements: []
@@ -38643,27 +38845,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38643
38845
  }
38644
38846
  return result;
38645
38847
  };
38646
- const config$4 = {
38647
- xmlName: XML_NODE_NAME$5,
38848
+ const config$6 = {
38849
+ xmlName: XML_NODE_NAME$7,
38648
38850
  sdNodeOrKeyName: SD_NODE_NAME$5,
38649
38851
  type: NodeTranslator.translatorTypes.NODE,
38650
- encode: encode$4,
38651
- decode: decode$6,
38652
- attributes: validXmlAttributes$2
38852
+ encode: encode$6,
38853
+ decode: decode$8,
38854
+ attributes: validXmlAttributes$4
38653
38855
  };
38654
- const translator$4 = NodeTranslator.from(config$4);
38655
- const decode$5 = (attrs) => attrs?.["w:id"];
38856
+ const translator$6 = NodeTranslator.from(config$6);
38857
+ const decode$7 = (attrs) => attrs?.["w:id"];
38656
38858
  const attrConfig = Object.freeze({
38657
38859
  xmlName: "w:id",
38658
38860
  sdName: "w:id",
38659
38861
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
38660
38862
  encode: () => {
38661
38863
  },
38662
- decode: decode$5
38864
+ decode: decode$7
38663
38865
  });
38664
- const XML_NODE_NAME$4 = "w:commentRange";
38866
+ const XML_NODE_NAME$6 = "w:commentRange";
38665
38867
  const SD_NODE_NAME$4 = "commentRange";
38666
- const decode$4 = (params2) => {
38868
+ const decode$6 = (params2) => {
38667
38869
  const { node, comments, commentsExportType, exportedCommentDefs } = params2;
38668
38870
  if (!node) return;
38669
38871
  if (!comments) return;
@@ -38706,19 +38908,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38706
38908
  };
38707
38909
  };
38708
38910
  const getConfig = (type2) => ({
38709
- xmlName: `${XML_NODE_NAME$4}${type2}`,
38911
+ xmlName: `${XML_NODE_NAME$6}${type2}`,
38710
38912
  sdNodeOrKeyName: `${SD_NODE_NAME$4}${type2}`,
38711
38913
  type: NodeTranslator.translatorTypes.NODE,
38712
38914
  encode: () => {
38713
38915
  },
38714
- decode: decode$4,
38916
+ decode: decode$6,
38715
38917
  attributes: [attrConfig]
38716
38918
  });
38717
38919
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
38718
38920
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
38719
- const XML_NODE_NAME$3 = "sd:pageReference";
38921
+ const XML_NODE_NAME$5 = "sd:pageReference";
38720
38922
  const SD_NODE_NAME$3 = "pageReference";
38721
- const encode$3 = (params2) => {
38923
+ const encode$5 = (params2) => {
38722
38924
  const { nodes = [], nodeListHandler } = params2 || {};
38723
38925
  const node = nodes[0];
38724
38926
  const processedText = nodeListHandler.handler({
@@ -38735,7 +38937,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38735
38937
  };
38736
38938
  return processedNode;
38737
38939
  };
38738
- const decode$3 = (params2) => {
38940
+ const decode$5 = (params2) => {
38739
38941
  const { node } = params2;
38740
38942
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
38741
38943
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params2, node: n }));
@@ -38808,17 +39010,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38808
39010
  ];
38809
39011
  return translated;
38810
39012
  };
38811
- const config$3 = {
38812
- xmlName: XML_NODE_NAME$3,
39013
+ const config$5 = {
39014
+ xmlName: XML_NODE_NAME$5,
38813
39015
  sdNodeOrKeyName: SD_NODE_NAME$3,
38814
39016
  type: NodeTranslator.translatorTypes.NODE,
38815
- encode: encode$3,
38816
- decode: decode$3
39017
+ encode: encode$5,
39018
+ decode: decode$5
38817
39019
  };
38818
- const translator$3 = NodeTranslator.from(config$3);
38819
- const XML_NODE_NAME$2 = "sd:tableOfContents";
39020
+ const translator$5 = NodeTranslator.from(config$5);
39021
+ const XML_NODE_NAME$4 = "sd:tableOfContents";
38820
39022
  const SD_NODE_NAME$2 = "tableOfContents";
38821
- const encode$2 = (params2) => {
39023
+ const encode$4 = (params2) => {
38822
39024
  const { nodes = [], nodeListHandler } = params2 || {};
38823
39025
  const node = nodes[0];
38824
39026
  const processedContent = nodeListHandler.handler({
@@ -38834,7 +39036,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38834
39036
  };
38835
39037
  return processedNode;
38836
39038
  };
38837
- const decode$2 = (params2) => {
39039
+ const decode$4 = (params2) => {
38838
39040
  const { node } = params2;
38839
39041
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params2, node: n }));
38840
39042
  const tocBeginElements = [
@@ -38881,14 +39083,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38881
39083
  }
38882
39084
  return contentNodes;
38883
39085
  };
38884
- const config$2 = {
38885
- xmlName: XML_NODE_NAME$2,
39086
+ const config$4 = {
39087
+ xmlName: XML_NODE_NAME$4,
38886
39088
  sdNodeOrKeyName: SD_NODE_NAME$2,
38887
39089
  type: NodeTranslator.translatorTypes.NODE,
38888
- encode: encode$2,
38889
- decode: decode$2
39090
+ encode: encode$4,
39091
+ decode: decode$4
38890
39092
  };
38891
- const translator$2 = NodeTranslator.from(config$2);
39093
+ const translator$4 = NodeTranslator.from(config$4);
38892
39094
  function parseInlineStyles(styleString) {
38893
39095
  if (!styleString) return {};
38894
39096
  return styleString.split(";").filter((style2) => !!style2.trim()).reduce((acc, style2) => {
@@ -39022,7 +39224,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39022
39224
  if (mainNode.name === "w:drawing") node = mainNode;
39023
39225
  else node = mainNode.elements.find((el) => el.name === "w:drawing");
39024
39226
  if (!node) return { nodes: [], consumed: 0 };
39025
- const schemaNode = translator$7.encode(params2);
39227
+ const schemaNode = translator$9.encode(params2);
39026
39228
  const newNodes = schemaNode ? [schemaNode] : [];
39027
39229
  return { nodes: newNodes, consumed: 1 };
39028
39230
  };
@@ -39030,6 +39232,203 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39030
39232
  handlerName: "drawingNodeHandler",
39031
39233
  handler: handleDrawingNode
39032
39234
  };
39235
+ const createTrackStyleMark = (marks) => {
39236
+ const trackStyleMark = marks.find((mark) => mark.type === "trackFormat");
39237
+ if (trackStyleMark) {
39238
+ return {
39239
+ type: "element",
39240
+ name: "w:rPrChange",
39241
+ attributes: {
39242
+ "w:id": trackStyleMark.attrs.id,
39243
+ "w:author": trackStyleMark.attrs.author,
39244
+ "w:authorEmail": trackStyleMark.attrs.authorEmail,
39245
+ "w:date": trackStyleMark.attrs.date
39246
+ },
39247
+ elements: trackStyleMark.attrs.before.map((mark) => processOutputMarks([mark])).filter((r2) => r2 !== void 0)
39248
+ };
39249
+ }
39250
+ return void 0;
39251
+ };
39252
+ const XML_NODE_NAME$3 = "w:del";
39253
+ const SD_ATTR_KEY$1 = "trackDelete";
39254
+ const validXmlAttributes$3 = [
39255
+ createAttributeHandler("w:id", "id"),
39256
+ createAttributeHandler("w:date", "date"),
39257
+ createAttributeHandler("w:author", "author"),
39258
+ createAttributeHandler("w:authorEmail", "authorEmail")
39259
+ ];
39260
+ const encode$3 = (params2, encodedAttrs = {}) => {
39261
+ const { nodeListHandler, extraParams = {} } = params2;
39262
+ const { node } = extraParams;
39263
+ const subs = nodeListHandler.handler({
39264
+ ...params2,
39265
+ insideTrackChange: true,
39266
+ nodes: node.elements,
39267
+ path: [...params2.path || [], node]
39268
+ });
39269
+ encodedAttrs.importedAuthor = `${encodedAttrs.author} (imported)`;
39270
+ subs.forEach((subElement) => {
39271
+ if (subElement.marks === void 0) subElement.marks = [];
39272
+ subElement.marks.push({ type: "trackDelete", attrs: encodedAttrs });
39273
+ });
39274
+ return subs;
39275
+ };
39276
+ function decode$3(params2) {
39277
+ const { node } = params2;
39278
+ if (!node || !node.type) {
39279
+ return null;
39280
+ }
39281
+ const trackingMarks = ["trackInsert", "trackFormat", "trackDelete"];
39282
+ const marks = node.marks;
39283
+ const trackedMark = marks.find((m2) => m2.type === "trackDelete");
39284
+ const trackStyleMark = createTrackStyleMark(marks);
39285
+ node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
39286
+ if (trackStyleMark) {
39287
+ node.marks.push(trackStyleMark);
39288
+ }
39289
+ const translatedTextNode = exportSchemaToJson({ ...params2, node });
39290
+ const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
39291
+ textNode.name = "w:delText";
39292
+ return {
39293
+ name: "w:del",
39294
+ attributes: {
39295
+ "w:id": trackedMark.attrs.id,
39296
+ "w:author": trackedMark.attrs.author,
39297
+ "w:authorEmail": trackedMark.attrs.authorEmail,
39298
+ "w:date": trackedMark.attrs.date
39299
+ },
39300
+ elements: [translatedTextNode]
39301
+ };
39302
+ }
39303
+ const config$3 = {
39304
+ xmlName: XML_NODE_NAME$3,
39305
+ sdNodeOrKeyName: SD_ATTR_KEY$1,
39306
+ type: NodeTranslator.translatorTypes.ATTRIBUTE,
39307
+ encode: encode$3,
39308
+ decode: decode$3,
39309
+ attributes: validXmlAttributes$3
39310
+ };
39311
+ const translator$3 = NodeTranslator.from(config$3);
39312
+ const XML_NODE_NAME$2 = "w:ins";
39313
+ const SD_ATTR_KEY = "trackInsert";
39314
+ const validXmlAttributes$2 = [
39315
+ createAttributeHandler("w:id", "id"),
39316
+ createAttributeHandler("w:date", "date"),
39317
+ createAttributeHandler("w:author", "author"),
39318
+ createAttributeHandler("w:authorEmail", "authorEmail")
39319
+ ];
39320
+ const encode$2 = (params2, encodedAttrs = {}) => {
39321
+ const { nodeListHandler, extraParams = {} } = params2;
39322
+ const { node } = extraParams;
39323
+ const subs = nodeListHandler.handler({
39324
+ ...params2,
39325
+ insideTrackChange: true,
39326
+ nodes: node.elements,
39327
+ path: [...params2.path || [], node]
39328
+ });
39329
+ encodedAttrs.importedAuthor = `${encodedAttrs.author} (imported)`;
39330
+ subs.forEach((subElement) => {
39331
+ if (subElement.marks === void 0) subElement.marks = [];
39332
+ subElement.marks.push({ type: "trackInsert", attrs: encodedAttrs });
39333
+ });
39334
+ return subs;
39335
+ };
39336
+ function decode$2(params2) {
39337
+ const { node } = params2;
39338
+ if (!node || !node.type) {
39339
+ return null;
39340
+ }
39341
+ const trackingMarks = ["trackInsert", "trackFormat", "trackDelete"];
39342
+ const marks = node.marks;
39343
+ const trackedMark = marks.find((m2) => m2.type === "trackInsert");
39344
+ const trackStyleMark = createTrackStyleMark(marks);
39345
+ node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
39346
+ if (trackStyleMark) {
39347
+ node.marks.push(trackStyleMark);
39348
+ }
39349
+ const translatedTextNode = exportSchemaToJson({ ...params2, node });
39350
+ return {
39351
+ name: "w:ins",
39352
+ attributes: {
39353
+ "w:id": trackedMark.attrs.id,
39354
+ "w:author": trackedMark.attrs.author,
39355
+ "w:authorEmail": trackedMark.attrs.authorEmail,
39356
+ "w:date": trackedMark.attrs.date
39357
+ },
39358
+ elements: [translatedTextNode]
39359
+ };
39360
+ }
39361
+ const config$2 = {
39362
+ xmlName: XML_NODE_NAME$2,
39363
+ sdNodeOrKeyName: SD_ATTR_KEY,
39364
+ type: NodeTranslator.translatorTypes.ATTRIBUTE,
39365
+ encode: encode$2,
39366
+ decode: decode$2,
39367
+ attributes: validXmlAttributes$2
39368
+ };
39369
+ const translator$2 = NodeTranslator.from(config$2);
39370
+ const isTrackChangeElement = (node) => node?.name === "w:del" || node?.name === "w:ins";
39371
+ const unwrapTrackChangeNode = (node) => {
39372
+ if (!node) {
39373
+ return null;
39374
+ }
39375
+ if (isTrackChangeElement(node)) {
39376
+ return node;
39377
+ }
39378
+ if (node.name === "w:sdt") {
39379
+ const content = node.elements?.find((element) => element.name === "w:sdtContent");
39380
+ if (!content?.elements?.length) {
39381
+ return null;
39382
+ }
39383
+ for (const child of content.elements) {
39384
+ const trackChange = unwrapTrackChangeNode(child);
39385
+ if (trackChange) {
39386
+ return trackChange;
39387
+ }
39388
+ }
39389
+ }
39390
+ return null;
39391
+ };
39392
+ const handleTrackChangeNode = (params2) => {
39393
+ const { nodes } = params2;
39394
+ if (nodes.length === 0) {
39395
+ return { nodes: [], consumed: 0 };
39396
+ }
39397
+ const mainNode = unwrapTrackChangeNode(nodes[0]);
39398
+ if (!mainNode) {
39399
+ return { nodes: [], consumed: 0 };
39400
+ }
39401
+ let result;
39402
+ const translatorParams = {
39403
+ ...params2,
39404
+ nodes: [mainNode]
39405
+ };
39406
+ switch (mainNode.name) {
39407
+ case "w:del":
39408
+ result = translator$3.encode({
39409
+ extraParams: {
39410
+ node: mainNode
39411
+ },
39412
+ ...translatorParams
39413
+ });
39414
+ break;
39415
+ case "w:ins":
39416
+ result = translator$2.encode({
39417
+ extraParams: {
39418
+ node: mainNode
39419
+ },
39420
+ ...translatorParams
39421
+ });
39422
+ break;
39423
+ }
39424
+ return { nodes: result, consumed: 1 };
39425
+ };
39426
+ const trackChangeNodeHandlerEntity = {
39427
+ handlerName: "trackChangeNodeHandler",
39428
+ handler: handleTrackChangeNode
39429
+ };
39430
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$Z);
39431
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$Y);
39033
39432
  function parseProperties(node) {
39034
39433
  const marks = [];
39035
39434
  const unknownMarks = [];
@@ -39081,51 +39480,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39081
39480
  const isPropertiesElement = (element) => {
39082
39481
  return !!SuperConverter.propertyTypes[element.name || element.type];
39083
39482
  };
39084
- const handleTrackChangeNode = (params2) => {
39085
- const { nodes, nodeListHandler } = params2;
39086
- if (nodes.length === 0 || !(nodes[0].name === "w:del" || nodes[0].name === "w:ins" || nodes[0].name === "w:sdt")) {
39087
- return { nodes: [], consumed: 0 };
39088
- }
39089
- const mainNode = nodes[0];
39090
- let node;
39091
- if (["w:ins", "w:del"].includes(mainNode.name)) {
39092
- node = mainNode;
39093
- } else {
39094
- const sdtContent = mainNode.elements.find((el) => el.name === "w:sdtContent");
39095
- const trackedChange = sdtContent?.elements.find((el) => ["w:ins", "w:del"].includes(el.name));
39096
- if (trackedChange) node = trackedChange;
39097
- }
39098
- if (!node) {
39099
- return { nodes: [], consumed: 0 };
39100
- }
39101
- const { name } = node;
39102
- const { attributes, elements } = parseProperties(node);
39103
- const subs = nodeListHandler.handler({
39104
- ...params2,
39105
- insideTrackChange: true,
39106
- nodes: elements,
39107
- path: [...params2.path || [], node]
39108
- });
39109
- const changeType = name === "w:del" ? TrackDeleteMarkName : TrackInsertMarkName;
39110
- const mappedAttributes = {
39111
- id: attributes["w:id"],
39112
- date: attributes["w:date"],
39113
- author: attributes["w:author"],
39114
- authorEmail: attributes["w:authorEmail"],
39115
- importedAuthor: `${attributes["w:author"]} (imported)`
39116
- };
39117
- subs.forEach((subElement) => {
39118
- if (subElement.marks === void 0) subElement.marks = [];
39119
- subElement.marks.push({ type: changeType, attrs: mappedAttributes });
39120
- });
39121
- return { nodes: subs, consumed: 1 };
39122
- };
39123
- const trackChangeNodeHandlerEntity = {
39124
- handlerName: "trackChangeNodeHandler",
39125
- handler: handleTrackChangeNode
39126
- };
39127
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$X);
39128
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$W);
39129
39483
  const handleTextNode = (params2) => {
39130
39484
  const { nodes, insideTrackChange } = params2;
39131
39485
  if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
@@ -39166,7 +39520,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39166
39520
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
39167
39521
  return { nodes: [], consumed: 0 };
39168
39522
  }
39169
- const schemaNode = translator$17.encode(params2);
39523
+ const schemaNode = translator$19.encode(params2);
39170
39524
  const newNodes = schemaNode ? [schemaNode] : [];
39171
39525
  return { nodes: newNodes, consumed: 1 };
39172
39526
  };
@@ -39179,7 +39533,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39179
39533
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
39180
39534
  return { nodes: [], consumed: 0 };
39181
39535
  }
39182
- const result = translator$6.encode(params2);
39536
+ const result = translator$8.encode(params2);
39183
39537
  if (!result) {
39184
39538
  return { nodes: [], consumed: 0 };
39185
39539
  }
@@ -39269,7 +39623,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39269
39623
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
39270
39624
  return { nodes: [], consumed: 0 };
39271
39625
  }
39272
- const result = translator$1a.encode(params2);
39626
+ const result = translator$1c.encode(params2);
39273
39627
  if (!result) return { nodes: [], consumed: 0 };
39274
39628
  return {
39275
39629
  nodes: [result],
@@ -39341,7 +39695,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39341
39695
  if (isCustomMarkBookmark(nodes[0], params2.editor)) {
39342
39696
  return handleBookmarkNode(params2);
39343
39697
  }
39344
- const node = translator$5.encode(params2);
39698
+ const node = translator$7.encode(params2);
39345
39699
  if (!node) return { nodes: [], consumed: 0 };
39346
39700
  return { nodes: [node], consumed: 1 };
39347
39701
  };
@@ -39373,7 +39727,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39373
39727
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
39374
39728
  return { nodes: [], consumed: 0 };
39375
39729
  }
39376
- const node = translator$4.encode(params2);
39730
+ const node = translator$6.encode(params2);
39377
39731
  if (!node) return { nodes: [], consumed: 0 };
39378
39732
  return { nodes: [node], consumed: 1 };
39379
39733
  };
@@ -39506,7 +39860,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39506
39860
  handlerName: "autoTotalPageCountEntity",
39507
39861
  handler: handleAutoTotalPageNumber
39508
39862
  };
39509
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$3);
39863
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$5);
39510
39864
  const handlePictNode = (params2) => {
39511
39865
  const { nodes } = params2;
39512
39866
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -39868,14 +40222,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39868
40222
  if (!nodes.length || nodes[0].name !== "w:tab") {
39869
40223
  return { nodes: [], consumed: 0 };
39870
40224
  }
39871
- const node = translator$18.encode(params2);
40225
+ const node = translator$1a.encode(params2);
39872
40226
  return { nodes: [node], consumed: 1 };
39873
40227
  };
39874
40228
  const tabNodeEntityHandler = {
39875
40229
  handlerName: "w:tabTranslator",
39876
40230
  handler: handleTabNode
39877
40231
  };
39878
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$2);
40232
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$4);
39879
40233
  function preProcessPageInstruction(nodesToCombine) {
39880
40234
  const pageNumNode = {
39881
40235
  name: "sd:autoPageNumber",
@@ -40816,7 +41170,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40816
41170
  const XML_NODE_NAME = "w:pict";
40817
41171
  const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
40818
41172
  const validXmlAttributes = [];
40819
- function encode$1d(params2) {
41173
+ function encode$1f(params2) {
40820
41174
  const { node, pNode } = params2.extraParams;
40821
41175
  const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node);
40822
41176
  if (!handler2 || pictType === "unknown") {
@@ -40848,7 +41202,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40848
41202
  xmlName: XML_NODE_NAME,
40849
41203
  sdNodeOrKeyName: SD_NODE_NAME,
40850
41204
  type: NodeTranslator.translatorTypes.NODE,
40851
- encode: encode$1d,
41205
+ encode: encode$1f,
40852
41206
  decode,
40853
41207
  attributes: validXmlAttributes
40854
41208
  };
@@ -40924,35 +41278,35 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40924
41278
  doc: translateDocumentNode,
40925
41279
  body: translateBodyNode,
40926
41280
  heading: translateHeadingNode,
40927
- paragraph: translator$17,
40928
- run: translator$W,
41281
+ paragraph: translator$19,
41282
+ run: translator$Y,
40929
41283
  text: translateTextNode,
40930
41284
  bulletList: translateList,
40931
41285
  orderedList: translateList,
40932
- lineBreak: translator$1a,
40933
- table: translator$b,
40934
- tableRow: translator$I,
40935
- tableCell: translator$a,
40936
- bookmarkStart: translator$5,
40937
- bookmarkEnd: translator$4,
40938
- fieldAnnotation: translator$6,
40939
- tab: translator$18,
40940
- image: translator$7,
40941
- hardBreak: translator$1a,
41286
+ lineBreak: translator$1c,
41287
+ table: translator$d,
41288
+ tableRow: translator$K,
41289
+ tableCell: translator$c,
41290
+ bookmarkStart: translator$7,
41291
+ bookmarkEnd: translator$6,
41292
+ fieldAnnotation: translator$8,
41293
+ tab: translator$1a,
41294
+ image: translator$9,
41295
+ hardBreak: translator$1c,
40942
41296
  commentRangeStart: commentRangeStartTranslator,
40943
41297
  commentRangeEnd: commentRangeEndTranslator,
40944
41298
  commentReference: () => null,
40945
41299
  shapeContainer: translator,
40946
41300
  shapeTextbox: translator,
40947
41301
  contentBlock: translator,
40948
- structuredContent: translator$6,
40949
- structuredContentBlock: translator$6,
40950
- documentPartObject: translator$6,
40951
- documentSection: translator$6,
41302
+ structuredContent: translator$8,
41303
+ structuredContentBlock: translator$8,
41304
+ documentPartObject: translator$8,
41305
+ documentSection: translator$8,
40952
41306
  "page-number": translatePageNumberNode,
40953
41307
  "total-page-number": translateTotalPageNumberNode,
40954
- pageReference: translator$3,
40955
- tableOfContents: translator$2
41308
+ pageReference: translator$5,
41309
+ tableOfContents: translator$4
40956
41310
  };
40957
41311
  let handler2 = router[type2];
40958
41312
  if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
@@ -41286,59 +41640,23 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41286
41640
  return wrapTextInRun(textNodes, outputMarks);
41287
41641
  }
41288
41642
  function translateTextNode(params2) {
41289
- const { node } = params2;
41643
+ const { node, extraParams } = params2;
41290
41644
  const trackedMarks = [TrackInsertMarkName, TrackDeleteMarkName];
41291
- const isTrackedNode = node.marks?.some((m2) => trackedMarks.includes(m2.type));
41292
- if (isTrackedNode) return translateTrackedNode(params2);
41293
- const { text, marks = [] } = node;
41294
- return getTextNodeForExport(text, marks, params2);
41295
- }
41296
- function createTrackStyleMark(marks) {
41297
- const trackStyleMark = marks.find((mark) => mark.type === TrackFormatMarkName);
41298
- if (trackStyleMark) {
41299
- const markElement = {
41300
- type: "element",
41301
- name: "w:rPrChange",
41302
- attributes: {
41303
- "w:id": trackStyleMark.attrs.id,
41304
- "w:author": trackStyleMark.attrs.author,
41305
- "w:authorEmail": trackStyleMark.attrs.authorEmail,
41306
- "w:date": trackStyleMark.attrs.date
41307
- },
41308
- elements: trackStyleMark.attrs.before.map((mark) => processOutputMarks([mark])).filter((r2) => r2 !== void 0)
41309
- };
41310
- return markElement;
41311
- }
41312
- return void 0;
41313
- }
41314
- function translateTrackedNode(params2) {
41315
- const { node } = params2;
41316
- const marks = node.marks;
41317
- const trackingMarks = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
41318
- const trackedMark = marks.find((m2) => trackingMarks.includes(m2.type));
41319
- const isInsert = trackedMark.type === TrackInsertMarkName;
41320
- const trackStyleMark = createTrackStyleMark(marks);
41321
- node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
41322
- if (trackStyleMark) {
41323
- node.marks.push(trackStyleMark);
41645
+ const trackedMark = node.marks?.find((m2) => trackedMarks.includes(m2.type));
41646
+ if (trackedMark) {
41647
+ switch (trackedMark.type) {
41648
+ case "trackDelete":
41649
+ return translator$3.decode(params2);
41650
+ case "trackInsert":
41651
+ return translator$2.decode(params2);
41652
+ }
41324
41653
  }
41325
- const translatedTextNode = exportSchemaToJson({ ...params2, node });
41326
- if (!isInsert) {
41327
- const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
41328
- textNode.name = "w:delText";
41654
+ const isLinkNode = node.marks?.some((m2) => m2.type === "link");
41655
+ if (isLinkNode && !extraParams?.linkProcessed) {
41656
+ return translator$Z.decode(params2);
41329
41657
  }
41330
- const trackedNode = {
41331
- name: isInsert ? "w:ins" : "w:del",
41332
- type: "element",
41333
- attributes: {
41334
- "w:id": trackedMark.attrs.id,
41335
- "w:author": trackedMark.attrs.author,
41336
- "w:authorEmail": trackedMark.attrs.authorEmail,
41337
- "w:date": trackedMark.attrs.date
41338
- },
41339
- elements: [translatedTextNode]
41340
- };
41341
- return trackedNode;
41658
+ const { text, marks = [] } = node;
41659
+ return getTextNodeForExport(text, marks, params2);
41342
41660
  }
41343
41661
  function wrapTextInRun(nodeOrNodes, marks) {
41344
41662
  let elements = [];
@@ -41595,7 +41913,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41595
41913
  markElement.type = "element";
41596
41914
  break;
41597
41915
  case "underline": {
41598
- const translated = translator$14.decode({
41916
+ const translated = translator$16.decode({
41599
41917
  node: {
41600
41918
  attrs: {
41601
41919
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -41659,9 +41977,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41659
41977
  break;
41660
41978
  case "highlight": {
41661
41979
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
41662
- const translated = translator$19.decode({ node: { attrs: { highlight: highlightValue } } });
41980
+ const translated = translator$1b.decode({ node: { attrs: { highlight: highlightValue } } });
41663
41981
  return translated || {};
41664
41982
  }
41983
+ case "link":
41984
+ return {};
41665
41985
  }
41666
41986
  return markElement;
41667
41987
  }
@@ -71600,6 +71920,58 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71600
71920
  }
71601
71921
  });
71602
71922
  };
71923
+ const normalizeWrap = (attrs = {}) => {
71924
+ const wrap2 = attrs.wrap;
71925
+ if (wrap2?.type && wrap2.type !== "Inline") {
71926
+ return {
71927
+ type: wrap2.type,
71928
+ attrs: wrap2.attrs ?? {}
71929
+ };
71930
+ }
71931
+ if (wrap2?.type === "Inline" && Object.keys(wrap2.attrs ?? {}).length) {
71932
+ return {
71933
+ type: "Inline",
71934
+ attrs: wrap2.attrs
71935
+ };
71936
+ }
71937
+ if (!wrap2 && attrs.wrapText) {
71938
+ return {
71939
+ type: "Square",
71940
+ attrs: {
71941
+ wrapText: attrs.wrapText
71942
+ }
71943
+ };
71944
+ }
71945
+ if (!wrap2 && attrs.wrapTopAndBottom) {
71946
+ return {
71947
+ type: "TopAndBottom",
71948
+ attrs: {}
71949
+ };
71950
+ }
71951
+ if (wrap2?.type === "Inline") {
71952
+ return {
71953
+ type: "Inline",
71954
+ attrs: wrap2.attrs ?? {}
71955
+ };
71956
+ }
71957
+ return {
71958
+ type: "Inline",
71959
+ attrs: {}
71960
+ };
71961
+ };
71962
+ const normalizeMarginOffset = (marginOffset = {}) => {
71963
+ const { left: left2, horizontal, ...rest } = marginOffset;
71964
+ return {
71965
+ ...rest,
71966
+ horizontal: horizontal ?? left2
71967
+ };
71968
+ };
71969
+ const getNormalizedImageAttrs = (attrs = {}) => {
71970
+ return {
71971
+ wrap: normalizeWrap(attrs),
71972
+ marginOffset: normalizeMarginOffset(attrs.marginOffset ?? {})
71973
+ };
71974
+ };
71603
71975
  const ImagePositionPluginKey = new PluginKey("ImagePosition");
71604
71976
  const ImagePositionPlugin = ({ editor }) => {
71605
71977
  const { view } = editor;
@@ -71647,7 +72019,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71647
72019
  let style2 = "";
71648
72020
  let className = "";
71649
72021
  const { vRelativeFrom, alignH } = node.attrs.anchorData;
71650
- const { size: size2, padding, marginOffset } = node.attrs;
72022
+ const { size: size2, padding } = node.attrs;
72023
+ const { marginOffset } = getNormalizedImageAttrs(node.attrs);
71651
72024
  const pageBreak = findPreviousDomNodeWithClass(view, pos, "pagination-break-wrapper");
71652
72025
  if (pageBreak) {
71653
72026
  switch (alignH) {
@@ -71764,7 +72137,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71764
72137
  rendered: false
71765
72138
  },
71766
72139
  originalAttributes: { rendered: false },
71767
- wrapTopAndBottom: { rendered: false },
72140
+ /**
72141
+ * @category Attribute
72142
+ * @param {Object} wrap - Wrapping options
72143
+ * @param {string} wrap.type - Wrap type: "None", "Square", "Through", "Tight", "TopAndBottom", "Inline"
72144
+ * @param {Object} [wrap.attrs] - Wrap attributes (only allowed attributes for the given type will be accepted)
72145
+ * @param {string} [wrap.attrs.wrapText] - Text wrapping mode for Square type: "bothSides", "largest", "left", "right"
72146
+ * @param {number} [wrap.attrs.distTop] - Top distance in pixels
72147
+ * @param {number} [wrap.attrs.distBottom] - Bottom distance in pixels
72148
+ * @param {number} [wrap.attrs.distLeft] - Left distance in pixels
72149
+ * @param {number} [wrap.attrs.distRight] - Right distance in pixels
72150
+ * @param {Array} [wrap.attrs.polygon] - Polygon points for Through/Tight types: [[x1,y1], [x2,y2], ...]
72151
+ * @param {boolean} [wrap.attrs.behindDoc] - Whether image should be behind document text (for wrapNone)
72152
+ */
72153
+ wrap: {
72154
+ default: { type: "Inline" },
72155
+ rendered: false
72156
+ // Handled in main renderDOM
72157
+ },
71768
72158
  anchorData: {
71769
72159
  default: null,
71770
72160
  rendered: false
@@ -71810,7 +72200,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71810
72200
  * @private
71811
72201
  */
71812
72202
  simplePos: { rendered: false },
71813
- wrapText: { rendered: false },
71814
72203
  extension: { rendered: false },
71815
72204
  size: {
71816
72205
  default: {},
@@ -71826,55 +72215,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71826
72215
  },
71827
72216
  padding: {
71828
72217
  default: {},
71829
- renderDOM: ({ size: size2 = {}, padding, marginOffset, transformData = {} }) => {
71830
- let { left: left2 = 0, top: top2 = 0, bottom: bottom2 = 0, right: right2 = 0 } = padding ?? {};
71831
- const { rotation } = transformData;
71832
- const { height, width } = size2;
71833
- if (rotation && height && width) {
71834
- const { horizontal, vertical } = getRotationMargins(width, height, rotation);
71835
- left2 += horizontal;
71836
- right2 += horizontal;
71837
- top2 += vertical;
71838
- bottom2 += vertical;
71839
- }
71840
- let style2 = "";
71841
- if (left2 && marginOffset?.left == null) style2 += `margin-left: ${left2}px;`;
71842
- if (top2 && marginOffset?.top == null) style2 += `margin-top: ${top2}px;`;
71843
- if (bottom2) style2 += `margin-bottom: ${bottom2}px;`;
71844
- if (right2) style2 += `margin-right: ${right2}px;`;
71845
- return { style: style2 };
71846
- }
72218
+ rendered: false
72219
+ // Handled in main renderDOM
71847
72220
  },
71848
72221
  marginOffset: {
71849
72222
  default: {},
71850
- renderDOM: ({ marginOffset, anchorData, transformData, size: size2 }) => {
71851
- const hasAnchorData = Boolean(anchorData);
71852
- const hasMarginOffsets = marginOffset?.left != null || marginOffset?.top != null;
71853
- if (!hasAnchorData && !hasMarginOffsets) return {};
71854
- const relativeFromPageV = anchorData?.vRelativeFrom === "page";
71855
- const maxMarginV = 500;
71856
- const baseLeft = marginOffset?.left ?? 0;
71857
- const baseTop = marginOffset?.top ?? 0;
71858
- let rotationLeft = 0;
71859
- let rotationTop = 0;
71860
- const { rotation } = transformData ?? {};
71861
- const { height, width } = size2 ?? {};
71862
- if (rotation && height && width) {
71863
- const { horizontal, vertical } = getRotationMargins(width, height, rotation);
71864
- rotationLeft = horizontal;
71865
- rotationTop = vertical;
71866
- }
71867
- const left2 = baseLeft + rotationLeft;
71868
- const top2 = baseTop + rotationTop;
71869
- let style2 = "";
71870
- if (left2) style2 += `margin-left: ${left2}px;`;
71871
- if (top2) {
71872
- if (relativeFromPageV && top2 >= maxMarginV) style2 += `margin-top: ${maxMarginV}px;`;
71873
- else style2 += `margin-top: ${top2}px;`;
71874
- }
71875
- if (!style2) return {};
71876
- return { style: style2 };
71877
- }
72223
+ rendered: false
72224
+ // Handled in main renderDOM
71878
72225
  },
71879
72226
  style: {
71880
72227
  default: null,
@@ -71893,8 +72240,181 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71893
72240
  }
71894
72241
  ];
71895
72242
  },
71896
- renderDOM({ htmlAttributes }) {
71897
- return ["img", Attribute.mergeAttributes(this.options.htmlAttributes, htmlAttributes)];
72243
+ renderDOM({ node, htmlAttributes }) {
72244
+ const { wrap: wrap2, marginOffset } = getNormalizedImageAttrs(node.attrs);
72245
+ const { anchorData, padding, transformData = {}, size: size2 = { width: 0, height: 0 } } = node.attrs;
72246
+ const margin = {
72247
+ left: 0,
72248
+ right: 0,
72249
+ top: 0,
72250
+ bottom: 0
72251
+ };
72252
+ let centered = false;
72253
+ let floatRight = false;
72254
+ let baseHorizontal = marginOffset?.horizontal || 0;
72255
+ let style2 = "";
72256
+ if (padding) {
72257
+ if (padding.left) margin.left += padding.left;
72258
+ if (padding.right) margin.right += padding.right;
72259
+ if (padding.top) margin.top += padding.top;
72260
+ if (padding.bottom) margin.bottom += padding.bottom;
72261
+ }
72262
+ const { rotation } = transformData;
72263
+ const { height, width } = size2;
72264
+ if (rotation && height && width) {
72265
+ const { horizontal, vertical } = getRotationMargins(width, height, rotation);
72266
+ margin.left += horizontal;
72267
+ margin.right += horizontal;
72268
+ margin.top += vertical;
72269
+ margin.bottom += vertical;
72270
+ }
72271
+ if (wrap2 && wrap2.type) {
72272
+ const { type: type2, attrs = {} } = wrap2;
72273
+ switch (type2) {
72274
+ case "None":
72275
+ style2 += "position: absolute;";
72276
+ if (attrs.behindDoc) {
72277
+ style2 += "z-index: -1;";
72278
+ } else {
72279
+ style2 += "z-index: 1;";
72280
+ }
72281
+ break;
72282
+ case "Square":
72283
+ style2 += "shape-outside: border-box; clear: both;";
72284
+ if (attrs.wrapText === "right") {
72285
+ style2 += "float: left;";
72286
+ } else if (attrs.wrapText === "left") {
72287
+ style2 += "float: right;";
72288
+ floatRight = true;
72289
+ } else if (["largest", "bothSides"].includes(attrs.wrapText)) {
72290
+ const pageStyles2 = this.editor?.converter?.pageStyles;
72291
+ if (pageStyles2?.pageSize && pageStyles2?.pageMargins && size2.width) {
72292
+ const pageWidth = inchesToPixels(pageStyles2.pageSize.width);
72293
+ const leftMargin = inchesToPixels(pageStyles2.pageMargins.left);
72294
+ const rightMargin = inchesToPixels(pageStyles2.pageMargins.right);
72295
+ const contentWidth = pageWidth - leftMargin - rightMargin;
72296
+ const imageWidth = size2.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
72297
+ const leftSpace = marginOffset.horizontal;
72298
+ const rightSpace = contentWidth - leftSpace - imageWidth;
72299
+ if (rightSpace < 0) {
72300
+ style2 += "float: left;";
72301
+ } else if (rightSpace > leftSpace) {
72302
+ style2 += "float: left;";
72303
+ } else {
72304
+ style2 += "float: right;";
72305
+ floatRight = true;
72306
+ baseHorizontal = rightSpace;
72307
+ }
72308
+ } else {
72309
+ style2 += "float: left;";
72310
+ }
72311
+ }
72312
+ if (attrs.distTop) margin.top += attrs.distTop;
72313
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
72314
+ if (attrs.distLeft) margin.left += attrs.distLeft;
72315
+ if (attrs.distRight) margin.right += attrs.distRight;
72316
+ break;
72317
+ case "Through":
72318
+ case "Tight":
72319
+ style2 += "clear: both;";
72320
+ const pageStyles = this.editor?.converter?.pageStyles;
72321
+ if (pageStyles?.pageSize && pageStyles?.pageMargins && size2.width) {
72322
+ const pageWidth = inchesToPixels(pageStyles.pageSize.width);
72323
+ const leftMargin = inchesToPixels(pageStyles.pageMargins.left);
72324
+ const rightMargin = inchesToPixels(pageStyles.pageMargins.right);
72325
+ const contentWidth = pageWidth - leftMargin - rightMargin;
72326
+ const imageWidth = size2.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
72327
+ const leftSpace = marginOffset.horizontal;
72328
+ const rightSpace = contentWidth - leftSpace - imageWidth;
72329
+ if (rightSpace < 0) {
72330
+ style2 += "float: left;";
72331
+ } else if (rightSpace > leftSpace) {
72332
+ style2 += "float: left;";
72333
+ } else {
72334
+ style2 += "float: right;";
72335
+ floatRight = true;
72336
+ baseHorizontal = rightSpace;
72337
+ }
72338
+ } else {
72339
+ style2 += "float: left;";
72340
+ }
72341
+ if (attrs.distTop) margin.top += attrs.distTop;
72342
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
72343
+ if (attrs.distLeft) margin.left += attrs.distLeft;
72344
+ if (attrs.distRight) margin.right += attrs.distRight;
72345
+ if (attrs.polygon) {
72346
+ let horizontalOffset = floatRight ? attrs.polygon[0][0] || 0 : marginOffset.horizontal + 15;
72347
+ let maxX = 0;
72348
+ let minX = 0;
72349
+ let minY = 0;
72350
+ let maxY = 0;
72351
+ attrs.polygon.forEach(([x, y2]) => {
72352
+ if (floatRight && x < horizontalOffset) horizontalOffset = x;
72353
+ if (x > maxX) maxX = x;
72354
+ if (x < minX) minX = x;
72355
+ if (y2 > maxY) maxY = y2;
72356
+ if (y2 < minY) minY = y2;
72357
+ });
72358
+ const originalWidth = maxX - minX;
72359
+ const originalHeight = maxY - minY;
72360
+ const scaleWidth = Math.min(1, size2.width / originalWidth);
72361
+ const scaleHeight = Math.min(1, size2.height / originalHeight);
72362
+ const verticalOffset = Math.max(0, marginOffset.top);
72363
+ const points = attrs.polygon.map(([x, y2]) => `${horizontalOffset + x * scaleWidth}px ${verticalOffset + y2 * scaleHeight}px`).join(", ");
72364
+ style2 += `shape-outside: polygon(${points});`;
72365
+ }
72366
+ break;
72367
+ case "TopAndBottom":
72368
+ style2 += "display: block; clear: both;";
72369
+ if (attrs.distTop) margin.top += attrs.distTop;
72370
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
72371
+ centered = true;
72372
+ break;
72373
+ }
72374
+ }
72375
+ const hasAnchorData = Boolean(anchorData);
72376
+ const hasMarginOffsets = marginOffset?.horizontal != null || marginOffset?.top != null;
72377
+ if (hasAnchorData || hasMarginOffsets) {
72378
+ const relativeFromPageV = anchorData?.vRelativeFrom === "page";
72379
+ const maxMarginV = 500;
72380
+ const baseTop = Math.max(0, marginOffset?.top ?? 0);
72381
+ let rotationHorizontal = 0;
72382
+ let rotationTop = 0;
72383
+ const { rotation: rotation2 } = transformData ?? {};
72384
+ const { height: height2, width: width2 } = size2 ?? {};
72385
+ if (rotation2 && height2 && width2) {
72386
+ const { horizontal: horizontal2, vertical } = getRotationMargins(width2, height2, rotation2);
72387
+ rotationHorizontal = horizontal2;
72388
+ rotationTop = vertical;
72389
+ }
72390
+ const horizontal = baseHorizontal + rotationHorizontal;
72391
+ const top2 = baseTop + rotationTop;
72392
+ if (horizontal) {
72393
+ if (floatRight) {
72394
+ margin.right += horizontal;
72395
+ } else {
72396
+ margin.left += horizontal;
72397
+ }
72398
+ }
72399
+ if (top2) {
72400
+ if (relativeFromPageV && top2 >= maxMarginV) margin.top += maxMarginV;
72401
+ else margin.top += top2;
72402
+ }
72403
+ }
72404
+ if (centered) {
72405
+ style2 += "margin-left: auto; margin-right: auto;";
72406
+ } else {
72407
+ if (margin.left) style2 += `margin-left: ${margin.left}px;`;
72408
+ if (margin.right) style2 += `margin-right: ${margin.right}px;`;
72409
+ }
72410
+ if (margin.top) style2 += `margin-top: ${margin.top}px;`;
72411
+ if (margin.bottom) style2 += `margin-bottom: ${margin.bottom}px;`;
72412
+ const finalAttributes = { ...htmlAttributes };
72413
+ if (style2) {
72414
+ const existingStyle = finalAttributes.style || "";
72415
+ finalAttributes.style = existingStyle + (existingStyle ? " " : "") + style2;
72416
+ }
72417
+ return ["img", Attribute.mergeAttributes(this.options.htmlAttributes, finalAttributes)];
71898
72418
  },
71899
72419
  addCommands() {
71900
72420
  return {
@@ -71916,6 +72436,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71916
72436
  type: this.name,
71917
72437
  attrs: options
71918
72438
  });
72439
+ },
72440
+ /**
72441
+ * Set the wrapping mode and attributes for the selected image
72442
+ * @category Command
72443
+ * @param {Object} options - Wrapping options
72444
+ * @param {string} options.type - Wrap type: "None", "Square", "Through", "Tight", "TopAndBottom", "Inline"
72445
+ * @param {Object} [options.attrs] - Wrap attributes (only allowed attributes for the given type will be accepted)
72446
+ * @param {string} [options.attrs.wrapText] - Text wrapping mode for Square type: "bothSides", "largest", "left", "right"
72447
+ * @param {number} [options.attrs.distTop] - Top distance in pixels
72448
+ * @param {number} [options.attrs.distBottom] - Bottom distance in pixels
72449
+ * @param {number} [options.attrs.distLeft] - Left distance in pixels
72450
+ * @param {number} [options.attrs.distRight] - Right distance in pixels
72451
+ * @param {Array} [options.attrs.polygon] - Polygon points for Through/Tight types: [[x1,y1], [x2,y2], ...]
72452
+ * @param {boolean} [options.attrs.behindDoc] - Whether image should be behind document text (for wrapNone)
72453
+ * @example
72454
+ * // No wrapping, behind document
72455
+ * editor.commands.setWrapping({ type: 'None', attrs: {behindDoc: true} })
72456
+ *
72457
+ * // Square wrapping on both sides with distances
72458
+ * editor.commands.setWrapping({
72459
+ * type: 'Square',
72460
+ * attrs: {
72461
+ * wrapText: 'bothSides',
72462
+ * distTop: 10,
72463
+ * distBottom: 10,
72464
+ * distLeft: 10,
72465
+ * distRight: 10
72466
+ * }
72467
+ * })
72468
+ *
72469
+ * // Tight wrapping with polygon
72470
+ * editor.commands.setWrapping({
72471
+ * type: 'Tight',
72472
+ * attrs: {
72473
+ * polygon: [[0, 0], [100, 0], [100, 100], [0, 100]]
72474
+ * }
72475
+ * })
72476
+ *
72477
+ * // Top and bottom wrapping
72478
+ * editor.commands.setWrapping({
72479
+ * type: 'TopAndBottom',
72480
+ * attrs: {
72481
+ * distTop: 15,
72482
+ * distBottom: 15
72483
+ * }
72484
+ * })
72485
+ */
72486
+ setWrapping: (options) => ({ chain, state: state2 }) => {
72487
+ const { selection } = state2;
72488
+ const { $from } = selection;
72489
+ const node = $from.nodeAfter;
72490
+ if (!node || node.type.name !== this.name) {
72491
+ return false;
72492
+ }
72493
+ const { type: type2, attrs = {} } = options;
72494
+ const allowedAttrs = {};
72495
+ const allowedAttributes = {
72496
+ None: ["behindDoc"],
72497
+ Square: ["wrapText", "distTop", "distBottom", "distLeft", "distRight"],
72498
+ Through: ["distTop", "distBottom", "distLeft", "distRight", "polygon"],
72499
+ Tight: ["distTop", "distBottom", "distLeft", "distRight", "polygon"],
72500
+ TopAndBottom: ["distTop", "distBottom"],
72501
+ Inline: []
72502
+ };
72503
+ const allowedForType = allowedAttributes[type2] || [];
72504
+ Object.keys(attrs).forEach((key2) => {
72505
+ if (allowedForType.includes(key2)) {
72506
+ allowedAttrs[key2] = attrs[key2];
72507
+ }
72508
+ });
72509
+ const updatedAttrs = {
72510
+ ...node.attrs,
72511
+ wrap: {
72512
+ type: type2,
72513
+ attrs: allowedAttrs
72514
+ },
72515
+ isAnchor: type2 !== "Inline"
72516
+ };
72517
+ return chain().updateAttributes(this.name, updatedAttrs).run();
71919
72518
  }
71920
72519
  };
71921
72520
  },
@@ -95264,72 +95863,72 @@ ${style2}
95264
95863
  const SuperInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__scopeId", "data-v-4d5cff52"]]);
95265
95864
  const additionalHandlers = Object.freeze({
95266
95865
  "mc:AlternateContent": translator$1,
95267
- "sd:pageReference": translator$3,
95268
- "sd:tableOfContents": translator$2,
95269
- "w:b": translator$16,
95270
- "w:bidiVisual": translator$H,
95271
- "w:bookmarkEnd": translator$4,
95272
- "w:bookmarkStart": translator$5,
95273
- "w:bottom": translator$u,
95274
- "w:br": translator$1a,
95275
- "w:cantSplit": translator$V,
95276
- "w:cnfStyle": translator$U,
95277
- "w:color": translator$12,
95278
- "w:divId": translator$T,
95279
- "w:drawing": translator$7,
95280
- "w:end": translator$s,
95281
- "w:gridAfter": translator$S,
95282
- "w:gridBefore": translator$R,
95283
- "w:gridCol": translator$d,
95284
- "w:hidden": translator$Q,
95285
- "w:highlight": translator$19,
95286
- "w:hyperlink": translator$X,
95287
- "w:i": translator$15,
95288
- "w:insideH": translator$q,
95289
- "w:insideV": translator$p,
95290
- "w:jc": translator$P,
95291
- "w:left": translator$o,
95292
- "w:p": translator$17,
95293
- "w:r": translator$W,
95294
- "w:rFonts": translator$11,
95295
- "w:rPr": translator$Y,
95296
- "w:rStyle": translator$10,
95297
- "w:right": translator$m,
95298
- "w:sdt": translator$6,
95299
- "w:shd": translator$G,
95300
- "w:start": translator$k,
95301
- "w:strike": translator$13,
95302
- "w:sz": translator$$,
95303
- "w:szCs": translator$_,
95304
- "w:tab": translator$18,
95305
- "w:tbl": translator$b,
95306
- "w:tblBorders": translator$g,
95307
- "w:tblCaption": translator$F,
95308
- "w:tblCellMar": translator$f,
95309
- "w:tblCellSpacing": translator$O,
95310
- "w:tblDescription": translator$E,
95311
- "w:tblGrid": translator$c,
95312
- "w:tblHeader": translator$N,
95313
- "w:tblInd": translator$D,
95314
- "w:tblLayout": translator$C,
95315
- "w:tblLook": translator$B,
95316
- "w:tblOverlap": translator$A,
95317
- "w:tblPr": translator$e,
95318
- "w:tblStyle": translator$z,
95319
- "w:tblStyleColBandSize": translator$y,
95320
- "w:tblStyleRowBandSize": translator$x,
95321
- "w:tblW": translator$w,
95322
- "w:tblpPr": translator$v,
95323
- "w:tc": translator$a,
95324
- "w:top": translator$i,
95325
- "w:tr": translator$I,
95326
- "w:trHeight": translator$M,
95327
- "w:trPr": translator$J,
95328
- "w:u": translator$14,
95329
- "w:wAfter": translator$L,
95330
- "w:wBefore": translator$K,
95331
- "wp:anchor": translator$9,
95332
- "wp:inline": translator$8,
95866
+ "sd:pageReference": translator$5,
95867
+ "sd:tableOfContents": translator$4,
95868
+ "w:b": translator$18,
95869
+ "w:bidiVisual": translator$J,
95870
+ "w:bookmarkEnd": translator$6,
95871
+ "w:bookmarkStart": translator$7,
95872
+ "w:bottom": translator$w,
95873
+ "w:br": translator$1c,
95874
+ "w:cantSplit": translator$X,
95875
+ "w:cnfStyle": translator$W,
95876
+ "w:color": translator$14,
95877
+ "w:divId": translator$V,
95878
+ "w:drawing": translator$9,
95879
+ "w:end": translator$u,
95880
+ "w:gridAfter": translator$U,
95881
+ "w:gridBefore": translator$T,
95882
+ "w:gridCol": translator$f,
95883
+ "w:hidden": translator$S,
95884
+ "w:highlight": translator$1b,
95885
+ "w:hyperlink": translator$Z,
95886
+ "w:i": translator$17,
95887
+ "w:insideH": translator$s,
95888
+ "w:insideV": translator$r,
95889
+ "w:jc": translator$R,
95890
+ "w:left": translator$q,
95891
+ "w:p": translator$19,
95892
+ "w:r": translator$Y,
95893
+ "w:rFonts": translator$13,
95894
+ "w:rPr": translator$_,
95895
+ "w:rStyle": translator$12,
95896
+ "w:right": translator$o,
95897
+ "w:sdt": translator$8,
95898
+ "w:shd": translator$I,
95899
+ "w:start": translator$m,
95900
+ "w:strike": translator$15,
95901
+ "w:sz": translator$11,
95902
+ "w:szCs": translator$10,
95903
+ "w:tab": translator$1a,
95904
+ "w:tbl": translator$d,
95905
+ "w:tblBorders": translator$i,
95906
+ "w:tblCaption": translator$H,
95907
+ "w:tblCellMar": translator$h,
95908
+ "w:tblCellSpacing": translator$Q,
95909
+ "w:tblDescription": translator$G,
95910
+ "w:tblGrid": translator$e,
95911
+ "w:tblHeader": translator$P,
95912
+ "w:tblInd": translator$F,
95913
+ "w:tblLayout": translator$E,
95914
+ "w:tblLook": translator$D,
95915
+ "w:tblOverlap": translator$C,
95916
+ "w:tblPr": translator$g,
95917
+ "w:tblStyle": translator$B,
95918
+ "w:tblStyleColBandSize": translator$A,
95919
+ "w:tblStyleRowBandSize": translator$z,
95920
+ "w:tblW": translator$y,
95921
+ "w:tblpPr": translator$x,
95922
+ "w:tc": translator$c,
95923
+ "w:top": translator$k,
95924
+ "w:tr": translator$K,
95925
+ "w:trHeight": translator$O,
95926
+ "w:trPr": translator$L,
95927
+ "w:u": translator$16,
95928
+ "w:wAfter": translator$N,
95929
+ "w:wBefore": translator$M,
95930
+ "wp:anchor": translator$b,
95931
+ "wp:inline": translator$a,
95333
95932
  "w:commentRangeStart": commentRangeStartTranslator,
95334
95933
  "w:commentRangeEnd": commentRangeEndTranslator
95335
95934
  });