@gmb/bitmark-parser-generator 3.26.0 → 3.28.0

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 (225) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/bitmark-parser-generator.min.js +1 -1
  3. package/dist/browser/bundle-report.html +2 -2
  4. package/dist/cjs/BitmarkParserGenerator.js +19 -16
  5. package/dist/cjs/BitmarkParserGenerator.js.map +1 -1
  6. package/dist/cjs/ast/BaseBuilder.js +8 -8
  7. package/dist/cjs/ast/BaseBuilder.js.map +1 -1
  8. package/dist/cjs/ast/Builder.js +52 -50
  9. package/dist/cjs/ast/Builder.js.map +1 -1
  10. package/dist/cjs/ast/ResourceBuilder.js +19 -18
  11. package/dist/cjs/ast/ResourceBuilder.js.map +1 -1
  12. package/dist/cjs/breakscaping/Breakscape.js +59 -72
  13. package/dist/cjs/breakscaping/Breakscape.js.map +1 -1
  14. package/dist/cjs/config/Config.js +1 -1
  15. package/dist/cjs/config/Config.js.map +1 -1
  16. package/dist/cjs/config/raw/bits.js +26 -9
  17. package/dist/cjs/config/raw/bits.js.map +1 -1
  18. package/dist/cjs/config/raw/groups.js +5 -0
  19. package/dist/cjs/config/raw/groups.js.map +1 -1
  20. package/dist/cjs/config/raw/properties.js +145 -141
  21. package/dist/cjs/config/raw/properties.js.map +1 -1
  22. package/dist/cjs/generated/build-info.js +1 -1
  23. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +116 -128
  24. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
  25. package/dist/cjs/generator/json/JsonGenerator.js +10 -10
  26. package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
  27. package/dist/cjs/generator/text/TextGenerator.js +15 -15
  28. package/dist/cjs/generator/text/TextGenerator.js.map +1 -1
  29. package/dist/cjs/index.js +3 -3
  30. package/dist/cjs/index.js.map +1 -1
  31. package/dist/cjs/model/ast/NodeType.js +2 -0
  32. package/dist/cjs/model/ast/NodeType.js.map +1 -1
  33. package/dist/cjs/model/config/enum/PropertyConfigKey.js +1 -0
  34. package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +1 -1
  35. package/dist/cjs/model/enum/BitType.js +3 -0
  36. package/dist/cjs/model/enum/BitType.js.map +1 -1
  37. package/dist/cjs/model/enum/BodyTextFormat.js +14 -0
  38. package/dist/cjs/model/enum/BodyTextFormat.js.map +1 -0
  39. package/dist/cjs/model/enum/DeprecatedTextFormat.js +9 -0
  40. package/dist/cjs/model/enum/DeprecatedTextFormat.js.map +1 -0
  41. package/dist/cjs/model/enum/PropertyFormat.js +2 -4
  42. package/dist/cjs/model/enum/PropertyFormat.js.map +1 -1
  43. package/dist/cjs/model/enum/TextFormat.js +4 -15
  44. package/dist/cjs/model/enum/TextFormat.js.map +1 -1
  45. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +2 -2
  46. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
  47. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +14 -10
  48. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  49. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +4 -4
  50. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -1
  51. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +1 -1
  52. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
  53. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +2 -2
  54. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
  55. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +8 -8
  56. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
  57. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +3 -3
  58. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
  59. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +4 -4
  60. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +1 -1
  61. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +1 -1
  62. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
  63. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +2 -1
  64. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
  65. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +1 -1
  66. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
  67. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +1 -1
  68. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
  69. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +10 -16
  70. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
  71. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +2 -1
  72. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +1 -1
  73. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +2 -2
  74. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
  75. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +2 -2
  76. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
  77. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +1 -1
  78. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
  79. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +2 -1
  80. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
  81. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +1 -1
  82. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
  83. package/dist/cjs/parser/json/JsonParser.js +4 -3
  84. package/dist/cjs/parser/json/JsonParser.js.map +1 -1
  85. package/dist/cjs/parser/text/TextParser.js +4 -4
  86. package/dist/cjs/parser/text/TextParser.js.map +1 -1
  87. package/dist/cjs/utils/BitUtils.js +2 -1
  88. package/dist/cjs/utils/BitUtils.js.map +1 -1
  89. package/dist/esm/BitmarkParserGenerator.js +19 -16
  90. package/dist/esm/BitmarkParserGenerator.js.map +1 -1
  91. package/dist/esm/ast/BaseBuilder.js +8 -8
  92. package/dist/esm/ast/BaseBuilder.js.map +1 -1
  93. package/dist/esm/ast/Builder.js +52 -50
  94. package/dist/esm/ast/Builder.js.map +1 -1
  95. package/dist/esm/ast/ResourceBuilder.js +19 -18
  96. package/dist/esm/ast/ResourceBuilder.js.map +1 -1
  97. package/dist/esm/breakscaping/Breakscape.js +59 -72
  98. package/dist/esm/breakscaping/Breakscape.js.map +1 -1
  99. package/dist/esm/config/Config.js +1 -1
  100. package/dist/esm/config/Config.js.map +1 -1
  101. package/dist/esm/config/raw/bits.js +26 -9
  102. package/dist/esm/config/raw/bits.js.map +1 -1
  103. package/dist/esm/config/raw/groups.js +5 -0
  104. package/dist/esm/config/raw/groups.js.map +1 -1
  105. package/dist/esm/config/raw/properties.js +145 -141
  106. package/dist/esm/config/raw/properties.js.map +1 -1
  107. package/dist/esm/generated/build-info.js +1 -1
  108. package/dist/esm/generator/bitmark/BitmarkGenerator.js +116 -128
  109. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
  110. package/dist/esm/generator/json/JsonGenerator.js +10 -10
  111. package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
  112. package/dist/esm/generator/text/TextGenerator.js +15 -15
  113. package/dist/esm/generator/text/TextGenerator.js.map +1 -1
  114. package/dist/esm/index.js +1 -1
  115. package/dist/esm/index.js.map +1 -1
  116. package/dist/esm/model/ast/NodeType.js +2 -0
  117. package/dist/esm/model/ast/NodeType.js.map +1 -1
  118. package/dist/esm/model/config/enum/PropertyConfigKey.js +1 -0
  119. package/dist/esm/model/config/enum/PropertyConfigKey.js.map +1 -1
  120. package/dist/esm/model/enum/BitType.js +3 -0
  121. package/dist/esm/model/enum/BitType.js.map +1 -1
  122. package/dist/esm/model/enum/BodyTextFormat.js +11 -0
  123. package/dist/esm/model/enum/BodyTextFormat.js.map +1 -0
  124. package/dist/esm/model/enum/DeprecatedTextFormat.js +6 -0
  125. package/dist/esm/model/enum/DeprecatedTextFormat.js.map +1 -0
  126. package/dist/esm/model/enum/PropertyFormat.js +2 -4
  127. package/dist/esm/model/enum/PropertyFormat.js.map +1 -1
  128. package/dist/esm/model/enum/TextFormat.js +4 -15
  129. package/dist/esm/model/enum/TextFormat.js.map +1 -1
  130. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +2 -2
  131. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -1
  132. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +14 -10
  133. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  134. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +4 -4
  135. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +1 -1
  136. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +1 -1
  137. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -1
  138. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +2 -2
  139. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -1
  140. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +8 -8
  141. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -1
  142. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +3 -3
  143. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +1 -1
  144. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +4 -4
  145. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +1 -1
  146. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +1 -1
  147. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +1 -1
  148. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +2 -1
  149. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -1
  150. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +1 -1
  151. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +1 -1
  152. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +1 -1
  153. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +1 -1
  154. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +10 -16
  155. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -1
  156. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +2 -1
  157. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +1 -1
  158. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +2 -2
  159. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -1
  160. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +2 -2
  161. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -1
  162. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +1 -1
  163. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +1 -1
  164. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +2 -1
  165. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -1
  166. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +1 -1
  167. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -1
  168. package/dist/esm/parser/json/JsonParser.js +4 -3
  169. package/dist/esm/parser/json/JsonParser.js.map +1 -1
  170. package/dist/esm/parser/text/TextParser.js +4 -4
  171. package/dist/esm/parser/text/TextParser.js.map +1 -1
  172. package/dist/esm/utils/BitUtils.js +2 -1
  173. package/dist/esm/utils/BitUtils.js.map +1 -1
  174. package/dist/types/BitmarkParserGenerator.d.ts +12 -8
  175. package/dist/types/BitmarkParserGenerator.d.ts.map +1 -1
  176. package/dist/types/ast/BaseBuilder.d.ts +5 -3
  177. package/dist/types/ast/BaseBuilder.d.ts.map +1 -1
  178. package/dist/types/ast/Builder.d.ts +1 -0
  179. package/dist/types/ast/Builder.d.ts.map +1 -1
  180. package/dist/types/ast/ResourceBuilder.d.ts.map +1 -1
  181. package/dist/types/breakscaping/Breakscape.d.ts +2 -2
  182. package/dist/types/breakscaping/Breakscape.d.ts.map +1 -1
  183. package/dist/types/config/raw/bits.d.ts.map +1 -1
  184. package/dist/types/config/raw/groups.d.ts.map +1 -1
  185. package/dist/types/config/raw/properties.d.ts.map +1 -1
  186. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +0 -1
  187. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
  188. package/dist/types/generator/json/JsonGenerator.d.ts +2 -2
  189. package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
  190. package/dist/types/generator/text/TextGenerator.d.ts.map +1 -1
  191. package/dist/types/index.d.ts +2 -2
  192. package/dist/types/index.d.ts.map +1 -1
  193. package/dist/types/model/ast/NodeType.d.ts +4 -0
  194. package/dist/types/model/ast/NodeType.d.ts.map +1 -1
  195. package/dist/types/model/ast/Nodes.d.ts +1 -0
  196. package/dist/types/model/ast/Nodes.d.ts.map +1 -1
  197. package/dist/types/model/config/enum/ConfigKey.d.ts +2 -0
  198. package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
  199. package/dist/types/model/config/enum/PropertyConfigKey.d.ts +3 -0
  200. package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +1 -1
  201. package/dist/types/model/enum/BitType.d.ts +6 -0
  202. package/dist/types/model/enum/BitType.d.ts.map +1 -1
  203. package/dist/types/model/enum/BodyTextFormat.d.ts +17 -0
  204. package/dist/types/model/enum/BodyTextFormat.d.ts.map +1 -0
  205. package/dist/types/model/enum/DeprecatedTextFormat.d.ts +7 -0
  206. package/dist/types/model/enum/DeprecatedTextFormat.d.ts.map +1 -0
  207. package/dist/types/model/enum/PropertyFormat.d.ts +4 -6
  208. package/dist/types/model/enum/PropertyFormat.d.ts.map +1 -1
  209. package/dist/types/model/enum/PropertyTag.d.ts +2 -0
  210. package/dist/types/model/enum/PropertyTag.d.ts.map +1 -1
  211. package/dist/types/model/enum/TextFormat.d.ts +4 -6
  212. package/dist/types/model/enum/TextFormat.d.ts.map +1 -1
  213. package/dist/types/model/json/BitJson.d.ts +1 -0
  214. package/dist/types/model/json/BitJson.d.ts.map +1 -1
  215. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +1 -1
  216. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
  217. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -1
  218. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -1
  219. package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +1 -1
  220. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -1
  221. package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
  222. package/dist/types/parser/text/TextParser.d.ts +2 -1
  223. package/dist/types/parser/text/TextParser.d.ts.map +1 -1
  224. package/dist/types/utils/BitUtils.d.ts.map +1 -1
  225. package/package.json +25 -21
