mathpix-markdown-it 1.2.3 → 1.2.5

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 (236) hide show
  1. package/.circleci/config.yml +4 -4
  2. package/.idea/workspace.xml +412 -368
  3. package/README.md +11 -0
  4. package/es5/bundle.js +1 -1
  5. package/es5/context-menu.js +1 -1
  6. package/es5/index.js +1 -1
  7. package/lib/bundle.js +3 -2
  8. package/lib/bundle.js.map +1 -1
  9. package/lib/components/mathpix-markdown/index.js +3 -2
  10. package/lib/components/mathpix-markdown/index.js.map +1 -1
  11. package/lib/contex-menu/index.js +60 -44
  12. package/lib/contex-menu/index.js.map +1 -1
  13. package/lib/contex-menu/menu/helper.js +24 -17
  14. package/lib/contex-menu/menu/helper.js.map +1 -1
  15. package/lib/contex-menu/menu/index.js +21 -16
  16. package/lib/contex-menu/menu/index.js.map +1 -1
  17. package/lib/contex-menu/menu/menu-item-actions.js +30 -23
  18. package/lib/contex-menu/menu/menu-item-actions.js.map +1 -1
  19. package/lib/contex-menu/menu/menu-item.js +8 -7
  20. package/lib/contex-menu/menu/menu-item.js.map +1 -1
  21. package/lib/contex-menu/menu/menu-items.js +4 -3
  22. package/lib/contex-menu/menu/menu-items.js.map +1 -1
  23. package/lib/contex-menu/styles.js +3 -2
  24. package/lib/contex-menu/styles.js.map +1 -1
  25. package/lib/context-menu.js +3 -2
  26. package/lib/context-menu.js.map +1 -1
  27. package/lib/helpers/normalize-link.js +2 -1
  28. package/lib/helpers/normalize-link.js.map +1 -1
  29. package/lib/helpers/parse-mmd-element.js +15 -9
  30. package/lib/helpers/parse-mmd-element.js.map +1 -1
  31. package/lib/index.d.ts +2 -2
  32. package/lib/index.js +2 -1
  33. package/lib/index.js.map +1 -1
  34. package/lib/markdown/common/consts.js +1 -1
  35. package/lib/markdown/common/consts.js.map +1 -1
  36. package/lib/markdown/common/csv.js +5 -3
  37. package/lib/markdown/common/csv.js.map +1 -1
  38. package/lib/markdown/common/labels.js +28 -18
  39. package/lib/markdown/common/labels.js.map +1 -1
  40. package/lib/markdown/common/table-markdown.js +7 -4
  41. package/lib/markdown/common/table-markdown.js.map +1 -1
  42. package/lib/markdown/common/tsv.js +2 -1
  43. package/lib/markdown/common/tsv.js.map +1 -1
  44. package/lib/markdown/common.js +12 -7
  45. package/lib/markdown/common.js.map +1 -1
  46. package/lib/markdown/dom-adaptor/index.js +2 -1
  47. package/lib/markdown/dom-adaptor/index.js.map +1 -1
  48. package/lib/markdown/highlight/common.js +27 -18
  49. package/lib/markdown/highlight/common.js.map +1 -1
  50. package/lib/markdown/highlight/highlight-math-token.js +21 -15
  51. package/lib/markdown/highlight/highlight-math-token.js.map +1 -1
  52. package/lib/markdown/highlight/render-rule-highlights.js +40 -34
  53. package/lib/markdown/highlight/render-rule-highlights.js.map +1 -1
  54. package/lib/markdown/index.js +7 -5
  55. package/lib/markdown/index.js.map +1 -1
  56. package/lib/markdown/mathpix-markdown-plugins.d.ts +1 -1
  57. package/lib/markdown/mathpix-markdown-plugins.js +23 -19
  58. package/lib/markdown/mathpix-markdown-plugins.js.map +1 -1
  59. package/lib/markdown/md-ascii/index.js +10 -7
  60. package/lib/markdown/md-ascii/index.js.map +1 -1
  61. package/lib/markdown/md-block-rule/begin-align.js +21 -19
  62. package/lib/markdown/md-block-rule/begin-align.js.map +1 -1
  63. package/lib/markdown/md-block-rule/begin-table.js +26 -21
  64. package/lib/markdown/md-block-rule/begin-table.js.map +1 -1
  65. package/lib/markdown/md-block-rule/begin-tabular/common.d.ts +5 -4
  66. package/lib/markdown/md-block-rule/begin-tabular/common.js +19 -11
  67. package/lib/markdown/md-block-rule/begin-tabular/common.js.map +1 -1
  68. package/lib/markdown/md-block-rule/begin-tabular/index.d.ts +5 -5
  69. package/lib/markdown/md-block-rule/begin-tabular/index.js +38 -23
  70. package/lib/markdown/md-block-rule/begin-tabular/index.js.map +1 -1
  71. package/lib/markdown/md-block-rule/begin-tabular/multi-column-row.js +15 -12
  72. package/lib/markdown/md-block-rule/begin-tabular/multi-column-row.js.map +1 -1
  73. package/lib/markdown/md-block-rule/begin-tabular/parse-tabular.js +34 -32
  74. package/lib/markdown/md-block-rule/begin-tabular/parse-tabular.js.map +1 -1
  75. package/lib/markdown/md-block-rule/begin-tabular/sub-code.js +11 -9
  76. package/lib/markdown/md-block-rule/begin-tabular/sub-code.js.map +1 -1
  77. package/lib/markdown/md-block-rule/begin-tabular/sub-math.d.ts +1 -1
  78. package/lib/markdown/md-block-rule/begin-tabular/sub-math.js +21 -17
  79. package/lib/markdown/md-block-rule/begin-tabular/sub-math.js.map +1 -1
  80. package/lib/markdown/md-block-rule/begin-tabular/sub-tabular.js +10 -7
  81. package/lib/markdown/md-block-rule/begin-tabular/sub-tabular.js.map +1 -1
  82. package/lib/markdown/md-block-rule/begin-tabular/tabular-td.d.ts +2 -2
  83. package/lib/markdown/md-block-rule/begin-tabular/tabular-td.js +34 -27
  84. package/lib/markdown/md-block-rule/begin-tabular/tabular-td.js.map +1 -1
  85. package/lib/markdown/md-block-rule/helper.js +2 -1
  86. package/lib/markdown/md-block-rule/helper.js.map +1 -1
  87. package/lib/markdown/md-block-rule/lists/index.js +12 -10
  88. package/lib/markdown/md-block-rule/lists/index.js.map +1 -1
  89. package/lib/markdown/md-block-rule/lists/re-level.js +24 -14
  90. package/lib/markdown/md-block-rule/lists/re-level.js.map +1 -1
  91. package/lib/markdown/md-block-rule/parse-error.d.ts +2 -2
  92. package/lib/markdown/md-block-rule/parse-error.js +22 -9
  93. package/lib/markdown/md-block-rule/parse-error.js.map +1 -1
  94. package/lib/markdown/md-block-rule/renewcommand.js +9 -6
  95. package/lib/markdown/md-block-rule/renewcommand.js.map +1 -1
  96. package/lib/markdown/md-chemistry/chemistry-drawer.js +8 -8
  97. package/lib/markdown/md-chemistry/chemistry-drawer.js.map +1 -1
  98. package/lib/markdown/md-chemistry/chemistry-options.js +8 -4
  99. package/lib/markdown/md-chemistry/chemistry-options.js.map +1 -1
  100. package/lib/markdown/md-chemistry/index.d.ts +1 -1
  101. package/lib/markdown/md-chemistry/index.js +18 -17
  102. package/lib/markdown/md-chemistry/index.js.map +1 -1
  103. package/lib/markdown/md-chemistry/smiles-drawer/src/Atom.js +2 -1
  104. package/lib/markdown/md-chemistry/smiles-drawer/src/Atom.js.map +1 -1
  105. package/lib/markdown/md-chemistry/smiles-drawer/src/CanvasWrapper.js +2 -2
  106. package/lib/markdown/md-chemistry/smiles-drawer/src/CanvasWrapper.js.map +1 -1
  107. package/lib/markdown/md-chemistry/smiles-drawer/src/Drawer.js +3 -3
  108. package/lib/markdown/md-chemistry/smiles-drawer/src/Drawer.js.map +1 -1
  109. package/lib/markdown/md-chemistry/smiles-drawer/src/Parser.js.map +1 -1
  110. package/lib/markdown/md-chemistry/smiles-drawer/src/RingConnection.js +1 -1
  111. package/lib/markdown/md-chemistry/smiles-drawer/src/RingConnection.js.map +1 -1
  112. package/lib/markdown/md-chemistry/smiles-drawer/src/SSSR.js +2 -2
  113. package/lib/markdown/md-chemistry/smiles-drawer/src/SSSR.js.map +1 -1
  114. package/lib/markdown/md-chemistry/smiles-drawer/src/SvgDrawer.js +16 -16
  115. package/lib/markdown/md-chemistry/smiles-drawer/src/SvgDrawer.js.map +1 -1
  116. package/lib/markdown/md-chemistry/smiles-drawer/src/SvgWrapper.js +14 -14
  117. package/lib/markdown/md-chemistry/smiles-drawer/src/SvgWrapper.js.map +1 -1
  118. package/lib/markdown/md-core-rules/set-positions.js +23 -18
  119. package/lib/markdown/md-core-rules/set-positions.js.map +1 -1
  120. package/lib/markdown/md-inline-rule/core-inline.js +2 -1
  121. package/lib/markdown/md-inline-rule/core-inline.js.map +1 -1
  122. package/lib/markdown/md-inline-rule/image.js +7 -5
  123. package/lib/markdown/md-inline-rule/image.js.map +1 -1
  124. package/lib/markdown/md-inline-rule/includegraphics.js +10 -7
  125. package/lib/markdown/md-inline-rule/includegraphics.js.map +1 -1
  126. package/lib/markdown/md-inline-rule/lists.js +9 -5
  127. package/lib/markdown/md-inline-rule/lists.js.map +1 -1
  128. package/lib/markdown/md-inline-rule/new-line-to-space.js +2 -1
  129. package/lib/markdown/md-inline-rule/new-line-to-space.js.map +1 -1
  130. package/lib/markdown/md-inline-rule/renewcommand.js +3 -2
  131. package/lib/markdown/md-inline-rule/renewcommand.js.map +1 -1
  132. package/lib/markdown/md-inline-rule/setcounter-section.js +3 -2
  133. package/lib/markdown/md-inline-rule/setcounter-section.js.map +1 -1
  134. package/lib/markdown/md-inline-rule/tabular.js +5 -4
  135. package/lib/markdown/md-inline-rule/tabular.js.map +1 -1
  136. package/lib/markdown/md-inline-rule/text-collapse.js +2 -1
  137. package/lib/markdown/md-inline-rule/text-collapse.js.map +1 -1
  138. package/lib/markdown/md-inline-rule/text-mode.js +3 -2
  139. package/lib/markdown/md-inline-rule/text-mode.js.map +1 -1
  140. package/lib/markdown/md-inline-rule/utils.js +2 -1
  141. package/lib/markdown/md-inline-rule/utils.js.map +1 -1
  142. package/lib/markdown/md-renderer-rules/breaks.js +4 -2
  143. package/lib/markdown/md-renderer-rules/breaks.js.map +1 -1
  144. package/lib/markdown/md-renderer-rules/index.js +20 -17
  145. package/lib/markdown/md-renderer-rules/index.js.map +1 -1
  146. package/lib/markdown/md-renderer-rules/render-lists.js +55 -48
  147. package/lib/markdown/md-renderer-rules/render-lists.js.map +1 -1
  148. package/lib/markdown/md-renderer-rules/render-tabular.js +15 -13
  149. package/lib/markdown/md-renderer-rules/render-tabular.js.map +1 -1
  150. package/lib/markdown/md-svg-to-base64/index.d.ts +1 -1
  151. package/lib/markdown/md-svg-to-base64/index.js +1 -1
  152. package/lib/markdown/md-svg-to-base64/index.js.map +1 -1
  153. package/lib/markdown/md-theorem/block-rule.js +22 -17
  154. package/lib/markdown/md-theorem/block-rule.js.map +1 -1
  155. package/lib/markdown/md-theorem/helper.js +38 -25
  156. package/lib/markdown/md-theorem/helper.js.map +1 -1
  157. package/lib/markdown/md-theorem/index.d.ts +1 -1
  158. package/lib/markdown/md-theorem/index.js +16 -15
  159. package/lib/markdown/md-theorem/index.js.map +1 -1
  160. package/lib/markdown/md-theorem/inline-rule.js +22 -15
  161. package/lib/markdown/md-theorem/inline-rule.js.map +1 -1
  162. package/lib/markdown/mdHighlightCodePlugin.js +3 -3
  163. package/lib/markdown/mdHighlightCodePlugin.js.map +1 -1
  164. package/lib/markdown/mdOptions.js +2 -1
  165. package/lib/markdown/mdOptions.js.map +1 -1
  166. package/lib/markdown/mdPluginAnchor.d.ts +1 -1
  167. package/lib/markdown/mdPluginAnchor.js +1 -1
  168. package/lib/markdown/mdPluginAnchor.js.map +1 -1
  169. package/lib/markdown/mdPluginConfigured.d.ts +8 -8
  170. package/lib/markdown/mdPluginLists.d.ts +1 -1
  171. package/lib/markdown/mdPluginLists.js +10 -10
  172. package/lib/markdown/mdPluginLists.js.map +1 -1
  173. package/lib/markdown/mdPluginRaw.js +67 -45
  174. package/lib/markdown/mdPluginRaw.js.map +1 -1
  175. package/lib/markdown/mdPluginSeparateForBlock.d.ts +1 -1
  176. package/lib/markdown/mdPluginSeparateForBlock.js +2 -2
  177. package/lib/markdown/mdPluginSeparateForBlock.js.map +1 -1
  178. package/lib/markdown/mdPluginTOC.d.ts +1 -1
  179. package/lib/markdown/mdPluginTOC.js +10 -8
  180. package/lib/markdown/mdPluginTOC.js.map +1 -1
  181. package/lib/markdown/mdPluginTableTabular.d.ts +1 -1
  182. package/lib/markdown/mdPluginTableTabular.js +13 -13
  183. package/lib/markdown/mdPluginTableTabular.js.map +1 -1
  184. package/lib/markdown/mdPluginText.d.ts +1 -1
  185. package/lib/markdown/mdPluginText.js +60 -55
  186. package/lib/markdown/mdPluginText.js.map +1 -1
  187. package/lib/markdown/mdSetPositionsAndHighlight.d.ts +1 -1
  188. package/lib/markdown/mdSetPositionsAndHighlight.js.map +1 -1
  189. package/lib/markdown/rules.js +27 -26
  190. package/lib/markdown/rules.js.map +1 -1
  191. package/lib/markdown/sanitize/consts.js +2 -1
  192. package/lib/markdown/sanitize/consts.js.map +1 -1
  193. package/lib/markdown/sanitize/index.js +3 -2
  194. package/lib/markdown/sanitize/index.js.map +1 -1
  195. package/lib/markdown/sanitize/sanitize-html.js +8 -8
  196. package/lib/markdown/sanitize/sanitize-html.js.map +1 -1
  197. package/lib/markdown/utils.js +47 -27
  198. package/lib/markdown/utils.js.map +1 -1
  199. package/lib/mathjax/index.js +27 -18
  200. package/lib/mathjax/index.js.map +1 -1
  201. package/lib/mathjax/mathJaxConfig.js +1 -1
  202. package/lib/mathjax/mathJaxConfig.js.map +1 -1
  203. package/lib/mathjax/mathjax.js +5 -5
  204. package/lib/mathjax/mathjax.js.map +1 -1
  205. package/lib/mathjax/mathml-word.js +4 -4
  206. package/lib/mathjax/mathml-word.js.map +1 -1
  207. package/lib/mathjax/serialized-ascii/common.js +2 -1
  208. package/lib/mathjax/serialized-ascii/common.js.map +1 -1
  209. package/lib/mathjax/serialized-ascii/handlers.js +123 -116
  210. package/lib/mathjax/serialized-ascii/handlers.js.map +1 -1
  211. package/lib/mathjax/serialized-ascii/index.js +38 -38
  212. package/lib/mathjax/serialized-ascii/index.js.map +1 -1
  213. package/lib/mathpix-markdown-model/check-formula.js +5 -4
  214. package/lib/mathpix-markdown-model/check-formula.js.map +1 -1
  215. package/lib/mathpix-markdown-model/html-page.js +3 -2
  216. package/lib/mathpix-markdown-model/html-page.js.map +1 -1
  217. package/lib/mathpix-markdown-model/index.d.ts +16 -9
  218. package/lib/mathpix-markdown-model/index.js +36 -28
  219. package/lib/mathpix-markdown-model/index.js.map +1 -1
  220. package/lib/sre/index.js +5 -3
  221. package/lib/sre/index.js.map +1 -1
  222. package/lib/sre/sre-browser.js +2 -1
  223. package/lib/sre/sre-browser.js.map +1 -1
  224. package/lib/sre/sre-node.js +2 -1
  225. package/lib/sre/sre-node.js.map +1 -1
  226. package/lib/styles/halpers.js +3 -2
  227. package/lib/styles/halpers.js.map +1 -1
  228. package/lib/styles/index.js +6 -4
  229. package/lib/styles/index.js.map +1 -1
  230. package/lib/styles/styles-container.js +3 -2
  231. package/lib/styles/styles-container.js.map +1 -1
  232. package/lib/styles/styles-tabular.js +3 -2
  233. package/lib/styles/styles-tabular.js.map +1 -1
  234. package/lib/yaml-parser/index.js +6 -5
  235. package/lib/yaml-parser/index.js.map +1 -1
  236. package/package.json +14 -14
