@harbour-enterprises/superdoc 0.21.0 → 0.22.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/chunks/{PdfViewer-OZDJ7gwT.cjs → PdfViewer-Ck3Syakz.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-D3zo7tPo.es.js → PdfViewer-OEs-MC5j.es.js} +1 -1
  3. package/dist/chunks/{index-MzW5BVNd.es.js → index-B4aklZ4_.es.js} +5 -4
  4. package/dist/chunks/{index-CfYf4T_z.cjs → index-BM732Zfw.cjs} +5 -4
  5. package/dist/chunks/{super-editor.es-Bntob7Wd.es.js → super-editor.es-Bokezk1E.es.js} +1179 -766
  6. package/dist/chunks/{super-editor.es-U-GVCd_F.cjs → super-editor.es-DwGNbrZq.cjs} +1179 -766
  7. package/dist/core/types/index.d.ts +8 -0
  8. package/dist/core/types/index.d.ts.map +1 -1
  9. package/dist/style.css +32 -27
  10. package/dist/super-editor/ai-writer.es.js +2 -2
  11. package/dist/super-editor/chunks/{converter-3xnF_NHq.js → converter-BcqEfCTg.js} +775 -645
  12. package/dist/super-editor/chunks/{docx-zipper-CZdELYi-.js → docx-zipper-DZ9ph0iQ.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-BqYH4kDD.js → editor-CTHD3ziL.js} +26 -3
  14. package/dist/super-editor/chunks/{toolbar-TkaE2kKM.js → toolbar-DLQeMuoQ.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/src/components/slash-menu/menuItems.d.ts +5 -1
  20. package/dist/super-editor/src/components/slash-menu/tests/testHelpers.d.ts +466 -0
  21. package/dist/super-editor/src/components/slash-menu/utils.d.ts +9 -2
  22. package/dist/super-editor/src/core/commands/__tests__/schemaWithLists.d.ts +2 -0
  23. package/dist/super-editor/src/core/commands/__tests__/testHelpers.d.ts +4 -0
  24. package/dist/super-editor/src/core/commands/__tests__/testSchema.d.ts +2 -0
  25. package/dist/super-editor/src/core/commands/tests/commandTestUtils.d.ts +7 -0
  26. package/dist/super-editor/src/core/commands/tests/test-schema.d.ts +2 -0
  27. package/dist/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/alternate-content-translator.d.ts +6 -0
  28. package/dist/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/index.d.ts +1 -0
  29. package/dist/super-editor/src/tests/helpers/helpers.d.ts +1 -0
  30. package/dist/super-editor/src/utils/contextmenu-helpers.d.ts +24 -0
  31. package/dist/super-editor/style.css +5 -0
  32. package/dist/super-editor/super-editor.es.js +453 -153
  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 +1182 -768
  39. package/dist/superdoc.umd.js.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/super-editor/src/extensions/run-item/index.d.ts +0 -1
  42. package/dist/super-editor/src/extensions/run-item/run-item.d.ts +0 -26
@@ -32058,37 +32058,37 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32058
32058
  };
32059
32059
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
32060
32060
  let NodeTranslator = _NodeTranslator;