@@ -4,6 +4,7 @@ import { Config } from '../config/Config';
4
4
  import { PropertyConfigKey } from '../model/config/enum/PropertyConfigKey';
5
5
  import { BitType } from '../model/enum/BitType';
6
6
  import { BodyBitType } from '../model/enum/BodyBitType';
7
+ import { DeprecatedTextFormat } from '../model/enum/DeprecatedTextFormat';
7
8
  import { ResourceTag } from '../model/enum/ResourceTag';
8
9
  import { TextFormat } from '../model/enum/TextFormat';
9
10
  import { TextLocation } from '../model/enum/TextLocation';
@@ -51,10 +52,11 @@ class Builder extends BaseBuilder {
51
52
  var _a, _b, _c, _d, _e, _f, _g, _h;
52
53
  const bitConfig = Config.getBitConfig(data.bitType);
53
54
  const bitType = data.bitType;
55
+ // Text Format (accepts deprecated values, and converts them to the new format)
56
+ const deprecatedTextFormat = DeprecatedTextFormat.fromValue(data.textFormat);
54
57
  let textFormat = (_a = TextFormat.fromValue(data.textFormat)) !== null && _a !== void 0 ? _a : bitConfig.textFormatDefault;
55
- // bitmark-- deprecated
56
- if (textFormat === TextFormat.bitmarkMinusMinus) {
57
- textFormat = TextFormat.bitmarkPlusPlus;
58
+ if (deprecatedTextFormat === DeprecatedTextFormat.bitmarkMinusMinus) {
59
+ textFormat = TextFormat.bitmarkText;
58
60
  }
59
61
  const context = {
60
62
  bitConfig,
@@ -73,11 +75,11 @@ class Builder extends BaseBuilder {
73
75
  // NOTE: Node order is important and is defined here
74
76
  const node = Object.assign(Object.assign({ bitType, bitLevel: data.bitLevel, textFormat, resourceType: ResourceTag.fromValue(data.resourceType), isCommented: data.isCommented,
75
77
  // Properties
76
- id: this.toAstProperty(PropertyConfigKey.id, data.id), internalComment: this.toAstProperty(PropertyConfigKey.internalComment, data.internalComment), customerId: this.toAstProperty(PropertyConfigKey.customerId, data.customerId), customerExternalId: this.toAstProperty(PropertyConfigKey.customerExternalId, data.customerExternalId), externalId: this.toAstProperty(PropertyConfigKey.externalId, data.externalId), spaceId: this.toAstProperty(PropertyConfigKey.spaceId, data.spaceId), padletId: this.toAstProperty(PropertyConfigKey.padletId, data.padletId), jupyterId: this.toAstProperty(PropertyConfigKey.jupyterId, data.jupyterId), jupyterExecutionCount: this.toAstProperty(PropertyConfigKey.jupyterExecutionCount, data.jupyterExecutionCount), isPublic: this.toAstProperty(PropertyConfigKey.isPublic, data.isPublic), aiGenerated: this.toAstProperty(PropertyConfigKey.aiGenerated, data.aiGenerated), machineTranslated: this.toAstProperty(PropertyConfigKey.machineTranslated, data.machineTranslated), searchIndex: this.toAstProperty(PropertyConfigKey.searchIndex, data.searchIndex), analyticsTag: this.toAstProperty(PropertyConfigKey.analyticsTag, data.analyticsTag), categoryTag: this.toAstProperty(PropertyConfigKey.categoryTag, data.categoryTag), topicTag: this.toAstProperty(PropertyConfigKey.topicTag, data.topicTag), altLangTag: this.toAstProperty(PropertyConfigKey.altLangTag, data.altLangTag), feedbackEngine: this.toAstProperty(PropertyConfigKey.feedbackEngine, data.feedbackEngine), feedbackType: this.toAstProperty(PropertyConfigKey.feedbackType, data.feedbackType), disableFeedback: this.toAstProperty(PropertyConfigKey.disableFeedback, data.disableFeedback), diffTo: this.toAstProperty(PropertyConfigKey.diffTo, data.diffTo), diffOp: this.toAstProperty(PropertyConfigKey.diffOp, data.diffOp), diffRef: this.toAstProperty(PropertyConfigKey.diffRef, data.diffRef), diffContext: this.toAstProperty(PropertyConfigKey.diffContext, data.diffContext), diffTime: this.toAstProperty(PropertyConfigKey.diffTime, data.diffTime), path: this.toAstProperty(PropertyConfigKey.path, data.path), releaseVersion: this.toAstProperty(PropertyConfigKey.releaseVersion, data.releaseVersion), releaseKind: this.toAstProperty(PropertyConfigKey.releaseKind, data.releaseKind), releaseDate: this.toAstProperty(PropertyConfigKey.releaseDate, data.releaseDate), book: this.buildBooks(context, data.book), ageRange: this.toAstProperty(PropertyConfigKey.ageRange, data.ageRange), lang: this.toAstProperty(PropertyConfigKey.lang, data.lang), language: this.toAstProperty(PropertyConfigKey.language, data.language), publisher: this.toAstProperty(PropertyConfigKey.publisher, data.publisher), publisherName: this.toAstProperty(PropertyConfigKey.publisherName, data.publisherName), theme: this.toAstProperty(PropertyConfigKey.theme, data.theme), computerLanguage: this.toAstProperty(PropertyConfigKey.computerLanguage, data.computerLanguage), target: this.toAstProperty(PropertyConfigKey.target, data.target), slug: this.toAstProperty(PropertyConfigKey.slug, data.slug), tag: this.toAstProperty(PropertyConfigKey.tag, data.tag), reductionTag: this.toAstProperty(PropertyConfigKey.reductionTag, data.reductionTag), bubbleTag: this.toAstProperty(PropertyConfigKey.bubbleTag, data.bubbleTag), levelCEFRp: this.toAstProperty(PropertyConfigKey.levelCEFRp, data.levelCEFRp), levelCEFR: this.toAstProperty(PropertyConfigKey.levelCEFR, data.levelCEFR), levelILR: this.toAstProperty(PropertyConfigKey.levelILR, data.levelILR), levelACTFL: this.toAstProperty(PropertyConfigKey.levelACTFL, data.levelACTFL), icon: this.toAstProperty(PropertyConfigKey.icon, data.icon), iconTag: this.toAstProperty(PropertyConfigKey.iconTag, data.iconTag), colorTag: this.toAstProperty(PropertyConfigKey.colorTag, data.colorTag), flashcardSet: this.toAstProperty(PropertyConfigKey.flashcardSet, data.flashcardSet), subtype: this.toAstProperty(PropertyConfigKey.subtype, data.subtype), bookAlias: this.toAstProperty(PropertyConfigKey.bookAlias, data.bookAlias), bookDiff: this.toAstProperty(PropertyConfigKey.bookDiff, data.bookDiff), coverImage: this.toAstProperty(PropertyConfigKey.coverImage, data.coverImage), coverColor: this.toAstProperty(PropertyConfigKey.coverColor, data.coverColor), publications: this.toAstProperty(PropertyConfigKey.publications, data.publications), author: this.toAstProperty(PropertyConfigKey.author, data.author), subject: this.toAstProperty(PropertyConfigKey.subject, data.subject), date: this.toAstProperty(PropertyConfigKey.date, data.date), dateEnd: this.toAstProperty(PropertyConfigKey.dateEnd, data.dateEnd), location: this.toAstProperty(PropertyConfigKey.location, data.location), kind: this.toAstProperty(PropertyConfigKey.kind, data.kind), hasMarkAsDone: this.toAstProperty(PropertyConfigKey.hasMarkAsDone, data.hasMarkAsDone), processHandIn: this.toAstProperty(PropertyConfigKey.processHandIn, data.processHandIn), chatWithBook: this.toAstProperty(PropertyConfigKey.chatWithBook, data.chatWithBook), chatWithBookBrainKey: this.toAstProperty(PropertyConfigKey.chatWithBookBrainKey, data.chatWithBookBrainKey), action: this.toAstProperty(PropertyConfigKey.action, data.action), showInIndex: this.toAstProperty(PropertyConfigKey.showInIndex, data.showInIndex), refAuthor: this.toAstProperty(PropertyConfigKey.refAuthor, data.refAuthor), refBookTitle: this.toAstProperty(PropertyConfigKey.refBookTitle, data.refBookTitle), refPublisher: this.toAstProperty(PropertyConfigKey.refPublisher, data.refPublisher), refPublicationYear: this.toAstProperty(PropertyConfigKey.refPublicationYear, data.refPublicationYear), citationStyle: this.toAstProperty(PropertyConfigKey.citationStyle, data.citationStyle), blockId: this.toAstProperty(PropertyConfigKey.blockId, data.blockId), pageNo: this.toAstProperty(PropertyConfigKey.pageNo, data.pageNo), x: this.toAstProperty(PropertyConfigKey.x, data.x), y: this.toAstProperty(PropertyConfigKey.y, data.y), width: this.toAstProperty(PropertyConfigKey.width, data.width), height: this.toAstProperty(PropertyConfigKey.height, data.height), index: this.toAstProperty(PropertyConfigKey.index, data.index), classification: this.toAstProperty(PropertyConfigKey.classification, data.classification), availableClassifications: this.toAstProperty(PropertyConfigKey.availableClassifications, data.availableClassifications), allowedBit: this.toAstProperty(PropertyConfigKey.allowedBit, data.allowedBit), tableFixedHeader: this.toAstProperty(PropertyConfigKey.tableFixedHeader, data.tableFixedHeader), tableSearch: this.toAstProperty(PropertyConfigKey.tableSearch, data.tableSearch), tableSort: this.toAstProperty(PropertyConfigKey.tableSort, data.tableSort), tablePagination: this.toAstProperty(PropertyConfigKey.tablePagination, data.tablePagination), tablePaginationLimit: this.toAstProperty(PropertyConfigKey.tablePaginationLimit, data.tablePaginationLimit), tableHeight: this.toAstProperty(PropertyConfigKey.tableHeight, data.tableHeight), tableWhitespaceNoWrap: this.toAstProperty(PropertyConfigKey.tableWhitespaceNoWrap, data.tableWhitespaceNoWrap), tableAutoWidth: this.toAstProperty(PropertyConfigKey.tableAutoWidth, data.tableAutoWidth), tableResizableColumns: this.toAstProperty(PropertyConfigKey.tableResizableColumns, data.tableResizableColumns), tableColumnMinWidth: this.toAstProperty(PropertyConfigKey.tableColumnMinWidth, data.tableColumnMinWidth), quizCountItems: this.toAstProperty(PropertyConfigKey.quizCountItems, data.quizCountItems), quizStrikethroughSolutions: this.toAstProperty(PropertyConfigKey.quizStrikethroughSolutions, data.quizStrikethroughSolutions), codeLineNumbers: this.toAstProperty(PropertyConfigKey.codeLineNumbers, data.codeLineNumbers), codeMinimap: this.toAstProperty(PropertyConfigKey.codeMinimap, data.codeMinimap), stripePricingTableId: this.toAstProperty(PropertyConfigKey.stripePricingTableId, data.stripePricingTableId), stripePublishableKey: this.toAstProperty(PropertyConfigKey.stripePublishableKey, data.stripePublishableKey), thumbImage: this.toAstProperty(PropertyConfigKey.thumbImage, data.thumbImage), scormSource: this.toAstProperty(PropertyConfigKey.scormSource, data.scormSource), posterImage: this.toAstProperty(PropertyConfigKey.posterImage, data.posterImage), focusX: this.toAstProperty(PropertyConfigKey.focusX, data.focusX), focusY: this.toAstProperty(PropertyConfigKey.focusY, data.focusY), pointerLeft: this.toAstProperty(PropertyConfigKey.pointerLeft, data.pointerLeft), pointerTop: this.toAstProperty(PropertyConfigKey.pointerTop, data.pointerTop), listItemIndent: this.toAstProperty(PropertyConfigKey.listItemIndent, data.listItemIndent), backgroundWallpaper: this.toAstProperty(PropertyConfigKey.backgroundWallpaper, data.backgroundWallpaper), hasBookNavigation: this.toAstProperty(PropertyConfigKey.hasBookNavigation, data.hasBookNavigation), duration: this.toAstProperty(PropertyConfigKey.duration, data.duration), deeplink: this.toAstProperty(PropertyConfigKey.deeplink, data.deeplink), externalLink: this.toAstProperty(PropertyConfigKey.externalLink, data.externalLink), externalLinkText: this.toAstProperty(PropertyConfigKey.externalLinkText, data.externalLinkText), videoCallLink: this.toAstProperty(PropertyConfigKey.videoCallLink, data.videoCallLink), vendorDashboardId: this.toAstProperty(PropertyConfigKey.vendorDashboardId, data.vendorDashboardId), vendorSurveyId: this.toAstProperty(PropertyConfigKey.vendorSurveyId, data.vendorSurveyId), vendorUrl: this.toAstProperty(PropertyConfigKey.vendorUrl, data.vendorUrl), search: this.toAstProperty(PropertyConfigKey.search, data.search), list: this.toAstProperty(PropertyConfigKey.list, data.list), layer: this.toAstProperty(PropertyConfigKey.layer, data.layer), textReference: this.toAstProperty(PropertyConfigKey.textReference, data.textReference), isTracked: this.toAstProperty(PropertyConfigKey.isTracked, data.isTracked), isInfoOnly: this.toAstProperty(PropertyConfigKey.isInfoOnly, data.isInfoOnly), imageFirst: this.toAstProperty(PropertyConfigKey.imageFirst, data.imageFirst), activityType: this.toAstProperty(PropertyConfigKey.activityType, data.activityType), labelTrue: this.toAstProperty(PropertyConfigKey.labelTrue, data.labelTrue), labelFalse: this.toAstProperty(PropertyConfigKey.labelFalse, data.labelFalse), content2Buy: this.toAstProperty(PropertyConfigKey.content2Buy, data.content2Buy), mailingList: this.toAstProperty(PropertyConfigKey.mailingList, data.mailingList), buttonCaption: this.toAstProperty(PropertyConfigKey.buttonCaption, data.buttonCaption), callToActionUrl: this.toAstProperty(PropertyConfigKey.callToActionUrl, data.callToActionUrl), caption: this.handleJsonText(context, true, data.caption), quotedPerson: this.toAstProperty(PropertyConfigKey.quotedPerson, data.quotedPerson), reasonableNumOfChars: reasonableNumOfCharsProperty, resolved: this.toAstProperty(PropertyConfigKey.resolved, data.resolved), resolvedDate: this.toAstProperty(PropertyConfigKey.resolvedDate, data.resolvedDate), resolvedBy: this.toAstProperty(PropertyConfigKey.resolvedBy, data.resolvedBy), handInAcceptFileType: this.toAstProperty(PropertyConfigKey.handInAcceptFileType, data.handInAcceptFileType), handInRequirement: this.toAstProperty(PropertyConfigKey.handInRequirement, data.handInRequirement), handInInstruction: this.toAstProperty(PropertyConfigKey.handInInstruction, data.handInInstruction), maxCreatedBits: this.toAstProperty(PropertyConfigKey.maxCreatedBits, data.maxCreatedBits), maxDisplayLevel: this.toAstProperty(PropertyConfigKey.maxDisplayLevel, data.maxDisplayLevel), maxTocChapterLevel: this.toAstProperty(PropertyConfigKey.maxTocChapterLevel, data.maxTocChapterLevel), page: this.toAstProperty(PropertyConfigKey.page, data.page), productId: this.toAstProperty(PropertyConfigKey.productId, data.productId), product: this.toAstProperty(PropertyConfigKey.product, data.product), productList: this.toAstProperty(PropertyConfigKey.productList, data.productList), productVideo: this.toAstProperty(PropertyConfigKey.productVideo, data.productVideo), productVideoList: this.toAstProperty(PropertyConfigKey.productVideoList, data.productVideoList), productFolder: this.toAstProperty(PropertyConfigKey.productFolder, data.productFolder), technicalTerm: this.buildTechnicalTerm(context, data.technicalTerm), servings: this.buildServings(context, data.servings), ratingLevelStart: this.buildRatingLevelStartEnd(context, data.ratingLevelStart), ratingLevelEnd: this.buildRatingLevelStartEnd(context, data.ratingLevelEnd), ratingLevelSelected: this.toAstProperty(PropertyConfigKey.ratingLevelSelected, data.ratingLevelSelected), markConfig: this.buildMarkConfigs(context, data.markConfig), imageSource: this.buildImageSource(context, data.imageSource), person: this.buildPerson(context, data.person), bot: this.toAstProperty(PropertyConfigKey.bot, data.bot), referenceProperty: this.toAstProperty(PropertyConfigKey.property_reference, data.referenceProperty),
78
+ id: this.toAstProperty(PropertyConfigKey.id, data.id), internalComment: this.toAstProperty(PropertyConfigKey.internalComment, data.internalComment), customerId: this.toAstProperty(PropertyConfigKey.customerId, data.customerId), customerExternalId: this.toAstProperty(PropertyConfigKey.customerExternalId, data.customerExternalId), externalId: this.toAstProperty(PropertyConfigKey.externalId, data.externalId), spaceId: this.toAstProperty(PropertyConfigKey.spaceId, data.spaceId), padletId: this.toAstProperty(PropertyConfigKey.padletId, data.padletId), jupyterId: this.toAstProperty(PropertyConfigKey.jupyterId, data.jupyterId), jupyterExecutionCount: this.toAstProperty(PropertyConfigKey.jupyterExecutionCount, data.jupyterExecutionCount), isPublic: this.toAstProperty(PropertyConfigKey.isPublic, data.isPublic), aiGenerated: this.toAstProperty(PropertyConfigKey.aiGenerated, data.aiGenerated), machineTranslated: this.toAstProperty(PropertyConfigKey.machineTranslated, data.machineTranslated), searchIndex: this.toAstProperty(PropertyConfigKey.searchIndex, data.searchIndex), analyticsTag: this.toAstProperty(PropertyConfigKey.analyticsTag, data.analyticsTag), categoryTag: this.toAstProperty(PropertyConfigKey.categoryTag, data.categoryTag), topicTag: this.toAstProperty(PropertyConfigKey.topicTag, data.topicTag), altLangTag: this.toAstProperty(PropertyConfigKey.altLangTag, data.altLangTag), feedbackEngine: this.toAstProperty(PropertyConfigKey.feedbackEngine, data.feedbackEngine), feedbackType: this.toAstProperty(PropertyConfigKey.feedbackType, data.feedbackType), disableFeedback: this.toAstProperty(PropertyConfigKey.disableFeedback, data.disableFeedback), diffTo: this.toAstProperty(PropertyConfigKey.diffTo, data.diffTo), diffOp: this.toAstProperty(PropertyConfigKey.diffOp, data.diffOp), diffRef: this.toAstProperty(PropertyConfigKey.diffRef, data.diffRef), diffContext: this.toAstProperty(PropertyConfigKey.diffContext, data.diffContext), diffTime: this.toAstProperty(PropertyConfigKey.diffTime, data.diffTime), path: this.toAstProperty(PropertyConfigKey.path, data.path), releaseVersion: this.toAstProperty(PropertyConfigKey.releaseVersion, data.releaseVersion), releaseKind: this.toAstProperty(PropertyConfigKey.releaseKind, data.releaseKind), releaseDate: this.toAstProperty(PropertyConfigKey.releaseDate, data.releaseDate), book: this.buildBooks(context, data.book), ageRange: this.toAstProperty(PropertyConfigKey.ageRange, data.ageRange), lang: this.toAstProperty(PropertyConfigKey.lang, data.lang), language: this.toAstProperty(PropertyConfigKey.language, data.language), publisher: this.toAstProperty(PropertyConfigKey.publisher, data.publisher), publisherName: this.toAstProperty(PropertyConfigKey.publisherName, data.publisherName), theme: this.toAstProperty(PropertyConfigKey.theme, data.theme), computerLanguage: this.toAstProperty(PropertyConfigKey.computerLanguage, data.computerLanguage), target: this.toAstProperty(PropertyConfigKey.target, data.target), slug: this.toAstProperty(PropertyConfigKey.slug, data.slug), tag: this.toAstProperty(PropertyConfigKey.tag, data.tag), reductionTag: this.toAstProperty(PropertyConfigKey.reductionTag, data.reductionTag), bubbleTag: this.toAstProperty(PropertyConfigKey.bubbleTag, data.bubbleTag), levelCEFRp: this.toAstProperty(PropertyConfigKey.levelCEFRp, data.levelCEFRp), levelCEFR: this.toAstProperty(PropertyConfigKey.levelCEFR, data.levelCEFR), levelILR: this.toAstProperty(PropertyConfigKey.levelILR, data.levelILR), levelACTFL: this.toAstProperty(PropertyConfigKey.levelACTFL, data.levelACTFL), icon: this.toAstProperty(PropertyConfigKey.icon, data.icon), iconTag: this.toAstProperty(PropertyConfigKey.iconTag, data.iconTag), colorTag: this.toAstProperty(PropertyConfigKey.colorTag, data.colorTag), flashcardSet: this.toAstProperty(PropertyConfigKey.flashcardSet, data.flashcardSet), subtype: this.toAstProperty(PropertyConfigKey.subtype, data.subtype), bookAlias: this.toAstProperty(PropertyConfigKey.bookAlias, data.bookAlias), bookDiff: this.toAstProperty(PropertyConfigKey.bookDiff, data.bookDiff), coverImage: this.toAstProperty(PropertyConfigKey.coverImage, data.coverImage), coverColor: this.toAstProperty(PropertyConfigKey.coverColor, data.coverColor), publications: this.toAstProperty(PropertyConfigKey.publications, data.publications), author: this.toAstProperty(PropertyConfigKey.author, data.author), subject: this.toAstProperty(PropertyConfigKey.subject, data.subject), date: this.toAstProperty(PropertyConfigKey.date, data.date), dateEnd: this.toAstProperty(PropertyConfigKey.dateEnd, data.dateEnd), location: this.toAstProperty(PropertyConfigKey.location, data.location), kind: this.toAstProperty(PropertyConfigKey.kind, data.kind), hasMarkAsDone: this.toAstProperty(PropertyConfigKey.hasMarkAsDone, data.hasMarkAsDone), processHandIn: this.toAstProperty(PropertyConfigKey.processHandIn, data.processHandIn), chatWithBook: this.toAstProperty(PropertyConfigKey.chatWithBook, data.chatWithBook), chatWithBookBrainKey: this.toAstProperty(PropertyConfigKey.chatWithBookBrainKey, data.chatWithBookBrainKey), action: this.toAstProperty(PropertyConfigKey.action, data.action), showInIndex: this.toAstProperty(PropertyConfigKey.showInIndex, data.showInIndex), refAuthor: this.toAstProperty(PropertyConfigKey.refAuthor, data.refAuthor), refBookTitle: this.toAstProperty(PropertyConfigKey.refBookTitle, data.refBookTitle), refPublisher: this.toAstProperty(PropertyConfigKey.refPublisher, data.refPublisher), refPublicationYear: this.toAstProperty(PropertyConfigKey.refPublicationYear, data.refPublicationYear), citationStyle: this.toAstProperty(PropertyConfigKey.citationStyle, data.citationStyle), blockId: this.toAstProperty(PropertyConfigKey.blockId, data.blockId), pageNo: this.toAstProperty(PropertyConfigKey.pageNo, data.pageNo), x: this.toAstProperty(PropertyConfigKey.x, data.x), y: this.toAstProperty(PropertyConfigKey.y, data.y), width: this.toAstProperty(PropertyConfigKey.width, data.width), height: this.toAstProperty(PropertyConfigKey.height, data.height), index: this.toAstProperty(PropertyConfigKey.index, data.index), classification: this.toAstProperty(PropertyConfigKey.classification, data.classification), availableClassifications: this.toAstProperty(PropertyConfigKey.availableClassifications, data.availableClassifications), allowedBit: this.toAstProperty(PropertyConfigKey.allowedBit, data.allowedBit), tableFixedHeader: this.toAstProperty(PropertyConfigKey.tableFixedHeader, data.tableFixedHeader), tableSearch: this.toAstProperty(PropertyConfigKey.tableSearch, data.tableSearch), tableSort: this.toAstProperty(PropertyConfigKey.tableSort, data.tableSort), tablePagination: this.toAstProperty(PropertyConfigKey.tablePagination, data.tablePagination), tablePaginationLimit: this.toAstProperty(PropertyConfigKey.tablePaginationLimit, data.tablePaginationLimit), tableHeight: this.toAstProperty(PropertyConfigKey.tableHeight, data.tableHeight), tableWhitespaceNoWrap: this.toAstProperty(PropertyConfigKey.tableWhitespaceNoWrap, data.tableWhitespaceNoWrap), tableAutoWidth: this.toAstProperty(PropertyConfigKey.tableAutoWidth, data.tableAutoWidth), tableResizableColumns: this.toAstProperty(PropertyConfigKey.tableResizableColumns, data.tableResizableColumns), tableColumnMinWidth: this.toAstProperty(PropertyConfigKey.tableColumnMinWidth, data.tableColumnMinWidth), quizCountItems: this.toAstProperty(PropertyConfigKey.quizCountItems, data.quizCountItems), quizStrikethroughSolutions: this.toAstProperty(PropertyConfigKey.quizStrikethroughSolutions, data.quizStrikethroughSolutions), codeLineNumbers: this.toAstProperty(PropertyConfigKey.codeLineNumbers, data.codeLineNumbers), codeMinimap: this.toAstProperty(PropertyConfigKey.codeMinimap, data.codeMinimap), stripePricingTableId: this.toAstProperty(PropertyConfigKey.stripePricingTableId, data.stripePricingTableId), stripePublishableKey: this.toAstProperty(PropertyConfigKey.stripePublishableKey, data.stripePublishableKey), thumbImage: this.toAstProperty(PropertyConfigKey.thumbImage, data.thumbImage), scormSource: this.toAstProperty(PropertyConfigKey.scormSource, data.scormSource), posterImage: this.toAstProperty(PropertyConfigKey.posterImage, data.posterImage), focusX: this.toAstProperty(PropertyConfigKey.focusX, data.focusX), focusY: this.toAstProperty(PropertyConfigKey.focusY, data.focusY), pointerLeft: this.toAstProperty(PropertyConfigKey.pointerLeft, data.pointerLeft), pointerTop: this.toAstProperty(PropertyConfigKey.pointerTop, data.pointerTop), listItemIndent: this.toAstProperty(PropertyConfigKey.listItemIndent, data.listItemIndent), backgroundWallpaper: this.toAstProperty(PropertyConfigKey.backgroundWallpaper, data.backgroundWallpaper), hasBookNavigation: this.toAstProperty(PropertyConfigKey.hasBookNavigation, data.hasBookNavigation), duration: this.toAstProperty(PropertyConfigKey.duration, data.duration), deeplink: this.toAstProperty(PropertyConfigKey.deeplink, data.deeplink), externalLink: this.toAstProperty(PropertyConfigKey.externalLink, data.externalLink), externalLinkText: this.toAstProperty(PropertyConfigKey.externalLinkText, data.externalLinkText), videoCallLink: this.toAstProperty(PropertyConfigKey.videoCallLink, data.videoCallLink), vendorDashboardId: this.toAstProperty(PropertyConfigKey.vendorDashboardId, data.vendorDashboardId), vendorSurveyId: this.toAstProperty(PropertyConfigKey.vendorSurveyId, data.vendorSurveyId), vendorUrl: this.toAstProperty(PropertyConfigKey.vendorUrl, data.vendorUrl), search: this.toAstProperty(PropertyConfigKey.search, data.search), list: this.toAstProperty(PropertyConfigKey.list, data.list), layer: this.toAstProperty(PropertyConfigKey.layer, data.layer), layerRole: this.toAstProperty(PropertyConfigKey.layerRole, data.layerRole), textReference: this.toAstProperty(PropertyConfigKey.textReference, data.textReference), isTracked: this.toAstProperty(PropertyConfigKey.isTracked, data.isTracked), isInfoOnly: this.toAstProperty(PropertyConfigKey.isInfoOnly, data.isInfoOnly), imageFirst: this.toAstProperty(PropertyConfigKey.imageFirst, data.imageFirst), activityType: this.toAstProperty(PropertyConfigKey.activityType, data.activityType), labelTrue: this.toAstProperty(PropertyConfigKey.labelTrue, data.labelTrue), labelFalse: this.toAstProperty(PropertyConfigKey.labelFalse, data.labelFalse), content2Buy: this.toAstProperty(PropertyConfigKey.content2Buy, data.content2Buy), mailingList: this.toAstProperty(PropertyConfigKey.mailingList, data.mailingList), buttonCaption: this.toAstProperty(PropertyConfigKey.buttonCaption, data.buttonCaption), callToActionUrl: this.toAstProperty(PropertyConfigKey.callToActionUrl, data.callToActionUrl), caption: this.handleJsonText(context, TextLocation.tag, data.caption), quotedPerson: this.toAstProperty(PropertyConfigKey.quotedPerson, data.quotedPerson), reasonableNumOfChars: reasonableNumOfCharsProperty, resolved: this.toAstProperty(PropertyConfigKey.resolved, data.resolved), resolvedDate: this.toAstProperty(PropertyConfigKey.resolvedDate, data.resolvedDate), resolvedBy: this.toAstProperty(PropertyConfigKey.resolvedBy, data.resolvedBy), handInAcceptFileType: this.toAstProperty(PropertyConfigKey.handInAcceptFileType, data.handInAcceptFileType), handInRequirement: this.toAstProperty(PropertyConfigKey.handInRequirement, data.handInRequirement), handInInstruction: this.toAstProperty(PropertyConfigKey.handInInstruction, data.handInInstruction), maxCreatedBits: this.toAstProperty(PropertyConfigKey.maxCreatedBits, data.maxCreatedBits), maxDisplayLevel: this.toAstProperty(PropertyConfigKey.maxDisplayLevel, data.maxDisplayLevel), maxTocChapterLevel: this.toAstProperty(PropertyConfigKey.maxTocChapterLevel, data.maxTocChapterLevel), page: this.toAstProperty(PropertyConfigKey.page, data.page), productId: this.toAstProperty(PropertyConfigKey.productId, data.productId), product: this.toAstProperty(PropertyConfigKey.product, data.product), productList: this.toAstProperty(PropertyConfigKey.productList, data.productList), productVideo: this.toAstProperty(PropertyConfigKey.productVideo, data.productVideo), productVideoList: this.toAstProperty(PropertyConfigKey.productVideoList, data.productVideoList), productFolder: this.toAstProperty(PropertyConfigKey.productFolder, data.productFolder), technicalTerm: this.buildTechnicalTerm(context, data.technicalTerm), servings: this.buildServings(context, data.servings), ratingLevelStart: this.buildRatingLevelStartEnd(context, data.ratingLevelStart), ratingLevelEnd: this.buildRatingLevelStartEnd(context, data.ratingLevelEnd), ratingLevelSelected: this.toAstProperty(PropertyConfigKey.ratingLevelSelected, data.ratingLevelSelected), markConfig: this.buildMarkConfigs(context, data.markConfig), imageSource: this.buildImageSource(context, data.imageSource), person: this.buildPerson(context, data.person), bot: this.toAstProperty(PropertyConfigKey.bot, data.bot), referenceProperty: this.toAstProperty(PropertyConfigKey.property_reference, data.referenceProperty),
77
79
  // Book data
78
- title: this.handleJsonText(context, true, data.title), subtitle: this.handleJsonText(context, true, data.subtitle), level: NumberUtils.asNumber(data.level), toc: this.toAstProperty(PropertyConfigKey.toc, data.toc), progress: this.toAstProperty(PropertyConfigKey.progress, data.progress), anchor: data.anchor, reference: data.reference, referenceEnd: data.referenceEnd, revealSolutions: this.toAstProperty(PropertyConfigKey.revealSolutions, data.revealSolutions),
80
+ title: this.handleJsonText(context, TextLocation.tag, data.title), subtitle: this.handleJsonText(context, TextLocation.tag, data.subtitle), level: NumberUtils.asNumber(data.level), toc: this.toAstProperty(PropertyConfigKey.toc, data.toc), progress: this.toAstProperty(PropertyConfigKey.progress, data.progress), anchor: data.anchor, reference: data.reference, referenceEnd: data.referenceEnd, revealSolutions: this.toAstProperty(PropertyConfigKey.revealSolutions, data.revealSolutions),
79
81
  // Item, Lead, Hint, Instruction
80
- item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), pageNumber: this.handleJsonText(context, true, data.pageNumber), marginNumber: this.handleJsonText(context, true, data.marginNumber), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction), partialAnswer: this.toAstProperty(PropertyConfigKey.partialAnswer, data.partialAnswer), sampleSolution: this.toAstProperty(PropertyConfigKey.property_sampleSolution, data.sampleSolution), additionalSolutions: this.toAstProperty(PropertyConfigKey.additionalSolutions, data.additionalSolutions) }, this.toExample(data.__isDefaultExample, data.example)), {
82
+ item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), pageNumber: this.handleJsonText(context, TextLocation.tag, data.pageNumber), marginNumber: this.handleJsonText(context, TextLocation.tag, data.marginNumber), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction), partialAnswer: this.toAstProperty(PropertyConfigKey.partialAnswer, data.partialAnswer), sampleSolution: this.toAstProperty(PropertyConfigKey.property_sampleSolution, data.sampleSolution), additionalSolutions: this.toAstProperty(PropertyConfigKey.additionalSolutions, data.additionalSolutions) }, this.toExample(data.__isDefaultExample, data.example)), {
81
83
  // Person
82
84
  imagePlaceholder: ArrayUtils.asSingle(this.resourceBuilder.resourceFromResourceDataJson(context, ResourceTag.image, (_b = data.imagePlaceholder) === null || _b === void 0 ? void 0 : _b.image)), resources: ArrayUtils.asArray(this.resourceBuilder.resourceFromResourceJson(context, data.resources)),
83
85
  // Body, Card, Footer, must be after all other properties except the extraProperties and markup / parser
@@ -176,7 +178,7 @@ class Builder extends BaseBuilder {
176
178
  if (!data)
177
179
  return undefined;
178
180
  // NOTE: Node order is important and is defined here
179
- const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', requireReason: !!data.requireReason, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
181
+ const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', requireReason: !!data.requireReason, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
180
182
  // Remove Unset Optionals
181
183
  ObjectUtils.removeUnwantedProperties(node, {
182
184
  ignoreAllFalse: true,
@@ -197,9 +199,9 @@ class Builder extends BaseBuilder {
197
199
  return undefined;
198
200
  // Set default example
199
201
  // Not __testAst - there is no default example
200
- const defaultExample = this.handleJsonText(context, true, 'true');
202
+ const defaultExample = this.handleJsonText(context, TextLocation.tag, 'true');
201
203
  // NOTE: Node order is important and is defined here
202
- const node = Object.assign(Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', reasonableNumOfChars: ((_b = data.reasonableNumOfChars) !== null && _b !== void 0 ? _b : undefined), item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __textAst: data.__textAst });
204
+ const node = Object.assign(Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', reasonableNumOfChars: ((_b = data.reasonableNumOfChars) !== null && _b !== void 0 ? _b : undefined), item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __textAst: data.__textAst });
203
205
  // Remove Unset Optionals
204
206
  ObjectUtils.removeUnwantedProperties(node, {
205
207
  ignoreAllFalse: true,
@@ -231,7 +233,7 @@ class Builder extends BaseBuilder {
231
233
  if (!data)
232
234
  return undefined;
233
235
  // NOTE: Node order is important and is defined here
234
- const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
236
+ const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
235
237
  // Remove Unset Optionals
236
238
  ObjectUtils.removeUnwantedProperties(node, {
237
239
  ignoreAllFalse: true,
@@ -263,7 +265,7 @@ class Builder extends BaseBuilder {
263
265
  if (!data)
264
266
  return undefined;
265
267
  // NOTE: Node order is important and is defined here
266
- const node = Object.assign({ response: (_a = data.response) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
268
+ const node = Object.assign({ response: (_a = data.response) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
267
269
  // Remove Unset Optionals
268
270
  ObjectUtils.removeUnwantedProperties(node, {
269
271
  ignoreAllFalse: true,
@@ -299,9 +301,9 @@ class Builder extends BaseBuilder {
299
301
  response: (_a = data.response) !== null && _a !== void 0 ? _a : '',
300
302
  reaction: (_b = data.reaction) !== null && _b !== void 0 ? _b : '',
301
303
  feedback: (_c = data.feedback) !== null && _c !== void 0 ? _c : '',
302
- item: this.handleJsonText(context, true, data.item),
303
- lead: this.handleJsonText(context, true, data.lead),
304
- hint: this.handleJsonText(context, true, data.hint),
304
+ item: this.handleJsonText(context, TextLocation.tag, data.item),
305
+ lead: this.handleJsonText(context, TextLocation.tag, data.lead),
306
+ hint: this.handleJsonText(context, TextLocation.tag, data.hint),
305
307
  };
306
308
  // Remove Unset Optionals
307
309
  ObjectUtils.removeUnwantedProperties(node, {
@@ -349,10 +351,10 @@ class Builder extends BaseBuilder {
349
351
  }
350
352
  // NOTE: Node order is important and is defined here
351
353
  const node = {
352
- item: this.handleJsonText(context, true, data.item),
353
- lead: this.handleJsonText(context, true, data.lead),
354
- hint: this.handleJsonText(context, true, data.hint),
355
- instruction: this.handleJsonText(context, true, data.instruction),
354
+ item: this.handleJsonText(context, TextLocation.tag, data.item),
355
+ lead: this.handleJsonText(context, TextLocation.tag, data.lead),
356
+ hint: this.handleJsonText(context, TextLocation.tag, data.hint),
357
+ instruction: this.handleJsonText(context, TextLocation.tag, data.instruction),
356
358
  // isExample: !!data.__defaultExample,
357
359
  choices: choices,
358
360
  reason: reason, // Might be undefined
@@ -404,10 +406,10 @@ class Builder extends BaseBuilder {
404
406
  }
405
407
  // NOTE: Node order is important and is defined here
406
408
  const node = {
407
- item: this.handleJsonText(context, true, data.item),
408
- lead: this.handleJsonText(context, true, data.lead),
409
- hint: this.handleJsonText(context, true, data.hint),
410
- instruction: this.handleJsonText(context, true, data.instruction),
409
+ item: this.handleJsonText(context, TextLocation.tag, data.item),
410
+ lead: this.handleJsonText(context, TextLocation.tag, data.lead),
411
+ hint: this.handleJsonText(context, TextLocation.tag, data.hint),
412
+ instruction: this.handleJsonText(context, TextLocation.tag, data.instruction),
411
413
  isExample: !!data.__defaultExample,
412
414
  choices: choices,
413
415
  responses: responses,
@@ -473,7 +475,7 @@ class Builder extends BaseBuilder {
473
475
  const keyImage = this.resourceBuilder.resourceFromResourceJson(context, data.keyImage);
474
476
  // NOTE: Node order is important and is defined here
475
477
  const node = Object.assign(Object.assign({ key: (_a = data.key) !== null && _a !== void 0 ? _a : '', keyAudio,
476
- keyImage, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { values: (_b = data.values) !== null && _b !== void 0 ? _b : [], __valuesAst: data.__valuesAst });
478
+ keyImage, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { values: (_b = data.values) !== null && _b !== void 0 ? _b : [], __valuesAst: data.__valuesAst });
477
479
  // Remove Unset Optionals
478
480
  ObjectUtils.removeUnwantedProperties(node, {
479
481
  ignoreAllFalse: true,
@@ -533,10 +535,10 @@ class Builder extends BaseBuilder {
533
535
  // NOTE: Node order is important and is defined here
534
536
  const node = {
535
537
  key: (_b = data.key) !== null && _b !== void 0 ? _b : '',
536
- item: this.handleJsonText(context, true, data.item),
537
- lead: this.handleJsonText(context, true, data.lead),
538
- hint: this.handleJsonText(context, true, data.hint),
539
- instruction: this.handleJsonText(context, true, data.instruction),
538
+ item: this.handleJsonText(context, TextLocation.tag, data.item),
539
+ lead: this.handleJsonText(context, TextLocation.tag, data.lead),
540
+ hint: this.handleJsonText(context, TextLocation.tag, data.hint),
541
+ instruction: this.handleJsonText(context, TextLocation.tag, data.instruction),
540
542
  isExample,
541
543
  cells: ((_c = data.cells) !== null && _c !== void 0 ? _c : []).map((c) => this.buildMatrixCell(context, c)).filter((c) => c != null),
542
544
  };
@@ -561,7 +563,7 @@ class Builder extends BaseBuilder {
561
563
  // Set default example
562
564
  const defaultExample = Array.isArray(data.__valuesAst) && data.__valuesAst.length > 0 ? data.__valuesAst[0] : null;
563
565
  // NOTE: Node order is important and is defined here
564
- const node = Object.assign(Object.assign({ values: (_a = data.values) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __valuesAst: data.__valuesAst });
566
+ const node = Object.assign(Object.assign({ values: (_a = data.values) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __valuesAst: data.__valuesAst });
565
567
  // Remove Unset Optionals
566
568
  ObjectUtils.removeUnwantedProperties(node, {
567
569
  ignoreAllFalse: true,
@@ -586,8 +588,8 @@ class Builder extends BaseBuilder {
586
588
  // Process the audio resource
587
589
  const audio = this.resourceBuilder.resourceFromResourceJson(context, cell.audio);
588
590
  return {
589
- title: this.handleJsonText(context, true, cell.title),
590
- body: this.handleJsonText(context, true, cell.body),
591
+ title: this.handleJsonText(context, TextLocation.tag, cell.title),
592
+ body: this.handleJsonText(context, TextLocation.tag, cell.body),
591
593
  audio,
592
594
  };
593
595
  })),
@@ -610,8 +612,8 @@ class Builder extends BaseBuilder {
610
612
  return undefined;
611
613
  // NOTE: Node order is important and is defined here
612
614
  const node = {
613
- columns: ((_a = dataIn.columns) !== null && _a !== void 0 ? _a : []).map((col) => this.handleJsonText(context, true, col)),
614
- data: ((_b = dataIn.data) !== null && _b !== void 0 ? _b : []).map((row) => (row !== null && row !== void 0 ? row : []).map((cell) => this.handleJsonText(context, true, cell))),
615
+ columns: ((_a = dataIn.columns) !== null && _a !== void 0 ? _a : []).map((col) => this.handleJsonText(context, TextLocation.tag, col)),
616
+ data: ((_b = dataIn.data) !== null && _b !== void 0 ? _b : []).map((row) => (row !== null && row !== void 0 ? row : []).map((cell) => this.handleJsonText(context, TextLocation.tag, cell))),
615
617
  };
616
618
  // Remove Unset Optionals
617
619
  // ObjectUtils.removeUnwantedProperties(node, {
@@ -644,7 +646,7 @@ class Builder extends BaseBuilder {
644
646
  // Set default example
645
647
  const defaultExample = data.__sampleSolutionAst;
646
648
  // NOTE: Node order is important and is defined here
647
- const node = Object.assign(Object.assign({ question: (_a = data.question) !== null && _a !== void 0 ? _a : '', partialAnswer: (_b = data.partialAnswer) !== null && _b !== void 0 ? _b : '', sampleSolution: (_c = data.sampleSolution) !== null && _c !== void 0 ? _c : '', additionalSolutions: ((_d = data.additionalSolutions) !== null && _d !== void 0 ? _d : undefined), reasonableNumOfChars: ((_e = data.reasonableNumOfChars) !== null && _e !== void 0 ? _e : undefined), item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __sampleSolutionAst: data.__sampleSolutionAst });
649
+ const node = Object.assign(Object.assign({ question: (_a = data.question) !== null && _a !== void 0 ? _a : '', partialAnswer: (_b = data.partialAnswer) !== null && _b !== void 0 ? _b : '', sampleSolution: (_c = data.sampleSolution) !== null && _c !== void 0 ? _c : '', additionalSolutions: ((_d = data.additionalSolutions) !== null && _d !== void 0 ? _d : undefined), reasonableNumOfChars: ((_e = data.reasonableNumOfChars) !== null && _e !== void 0 ? _e : undefined), item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __sampleSolutionAst: data.__sampleSolutionAst });
648
650
  // Remove Unset Optionals
649
651
  ObjectUtils.removeUnwantedProperties(node, {
650
652
  ignoreAllFalse: true,
@@ -739,7 +741,7 @@ class Builder extends BaseBuilder {
739
741
  const placeholderNodes = {};
740
742
  // TODO - process body bits through the correct builders.
741
743
  if (StringUtils.isString(data.body)) {
742
- // Body is a string (legacy bitmark v2, or not bitmark--/++)
744
+ // Body is a string (legacy bitmark v2, or not bitmarkText)
743
745
  bodyStr = ((_a = data.body) !== null && _a !== void 0 ? _a : '').trim();
744
746
  rawBody = [];
745
747
  }
@@ -759,7 +761,7 @@ class Builder extends BaseBuilder {
759
761
  }
760
762
  }
761
763
  if (bodyStr) {
762
- // Bug #7141: Use textFormat for textParser, not always bitmark-- if it is a v2 string body
764
+ // Bug #7141: Use textFormat for textParser, not always bitmarkText if it is a v2 string body
763
765
  // However, only use plain text breakscaping the text from the v2 JSON body
764
766
  // Special v2 Breakscaping
765
767
  bodyStr = Breakscape.breakscape(bodyStr, {
@@ -781,7 +783,7 @@ class Builder extends BaseBuilder {
781
783
  // Convert the body string to AST
782
784
  rawBody = this.textParser.toAst(bodyStr, {
783
785
  textFormat,
784
- isProperty: false,
786
+ textLocation: TextLocation.body,
785
787
  });
786
788
  const replaceBitsRecursive = (bodyText) => {
787
789
  for (let i = 0, len = bodyText.length; i < len; i++) {
@@ -838,7 +840,7 @@ class Builder extends BaseBuilder {
838
840
  const handlePlainTextBody = () => {
839
841
  body = data.body;
840
842
  };
841
- const isBitmarkText = textFormat === TextFormat.bitmarkMinusMinus || textFormat === TextFormat.bitmarkPlusPlus;
843
+ const isBitmarkText = textFormat === TextFormat.bitmarkText;
842
844
  if (textFormat === TextFormat.json) {
843
845
  // JSON
844
846
  handleJsonBody();
@@ -869,7 +871,7 @@ class Builder extends BaseBuilder {
869
871
  if (!data)
870
872
  return undefined;
871
873
  const node = {
872
- footer: this.handleJsonText(context, false, data.footer),
874
+ footer: this.handleJsonText(context, TextLocation.body, data.footer),
873
875
  };
874
876
  return node;
875
877
  }
@@ -888,7 +890,7 @@ class Builder extends BaseBuilder {
888
890
  // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
889
891
  data = this.bodyBitCopyFromAttrs(data);
890
892
  // NOTE: Node order is important and is defined here
891
- const node = Object.assign(Object.assign({ type: BodyBitType.gap, solutions: (_a = data.solutions) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __solutionsAst: data.__solutionsAst, attrs: {} });
893
+ const node = Object.assign(Object.assign({ type: BodyBitType.gap, solutions: (_a = data.solutions) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __solutionsAst: data.__solutionsAst, attrs: {} });
892
894
  // Remove Unset Optionals
893
895
  ObjectUtils.removeUnwantedProperties(node, {
894
896
  ignoreAllFalse: true,
@@ -944,7 +946,7 @@ class Builder extends BaseBuilder {
944
946
  // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
945
947
  data = this.bodyBitCopyFromAttrs(data);
946
948
  // NOTE: Node order is important and is defined here
947
- const node = Object.assign(Object.assign({ type: BodyBitType.mark, solution: (_a = data.solution) !== null && _a !== void 0 ? _a : '', mark: (_b = data.mark) !== null && _b !== void 0 ? _b : '', item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true)), { attrs: {} });
949
+ const node = Object.assign(Object.assign({ type: BodyBitType.mark, solution: (_a = data.solution) !== null && _a !== void 0 ? _a : '', mark: (_b = data.mark) !== null && _b !== void 0 ? _b : '', item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true)), { attrs: {} });
948
950
  // Remove Unset Optionals
949
951
  ObjectUtils.removeUnwantedProperties(node, {
950
952
  ignoreAllFalse: true,
@@ -967,7 +969,7 @@ class Builder extends BaseBuilder {
967
969
  // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
968
970
  data = this.bodyBitCopyFromAttrs(data);
969
971
  // NOTE: Node order is important and is defined here
970
- const node = Object.assign(Object.assign({ type: BodyBitType.select, options: (_a = this.buildSelectOptions(context, data.options)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(false, undefined, undefined)), { __hintString: data.__hintString, __instructionString: data.__instructionString, attrs: {} });
972
+ const node = Object.assign(Object.assign({ type: BodyBitType.select, options: (_a = this.buildSelectOptions(context, data.options)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(false, undefined, undefined)), { __hintString: data.__hintString, __instructionString: data.__instructionString, attrs: {} });
971
973
  // Remove Unset Optionals
972
974
  ObjectUtils.removeUnwantedProperties(node, {
973
975
  ignoreAllFalse: true,
@@ -999,7 +1001,7 @@ class Builder extends BaseBuilder {
999
1001
  if (!data)
1000
1002
  return undefined;
1001
1003
  // NOTE: Node order is important and is defined here
1002
- const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1004
+ const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1003
1005
  // Remove Unset Optionals
1004
1006
  ObjectUtils.removeUnwantedProperties(node, {
1005
1007
  ignoreAllFalse: true,
@@ -1021,7 +1023,7 @@ class Builder extends BaseBuilder {
1021
1023
  // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
1022
1024
  data = this.bodyBitCopyFromAttrs(data);
1023
1025
  // NOTE: Node order is important and is defined here
1024
- const node = Object.assign(Object.assign({ type: BodyBitType.highlight, texts: (_a = this.buildHighlightTexts(context, data.texts)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(false, undefined, undefined)), { attrs: {} });
1026
+ const node = Object.assign(Object.assign({ type: BodyBitType.highlight, texts: (_a = this.buildHighlightTexts(context, data.texts)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(false, undefined, undefined)), { attrs: {} });
1025
1027
  // Remove Unset Optionals
1026
1028
  ObjectUtils.removeUnwantedProperties(node, {
1027
1029
  ignoreAllFalse: true,
@@ -1053,7 +1055,7 @@ class Builder extends BaseBuilder {
1053
1055
  if (!data)
1054
1056
  return undefined;
1055
1057
  // NOTE: Node order is important and is defined here
1056
- const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, isHighlighted: !!data.isHighlighted, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1058
+ const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, isHighlighted: !!data.isHighlighted, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1057
1059
  // Remove Unset Optionals
1058
1060
  ObjectUtils.removeUnwantedProperties(node, {
1059
1061
  ignoreAllFalse: true,
@@ -1087,7 +1089,7 @@ class Builder extends BaseBuilder {
1087
1089
  // NOTE: Node order is important and is defined here
1088
1090
  const node = Object.assign({ question: this.buildTextAndIcon(context, data.question), answer: this.buildTextAndIcon(context, data.answer), alternativeAnswers: ((_a = data.alternativeAnswers) !== null && _a !== void 0 ? _a : [])
1089
1091
  .map((d) => this.buildTextAndIcon(context, d))
1090
- .filter((d) => d != null), item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1092
+ .filter((d) => d != null), item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1091
1093
  // Remove Unset Optionals
1092
1094
  ObjectUtils.removeUnwantedProperties(node, {
1093
1095
  ignoreAllFalse: true,
@@ -1123,7 +1125,7 @@ class Builder extends BaseBuilder {
1123
1125
  // NOTE: Node order is important and is defined here
1124
1126
  const node = Object.assign({ term: this.buildTextAndIcon(context, data.term, textAsStrings), definition: this.buildTextAndIcon(context, data.definition, textAsStrings), alternativeDefinitions: ((_a = data.alternativeDefinitions) !== null && _a !== void 0 ? _a : [])
1125
1127
  .map((d) => this.buildTextAndIcon(context, d, textAsStrings))
1126
- .filter((d) => d != null), item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1128
+ .filter((d) => d != null), item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1127
1129
  // Remove Unset Optionals
1128
1130
  ObjectUtils.removeUnwantedProperties(node, {
1129
1131
  ignoreAllFalse: true,
@@ -1135,11 +1137,11 @@ class Builder extends BaseBuilder {
1135
1137
  buildTextAndIcon(context, data, textAsStrings = false) {
1136
1138
  const icon = this.resourceBuilder.resourceFromResourceJson(context, data === null || data === void 0 ? void 0 : data.icon);
1137
1139
  // Ensure text is bitmark text
1138
- let text = this.handleJsonText(context, true, data === null || data === void 0 ? void 0 : data.text);
1140
+ let text = this.handleJsonText(context, TextLocation.tag, data === null || data === void 0 ? void 0 : data.text);
1139
1141
  if (textAsStrings) {
1140
1142
  // Convert the bitmark text to plain text (without breakscaping, as that will happen in the Bitmark Generator)
1141
1143
  text = this.textGenerator
1142
- .generateSync(text, TextFormat.text, TextLocation.body, {
1144
+ .generateSync(text, TextFormat.plainText, TextLocation.body, {
1143
1145
  noBreakscaping: true,
1144
1146
  })
1145
1147
  .trim();
@@ -1179,7 +1181,7 @@ class Builder extends BaseBuilder {
1179
1181
  if (!data)
1180
1182
  return undefined;
1181
1183
  // NOTE: Node order is important and is defined here
1182
- const node = Object.assign({ statement: (_a = data.statement) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, true, data.item), lead: this.handleJsonText(context, true, data.lead), hint: this.handleJsonText(context, true, data.hint), instruction: this.handleJsonText(context, true, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1184
+ const node = Object.assign({ statement: (_a = data.statement) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1183
1185
  // Remove Unset Optionals
1184
1186
  ObjectUtils.removeUnwantedProperties(node, {
1185
1187
  ignoreAllFalse: true,
@@ -1299,7 +1301,7 @@ class Builder extends BaseBuilder {
1299
1301
  // NOTE: Node order is important and is defined here
1300
1302
  const node = {
1301
1303
  level: level !== null && level !== void 0 ? level : 0,
1302
- label: this.handleJsonText(context, true, label),
1304
+ label: this.handleJsonText(context, TextLocation.tag, label),
1303
1305
  };
1304
1306
  // Remove Unset Optionals
1305
1307
  ObjectUtils.removeUnwantedProperties(node, {