@@ -55,7 +55,7 @@ var needLastSpace = function (node) {
55
55
  if (next.childNodes[0] && next.childNodes[0].kind === 'text' && next.childNodes[0].text === '\u2061') {
56
56
  return true;
57
57
  }
58
- var abs = exports.SymbolToAM(next.kind, text);
58
+ var abs = (0, exports.SymbolToAM)(next.kind, text);
59
59
  return regW.test(abs);
60
60
  }
61
61
  else {
@@ -70,11 +70,12 @@ var needLastSpace = function (node) {
70
70
  return haveSpace;
71
71
  }
72
72
  };
73
- exports.getSymbolType = function (tag, output) {
73
+ var getSymbolType = function (tag, output) {
74
74
  var tags = helperA_1.AMsymbols.find(function (item) { return (item.tag === tag && item.output === output); });
75
75
  return tags ? tags.symbolType : '';
76
76
  };
77
- exports.SymbolToAM = function (tag, output, atr, showStyle) {
77
+ exports.getSymbolType = getSymbolType;
78
+ var SymbolToAM = function (tag, output, atr, showStyle) {
78
79
  var e_1, _a;
79
80
  if (atr === void 0) { atr = null; }
80
81
  if (showStyle === void 0) { showStyle = false; }
@@ -140,10 +141,12 @@ exports.SymbolToAM = function (tag, output, atr, showStyle) {
140
141
  }
141
142
  return tags ? tags.input : output;
142
143
  };
143
- exports.FindSymbolReplace = function (str) {
144
+ exports.SymbolToAM = SymbolToAM;
145
+ var FindSymbolReplace = function (str) {
144
146
  return str.replace(/\u00A0/g, ' ');
145
147
  };
146
- exports.FindSymbolToAM = function (tag, output, atr) {
148
+ exports.FindSymbolReplace = FindSymbolReplace;
149
+ var FindSymbolToAM = function (tag, output, atr) {
147
150
  if (atr === void 0) { atr = null; }
148
151
  output = output.split(' ').join('');
149
152
  var tags = null;
@@ -169,6 +172,7 @@ exports.FindSymbolToAM = function (tag, output, atr) {
169
172
  }
170
173
  return tags ? tags.input : '';
171
174
  };
175
+ exports.FindSymbolToAM = FindSymbolToAM;
172
176
  var getChildrenText = function (node) {
173
177
  var text = '';
174
178
  try {
@@ -184,9 +188,10 @@ var getChildrenText = function (node) {
184
188
  var defHandle = function (node, serialize) {
185
189
  return handlerApi.handleAll(node, serialize);
186
190
  };
187
- exports.getAttributes = function (node) {
191
+ var getAttributes = function (node) {
188
192
  return node.attributes.getAllAttributes();
189
193
  };
194
+ exports.getAttributes = getAttributes;
190
195
  var menclose = function (handlerApi) {
191
196
  return function (node, serialize) {
192
197
  var res = {
@@ -196,20 +201,20 @@ var menclose = function (handlerApi) {
196
201
  ascii_md: '',
197
202
  };
198
203
  try {
199
- var atr = exports.getAttributes(node);
204
+ var atr = (0, exports.getAttributes)(node);
200
205
  var isLeft = false;
201
206
  var isRight = false;
202
207
  if (atr && atr.notation) {
203
208
  isLeft = atr.notation.toString().indexOf('left') > -1;
204
209
  isRight = atr.notation.toString().indexOf('right') > -1;
205
210
  }
206
- res = common_1.AddToAsciiData(res, [isLeft ? '[' : '']);
211
+ res = (0, common_1.AddToAsciiData)(res, [isLeft ? '[' : '']);
207
212
  var data = handlerApi.handleAll(node, serialize);
208
- res = common_1.AddToAsciiData(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
213
+ res = (0, common_1.AddToAsciiData)(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
209
214
  if (atr && atr.lcm) {
210
- res = common_1.AddToAsciiData(res, ['']);
215
+ res = (0, common_1.AddToAsciiData)(res, ['']);
211
216
  }
212
- res = common_1.AddToAsciiData(res, [isRight ? ']' : '']);
217
+ res = (0, common_1.AddToAsciiData)(res, [isRight ? ']' : '']);
213
218
  return res;
214
219
  }
215
220
  catch (e) {
@@ -253,7 +258,7 @@ var getDataForVerticalMath = function (serialize, node, rowNumber) {
253
258
  var data = serialize.visitNode(child, '');
254
259
  var text = getChildrenText(child);
255
260
  if (child.kind === 'mo') {
256
- var symbolType = exports.getSymbolType('mo', text);
261
+ var symbolType = (0, exports.getSymbolType)('mo', text);
257
262
  if (symbolType === helperA_1.eSymbolType.logical
258
263
  || symbolType === helperA_1.eSymbolType.relation
259
264
  || symbolType === helperA_1.eSymbolType.arrow) {
@@ -363,7 +368,8 @@ var mtable = function () {
363
368
  mmlRowVerticalMath += mmlCollVerticalMath;
364
369
  }
365
370
  /** For vertical math, if the horizontal line is in front of the answer, then replace it with an equals sign */
366
- if (isVerticalMath && (arrRowLines === null || arrRowLines === void 0 ? void 0 : arrRowLines.length) && (arrRowLines === null || arrRowLines === void 0 ? void 0 : arrRowLines.length) > i && arrRowLines[i] !== 'none') {
371
+ if (isVerticalMath &&
372
+ (arrRowLines === null || arrRowLines === void 0 ? void 0 : arrRowLines.length) && (arrRowLines === null || arrRowLines === void 0 ? void 0 : arrRowLines.length) > i && arrRowLines[i] !== 'none') {
367
373
  mmlRowVerticalMath += '=';
368
374
  }
369
375
  /** It's EqnArray or AmsEqnArray or AlignAt.
@@ -571,7 +577,7 @@ var mtr = function () {
571
577
  var itShouldBeFlatten = node.attributes.get('itShouldBeFlatten');
572
578
  for (var i = 0; i < node.childNodes.length; i++) {
573
579
  if (i > 0 && !isEqnArray) {
574
- res = common_1.AddToAsciiData(res, [
580
+ res = (0, common_1.AddToAsciiData)(res, [
575
581
  ',',
576
582
  toTsv ? ((_a = serialize.options.tsv_separators) === null || _a === void 0 ? void 0 : _a.column) || '\t' : itShouldBeFlatten ? ', ' : ',',
577
583
  toCsv ? ((_b = serialize.options.csv_separators) === null || _b === void 0 ? void 0 : _b.column) || ',' : itShouldBeFlatten ? ', ' : ',',
@@ -579,7 +585,7 @@ var mtr = function () {
579
585
  ]);
580
586
  }
581
587
  var _d = serialize.visitNode(node.childNodes[i], ''), _e = _d.ascii, ascii = _e === void 0 ? '' : _e, _f = _d.ascii_tsv, ascii_tsv = _f === void 0 ? '' : _f, _g = _d.ascii_csv, ascii_csv = _g === void 0 ? '' : _g, _h = _d.ascii_md, ascii_md = _h === void 0 ? '' : _h;
582
- res = common_1.AddToAsciiData(res, [
588
+ res = (0, common_1.AddToAsciiData)(res, [
583
589
  ascii,
584
590
  !toTsv && itShouldBeFlatten ? ascii_tsv === null || ascii_tsv === void 0 ? void 0 : ascii_tsv.trimEnd() : ascii_tsv,
585
591
  !toCsv && itShouldBeFlatten ? ascii_csv === null || ascii_csv === void 0 ? void 0 : ascii_csv.trimEnd() : ascii_csv,
@@ -605,7 +611,7 @@ var mpadded = function (handlerApi) {
605
611
  try {
606
612
  var mmlAdd = handlerApi.handleAll(node, serialize);
607
613
  if (node.Parent && node.Parent.kind === "menclose") {
608
- var atr = exports.getAttributes(node.Parent);
614
+ var atr = (0, exports.getAttributes)(node.Parent);
609
615
  if (atr && atr.notation === 'bottom' && atr.lcm) {
610
616
  if (!mmlAdd || !mmlAdd.ascii) {
611
617
  return res;
@@ -615,14 +621,14 @@ var mpadded = function (handlerApi) {
615
621
  /** For tsv/csv:
616
622
  * Omit the " in nested arrays
617
623
  * */
618
- res = common_1.AddToAsciiData(res, [
624
+ res = (0, common_1.AddToAsciiData)(res, [
619
625
  '"',
620
626
  serialize.options.tableToTsv ? '' : '"',
621
627
  '',
622
628
  ''
623
629
  ]);
624
- res = common_1.AddToAsciiData(res, [mmlAdd.ascii, mmlAdd.ascii_tsv, mmlAdd.ascii_csv, mmlAdd.ascii_md]);
625
- res = common_1.AddToAsciiData(res, [
630
+ res = (0, common_1.AddToAsciiData)(res, [mmlAdd.ascii, mmlAdd.ascii_tsv, mmlAdd.ascii_csv, mmlAdd.ascii_md]);
631
+ res = (0, common_1.AddToAsciiData)(res, [
626
632
  '"',
627
633
  serialize.options.tableToTsv ? '' : '"',
628
634
  '',
@@ -651,38 +657,38 @@ var mover = function (handlerApi) {
651
657
  var dataSecondChild = secondChild ? serialize.visitNode(secondChild, '') : null;
652
658
  if (secondChild && secondChild.kind === 'mo') {
653
659
  var t = dataSecondChild.ascii;
654
- var asc = exports.FindSymbolToAM('mover', t, exports.getAttributes(secondChild));
660
+ var asc = (0, exports.FindSymbolToAM)('mover', t, (0, exports.getAttributes)(secondChild));
655
661
  if (asc) {
656
- res = common_1.AddToAsciiData(res, [' ' + asc + '(']);
657
- res = common_1.AddToAsciiData(res, [
662
+ res = (0, common_1.AddToAsciiData)(res, [' ' + asc + '(']);
663
+ res = (0, common_1.AddToAsciiData)(res, [
658
664
  dataFirstChild ? dataFirstChild.ascii ? dataFirstChild.ascii.trim() : dataFirstChild.ascii : '',
659
665
  dataFirstChild ? dataFirstChild.ascii_tsv ? dataFirstChild.ascii_tsv.trim() : dataFirstChild.ascii_tsv : '',
660
666
  dataFirstChild ? dataFirstChild.ascii_csv ? dataFirstChild.ascii_csv.trim() : dataFirstChild.ascii_csv : '',
661
667
  dataFirstChild ? dataFirstChild.ascii_md ? dataFirstChild.ascii_md.trim() : dataFirstChild.ascii_md : '',
662
668
  ]);
663
- res = common_1.AddToAsciiData(res, [')']);
669
+ res = (0, common_1.AddToAsciiData)(res, [')']);
664
670
  }
665
671
  else {
666
- res = common_1.AddToAsciiData(res, [
672
+ res = (0, common_1.AddToAsciiData)(res, [
667
673
  dataFirstChild ? dataFirstChild.ascii : '',
668
674
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
669
675
  dataFirstChild ? dataFirstChild.ascii_csv : '',
670
676
  dataFirstChild ? dataFirstChild.ascii_md : ''
671
677
  ]);
672
- res = common_1.AddToAsciiData(res, ['^']);
673
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? '(' : '']);
674
- res = common_1.AddToAsciiData(res, [
678
+ res = (0, common_1.AddToAsciiData)(res, ['^']);
679
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? '(' : '']);
680
+ res = (0, common_1.AddToAsciiData)(res, [
675
681
  dataSecondChild ? dataSecondChild.ascii : '',
676
682
  dataSecondChild ? dataSecondChild.ascii_tsv : '',
677
683
  dataSecondChild ? dataSecondChild.ascii_csv : '',
678
684
  dataSecondChild ? dataSecondChild.ascii_md : ''
679
685
  ]);
680
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? ')' : '']);
686
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? ')' : '']);
681
687
  }
682
688
  }
683
689
  else {
684
690
  var data = handlerApi.handleAll(node, serialize);
685
- res = common_1.AddToAsciiData(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
691
+ res = (0, common_1.AddToAsciiData)(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
686
692
  }
687
693
  return res;
688
694
  }
@@ -707,38 +713,38 @@ var munder = function (handlerApi) {
707
713
  var dataSecondChild = secondChild ? serialize.visitNode(secondChild, '') : null;
708
714
  if (secondChild && secondChild.kind === 'mo') {
709
715
  var t = dataSecondChild.ascii;
710
- var asc = exports.FindSymbolToAM(node.kind, t);
716
+ var asc = (0, exports.FindSymbolToAM)(node.kind, t);
711
717
  if (asc) {
712
- res = common_1.AddToAsciiData(res, [asc + '(']);
713
- res = common_1.AddToAsciiData(res, [
718
+ res = (0, common_1.AddToAsciiData)(res, [asc + '(']);
719
+ res = (0, common_1.AddToAsciiData)(res, [
714
720
  dataFirstChild ? dataFirstChild.ascii : '',
715
721
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
716
722
  dataFirstChild ? dataFirstChild.ascii_csv : '',
717
723
  dataFirstChild ? dataFirstChild.ascii_md : ''
718
724
  ]);
719
- res = common_1.AddToAsciiData(res, [asc + ')']);
725
+ res = (0, common_1.AddToAsciiData)(res, [asc + ')']);
720
726
  }
721
727
  else {
722
728
  var data = handlerApi.handleAll(node, serialize);
723
- res = common_1.AddToAsciiData(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
729
+ res = (0, common_1.AddToAsciiData)(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
724
730
  }
725
731
  }
726
732
  else {
727
- res = common_1.AddToAsciiData(res, [
733
+ res = (0, common_1.AddToAsciiData)(res, [
728
734
  dataFirstChild ? dataFirstChild.ascii : '',
729
735
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
730
736
  dataFirstChild ? dataFirstChild.ascii_csv : '',
731
737
  dataFirstChild ? dataFirstChild.ascii_md : ''
732
738
  ]);
733
- res = common_1.AddToAsciiData(res, ['_']);
734
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? '(' : '']);
735
- res = common_1.AddToAsciiData(res, [
739
+ res = (0, common_1.AddToAsciiData)(res, ['_']);
740
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? '(' : '']);
741
+ res = (0, common_1.AddToAsciiData)(res, [
736
742
  dataSecondChild ? dataSecondChild.ascii : '',
737
743
  dataSecondChild ? dataSecondChild.ascii_tsv : '',
738
744
  dataSecondChild ? dataSecondChild.ascii_csv : '',
739
745
  dataSecondChild ? dataSecondChild.ascii_md : ''
740
746
  ]);
741
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? ')' : '']);
747
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? ')' : '']);
742
748
  }
743
749
  return res;
744
750
  }
@@ -763,30 +769,30 @@ var munderover = function () {
763
769
  var dataFirstChild = firstChild ? serialize.visitNode(firstChild, '') : null;
764
770
  var dataSecondChild = secondChild ? serialize.visitNode(secondChild, '') : null;
765
771
  var dataThirdChild = thirdChild ? serialize.visitNode(thirdChild, '') : null;
766
- res = common_1.AddToAsciiData(res, [
772
+ res = (0, common_1.AddToAsciiData)(res, [
767
773
  dataFirstChild.ascii ? dataFirstChild.ascii : '',
768
774
  dataFirstChild.ascii_tsv ? dataFirstChild.ascii_tsv : '',
769
775
  dataFirstChild.ascii_csv ? dataFirstChild.ascii_csv : '',
770
776
  dataFirstChild.ascii_md ? dataFirstChild.ascii_md : ''
771
777
  ]);
772
- res = common_1.AddToAsciiData(res, ['_']);
773
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? '(' : '']);
774
- res = common_1.AddToAsciiData(res, [
778
+ res = (0, common_1.AddToAsciiData)(res, ['_']);
779
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? '(' : '']);
780
+ res = (0, common_1.AddToAsciiData)(res, [
775
781
  dataSecondChild.ascii ? dataSecondChild.ascii : '',
776
782
  dataSecondChild.ascii_tsv ? dataSecondChild.ascii_tsv : '',
777
783
  dataSecondChild.ascii_csv ? dataSecondChild.ascii_csv : '',
778
784
  dataSecondChild.ascii_md ? dataSecondChild.ascii_md : ''
779
785
  ]);
780
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? ')' : '']);
781
- res = common_1.AddToAsciiData(res, ['^']);
782
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? '(' : '']);
783
- res = common_1.AddToAsciiData(res, [
786
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? ')' : '']);
787
+ res = (0, common_1.AddToAsciiData)(res, ['^']);
788
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? '(' : '']);
789
+ res = (0, common_1.AddToAsciiData)(res, [
784
790
  dataThirdChild.ascii ? dataThirdChild.ascii : '',
785
791
  dataThirdChild.ascii_tsv ? dataThirdChild.ascii_tsv : '',
786
792
  dataThirdChild.ascii_csv ? dataThirdChild.ascii_csv : '',
787
793
  dataThirdChild.ascii_md ? dataThirdChild.ascii_md : ''
788
794
  ]);
789
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? ')' : '']);
795
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? ')' : '']);
790
796
  return res;
791
797
  }
792
798
  catch (e) {
@@ -808,21 +814,21 @@ var msub = function () {
808
814
  var secondChild = node.childNodes[1] ? node.childNodes[1] : null;
809
815
  var dataFirstChild = firstChild ? serialize.visitNode(firstChild, '') : null;
810
816
  var dataSecondChild = secondChild ? serialize.visitNode(secondChild, '') : null;
811
- res = common_1.AddToAsciiData(res, [
817
+ res = (0, common_1.AddToAsciiData)(res, [
812
818
  dataFirstChild ? dataFirstChild.ascii : '',
813
819
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
814
820
  dataFirstChild ? dataFirstChild.ascii_csv : '',
815
821
  dataFirstChild ? dataFirstChild.ascii_md : ''
816
822
  ]);
817
- res = common_1.AddToAsciiData(res, ['_']);
818
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? '(' : '']);
819
- res = common_1.AddToAsciiData(res, [
823
+ res = (0, common_1.AddToAsciiData)(res, ['_']);
824
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? '(' : '']);
825
+ res = (0, common_1.AddToAsciiData)(res, [
820
826
  dataSecondChild ? dataSecondChild.ascii : '',
821
827
  dataSecondChild ? dataSecondChild.ascii_tsv : '',
822
828
  dataSecondChild ? dataSecondChild.ascii_csv : '',
823
829
  dataSecondChild ? dataSecondChild.ascii_md : ''
824
830
  ]);
825
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? ')' : '']);
831
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? ')' : '']);
826
832
  return res;
827
833
  }
828
834
  catch (e) {
@@ -844,21 +850,21 @@ var msup = function () {
844
850
  var secondChild = node.childNodes[1] ? node.childNodes[1] : null;
845
851
  var dataFirstChild = firstChild ? serialize.visitNode(firstChild, '') : null;
846
852
  var dataSecondChild = secondChild ? serialize.visitNode(secondChild, '') : null;
847
- res = common_1.AddToAsciiData(res, [
853
+ res = (0, common_1.AddToAsciiData)(res, [
848
854
  dataFirstChild ? dataFirstChild.ascii : '',
849
855
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
850
856
  dataFirstChild ? dataFirstChild.ascii_csv : '',
851
857
  dataFirstChild ? dataFirstChild.ascii_md : ''
852
858
  ]);
853
- res = common_1.AddToAsciiData(res, ['^']);
854
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? '(' : '']);
855
- res = common_1.AddToAsciiData(res, [
859
+ res = (0, common_1.AddToAsciiData)(res, ['^']);
860
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? '(' : '']);
861
+ res = (0, common_1.AddToAsciiData)(res, [
856
862
  dataSecondChild ? dataSecondChild.ascii : '',
857
863
  dataSecondChild ? dataSecondChild.ascii_tsv : '',
858
864
  dataSecondChild ? dataSecondChild.ascii_csv : '',
859
865
  dataSecondChild ? dataSecondChild.ascii_md : ''
860
866
  ]);
861
- res = common_1.AddToAsciiData(res, [serialize.options.extraBrackets ? ')' : '']);
867
+ res = (0, common_1.AddToAsciiData)(res, [serialize.options.extraBrackets ? ')' : '']);
862
868
  return res;
863
869
  }
864
870
  catch (e) {
@@ -882,30 +888,30 @@ var msubsup = function () {
882
888
  var dataFirstChild = firstChild ? serialize.visitNode(firstChild, '') : null;
883
889
  var dataSecondChild = secondChild ? serialize.visitNode(secondChild, '') : null;
884
890
  var dataThirdChild = thirdChild ? serialize.visitNode(thirdChild, '') : null;
885
- res = common_1.AddToAsciiData(res, [
891
+ res = (0, common_1.AddToAsciiData)(res, [
886
892
  dataFirstChild ? dataFirstChild.ascii : '',
887
893
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
888
894
  dataFirstChild ? dataFirstChild.ascii_csv : '',
889
895
  dataFirstChild ? dataFirstChild.ascii_md : ''
890
896
  ]);
891
- res = common_1.AddToAsciiData(res, ['_']);
892
- res = common_1.AddToAsciiData(res, ['(']);
893
- res = common_1.AddToAsciiData(res, [
897
+ res = (0, common_1.AddToAsciiData)(res, ['_']);
898
+ res = (0, common_1.AddToAsciiData)(res, ['(']);
899
+ res = (0, common_1.AddToAsciiData)(res, [
894
900
  dataSecondChild ? dataSecondChild.ascii : '',
895
901
  dataSecondChild ? dataSecondChild.ascii_tsv : '',
896
902
  dataSecondChild ? dataSecondChild.ascii_csv : '',
897
903
  dataSecondChild ? dataSecondChild.ascii_md : ''
898
904
  ]);
899
- res = common_1.AddToAsciiData(res, [')']);
900
- res = common_1.AddToAsciiData(res, ['^']);
901
- res = common_1.AddToAsciiData(res, ['(']);
902
- res = common_1.AddToAsciiData(res, [
905
+ res = (0, common_1.AddToAsciiData)(res, [')']);
906
+ res = (0, common_1.AddToAsciiData)(res, ['^']);
907
+ res = (0, common_1.AddToAsciiData)(res, ['(']);
908
+ res = (0, common_1.AddToAsciiData)(res, [
903
909
  dataThirdChild ? dataThirdChild.ascii : '',
904
910
  dataThirdChild ? dataThirdChild.ascii_tsv : '',
905
911
  dataThirdChild ? dataThirdChild.ascii_csv : '',
906
912
  dataThirdChild ? dataThirdChild.ascii_md : ''
907
913
  ]);
908
- res = common_1.AddToAsciiData(res, [')']);
914
+ res = (0, common_1.AddToAsciiData)(res, [')']);
909
915
  return res;
910
916
  }
911
917
  catch (e) {
@@ -925,8 +931,8 @@ var msqrt = function () {
925
931
  try {
926
932
  var firstChild = node.childNodes[0] ? node.childNodes[0] : null;
927
933
  var dataFirstChild = firstChild ? serialize.visitNode(firstChild, '') : null;
928
- res = common_1.AddToAsciiData(res, ['sqrt']);
929
- res = common_1.AddToAsciiData(res, [
934
+ res = (0, common_1.AddToAsciiData)(res, ['sqrt']);
935
+ res = (0, common_1.AddToAsciiData)(res, [
930
936
  dataFirstChild ? dataFirstChild.ascii : '',
931
937
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
932
938
  dataFirstChild ? dataFirstChild.ascii_csv : '',
@@ -953,23 +959,23 @@ var mroot = function () {
953
959
  var secondChild = node.childNodes[1] ? node.childNodes[1] : null;
954
960
  var dataSecondChild = secondChild ? serialize.visitNode(secondChild, '') : null;
955
961
  var dataFirstChild = firstChild ? serialize.visitNode(firstChild, '') : null;
956
- res = common_1.AddToAsciiData(res, ['root']);
957
- res = common_1.AddToAsciiData(res, [secondChild ? '(' : '']);
958
- res = common_1.AddToAsciiData(res, [
962
+ res = (0, common_1.AddToAsciiData)(res, ['root']);
963
+ res = (0, common_1.AddToAsciiData)(res, [secondChild ? '(' : '']);
964
+ res = (0, common_1.AddToAsciiData)(res, [
959
965
  dataSecondChild ? dataSecondChild.ascii : '',
960
966
  dataSecondChild ? dataSecondChild.ascii_tsv : '',
961
967
  dataSecondChild ? dataSecondChild.ascii_csv : '',
962
968
  dataSecondChild ? dataSecondChild.ascii_md : ''
963
969
  ]);
964
- res = common_1.AddToAsciiData(res, [secondChild ? ')' : '']);
965
- res = common_1.AddToAsciiData(res, [firstChild ? '(' : '']);
966
- res = common_1.AddToAsciiData(res, [
970
+ res = (0, common_1.AddToAsciiData)(res, [secondChild ? ')' : '']);
971
+ res = (0, common_1.AddToAsciiData)(res, [firstChild ? '(' : '']);
972
+ res = (0, common_1.AddToAsciiData)(res, [
967
973
  dataFirstChild ? dataFirstChild.ascii : '',
968
974
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
969
975
  dataFirstChild ? dataFirstChild.ascii_csv : '',
970
976
  dataFirstChild ? dataFirstChild.ascii_md : ''
971
977
  ]);
972
- res = common_1.AddToAsciiData(res, [firstChild ? ')' : '']);
978
+ res = (0, common_1.AddToAsciiData)(res, [firstChild ? ')' : '']);
973
979
  return res;
974
980
  }
975
981
  catch (e) {
@@ -992,36 +998,36 @@ var mfrac = function () {
992
998
  var dataFirstChild = firstChild ? serialize.visitNode(firstChild, '') : null;
993
999
  var dataSecondChild = secondChild ? serialize.visitNode(secondChild, '') : null;
994
1000
  if ((firstChild && firstChild.kind === "mrow" && firstChild.childNodes.length > 1) || serialize.options.extraBrackets) {
995
- res = common_1.AddToAsciiData(res, ['(']);
996
- res = common_1.AddToAsciiData(res, [
1001
+ res = (0, common_1.AddToAsciiData)(res, ['(']);
1002
+ res = (0, common_1.AddToAsciiData)(res, [
997
1003
  dataFirstChild ? dataFirstChild.ascii : '',
998
1004
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
999
1005
  dataFirstChild ? dataFirstChild.ascii_csv : '',
1000
1006
  dataFirstChild ? dataFirstChild.ascii_md : ''
1001
1007
  ]);
1002
- res = common_1.AddToAsciiData(res, [')']);
1008
+ res = (0, common_1.AddToAsciiData)(res, [')']);
1003
1009
  }
1004
1010
  else {
1005
- res = common_1.AddToAsciiData(res, [
1011
+ res = (0, common_1.AddToAsciiData)(res, [
1006
1012
  dataFirstChild ? dataFirstChild.ascii : '',
1007
1013
  dataFirstChild ? dataFirstChild.ascii_tsv : '',
1008
1014
  dataFirstChild ? dataFirstChild.ascii_csv : '',
1009
1015
  dataFirstChild ? dataFirstChild.ascii_md : ''
1010
1016
  ]);
1011
1017
  }
1012
- res = common_1.AddToAsciiData(res, ['/']);
1018
+ res = (0, common_1.AddToAsciiData)(res, ['/']);
1013
1019
  if ((secondChild && secondChild.kind === "mrow" && secondChild.childNodes.length > 1) || serialize.options.extraBrackets) {
1014
- res = common_1.AddToAsciiData(res, ['(']);
1015
- res = common_1.AddToAsciiData(res, [
1020
+ res = (0, common_1.AddToAsciiData)(res, ['(']);
1021
+ res = (0, common_1.AddToAsciiData)(res, [
1016
1022
  dataSecondChild ? dataSecondChild.ascii : '',
1017
1023
  dataSecondChild ? dataSecondChild.ascii_tsv : '',
1018
1024
  dataSecondChild ? dataSecondChild.ascii_csv : '',
1019
1025
  dataSecondChild ? dataSecondChild.ascii_md : ''
1020
1026
  ]);
1021
- res = common_1.AddToAsciiData(res, [')']);
1027
+ res = (0, common_1.AddToAsciiData)(res, [')']);
1022
1028
  }
1023
1029
  else {
1024
- res = common_1.AddToAsciiData(res, [
1030
+ res = (0, common_1.AddToAsciiData)(res, [
1025
1031
  dataSecondChild ? dataSecondChild.ascii : '',
1026
1032
  dataSecondChild ? dataSecondChild.ascii_tsv : '',
1027
1033
  dataSecondChild ? dataSecondChild.ascii_csv : '',
@@ -1049,17 +1055,17 @@ var mtext = function () {
1049
1055
  return res;
1050
1056
  }
1051
1057
  var firstChild = node.childNodes[0];
1052
- var value = exports.FindSymbolReplace(firstChild.text);
1053
- var asc = exports.FindSymbolToAM(node.kind, value);
1058
+ var value = (0, exports.FindSymbolReplace)(firstChild.text);
1059
+ var asc = (0, exports.FindSymbolToAM)(node.kind, value);
1054
1060
  if (asc) {
1055
- res = common_1.AddToAsciiData(res, [asc]);
1061
+ res = (0, common_1.AddToAsciiData)(res, [asc]);
1056
1062
  return res;
1057
1063
  }
1058
1064
  var toTsv = node.attributes.get('toTsv');
1059
1065
  var toCsv = node.attributes.get('toCsv');
1060
1066
  var toMd = node.attributes.get('toMd');
1061
1067
  if (value[0] === '(' || toTsv || toCsv || toMd) {
1062
- res = common_1.AddToAsciiData(res, [
1068
+ res = (0, common_1.AddToAsciiData)(res, [
1063
1069
  value[0] === '(' ? value.replace(/"/g, '') : value,
1064
1070
  toTsv ? value.replace(/"/g, '') : value,
1065
1071
  toCsv ? value.replace(/"/g, '') : value,
@@ -1068,12 +1074,12 @@ var mtext = function () {
1068
1074
  }
1069
1075
  else {
1070
1076
  if (!value || (value && !value.trim())) {
1071
- res = common_1.AddToAsciiData(res, ['']);
1077
+ res = (0, common_1.AddToAsciiData)(res, ['']);
1072
1078
  }
1073
1079
  else {
1074
1080
  /** For tsv/csv:
1075
1081
  * Omit the " in nested arrays */
1076
- res = common_1.AddToAsciiData(res, [
1082
+ res = (0, common_1.AddToAsciiData)(res, [
1077
1083
  '"' + value + '"',
1078
1084
  serialize.options.tableToTsv
1079
1085
  ? value.replace(/"/g, '')
@@ -1108,16 +1114,16 @@ var mi = function () {
1108
1114
  var firstChild = node.childNodes[0];
1109
1115
  var value = firstChild.text;
1110
1116
  var atr = serialize.options.showStyle
1111
- ? exports.getAttributes(node)
1117
+ ? (0, exports.getAttributes)(node)
1112
1118
  : null;
1113
- var abs = exports.SymbolToAM(node.kind, value, atr);
1119
+ var abs = (0, exports.SymbolToAM)(node.kind, value, atr);
1114
1120
  if (abs && abs.length > 1 && regW.test(abs[0])) {
1115
- res = common_1.AddToAsciiData(res, [needFirstSpace(node) ? ' ' : '']);
1116
- res = common_1.AddToAsciiData(res, [abs]);
1117
- res = common_1.AddToAsciiData(res, [needLastSpace(node) ? ' ' : '']);
1121
+ res = (0, common_1.AddToAsciiData)(res, [needFirstSpace(node) ? ' ' : '']);
1122
+ res = (0, common_1.AddToAsciiData)(res, [abs]);
1123
+ res = (0, common_1.AddToAsciiData)(res, [needLastSpace(node) ? ' ' : '']);
1118
1124
  }
1119
1125
  else {
1120
- res = common_1.AddToAsciiData(res, [abs]);
1126
+ res = (0, common_1.AddToAsciiData)(res, [abs]);
1121
1127
  }
1122
1128
  return res;
1123
1129
  }
@@ -1140,26 +1146,26 @@ var mo = function () {
1140
1146
  if (value === '\u2061') {
1141
1147
  return res;
1142
1148
  }
1143
- var atr = exports.getAttributes(node);
1144
- var abs = exports.SymbolToAM(node.kind, value, atr, serialize.options.showStyle);
1149
+ var atr = (0, exports.getAttributes)(node);
1150
+ var abs = (0, exports.SymbolToAM)(node.kind, value, atr, serialize.options.showStyle);
1145
1151
  if (abs && abs.length > 1) {
1146
- res = common_1.AddToAsciiData(res, [regW.test(abs[0]) && needFirstSpace(node) ? ' ' : '']);
1147
- res = common_1.AddToAsciiData(res, [abs]);
1148
- res = common_1.AddToAsciiData(res, [regW.test(abs[abs.length - 1]) && needLastSpace(node) ? ' ' : '']);
1152
+ res = (0, common_1.AddToAsciiData)(res, [regW.test(abs[0]) && needFirstSpace(node) ? ' ' : '']);
1153
+ res = (0, common_1.AddToAsciiData)(res, [abs]);
1154
+ res = (0, common_1.AddToAsciiData)(res, [regW.test(abs[abs.length - 1]) && needLastSpace(node) ? ' ' : '']);
1149
1155
  }
1150
1156
  else {
1151
1157
  if (abs === ',' && node.Parent.kind === 'mtd') {
1152
1158
  /** For tsv/csv:
1153
1159
  * Omit the " in nested arrays */
1154
- res = common_1.AddToAsciiData(res, [
1160
+ res = (0, common_1.AddToAsciiData)(res, [
1155
1161
  '"' + abs + '"',
1156
- "" + (serialize.options.tableToTsv ? abs : '"' + abs + '"'),
1162
+ "".concat(serialize.options.tableToTsv ? abs : '"' + abs + '"'),
1157
1163
  abs,
1158
1164
  abs
1159
1165
  ]);
1160
1166
  }
1161
1167
  else {
1162
- res = common_1.AddToAsciiData(res, [
1168
+ res = (0, common_1.AddToAsciiData)(res, [
1163
1169
  abs,
1164
1170
  abs === '"' ? '' : abs,
1165
1171
  abs === '"' ? '' : abs,
@@ -1168,7 +1174,7 @@ var mo = function () {
1168
1174
  }
1169
1175
  }
1170
1176
  if (node.Parent && node.Parent.kind === "mpadded" && node.Parent.Parent && node.Parent.Parent.kind === "menclose") {
1171
- var atr_1 = exports.getAttributes(node.Parent.Parent);
1177
+ var atr_1 = (0, exports.getAttributes)(node.Parent.Parent);
1172
1178
  if (atr_1.notation && atr_1.notation.toString().indexOf("bottom") !== -1) {
1173
1179
  node.Parent.Parent.attributes.attributes.lcm = true;
1174
1180
  return {
@@ -1196,21 +1202,21 @@ var mspace = function (handlerApi) {
1196
1202
  ascii_md: ''
1197
1203
  };
1198
1204
  try {
1199
- var atr = exports.getAttributes(node);
1205
+ var atr = (0, exports.getAttributes)(node);
1200
1206
  if (atr && atr.width === "2em") {
1201
- res = common_1.AddToAsciiData(res, [node.parent.parent && needFirstSpace(node.parent.parent) ? ' ' : '']);
1202
- res = common_1.AddToAsciiData(res, ['qquad']);
1203
- res = common_1.AddToAsciiData(res, [node.parent.parent && needLastSpace(node.parent.parent) ? ' ' : '']);
1207
+ res = (0, common_1.AddToAsciiData)(res, [node.parent.parent && needFirstSpace(node.parent.parent) ? ' ' : '']);
1208
+ res = (0, common_1.AddToAsciiData)(res, ['qquad']);
1209
+ res = (0, common_1.AddToAsciiData)(res, [node.parent.parent && needLastSpace(node.parent.parent) ? ' ' : '']);
1204
1210
  return res;
1205
1211
  }
1206
1212
  if (atr && atr.width === "1em") {
1207
- res = common_1.AddToAsciiData(res, [node.parent.parent && needFirstSpace(node.parent.parent) ? ' ' : '']);
1208
- res = common_1.AddToAsciiData(res, ['quad']);
1209
- res = common_1.AddToAsciiData(res, [node.parent.parent && needLastSpace(node.parent.parent) ? ' ' : '']);
1213
+ res = (0, common_1.AddToAsciiData)(res, [node.parent.parent && needFirstSpace(node.parent.parent) ? ' ' : '']);
1214
+ res = (0, common_1.AddToAsciiData)(res, ['quad']);
1215
+ res = (0, common_1.AddToAsciiData)(res, [node.parent.parent && needLastSpace(node.parent.parent) ? ' ' : '']);
1210
1216
  return res;
1211
1217
  }
1212
1218
  var data = handlerApi.handleAll(node, serialize);
1213
- res = common_1.AddToAsciiData(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
1219
+ res = (0, common_1.AddToAsciiData)(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
1214
1220
  return res;
1215
1221
  }
1216
1222
  catch (e) {
@@ -1219,10 +1225,11 @@ var mspace = function (handlerApi) {
1219
1225
  }
1220
1226
  };
1221
1227
  };
1222
- exports.handle = function (node, serialize) {
1228
+ var handle = function (node, serialize) {
1223
1229
  var handler = handlers[node.kind] || defHandle;
1224
1230
  return handler(node, serialize);
1225
1231
  };
1232
+ exports.handle = handle;
1226
1233
  var handleAll = function (node, serialize) {
1227
1234
  var e_2, _a;
1228
1235
  var res = {
@@ -1236,7 +1243,7 @@ var handleAll = function (node, serialize) {
1236
1243
  for (var _b = tslib_1.__values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
1237
1244
  var child = _c.value;
1238
1245
  var data = serialize.visitNode(child, '');
1239
- res = common_1.AddToAsciiData(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
1246
+ res = (0, common_1.AddToAsciiData)(res, [data.ascii, data.ascii_tsv, data.ascii_csv, data.ascii_md]);
1240
1247
  }
1241
1248
  }
1242
1249
  catch (e_2_1) { e_2 = { error: e_2_1 }; }