32061
- const encode$17 = (attributes) => {
32061
+ const encode$18 = (attributes) => {
32062
32062
  return attributes["w:type"];
32063
32063
  };
32064
- const decode$_ = (attrs) => {
32064
+ const decode$$ = (attrs) => {
32065
32065
  const { lineBreakType } = attrs;
32066
32066
  return lineBreakType;
32067
32067
  };
32068
32068
  const attrConfig$F = Object.freeze({
32069
32069
  xmlName: "w:type",
32070
32070
  sdName: "lineBreakType",
32071
- encode: encode$17,
32072
- decode: decode$_
32071
+ encode: encode$18,
32072
+ decode: decode$$
32073
32073
  });
32074
- const encode$16 = (attributes) => {
32074
+ const encode$17 = (attributes) => {
32075
32075
  const xmlAttrValue = attributes["w:clear"];
32076
32076
  return xmlAttrValue;
32077
32077
  };
32078
- const decode$Z = (attrs) => {
32078
+ const decode$_ = (attrs) => {
32079
32079
  const { clear } = attrs;
32080
32080
  return clear;
32081
32081
  };
32082
32082
  const attrConfig$E = Object.freeze({
32083
32083
  xmlName: "w:clear",
32084
32084
  sdName: "clear",
32085
- encode: encode$16,
32086
- decode: decode$Z
32085
+ encode: encode$17,
32086
+ decode: decode$_
32087
32087
  });
32088
- const validXmlAttributes$l = [attrConfig$F, attrConfig$E];
32089
- const XML_NODE_NAME$t = "w:br";
32090
- const SD_NODE_NAME$c = "lineBreak";
32091
- const encode$15 = (_2, encodedAttrs) => {
32088
+ const validXmlAttributes$m = [attrConfig$F, attrConfig$E];
32089
+ const XML_NODE_NAME$u = "w:br";
32090
+ const SD_NODE_NAME$d = "lineBreak";
32091
+ const encode$16 = (_2, encodedAttrs) => {
32092
32092
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
32093
32093
  const translated = {
32094
32094
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -32098,7 +32098,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32098
32098
  }
32099
32099
  return translated;
32100
32100
  };
32101
- const decode$Y = (params2, decodedAttrs) => {
32101
+ const decode$Z = (params2, decodedAttrs) => {
32102
32102
  const { node } = params2;
32103
32103
  if (!node) return;
32104
32104
  const wBreak = { name: "w:br" };
@@ -32115,39 +32115,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32115
32115
  };
32116
32116
  return translated;
32117
32117
  };
32118
- const config$r = {
32119
- xmlName: XML_NODE_NAME$t,
32120
- sdNodeOrKeyName: SD_NODE_NAME$c,
32118
+ const config$s = {
32119
+ xmlName: XML_NODE_NAME$u,
32120
+ sdNodeOrKeyName: SD_NODE_NAME$d,
32121
32121
  type: NodeTranslator.translatorTypes.NODE,
32122
- encode: encode$15,
32123
- decode: decode$Y,
32124
- attributes: validXmlAttributes$l
32122
+ encode: encode$16,
32123
+ decode: decode$Z,
32124
+ attributes: validXmlAttributes$m
32125
32125
  };
32126
- const translator$15 = NodeTranslator.from(config$r);
32127
- const encode$14 = (attributes) => attributes?.["w:val"];
32128
- const decode$X = (attrs) => attrs?.highlight;
32126
+ const translator$16 = NodeTranslator.from(config$s);
32127
+ const encode$15 = (attributes) => attributes?.["w:val"];
32128
+ const decode$Y = (attrs) => attrs?.highlight;
32129
32129
  const attrConfig$D = Object.freeze({
32130
32130
  xmlName: "w:val",
32131
32131
  sdName: "highlight",
32132
- encode: encode$14,
32133
- decode: decode$X
32132
+ encode: encode$15,
32133
+ decode: decode$Y
32134
32134
  });
32135
- const validXmlAttributes$k = [attrConfig$D];
32136
- const XML_NODE_NAME$s = "w:highlight";
32135
+ const validXmlAttributes$l = [attrConfig$D];
32136
+ const XML_NODE_NAME$t = "w:highlight";
32137
32137
  const SD_ATTR_KEY$f = "highlight";
32138
32138
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
32139
- const encode$13 = (params2, encodedAttrs = {}) => {
32139
+ const encode$14 = (params2, encodedAttrs = {}) => {
32140
32140
  const { nodes } = params2;
32141
32141
  const node = nodes?.[0];
32142
32142
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
32143
32143
  return {
32144
32144
  type: "attr",
32145
- xmlName: XML_NODE_NAME$s,
32145
+ xmlName: XML_NODE_NAME$t,
32146
32146
  sdNodeOrKeyName: SD_ATTR_KEY$f,
32147
32147
  attributes: { "w:val": value ?? null }
32148
32148
  };
32149
32149
  };
32150
- const decode$W = (params2) => {
32150
+ const decode$X = (params2) => {
32151
32151
  const attrs = params2?.node?.attrs || {};
32152
32152
  const highlightValue = attrs.highlight ?? attrs.color ?? null;
32153
32153
  if (!highlightValue) return void 0;
@@ -32155,14 +32155,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32155
32155
  if (!normalizedValue) return void 0;
32156
32156
  if (DISABLED_TOKENS.has(normalizedValue)) {
32157
32157
  return {
32158
- name: XML_NODE_NAME$s,
32158
+ name: XML_NODE_NAME$t,
32159
32159
  attributes: { "w:val": "none" }
32160
32160
  };
32161
32161
  }
32162
32162
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
32163
32163
  if (keyword) {
32164
32164
  return {
32165
- name: XML_NODE_NAME$s,
32165
+ name: XML_NODE_NAME$t,
32166
32166
  attributes: { "w:val": keyword }
32167
32167
  };
32168
32168
  }
@@ -32177,63 +32177,63 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32177
32177
  }
32178
32178
  };
32179
32179
  };
32180
- const config$q = {
32181
- xmlName: XML_NODE_NAME$s,
32180
+ const config$r = {
32181
+ xmlName: XML_NODE_NAME$t,
32182
32182
  sdNodeOrKeyName: SD_ATTR_KEY$f,
32183
32183
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
32184
- encode: encode$13,
32185
- decode: decode$W,
32186
- attributes: validXmlAttributes$k
32184
+ encode: encode$14,
32185
+ decode: decode$X,
32186
+ attributes: validXmlAttributes$l
32187
32187
  };
32188
- const translator$14 = NodeTranslator.from(config$q);
32189
- const encode$12 = (attributes) => {
32188
+ const translator$15 = NodeTranslator.from(config$r);
32189
+ const encode$13 = (attributes) => {
32190
32190
  return attributes["w:val"];
32191
32191
  };
32192
- const decode$V = (attrs) => {
32192
+ const decode$W = (attrs) => {
32193
32193
  const { tabSize } = attrs || {};
32194
32194
  return tabSize;
32195
32195
  };
32196
32196
  const attrConfig$C = Object.freeze({
32197
32197
  xmlName: "w:val",
32198
32198
  sdName: "tabSize",
32199
- encode: encode$12,
32200
- decode: decode$V
32199
+ encode: encode$13,
32200
+ decode: decode$W
32201
32201
  });
32202
- const encode$11 = (attributes) => {
32202
+ const encode$12 = (attributes) => {
32203
32203
  return attributes["w:leader"];
32204
32204
  };
32205
- const decode$U = (attrs) => {
32205
+ const decode$V = (attrs) => {
32206
32206
  const { leader } = attrs || {};
32207
32207
  return leader;
32208
32208
  };
32209
32209
  const attrConfig$B = Object.freeze({
32210
32210
  xmlName: "w:leader",
32211
32211
  sdName: "leader",
32212
- encode: encode$11,
32213
- decode: decode$U
32212
+ encode: encode$12,
32213
+ decode: decode$V
32214
32214
  });
32215
- const encode$10 = (attributes) => {
32215
+ const encode$11 = (attributes) => {
32216
32216
  return attributes["w:pos"];
32217
32217
  };
32218
- const decode$T = (attrs) => {
32218
+ const decode$U = (attrs) => {
32219
32219
  const { pos } = attrs || {};
32220
32220
  return pos;
32221
32221
  };
32222
32222
  const attrConfig$A = Object.freeze({
32223
32223
  xmlName: "w:pos",
32224
32224
  sdName: "pos",
32225
- encode: encode$10,
32226
- decode: decode$T
32225
+ encode: encode$11,
32226
+ decode: decode$U
32227
32227
  });
32228
- const validXmlAttributes$j = [attrConfig$C, attrConfig$A, attrConfig$B];
32229
- const XML_NODE_NAME$r = "w:tab";
32230
- const SD_NODE_NAME$b = "tab";
32231
- const encode$$ = (_2, encodedAttrs = {}) => {
32228
+ const validXmlAttributes$k = [attrConfig$C, attrConfig$A, attrConfig$B];
32229
+ const XML_NODE_NAME$s = "w:tab";
32230
+ const SD_NODE_NAME$c = "tab";
32231
+ const encode$10 = (_2, encodedAttrs = {}) => {
32232
32232
  const translated = { type: "tab" };
32233
32233
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
32234
32234
  return translated;
32235
32235
  };
32236
- const decode$S = (params2, decodedAttrs = {}) => {
32236
+ const decode$T = (params2, decodedAttrs = {}) => {
32237
32237
  const { node } = params2 || {};
32238
32238
  if (!node) return;
32239
32239
  const wTab = { name: "w:tab" };
@@ -32249,15 +32249,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32249
32249
  }
32250
32250
  return translated;
32251
32251
  };
32252
- const config$p = {
32253
- xmlName: XML_NODE_NAME$r,
32254
- sdNodeOrKeyName: SD_NODE_NAME$b,
32252
+ const config$q = {
32253
+ xmlName: XML_NODE_NAME$s,
32254
+ sdNodeOrKeyName: SD_NODE_NAME$c,
32255
32255
  type: NodeTranslator.translatorTypes.NODE,
32256
- encode: encode$$,
32257
- decode: decode$S,
32258
- attributes: validXmlAttributes$j
32256
+ encode: encode$10,
32257
+ decode: decode$T,
32258
+ attributes: validXmlAttributes$k
32259
32259
  };
32260
- const translator$13 = NodeTranslator.from(config$p);
32260
+ const translator$14 = NodeTranslator.from(config$q);
32261
32261
  const mergeTextNodes = (nodes) => {
32262
32262
  if (!nodes || !Array.isArray(nodes)) {
32263
32263
  return nodes;
@@ -32872,91 +32872,91 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32872
32872
  }
32873
32873
  return schemaNode;
32874
32874
  };
32875
- const encode$_ = (attributes) => {
32875
+ const encode$$ = (attributes) => {
32876
32876
  return attributes["w:rsidDel"];
32877
32877
  };
32878
- const decode$R = (attrs) => {
32878
+ const decode$S = (attrs) => {
32879
32879
  return attrs.rsidDel;
32880
32880
  };
32881
32881
  const attrConfig$z = Object.freeze({
32882
32882
  xmlName: "w:rsidDel",
32883
32883
  sdName: "rsidDel",
32884
- encode: encode$_,
32885
- decode: decode$R
32884
+ encode: encode$$,
32885
+ decode: decode$S
32886
32886
  });
32887
- const encode$Z = (attributes) => {
32887
+ const encode$_ = (attributes) => {
32888
32888
  return attributes["w:rsidP"];
32889
32889
  };
32890
- const decode$Q = (attrs) => {
32890
+ const decode$R = (attrs) => {
32891
32891
  return attrs.rsidP;
32892
32892
  };
32893
32893
  const attrConfig$y = Object.freeze({
32894
32894
  xmlName: "w:rsidP",
32895
32895
  sdName: "rsidP",
32896
- encode: encode$Z,
32897
- decode: decode$Q
32896
+ encode: encode$_,
32897
+ decode: decode$R
32898
32898
  });
32899
- const encode$Y = (attributes) => {
32899
+ const encode$Z = (attributes) => {
32900
32900
  return attributes["w:rsidR"];
32901
32901
  };
32902
- const decode$P = (attrs) => {
32902
+ const decode$Q = (attrs) => {
32903
32903
  return attrs.rsidR;
32904
32904
  };
32905
32905
  const attrConfig$x = Object.freeze({
32906
32906
  xmlName: "w:rsidR",
32907
32907
  sdName: "rsidR",
32908
- encode: encode$Y,
32909
- decode: decode$P
32908
+ encode: encode$Z,
32909
+ decode: decode$Q
32910
32910
  });
32911
- const encode$X = (attributes) => {
32911
+ const encode$Y = (attributes) => {
32912
32912
  return attributes["w:rsidRPr"];
32913
32913
  };
32914
- const decode$O = (attrs) => {
32914
+ const decode$P = (attrs) => {
32915
32915
  return attrs.rsidRPr;
32916
32916
  };
32917
32917
  const attrConfig$w = Object.freeze({
32918
32918
  xmlName: "w:rsidRPr",
32919
32919
  sdName: "rsidRPr",
32920
- encode: encode$X,
32921
- decode: decode$O
32920
+ encode: encode$Y,
32921
+ decode: decode$P
32922
32922
  });
32923
- const encode$W = (attributes) => {
32923
+ const encode$X = (attributes) => {
32924
32924
  return attributes["w:rsidRDefault"];
32925
32925
  };
32926
- const decode$N = (attrs) => {
32926
+ const decode$O = (attrs) => {
32927
32927
  return attrs.rsidRDefault;
32928
32928
  };
32929
32929
  const attrConfig$v = Object.freeze({
32930
32930
  xmlName: "w:rsidRDefault",
32931
32931
  sdName: "rsidRDefault",
32932
- encode: encode$W,
32933
- decode: decode$N
32932
+ encode: encode$X,
32933
+ decode: decode$O
32934
32934
  });
32935
- const encode$V = (attributes) => {
32935
+ const encode$W = (attributes) => {
32936
32936
  return attributes["w14:paraId"];
32937
32937
  };
32938
- const decode$M = (attrs) => {
32938
+ const decode$N = (attrs) => {
32939
32939
  return attrs.paraId;
32940
32940
  };
32941
32941
  const attrConfig$u = Object.freeze({
32942
32942
  xmlName: "w14:paraId",
32943
32943
  sdName: "paraId",
32944
- encode: encode$V,
32945
- decode: decode$M
32944
+ encode: encode$W,
32945
+ decode: decode$N
32946
32946
  });
32947
- const encode$U = (attributes) => {
32947
+ const encode$V = (attributes) => {
32948
32948
  return attributes["w14:textId"];
32949
32949
  };
32950
- const decode$L = (attrs) => {
32950
+ const decode$M = (attrs) => {
32951
32951
  return attrs.textId;
32952
32952
  };
32953
32953
  const attrConfig$t = Object.freeze({
32954
32954
  xmlName: "w14:textId",
32955
32955
  sdName: "textId",
32956
- encode: encode$U,
32957
- decode: decode$L
32956
+ encode: encode$V,
32957
+ decode: decode$M
32958
32958
  });
32959
- const validXmlAttributes$i = [
32959
+ const validXmlAttributes$j = [
32960
32960
  attrConfig$u,
32961
32961
  attrConfig$t,
32962
32962
  attrConfig$x,
@@ -32965,9 +32965,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32965
32965
  attrConfig$w,
32966
32966
  attrConfig$z
32967
32967
  ];
32968
- const XML_NODE_NAME$q = "w:p";
32969
- const SD_NODE_NAME$a = "paragraph";
32970
- const encode$T = (params2, encodedAttrs = {}) => {
32968
+ const XML_NODE_NAME$r = "w:p";
32969
+ const SD_NODE_NAME$b = "paragraph";
32970
+ const encode$U = (params2, encodedAttrs = {}) => {
32971
32971
  const node = handleParagraphNode$1(params2);
32972
32972
  if (!node) return void 0;
32973
32973
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -32975,7 +32975,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32975
32975
  }
32976
32976
  return node;
32977
32977
  };
32978
- const decode$K = (params2, decodedAttrs = {}) => {
32978
+ const decode$L = (params2, decodedAttrs = {}) => {
32979
32979
  const translated = translateParagraphNode(params2);
32980
32980
  if (!translated) return void 0;
32981
32981
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -32983,16 +32983,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32983
32983
  }
32984
32984
  return translated;
32985
32985
  };
32986
- const config$o = {
32987
- xmlName: XML_NODE_NAME$q,
32988
- sdNodeOrKeyName: SD_NODE_NAME$a,
32986
+ const config$p = {
32987
+ xmlName: XML_NODE_NAME$r,
32988
+ sdNodeOrKeyName: SD_NODE_NAME$b,
32989
32989
  type: NodeTranslator.translatorTypes.NODE,
32990
- encode: encode$T,
32991
- decode: decode$K,
32992
- attributes: validXmlAttributes$i
32990
+ encode: encode$U,
32991
+ decode: decode$L,
32992
+ attributes: validXmlAttributes$j
32993
32993
  };
32994
- const translator$12 = NodeTranslator.from(config$o);
32995
- const encode$S = (attributes) => {
32994
+ const translator$13 = NodeTranslator.from(config$p);
32995
+ const encode$T = (attributes) => {
32996
32996
  const raw = attributes?.["w:val"];
32997
32997
  if (raw === void 0 || raw === null) return void 0;
32998
32998
  if (typeof raw === "boolean") return raw;
@@ -33002,20 +33002,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33002
33002
  if (val === "1" || val === "true" || val === "on") return true;
33003
33003
  return void 0;
33004
33004
  };
33005
- const decode$J = (runProps) => {
33005
+ const decode$K = (runProps) => {
33006
33006
  if (runProps?.bold === false) return "0";
33007
33007
  return void 0;
33008
33008
  };
33009
33009
  const attrConfig$s = Object.freeze({
33010
33010
  xmlName: "w:val",
33011
33011
  sdName: "bold",
33012
- encode: encode$S,
33013
- decode: decode$J
33012
+ encode: encode$T,
33013
+ decode: decode$K
33014
33014
  });
33015
- const validXmlAttributes$h = [attrConfig$s];
33016
- const XML_NODE_NAME$p = "w:b";
33015
+ const validXmlAttributes$i = [attrConfig$s];
33016
+ const XML_NODE_NAME$q = "w:b";
33017
33017
  const SD_ATTR_KEY$e = "bold";
33018
- const encode$R = (params2, encodedAttrs = {}) => {
33018
+ const encode$S = (params2, encodedAttrs = {}) => {
33019
33019
  const { nodes } = params2;
33020
33020
  const node = nodes[0];
33021
33021
  if (!node) return void 0;
@@ -33027,85 +33027,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33027
33027
  else attributes = node.attributes || {};
33028
33028
  return {
33029
33029
  type: "attr",
33030
- xmlName: XML_NODE_NAME$p,
33030
+ xmlName: XML_NODE_NAME$q,
33031
33031
  sdNodeOrKeyName: SD_ATTR_KEY$e,
33032
33032
  attributes
33033
33033
  };
33034
33034
  };
33035
- const config$n = {
33036
- xmlName: XML_NODE_NAME$p,
33035
+ const config$o = {
33036
+ xmlName: XML_NODE_NAME$q,
33037
33037
  sdNodeOrKeyName: SD_ATTR_KEY$e,
33038
33038
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33039
- encode: encode$R,
33040
- attributes: validXmlAttributes$h
33039
+ encode: encode$S,
33040
+ attributes: validXmlAttributes$i
33041
33041
  };
33042
- const translator$11 = NodeTranslator.from(config$n);
33043
- const XML_NODE_NAME$o = "w:i";
33042
+ const translator$12 = NodeTranslator.from(config$o);
33043
+ const XML_NODE_NAME$p = "w:i";
33044
33044
  const SD_ATTR_KEY$d = "italic";
33045
- const encode$Q = (params2) => {
33045
+ const encode$R = (params2) => {
33046
33046
  const { nodes } = params2;
33047
33047
  const node = nodes?.[0];
33048
33048
  if (!node) return void 0;
33049
33049
  return {
33050
33050
  type: "attr",
33051
- xmlName: XML_NODE_NAME$o,
33051
+ xmlName: XML_NODE_NAME$p,
33052
33052
  sdNodeOrKeyName: SD_ATTR_KEY$d,
33053
33053
  attributes: {
33054
33054
  "w:val": node.attributes?.["w:val"] ?? null
33055
33055
  }
33056
33056
  };
33057
33057
  };
33058
- const config$m = {
33059
- xmlName: XML_NODE_NAME$o,
33058
+ const config$n = {
33059
+ xmlName: XML_NODE_NAME$p,
33060
33060
  sdNodeOrKeyName: SD_ATTR_KEY$d,
33061
33061
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33062
- encode: encode$Q
33062
+ encode: encode$R
33063
33063
  };
33064
- const translator$10 = NodeTranslator.from(config$m);
33065
- const encode$P = (attributes) => attributes?.["w:val"];
33066
- const decode$I = (attrs) => attrs?.underline;
33064
+ const translator$11 = NodeTranslator.from(config$n);
33065
+ const encode$Q = (attributes) => attributes?.["w:val"];
33066
+ const decode$J = (attrs) => attrs?.underline;
33067
33067
  const attrConfig$r = Object.freeze({
33068
33068
  xmlName: "w:val",
33069
33069
  sdName: "underline",
33070
- encode: encode$P,
33071
- decode: decode$I
33070
+ encode: encode$Q,
33071
+ decode: decode$J
33072
33072
  });
33073
- const encode$O = (attributes) => attributes?.["w:color"];
33074
- const decode$H = (attrs) => attrs?.color;
33073
+ const encode$P = (attributes) => attributes?.["w:color"];
33074
+ const decode$I = (attrs) => attrs?.color;
33075
33075
  const attrConfig$q = Object.freeze({
33076
33076
  xmlName: "w:color",
33077
33077
  sdName: "color",
33078
- encode: encode$O,
33079
- decode: decode$H
33078
+ encode: encode$P,
33079
+ decode: decode$I
33080
33080
  });
33081
- const encode$N = (attributes) => attributes?.["w:themeColor"];
33082
- const decode$G = (attrs) => attrs?.themeColor;
33081
+ const encode$O = (attributes) => attributes?.["w:themeColor"];
33082
+ const decode$H = (attrs) => attrs?.themeColor;
33083
33083
  const attrConfig$p = Object.freeze({
33084
33084
  xmlName: "w:themeColor",
33085
33085
  sdName: "themeColor",
33086
- encode: encode$N,
33087
- decode: decode$G
33086
+ encode: encode$O,
33087
+ decode: decode$H
33088
33088
  });
33089
- const encode$M = (attributes) => attributes?.["w:themeTint"];
33090
- const decode$F = (attrs) => attrs?.themeTint;
33089
+ const encode$N = (attributes) => attributes?.["w:themeTint"];
33090
+ const decode$G = (attrs) => attrs?.themeTint;
33091
33091
  const attrConfig$o = Object.freeze({
33092
33092
  xmlName: "w:themeTint",
33093
33093
  sdName: "themeTint",
33094
- encode: encode$M,
33095
- decode: decode$F
33094
+ encode: encode$N,
33095
+ decode: decode$G
33096
33096
  });
33097
- const encode$L = (attributes) => attributes?.["w:themeShade"];
33098
- const decode$E = (attrs) => attrs?.themeShade;
33097
+ const encode$M = (attributes) => attributes?.["w:themeShade"];
33098
+ const decode$F = (attrs) => attrs?.themeShade;
33099
33099
  const attrConfig$n = Object.freeze({
33100
33100
  xmlName: "w:themeShade",
33101
33101
  sdName: "themeShade",
33102
- encode: encode$L,
33103
- decode: decode$E
33102
+ encode: encode$M,
33103
+ decode: decode$F
33104
33104
  });
33105
- const validXmlAttributes$g = [attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o, attrConfig$n];
33106
- const XML_NODE_NAME$n = "w:u";
33105
+ const validXmlAttributes$h = [attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o, attrConfig$n];
33106
+ const XML_NODE_NAME$o = "w:u";
33107
33107
  const SD_ATTR_KEY$c = "underline";
33108
- const encode$K = (params2, encodedAttrs = {}) => {
33108
+ const encode$L = (params2, encodedAttrs = {}) => {
33109
33109
  const { nodes } = params2;
33110
33110
  const node = nodes?.[0];
33111
33111
  const sourceAttrs = node?.attributes || {};
@@ -33121,12 +33121,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33121
33121
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
33122
33122
  return {
33123
33123
  type: "attr",
33124
- xmlName: XML_NODE_NAME$n,
33124
+ xmlName: XML_NODE_NAME$o,
33125
33125
  sdNodeOrKeyName: SD_ATTR_KEY$c,
33126
33126
  attributes
33127
33127
  };
33128
33128
  };
33129
- const decode$D = (params2) => {
33129
+ const decode$E = (params2) => {
33130
33130
  const attrs = params2?.node?.attrs || {};
33131
33131
  const underlineType = attrs.underlineType ?? attrs.underline ?? null;
33132
33132
  const color = attrs.underlineColor ?? attrs.color ?? null;
@@ -33144,20 +33144,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33144
33144
  if (themeTint) attributes["w:themeTint"] = themeTint;
33145
33145
  if (themeShade) attributes["w:themeShade"] = themeShade;
33146
33146
  return {
33147
- name: XML_NODE_NAME$n,
33147
+ name: XML_NODE_NAME$o,
33148
33148
  attributes
33149
33149
  };
33150
33150
  };
33151
- const config$l = {
33152
- xmlName: XML_NODE_NAME$n,
33151
+ const config$m = {
33152
+ xmlName: XML_NODE_NAME$o,
33153
33153
  sdNodeOrKeyName: SD_ATTR_KEY$c,
33154
33154
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33155
- encode: encode$K,
33156
- decode: decode$D,
33157
- attributes: validXmlAttributes$g
33155
+ encode: encode$L,
33156
+ decode: decode$E,
33157
+ attributes: validXmlAttributes$h
33158
33158
  };
33159
- const translator$$ = NodeTranslator.from(config$l);
33160
- const encode$J = (attributes) => {
33159
+ const translator$10 = NodeTranslator.from(config$m);
33160
+ const encode$K = (attributes) => {
33161
33161
  const raw = attributes?.["w:val"];
33162
33162
  if (raw === void 0 || raw === null) return void 0;
33163
33163
  if (typeof raw === "boolean") return raw;
@@ -33167,20 +33167,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33167
33167
  if (val === "1" || val === "true" || val === "on") return true;
33168
33168
  return void 0;
33169
33169
  };
33170
- const decode$C = (attrs) => {
33170
+ const decode$D = (attrs) => {
33171
33171
  if (attrs?.strike === false) return "0";
33172
33172
  return void 0;
33173
33173
  };
33174
33174
  const attrConfig$m = Object.freeze({
33175
33175
  xmlName: "w:val",
33176
33176
  sdName: "strike",
33177
- encode: encode$J,
33178
- decode: decode$C
33177
+ encode: encode$K,
33178
+ decode: decode$D
33179
33179
  });
33180
- const validXmlAttributes$f = [attrConfig$m];
33181
- const XML_NODE_NAME$m = "w:strike";
33180
+ const validXmlAttributes$g = [attrConfig$m];
33181
+ const XML_NODE_NAME$n = "w:strike";
33182
33182
  const SD_ATTR_KEY$b = "strike";
33183
- const encode$I = (params2, encodedAttrs = {}) => {
33183
+ const encode$J = (params2, encodedAttrs = {}) => {
33184
33184
  const { nodes } = params2;
33185
33185
  const node = nodes?.[0];
33186
33186
  if (!node) return void 0;
@@ -33193,55 +33193,55 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33193
33193
  else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
33194
33194
  return {
33195
33195
  type: "attr",
33196
- xmlName: XML_NODE_NAME$m,
33196
+ xmlName: XML_NODE_NAME$n,
33197
33197
  sdNodeOrKeyName: SD_ATTR_KEY$b,
33198
33198
  attributes
33199
33199
  };
33200
33200
  };
33201
- const config$k = {
33202
- xmlName: XML_NODE_NAME$m,
33201
+ const config$l = {
33202
+ xmlName: XML_NODE_NAME$n,
33203
33203
  sdNodeOrKeyName: SD_ATTR_KEY$b,
33204
33204
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33205
- encode: encode$I,
33206
- attributes: validXmlAttributes$f
33205
+ encode: encode$J,
33206
+ attributes: validXmlAttributes$g
33207
33207
  };
33208
- const translator$_ = NodeTranslator.from(config$k);
33209
- const encode$H = (attributes) => attributes?.["w:val"];
33210
- const decode$B = (attrs) => attrs?.color;
33208
+ const translator$$ = NodeTranslator.from(config$l);
33209
+ const encode$I = (attributes) => attributes?.["w:val"];
33210
+ const decode$C = (attrs) => attrs?.color;
33211
33211
  const attrConfig$l = Object.freeze({
33212
33212
  xmlName: "w:val",
33213
33213
  sdName: "color",
33214
- encode: encode$H,
33215
- decode: decode$B
33214
+ encode: encode$I,
33215
+ decode: decode$C
33216
33216
  });
33217
- const encode$G = (attributes) => attributes?.["w:themeColor"];
33218
- const decode$A = (attrs) => attrs?.themeColor;
33217
+ const encode$H = (attributes) => attributes?.["w:themeColor"];
33218
+ const decode$B = (attrs) => attrs?.themeColor;
33219
33219
  const attrConfig$k = Object.freeze({
33220
33220
  xmlName: "w:themeColor",
33221
33221
  sdName: "themeColor",
33222
- encode: encode$G,
33223
- decode: decode$A
33222
+ encode: encode$H,
33223
+ decode: decode$B
33224
33224
  });
33225
- const encode$F = (attributes) => attributes?.["w:themeTint"];
33226
- const decode$z = (attrs) => attrs?.themeTint;
33225
+ const encode$G = (attributes) => attributes?.["w:themeTint"];
33226
+ const decode$A = (attrs) => attrs?.themeTint;
33227
33227
  const attrConfig$j = Object.freeze({
33228
33228
  xmlName: "w:themeTint",
33229
33229
  sdName: "themeTint",
33230
- encode: encode$F,
33231
- decode: decode$z
33230
+ encode: encode$G,
33231
+ decode: decode$A
33232
33232
  });
33233
- const encode$E = (attributes) => attributes?.["w:themeShade"];
33234
- const decode$y = (attrs) => attrs?.themeShade;
33233
+ const encode$F = (attributes) => attributes?.["w:themeShade"];
33234
+ const decode$z = (attrs) => attrs?.themeShade;
33235
33235
  const attrConfig$i = Object.freeze({
33236
33236
  xmlName: "w:themeShade",
33237
33237
  sdName: "themeShade",
33238
- encode: encode$E,
33239
- decode: decode$y
33238
+ encode: encode$F,
33239
+ decode: decode$z
33240
33240
  });
33241
- const validXmlAttributes$e = [attrConfig$l, attrConfig$k, attrConfig$j, attrConfig$i];
33242
- const XML_NODE_NAME$l = "w:color";
33241
+ const validXmlAttributes$f = [attrConfig$l, attrConfig$k, attrConfig$j, attrConfig$i];
33242
+ const XML_NODE_NAME$m = "w:color";
33243
33243
  const SD_ATTR_KEY$a = "color";
33244
- const encode$D = (params2, encodedAttrs = {}) => {
33244
+ const encode$E = (params2, encodedAttrs = {}) => {
33245
33245
  const { nodes } = params2;
33246
33246
  const node = nodes?.[0];
33247
33247
  const sourceAttrs = node?.attributes || {};
@@ -33256,63 +33256,63 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33256
33256
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
33257
33257
  return {
33258
33258
  type: "attr",
33259
- xmlName: XML_NODE_NAME$l,
33259
+ xmlName: XML_NODE_NAME$m,
33260
33260
  sdNodeOrKeyName: SD_ATTR_KEY$a,
33261
33261
  attributes
33262
33262
  };
33263
33263
  };
33264
- const config$j = {
33265
- xmlName: XML_NODE_NAME$l,
33264
+ const config$k = {
33265
+ xmlName: XML_NODE_NAME$m,
33266
33266
  sdNodeOrKeyName: SD_ATTR_KEY$a,
33267
33267
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33268
- encode: encode$D,
33269
- attributes: validXmlAttributes$e
33268
+ encode: encode$E,
33269
+ attributes: validXmlAttributes$f
33270
33270
  };
33271
- const translator$Z = NodeTranslator.from(config$j);
33272
- const encode$C = (attributes) => attributes?.["w:eastAsia"];
33273
- const decode$x = (attrs) => attrs?.eastAsia;
33271
+ const translator$_ = NodeTranslator.from(config$k);
33272
+ const encode$D = (attributes) => attributes?.["w:eastAsia"];
33273
+ const decode$y = (attrs) => attrs?.eastAsia;
33274
33274
  const attrConfig$h = Object.freeze({
33275
33275
  xmlName: "w:eastAsia",
33276
33276
  sdName: "eastAsia",
33277
- encode: encode$C,
33278
- decode: decode$x
33277
+ encode: encode$D,
33278
+ decode: decode$y
33279
33279
  });
33280
- const encode$B = (attributes) => attributes?.["w:ascii"];
33281
- const decode$w = (attrs) => attrs?.ascii;
33280
+ const encode$C = (attributes) => attributes?.["w:ascii"];
33281
+ const decode$x = (attrs) => attrs?.ascii;
33282
33282
  const attrConfig$g = Object.freeze({
33283
33283
  xmlName: "w:ascii",
33284
33284
  sdName: "ascii",
33285
- encode: encode$B,
33286
- decode: decode$w
33285
+ encode: encode$C,
33286
+ decode: decode$x
33287
33287
  });
33288
- const encode$A = (attributes) => attributes?.["w:hAnsi"];
33289
- const decode$v = (attrs) => attrs?.hAnsi;
33288
+ const encode$B = (attributes) => attributes?.["w:hAnsi"];
33289
+ const decode$w = (attrs) => attrs?.hAnsi;
33290
33290
  const attrConfig$f = Object.freeze({
33291
33291
  xmlName: "w:hAnsi",
33292
33292
  sdName: "hAnsi",
33293
- encode: encode$A,
33294
- decode: decode$v
33293
+ encode: encode$B,
33294
+ decode: decode$w
33295
33295
  });
33296
- const encode$z = (attributes) => attributes?.["w:cs"];
33297
- const decode$u = (attrs) => attrs?.cs;
33296
+ const encode$A = (attributes) => attributes?.["w:cs"];
33297
+ const decode$v = (attrs) => attrs?.cs;
33298
33298
  const attrConfig$e = Object.freeze({
33299
33299
  xmlName: "w:cs",
33300
33300
  sdName: "cs",
33301
- encode: encode$z,
33302
- decode: decode$u
33301
+ encode: encode$A,
33302
+ decode: decode$v
33303
33303
  });
33304
- const encode$y = (attributes) => attributes?.["w:val"];
33305
- const decode$t = (attrs) => attrs?.value;
33304
+ const encode$z = (attributes) => attributes?.["w:val"];
33305
+ const decode$u = (attrs) => attrs?.value;
33306
33306
  const attrConfig$d = Object.freeze({
33307
33307
  xmlName: "w:val",
33308
33308
  sdName: "value",
33309
- encode: encode$y,
33310
- decode: decode$t
33309
+ encode: encode$z,
33310
+ decode: decode$u
33311
33311
  });
33312
- const validXmlAttributes$d = [attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e, attrConfig$d];
33313
- const XML_NODE_NAME$k = "w:rFonts";
33312
+ const validXmlAttributes$e = [attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e, attrConfig$d];
33313
+ const XML_NODE_NAME$l = "w:rFonts";
33314
33314
  const SD_ATTR_KEY$9 = "fontFamily";
33315
- const encode$x = (params2, encodedAttrs = {}) => {
33315
+ const encode$y = (params2, encodedAttrs = {}) => {
33316
33316
  const { nodes } = params2;
33317
33317
  const node = nodes?.[0];
33318
33318
  const sourceAttrs = node?.attributes || {};
@@ -33338,120 +33338,120 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33338
33338
  if (attributes["w:val"] === void 0) delete attributes["w:val"];
33339
33339
  return {
33340
33340
  type: "attr",
33341
- xmlName: XML_NODE_NAME$k,
33341
+ xmlName: XML_NODE_NAME$l,
33342
33342
  sdNodeOrKeyName: SD_ATTR_KEY$9,
33343
33343
  attributes
33344
33344
  };
33345
33345
  };
33346
- const config$i = {
33347
- xmlName: XML_NODE_NAME$k,
33346
+ const config$j = {
33347
+ xmlName: XML_NODE_NAME$l,
33348
33348
  sdNodeOrKeyName: SD_ATTR_KEY$9,
33349
33349
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33350
- encode: encode$x,
33351
- attributes: validXmlAttributes$d
33350
+ encode: encode$y,
33351
+ attributes: validXmlAttributes$e
33352
33352
  };
33353
- const translator$Y = NodeTranslator.from(config$i);
33354
- const encode$w = (attributes) => attributes?.["w:val"];
33355
- const decode$s = (attrs) => attrs?.styleId;
33353
+ const translator$Z = NodeTranslator.from(config$j);
33354
+ const encode$x = (attributes) => attributes?.["w:val"];
33355
+ const decode$t = (attrs) => attrs?.styleId;
33356
33356
  const attrConfig$c = Object.freeze({
33357
33357
  xmlName: "w:val",
33358
33358
  sdName: "styleId",
33359
- encode: encode$w,
33360
- decode: decode$s
33359
+ encode: encode$x,
33360
+ decode: decode$t
33361
33361
  });
33362
- const validXmlAttributes$c = [attrConfig$c];
33363
- const XML_NODE_NAME$j = "w:rStyle";
33362
+ const validXmlAttributes$d = [attrConfig$c];
33363
+ const XML_NODE_NAME$k = "w:rStyle";
33364
33364
  const SD_ATTR_KEY$8 = "styleId";
33365
- const encode$v = (params2, encodedAttrs = {}) => {
33365
+ const encode$w = (params2, encodedAttrs = {}) => {
33366
33366
  const { nodes } = params2;
33367
33367
  const node = nodes?.[0];
33368
33368
  const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
33369
33369
  return {
33370
33370
  type: "attr",
33371
- xmlName: XML_NODE_NAME$j,
33371
+ xmlName: XML_NODE_NAME$k,
33372
33372
  sdNodeOrKeyName: SD_ATTR_KEY$8,
33373
33373
  attributes: { "w:val": value ?? null }
33374
33374
  };
33375
33375
  };
33376
- const config$h = {
33377
- xmlName: XML_NODE_NAME$j,
33376
+ const config$i = {
33377
+ xmlName: XML_NODE_NAME$k,
33378
33378
  sdNodeOrKeyName: SD_ATTR_KEY$8,
33379
33379
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33380
- encode: encode$v,
33381
- attributes: validXmlAttributes$c
33380
+ encode: encode$w,
33381
+ attributes: validXmlAttributes$d
33382
33382
  };
33383
- const translator$X = NodeTranslator.from(config$h);
33384
- const encode$u = (attributes) => attributes?.["w:val"];
33385
- const decode$r = (attrs) => attrs?.fontSize;
33383
+ const translator$Y = NodeTranslator.from(config$i);
33384
+ const encode$v = (attributes) => attributes?.["w:val"];
33385
+ const decode$s = (attrs) => attrs?.fontSize;
33386
33386
  const attrConfig$b = Object.freeze({
33387
33387
  xmlName: "w:val",
33388
33388
  sdName: "fontSize",
33389
- encode: encode$u,
33390
- decode: decode$r
33389
+ encode: encode$v,
33390
+ decode: decode$s
33391
33391
  });
33392
- const validXmlAttributes$b = [attrConfig$b];
33393
- const XML_NODE_NAME$i = "w:sz";
33392
+ const validXmlAttributes$c = [attrConfig$b];
33393
+ const XML_NODE_NAME$j = "w:sz";
33394
33394
  const SD_ATTR_KEY$7 = "fontSize";
33395
- const encode$t = (params2, encodedAttrs = {}) => {
33395
+ const encode$u = (params2, encodedAttrs = {}) => {
33396
33396
  const { nodes } = params2;
33397
33397
  const node = nodes?.[0];
33398
33398
  const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
33399
33399
  return {
33400
33400
  type: "attr",
33401
- xmlName: XML_NODE_NAME$i,
33401
+ xmlName: XML_NODE_NAME$j,
33402
33402
  sdNodeOrKeyName: SD_ATTR_KEY$7,
33403
33403
  attributes: { "w:val": value ?? null }
33404
33404
  };
33405
33405
  };
33406
- const config$g = {
33407
- xmlName: XML_NODE_NAME$i,
33406
+ const config$h = {
33407
+ xmlName: XML_NODE_NAME$j,
33408
33408
  sdNodeOrKeyName: SD_ATTR_KEY$7,
33409
33409
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33410
- encode: encode$t,
33411
- attributes: validXmlAttributes$b
33410
+ encode: encode$u,
33411
+ attributes: validXmlAttributes$c
33412
33412
  };
33413
- const translator$W = NodeTranslator.from(config$g);
33414
- const encode$s = (attributes) => attributes?.["w:val"];
33415
- const decode$q = (attrs) => attrs?.fontSizeCs;
33413
+ const translator$X = NodeTranslator.from(config$h);
33414
+ const encode$t = (attributes) => attributes?.["w:val"];
33415
+ const decode$r = (attrs) => attrs?.fontSizeCs;
33416
33416
  const attrConfig$a = Object.freeze({
33417
33417
  xmlName: "w:val",
33418
33418
  sdName: "fontSizeCs",
33419
- encode: encode$s,
33420
- decode: decode$q
33419
+ encode: encode$t,
33420
+ decode: decode$r
33421
33421
  });
33422
- const validXmlAttributes$a = [attrConfig$a];
33423
- const XML_NODE_NAME$h = "w:szCs";
33422
+ const validXmlAttributes$b = [attrConfig$a];
33423
+ const XML_NODE_NAME$i = "w:szCs";
33424
33424
  const SD_ATTR_KEY$6 = "fontSizeCs";
33425
- const encode$r = (params2, encodedAttrs = {}) => {
33425
+ const encode$s = (params2, encodedAttrs = {}) => {
33426
33426
  const { nodes } = params2;
33427
33427
  const node = nodes?.[0];
33428
33428
  const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
33429
33429
  return {
33430
33430
  type: "attr",
33431
- xmlName: XML_NODE_NAME$h,
33431
+ xmlName: XML_NODE_NAME$i,
33432
33432
  sdNodeOrKeyName: SD_ATTR_KEY$6,
33433
33433
  attributes: { "w:val": value ?? null }
33434
33434
  };
33435
33435
  };
33436
- const config$f = {
33437
- xmlName: XML_NODE_NAME$h,
33436
+ const config$g = {
33437
+ xmlName: XML_NODE_NAME$i,
33438
33438
  sdNodeOrKeyName: SD_ATTR_KEY$6,
33439
33439
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33440
- encode: encode$r,
33441
- attributes: validXmlAttributes$a
33440
+ encode: encode$s,
33441
+ attributes: validXmlAttributes$b
33442
33442
  };
33443
- const translator$V = NodeTranslator.from(config$f);
33443
+ const translator$W = NodeTranslator.from(config$g);
33444
33444
  const runPropertyTranslators = Object.freeze({
33445
- "w:b": translator$11,
33446
- "w:i": translator$10,
33447
- "w:u": translator$$,
33448
- "w:strike": translator$_,
33449
- "w:color": translator$Z,
33450
- "w:highlight": translator$14,
33451
- "w:rFonts": translator$Y,
33452
- "w:rStyle": translator$X,
33453
- "w:sz": translator$W,
33454
- "w:szCs": translator$V
33445
+ "w:b": translator$12,
33446
+ "w:i": translator$11,
33447
+ "w:u": translator$10,
33448
+ "w:strike": translator$$,
33449
+ "w:color": translator$_,
33450
+ "w:highlight": translator$15,
33451
+ "w:rFonts": translator$Z,
33452
+ "w:rStyle": translator$Y,
33453
+ "w:sz": translator$X,
33454
+ "w:szCs": translator$W
33455
33455
  });
33456
33456
  const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
33457
33457
  const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
@@ -33465,9 +33465,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33465
33465
  attributes: { ...candidate.attributes || {} }
33466
33466
  };
33467
33467
  };
33468
- const XML_NODE_NAME$g = "w:rPr";
33468
+ const XML_NODE_NAME$h = "w:rPr";
33469
33469
  const SD_ATTR_KEY$5 = "runProperties";
33470
- const encode$q = (params2) => {
33470
+ const encode$r = (params2) => {
33471
33471
  const { nodes } = params2;
33472
33472
  const node = nodes?.[0] || {};
33473
33473
  const contents = Array.isArray(node.elements) ? node.elements : [];
@@ -33501,16 +33501,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33501
33501
  attributes: runPropsArray
33502
33502
  };
33503
33503
  };
33504
- const config$e = {
33505
- xmlName: XML_NODE_NAME$g,
33504
+ const config$f = {
33505
+ xmlName: XML_NODE_NAME$h,
33506
33506
  sdNodeOrKeyName: SD_ATTR_KEY$5,
33507
33507
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33508
- encode: encode$q
33508
+ encode: encode$r
33509
33509
  };
33510
- const translator$U = NodeTranslator.from(config$e);
33510
+ const translator$V = NodeTranslator.from(config$f);
33511
33511
  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;
33512
33512
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
33513
- const collectRunProperties = (params2, rPrNode, translator2 = translator$U) => {
33513
+ const collectRunProperties = (params2, rPrNode, translator2 = translator$V) => {
33514
33514
  if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
33515
33515
  const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
33516
33516
  let entries = [];
@@ -33972,46 +33972,46 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33972
33972
  }
33973
33973
  return runs;
33974
33974
  };
33975
- const encode$p = (attributes) => {
33975
+ const encode$q = (attributes) => {
33976
33976
  return attributes["w:rsidR"];
33977
33977
  };
33978
- const decode$p = (attrs) => {
33978
+ const decode$q = (attrs) => {
33979
33979
  return attrs.rsidR;
33980
33980
  };
33981
33981
  const attrConfig$9 = Object.freeze({
33982
33982
  xmlName: "w:rsidR",
33983
33983
  sdName: "rsidR",
33984
- encode: encode$p,
33985
- decode: decode$p
33984
+ encode: encode$q,
33985
+ decode: decode$q
33986
33986
  });
33987
- const encode$o = (attributes) => {
33987
+ const encode$p = (attributes) => {
33988
33988
  return attributes["w:rsidRPr"];
33989
33989
  };
33990
- const decode$o = (attrs) => {
33990
+ const decode$p = (attrs) => {
33991
33991
  return attrs.rsidRPr;
33992
33992
  };
33993
33993
  const attrConfig$8 = Object.freeze({
33994
33994
  xmlName: "w:rsidRPr",
33995
33995
  sdName: "rsidRPr",
33996
- encode: encode$o,
33997
- decode: decode$o
33996
+ encode: encode$p,
33997
+ decode: decode$p
33998
33998
  });
33999
- const encode$n = (attributes) => {
33999
+ const encode$o = (attributes) => {
34000
34000
  return attributes["w:rsidDel"];
34001
34001
  };
34002
- const decode$n = (attrs) => {
34002
+ const decode$o = (attrs) => {
34003
34003
  return attrs.rsidDel;
34004
34004
  };
34005
34005
  const attrConfig$7 = Object.freeze({
34006
34006
  xmlName: "w:rsidDel",
34007
34007
  sdName: "rsidDel",
34008
- encode: encode$n,
34009
- decode: decode$n
34008
+ encode: encode$o,
34009
+ decode: decode$o
34010
34010
  });
34011
- const validXmlAttributes$9 = [attrConfig$9, attrConfig$8, attrConfig$7];
34012
- const XML_NODE_NAME$f = "w:r";
34011
+ const validXmlAttributes$a = [attrConfig$9, attrConfig$8, attrConfig$7];
34012
+ const XML_NODE_NAME$g = "w:r";
34013
34013
  const SD_KEY_NAME = "run";
34014
- const encode$m = (params2, encodedAttrs = {}) => {
34014
+ const encode$n = (params2, encodedAttrs = {}) => {
34015
34015
  const { nodes = [], nodeListHandler } = params2 || {};
34016
34016
  const runNode = nodes[0];
34017
34017
  if (!runNode) return void 0;
@@ -34059,7 +34059,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34059
34059
  }
34060
34060
  return runNodeResult;
34061
34061
  };
34062
- const decode$m = (params2, decodedAttrs = {}) => {
34062
+ const decode$n = (params2, decodedAttrs = {}) => {
34063
34063
  const { node } = params2 || {};
34064
34064
  if (!node) return void 0;
34065
34065
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
@@ -34116,7 +34116,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34116
34116
  runs.push(trackedClone);
34117
34117
  return;
34118
34118
  }
34119
- const runWrapper = { name: XML_NODE_NAME$f, elements: [] };
34119
+ const runWrapper = { name: XML_NODE_NAME$g, elements: [] };
34120
34120
  applyBaseRunProps(runWrapper);
34121
34121
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
34122
34122
  runWrapper.elements.push(cloneXmlNode(child));
@@ -34124,7 +34124,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34124
34124
  });
34125
34125
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
34126
34126
  if (!trackedRuns.length) {
34127
- const emptyRun = { name: XML_NODE_NAME$f, elements: [] };
34127
+ const emptyRun = { name: XML_NODE_NAME$g, elements: [] };
34128
34128
  applyBaseRunProps(emptyRun);
34129
34129
  trackedRuns.push(emptyRun);
34130
34130
  }
@@ -34138,15 +34138,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34138
34138
  }
34139
34139
  return trackedRuns;
34140
34140
  };
34141
- const config$d = {
34142
- xmlName: XML_NODE_NAME$f,
34141
+ const config$e = {
34142
+ xmlName: XML_NODE_NAME$g,
34143
34143
  sdNodeOrKeyName: SD_KEY_NAME,
34144
34144
  type: NodeTranslator.translatorTypes.NODE,
34145
- encode: encode$m,
34146
- decode: decode$m,
34147
- attributes: validXmlAttributes$9
34145
+ encode: encode$n,
34146
+ decode: decode$n,
34147
+ attributes: validXmlAttributes$a
34148
34148
  };
34149
- const translator$T = NodeTranslator.from(config$d);
34149
+ const translator$U = NodeTranslator.from(config$e);
34150
34150
  const generateV2HandlerEntity = (handlerName, translator2) => ({
34151
34151
  handlerName,
34152
34152
  handler: (params2) => {
@@ -34320,13 +34320,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34320
34320
  }
34321
34321
  return table;
34322
34322
  }
34323
- const translator$S = NodeTranslator.from({
34323
+ const translator$T = NodeTranslator.from({
34324
34324
  xmlName: "w:cantSplit",
34325
34325
  sdNodeOrKeyName: "cantSplit",
34326
34326
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
34327
34327
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
34328
34328
  });
34329
- const translator$R = NodeTranslator.from({
34329
+ const translator$S = NodeTranslator.from({
34330
34330
  xmlName: "w:cnfStyle",
34331
34331
  sdNodeOrKeyName: "cnfStyle",
34332
34332
  attributes: [
@@ -34352,8 +34352,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34352
34352
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34353
34353
  }
34354
34354
  });
34355
- const translator$Q = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
34356
- const translator$P = NodeTranslator.from(
34355
+ const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
34356
+ const translator$Q = NodeTranslator.from(
34357
34357
  createSingleAttrPropertyHandler(
34358
34358
  "w:gridAfter",
34359
34359
  null,
@@ -34362,7 +34362,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34362
34362
  (v2) => integerToString(v2)
34363
34363
  )
34364
34364
  );
34365
- const translator$O = NodeTranslator.from(
34365
+ const translator$P = NodeTranslator.from(
34366
34366
  createSingleAttrPropertyHandler(
34367
34367
  "w:gridBefore",
34368
34368
  null,
@@ -34371,21 +34371,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34371
34371
  (v2) => integerToString(v2)
34372
34372
  )
34373
34373
  );
34374
- const translator$N = NodeTranslator.from({
34374
+ const translator$O = NodeTranslator.from({
34375
34375
  xmlName: "w:hidden",
34376
34376
  sdNodeOrKeyName: "hidden",
34377
34377
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
34378
34378
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
34379
34379
  });
34380
- const translator$M = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
34381
- const translator$L = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
34382
- const translator$K = NodeTranslator.from({
34380
+ const translator$N = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
34381
+ const translator$M = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
34382
+ const translator$L = NodeTranslator.from({
34383
34383
  xmlName: "w:tblHeader",
34384
34384
  sdNodeOrKeyName: "repeatHeader",
34385
34385
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
34386
34386
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
34387
34387
  });
34388
- const translator$J = NodeTranslator.from({
34388
+ const translator$K = NodeTranslator.from({
34389
34389
  xmlName: "w:trHeight",
34390
34390
  sdNodeOrKeyName: "rowHeight",
34391
34391
  encode: ({ nodes }) => {
@@ -34412,11 +34412,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34412
34412
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
34413
34413
  }
34414
34414
  });
34415
- const translator$I = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
34416
- const translator$H = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
34417
- const XML_NODE_NAME$e = "w:trPr";
34415
+ const translator$J = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
34416
+ const translator$I = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
34417
+ const XML_NODE_NAME$f = "w:trPr";
34418
34418
  const SD_ATTR_KEY$4 = "tableRowProperties";
34419
- const encode$l = (params2) => {
34419
+ const encode$m = (params2) => {
34420
34420
  const { nodes } = params2;
34421
34421
  const node = nodes[0];
34422
34422
  let attributes = {
@@ -34430,12 +34430,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34430
34430
  };
34431
34431
  return {
34432
34432
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
34433
- xmlName: XML_NODE_NAME$e,
34433
+ xmlName: XML_NODE_NAME$f,
34434
34434
  sdNodeOrKeyName: SD_ATTR_KEY$4,
34435
34435
  attributes
34436
34436
  };
34437
34437
  };
34438
- const decode$l = (params2) => {
34438
+ const decode$m = (params2) => {
34439
34439
  const { tableRowProperties = {} } = params2.node.attrs || {};
34440
34440
  const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
34441
34441
  const newNode = {
@@ -34447,6 +34447,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34447
34447
  return newNode;
34448
34448
  };
34449
34449
  const propertyTranslators$3 = [
34450
+ translator$T,
34450
34451
  translator$S,
34451
34452
  translator$R,
34452
34453
  translator$Q,
@@ -34457,8 +34458,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34457
34458
  translator$L,
34458
34459
  translator$K,
34459
34460
  translator$J,
34460
- translator$I,
34461
- translator$H
34461
+ translator$I
34462
34462
  ];
34463
34463
  const propertyTranslatorsByXmlName$2 = {};
34464
34464
  propertyTranslators$3.forEach((translator2) => {
@@ -34468,25 +34468,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34468
34468
  propertyTranslators$3.forEach((translator2) => {
34469
34469
  propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
34470
34470
  });
34471
- const config$c = {
34472
- xmlName: XML_NODE_NAME$e,
34471
+ const config$d = {
34472
+ xmlName: XML_NODE_NAME$f,
34473
34473
  sdNodeOrKeyName: SD_ATTR_KEY$4,
34474
34474
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
34475
- encode: encode$l,
34476
- decode: decode$l
34475
+ encode: encode$m,
34476
+ decode: decode$m
34477
34477
  };
34478
- const translator$G = NodeTranslator.from(config$c);
34479
- const XML_NODE_NAME$d = "w:tr";
34480
- const SD_NODE_NAME$9 = "tableRow";
34481
- const validXmlAttributes$8 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
34478
+ const translator$H = NodeTranslator.from(config$d);
34479
+ const XML_NODE_NAME$e = "w:tr";
34480
+ const SD_NODE_NAME$a = "tableRow";
34481
+ const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
34482
34482
  (xmlName) => createAttributeHandler(xmlName)
34483
34483
  );
34484
- const encode$k = (params2, encodedAttrs) => {
34484
+ const encode$l = (params2, encodedAttrs) => {
34485
34485
  const { row } = params2.extraParams;
34486
34486
  let tableRowProperties = {};
34487
34487
  const tPr = row.elements.find((el) => el.name === "w:trPr");
34488
34488
  if (tPr) {
34489
- ({ attributes: tableRowProperties } = translator$G.encode({
34489
+ ({ attributes: tableRowProperties } = translator$H.encode({
34490
34490
  ...params2,
34491
34491
  nodes: [tPr]
34492
34492
  }));
@@ -34499,7 +34499,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34499
34499
  let currentColumnIndex = 0;
34500
34500
  const content = cellNodes?.map((n) => {
34501
34501
  let columnWidth = gridColumnWidths?.[currentColumnIndex] || null;
34502
- const result = translator$7.encode({
34502
+ const result = translator$8.encode({
34503
34503
  ...params2,
34504
34504
  extraParams: {
34505
34505
  ...params2.extraParams,
@@ -34521,7 +34521,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34521
34521
  };
34522
34522
  return newNode;
34523
34523
  };
34524
- const decode$k = (params2, decodedAttrs) => {
34524
+ const decode$l = (params2, decodedAttrs) => {
34525
34525
  const { node } = params2;
34526
34526
  const elements = translateChildNodes(params2);
34527
34527
  if (node.attrs?.tableRowProperties) {
@@ -34533,7 +34533,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34533
34533
  }
34534
34534
  }
34535
34535
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
34536
- const trPr = translator$G.decode({
34536
+ const trPr = translator$H.decode({
34537
34537
  ...params2,
34538
34538
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
34539
34539
  });
@@ -34545,22 +34545,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34545
34545
  elements
34546
34546
  };
34547
34547
  };
34548
- const config$b = {
34549
- xmlName: XML_NODE_NAME$d,
34550
- sdNodeOrKeyName: SD_NODE_NAME$9,
34548
+ const config$c = {
34549
+ xmlName: XML_NODE_NAME$e,
34550
+ sdNodeOrKeyName: SD_NODE_NAME$a,
34551
34551
  type: NodeTranslator.translatorTypes.NODE,
34552
- encode: encode$k,
34553
- decode: decode$k,
34554
- attributes: validXmlAttributes$8
34552
+ encode: encode$l,
34553
+ decode: decode$l,
34554
+ attributes: validXmlAttributes$9
34555
34555
  };
34556
- const translator$F = NodeTranslator.from(config$b);
34557
- const translator$E = NodeTranslator.from({
34556
+ const translator$G = NodeTranslator.from(config$c);
34557
+ const translator$F = NodeTranslator.from({
34558
34558
  xmlName: "w:bidiVisual",
34559
34559
  sdNodeOrKeyName: "rightToLeft",
34560
34560
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
34561
34561
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
34562
34562
  });
34563
- const translator$D = NodeTranslator.from({
34563
+ const translator$E = NodeTranslator.from({
34564
34564
  xmlName: "w:shd",
34565
34565
  sdNodeOrKeyName: "shading",
34566
34566
  attributes: [
@@ -34582,11 +34582,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34582
34582
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34583
34583
  }
34584
34584
  });
34585
- const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
34586
- const translator$B = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
34587
- const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
34588
- const translator$z = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
34589
- const translator$y = NodeTranslator.from({
34585
+ const translator$D = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
34586
+ const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
34587
+ const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
34588
+ const translator$A = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
34589
+ const translator$z = NodeTranslator.from({
34590
34590
  xmlName: "w:tblLook",
34591
34591
  sdNodeOrKeyName: "tblLook",
34592
34592
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -34598,16 +34598,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34598
34598
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34599
34599
  }
34600
34600
  });
34601
- const translator$x = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
34602
- const translator$w = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
34603
- const translator$v = NodeTranslator.from(
34601
+ const translator$y = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
34602
+ const translator$x = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
34603
+ const translator$w = NodeTranslator.from(
34604
34604
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
34605
34605
  );
34606
- const translator$u = NodeTranslator.from(
34606
+ const translator$v = NodeTranslator.from(
34607
34607
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
34608
34608
  );
34609
- const translator$t = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
34610
- const translator$s = NodeTranslator.from({
34609
+ const translator$u = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
34610
+ const translator$t = NodeTranslator.from({
34611
34611
  xmlName: "w:tblpPr",
34612
34612
  sdNodeOrKeyName: "floatingTableProperties",
34613
34613
  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))),
@@ -34619,29 +34619,29 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34619
34619
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34620
34620
  }
34621
34621
  });
34622
- const translator$r = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
34623
- const translator$q = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
34624
- const translator$p = NodeTranslator.from(createBorderPropertyHandler("w:end"));
34625
- const translator$o = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
34626
- const translator$n = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
34627
- const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
34628
- const translator$l = NodeTranslator.from(createBorderPropertyHandler("w:left"));
34629
- const translator$k = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
34630
- const translator$j = NodeTranslator.from(createBorderPropertyHandler("w:right"));
34631
- const translator$i = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
34632
- const translator$h = NodeTranslator.from(createBorderPropertyHandler("w:start"));
34633
- const translator$g = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
34634
- const translator$f = NodeTranslator.from(createBorderPropertyHandler("w:top"));
34635
- const translator$e = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
34636
- const XML_NODE_NAME$c = "w:tblBorders";
34622
+ const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
34623
+ const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
34624
+ const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:end"));
34625
+ const translator$p = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
34626
+ const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
34627
+ const translator$n = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
34628
+ const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:left"));
34629
+ const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
34630
+ const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:right"));
34631
+ const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
34632
+ const translator$i = NodeTranslator.from(createBorderPropertyHandler("w:start"));
34633
+ const translator$h = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
34634
+ const translator$g = NodeTranslator.from(createBorderPropertyHandler("w:top"));
34635
+ const translator$f = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
34636
+ const XML_NODE_NAME$d = "w:tblBorders";
34637
34637
  const SD_ATTR_KEY$3 = "borders";
34638
- const encode$j = (params2) => {
34638
+ const encode$k = (params2) => {
34639
34639
  const { nodes } = params2;
34640
34640
  const node = nodes[0];
34641
34641
  const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
34642
34642
  return Object.keys(attributes).length > 0 ? attributes : void 0;
34643
34643
  };
34644
- const decode$j = (params2) => {
34644
+ const decode$k = (params2) => {
34645
34645
  const { borders = {} } = params2.node.attrs || {};
34646
34646
  const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
34647
34647
  const newNode = {
@@ -34653,14 +34653,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34653
34653
  return newNode;
34654
34654
  };
34655
34655
  const propertyTranslators$2 = [
34656
- translator$r,
34657
- translator$p,
34656
+ translator$s,
34657
+ translator$q,
34658
+ translator$o,
34658
34659
  translator$n,
34659
34660
  translator$m,
34660
- translator$l,
34661
- translator$j,
34662
- translator$h,
34663
- translator$f
34661
+ translator$k,
34662
+ translator$i,
34663
+ translator$g
34664
34664
  ];
34665
34665
  const tblBordersTranslatorsByXmlName = {};
34666
34666
  const tblBordersTranslatorsBySdName = {};
@@ -34668,27 +34668,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34668
34668
  tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
34669
34669
  tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
34670
34670
  });
34671
- const translator$d = NodeTranslator.from({
34672
- xmlName: XML_NODE_NAME$c,
34671
+ const translator$e = NodeTranslator.from({
34672
+ xmlName: XML_NODE_NAME$d,
34673
34673
  sdNodeOrKeyName: SD_ATTR_KEY$3,
34674
34674
  type: NodeTranslator.translatorTypes.NODE,
34675
34675
  attributes: [],
34676
- encode: encode$j,
34677
- decode: decode$j
34676
+ encode: encode$k,
34677
+ decode: decode$k
34678
34678
  });
34679
- const XML_NODE_NAME$b = "w:tblCellMar";
34679
+ const XML_NODE_NAME$c = "w:tblCellMar";
34680
34680
  const SD_ATTR_KEY$2 = "cellMargins";
34681
- const encode$i = (params2) => {
34681
+ const encode$j = (params2) => {
34682
34682
  const { nodes } = params2;
34683
34683
  const node = nodes[0];
34684
34684
  const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
34685
34685
  return Object.keys(attributes).length > 0 ? attributes : void 0;
34686
34686
  };
34687
- const decode$i = (params2) => {
34687
+ const decode$j = (params2) => {
34688
34688
  const { cellMargins = {} } = params2.node.attrs || {};
34689
34689
  const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
34690
34690
  const newNode = {
34691
- name: XML_NODE_NAME$b,
34691
+ name: XML_NODE_NAME$c,
34692
34692
  type: "element",
34693
34693
  attributes: {},
34694
34694
  elements
@@ -34696,12 +34696,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34696
34696
  return newNode;
34697
34697
  };
34698
34698
  const propertyTranslators$1 = [
34699
- translator$q,
34700
- translator$o,
34701
- translator$k,
34702
- translator$i,
34703
- translator$g,
34704
- translator$e
34699
+ translator$r,
34700
+ translator$p,
34701
+ translator$l,
34702
+ translator$j,
34703
+ translator$h,
34704
+ translator$f
34705
34705
  ];
34706
34706
  const propertyTranslatorsByXmlName$1 = {};
34707
34707
  const propertyTranslatorsBySdName$1 = {};
@@ -34709,27 +34709,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34709
34709
  propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
34710
34710
  propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
34711
34711
  });
34712
- const translator$c = NodeTranslator.from({
34713
- xmlName: XML_NODE_NAME$b,
34712
+ const translator$d = NodeTranslator.from({
34713
+ xmlName: XML_NODE_NAME$c,
34714
34714
  sdNodeOrKeyName: SD_ATTR_KEY$2,
34715
34715
  type: NodeTranslator.translatorTypes.NODE,
34716
34716
  attributes: [],
34717
- encode: encode$i,
34718
- decode: decode$i
34717
+ encode: encode$j,
34718
+ decode: decode$j
34719
34719
  });
34720
- const XML_NODE_NAME$a = "w:tblPr";
34720
+ const XML_NODE_NAME$b = "w:tblPr";
34721
34721
  const SD_ATTR_KEY$1 = "tableProperties";
34722
- const encode$h = (params2) => {
34722
+ const encode$i = (params2) => {
34723
34723
  const { nodes } = params2;
34724
34724
  const node = nodes[0];
34725
34725
  const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
34726
34726
  return {
34727
- xmlName: XML_NODE_NAME$a,
34727
+ xmlName: XML_NODE_NAME$b,
34728
34728
  sdNodeOrKeyName: SD_ATTR_KEY$1,
34729
34729
  attributes
34730
34730
  };
34731
34731
  };
34732
- const decode$h = (params2) => {
34732
+ const decode$i = (params2) => {
34733
34733
  const { tableProperties = {} } = params2.node.attrs || {};
34734
34734
  const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
34735
34735
  const newNode = {
@@ -34741,11 +34741,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34741
34741
  return newNode;
34742
34742
  };
34743
34743
  const propertyTranslators = [
34744
+ translator$F,
34745
+ translator$N,
34744
34746
  translator$E,
34745
- translator$M,
34746
34747
  translator$D,
34748
+ translator$M,
34747
34749
  translator$C,
34748
- translator$L,
34749
34750
  translator$B,
34750
34751
  translator$A,
34751
34752
  translator$z,
@@ -34755,9 +34756,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34755
34756
  translator$v,
34756
34757
  translator$u,
34757
34758
  translator$t,
34758
- translator$s,
34759
- translator$d,
34760
- translator$c
34759
+ translator$e,
34760
+ translator$d
34761
34761
  ];
34762
34762
  const propertyTranslatorsByXmlName = {};
34763
34763
  const propertyTranslatorsBySdName = {};
@@ -34765,14 +34765,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34765
34765
  propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
34766
34766
  propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
34767
34767
  });
34768
- const config$a = {
34769
- xmlName: XML_NODE_NAME$a,
34768
+ const config$b = {
34769
+ xmlName: XML_NODE_NAME$b,
34770
34770
  sdNodeOrKeyName: SD_ATTR_KEY$1,
34771
- encode: encode$h,
34772
- decode: decode$h
34771
+ encode: encode$i,
34772
+ decode: decode$i
34773
34773
  };
34774
- const translator$b = NodeTranslator.from(config$a);
34775
- const translator$a = NodeTranslator.from(
34774
+ const translator$c = NodeTranslator.from(config$b);
34775
+ const translator$b = NodeTranslator.from(
34776
34776
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
34777
34777
  );
34778
34778
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -34822,20 +34822,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34822
34822
  }
34823
34823
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
34824
34824
  };
34825
- const XML_NODE_NAME$9 = "w:tblGrid";
34825
+ const XML_NODE_NAME$a = "w:tblGrid";
34826
34826
  const SD_ATTR_KEY = "grid";
34827
34827
  const cellMinWidth = pixelsToTwips(10);
34828
- const encode$g = (params2) => {
34828
+ const encode$h = (params2) => {
34829
34829
  const { nodes } = params2;
34830
34830
  const node = nodes[0];
34831
- const attributes = encodeProperties(node, { [translator$a.xmlName]: translator$a }, true);
34831
+ const attributes = encodeProperties(node, { [translator$b.xmlName]: translator$b }, true);
34832
34832
  return {
34833
- xmlName: XML_NODE_NAME$9,
34833
+ xmlName: XML_NODE_NAME$a,
34834
34834
  sdNodeOrKeyName: SD_ATTR_KEY,
34835
34835
  attributes
34836
34836
  };
34837
34837
  };
34838
- const decode$g = (params2) => {
34838
+ const decode$h = (params2) => {
34839
34839
  const { grid: rawGrid } = params2.node.attrs || {};
34840
34840
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
34841
34841
  const { firstRow = {} } = params2.extraParams || {};
@@ -34854,10 +34854,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34854
34854
  numericWidth = fallbackColumnWidthTwips;
34855
34855
  }
34856
34856
  numericWidth = Math.max(numericWidth, cellMinWidth);
34857
- const decoded = translator$a.decode({
34857
+ const decoded = translator$b.decode({
34858
34858
  node: { type: (
34859
34859
  /** @type {string} */
34860
- translator$a.sdNodeOrKeyName
34860
+ translator$b.sdNodeOrKeyName
34861
34861
  ), attrs: { col: numericWidth } }
34862
34862
  });
34863
34863
  if (decoded) elements.push(decoded);
@@ -34892,32 +34892,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34892
34892
  columnIndex++;
34893
34893
  }
34894
34894
  const newNode = {
34895
- name: XML_NODE_NAME$9,
34895
+ name: XML_NODE_NAME$a,
34896
34896
  attributes: {},
34897
34897
  elements
34898
34898
  };
34899
34899
  return newNode;
34900
34900
  };
34901
- const config$9 = {
34902
- xmlName: XML_NODE_NAME$9,
34901
+ const config$a = {
34902
+ xmlName: XML_NODE_NAME$a,
34903
34903
  sdNodeOrKeyName: SD_ATTR_KEY,
34904
- encode: encode$g,
34905
- decode: decode$g
34904
+ encode: encode$h,
34905
+ decode: decode$h
34906
34906
  };
34907
- const translator$9 = NodeTranslator.from(config$9);
34908
- const XML_NODE_NAME$8 = "w:tbl";
34909
- const SD_NODE_NAME$8 = "table";
34910
- const encode$f = (params2, encodedAttrs) => {
34907
+ const translator$a = NodeTranslator.from(config$a);
34908
+ const XML_NODE_NAME$9 = "w:tbl";
34909
+ const SD_NODE_NAME$9 = "table";
34910
+ const encode$g = (params2, encodedAttrs) => {
34911
34911
  const { nodes } = params2;
34912
34912
  const node = nodes[0];
34913
34913
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
34914
34914
  if (tblPr) {
34915
- const encodedProperties = translator$b.encode({ ...params2, nodes: [tblPr] });
34915
+ const encodedProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
34916
34916
  encodedAttrs["tableProperties"] = encodedProperties?.attributes || {};
34917
34917
  }
34918
34918
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
34919
34919
  if (tblGrid) {
34920
- encodedAttrs["grid"] = translator$9.encode({ ...params2, nodes: [tblGrid] }).attributes;
34920
+ encodedAttrs["grid"] = translator$a.encode({ ...params2, nodes: [tblGrid] }).attributes;
34921
34921
  }
34922
34922
  [
34923
34923
  "tableStyleId",
@@ -34958,7 +34958,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34958
34958
  const columnWidths = (encodedAttrs["grid"] ?? []).map((item) => twipsToPixels(item.col));
34959
34959
  const content = [];
34960
34960
  rows.forEach((row) => {
34961
- const result = translator$F.encode({
34961
+ const result = translator$G.encode({
34962
34962
  ...params2,
34963
34963
  nodes: [row],
34964
34964
  extraParams: {
@@ -34977,13 +34977,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34977
34977
  attrs: encodedAttrs
34978
34978
  };
34979
34979
  };
34980
- const decode$f = (params2, decodedAttrs) => {
34980
+ const decode$g = (params2, decodedAttrs) => {
34981
34981
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
34982
34982
  const { node } = params2;
34983
34983
  const elements = translateChildNodes(params2);
34984
34984
  const firstRow = node.content?.find((n) => n.type === "tableRow");
34985
34985
  const properties = node.attrs.grid;
34986
- const element = translator$9.decode({
34986
+ const element = translator$a.decode({
34987
34987
  ...params2,
34988
34988
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
34989
34989
  extraParams: {
@@ -34993,7 +34993,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34993
34993
  if (element) elements.unshift(element);
34994
34994
  if (node.attrs?.tableProperties) {
34995
34995
  const properties2 = { ...node.attrs.tableProperties };
34996
- const element2 = translator$b.decode({
34996
+ const element2 = translator$c.decode({
34997
34997
  ...params2,
34998
34998
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
34999
34999
  });
@@ -35059,7 +35059,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35059
35059
  if (baseTblPr && baseTblPr.elements) {
35060
35060
  tblPr.elements.push(...baseTblPr.elements);
35061
35061
  }
35062
- const tableProperties = translator$b.encode({ ...params2, nodes: [tblPr] }).attributes;
35062
+ const tableProperties = translator$c.encode({ ...params2, nodes: [tblPr] }).attributes;
35063
35063
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
35064
35064
  if (borders) stylesToReturn.borders = borders;
35065
35065
  if (rowBorders) stylesToReturn.rowBorders = rowBorders;
@@ -35076,16 +35076,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35076
35076
  }
35077
35077
  return stylesToReturn;
35078
35078
  }
35079
- const config$8 = {
35080
- xmlName: XML_NODE_NAME$8,
35081
- sdNodeOrKeyName: SD_NODE_NAME$8,
35079
+ const config$9 = {
35080
+ xmlName: XML_NODE_NAME$9,
35081
+ sdNodeOrKeyName: SD_NODE_NAME$9,
35082
35082
  type: NodeTranslator.translatorTypes.NODE,
35083
- encode: encode$f,
35084
- decode: decode$f,
35083
+ encode: encode$g,
35084
+ decode: decode$g,
35085
35085
  attributes: []
35086
35086
  };
35087
- const translator$8 = NodeTranslator.from(config$8);
35088
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$8);
35087
+ const translator$9 = NodeTranslator.from(config$9);
35088
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$9);
35089
35089
  function getReferencedTableStyles(tblStyleTag, docx) {
35090
35090
  if (!tblStyleTag) return null;
35091
35091
  const stylesToReturn = {};
@@ -35447,10 +35447,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35447
35447
  if (left2 != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left2) } });
35448
35448
  return elements;
35449
35449
  }
35450
- const XML_NODE_NAME$7 = "w:tc";
35451
- const SD_NODE_NAME$7 = "tableCell";
35452
- const validXmlAttributes$7 = [];
35453
- function encode$e(params2, encodedAttrs) {
35450
+ const XML_NODE_NAME$8 = "w:tc";
35451
+ const SD_NODE_NAME$8 = "tableCell";
35452
+ const validXmlAttributes$8 = [];
35453
+ function encode$f(params2, encodedAttrs) {
35454
35454
  const {
35455
35455
  node,
35456
35456
  table,
@@ -35477,31 +35477,31 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35477
35477
  }
35478
35478
  return schemaNode;
35479
35479
  }
35480
- function decode$e(params2, decodedAttrs) {
35480
+ function decode$f(params2, decodedAttrs) {
35481
35481
  const translated = translateTableCell(params2);
35482
35482
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
35483
35483
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
35484
35484
  }
35485
35485
  return translated;
35486
35486
  }
35487
- const config$7 = {
35488
- xmlName: XML_NODE_NAME$7,
35489
- sdNodeOrKeyName: SD_NODE_NAME$7,
35487
+ const config$8 = {
35488
+ xmlName: XML_NODE_NAME$8,
35489
+ sdNodeOrKeyName: SD_NODE_NAME$8,
35490
35490
  type: NodeTranslator.translatorTypes.NODE,
35491
- encode: encode$e,
35492
- decode: decode$e,
35493
- attributes: validXmlAttributes$7
35491
+ encode: encode$f,
35492
+ decode: decode$f,
35493
+ attributes: validXmlAttributes$8
35494
35494
  };
35495
- const translator$7 = NodeTranslator.from(config$7);
35496
- const XML_NODE_NAME$6 = "w:hyperlink";
35497
- const SD_NODE_NAME$6 = "link";
35495
+ const translator$8 = NodeTranslator.from(config$8);
35496
+ const XML_NODE_NAME$7 = "w:hyperlink";
35497
+ const SD_NODE_NAME$7 = "link";
35498
35498
  const _createAttributeHandler = (xmlName, sdName) => ({
35499
35499
  xmlName,
35500
35500
  sdName,
35501
35501
  encode: (attributes) => attributes[xmlName],
35502
35502
  decode: (attributes) => attributes[sdName]
35503
35503
  });
35504
- const validXmlAttributes$6 = [
35504
+ const validXmlAttributes$7 = [
35505
35505
  _createAttributeHandler("w:anchor", "anchor"),
35506
35506
  _createAttributeHandler("w:docLocation", "docLocation"),
35507
35507
  {
@@ -35514,7 +35514,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35514
35514
  _createAttributeHandler("r:id", "rId"),
35515
35515
  _createAttributeHandler("w:tgtFrame", "target")
35516
35516
  ];
35517
- const encode$d = (params2, encodedAttrs) => {
35517
+ const encode$e = (params2, encodedAttrs) => {
35518
35518
  const { nodes, docx, nodeListHandler } = params2;
35519
35519
  const node = nodes[0];
35520
35520
  let href = _resolveHref(docx, encodedAttrs);
@@ -35580,7 +35580,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35580
35580
  }
35581
35581
  return href;
35582
35582
  };
35583
- function decode$d(params2) {
35583
+ function decode$e(params2) {
35584
35584
  const { node } = params2;
35585
35585
  const linkMark = node.marks.find((m2) => m2.type === "link");
35586
35586
  const linkAttrs = this.decodeAttributes({ ...params2, node: linkMark });
@@ -35624,15 +35624,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35624
35624
  });
35625
35625
  return rId;
35626
35626
  }
35627
- const config$6 = {
35628
- xmlName: XML_NODE_NAME$6,
35629
- sdNodeOrKeyName: SD_NODE_NAME$6,
35627
+ const config$7 = {
35628
+ xmlName: XML_NODE_NAME$7,
35629
+ sdNodeOrKeyName: SD_NODE_NAME$7,
35630
35630
  type: NodeTranslator.translatorTypes.NODE,
35631
- encode: encode$d,
35632
- decode: decode$d,
35633
- attributes: validXmlAttributes$6
35631
+ encode: encode$e,
35632
+ decode: decode$e,
35633
+ attributes: validXmlAttributes$7
35634
35634
  };
35635
- const translator$6 = NodeTranslator.from(config$6);
35635
+ const translator$7 = NodeTranslator.from(config$7);
35636
35636
  function parseTagValueJSON(json) {
35637
35637
  if (typeof json !== "string") {
35638
35638
  return {};
@@ -36427,32 +36427,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36427
36427
  elements: [...anchorElements, ...elementsWithWrap]
36428
36428
  };
36429
36429
  }
36430
- const XML_NODE_NAME$5 = "wp:anchor";
36431
- const SD_NODE_NAME$5 = ["image"];
36432
- const validXmlAttributes$5 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36433
- function encode$c(params2) {
36430
+ const XML_NODE_NAME$6 = "wp:anchor";
36431
+ const SD_NODE_NAME$6 = ["image"];
36432
+ const validXmlAttributes$6 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36433
+ function encode$d(params2) {
36434
36434
  const { node } = params2.extraParams;
36435
36435
  if (!node || !node.type) {
36436
36436
  return null;
36437
36437
  }
36438
36438
  return handleAnchorNode(params2);
36439
36439
  }
36440
- function decode$c(params2) {
36440
+ function decode$d(params2) {
36441
36441
  const { node } = params2;
36442
36442
  if (!node || !node.type) {
36443
36443
  return null;
36444
36444
  }
36445
36445
  return translateAnchorNode(params2);
36446
36446
  }
36447
- const config$5 = {
36448
- xmlName: XML_NODE_NAME$5,
36449
- sdNodeOrKeyName: SD_NODE_NAME$5,
36447
+ const config$6 = {
36448
+ xmlName: XML_NODE_NAME$6,
36449
+ sdNodeOrKeyName: SD_NODE_NAME$6,
36450
36450
  type: NodeTranslator.translatorTypes.NODE,
36451
- encode: encode$c,
36452
- decode: decode$c,
36453
- attributes: validXmlAttributes$5
36451
+ encode: encode$d,
36452
+ decode: decode$d,
36453
+ attributes: validXmlAttributes$6
36454
36454
  };
36455
- const translator$5 = NodeTranslator.from(config$5);
36455
+ const translator$6 = NodeTranslator.from(config$6);
36456
36456
  function handleInlineNode(params2) {
36457
36457
  const { node } = params2.extraParams;
36458
36458
  if (node.name !== "wp:inline") {
@@ -36468,41 +36468,41 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36468
36468
  elements: nodeElements.elements
36469
36469
  };
36470
36470
  }
36471
- const XML_NODE_NAME$4 = "wp:inline";
36472
- const SD_NODE_NAME$4 = ["image"];
36473
- const validXmlAttributes$4 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36474
- function encode$b(params2) {
36471
+ const XML_NODE_NAME$5 = "wp:inline";
36472
+ const SD_NODE_NAME$5 = ["image"];
36473
+ const validXmlAttributes$5 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36474
+ function encode$c(params2) {
36475
36475
  const { node } = params2.extraParams;
36476
36476
  if (!node || !node.type) {
36477
36477
  return null;
36478
36478
  }
36479
36479
  return handleInlineNode(params2);
36480
36480
  }
36481
- function decode$b(params2) {
36481
+ function decode$c(params2) {
36482
36482
  const { node } = params2;
36483
36483
  if (!node || !node.type) {
36484
36484
  return null;
36485
36485
  }
36486
36486
  return translateInlineNode(params2);
36487
36487
  }
36488
- const config$4 = {
36489
- xmlName: XML_NODE_NAME$4,
36490
- sdNodeOrKeyName: SD_NODE_NAME$4,
36488
+ const config$5 = {
36489
+ xmlName: XML_NODE_NAME$5,
36490
+ sdNodeOrKeyName: SD_NODE_NAME$5,
36491
36491
  type: NodeTranslator.translatorTypes.NODE,
36492
- encode: encode$b,
36493
- decode: decode$b,
36494
- attributes: validXmlAttributes$4
36492
+ encode: encode$c,
36493
+ decode: decode$c,
36494
+ attributes: validXmlAttributes$5
36495
36495
  };
36496
- const translator$4 = NodeTranslator.from(config$4);
36497
- const XML_NODE_NAME$3 = "w:drawing";
36498
- const SD_NODE_NAME$3 = [];
36499
- const validXmlAttributes$3 = [];
36500
- function encode$a(params2) {
36496
+ const translator$5 = NodeTranslator.from(config$5);
36497
+ const XML_NODE_NAME$4 = "w:drawing";
36498
+ const SD_NODE_NAME$4 = [];
36499
+ const validXmlAttributes$4 = [];
36500
+ function encode$b(params2) {
36501
36501
  const nodes = params2.nodes;
36502
36502
  const node = nodes[0];
36503
36503
  const translatorByChildName = {
36504
- "wp:anchor": translator$5,
36505
- "wp:inline": translator$4
36504
+ "wp:anchor": translator$6,
36505
+ "wp:inline": translator$5
36506
36506
  };
36507
36507
  return node.elements.reduce((acc, child) => {
36508
36508
  if (acc) return acc;
@@ -36511,12 +36511,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36511
36511
  return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
36512
36512
  }, null);
36513
36513
  }
36514
- function decode$a(params2) {
36514
+ function decode$b(params2) {
36515
36515
  const { node } = params2;
36516
36516
  if (!node || !node.type) {
36517
36517
  return null;
36518
36518
  }
36519
- const childTranslator = node.attrs.isAnchor ? translator$5 : translator$4;
36519
+ const childTranslator = node.attrs.isAnchor ? translator$6 : translator$5;
36520
36520
  const resultNode = childTranslator.decode(params2);
36521
36521
  return wrapTextInRun(
36522
36522
  {
@@ -36526,15 +36526,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36526
36526
  []
36527
36527
  );
36528
36528
  }
36529
- const config$3 = {
36530
- xmlName: XML_NODE_NAME$3,
36531
- sdNodeOrKeyName: SD_NODE_NAME$3,
36529
+ const config$4 = {
36530
+ xmlName: XML_NODE_NAME$4,
36531
+ sdNodeOrKeyName: SD_NODE_NAME$4,
36532
36532
  type: NodeTranslator.translatorTypes.NODE,
36533
- encode: encode$a,
36534
- decode: decode$a,
36535
- attributes: validXmlAttributes$3
36533
+ encode: encode$b,
36534
+ decode: decode$b,
36535
+ attributes: validXmlAttributes$4
36536
36536
  };
36537
- const translator$3 = NodeTranslator.from(config$3);
36537
+ const translator$4 = NodeTranslator.from(config$4);
36538
36538
  class CommandService {
36539
36539
  /**
36540
36540
  * @param {import('./commands/types/index.js').CommandServiceOptions} props
@@ -37872,7 +37872,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
37872
37872
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
37873
37873
  }
37874
37874
  function prepareImageAnnotation(params2, imageSize) {
37875
- return translator$3.decode({
37875
+ return translator$4.decode({
37876
37876
  ...params2,
37877
37877
  imageSize
37878
37878
  });
@@ -38109,10 +38109,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38109
38109
  };
38110
38110
  return result;
38111
38111
  }
38112
- const XML_NODE_NAME$2 = "w:sdt";
38113
- const SD_NODE_NAME$2 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
38114
- const validXmlAttributes$2 = [];
38115
- function encode$9(params2) {
38112
+ const XML_NODE_NAME$3 = "w:sdt";
38113
+ const SD_NODE_NAME$3 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
38114
+ const validXmlAttributes$3 = [];
38115
+ function encode$a(params2) {
38116
38116
  const nodes = params2.nodes;
38117
38117
  const node = nodes[0];
38118
38118
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -38122,7 +38122,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38122
38122
  const result = handler2(params2);
38123
38123
  return result;
38124
38124
  }
38125
- function decode$9(params2) {
38125
+ function decode$a(params2) {
38126
38126
  const { node } = params2;
38127
38127
  if (!node || !node.type) {
38128
38128
  return null;
@@ -38138,85 +38138,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38138
38138
  const result = decoder();
38139
38139
  return result;
38140
38140
  }
38141
- const config$2 = {
38142
- xmlName: XML_NODE_NAME$2,
38143
- sdNodeOrKeyName: SD_NODE_NAME$2,
38141
+ const config$3 = {
38142
+ xmlName: XML_NODE_NAME$3,
38143
+ sdNodeOrKeyName: SD_NODE_NAME$3,
38144
38144
  type: NodeTranslator.translatorTypes.NODE,
38145
- encode: encode$9,
38146
- decode: decode$9,
38147
- attributes: validXmlAttributes$2
38145
+ encode: encode$a,
38146
+ decode: decode$a,
38147
+ attributes: validXmlAttributes$3
38148
38148
  };
38149
- const translator$2 = NodeTranslator.from(config$2);
38150
- const encode$8 = (attributes) => {
38149
+ const translator$3 = NodeTranslator.from(config$3);
38150
+ const encode$9 = (attributes) => {
38151
38151
  return attributes["w:id"];
38152
38152
  };
38153
- const decode$8 = (attrs) => {
38153
+ const decode$9 = (attrs) => {
38154
38154
  return attrs.id;
38155
38155
  };
38156
38156
  const attrConfig$6 = Object.freeze({
38157
38157
  xmlName: "w:id",
38158
38158
  sdName: "id",
38159
- encode: encode$8,
38160
- decode: decode$8
38159
+ encode: encode$9,
38160
+ decode: decode$9
38161
38161
  });
38162
- const encode$7 = (attributes) => {
38162
+ const encode$8 = (attributes) => {
38163
38163
  return attributes["w:name"];
38164
38164
  };
38165
- const decode$7 = (attrs) => {
38165
+ const decode$8 = (attrs) => {
38166
38166
  return attrs.name;
38167
38167
  };
38168
38168
  const attrConfig$5 = Object.freeze({
38169
38169
  xmlName: "w:name",
38170
38170
  sdName: "name",
38171
- encode: encode$7,
38172
- decode: decode$7
38171
+ encode: encode$8,
38172
+ decode: decode$8
38173
38173
  });
38174
- const encode$6 = (attributes) => {
38174
+ const encode$7 = (attributes) => {
38175
38175
  return attributes["w:colFirst"];
38176
38176
  };
38177
- const decode$6 = (attrs) => {
38177
+ const decode$7 = (attrs) => {
38178
38178
  return attrs.colFirst;
38179
38179
  };
38180
38180
  const attrConfig$4 = Object.freeze({
38181
38181
  xmlName: "w:colFirst",
38182
38182
  sdName: "colFirst",
38183
- encode: encode$6,
38184
- decode: decode$6
38183
+ encode: encode$7,
38184
+ decode: decode$7
38185
38185
  });
38186
- const encode$5 = (attributes) => {
38186
+ const encode$6 = (attributes) => {
38187
38187
  return attributes["w:colLast"];
38188
38188
  };
38189
- const decode$5 = (attrs) => {
38189
+ const decode$6 = (attrs) => {
38190
38190
  return attrs.colLast;
38191
38191
  };
38192
38192
  const attrConfig$3 = Object.freeze({
38193
38193
  xmlName: "w:colLast",
38194
38194
  sdName: "colLast",
38195
- encode: encode$5,
38196
- decode: decode$5
38195
+ encode: encode$6,
38196
+ decode: decode$6
38197
38197
  });
38198
- const encode$4 = (attributes) => {
38198
+ const encode$5 = (attributes) => {
38199
38199
  return attributes["w:displacedByCustomXml"];
38200
38200
  };
38201
- const decode$4 = (attrs) => {
38201
+ const decode$5 = (attrs) => {
38202
38202
  return attrs.displacedByCustomXml;
38203
38203
  };
38204
38204
  const attrConfig$2 = Object.freeze({
38205
38205
  xmlName: "w:displacedByCustomXml",
38206
38206
  sdName: "displacedByCustomXml",
38207
- encode: encode$4,
38208
- decode: decode$4
38207
+ encode: encode$5,
38208
+ decode: decode$5
38209
38209
  });
38210
- const validXmlAttributes$1 = [attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3, attrConfig$2];
38211
- const XML_NODE_NAME$1 = "w:bookmarkStart";
38212
- const SD_NODE_NAME$1 = "bookmarkStart";
38213
- const encode$3 = (params2, encodedAttrs = {}) => {
38210
+ const validXmlAttributes$2 = [attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3, attrConfig$2];
38211
+ const XML_NODE_NAME$2 = "w:bookmarkStart";
38212
+ const SD_NODE_NAME$2 = "bookmarkStart";
38213
+ const encode$4 = (params2, encodedAttrs = {}) => {
38214
38214
  return {
38215
38215
  type: "bookmarkStart",
38216
38216
  attrs: encodedAttrs
38217
38217
  };
38218
38218
  };
38219
- const decode$3 = (params2, decodedAttrs = {}) => {
38219
+ const decode$4 = (params2, decodedAttrs = {}) => {
38220
38220
  const result = {
38221
38221
  name: "w:bookmarkStart",
38222
38222
  elements: []
@@ -38226,49 +38226,49 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38226
38226
  }
38227
38227
  return result;
38228
38228
  };
38229
- const config$1 = {
38230
- xmlName: XML_NODE_NAME$1,
38231
- sdNodeOrKeyName: SD_NODE_NAME$1,
38229
+ const config$2 = {
38230
+ xmlName: XML_NODE_NAME$2,
38231
+ sdNodeOrKeyName: SD_NODE_NAME$2,
38232
38232
  type: NodeTranslator.translatorTypes.NODE,
38233
- encode: encode$3,
38234
- decode: decode$3,
38235
- attributes: validXmlAttributes$1
38233
+ encode: encode$4,
38234
+ decode: decode$4,
38235
+ attributes: validXmlAttributes$2
38236
38236
  };
38237
- const translator$1 = NodeTranslator.from(config$1);
38238
- const encode$2 = (attributes) => {
38237
+ const translator$2 = NodeTranslator.from(config$2);
38238
+ const encode$3 = (attributes) => {
38239
38239
  return attributes["w:id"];
38240
38240
  };
38241
- const decode$2 = (attrs) => {
38241
+ const decode$3 = (attrs) => {
38242
38242
  return attrs.id;
38243
38243
  };
38244
38244
  const attrConfig$1 = Object.freeze({
38245
38245
  xmlName: "w:id",
38246
38246
  sdName: "id",
38247
- encode: encode$2,
38248
- decode: decode$2
38247
+ encode: encode$3,
38248
+ decode: decode$3
38249
38249
  });
38250
- const encode$1 = (attributes) => {
38250
+ const encode$2 = (attributes) => {
38251
38251
  return attributes["w:displacedByCustomXml"];
38252
38252
  };
38253
- const decode$1 = (attrs) => {
38253
+ const decode$2 = (attrs) => {
38254
38254
  return attrs.displacedByCustomXml;
38255
38255
  };
38256
38256
  const attrConfig = Object.freeze({
38257
38257
  xmlName: "w:displacedByCustomXml",
38258
38258
  sdName: "displacedByCustomXml",
38259
- encode: encode$1,
38260
- decode: decode$1
38259
+ encode: encode$2,
38260
+ decode: decode$2
38261
38261
  });
38262
- const validXmlAttributes = [attrConfig$1, attrConfig];
38263
- const XML_NODE_NAME = "w:bookmarkEnd";
38264
- const SD_NODE_NAME = "bookmarkEnd";
38265
- const encode$18 = (params2, encodedAttrs = {}) => {
38262
+ const validXmlAttributes$1 = [attrConfig$1, attrConfig];
38263
+ const XML_NODE_NAME$1 = "w:bookmarkEnd";
38264
+ const SD_NODE_NAME$1 = "bookmarkEnd";
38265
+ const encode$1 = (params2, encodedAttrs = {}) => {
38266
38266
  return {
38267
38267
  type: "bookmarkEnd",
38268
38268
  attrs: encodedAttrs
38269
38269
  };
38270
38270
  };
38271
- const decode = (params2, decodedAttrs = {}) => {
38271
+ const decode$1 = (params2, decodedAttrs = {}) => {
38272
38272
  const result = {
38273
38273
  name: "w:bookmarkEnd",
38274
38274
  elements: []
@@ -38278,11 +38278,60 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38278
38278
  }
38279
38279
  return result;
38280
38280
  };
38281
+ const config$1 = {
38282
+ xmlName: XML_NODE_NAME$1,
38283
+ sdNodeOrKeyName: SD_NODE_NAME$1,
38284
+ type: NodeTranslator.translatorTypes.NODE,
38285
+ encode: encode$1,
38286
+ decode: decode$1,
38287
+ attributes: validXmlAttributes$1
38288
+ };
38289
+ const translator$1 = NodeTranslator.from(config$1);
38290
+ const XML_NODE_NAME = "mc:AlternateContent";
38291
+ const SD_NODE_NAME = [];
38292
+ const validXmlAttributes = [];
38293
+ function encode$19(params2) {
38294
+ const { nodeListHandler } = params2;
38295
+ const { node } = params2.extraParams;
38296
+ if (!node || !node.type) {
38297
+ return null;
38298
+ }
38299
+ const allowedNamespaces = ["wps", "wp14", "w14", "w15"];
38300
+ const wpsNode = node.elements.find(
38301
+ (el) => el.name === "mc:Choice" && allowedNamespaces.includes(el.attributes["Requires"])
38302
+ );
38303
+ if (!wpsNode) {
38304
+ return null;
38305
+ }
38306
+ const contents = wpsNode.elements;
38307
+ return nodeListHandler.handler({
38308
+ ...params2,
38309
+ nodes: contents,
38310
+ path: [...params2.path || [], wpsNode]
38311
+ });
38312
+ }
38313
+ function decode(params2) {
38314
+ const { node } = params2;
38315
+ const { drawingContent } = node.attrs;
38316
+ const drawing = {
38317
+ name: "w:drawing",
38318
+ elements: [...drawingContent ? [...drawingContent.elements || []] : []]
38319
+ };
38320
+ const choice = {
38321
+ name: "mc:Choice",
38322
+ attributes: { Requires: "wps" },
38323
+ elements: [drawing]
38324
+ };
38325
+ return {
38326
+ name: "mc:AlternateContent",
38327
+ elements: [choice]
38328
+ };
38329
+ }
38281
38330
  const config = {
38282
38331
  xmlName: XML_NODE_NAME,
38283
38332
  sdNodeOrKeyName: SD_NODE_NAME,
38284
38333
  type: NodeTranslator.translatorTypes.NODE,
38285
- encode: encode$18,
38334
+ encode: encode$19,
38286
38335
  decode,
38287
38336
  attributes: validXmlAttributes
38288
38337
  };
@@ -38301,30 +38350,30 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38301
38350
  doc: translateDocumentNode,
38302
38351
  body: translateBodyNode,
38303
38352
  heading: translateHeadingNode,
38304
- paragraph: translator$12,
38305
- run: translator$T,
38353
+ paragraph: translator$13,
38354
+ run: translator$U,
38306
38355
  text: translateTextNode,
38307
38356
  bulletList: translateList,
38308
38357
  orderedList: translateList,
38309
- lineBreak: translator$15,
38310
- table: translator$8,
38311
- tableRow: translator$F,
38312
- tableCell: translator$7,
38313
- bookmarkStart: translator$1,
38314
- bookmarkEnd: translator,
38315
- fieldAnnotation: translator$2,
38316
- tab: translator$13,
38317
- image: translator$3,
38318
- hardBreak: translator$15,
38358
+ lineBreak: translator$16,
38359
+ table: translator$9,
38360
+ tableRow: translator$G,
38361
+ tableCell: translator$8,
38362
+ bookmarkStart: translator$2,
38363
+ bookmarkEnd: translator$1,
38364
+ fieldAnnotation: translator$3,
38365
+ tab: translator$14,
38366
+ image: translator$4,
38367
+ hardBreak: translator$16,
38319
38368
  commentRangeStart: () => translateCommentNode(params2, "Start"),
38320
38369
  commentRangeEnd: () => translateCommentNode(params2, "End"),
38321
38370
  commentReference: () => null,
38322
38371
  shapeContainer: translateShapeContainer,
38323
38372
  shapeTextbox: translateShapeTextbox,
38324
38373
  contentBlock: translateContentBlock,
38325
- structuredContent: translator$2,
38326
- structuredContentBlock: translator$2,
38327
- documentSection: translator$2,
38374
+ structuredContent: translator$3,
38375
+ structuredContentBlock: translator$3,
38376
+ documentSection: translator$3,
38328
38377
  "page-number": translatePageNumberNode,
38329
38378
  "total-page-number": translateTotalPageNumberNode
38330
38379
  };
@@ -38663,7 +38712,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38663
38712
  const isTrackedNode = node.marks?.some((m2) => trackedMarks.includes(m2.type));
38664
38713
  if (isTrackedNode) return translateTrackedNode(params2);
38665
38714
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
38666
- if (isLinkNode) return translator$6.decode(params2);
38715
+ if (isLinkNode) return translator$7.decode(params2);
38667
38716
  const { text, marks = [] } = node;
38668
38717
  return getTextNodeForExport(text, marks, params2);
38669
38718
  }
@@ -38969,7 +39018,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38969
39018
  markElement.type = "element";
38970
39019
  break;
38971
39020
  case "underline": {
38972
- const translated = translator$$.decode({
39021
+ const translated = translator$10.decode({
38973
39022
  node: {
38974
39023
  attrs: {
38975
39024
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -39033,7 +39082,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39033
39082
  break;
39034
39083
  case "highlight": {
39035
39084
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
39036
- const translated = translator$14.decode({ node: { attrs: { highlight: highlightValue } } });
39085
+ const translated = translator$15.decode({ node: { attrs: { highlight: highlightValue } } });
39037
39086
  return translated || {};
39038
39087
  }
39039
39088
  }
@@ -39089,23 +39138,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39089
39138
  }
39090
39139
  function translateContentBlock(params2) {
39091
39140
  const { node } = params2;
39092
- const { drawingContent, vmlAttributes, horizontalRule } = node.attrs;
39141
+ const { vmlAttributes, horizontalRule } = node.attrs;
39093
39142
  if (vmlAttributes || horizontalRule) {
39094
39143
  return translateVRectContentBlock(params2);
39095
39144
  }
39096
- const drawing = {
39097
- name: "w:drawing",
39098
- elements: [...drawingContent ? [...drawingContent.elements || []] : []]
39099
- };
39100
- const choice = {
39101
- name: "mc:Choice",
39102
- attributes: { Requires: "wps" },
39103
- elements: [drawing]
39104
- };
39105
- const alternateContent = {
39106
- name: "mc:AlternateContent",
39107
- elements: [choice]
39108
- };
39145
+ const alternateContent = translator.decode(params2);
39109
39146
  return wrapTextInRun(alternateContent);
39110
39147
  }
39111
39148
  function translateVRectContentBlock(params2) {
@@ -39309,7 +39346,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39309
39346
  if (mainNode.name === "w:drawing") node = mainNode;
39310
39347
  else node = mainNode.elements.find((el) => el.name === "w:drawing");
39311
39348
  if (!node) return { nodes: [], consumed: 0 };
39312
- const schemaNode = translator$3.encode(params2);
39349
+ const schemaNode = translator$4.encode(params2);
39313
39350
  const newNodes = schemaNode ? [schemaNode] : [];
39314
39351
  return { nodes: newNodes, consumed: 1 };
39315
39352
  };
@@ -39411,8 +39448,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39411
39448
  handlerName: "trackChangeNodeHandler",
39412
39449
  handler: handleTrackChangeNode
39413
39450
  };
39414
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$6);
39415
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$T);
39451
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$7);
39452
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$U);
39416
39453
  const handleTextNode = (params2) => {
39417
39454
  const { nodes, insideTrackChange } = params2;
39418
39455
  if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
@@ -39453,7 +39490,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39453
39490
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
39454
39491
  return { nodes: [], consumed: 0 };
39455
39492
  }
39456
- const schemaNode = translator$12.encode(params2);
39493
+ const schemaNode = translator$13.encode(params2);
39457
39494
  const newNodes = schemaNode ? [schemaNode] : [];
39458
39495
  return { nodes: newNodes, consumed: 1 };
39459
39496
  };
@@ -39466,7 +39503,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39466
39503
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
39467
39504
  return { nodes: [], consumed: 0 };
39468
39505
  }
39469
- const result = translator$2.encode(params2);
39506
+ const result = translator$3.encode(params2);
39470
39507
  if (!result) {
39471
39508
  return { nodes: [], consumed: 0 };
39472
39509
  }
@@ -39556,7 +39593,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39556
39593
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
39557
39594
  return { nodes: [], consumed: 0 };
39558
39595
  }
39559
- const result = translator$15.encode(params2);
39596
+ const result = translator$16.encode(params2);
39560
39597
  if (!result) return { nodes: [], consumed: 0 };
39561
39598
  return {
39562
39599
  nodes: [result],
@@ -39628,7 +39665,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39628
39665
  if (isCustomMarkBookmark(nodes[0], params2.editor)) {
39629
39666
  return handleBookmarkNode(params2);
39630
39667
  }
39631
- const node = translator$1.encode(params2);
39668
+ const node = translator$2.encode(params2);
39632
39669
  if (!node) return { nodes: [], consumed: 0 };
39633
39670
  return { nodes: [node], consumed: 1 };
39634
39671
  };
@@ -39660,7 +39697,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39660
39697
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
39661
39698
  return { nodes: [], consumed: 0 };
39662
39699
  }
39663
- const node = translator.encode(params2);
39700
+ const node = translator$1.encode(params2);
39664
39701
  if (!node) return { nodes: [], consumed: 0 };
39665
39702
  return { nodes: [node], consumed: 1 };
39666
39703
  };
@@ -39668,32 +39705,86 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39668
39705
  handlerName: "w:bookmarkEndTranslator",
39669
39706
  handler: handleBookmarkEndNode
39670
39707
  };
39708
+ const ALTERNATE_CONTENT_NODE = "mc:AlternateContent";
39709
+ const SUPPORTED_REQUIRES = /* @__PURE__ */ new Set([
39710
+ "wps",
39711
+ "wp14",
39712
+ "w14",
39713
+ "w15",
39714
+ "w16",
39715
+ "w16cex",
39716
+ "w16cid",
39717
+ "w16du",
39718
+ "w16sdtdh",
39719
+ "w16sdtfl",
39720
+ "w16se"
39721
+ ]);
39722
+ const skipHandlerResponse = { nodes: [], consumed: 0 };
39723
+ const isAlternateContentNode = (node) => node?.name === ALTERNATE_CONTENT_NODE;
39724
+ const isSupportedChoice = (choice) => {
39725
+ if (!choice?.attributes) return false;
39726
+ const requires = choice.attributes.Requires || choice.attributes.requires;
39727
+ if (!requires) return false;
39728
+ return requires.split(/\s+/).filter(Boolean).some((namespace2) => SUPPORTED_REQUIRES.has(namespace2));
39729
+ };
39730
+ const resolveAlternateContentElements = (alternateContent) => {
39731
+ if (!alternateContent?.elements?.length) return null;
39732
+ const choices = alternateContent.elements.filter((el) => el.name === "mc:Choice");
39733
+ const fallback = alternateContent.elements.find((el) => el.name === "mc:Fallback");
39734
+ const supportedChoice = choices.find(isSupportedChoice);
39735
+ const selectedElements = supportedChoice?.elements || fallback?.elements || choices[0]?.elements;
39736
+ if (!selectedElements) return null;
39737
+ return carbonCopy(selectedElements);
39738
+ };
39739
+ const buildNodeWithoutAlternateContent = (node) => {
39740
+ const { elements } = node || {};
39741
+ if (!elements?.length) return null;
39742
+ let replaced = false;
39743
+ const updatedElements = [];
39744
+ elements.forEach((element) => {
39745
+ if (isAlternateContentNode(element)) {
39746
+ const resolved = resolveAlternateContentElements(element);
39747
+ if (resolved) {
39748
+ updatedElements.push(...resolved);
39749
+ replaced = true;
39750
+ return;
39751
+ }
39752
+ updatedElements.push(carbonCopy(element));
39753
+ return;
39754
+ }
39755
+ updatedElements.push(carbonCopy(element));
39756
+ });
39757
+ if (!replaced) return null;
39758
+ const clone = carbonCopy(node);
39759
+ clone.elements = updatedElements;
39760
+ return clone;
39761
+ };
39671
39762
  const handleAlternateChoice = (params2) => {
39672
- const skipHandlerResponse = { nodes: [], consumed: 0 };
39673
39763
  const { nodes, nodeListHandler } = params2;
39674
- if (nodes.length === 0 || nodes[0].name !== "w:p") {
39764
+ if (!nodes?.length) {
39675
39765
  return skipHandlerResponse;
39676
39766
  }
39677
- const mainNode = nodes[0];
39678
- const node = mainNode?.elements?.find((el) => el.name === "w:r");
39679
- const hasAltChoice = node?.elements?.some((el) => el.name === "mc:AlternateContent");
39680
- if (!hasAltChoice) {
39681
- return skipHandlerResponse;
39767
+ const [currentNode] = nodes;
39768
+ if (isAlternateContentNode(currentNode)) {
39769
+ const resolvedElements = resolveAlternateContentElements(currentNode);
39770
+ if (!resolvedElements) {
39771
+ return skipHandlerResponse;
39772
+ }
39773
+ const result2 = nodeListHandler.handler({
39774
+ ...params2,
39775
+ nodes: resolvedElements,
39776
+ path: [...params2.path || [], currentNode]
39777
+ });
39778
+ return { nodes: result2, consumed: 1 };
39682
39779
  }
39683
- const altChoiceNode = node.elements.find((el) => el.name === "mc:AlternateContent");
39684
- node.elements.findIndex((el) => el.name === "mc:AlternateContent");
39685
- const allowedNamespaces = ["wps", "wp14", "w14", "w15"];
39686
- const wpsNode = altChoiceNode.elements.find(
39687
- (el) => el.name === "mc:Choice" && allowedNamespaces.includes(el.attributes["Requires"])
39688
- );
39689
- if (!wpsNode) {
39780
+ const sanitizedNode = buildNodeWithoutAlternateContent(currentNode);
39781
+ if (!sanitizedNode) {
39690
39782
  return skipHandlerResponse;
39691
39783
  }
39692
- const contents = wpsNode.elements;
39693
39784
  const result = nodeListHandler.handler({
39694
39785
  ...params2,
39695
- nodes: contents,
39696
- path: [...params2.path || [], wpsNode]
39786
+ nodes: [sanitizedNode],
39787
+ path: [...params2.path || [], sanitizedNode]
39697
39788
  });
39698
39789
  return { nodes: result, consumed: 1 };
39699
39790
  };
@@ -40272,7 +40363,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40272
40363
  if (!nodes.length || nodes[0].name !== "w:tab") {
40273
40364
  return { nodes: [], consumed: 0 };
40274
40365
  }
40275
- const node = translator$13.encode(params2);
40366
+ const node = translator$14.encode(params2);
40276
40367
  return { nodes: [node], consumed: 1 };
40277
40368
  };
40278
40369
  const tabNodeEntityHandler = {
@@ -40836,7 +40927,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40836
40927
  return;
40837
40928
  }
40838
40929
  }
40839
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.20.2") {
40930
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.21.0") {
40840
40931
  const customLocation = "docProps/custom.xml";
40841
40932
  if (!docx[customLocation]) {
40842
40933
  docx[customLocation] = generateCustomXml();
@@ -41329,7 +41420,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41329
41420
  function generateCustomXml() {
41330
41421
  return DEFAULT_CUSTOM_XML;
41331
41422
  }
41332
- function generateSuperdocVersion(pid = 2, version2 = "0.20.2") {
41423
+ function generateSuperdocVersion(pid = 2, version2 = "0.21.0") {
41333
41424
  return {
41334
41425
  type: "element",
41335
41426
  name: "property",
@@ -58397,6 +58488,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58397
58488
  element.style.isolation = "isolate";
58398
58489
  proseMirror.style.outline = "none";
58399
58490
  proseMirror.style.border = "none";
58491
+ element.style.backgroundColor = "#fff";
58492
+ proseMirror.style.backgroundColor = "#fff";
58400
58493
  const { typeface, fontSizePt, fontFamilyCss } = this.converter.getDocumentDefaultStyles() ?? {};
58401
58494
  const resolvedFontFamily = fontFamilyCss || typeface;
58402
58495
  if (resolvedFontFamily) {
@@ -58719,7 +58812,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58719
58812
  * @returns {Object | void} Migration results
58720
58813
  */
58721
58814
  processCollaborationMigrations() {
58722
- console.debug("[checkVersionMigrations] Current editor version", "0.20.2");
58815
+ console.debug("[checkVersionMigrations] Current editor version", "0.21.0");
58723
58816
  if (!this.options.ydoc) return;
58724
58817
  const metaMap = this.options.ydoc.getMap("meta");
58725
58818
  let docVersion = metaMap.get("version");
@@ -61196,6 +61289,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61196
61289
  }
61197
61290
  return result;
61198
61291
  };
61292
+ const isKeyboardInvocation = (event) => {
61293
+ return event.type === "contextmenu" && typeof event.detail === "number" && event.detail === 0 && (event.button === 0 || event.button === void 0) && event.clientX === 0 && event.clientY === 0;
61294
+ };
61295
+ const prefersNativeMenu = (event) => {
61296
+ if (!event) return false;
61297
+ if (event.ctrlKey || event.metaKey) {
61298
+ return true;
61299
+ }
61300
+ return isKeyboardInvocation(event);
61301
+ };
61302
+ const shouldAllowNativeContextMenu = (event) => {
61303
+ return prefersNativeMenu(event);
61304
+ };
61305
+ const shouldBypassContextMenu = shouldAllowNativeContextMenu;
61199
61306
  const CustomSelectionPluginKey = new PluginKey("CustomSelection");
61200
61307
  const handleClickOutside = (event, editor) => {
61201
61308
  const editorElem = editor?.options?.element;
@@ -61258,6 +61365,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61258
61365
  props: {
61259
61366
  handleDOMEvents: {
61260
61367
  contextmenu: (view, event) => {
61368
+ if (shouldAllowNativeContextMenu(event)) {
61369
+ return false;
61370
+ }
61261
61371
  event.preventDefault();
61262
61372
  const { selection } = view.state;
61263
61373
  if (!selection.empty) {
@@ -61276,6 +61386,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61276
61386
  },
61277
61387
  mousedown: (view, event) => {
61278
61388
  if (event.button === 2) {
61389
+ if (shouldAllowNativeContextMenu(event)) {
61390
+ return false;
61391
+ }
61279
61392
  event.preventDefault();
61280
61393
  const { selection: selection2 } = view.state;
61281
61394
  if (!selection2.empty) {
@@ -91267,6 +91380,115 @@ ${style2}
91267
91380
  this.updateToolbarState();
91268
91381
  }
91269
91382
  };
91383
+ const onMarginClickCursorChange = (event, editor) => {
91384
+ const y2 = event.clientY;
91385
+ const x = event.clientX;
91386
+ const { view } = editor;
91387
+ const editorRect = view.dom.getBoundingClientRect();
91388
+ let coords = {
91389
+ left: 0,
91390
+ top: y2
91391
+ };
91392
+ let isRightMargin = false;
91393
+ if (x > editorRect.right) {
91394
+ coords.left = editorRect.left + editorRect.width - 1;
91395
+ isRightMargin = true;
91396
+ } else if (x < editorRect.left) {
91397
+ coords.left = editorRect.left;
91398
+ }
91399
+ const pos = view.posAtCoords(coords)?.pos;
91400
+ if (pos) {
91401
+ let cursorPos = pos;
91402
+ if (isRightMargin) {
91403
+ const $pos = view.state.doc.resolve(pos);
91404
+ const charOffset = $pos.textOffset;
91405
+ const node = view.state.doc.nodeAt(pos);
91406
+ const text = node?.text;
91407
+ const charAtPos = text?.charAt(charOffset);
91408
+ cursorPos = node?.isText && charAtPos !== " " ? pos - 1 : pos;
91409
+ }
91410
+ const transaction = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, cursorPos));
91411
+ view.dispatch(transaction);
91412
+ view.focus();
91413
+ }
91414
+ };
91415
+ const checkNodeSpecificClicks = (editor, event, popoverControls) => {
91416
+ if (!editor) return;
91417
+ if (selectionHasNodeOrMark(editor.view.state, "link", { requireEnds: true })) {
91418
+ popoverControls.component = LinkInput;
91419
+ popoverControls.position = {
91420
+ left: `${event.clientX - editor.element.getBoundingClientRect().left}px`,
91421
+ top: `${event.clientY - editor.element.getBoundingClientRect().top + 15}px`
91422
+ };
91423
+ popoverControls.props = {
91424
+ showInput: true
91425
+ };
91426
+ popoverControls.visible = true;
91427
+ }
91428
+ };
91429
+ function selectionHasNodeOrMark(state2, name, options = {}) {
91430
+ const { requireEnds = false } = options;
91431
+ const $from = state2.selection.$from;
91432
+ const $to = state2.selection.$to;
91433
+ if (requireEnds) {
91434
+ for (let d2 = $from.depth; d2 > 0; d2--) {
91435
+ if ($from.node(d2).type.name === name) {
91436
+ return true;
91437
+ }
91438
+ }
91439
+ for (let d2 = $to.depth; d2 > 0; d2--) {
91440
+ if ($to.node(d2).type.name === name) {
91441
+ return true;
91442
+ }
91443
+ }
91444
+ } else {
91445
+ for (let d2 = $from.depth; d2 > 0; d2--) {
91446
+ if ($from.node(d2).type.name === name) {
91447
+ return true;
91448
+ }
91449
+ }
91450
+ }
91451
+ const markType = state2.schema.marks[name];
91452
+ if (markType) {
91453
+ const { from: from2, to, empty: empty2 } = state2.selection;
91454
+ if (requireEnds) {
91455
+ const fromMarks = markType.isInSet($from.marks());
91456
+ const toMarks = markType.isInSet($to.marks());
91457
+ if (fromMarks || toMarks) {
91458
+ return true;
91459
+ }
91460
+ if (empty2 && markType.isInSet(state2.storedMarks || $from.marks())) {
91461
+ return true;
91462
+ }
91463
+ } else {
91464
+ if (empty2) {
91465
+ if (markType.isInSet(state2.storedMarks || $from.marks())) {
91466
+ return true;
91467
+ }
91468
+ } else {
91469
+ let hasMark = false;
91470
+ state2.doc.nodesBetween(from2, to, (node) => {
91471
+ if (markType.isInSet(node.marks)) {
91472
+ hasMark = true;
91473
+ return false;
91474
+ }
91475
+ });
91476
+ if (hasMark) return true;
91477
+ }
91478
+ }
91479
+ }
91480
+ return false;
91481
+ }
91482
+ function moveCursorToMouseEvent(event, editor) {
91483
+ const { view } = editor;
91484
+ const coords = { left: event.clientX, top: event.clientY };
91485
+ const pos = view.posAtCoords(coords)?.pos;
91486
+ if (typeof pos === "number") {
91487
+ const tr = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, pos));
91488
+ view.dispatch(tr);
91489
+ view.focus();
91490
+ }
91491
+ }
91270
91492
  const ICONS = {
91271
91493
  addRowBefore: plusIconSvg,
91272
91494
  addRowAfter: plusIconSvg,
@@ -91466,6 +91688,30 @@ ${style2}
91466
91688
  return baseProps;
91467
91689
  }
91468
91690
  };
91691
+ function normalizeClipboardContent(rawClipboardContent) {
91692
+ if (!rawClipboardContent) {
91693
+ return {
91694
+ html: null,
91695
+ text: null,
91696
+ hasContent: false,
91697
+ raw: null
91698
+ };
91699
+ }
91700
+ const html = typeof rawClipboardContent.html === "string" ? rawClipboardContent.html : null;
91701
+ const text = typeof rawClipboardContent.text === "string" ? rawClipboardContent.text : null;
91702
+ const hasHtml = !!html && html.trim().length > 0;
91703
+ const hasText = !!text && text.length > 0;
91704
+ const isObject2 = typeof rawClipboardContent === "object" && rawClipboardContent !== null;
91705
+ const fragmentSize = typeof rawClipboardContent.size === "number" ? rawClipboardContent.size : null;
91706
+ const nestedSize = isObject2 && rawClipboardContent.content && typeof rawClipboardContent.content.size === "number" ? rawClipboardContent.content.size : null;
91707
+ const hasFragmentContent = (fragmentSize ?? nestedSize ?? 0) > 0;
91708
+ return {
91709
+ html,
91710
+ text,
91711
+ hasContent: hasHtml || hasText || hasFragmentContent,
91712
+ raw: rawClipboardContent
91713
+ };
91714
+ }
91469
91715
  async function getEditorContext(editor, event) {
91470
91716
  const { view } = editor;
91471
91717
  const { state: state2 } = view;
@@ -91481,123 +91727,144 @@ ${style2}
91481
91727
  pos = from2;
91482
91728
  node = state2.doc.nodeAt(pos);
91483
91729
  }
91484
- const clipboardContent = await readFromClipboard(state2);
91730
+ const rawClipboardContent = await readFromClipboard(state2);
91731
+ const clipboardContent = normalizeClipboardContent(rawClipboardContent);
91732
+ const structureFromResolvedPos = pos !== null ? getStructureFromResolvedPos(state2, pos) : null;
91733
+ const isInTable2 = structureFromResolvedPos?.isInTable ?? selectionHasNodeOrMark(state2, "table", { requireEnds: true });
91734
+ const isInList = structureFromResolvedPos?.isInList ?? (selectionHasNodeOrMark(state2, "bulletList", { requireEnds: false }) || selectionHasNodeOrMark(state2, "orderedList", { requireEnds: false }));
91735
+ const isInSectionNode = structureFromResolvedPos?.isInSectionNode ?? selectionHasNodeOrMark(state2, "documentSection", { requireEnds: true });
91736
+ const currentNodeType = node?.type?.name || null;
91737
+ const activeMarks = [];
91738
+ if (event && pos !== null) {
91739
+ const $pos = state2.doc.resolve(pos);
91740
+ if ($pos.marks && typeof $pos.marks === "function") {
91741
+ $pos.marks().forEach((mark) => activeMarks.push(mark.type.name));
91742
+ }
91743
+ if (node && node.marks) {
91744
+ node.marks.forEach((mark) => activeMarks.push(mark.type.name));
91745
+ }
91746
+ } else {
91747
+ state2.storedMarks?.forEach((mark) => activeMarks.push(mark.type.name));
91748
+ state2.selection.$head.marks().forEach((mark) => activeMarks.push(mark.type.name));
91749
+ }
91750
+ const isTrackedChange = activeMarks.includes("trackInsert") || activeMarks.includes("trackDelete");
91751
+ let trackedChangeId = null;
91752
+ if (isTrackedChange && event && pos !== null) {
91753
+ const $pos = state2.doc.resolve(pos);
91754
+ const marksAtPos = $pos.marks();
91755
+ const trackedMark = marksAtPos.find((mark) => mark.type.name === "trackInsert" || mark.type.name === "trackDelete");
91756
+ if (trackedMark) {
91757
+ trackedChangeId = trackedMark.attrs.id;
91758
+ }
91759
+ }
91760
+ const cursorCoords = pos ? view.coordsAtPos(pos) : null;
91761
+ const cursorPosition = cursorCoords ? {
91762
+ x: cursorCoords.left,
91763
+ y: cursorCoords.top
91764
+ } : null;
91485
91765
  return {
91486
- editor,
91766
+ // Selection info
91487
91767
  selectedText,
91768
+ hasSelection: !empty2,
91769
+ selectionStart: from2,
91770
+ selectionEnd: to,
91771
+ // Document structure
91772
+ isInTable: isInTable2,
91773
+ isInList,
91774
+ isInSectionNode,
91775
+ currentNodeType,
91776
+ activeMarks,
91777
+ // Document state
91778
+ isTrackedChange,
91779
+ trackedChangeId,
91780
+ documentMode: editor.options?.documentMode || "editing",
91781
+ canUndo: computeCanUndo(editor, state2),
91782
+ canRedo: computeCanRedo(editor, state2),
91783
+ isEditable: editor.isEditable,
91784
+ // Clipboard
91785
+ clipboardContent,
91786
+ // Position and trigger info
91787
+ cursorPosition,
91488
91788
  pos,
91489
91789
  node,
91490
91790
  event,
91491
- clipboardContent
91791
+ // Editor reference for advanced use cases
91792
+ editor
91492
91793
  };
91493
91794
  }
91494
- const onMarginClickCursorChange = (event, editor) => {
91495
- const y2 = event.clientY;
91496
- const x = event.clientX;
91497
- const { view } = editor;
91498
- const editorRect = view.dom.getBoundingClientRect();
91499
- let coords = {
91500
- left: 0,
91501
- top: y2
91502
- };
91503
- let isRightMargin = false;
91504
- if (x > editorRect.right) {
91505
- coords.left = editorRect.left + editorRect.width - 1;
91506
- isRightMargin = true;
91507
- } else if (x < editorRect.left) {
91508
- coords.left = editorRect.left;
91795
+ function computeCanUndo(editor, state2) {
91796
+ if (typeof editor?.can === "function") {
91797
+ try {
91798
+ const can = editor.can();
91799
+ if (can && typeof can.undo === "function") {
91800
+ return !!can.undo();
91801
+ }
91802
+ } catch (error) {
91803
+ console.warn("[SlashMenu] Unable to determine undo availability via editor.can():", error);
91804
+ }
91509
91805
  }
91510
- const pos = view.posAtCoords(coords)?.pos;
91511
- if (pos) {
91512
- let cursorPos = pos;
91513
- if (isRightMargin) {
91514
- const $pos = view.state.doc.resolve(pos);
91515
- const charOffset = $pos.textOffset;
91516
- const node = view.state.doc.nodeAt(pos);
91517
- const text = node?.text;
91518
- const charAtPos = text?.charAt(charOffset);
91519
- cursorPos = node?.isText && charAtPos !== " " ? pos - 1 : pos;
91806
+ if (isCollaborationEnabled(editor)) {
91807
+ try {
91808
+ const undoManager = yUndoPluginKey.getState(state2)?.undoManager;
91809
+ return !!undoManager && undoManager.undoStack.length > 0;
91810
+ } catch (error) {
91811
+ console.warn("[SlashMenu] Unable to determine undo availability via y-prosemirror:", error);
91520
91812
  }
91521
- const transaction = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, cursorPos));
91522
- view.dispatch(transaction);
91523
- view.focus();
91524
91813
  }
91525
- };
91526
- const checkNodeSpecificClicks = (editor, event, popoverControls) => {
91527
- if (!editor) return;
91528
- if (selectionHasNodeOrMark(editor.view.state, "link", { requireEnds: true })) {
91529
- popoverControls.component = LinkInput;
91530
- popoverControls.position = {
91531
- left: `${event.clientX - editor.element.getBoundingClientRect().left}px`,
91532
- top: `${event.clientY - editor.element.getBoundingClientRect().top + 15}px`
91533
- };
91534
- popoverControls.props = {
91535
- showInput: true
91536
- };
91537
- popoverControls.visible = true;
91814
+ try {
91815
+ return undoDepth(state2) > 0;
91816
+ } catch (error) {
91817
+ console.warn("[SlashMenu] Unable to determine undo availability via history plugin:", error);
91818
+ return false;
91538
91819
  }
91539
- };
91540
- function selectionHasNodeOrMark(state2, name, options = {}) {
91541
- const { requireEnds = false } = options;
91542
- const $from = state2.selection.$from;
91543
- const $to = state2.selection.$to;
91544
- if (requireEnds) {
91545
- for (let d2 = $from.depth; d2 > 0; d2--) {
91546
- if ($from.node(d2).type.name === name) {
91547
- return true;
91548
- }
91549
- }
91550
- for (let d2 = $to.depth; d2 > 0; d2--) {
91551
- if ($to.node(d2).type.name === name) {
91552
- return true;
91553
- }
91554
- }
91555
- } else {
91556
- for (let d2 = $from.depth; d2 > 0; d2--) {
91557
- if ($from.node(d2).type.name === name) {
91558
- return true;
91820
+ }
91821
+ function computeCanRedo(editor, state2) {
91822
+ if (typeof editor?.can === "function") {
91823
+ try {
91824
+ const can = editor.can();
91825
+ if (can && typeof can.redo === "function") {
91826
+ return !!can.redo();
91559
91827
  }
91828
+ } catch (error) {
91829
+ console.warn("[SlashMenu] Unable to determine redo availability via editor.can():", error);
91560
91830
  }
91561
91831
  }
91562
- const markType = state2.schema.marks[name];
91563
- if (markType) {
91564
- const { from: from2, to, empty: empty2 } = state2.selection;
91565
- if (requireEnds) {
91566
- const fromMarks = markType.isInSet($from.marks());
91567
- const toMarks = markType.isInSet($to.marks());
91568
- if (fromMarks || toMarks) {
91569
- return true;
91570
- }
91571
- if (empty2 && markType.isInSet(state2.storedMarks || $from.marks())) {
91572
- return true;
91573
- }
91574
- } else {
91575
- if (empty2) {
91576
- if (markType.isInSet(state2.storedMarks || $from.marks())) {
91577
- return true;
91578
- }
91579
- } else {
91580
- let hasMark = false;
91581
- state2.doc.nodesBetween(from2, to, (node) => {
91582
- if (markType.isInSet(node.marks)) {
91583
- hasMark = true;
91584
- return false;
91585
- }
91586
- });
91587
- if (hasMark) return true;
91588
- }
91832
+ if (isCollaborationEnabled(editor)) {
91833
+ try {
91834
+ const undoManager = yUndoPluginKey.getState(state2)?.undoManager;
91835
+ return !!undoManager && undoManager.redoStack.length > 0;
91836
+ } catch (error) {
91837
+ console.warn("[SlashMenu] Unable to determine redo availability via y-prosemirror:", error);
91589
91838
  }
91590
91839
  }
91591
- return false;
91840
+ try {
91841
+ return redoDepth(state2) > 0;
91842
+ } catch (error) {
91843
+ console.warn("[SlashMenu] Unable to determine redo availability via history plugin:", error);
91844
+ return false;
91845
+ }
91592
91846
  }
91593
- function moveCursorToMouseEvent(event, editor) {
91594
- const { view } = editor;
91595
- const coords = { left: event.clientX, top: event.clientY };
91596
- const pos = view.posAtCoords(coords)?.pos;
91597
- if (typeof pos === "number") {
91598
- const tr = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, pos));
91599
- view.dispatch(tr);
91600
- view.focus();
91847
+ function isCollaborationEnabled(editor) {
91848
+ return Boolean(editor?.options?.collaborationProvider && editor?.options?.ydoc);
91849
+ }
91850
+ function getStructureFromResolvedPos(state2, pos) {
91851
+ try {
91852
+ const $pos = state2.doc.resolve(pos);
91853
+ const ancestors = /* @__PURE__ */ new Set();
91854
+ for (let depth = $pos.depth; depth > 0; depth--) {
91855
+ ancestors.add($pos.node(depth).type.name);
91856
+ }
91857
+ const isInList = ancestors.has("bulletList") || ancestors.has("orderedList");
91858
+ const isInTable2 = ancestors.has("table") || ancestors.has("tableRow") || ancestors.has("tableCell") || ancestors.has("tableHeader");
91859
+ const isInSectionNode = ancestors.has("documentSection");
91860
+ return {
91861
+ isInTable: isInTable2,
91862
+ isInList,
91863
+ isInSectionNode
91864
+ };
91865
+ } catch (error) {
91866
+ console.warn("[SlashMenu] Unable to resolve position for structural context:", error);
91867
+ return null;
91601
91868
  }
91602
91869
  }
91603
91870
  const isModuleEnabled = (editorOptions, moduleName) => {
@@ -91611,8 +91878,52 @@ ${style2}
91611
91878
  return true;
91612
91879
  }
91613
91880
  };
91881
+ function applyCustomMenuConfiguration(defaultSections, context) {
91882
+ const { editor } = context;
91883
+ const slashMenuConfig = editor.options?.slashMenuConfig;
91884
+ if (!slashMenuConfig) {
91885
+ return defaultSections;
91886
+ }
91887
+ let sections = [];
91888
+ if (slashMenuConfig.includeDefaultItems !== false) {
91889
+ sections = [...defaultSections];
91890
+ }
91891
+ if (slashMenuConfig.customItems && Array.isArray(slashMenuConfig.customItems)) {
91892
+ sections = [...sections, ...slashMenuConfig.customItems];
91893
+ }
91894
+ if (typeof slashMenuConfig.menuProvider === "function") {
91895
+ try {
91896
+ sections = slashMenuConfig.menuProvider(context, sections) || sections;
91897
+ } catch (error) {
91898
+ console.warn("[SlashMenu] Error in custom menuProvider:", error);
91899
+ }
91900
+ }
91901
+ return sections;
91902
+ }
91903
+ function filterCustomItems(sections, context) {
91904
+ return sections.map((section) => {
91905
+ const filteredItems = section.items.filter((item) => {
91906
+ if (typeof item.showWhen === "function") {
91907
+ try {
91908
+ return item.showWhen(context);
91909
+ } catch (error) {
91910
+ console.warn(`[SlashMenu] Error in showWhen for item ${item.id}:`, error);
91911
+ return false;
91912
+ }
91913
+ }
91914
+ return true;
91915
+ });
91916
+ return {
91917
+ ...section,
91918
+ items: filteredItems
91919
+ };
91920
+ }).filter((section) => section.items.length > 0);
91921
+ }
91614
91922
  function getItems(context) {
91615
91923
  const { editor, selectedText, trigger: trigger2, clipboardContent } = context;
91924
+ const clipboardHasContent = Boolean(
91925
+ clipboardContent?.hasContent || clipboardContent?.html || clipboardContent?.text || typeof clipboardContent?.size === "number" && clipboardContent.size > 0 || clipboardContent && typeof clipboardContent?.content?.size === "number" && clipboardContent.content.size > 0 || clipboardContent?.raw && typeof clipboardContent.raw.size === "number" && clipboardContent.raw.size > 0 || clipboardContent?.raw && typeof clipboardContent.raw?.content?.size === "number" && clipboardContent.raw.content.size > 0
91926
+ );
91616
91927
  const isInTable2 = selectionHasNodeOrMark(editor.view.state, "table", { requireEnds: true });
91617
91928
  const isInSectionNode = selectionHasNodeOrMark(editor.view.state, "documentSection", { requireEnds: true });
91618
91929
  const sections = [
@@ -91749,12 +92060,13 @@ ${style2}
91749
92060
  ]
91750
92061
  }
91751
92062
  ];
91752
- const filteredSections = sections.map((section) => {
92063
+ let allSections = applyCustomMenuConfiguration(sections, context);
92064
+ const filteredSections = allSections.map((section) => {
91753
92065
  const filteredItems = section.items.filter((item) => {
91754
92066
  if (item.requiresModule && !isModuleEnabled(editor?.options, item.requiresModule)) return false;
91755
92067
  if (item.requiresSelection && !selectedText) return false;
91756
92068
  if (!item.allowedTriggers.includes(trigger2)) return false;
91757
- if (item.requiresClipboard && !clipboardContent) return false;
92069
+ if (item.requiresClipboard && !clipboardHasContent) return false;
91758
92070
  if (item.requiresTableParent && !isInTable2 || item.id === "insert-table" && isInTable2) return false;
91759
92071
  if (item.requiresSectionParent && !isInSectionNode) return false;
91760
92072
  return true;
@@ -91764,7 +92076,8 @@ ${style2}
91764
92076
  items: filteredItems
91765
92077
  };
91766
92078
  }).filter((section) => section.items.length > 0);
91767
- return filteredSections;
92079
+ const finalSections = filterCustomItems(filteredSections, context);
92080
+ return finalSections;
91768
92081
  }
91769
92082
  const _hoisted_1$3$1 = { class: "slash-menu-items" };
91770
92083
  const _hoisted_2$1$1 = {
@@ -91799,6 +92112,7 @@ ${style2}
91799
92112
  const menuRef = ref$1(null);
91800
92113
  const sections = ref$1([]);
91801
92114
  const selectedId = ref$1(null);
92115
+ const currentContext = ref$1(null);
91802
92116
  const handleEditorUpdate = () => {
91803
92117
  if (!props.editor?.isEditable && isOpen.value) {
91804
92118
  closeMenu({ restoreCursor: false });
@@ -91844,6 +92158,44 @@ ${style2}
91844
92158
  selectedId.value = newItems[0].id;
91845
92159
  }
91846
92160
  });
92161
+ const customItemRefs = /* @__PURE__ */ new Map();
92162
+ const setCustomItemRef = (el, item) => {
92163
+ if (el && item.render) {
92164
+ customItemRefs.set(item.id, { element: el, item });
92165
+ nextTick(() => {
92166
+ renderCustomItem(item.id);
92167
+ });
92168
+ }
92169
+ };
92170
+ const renderCustomItem = async (itemId) => {
92171
+ const refData = customItemRefs.get(itemId);
92172
+ if (!refData || refData.element.hasCustomContent) return;
92173
+ const { element, item } = refData;
92174
+ try {
92175
+ if (!currentContext.value) {
92176
+ currentContext.value = await getEditorContext(props.editor);
92177
+ }
92178
+ const context = currentContext.value;
92179
+ const customElement = item.render(context);
92180
+ if (customElement instanceof HTMLElement) {
92181
+ element.innerHTML = "";
92182
+ element.appendChild(customElement);
92183
+ element.hasCustomContent = true;
92184
+ }
92185
+ } catch (error) {
92186
+ console.warn(`[SlashMenu] Error rendering custom item ${itemId}:`, error);
92187
+ element.innerHTML = `<span>${item.label || "Custom Item"}</span>`;
92188
+ element.hasCustomContent = true;
92189
+ }
92190
+ };
92191
+ const cleanupCustomItems = () => {
92192
+ customItemRefs.forEach((refData) => {
92193
+ if (refData.element) {
92194
+ refData.element.hasCustomContent = false;
92195
+ }
92196
+ });
92197
+ customItemRefs.clear();
92198
+ };
91847
92199
  const handleGlobalKeyDown = (event) => {
91848
92200
  if (event.key === "Escape") {
91849
92201
  event.preventDefault();
@@ -91889,27 +92241,27 @@ ${style2}
91889
92241
  };
91890
92242
  const handleRightClick = async (event) => {
91891
92243
  const readOnly = !props.editor?.isEditable;
91892
- const isHoldingCtrl = event.ctrlKey;
91893
- if (readOnly || isHoldingCtrl) {
92244
+ if (readOnly || shouldBypassContextMenu(event)) {
91894
92245
  return;
91895
92246
  }
91896
92247
  event.preventDefault();
92248
+ const context = await getEditorContext(props.editor, event);
92249
+ currentContext.value = context;
92250
+ sections.value = getItems({ ...context, trigger: "click" });
92251
+ selectedId.value = flattenedItems.value[0]?.id || null;
92252
+ searchQuery.value = "";
91897
92253
  props.editor.view.dispatch(
91898
92254
  props.editor.view.state.tr.setMeta(SlashMenuPluginKey, {
91899
92255
  type: "open",
91900
- pos: props.editor.view.state.selection.from,
92256
+ pos: context?.pos ?? props.editor.view.state.selection.from,
91901
92257
  clientX: event.clientX,
91902
92258
  clientY: event.clientY
91903
92259
  })
91904
92260
  );
91905
- searchQuery.value = "";
91906
- const context = await getEditorContext(props.editor, event);
91907
- sections.value = getItems({ ...context, trigger: "click" });
91908
- selectedId.value = flattenedItems.value[0]?.id || null;
91909
92261
  };
91910
92262
  const executeCommand = async (item) => {
91911
92263
  if (props.editor) {
91912
- item.action ? await item.action(props.editor) : null;
92264
+ item.action ? await item.action(props.editor, currentContext.value) : null;
91913
92265
  if (item.component) {
91914
92266
  menuRef.value;
91915
92267
  const componentProps = getPropsByItemId(item.id, props);
@@ -91927,7 +92279,7 @@ ${style2}
91927
92279
  const closeMenu = (options = { restoreCursor: true }) => {
91928
92280
  if (props.editor?.view) {
91929
92281
  const pluginState = SlashMenuPluginKey.getState(props.editor.view.state);
91930
- const { anchorPos } = pluginState;
92282
+ const anchorPos = pluginState?.anchorPos;
91931
92283
  props.editor.view.dispatch(
91932
92284
  props.editor.view.state.tr.setMeta(SlashMenuPluginKey, {
91933
92285
  type: "close"
@@ -91940,6 +92292,8 @@ ${style2}
91940
92292
  props.editor.view.dispatch(tr);
91941
92293
  props.editor.view.focus();
91942
92294
  }
92295
+ cleanupCustomItems();
92296
+ currentContext.value = null;
91943
92297
  isOpen.value = false;
91944
92298
  searchQuery.value = "";
91945
92299
  sections.value = [];
@@ -91956,19 +92310,29 @@ ${style2}
91956
92310
  isOpen.value = true;
91957
92311
  menuPosition.value = event.menuPosition;
91958
92312
  searchQuery.value = "";
91959
- const context = await getEditorContext(props.editor);
91960
- sections.value = getItems({ ...context, trigger: "slash" });
91961
- selectedId.value = flattenedItems.value[0]?.id || null;
92313
+ if (!currentContext.value) {
92314
+ const context = await getEditorContext(props.editor);
92315
+ currentContext.value = context;
92316
+ sections.value = getItems({ ...context, trigger: "slash" });
92317
+ selectedId.value = flattenedItems.value[0]?.id || null;
92318
+ } else if (sections.value.length === 0) {
92319
+ const trigger2 = currentContext.value.event?.type === "contextmenu" ? "click" : "slash";
92320
+ sections.value = getItems({ ...currentContext.value, trigger: trigger2 });
92321
+ selectedId.value = flattenedItems.value[0]?.id || null;
92322
+ }
91962
92323
  });
91963
92324
  props.editor.view.dom.addEventListener("contextmenu", handleRightClick);
91964
92325
  props.editor.on("slashMenu:close", () => {
92326
+ cleanupCustomItems();
91965
92327
  isOpen.value = false;
91966
92328
  searchQuery.value = "";
92329
+ currentContext.value = null;
91967
92330
  });
91968
92331
  });
91969
92332
  onBeforeUnmount(() => {
91970
92333
  document.removeEventListener("keydown", handleGlobalKeyDown);
91971
92334
  document.removeEventListener("mousedown", handleGlobalOutsideClick);
92335
+ cleanupCustomItems();
91972
92336
  if (props.editor) {
91973
92337
  try {
91974
92338
  props.editor.off("slashMenu:open");
@@ -92015,12 +92379,19 @@ ${style2}
92015
92379
  class: normalizeClass(["slash-menu-item", { "is-selected": item.id === selectedId.value }]),
92016
92380
  onClick: ($event) => executeCommand(item)
92017
92381
  }, [
92018
- item.icon ? (openBlock(), createElementBlock("span", {
92382
+ item.render ? (openBlock(), createElementBlock("div", {
92019
92383
  key: 0,
92020
- class: "slash-menu-item-icon",
92021
- innerHTML: item.icon
92022
- }, null, 8, _hoisted_4$5)) : createCommentVNode("", true),
92023
- createBaseVNode("span", null, toDisplayString(item.label), 1)
92384
+ ref_for: true,
92385
+ ref: (el) => setCustomItemRef(el, item),
92386
+ class: "slash-menu-custom-item"
92387
+ }, null, 512)) : (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
92388
+ item.icon ? (openBlock(), createElementBlock("span", {
92389
+ key: 0,
92390
+ class: "slash-menu-item-icon",
92391
+ innerHTML: item.icon
92392
+ }, null, 8, _hoisted_4$5)) : createCommentVNode("", true),
92393
+ createBaseVNode("span", null, toDisplayString(item.label), 1)
92394
+ ], 64))
92024
92395
  ], 10, _hoisted_3$1$1);
92025
92396
  }), 128))
92026
92397
  ], 64);
@@ -92715,34 +93086,76 @@ ${style2}
92715
93086
  }
92716
93087
  };
92717
93088
  const SuperInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__scopeId", "data-v-4d5cff52"]]);
93089
+ const additionalHandlers = Object.freeze({
93090
+ "mc:AlternateContent": translator,
93091
+ "w:b": translator$12,
93092
+ "w:bidiVisual": translator$F,
93093
+ "w:bookmarkEnd": translator$1,
93094
+ "w:bookmarkStart": translator$2,
93095
+ "w:bottom": translator$s,
93096
+ "w:br": translator$16,
93097
+ "w:cantSplit": translator$T,
93098
+ "w:cnfStyle": translator$S,
93099
+ "w:color": translator$_,
93100
+ "w:divId": translator$R,
93101
+ "w:drawing": translator$4,
93102
+ "w:end": translator$q,
93103
+ "w:gridAfter": translator$Q,
93104
+ "w:gridBefore": translator$P,
93105
+ "w:gridCol": translator$b,
93106
+ "w:hidden": translator$O,
93107
+ "w:highlight": translator$15,
93108
+ "w:hyperlink": translator$7,
93109
+ "w:i": translator$11,
93110
+ "w:insideH": translator$o,
93111
+ "w:insideV": translator$n,
93112
+ "w:jc": translator$N,
93113
+ "w:left": translator$m,
93114
+ "w:p": translator$13,
93115
+ "w:r": translator$U,
93116
+ "w:rFonts": translator$Z,
93117
+ "w:rPr": translator$V,
93118
+ "w:rStyle": translator$Y,
93119
+ "w:right": translator$k,
93120
+ "w:sdt": translator$3,
93121
+ "w:shd": translator$E,
93122
+ "w:start": translator$i,
93123
+ "w:strike": translator$$,
93124
+ "w:sz": translator$X,
93125
+ "w:szCs": translator$W,
93126
+ "w:tab": translator$14,
93127
+ "w:tbl": translator$9,
93128
+ "w:tblBorders": translator$e,
93129
+ "w:tblCaption": translator$D,
93130
+ "w:tblCellMar": translator$d,
93131
+ "w:tblCellSpacing": translator$M,
93132
+ "w:tblDescription": translator$C,
93133
+ "w:tblGrid": translator$a,
93134
+ "w:tblHeader": translator$L,
93135
+ "w:tblInd": translator$B,
93136
+ "w:tblLayout": translator$A,
93137
+ "w:tblLook": translator$z,
93138
+ "w:tblOverlap": translator$y,
93139
+ "w:tblPr": translator$c,
93140
+ "w:tblStyle": translator$x,
93141
+ "w:tblStyleColBandSize": translator$w,
93142
+ "w:tblStyleRowBandSize": translator$v,
93143
+ "w:tblW": translator$u,
93144
+ "w:tblpPr": translator$t,
93145
+ "w:tc": translator$8,
93146
+ "w:top": translator$g,
93147
+ "w:tr": translator$G,
93148
+ "w:trHeight": translator$K,
93149
+ "w:trPr": translator$H,
93150
+ "w:u": translator$10,
93151
+ "w:wAfter": translator$J,
93152
+ "w:wBefore": translator$I,
93153
+ "wp:anchor": translator$6,
93154
+ "wp:inline": translator$5
93155
+ });
92718
93156
  const baseHandlers = {
92719
93157
  ...runPropertyTranslators,
92720
- "w:br": translator$15,
92721
- "w:cantSplit": translator$S,
92722
- "w:cnfStyle": translator$R,
92723
- "w:divId": translator$Q,
92724
- "w:gridAfter": translator$P,
92725
- "w:gridBefore": translator$O,
92726
- "w:hidden": translator$N,
92727
- "w:hyperlink": translator$6,
92728
- "w:jc": translator$M,
92729
- "w:p": translator$12,
92730
- "w:r": translator$T,
92731
- "w:rPr": translator$U,
92732
- "w:sdt": translator$2,
92733
- "w:tab": translator$13,
92734
- "w:tblCellSpacing": translator$L,
92735
- "w:tblHeader": translator$K,
92736
- "w:tc": translator$7,
92737
- "w:tr": translator$F,
92738
- "w:trHeight": translator$J,
92739
- "w:trPr": translator$G,
92740
- "w:wAfter": translator$I,
92741
- "w:wBefore": translator$H,
92742
- "wp:anchor": translator$5,
92743
- "wp:inline": translator$4,
92744
- "w:bookmarkStart": translator$1,
92745
- "w:bookmarkEnd": translator
93158
+ ...additionalHandlers
92746
93159
  };
92747
93160
  const registeredHandlers = Object.freeze(baseHandlers);
92748
93161
  const Extensions = {
@@ -109582,6 +109995,7 @@ ${style2}
109582
109995
  annotations: proxy.$superdoc.config.annotations,
109583
109996
  isCommentsEnabled: proxy.$superdoc.config.modules?.comments,
109584
109997
  isAiEnabled: proxy.$superdoc.config.modules?.ai,
109998
+ slashMenuConfig: proxy.$superdoc.config.modules?.slashMenu,
109585
109999
  onBeforeCreate: onEditorBeforeCreate,
109586
110000
  onCreate: onEditorCreate,
109587
110001
  onDestroy: onEditorDestroy,
@@ -109943,7 +110357,7 @@ ${style2}
109943
110357
  };
109944
110358
  }
109945
110359
  };
109946
- const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-07532c12"]]);
110360
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-dbfba5b9"]]);
109947
110361
  const createSuperdocVueApp = () => {
109948
110362
  const app = createApp(App);
109949
110363
  const pinia = createPinia();
@@ -110045,7 +110459,7 @@ ${style2}
110045
110459
  this.config.colors = shuffleArray(this.config.colors);
110046
110460
  this.userColorMap = /* @__PURE__ */ new Map();
110047
110461
  this.colorIndex = 0;
110048
- this.version = "0.20.2";
110462
+ this.version = "0.21.0";
110049
110463
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
110050
110464
  this.superdocId = config2.superdocId || v4();
110051
110465
  this.colors = this.config.colors;