@gmb/bitmark-parser-generator 1.0.11

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 (1615) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +183 -0
  3. package/dist/browser/bitmark-parser-generator-antlr.min.js +2 -0
  4. package/dist/browser/bitmark-parser-generator-antlr.min.js.LICENSE.txt +22 -0
  5. package/dist/browser/bitmark-parser-generator.min.js +1 -0
  6. package/dist/browser/bundle-report.html +39 -0
  7. package/dist/cjs/BitmarkParserGenerator.js +470 -0
  8. package/dist/cjs/BitmarkParserGenerator.js.map +1 -0
  9. package/dist/cjs/ast/Ast.js +216 -0
  10. package/dist/cjs/ast/Ast.js.map +1 -0
  11. package/dist/cjs/ast/BaseBuilder.js +72 -0
  12. package/dist/cjs/ast/BaseBuilder.js.map +1 -0
  13. package/dist/cjs/ast/Builder.js +607 -0
  14. package/dist/cjs/ast/Builder.js.map +1 -0
  15. package/dist/cjs/ast/ResourceBuilder.js +629 -0
  16. package/dist/cjs/ast/ResourceBuilder.js.map +1 -0
  17. package/dist/cjs/ast/rules/NodeValidator.js +137 -0
  18. package/dist/cjs/ast/rules/NodeValidator.js.map +1 -0
  19. package/dist/cjs/ast/writer/FileWriter.js +109 -0
  20. package/dist/cjs/ast/writer/FileWriter.js.map +1 -0
  21. package/dist/cjs/ast/writer/StreamWriter.js +76 -0
  22. package/dist/cjs/ast/writer/StreamWriter.js.map +1 -0
  23. package/dist/cjs/ast/writer/StringWriter.js +102 -0
  24. package/dist/cjs/ast/writer/StringWriter.js.map +1 -0
  25. package/dist/cjs/ast/writer/Writer.js +3 -0
  26. package/dist/cjs/ast/writer/Writer.js.map +1 -0
  27. package/dist/cjs/config/bits/_errorBitConfig.js +10 -0
  28. package/dist/cjs/config/bits/_errorBitConfig.js.map +1 -0
  29. package/dist/cjs/config/bits/aiPromptBitConfig.js +12 -0
  30. package/dist/cjs/config/bits/aiPromptBitConfig.js.map +1 -0
  31. package/dist/cjs/config/bits/anchorBitConfig.js +11 -0
  32. package/dist/cjs/config/bits/anchorBitConfig.js.map +1 -0
  33. package/dist/cjs/config/bits/appLinkBitConfig.js +14 -0
  34. package/dist/cjs/config/bits/appLinkBitConfig.js.map +1 -0
  35. package/dist/cjs/config/bits/articleAiBitConfig.js +13 -0
  36. package/dist/cjs/config/bits/articleAiBitConfig.js.map +1 -0
  37. package/dist/cjs/config/bits/articleAttachmentBitConfig.js +12 -0
  38. package/dist/cjs/config/bits/articleAttachmentBitConfig.js.map +1 -0
  39. package/dist/cjs/config/bits/articleBitConfig.js +12 -0
  40. package/dist/cjs/config/bits/articleBitConfig.js.map +1 -0
  41. package/dist/cjs/config/bits/articleEmbedBitConfig.js +14 -0
  42. package/dist/cjs/config/bits/articleEmbedBitConfig.js.map +1 -0
  43. package/dist/cjs/config/bits/articleLinkBitConfig.js +14 -0
  44. package/dist/cjs/config/bits/articleLinkBitConfig.js.map +1 -0
  45. package/dist/cjs/config/bits/assignmentBitConfig.js +12 -0
  46. package/dist/cjs/config/bits/assignmentBitConfig.js.map +1 -0
  47. package/dist/cjs/config/bits/audioBitConfig.js +14 -0
  48. package/dist/cjs/config/bits/audioBitConfig.js.map +1 -0
  49. package/dist/cjs/config/bits/audioEmbedBitConfig.js +14 -0
  50. package/dist/cjs/config/bits/audioEmbedBitConfig.js.map +1 -0
  51. package/dist/cjs/config/bits/audioLinkBitConfig.js +14 -0
  52. package/dist/cjs/config/bits/audioLinkBitConfig.js.map +1 -0
  53. package/dist/cjs/config/bits/bitAliasBitConfig.js +12 -0
  54. package/dist/cjs/config/bits/bitAliasBitConfig.js.map +1 -0
  55. package/dist/cjs/config/bits/bitBookEndingBitConfig.js +11 -0
  56. package/dist/cjs/config/bits/bitBookEndingBitConfig.js.map +1 -0
  57. package/dist/cjs/config/bits/bitBookSummaryBitConfig.js +11 -0
  58. package/dist/cjs/config/bits/bitBookSummaryBitConfig.js.map +1 -0
  59. package/dist/cjs/config/bits/blogArticleBitConfig.js +12 -0
  60. package/dist/cjs/config/bits/blogArticleBitConfig.js.map +1 -0
  61. package/dist/cjs/config/bits/bookBitConfig.js +49 -0
  62. package/dist/cjs/config/bits/bookBitConfig.js.map +1 -0
  63. package/dist/cjs/config/bits/botActionAnnounceBitConfig.js +11 -0
  64. package/dist/cjs/config/bits/botActionAnnounceBitConfig.js.map +1 -0
  65. package/dist/cjs/config/bits/botActionRatingNumberBitConfig.js +11 -0
  66. package/dist/cjs/config/bits/botActionRatingNumberBitConfig.js.map +1 -0
  67. package/dist/cjs/config/bits/botActionRemindBitConfig.js +11 -0
  68. package/dist/cjs/config/bits/botActionRemindBitConfig.js.map +1 -0
  69. package/dist/cjs/config/bits/botActionResponseBitConfig.js +14 -0
  70. package/dist/cjs/config/bits/botActionResponseBitConfig.js.map +1 -0
  71. package/dist/cjs/config/bits/botActionSaveBitConfig.js +11 -0
  72. package/dist/cjs/config/bits/botActionSaveBitConfig.js.map +1 -0
  73. package/dist/cjs/config/bits/botActionSendBitConfig.js +12 -0
  74. package/dist/cjs/config/bits/botActionSendBitConfig.js.map +1 -0
  75. package/dist/cjs/config/bits/botActionTrueFalseBitConfig.js +11 -0
  76. package/dist/cjs/config/bits/botActionTrueFalseBitConfig.js.map +1 -0
  77. package/dist/cjs/config/bits/botInterviewBitConfig.js +11 -0
  78. package/dist/cjs/config/bits/botInterviewBitConfig.js.map +1 -0
  79. package/dist/cjs/config/bits/browserImageBitConfig.js +15 -0
  80. package/dist/cjs/config/bits/browserImageBitConfig.js.map +1 -0
  81. package/dist/cjs/config/bits/bugBitConfig.js +12 -0
  82. package/dist/cjs/config/bits/bugBitConfig.js.map +1 -0
  83. package/dist/cjs/config/bits/card1BitConfig.js +12 -0
  84. package/dist/cjs/config/bits/card1BitConfig.js.map +1 -0
  85. package/dist/cjs/config/bits/chapterBitConfig.js +12 -0
  86. package/dist/cjs/config/bits/chapterBitConfig.js.map +1 -0
  87. package/dist/cjs/config/bits/chapterSubjectMatterBitConfig.js +11 -0
  88. package/dist/cjs/config/bits/chapterSubjectMatterBitConfig.js.map +1 -0
  89. package/dist/cjs/config/bits/chatBitConfig.js +11 -0
  90. package/dist/cjs/config/bits/chatBitConfig.js.map +1 -0
  91. package/dist/cjs/config/bits/clozeAndMultipleChoiceTextBitConfig.js +13 -0
  92. package/dist/cjs/config/bits/clozeAndMultipleChoiceTextBitConfig.js.map +1 -0
  93. package/dist/cjs/config/bits/clozeBitConfig.js +13 -0
  94. package/dist/cjs/config/bits/clozeBitConfig.js.map +1 -0
  95. package/dist/cjs/config/bits/clozeInstructionGroupedBitConfig.js +13 -0
  96. package/dist/cjs/config/bits/clozeInstructionGroupedBitConfig.js.map +1 -0
  97. package/dist/cjs/config/bits/clozeSolutionGroupedBitConfig.js +13 -0
  98. package/dist/cjs/config/bits/clozeSolutionGroupedBitConfig.js.map +1 -0
  99. package/dist/cjs/config/bits/codeBitConfig.js +12 -0
  100. package/dist/cjs/config/bits/codeBitConfig.js.map +1 -0
  101. package/dist/cjs/config/bits/conclusionBitConfig.js +12 -0
  102. package/dist/cjs/config/bits/conclusionBitConfig.js.map +1 -0
  103. package/dist/cjs/config/bits/conversationBitConfig.js +19 -0
  104. package/dist/cjs/config/bits/conversationBitConfig.js.map +1 -0
  105. package/dist/cjs/config/bits/correctionBitConfig.js +12 -0
  106. package/dist/cjs/config/bits/correctionBitConfig.js.map +1 -0
  107. package/dist/cjs/config/bits/dangerBitConfig.js +12 -0
  108. package/dist/cjs/config/bits/dangerBitConfig.js.map +1 -0
  109. package/dist/cjs/config/bits/details1BitConfig.js +11 -0
  110. package/dist/cjs/config/bits/details1BitConfig.js.map +1 -0
  111. package/dist/cjs/config/bits/detailsBitConfig.js +12 -0
  112. package/dist/cjs/config/bits/detailsBitConfig.js.map +1 -0
  113. package/dist/cjs/config/bits/documentBitConfig.js +14 -0
  114. package/dist/cjs/config/bits/documentBitConfig.js.map +1 -0
  115. package/dist/cjs/config/bits/documentDownloadBitConfig.js +14 -0
  116. package/dist/cjs/config/bits/documentDownloadBitConfig.js.map +1 -0
  117. package/dist/cjs/config/bits/documentEmbedBitConfig.js +14 -0
  118. package/dist/cjs/config/bits/documentEmbedBitConfig.js.map +1 -0
  119. package/dist/cjs/config/bits/documentLinkBitConfig.js +14 -0
  120. package/dist/cjs/config/bits/documentLinkBitConfig.js.map +1 -0
  121. package/dist/cjs/config/bits/documentUploadBitConfig.js +11 -0
  122. package/dist/cjs/config/bits/documentUploadBitConfig.js.map +1 -0
  123. package/dist/cjs/config/bits/editorialBitConfig.js +12 -0
  124. package/dist/cjs/config/bits/editorialBitConfig.js.map +1 -0
  125. package/dist/cjs/config/bits/essayBitConfig.js +13 -0
  126. package/dist/cjs/config/bits/essayBitConfig.js.map +1 -0
  127. package/dist/cjs/config/bits/exampleBitConfig.js +12 -0
  128. package/dist/cjs/config/bits/exampleBitConfig.js.map +1 -0
  129. package/dist/cjs/config/bits/featuredBitConfig.js +12 -0
  130. package/dist/cjs/config/bits/featuredBitConfig.js.map +1 -0
  131. package/dist/cjs/config/bits/flashcard1BitConfig.js +11 -0
  132. package/dist/cjs/config/bits/flashcard1BitConfig.js.map +1 -0
  133. package/dist/cjs/config/bits/flashcardBitConfig.js +11 -0
  134. package/dist/cjs/config/bits/flashcardBitConfig.js.map +1 -0
  135. package/dist/cjs/config/bits/focusImageBitConfig.js +15 -0
  136. package/dist/cjs/config/bits/focusImageBitConfig.js.map +1 -0
  137. package/dist/cjs/config/bits/footNoteBitConfig.js +12 -0
  138. package/dist/cjs/config/bits/footNoteBitConfig.js.map +1 -0
  139. package/dist/cjs/config/bits/generic/cardSetBitConfigs.js +138 -0
  140. package/dist/cjs/config/bits/generic/cardSetBitConfigs.js.map +1 -0
  141. package/dist/cjs/config/bits/generic/chainBitConfigs.js +47 -0
  142. package/dist/cjs/config/bits/generic/chainBitConfigs.js.map +1 -0
  143. package/dist/cjs/config/bits/generic/resourceChainBitConfigs.js +197 -0
  144. package/dist/cjs/config/bits/generic/resourceChainBitConfigs.js.map +1 -0
  145. package/dist/cjs/config/bits/generic/standardBitConfigs.js +46 -0
  146. package/dist/cjs/config/bits/generic/standardBitConfigs.js.map +1 -0
  147. package/dist/cjs/config/bits/groupBornBitConfig.js +11 -0
  148. package/dist/cjs/config/bits/groupBornBitConfig.js.map +1 -0
  149. package/dist/cjs/config/bits/groupDiedBitConfig.js +11 -0
  150. package/dist/cjs/config/bits/groupDiedBitConfig.js.map +1 -0
  151. package/dist/cjs/config/bits/helpBitConfig.js +12 -0
  152. package/dist/cjs/config/bits/helpBitConfig.js.map +1 -0
  153. package/dist/cjs/config/bits/highlightTextBitConfig.js +13 -0
  154. package/dist/cjs/config/bits/highlightTextBitConfig.js.map +1 -0
  155. package/dist/cjs/config/bits/hintBitConfig.js +12 -0
  156. package/dist/cjs/config/bits/hintBitConfig.js.map +1 -0
  157. package/dist/cjs/config/bits/imageBitConfig.js +14 -0
  158. package/dist/cjs/config/bits/imageBitConfig.js.map +1 -0
  159. package/dist/cjs/config/bits/imageLinkBitConfig.js +14 -0
  160. package/dist/cjs/config/bits/imageLinkBitConfig.js.map +1 -0
  161. package/dist/cjs/config/bits/imagePrototypeBitConfig.js +14 -0
  162. package/dist/cjs/config/bits/imagePrototypeBitConfig.js.map +1 -0
  163. package/dist/cjs/config/bits/imageSuperWideBitConfig.js +14 -0
  164. package/dist/cjs/config/bits/imageSuperWideBitConfig.js.map +1 -0
  165. package/dist/cjs/config/bits/imageZoomBitConfig.js +14 -0
  166. package/dist/cjs/config/bits/imageZoomBitConfig.js.map +1 -0
  167. package/dist/cjs/config/bits/infoBitConfig.js +12 -0
  168. package/dist/cjs/config/bits/infoBitConfig.js.map +1 -0
  169. package/dist/cjs/config/bits/internalLinkBitConfig.js +12 -0
  170. package/dist/cjs/config/bits/internalLinkBitConfig.js.map +1 -0
  171. package/dist/cjs/config/bits/interviewBitConfig.js +15 -0
  172. package/dist/cjs/config/bits/interviewBitConfig.js.map +1 -0
  173. package/dist/cjs/config/bits/interviewInstructionGroupedBitConfig.js +15 -0
  174. package/dist/cjs/config/bits/interviewInstructionGroupedBitConfig.js.map +1 -0
  175. package/dist/cjs/config/bits/learningPathBitConfig.js +87 -0
  176. package/dist/cjs/config/bits/learningPathBitConfig.js.map +1 -0
  177. package/dist/cjs/config/bits/markBitConfig.js +12 -0
  178. package/dist/cjs/config/bits/markBitConfig.js.map +1 -0
  179. package/dist/cjs/config/bits/matchBitConfig.js +64 -0
  180. package/dist/cjs/config/bits/matchBitConfig.js.map +1 -0
  181. package/dist/cjs/config/bits/messageBitConfig.js +12 -0
  182. package/dist/cjs/config/bits/messageBitConfig.js.map +1 -0
  183. package/dist/cjs/config/bits/multipleChoice1BitConfig.js +13 -0
  184. package/dist/cjs/config/bits/multipleChoice1BitConfig.js.map +1 -0
  185. package/dist/cjs/config/bits/multipleChoiceBitConfig.js +16 -0
  186. package/dist/cjs/config/bits/multipleChoiceBitConfig.js.map +1 -0
  187. package/dist/cjs/config/bits/multipleChoiceTextBitConfig.js +13 -0
  188. package/dist/cjs/config/bits/multipleChoiceTextBitConfig.js.map +1 -0
  189. package/dist/cjs/config/bits/multipleResponse1BitConfig.js +13 -0
  190. package/dist/cjs/config/bits/multipleResponse1BitConfig.js.map +1 -0
  191. package/dist/cjs/config/bits/multipleResponseBitConfig.js +16 -0
  192. package/dist/cjs/config/bits/multipleResponseBitConfig.js.map +1 -0
  193. package/dist/cjs/config/bits/newspaperArticleBitConfig.js +12 -0
  194. package/dist/cjs/config/bits/newspaperArticleBitConfig.js.map +1 -0
  195. package/dist/cjs/config/bits/noteAiBitConfig.js +13 -0
  196. package/dist/cjs/config/bits/noteAiBitConfig.js.map +1 -0
  197. package/dist/cjs/config/bits/noteBitConfig.js +12 -0
  198. package/dist/cjs/config/bits/noteBitConfig.js.map +1 -0
  199. package/dist/cjs/config/bits/notebookArticleBitConfig.js +12 -0
  200. package/dist/cjs/config/bits/notebookArticleBitConfig.js.map +1 -0
  201. package/dist/cjs/config/bits/pageBitConfig.js +12 -0
  202. package/dist/cjs/config/bits/pageBitConfig.js.map +1 -0
  203. package/dist/cjs/config/bits/photoBitConfig.js +14 -0
  204. package/dist/cjs/config/bits/photoBitConfig.js.map +1 -0
  205. package/dist/cjs/config/bits/preparationNoteBitConfig.js +12 -0
  206. package/dist/cjs/config/bits/preparationNoteBitConfig.js.map +1 -0
  207. package/dist/cjs/config/bits/question1BitConfig.js +12 -0
  208. package/dist/cjs/config/bits/question1BitConfig.js.map +1 -0
  209. package/dist/cjs/config/bits/quoteBitConfig.js +12 -0
  210. package/dist/cjs/config/bits/quoteBitConfig.js.map +1 -0
  211. package/dist/cjs/config/bits/ratingBitConfig.js +11 -0
  212. package/dist/cjs/config/bits/ratingBitConfig.js.map +1 -0
  213. package/dist/cjs/config/bits/recordAudioBitConfig.js +11 -0
  214. package/dist/cjs/config/bits/recordAudioBitConfig.js.map +1 -0
  215. package/dist/cjs/config/bits/releaseNoteBitConfig.js +13 -0
  216. package/dist/cjs/config/bits/releaseNoteBitConfig.js.map +1 -0
  217. package/dist/cjs/config/bits/releaseNotesSummaryBitConfig.js +12 -0
  218. package/dist/cjs/config/bits/releaseNotesSummaryBitConfig.js.map +1 -0
  219. package/dist/cjs/config/bits/remarkBitConfig.js +12 -0
  220. package/dist/cjs/config/bits/remarkBitConfig.js.map +1 -0
  221. package/dist/cjs/config/bits/sampleSolutionBitConfig.js +15 -0
  222. package/dist/cjs/config/bits/sampleSolutionBitConfig.js.map +1 -0
  223. package/dist/cjs/config/bits/screenshotBitConfig.js +14 -0
  224. package/dist/cjs/config/bits/screenshotBitConfig.js.map +1 -0
  225. package/dist/cjs/config/bits/selfAssessmentBitConfig.js +12 -0
  226. package/dist/cjs/config/bits/selfAssessmentBitConfig.js.map +1 -0
  227. package/dist/cjs/config/bits/sequenceBitConfig.js +15 -0
  228. package/dist/cjs/config/bits/sequenceBitConfig.js.map +1 -0
  229. package/dist/cjs/config/bits/sideNoteBitConfig.js +12 -0
  230. package/dist/cjs/config/bits/sideNoteBitConfig.js.map +1 -0
  231. package/dist/cjs/config/bits/statementBitConfig.js +12 -0
  232. package/dist/cjs/config/bits/statementBitConfig.js.map +1 -0
  233. package/dist/cjs/config/bits/stickyNoteBitConfig.js +12 -0
  234. package/dist/cjs/config/bits/stickyNoteBitConfig.js.map +1 -0
  235. package/dist/cjs/config/bits/stillImageFilmBitConfig.js +14 -0
  236. package/dist/cjs/config/bits/stillImageFilmBitConfig.js.map +1 -0
  237. package/dist/cjs/config/bits/stillImageFilmEmbedBitConfig.js +14 -0
  238. package/dist/cjs/config/bits/stillImageFilmEmbedBitConfig.js.map +1 -0
  239. package/dist/cjs/config/bits/stillImageFilmLinkBitConfig.js +14 -0
  240. package/dist/cjs/config/bits/stillImageFilmLinkBitConfig.js.map +1 -0
  241. package/dist/cjs/config/bits/summaryAiBitConfig.js +13 -0
  242. package/dist/cjs/config/bits/summaryAiBitConfig.js.map +1 -0
  243. package/dist/cjs/config/bits/summaryBitConfig.js +13 -0
  244. package/dist/cjs/config/bits/summaryBitConfig.js.map +1 -0
  245. package/dist/cjs/config/bits/survey1BitConfig.js +12 -0
  246. package/dist/cjs/config/bits/survey1BitConfig.js.map +1 -0
  247. package/dist/cjs/config/bits/surveyAnonymous1BitConfig.js +12 -0
  248. package/dist/cjs/config/bits/surveyAnonymous1BitConfig.js.map +1 -0
  249. package/dist/cjs/config/bits/surveyAnonymousBitConfig.js +12 -0
  250. package/dist/cjs/config/bits/surveyAnonymousBitConfig.js.map +1 -0
  251. package/dist/cjs/config/bits/surveyBitConfig.js +12 -0
  252. package/dist/cjs/config/bits/surveyBitConfig.js.map +1 -0
  253. package/dist/cjs/config/bits/takePictureBitConfig.js +11 -0
  254. package/dist/cjs/config/bits/takePictureBitConfig.js.map +1 -0
  255. package/dist/cjs/config/bits/tocBitConfig.js +11 -0
  256. package/dist/cjs/config/bits/tocBitConfig.js.map +1 -0
  257. package/dist/cjs/config/bits/trueFalse1BitConfig.js +14 -0
  258. package/dist/cjs/config/bits/trueFalse1BitConfig.js.map +1 -0
  259. package/dist/cjs/config/bits/trueFalseBitConfig.js +16 -0
  260. package/dist/cjs/config/bits/trueFalseBitConfig.js.map +1 -0
  261. package/dist/cjs/config/bits/vendorPadletEmbedBitConfig.js +12 -0
  262. package/dist/cjs/config/bits/vendorPadletEmbedBitConfig.js.map +1 -0
  263. package/dist/cjs/config/bits/videoBitConfig.js +14 -0
  264. package/dist/cjs/config/bits/videoBitConfig.js.map +1 -0
  265. package/dist/cjs/config/bits/videoEmbedBitConfig.js +14 -0
  266. package/dist/cjs/config/bits/videoEmbedBitConfig.js.map +1 -0
  267. package/dist/cjs/config/bits/videoLandscapeBitConfig.js +14 -0
  268. package/dist/cjs/config/bits/videoLandscapeBitConfig.js.map +1 -0
  269. package/dist/cjs/config/bits/videoLinkBitConfig.js +14 -0
  270. package/dist/cjs/config/bits/videoLinkBitConfig.js.map +1 -0
  271. package/dist/cjs/config/bits/videoPortraitBitConfig.js +14 -0
  272. package/dist/cjs/config/bits/videoPortraitBitConfig.js.map +1 -0
  273. package/dist/cjs/config/bits/warningBitConfig.js +12 -0
  274. package/dist/cjs/config/bits/warningBitConfig.js.map +1 -0
  275. package/dist/cjs/config/bits/websiteLinkBitConfig.js +14 -0
  276. package/dist/cjs/config/bits/websiteLinkBitConfig.js.map +1 -0
  277. package/dist/cjs/config/bits/workbookArticleBitConfig.js +12 -0
  278. package/dist/cjs/config/bits/workbookArticleBitConfig.js.map +1 -0
  279. package/dist/cjs/config/config.js +177 -0
  280. package/dist/cjs/config/config.js.map +1 -0
  281. package/dist/cjs/config/properties/actionPropertyConfig.js +9 -0
  282. package/dist/cjs/config/properties/actionPropertyConfig.js.map +1 -0
  283. package/dist/cjs/config/properties/ageRangePropertyConfig.js +8 -0
  284. package/dist/cjs/config/properties/ageRangePropertyConfig.js.map +1 -0
  285. package/dist/cjs/config/properties/aiGeneratedPropertyConfig.js +11 -0
  286. package/dist/cjs/config/properties/aiGeneratedPropertyConfig.js.map +1 -0
  287. package/dist/cjs/config/properties/authorPropertyConfig.js +8 -0
  288. package/dist/cjs/config/properties/authorPropertyConfig.js.map +1 -0
  289. package/dist/cjs/config/properties/bookPropertyConfig.js +9 -0
  290. package/dist/cjs/config/properties/bookPropertyConfig.js.map +1 -0
  291. package/dist/cjs/config/properties/botPropertyConfig.js +8 -0
  292. package/dist/cjs/config/properties/botPropertyConfig.js.map +1 -0
  293. package/dist/cjs/config/properties/caseSensitivePropertyConfig.js +11 -0
  294. package/dist/cjs/config/properties/caseSensitivePropertyConfig.js.map +1 -0
  295. package/dist/cjs/config/properties/computerLanguagePropertyConfig.js +9 -0
  296. package/dist/cjs/config/properties/computerLanguagePropertyConfig.js.map +1 -0
  297. package/dist/cjs/config/properties/coverImagePropertyConfig.js +8 -0
  298. package/dist/cjs/config/properties/coverImagePropertyConfig.js.map +1 -0
  299. package/dist/cjs/config/properties/datePropertyConfig.js +8 -0
  300. package/dist/cjs/config/properties/datePropertyConfig.js.map +1 -0
  301. package/dist/cjs/config/properties/deeplinkPropertyConfig.js +8 -0
  302. package/dist/cjs/config/properties/deeplinkPropertyConfig.js.map +1 -0
  303. package/dist/cjs/config/properties/durationPropertyConfig.js +9 -0
  304. package/dist/cjs/config/properties/durationPropertyConfig.js.map +1 -0
  305. package/dist/cjs/config/properties/examplePropertyConfig.js +9 -0
  306. package/dist/cjs/config/properties/examplePropertyConfig.js.map +1 -0
  307. package/dist/cjs/config/properties/externalIdPropertyConfig.js +8 -0
  308. package/dist/cjs/config/properties/externalIdPropertyConfig.js.map +1 -0
  309. package/dist/cjs/config/properties/externalLinkPropertyConfig.js +9 -0
  310. package/dist/cjs/config/properties/externalLinkPropertyConfig.js.map +1 -0
  311. package/dist/cjs/config/properties/externalLinkTextPropertyConfig.js +9 -0
  312. package/dist/cjs/config/properties/externalLinkTextPropertyConfig.js.map +1 -0
  313. package/dist/cjs/config/properties/focusXPropertyConfig.js +9 -0
  314. package/dist/cjs/config/properties/focusXPropertyConfig.js.map +1 -0
  315. package/dist/cjs/config/properties/focusYPropertyConfig.js +9 -0
  316. package/dist/cjs/config/properties/focusYPropertyConfig.js.map +1 -0
  317. package/dist/cjs/config/properties/idPropertyConfig.js +8 -0
  318. package/dist/cjs/config/properties/idPropertyConfig.js.map +1 -0
  319. package/dist/cjs/config/properties/isInfoOnlyPropertyConfig.js +9 -0
  320. package/dist/cjs/config/properties/isInfoOnlyPropertyConfig.js.map +1 -0
  321. package/dist/cjs/config/properties/isTrackedPropertyConfig.js +9 -0
  322. package/dist/cjs/config/properties/isTrackedPropertyConfig.js.map +1 -0
  323. package/dist/cjs/config/properties/kindPropertyConfig.js +9 -0
  324. package/dist/cjs/config/properties/kindPropertyConfig.js.map +1 -0
  325. package/dist/cjs/config/properties/labelFalsePropertyConfig.js +9 -0
  326. package/dist/cjs/config/properties/labelFalsePropertyConfig.js.map +1 -0
  327. package/dist/cjs/config/properties/labelTruePropertyConfig.js +9 -0
  328. package/dist/cjs/config/properties/labelTruePropertyConfig.js.map +1 -0
  329. package/dist/cjs/config/properties/languagePropertyConfig.js +8 -0
  330. package/dist/cjs/config/properties/languagePropertyConfig.js.map +1 -0
  331. package/dist/cjs/config/properties/levelPropertyConfig.js +9 -0
  332. package/dist/cjs/config/properties/levelPropertyConfig.js.map +1 -0
  333. package/dist/cjs/config/properties/listPropertyConfig.js +8 -0
  334. package/dist/cjs/config/properties/listPropertyConfig.js.map +1 -0
  335. package/dist/cjs/config/properties/locationPropertyConfig.js +9 -0
  336. package/dist/cjs/config/properties/locationPropertyConfig.js.map +1 -0
  337. package/dist/cjs/config/properties/longAnswerPropertyConfig.js +11 -0
  338. package/dist/cjs/config/properties/longAnswerPropertyConfig.js.map +1 -0
  339. package/dist/cjs/config/properties/padletIdPropertyConfig.js +9 -0
  340. package/dist/cjs/config/properties/padletIdPropertyConfig.js.map +1 -0
  341. package/dist/cjs/config/properties/partialAnswerPropertyConfig.js +9 -0
  342. package/dist/cjs/config/properties/partialAnswerPropertyConfig.js.map +1 -0
  343. package/dist/cjs/config/properties/partnerPropertyConfig.js +9 -0
  344. package/dist/cjs/config/properties/partnerPropertyConfig.js.map +1 -0
  345. package/dist/cjs/config/properties/progressPropertyConfig.js +10 -0
  346. package/dist/cjs/config/properties/progressPropertyConfig.js.map +1 -0
  347. package/dist/cjs/config/properties/publicationsPropertyConfig.js +8 -0
  348. package/dist/cjs/config/properties/publicationsPropertyConfig.js.map +1 -0
  349. package/dist/cjs/config/properties/publisherPropertyConfig.js +8 -0
  350. package/dist/cjs/config/properties/publisherPropertyConfig.js.map +1 -0
  351. package/dist/cjs/config/properties/quotedPersonPropertyConfig.js +9 -0
  352. package/dist/cjs/config/properties/quotedPersonPropertyConfig.js.map +1 -0
  353. package/dist/cjs/config/properties/reactionPropertyConfig.js +9 -0
  354. package/dist/cjs/config/properties/reactionPropertyConfig.js.map +1 -0
  355. package/dist/cjs/config/properties/referencePropertyConfig.js +10 -0
  356. package/dist/cjs/config/properties/referencePropertyConfig.js.map +1 -0
  357. package/dist/cjs/config/properties/releaseVersionPropertyConfig.js +9 -0
  358. package/dist/cjs/config/properties/releaseVersionPropertyConfig.js.map +1 -0
  359. package/dist/cjs/config/properties/resourcePropertyConfig.js +78 -0
  360. package/dist/cjs/config/properties/resourcePropertyConfig.js.map +1 -0
  361. package/dist/cjs/config/properties/sampleSolutionPropertyConfig.js +9 -0
  362. package/dist/cjs/config/properties/sampleSolutionPropertyConfig.js.map +1 -0
  363. package/dist/cjs/config/properties/shortAnswerPropertyConfig.js +11 -0
  364. package/dist/cjs/config/properties/shortAnswerPropertyConfig.js.map +1 -0
  365. package/dist/cjs/config/properties/spaceIdPropertyConfig.js +8 -0
  366. package/dist/cjs/config/properties/spaceIdPropertyConfig.js.map +1 -0
  367. package/dist/cjs/config/properties/subjectPropertyConfig.js +8 -0
  368. package/dist/cjs/config/properties/subjectPropertyConfig.js.map +1 -0
  369. package/dist/cjs/config/properties/subtypePropertyConfig.js +9 -0
  370. package/dist/cjs/config/properties/subtypePropertyConfig.js.map +1 -0
  371. package/dist/cjs/config/properties/textReferencePropertyConfig.js +9 -0
  372. package/dist/cjs/config/properties/textReferencePropertyConfig.js.map +1 -0
  373. package/dist/cjs/config/properties/themePropertyConfig.js +8 -0
  374. package/dist/cjs/config/properties/themePropertyConfig.js.map +1 -0
  375. package/dist/cjs/config/properties/thumbImagePropertyConfig.js +9 -0
  376. package/dist/cjs/config/properties/thumbImagePropertyConfig.js.map +1 -0
  377. package/dist/cjs/config/properties/tocPropertyConfig.js +10 -0
  378. package/dist/cjs/config/properties/tocPropertyConfig.js.map +1 -0
  379. package/dist/cjs/config/properties/videoCallLinkPropertyConfig copy.js +9 -0
  380. package/dist/cjs/config/properties/videoCallLinkPropertyConfig copy.js.map +1 -0
  381. package/dist/cjs/config/properties/videoCallLinkPropertyConfig.js +9 -0
  382. package/dist/cjs/config/properties/videoCallLinkPropertyConfig.js.map +1 -0
  383. package/dist/cjs/generated/build-info.js +10 -0
  384. package/dist/cjs/generated/build-info.js.map +1 -0
  385. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +3429 -0
  386. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -0
  387. package/dist/cjs/generated/parser/text/text-peggy-parser.js +6897 -0
  388. package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +1 -0
  389. package/dist/cjs/generator/Generator.js +3 -0
  390. package/dist/cjs/generator/Generator.js.map +1 -0
  391. package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js +49 -0
  392. package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js.map +1 -0
  393. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +1202 -0
  394. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -0
  395. package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js +51 -0
  396. package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js.map +1 -0
  397. package/dist/cjs/generator/json/JsonFileGenerator.js +53 -0
  398. package/dist/cjs/generator/json/JsonFileGenerator.js.map +1 -0
  399. package/dist/cjs/generator/json/JsonGenerator.js +2049 -0
  400. package/dist/cjs/generator/json/JsonGenerator.js.map +1 -0
  401. package/dist/cjs/generator/json/JsonObjectGenerator.js +51 -0
  402. package/dist/cjs/generator/json/JsonObjectGenerator.js.map +1 -0
  403. package/dist/cjs/generator/json/JsonStringGenerator.js +50 -0
  404. package/dist/cjs/generator/json/JsonStringGenerator.js.map +1 -0
  405. package/dist/cjs/generator/text/TextGenerator.js +663 -0
  406. package/dist/cjs/generator/text/TextGenerator.js.map +1 -0
  407. package/dist/cjs/index.js +66 -0
  408. package/dist/cjs/index.js.map +1 -0
  409. package/dist/cjs/init/init.js +16 -0
  410. package/dist/cjs/init/init.js.map +1 -0
  411. package/dist/cjs/model/ast/NodeType.js +238 -0
  412. package/dist/cjs/model/ast/NodeType.js.map +1 -0
  413. package/dist/cjs/model/ast/Nodes.js +3 -0
  414. package/dist/cjs/model/ast/Nodes.js.map +1 -0
  415. package/dist/cjs/model/ast/TextNodes.js +3 -0
  416. package/dist/cjs/model/ast/TextNodes.js.map +1 -0
  417. package/dist/cjs/model/config/TagData.js +6 -0
  418. package/dist/cjs/model/config/TagData.js.map +1 -0
  419. package/dist/cjs/model/enum/BitType.js +185 -0
  420. package/dist/cjs/model/enum/BitType.js.map +1 -0
  421. package/dist/cjs/model/enum/BitmarkGeneratorOutput.js +2 -0
  422. package/dist/cjs/model/enum/BitmarkGeneratorOutput.js.map +1 -0
  423. package/dist/cjs/model/enum/BitmarkParserType.js +10 -0
  424. package/dist/cjs/model/enum/BitmarkParserType.js.map +1 -0
  425. package/dist/cjs/model/enum/BitmarkVersion.js +12 -0
  426. package/dist/cjs/model/enum/BitmarkVersion.js.map +1 -0
  427. package/dist/cjs/model/enum/BodyBitType.js +13 -0
  428. package/dist/cjs/model/enum/BodyBitType.js.map +1 -0
  429. package/dist/cjs/model/enum/CardSetType.js +15 -0
  430. package/dist/cjs/model/enum/CardSetType.js.map +1 -0
  431. package/dist/cjs/model/enum/CardSetVersion.js +10 -0
  432. package/dist/cjs/model/enum/CardSetVersion.js.map +1 -0
  433. package/dist/cjs/model/enum/PropertyKey.js +76 -0
  434. package/dist/cjs/model/enum/PropertyKey.js.map +1 -0
  435. package/dist/cjs/model/enum/ResourceType.js +31 -0
  436. package/dist/cjs/model/enum/ResourceType.js.map +1 -0
  437. package/dist/cjs/model/enum/TagType.js +22 -0
  438. package/dist/cjs/model/enum/TagType.js.map +1 -0
  439. package/dist/cjs/model/enum/TextFormat.js +11 -0
  440. package/dist/cjs/model/enum/TextFormat.js.map +1 -0
  441. package/dist/cjs/model/enum/TextMarkType.js +25 -0
  442. package/dist/cjs/model/enum/TextMarkType.js.map +1 -0
  443. package/dist/cjs/model/enum/TextNodeType.js +26 -0
  444. package/dist/cjs/model/enum/TextNodeType.js.map +1 -0
  445. package/dist/cjs/model/enum/TextSection.js +18 -0
  446. package/dist/cjs/model/enum/TextSection.js.map +1 -0
  447. package/dist/cjs/model/json/BitJson.js +3 -0
  448. package/dist/cjs/model/json/BitJson.js.map +1 -0
  449. package/dist/cjs/model/json/BitWrapperJson.js +3 -0
  450. package/dist/cjs/model/json/BitWrapperJson.js.map +1 -0
  451. package/dist/cjs/model/json/BodyBitJson.js +3 -0
  452. package/dist/cjs/model/json/BodyBitJson.js.map +1 -0
  453. package/dist/cjs/model/json/ParserJson.js +3 -0
  454. package/dist/cjs/model/json/ParserJson.js.map +1 -0
  455. package/dist/cjs/model/json/ResourceJson.js +3 -0
  456. package/dist/cjs/model/json/ResourceJson.js.map +1 -0
  457. package/dist/cjs/model/parser/ParserData.js +3 -0
  458. package/dist/cjs/model/parser/ParserData.js.map +1 -0
  459. package/dist/cjs/model/parser/ParserError.js +3 -0
  460. package/dist/cjs/model/parser/ParserError.js.map +1 -0
  461. package/dist/cjs/model/parser/ParserInfo.js +3 -0
  462. package/dist/cjs/model/parser/ParserInfo.js.map +1 -0
  463. package/dist/cjs/model/parser/ParserLocation.js +3 -0
  464. package/dist/cjs/model/parser/ParserLocation.js.map +1 -0
  465. package/dist/cjs/model/parser/ParserLocationRange.js +3 -0
  466. package/dist/cjs/model/parser/ParserLocationRange.js.map +1 -0
  467. package/dist/cjs/parser/bitmark/BitmarkParser.js +67 -0
  468. package/dist/cjs/parser/bitmark/BitmarkParser.js.map +1 -0
  469. package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js +7 -0
  470. package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js.map +1 -0
  471. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +533 -0
  472. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -0
  473. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +575 -0
  474. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -0
  475. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +64 -0
  476. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -0
  477. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +610 -0
  478. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -0
  479. package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js +82 -0
  480. package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js.map +1 -0
  481. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +35 -0
  482. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -0
  483. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +405 -0
  484. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -0
  485. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +16 -0
  486. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -0
  487. package/dist/cjs/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js +19 -0
  488. package/dist/cjs/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js.map +1 -0
  489. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +35 -0
  490. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -0
  491. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +42 -0
  492. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -0
  493. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +16 -0
  494. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -0
  495. package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +51 -0
  496. package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -0
  497. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +63 -0
  498. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -0
  499. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +16 -0
  500. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -0
  501. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +115 -0
  502. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -0
  503. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +42 -0
  504. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -0
  505. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +177 -0
  506. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -0
  507. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +18 -0
  508. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -0
  509. package/dist/cjs/parser/json/JsonParser.js +592 -0
  510. package/dist/cjs/parser/json/JsonParser.js.map +1 -0
  511. package/dist/cjs/parser/text/TextParser.js +33 -0
  512. package/dist/cjs/parser/text/TextParser.js.map +1 -0
  513. package/dist/cjs/parser/text/peg/TextPegParser.js +7 -0
  514. package/dist/cjs/parser/text/peg/TextPegParser.js.map +1 -0
  515. package/dist/cjs/utils/ArrayUtils.js +43 -0
  516. package/dist/cjs/utils/ArrayUtils.js.map +1 -0
  517. package/dist/cjs/utils/BitUtils.js +34 -0
  518. package/dist/cjs/utils/BitUtils.js.map +1 -0
  519. package/dist/cjs/utils/BooleanUtils.js +62 -0
  520. package/dist/cjs/utils/BooleanUtils.js.map +1 -0
  521. package/dist/cjs/utils/FileUtils.js +65 -0
  522. package/dist/cjs/utils/FileUtils.js.map +1 -0
  523. package/dist/cjs/utils/NumberUtils.js +26 -0
  524. package/dist/cjs/utils/NumberUtils.js.map +1 -0
  525. package/dist/cjs/utils/ObjectUtils.js +203 -0
  526. package/dist/cjs/utils/ObjectUtils.js.map +1 -0
  527. package/dist/cjs/utils/StringUtils.js +134 -0
  528. package/dist/cjs/utils/StringUtils.js.map +1 -0
  529. package/dist/cjs/utils/UrlUtils.js +37 -0
  530. package/dist/cjs/utils/UrlUtils.js.map +1 -0
  531. package/dist/cjs/utils/env/Env.js +131 -0
  532. package/dist/cjs/utils/env/Env.js.map +1 -0
  533. package/dist/cjs/utils/env/Environment.js +15 -0
  534. package/dist/cjs/utils/env/Environment.js.map +1 -0
  535. package/dist/cjs/utils/env/Os.js +14 -0
  536. package/dist/cjs/utils/env/Os.js.map +1 -0
  537. package/dist/cjs/utils/env/Version.js +12 -0
  538. package/dist/cjs/utils/env/Version.js.map +1 -0
  539. package/dist/cjs/utils/env/userAgent.js +89 -0
  540. package/dist/cjs/utils/env/userAgent.js.map +1 -0
  541. package/dist/cjs/utils/polyfill/fs.js +15 -0
  542. package/dist/cjs/utils/polyfill/fs.js.map +1 -0
  543. package/dist/esm/BitmarkParserGenerator.js +440 -0
  544. package/dist/esm/BitmarkParserGenerator.js.map +1 -0
  545. package/dist/esm/ast/Ast.js +213 -0
  546. package/dist/esm/ast/Ast.js.map +1 -0
  547. package/dist/esm/ast/BaseBuilder.js +69 -0
  548. package/dist/esm/ast/BaseBuilder.js.map +1 -0
  549. package/dist/esm/ast/Builder.js +604 -0
  550. package/dist/esm/ast/Builder.js.map +1 -0
  551. package/dist/esm/ast/ResourceBuilder.js +626 -0
  552. package/dist/esm/ast/ResourceBuilder.js.map +1 -0
  553. package/dist/esm/ast/rules/NodeValidator.js +134 -0
  554. package/dist/esm/ast/rules/NodeValidator.js.map +1 -0
  555. package/dist/esm/ast/writer/FileWriter.js +80 -0
  556. package/dist/esm/ast/writer/FileWriter.js.map +1 -0
  557. package/dist/esm/ast/writer/StreamWriter.js +70 -0
  558. package/dist/esm/ast/writer/StreamWriter.js.map +1 -0
  559. package/dist/esm/ast/writer/StringWriter.js +99 -0
  560. package/dist/esm/ast/writer/StringWriter.js.map +1 -0
  561. package/dist/esm/ast/writer/Writer.js +2 -0
  562. package/dist/esm/ast/writer/Writer.js.map +1 -0
  563. package/dist/esm/config/bits/_errorBitConfig.js +8 -0
  564. package/dist/esm/config/bits/_errorBitConfig.js.map +1 -0
  565. package/dist/esm/config/bits/aiPromptBitConfig.js +10 -0
  566. package/dist/esm/config/bits/aiPromptBitConfig.js.map +1 -0
  567. package/dist/esm/config/bits/anchorBitConfig.js +9 -0
  568. package/dist/esm/config/bits/anchorBitConfig.js.map +1 -0
  569. package/dist/esm/config/bits/appLinkBitConfig.js +12 -0
  570. package/dist/esm/config/bits/appLinkBitConfig.js.map +1 -0
  571. package/dist/esm/config/bits/articleAiBitConfig.js +11 -0
  572. package/dist/esm/config/bits/articleAiBitConfig.js.map +1 -0
  573. package/dist/esm/config/bits/articleAttachmentBitConfig.js +10 -0
  574. package/dist/esm/config/bits/articleAttachmentBitConfig.js.map +1 -0
  575. package/dist/esm/config/bits/articleBitConfig.js +10 -0
  576. package/dist/esm/config/bits/articleBitConfig.js.map +1 -0
  577. package/dist/esm/config/bits/articleEmbedBitConfig.js +12 -0
  578. package/dist/esm/config/bits/articleEmbedBitConfig.js.map +1 -0
  579. package/dist/esm/config/bits/articleLinkBitConfig.js +12 -0
  580. package/dist/esm/config/bits/articleLinkBitConfig.js.map +1 -0
  581. package/dist/esm/config/bits/assignmentBitConfig.js +10 -0
  582. package/dist/esm/config/bits/assignmentBitConfig.js.map +1 -0
  583. package/dist/esm/config/bits/audioBitConfig.js +12 -0
  584. package/dist/esm/config/bits/audioBitConfig.js.map +1 -0
  585. package/dist/esm/config/bits/audioEmbedBitConfig.js +12 -0
  586. package/dist/esm/config/bits/audioEmbedBitConfig.js.map +1 -0
  587. package/dist/esm/config/bits/audioLinkBitConfig.js +12 -0
  588. package/dist/esm/config/bits/audioLinkBitConfig.js.map +1 -0
  589. package/dist/esm/config/bits/bitAliasBitConfig.js +10 -0
  590. package/dist/esm/config/bits/bitAliasBitConfig.js.map +1 -0
  591. package/dist/esm/config/bits/bitBookEndingBitConfig.js +9 -0
  592. package/dist/esm/config/bits/bitBookEndingBitConfig.js.map +1 -0
  593. package/dist/esm/config/bits/bitBookSummaryBitConfig.js +9 -0
  594. package/dist/esm/config/bits/bitBookSummaryBitConfig.js.map +1 -0
  595. package/dist/esm/config/bits/blogArticleBitConfig.js +10 -0
  596. package/dist/esm/config/bits/blogArticleBitConfig.js.map +1 -0
  597. package/dist/esm/config/bits/bookBitConfig.js +47 -0
  598. package/dist/esm/config/bits/bookBitConfig.js.map +1 -0
  599. package/dist/esm/config/bits/botActionAnnounceBitConfig.js +9 -0
  600. package/dist/esm/config/bits/botActionAnnounceBitConfig.js.map +1 -0
  601. package/dist/esm/config/bits/botActionRatingNumberBitConfig.js +9 -0
  602. package/dist/esm/config/bits/botActionRatingNumberBitConfig.js.map +1 -0
  603. package/dist/esm/config/bits/botActionRemindBitConfig.js +9 -0
  604. package/dist/esm/config/bits/botActionRemindBitConfig.js.map +1 -0
  605. package/dist/esm/config/bits/botActionResponseBitConfig.js +12 -0
  606. package/dist/esm/config/bits/botActionResponseBitConfig.js.map +1 -0
  607. package/dist/esm/config/bits/botActionSaveBitConfig.js +9 -0
  608. package/dist/esm/config/bits/botActionSaveBitConfig.js.map +1 -0
  609. package/dist/esm/config/bits/botActionSendBitConfig.js +10 -0
  610. package/dist/esm/config/bits/botActionSendBitConfig.js.map +1 -0
  611. package/dist/esm/config/bits/botActionTrueFalseBitConfig.js +9 -0
  612. package/dist/esm/config/bits/botActionTrueFalseBitConfig.js.map +1 -0
  613. package/dist/esm/config/bits/botInterviewBitConfig.js +9 -0
  614. package/dist/esm/config/bits/botInterviewBitConfig.js.map +1 -0
  615. package/dist/esm/config/bits/browserImageBitConfig.js +13 -0
  616. package/dist/esm/config/bits/browserImageBitConfig.js.map +1 -0
  617. package/dist/esm/config/bits/bugBitConfig.js +10 -0
  618. package/dist/esm/config/bits/bugBitConfig.js.map +1 -0
  619. package/dist/esm/config/bits/card1BitConfig.js +10 -0
  620. package/dist/esm/config/bits/card1BitConfig.js.map +1 -0
  621. package/dist/esm/config/bits/chapterBitConfig.js +10 -0
  622. package/dist/esm/config/bits/chapterBitConfig.js.map +1 -0
  623. package/dist/esm/config/bits/chapterSubjectMatterBitConfig.js +9 -0
  624. package/dist/esm/config/bits/chapterSubjectMatterBitConfig.js.map +1 -0
  625. package/dist/esm/config/bits/chatBitConfig.js +9 -0
  626. package/dist/esm/config/bits/chatBitConfig.js.map +1 -0
  627. package/dist/esm/config/bits/clozeAndMultipleChoiceTextBitConfig.js +11 -0
  628. package/dist/esm/config/bits/clozeAndMultipleChoiceTextBitConfig.js.map +1 -0
  629. package/dist/esm/config/bits/clozeBitConfig.js +11 -0
  630. package/dist/esm/config/bits/clozeBitConfig.js.map +1 -0
  631. package/dist/esm/config/bits/clozeInstructionGroupedBitConfig.js +11 -0
  632. package/dist/esm/config/bits/clozeInstructionGroupedBitConfig.js.map +1 -0
  633. package/dist/esm/config/bits/clozeSolutionGroupedBitConfig.js +11 -0
  634. package/dist/esm/config/bits/clozeSolutionGroupedBitConfig.js.map +1 -0
  635. package/dist/esm/config/bits/codeBitConfig.js +10 -0
  636. package/dist/esm/config/bits/codeBitConfig.js.map +1 -0
  637. package/dist/esm/config/bits/conclusionBitConfig.js +10 -0
  638. package/dist/esm/config/bits/conclusionBitConfig.js.map +1 -0
  639. package/dist/esm/config/bits/conversationBitConfig.js +17 -0
  640. package/dist/esm/config/bits/conversationBitConfig.js.map +1 -0
  641. package/dist/esm/config/bits/correctionBitConfig.js +10 -0
  642. package/dist/esm/config/bits/correctionBitConfig.js.map +1 -0
  643. package/dist/esm/config/bits/dangerBitConfig.js +10 -0
  644. package/dist/esm/config/bits/dangerBitConfig.js.map +1 -0
  645. package/dist/esm/config/bits/details1BitConfig.js +9 -0
  646. package/dist/esm/config/bits/details1BitConfig.js.map +1 -0
  647. package/dist/esm/config/bits/detailsBitConfig.js +10 -0
  648. package/dist/esm/config/bits/detailsBitConfig.js.map +1 -0
  649. package/dist/esm/config/bits/documentBitConfig.js +12 -0
  650. package/dist/esm/config/bits/documentBitConfig.js.map +1 -0
  651. package/dist/esm/config/bits/documentDownloadBitConfig.js +12 -0
  652. package/dist/esm/config/bits/documentDownloadBitConfig.js.map +1 -0
  653. package/dist/esm/config/bits/documentEmbedBitConfig.js +12 -0
  654. package/dist/esm/config/bits/documentEmbedBitConfig.js.map +1 -0
  655. package/dist/esm/config/bits/documentLinkBitConfig.js +12 -0
  656. package/dist/esm/config/bits/documentLinkBitConfig.js.map +1 -0
  657. package/dist/esm/config/bits/documentUploadBitConfig.js +9 -0
  658. package/dist/esm/config/bits/documentUploadBitConfig.js.map +1 -0
  659. package/dist/esm/config/bits/editorialBitConfig.js +10 -0
  660. package/dist/esm/config/bits/editorialBitConfig.js.map +1 -0
  661. package/dist/esm/config/bits/essayBitConfig.js +11 -0
  662. package/dist/esm/config/bits/essayBitConfig.js.map +1 -0
  663. package/dist/esm/config/bits/exampleBitConfig.js +10 -0
  664. package/dist/esm/config/bits/exampleBitConfig.js.map +1 -0
  665. package/dist/esm/config/bits/featuredBitConfig.js +10 -0
  666. package/dist/esm/config/bits/featuredBitConfig.js.map +1 -0
  667. package/dist/esm/config/bits/flashcard1BitConfig.js +9 -0
  668. package/dist/esm/config/bits/flashcard1BitConfig.js.map +1 -0
  669. package/dist/esm/config/bits/flashcardBitConfig.js +9 -0
  670. package/dist/esm/config/bits/flashcardBitConfig.js.map +1 -0
  671. package/dist/esm/config/bits/focusImageBitConfig.js +13 -0
  672. package/dist/esm/config/bits/focusImageBitConfig.js.map +1 -0
  673. package/dist/esm/config/bits/footNoteBitConfig.js +10 -0
  674. package/dist/esm/config/bits/footNoteBitConfig.js.map +1 -0
  675. package/dist/esm/config/bits/generic/cardSetBitConfigs.js +127 -0
  676. package/dist/esm/config/bits/generic/cardSetBitConfigs.js.map +1 -0
  677. package/dist/esm/config/bits/generic/chainBitConfigs.js +42 -0
  678. package/dist/esm/config/bits/generic/chainBitConfigs.js.map +1 -0
  679. package/dist/esm/config/bits/generic/resourceChainBitConfigs.js +173 -0
  680. package/dist/esm/config/bits/generic/resourceChainBitConfigs.js.map +1 -0
  681. package/dist/esm/config/bits/generic/standardBitConfigs.js +40 -0
  682. package/dist/esm/config/bits/generic/standardBitConfigs.js.map +1 -0
  683. package/dist/esm/config/bits/groupBornBitConfig.js +9 -0
  684. package/dist/esm/config/bits/groupBornBitConfig.js.map +1 -0
  685. package/dist/esm/config/bits/groupDiedBitConfig.js +9 -0
  686. package/dist/esm/config/bits/groupDiedBitConfig.js.map +1 -0
  687. package/dist/esm/config/bits/helpBitConfig.js +10 -0
  688. package/dist/esm/config/bits/helpBitConfig.js.map +1 -0
  689. package/dist/esm/config/bits/highlightTextBitConfig.js +11 -0
  690. package/dist/esm/config/bits/highlightTextBitConfig.js.map +1 -0
  691. package/dist/esm/config/bits/hintBitConfig.js +10 -0
  692. package/dist/esm/config/bits/hintBitConfig.js.map +1 -0
  693. package/dist/esm/config/bits/imageBitConfig.js +12 -0
  694. package/dist/esm/config/bits/imageBitConfig.js.map +1 -0
  695. package/dist/esm/config/bits/imageLinkBitConfig.js +12 -0
  696. package/dist/esm/config/bits/imageLinkBitConfig.js.map +1 -0
  697. package/dist/esm/config/bits/imagePrototypeBitConfig.js +12 -0
  698. package/dist/esm/config/bits/imagePrototypeBitConfig.js.map +1 -0
  699. package/dist/esm/config/bits/imageSuperWideBitConfig.js +12 -0
  700. package/dist/esm/config/bits/imageSuperWideBitConfig.js.map +1 -0
  701. package/dist/esm/config/bits/imageZoomBitConfig.js +12 -0
  702. package/dist/esm/config/bits/imageZoomBitConfig.js.map +1 -0
  703. package/dist/esm/config/bits/infoBitConfig.js +10 -0
  704. package/dist/esm/config/bits/infoBitConfig.js.map +1 -0
  705. package/dist/esm/config/bits/internalLinkBitConfig.js +10 -0
  706. package/dist/esm/config/bits/internalLinkBitConfig.js.map +1 -0
  707. package/dist/esm/config/bits/interviewBitConfig.js +13 -0
  708. package/dist/esm/config/bits/interviewBitConfig.js.map +1 -0
  709. package/dist/esm/config/bits/interviewInstructionGroupedBitConfig.js +13 -0
  710. package/dist/esm/config/bits/interviewInstructionGroupedBitConfig.js.map +1 -0
  711. package/dist/esm/config/bits/learningPathBitConfig.js +85 -0
  712. package/dist/esm/config/bits/learningPathBitConfig.js.map +1 -0
  713. package/dist/esm/config/bits/markBitConfig.js +10 -0
  714. package/dist/esm/config/bits/markBitConfig.js.map +1 -0
  715. package/dist/esm/config/bits/matchBitConfig.js +62 -0
  716. package/dist/esm/config/bits/matchBitConfig.js.map +1 -0
  717. package/dist/esm/config/bits/messageBitConfig.js +10 -0
  718. package/dist/esm/config/bits/messageBitConfig.js.map +1 -0
  719. package/dist/esm/config/bits/multipleChoice1BitConfig.js +11 -0
  720. package/dist/esm/config/bits/multipleChoice1BitConfig.js.map +1 -0
  721. package/dist/esm/config/bits/multipleChoiceBitConfig.js +14 -0
  722. package/dist/esm/config/bits/multipleChoiceBitConfig.js.map +1 -0
  723. package/dist/esm/config/bits/multipleChoiceTextBitConfig.js +11 -0
  724. package/dist/esm/config/bits/multipleChoiceTextBitConfig.js.map +1 -0
  725. package/dist/esm/config/bits/multipleResponse1BitConfig.js +11 -0
  726. package/dist/esm/config/bits/multipleResponse1BitConfig.js.map +1 -0
  727. package/dist/esm/config/bits/multipleResponseBitConfig.js +14 -0
  728. package/dist/esm/config/bits/multipleResponseBitConfig.js.map +1 -0
  729. package/dist/esm/config/bits/newspaperArticleBitConfig.js +10 -0
  730. package/dist/esm/config/bits/newspaperArticleBitConfig.js.map +1 -0
  731. package/dist/esm/config/bits/noteAiBitConfig.js +11 -0
  732. package/dist/esm/config/bits/noteAiBitConfig.js.map +1 -0
  733. package/dist/esm/config/bits/noteBitConfig.js +10 -0
  734. package/dist/esm/config/bits/noteBitConfig.js.map +1 -0
  735. package/dist/esm/config/bits/notebookArticleBitConfig.js +10 -0
  736. package/dist/esm/config/bits/notebookArticleBitConfig.js.map +1 -0
  737. package/dist/esm/config/bits/pageBitConfig.js +10 -0
  738. package/dist/esm/config/bits/pageBitConfig.js.map +1 -0
  739. package/dist/esm/config/bits/photoBitConfig.js +12 -0
  740. package/dist/esm/config/bits/photoBitConfig.js.map +1 -0
  741. package/dist/esm/config/bits/preparationNoteBitConfig.js +10 -0
  742. package/dist/esm/config/bits/preparationNoteBitConfig.js.map +1 -0
  743. package/dist/esm/config/bits/question1BitConfig.js +10 -0
  744. package/dist/esm/config/bits/question1BitConfig.js.map +1 -0
  745. package/dist/esm/config/bits/quoteBitConfig.js +10 -0
  746. package/dist/esm/config/bits/quoteBitConfig.js.map +1 -0
  747. package/dist/esm/config/bits/ratingBitConfig.js +9 -0
  748. package/dist/esm/config/bits/ratingBitConfig.js.map +1 -0
  749. package/dist/esm/config/bits/recordAudioBitConfig.js +9 -0
  750. package/dist/esm/config/bits/recordAudioBitConfig.js.map +1 -0
  751. package/dist/esm/config/bits/releaseNoteBitConfig.js +11 -0
  752. package/dist/esm/config/bits/releaseNoteBitConfig.js.map +1 -0
  753. package/dist/esm/config/bits/releaseNotesSummaryBitConfig.js +10 -0
  754. package/dist/esm/config/bits/releaseNotesSummaryBitConfig.js.map +1 -0
  755. package/dist/esm/config/bits/remarkBitConfig.js +10 -0
  756. package/dist/esm/config/bits/remarkBitConfig.js.map +1 -0
  757. package/dist/esm/config/bits/sampleSolutionBitConfig.js +13 -0
  758. package/dist/esm/config/bits/sampleSolutionBitConfig.js.map +1 -0
  759. package/dist/esm/config/bits/screenshotBitConfig.js +12 -0
  760. package/dist/esm/config/bits/screenshotBitConfig.js.map +1 -0
  761. package/dist/esm/config/bits/selfAssessmentBitConfig.js +10 -0
  762. package/dist/esm/config/bits/selfAssessmentBitConfig.js.map +1 -0
  763. package/dist/esm/config/bits/sequenceBitConfig.js +13 -0
  764. package/dist/esm/config/bits/sequenceBitConfig.js.map +1 -0
  765. package/dist/esm/config/bits/sideNoteBitConfig.js +10 -0
  766. package/dist/esm/config/bits/sideNoteBitConfig.js.map +1 -0
  767. package/dist/esm/config/bits/statementBitConfig.js +10 -0
  768. package/dist/esm/config/bits/statementBitConfig.js.map +1 -0
  769. package/dist/esm/config/bits/stickyNoteBitConfig.js +10 -0
  770. package/dist/esm/config/bits/stickyNoteBitConfig.js.map +1 -0
  771. package/dist/esm/config/bits/stillImageFilmBitConfig.js +12 -0
  772. package/dist/esm/config/bits/stillImageFilmBitConfig.js.map +1 -0
  773. package/dist/esm/config/bits/stillImageFilmEmbedBitConfig.js +12 -0
  774. package/dist/esm/config/bits/stillImageFilmEmbedBitConfig.js.map +1 -0
  775. package/dist/esm/config/bits/stillImageFilmLinkBitConfig.js +12 -0
  776. package/dist/esm/config/bits/stillImageFilmLinkBitConfig.js.map +1 -0
  777. package/dist/esm/config/bits/summaryAiBitConfig.js +11 -0
  778. package/dist/esm/config/bits/summaryAiBitConfig.js.map +1 -0
  779. package/dist/esm/config/bits/summaryBitConfig.js +11 -0
  780. package/dist/esm/config/bits/summaryBitConfig.js.map +1 -0
  781. package/dist/esm/config/bits/survey1BitConfig.js +10 -0
  782. package/dist/esm/config/bits/survey1BitConfig.js.map +1 -0
  783. package/dist/esm/config/bits/surveyAnonymous1BitConfig.js +10 -0
  784. package/dist/esm/config/bits/surveyAnonymous1BitConfig.js.map +1 -0
  785. package/dist/esm/config/bits/surveyAnonymousBitConfig.js +10 -0
  786. package/dist/esm/config/bits/surveyAnonymousBitConfig.js.map +1 -0
  787. package/dist/esm/config/bits/surveyBitConfig.js +10 -0
  788. package/dist/esm/config/bits/surveyBitConfig.js.map +1 -0
  789. package/dist/esm/config/bits/takePictureBitConfig.js +9 -0
  790. package/dist/esm/config/bits/takePictureBitConfig.js.map +1 -0
  791. package/dist/esm/config/bits/tocBitConfig.js +9 -0
  792. package/dist/esm/config/bits/tocBitConfig.js.map +1 -0
  793. package/dist/esm/config/bits/trueFalse1BitConfig.js +12 -0
  794. package/dist/esm/config/bits/trueFalse1BitConfig.js.map +1 -0
  795. package/dist/esm/config/bits/trueFalseBitConfig.js +14 -0
  796. package/dist/esm/config/bits/trueFalseBitConfig.js.map +1 -0
  797. package/dist/esm/config/bits/vendorPadletEmbedBitConfig.js +10 -0
  798. package/dist/esm/config/bits/vendorPadletEmbedBitConfig.js.map +1 -0
  799. package/dist/esm/config/bits/videoBitConfig.js +12 -0
  800. package/dist/esm/config/bits/videoBitConfig.js.map +1 -0
  801. package/dist/esm/config/bits/videoEmbedBitConfig.js +12 -0
  802. package/dist/esm/config/bits/videoEmbedBitConfig.js.map +1 -0
  803. package/dist/esm/config/bits/videoLandscapeBitConfig.js +12 -0
  804. package/dist/esm/config/bits/videoLandscapeBitConfig.js.map +1 -0
  805. package/dist/esm/config/bits/videoLinkBitConfig.js +12 -0
  806. package/dist/esm/config/bits/videoLinkBitConfig.js.map +1 -0
  807. package/dist/esm/config/bits/videoPortraitBitConfig.js +12 -0
  808. package/dist/esm/config/bits/videoPortraitBitConfig.js.map +1 -0
  809. package/dist/esm/config/bits/warningBitConfig.js +10 -0
  810. package/dist/esm/config/bits/warningBitConfig.js.map +1 -0
  811. package/dist/esm/config/bits/websiteLinkBitConfig.js +12 -0
  812. package/dist/esm/config/bits/websiteLinkBitConfig.js.map +1 -0
  813. package/dist/esm/config/bits/workbookArticleBitConfig.js +10 -0
  814. package/dist/esm/config/bits/workbookArticleBitConfig.js.map +1 -0
  815. package/dist/esm/config/config.js +175 -0
  816. package/dist/esm/config/config.js.map +1 -0
  817. package/dist/esm/config/properties/actionPropertyConfig.js +7 -0
  818. package/dist/esm/config/properties/actionPropertyConfig.js.map +1 -0
  819. package/dist/esm/config/properties/ageRangePropertyConfig.js +6 -0
  820. package/dist/esm/config/properties/ageRangePropertyConfig.js.map +1 -0
  821. package/dist/esm/config/properties/aiGeneratedPropertyConfig.js +9 -0
  822. package/dist/esm/config/properties/aiGeneratedPropertyConfig.js.map +1 -0
  823. package/dist/esm/config/properties/authorPropertyConfig.js +6 -0
  824. package/dist/esm/config/properties/authorPropertyConfig.js.map +1 -0
  825. package/dist/esm/config/properties/bookPropertyConfig.js +7 -0
  826. package/dist/esm/config/properties/bookPropertyConfig.js.map +1 -0
  827. package/dist/esm/config/properties/botPropertyConfig.js +6 -0
  828. package/dist/esm/config/properties/botPropertyConfig.js.map +1 -0
  829. package/dist/esm/config/properties/caseSensitivePropertyConfig.js +9 -0
  830. package/dist/esm/config/properties/caseSensitivePropertyConfig.js.map +1 -0
  831. package/dist/esm/config/properties/computerLanguagePropertyConfig.js +7 -0
  832. package/dist/esm/config/properties/computerLanguagePropertyConfig.js.map +1 -0
  833. package/dist/esm/config/properties/coverImagePropertyConfig.js +6 -0
  834. package/dist/esm/config/properties/coverImagePropertyConfig.js.map +1 -0
  835. package/dist/esm/config/properties/datePropertyConfig.js +6 -0
  836. package/dist/esm/config/properties/datePropertyConfig.js.map +1 -0
  837. package/dist/esm/config/properties/deeplinkPropertyConfig.js +6 -0
  838. package/dist/esm/config/properties/deeplinkPropertyConfig.js.map +1 -0
  839. package/dist/esm/config/properties/durationPropertyConfig.js +7 -0
  840. package/dist/esm/config/properties/durationPropertyConfig.js.map +1 -0
  841. package/dist/esm/config/properties/examplePropertyConfig.js +7 -0
  842. package/dist/esm/config/properties/examplePropertyConfig.js.map +1 -0
  843. package/dist/esm/config/properties/externalIdPropertyConfig.js +6 -0
  844. package/dist/esm/config/properties/externalIdPropertyConfig.js.map +1 -0
  845. package/dist/esm/config/properties/externalLinkPropertyConfig.js +7 -0
  846. package/dist/esm/config/properties/externalLinkPropertyConfig.js.map +1 -0
  847. package/dist/esm/config/properties/externalLinkTextPropertyConfig.js +7 -0
  848. package/dist/esm/config/properties/externalLinkTextPropertyConfig.js.map +1 -0
  849. package/dist/esm/config/properties/focusXPropertyConfig.js +7 -0
  850. package/dist/esm/config/properties/focusXPropertyConfig.js.map +1 -0
  851. package/dist/esm/config/properties/focusYPropertyConfig.js +7 -0
  852. package/dist/esm/config/properties/focusYPropertyConfig.js.map +1 -0
  853. package/dist/esm/config/properties/idPropertyConfig.js +6 -0
  854. package/dist/esm/config/properties/idPropertyConfig.js.map +1 -0
  855. package/dist/esm/config/properties/isInfoOnlyPropertyConfig.js +7 -0
  856. package/dist/esm/config/properties/isInfoOnlyPropertyConfig.js.map +1 -0
  857. package/dist/esm/config/properties/isTrackedPropertyConfig.js +7 -0
  858. package/dist/esm/config/properties/isTrackedPropertyConfig.js.map +1 -0
  859. package/dist/esm/config/properties/kindPropertyConfig.js +7 -0
  860. package/dist/esm/config/properties/kindPropertyConfig.js.map +1 -0
  861. package/dist/esm/config/properties/labelFalsePropertyConfig.js +7 -0
  862. package/dist/esm/config/properties/labelFalsePropertyConfig.js.map +1 -0
  863. package/dist/esm/config/properties/labelTruePropertyConfig.js +7 -0
  864. package/dist/esm/config/properties/labelTruePropertyConfig.js.map +1 -0
  865. package/dist/esm/config/properties/languagePropertyConfig.js +6 -0
  866. package/dist/esm/config/properties/languagePropertyConfig.js.map +1 -0
  867. package/dist/esm/config/properties/levelPropertyConfig.js +7 -0
  868. package/dist/esm/config/properties/levelPropertyConfig.js.map +1 -0
  869. package/dist/esm/config/properties/listPropertyConfig.js +6 -0
  870. package/dist/esm/config/properties/listPropertyConfig.js.map +1 -0
  871. package/dist/esm/config/properties/locationPropertyConfig.js +7 -0
  872. package/dist/esm/config/properties/locationPropertyConfig.js.map +1 -0
  873. package/dist/esm/config/properties/longAnswerPropertyConfig.js +9 -0
  874. package/dist/esm/config/properties/longAnswerPropertyConfig.js.map +1 -0
  875. package/dist/esm/config/properties/padletIdPropertyConfig.js +7 -0
  876. package/dist/esm/config/properties/padletIdPropertyConfig.js.map +1 -0
  877. package/dist/esm/config/properties/partialAnswerPropertyConfig.js +7 -0
  878. package/dist/esm/config/properties/partialAnswerPropertyConfig.js.map +1 -0
  879. package/dist/esm/config/properties/partnerPropertyConfig.js +7 -0
  880. package/dist/esm/config/properties/partnerPropertyConfig.js.map +1 -0
  881. package/dist/esm/config/properties/progressPropertyConfig.js +8 -0
  882. package/dist/esm/config/properties/progressPropertyConfig.js.map +1 -0
  883. package/dist/esm/config/properties/publicationsPropertyConfig.js +6 -0
  884. package/dist/esm/config/properties/publicationsPropertyConfig.js.map +1 -0
  885. package/dist/esm/config/properties/publisherPropertyConfig.js +6 -0
  886. package/dist/esm/config/properties/publisherPropertyConfig.js.map +1 -0
  887. package/dist/esm/config/properties/quotedPersonPropertyConfig.js +7 -0
  888. package/dist/esm/config/properties/quotedPersonPropertyConfig.js.map +1 -0
  889. package/dist/esm/config/properties/reactionPropertyConfig.js +7 -0
  890. package/dist/esm/config/properties/reactionPropertyConfig.js.map +1 -0
  891. package/dist/esm/config/properties/referencePropertyConfig.js +8 -0
  892. package/dist/esm/config/properties/referencePropertyConfig.js.map +1 -0
  893. package/dist/esm/config/properties/releaseVersionPropertyConfig.js +7 -0
  894. package/dist/esm/config/properties/releaseVersionPropertyConfig.js.map +1 -0
  895. package/dist/esm/config/properties/resourcePropertyConfig.js +76 -0
  896. package/dist/esm/config/properties/resourcePropertyConfig.js.map +1 -0
  897. package/dist/esm/config/properties/sampleSolutionPropertyConfig.js +7 -0
  898. package/dist/esm/config/properties/sampleSolutionPropertyConfig.js.map +1 -0
  899. package/dist/esm/config/properties/shortAnswerPropertyConfig.js +9 -0
  900. package/dist/esm/config/properties/shortAnswerPropertyConfig.js.map +1 -0
  901. package/dist/esm/config/properties/spaceIdPropertyConfig.js +6 -0
  902. package/dist/esm/config/properties/spaceIdPropertyConfig.js.map +1 -0
  903. package/dist/esm/config/properties/subjectPropertyConfig.js +6 -0
  904. package/dist/esm/config/properties/subjectPropertyConfig.js.map +1 -0
  905. package/dist/esm/config/properties/subtypePropertyConfig.js +7 -0
  906. package/dist/esm/config/properties/subtypePropertyConfig.js.map +1 -0
  907. package/dist/esm/config/properties/textReferencePropertyConfig.js +7 -0
  908. package/dist/esm/config/properties/textReferencePropertyConfig.js.map +1 -0
  909. package/dist/esm/config/properties/themePropertyConfig.js +6 -0
  910. package/dist/esm/config/properties/themePropertyConfig.js.map +1 -0
  911. package/dist/esm/config/properties/thumbImagePropertyConfig.js +7 -0
  912. package/dist/esm/config/properties/thumbImagePropertyConfig.js.map +1 -0
  913. package/dist/esm/config/properties/tocPropertyConfig.js +8 -0
  914. package/dist/esm/config/properties/tocPropertyConfig.js.map +1 -0
  915. package/dist/esm/config/properties/videoCallLinkPropertyConfig copy.js +7 -0
  916. package/dist/esm/config/properties/videoCallLinkPropertyConfig copy.js.map +1 -0
  917. package/dist/esm/config/properties/videoCallLinkPropertyConfig.js +7 -0
  918. package/dist/esm/config/properties/videoCallLinkPropertyConfig.js.map +1 -0
  919. package/dist/esm/generated/build-info.js +7 -0
  920. package/dist/esm/generated/build-info.js.map +1 -0
  921. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +3425 -0
  922. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -0
  923. package/dist/esm/generated/parser/text/text-peggy-parser.js +6893 -0
  924. package/dist/esm/generated/parser/text/text-peggy-parser.js.map +1 -0
  925. package/dist/esm/generator/Generator.js +2 -0
  926. package/dist/esm/generator/Generator.js.map +1 -0
  927. package/dist/esm/generator/bitmark/BitmarkFileGenerator.js +46 -0
  928. package/dist/esm/generator/bitmark/BitmarkFileGenerator.js.map +1 -0
  929. package/dist/esm/generator/bitmark/BitmarkGenerator.js +1199 -0
  930. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -0
  931. package/dist/esm/generator/bitmark/BitmarkStringGenerator.js +48 -0
  932. package/dist/esm/generator/bitmark/BitmarkStringGenerator.js.map +1 -0
  933. package/dist/esm/generator/json/JsonFileGenerator.js +50 -0
  934. package/dist/esm/generator/json/JsonFileGenerator.js.map +1 -0
  935. package/dist/esm/generator/json/JsonGenerator.js +2046 -0
  936. package/dist/esm/generator/json/JsonGenerator.js.map +1 -0
  937. package/dist/esm/generator/json/JsonObjectGenerator.js +48 -0
  938. package/dist/esm/generator/json/JsonObjectGenerator.js.map +1 -0
  939. package/dist/esm/generator/json/JsonStringGenerator.js +47 -0
  940. package/dist/esm/generator/json/JsonStringGenerator.js.map +1 -0
  941. package/dist/esm/generator/text/TextGenerator.js +660 -0
  942. package/dist/esm/generator/text/TextGenerator.js.map +1 -0
  943. package/dist/esm/index.js +40 -0
  944. package/dist/esm/index.js.map +1 -0
  945. package/dist/esm/init/init.js +13 -0
  946. package/dist/esm/init/init.js.map +1 -0
  947. package/dist/esm/model/ast/NodeType.js +235 -0
  948. package/dist/esm/model/ast/NodeType.js.map +1 -0
  949. package/dist/esm/model/ast/Nodes.js +2 -0
  950. package/dist/esm/model/ast/Nodes.js.map +1 -0
  951. package/dist/esm/model/ast/TextNodes.js +2 -0
  952. package/dist/esm/model/ast/TextNodes.js.map +1 -0
  953. package/dist/esm/model/config/TagData.js +3 -0
  954. package/dist/esm/model/config/TagData.js.map +1 -0
  955. package/dist/esm/model/enum/BitType.js +182 -0
  956. package/dist/esm/model/enum/BitType.js.map +1 -0
  957. package/dist/esm/model/enum/BitmarkGeneratorOutput.js +2 -0
  958. package/dist/esm/model/enum/BitmarkGeneratorOutput.js.map +1 -0
  959. package/dist/esm/model/enum/BitmarkParserType.js +7 -0
  960. package/dist/esm/model/enum/BitmarkParserType.js.map +1 -0
  961. package/dist/esm/model/enum/BitmarkVersion.js +8 -0
  962. package/dist/esm/model/enum/BitmarkVersion.js.map +1 -0
  963. package/dist/esm/model/enum/BodyBitType.js +10 -0
  964. package/dist/esm/model/enum/BodyBitType.js.map +1 -0
  965. package/dist/esm/model/enum/CardSetType.js +12 -0
  966. package/dist/esm/model/enum/CardSetType.js.map +1 -0
  967. package/dist/esm/model/enum/CardSetVersion.js +7 -0
  968. package/dist/esm/model/enum/CardSetVersion.js.map +1 -0
  969. package/dist/esm/model/enum/PropertyKey.js +73 -0
  970. package/dist/esm/model/enum/PropertyKey.js.map +1 -0
  971. package/dist/esm/model/enum/ResourceType.js +28 -0
  972. package/dist/esm/model/enum/ResourceType.js.map +1 -0
  973. package/dist/esm/model/enum/TagType.js +19 -0
  974. package/dist/esm/model/enum/TagType.js.map +1 -0
  975. package/dist/esm/model/enum/TextFormat.js +8 -0
  976. package/dist/esm/model/enum/TextFormat.js.map +1 -0
  977. package/dist/esm/model/enum/TextMarkType.js +22 -0
  978. package/dist/esm/model/enum/TextMarkType.js.map +1 -0
  979. package/dist/esm/model/enum/TextNodeType.js +23 -0
  980. package/dist/esm/model/enum/TextNodeType.js.map +1 -0
  981. package/dist/esm/model/enum/TextSection.js +15 -0
  982. package/dist/esm/model/enum/TextSection.js.map +1 -0
  983. package/dist/esm/model/json/BitJson.js +2 -0
  984. package/dist/esm/model/json/BitJson.js.map +1 -0
  985. package/dist/esm/model/json/BitWrapperJson.js +2 -0
  986. package/dist/esm/model/json/BitWrapperJson.js.map +1 -0
  987. package/dist/esm/model/json/BodyBitJson.js +2 -0
  988. package/dist/esm/model/json/BodyBitJson.js.map +1 -0
  989. package/dist/esm/model/json/ParserJson.js +2 -0
  990. package/dist/esm/model/json/ParserJson.js.map +1 -0
  991. package/dist/esm/model/json/ResourceJson.js +2 -0
  992. package/dist/esm/model/json/ResourceJson.js.map +1 -0
  993. package/dist/esm/model/parser/ParserData.js +2 -0
  994. package/dist/esm/model/parser/ParserData.js.map +1 -0
  995. package/dist/esm/model/parser/ParserError.js +2 -0
  996. package/dist/esm/model/parser/ParserError.js.map +1 -0
  997. package/dist/esm/model/parser/ParserInfo.js +2 -0
  998. package/dist/esm/model/parser/ParserInfo.js.map +1 -0
  999. package/dist/esm/model/parser/ParserLocation.js +2 -0
  1000. package/dist/esm/model/parser/ParserLocation.js.map +1 -0
  1001. package/dist/esm/model/parser/ParserLocationRange.js +2 -0
  1002. package/dist/esm/model/parser/ParserLocationRange.js.map +1 -0
  1003. package/dist/esm/parser/bitmark/BitmarkParser.js +64 -0
  1004. package/dist/esm/parser/bitmark/BitmarkParser.js.map +1 -0
  1005. package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js +4 -0
  1006. package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js.map +1 -0
  1007. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +530 -0
  1008. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -0
  1009. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +572 -0
  1010. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -0
  1011. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +54 -0
  1012. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -0
  1013. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +607 -0
  1014. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -0
  1015. package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js +79 -0
  1016. package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js.map +1 -0
  1017. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +32 -0
  1018. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -0
  1019. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +402 -0
  1020. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -0
  1021. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +13 -0
  1022. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -0
  1023. package/dist/esm/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js +16 -0
  1024. package/dist/esm/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js.map +1 -0
  1025. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +32 -0
  1026. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -0
  1027. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +39 -0
  1028. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -0
  1029. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +13 -0
  1030. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -0
  1031. package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +48 -0
  1032. package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -0
  1033. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +60 -0
  1034. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -0
  1035. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +13 -0
  1036. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -0
  1037. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +111 -0
  1038. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -0
  1039. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +38 -0
  1040. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -0
  1041. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +174 -0
  1042. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -0
  1043. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +15 -0
  1044. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -0
  1045. package/dist/esm/parser/json/JsonParser.js +589 -0
  1046. package/dist/esm/parser/json/JsonParser.js.map +1 -0
  1047. package/dist/esm/parser/text/TextParser.js +30 -0
  1048. package/dist/esm/parser/text/TextParser.js.map +1 -0
  1049. package/dist/esm/parser/text/peg/TextPegParser.js +4 -0
  1050. package/dist/esm/parser/text/peg/TextPegParser.js.map +1 -0
  1051. package/dist/esm/utils/ArrayUtils.js +40 -0
  1052. package/dist/esm/utils/ArrayUtils.js.map +1 -0
  1053. package/dist/esm/utils/BitUtils.js +31 -0
  1054. package/dist/esm/utils/BitUtils.js.map +1 -0
  1055. package/dist/esm/utils/BooleanUtils.js +59 -0
  1056. package/dist/esm/utils/BooleanUtils.js.map +1 -0
  1057. package/dist/esm/utils/FileUtils.js +36 -0
  1058. package/dist/esm/utils/FileUtils.js.map +1 -0
  1059. package/dist/esm/utils/NumberUtils.js +23 -0
  1060. package/dist/esm/utils/NumberUtils.js.map +1 -0
  1061. package/dist/esm/utils/ObjectUtils.js +200 -0
  1062. package/dist/esm/utils/ObjectUtils.js.map +1 -0
  1063. package/dist/esm/utils/StringUtils.js +131 -0
  1064. package/dist/esm/utils/StringUtils.js.map +1 -0
  1065. package/dist/esm/utils/UrlUtils.js +34 -0
  1066. package/dist/esm/utils/UrlUtils.js.map +1 -0
  1067. package/dist/esm/utils/env/Env.js +127 -0
  1068. package/dist/esm/utils/env/Env.js.map +1 -0
  1069. package/dist/esm/utils/env/Environment.js +12 -0
  1070. package/dist/esm/utils/env/Environment.js.map +1 -0
  1071. package/dist/esm/utils/env/Os.js +11 -0
  1072. package/dist/esm/utils/env/Os.js.map +1 -0
  1073. package/dist/esm/utils/env/Version.js +9 -0
  1074. package/dist/esm/utils/env/Version.js.map +1 -0
  1075. package/dist/esm/utils/env/userAgent.js +86 -0
  1076. package/dist/esm/utils/env/userAgent.js.map +1 -0
  1077. package/dist/esm/utils/polyfill/fs.js +11 -0
  1078. package/dist/esm/utils/polyfill/fs.js.map +1 -0
  1079. package/dist/types/BitmarkParserGenerator.d.ts +212 -0
  1080. package/dist/types/BitmarkParserGenerator.d.ts.map +1 -0
  1081. package/dist/types/ast/Ast.d.ts +141 -0
  1082. package/dist/types/ast/Ast.d.ts.map +1 -0
  1083. package/dist/types/ast/BaseBuilder.d.ts +22 -0
  1084. package/dist/types/ast/BaseBuilder.d.ts.map +1 -0
  1085. package/dist/types/ast/Builder.d.ts +402 -0
  1086. package/dist/types/ast/Builder.d.ts.map +1 -0
  1087. package/dist/types/ast/ResourceBuilder.d.ts +383 -0
  1088. package/dist/types/ast/ResourceBuilder.d.ts.map +1 -0
  1089. package/dist/types/ast/rules/NodeValidator.d.ts +20 -0
  1090. package/dist/types/ast/rules/NodeValidator.d.ts.map +1 -0
  1091. package/dist/types/ast/writer/FileWriter.d.ts +39 -0
  1092. package/dist/types/ast/writer/FileWriter.d.ts.map +1 -0
  1093. package/dist/types/ast/writer/StreamWriter.d.ts +28 -0
  1094. package/dist/types/ast/writer/StreamWriter.d.ts.map +1 -0
  1095. package/dist/types/ast/writer/StringWriter.d.ts +28 -0
  1096. package/dist/types/ast/writer/StringWriter.d.ts.map +1 -0
  1097. package/dist/types/ast/writer/Writer.d.ts +66 -0
  1098. package/dist/types/ast/writer/Writer.d.ts.map +1 -0
  1099. package/dist/types/config/bits/_errorBitConfig.d.ts +2 -0
  1100. package/dist/types/config/bits/_errorBitConfig.d.ts.map +1 -0
  1101. package/dist/types/config/bits/aiPromptBitConfig.d.ts +2 -0
  1102. package/dist/types/config/bits/aiPromptBitConfig.d.ts.map +1 -0
  1103. package/dist/types/config/bits/anchorBitConfig.d.ts +2 -0
  1104. package/dist/types/config/bits/anchorBitConfig.d.ts.map +1 -0
  1105. package/dist/types/config/bits/appLinkBitConfig.d.ts +2 -0
  1106. package/dist/types/config/bits/appLinkBitConfig.d.ts.map +1 -0
  1107. package/dist/types/config/bits/articleAiBitConfig.d.ts +2 -0
  1108. package/dist/types/config/bits/articleAiBitConfig.d.ts.map +1 -0
  1109. package/dist/types/config/bits/articleAttachmentBitConfig.d.ts +2 -0
  1110. package/dist/types/config/bits/articleAttachmentBitConfig.d.ts.map +1 -0
  1111. package/dist/types/config/bits/articleBitConfig.d.ts +2 -0
  1112. package/dist/types/config/bits/articleBitConfig.d.ts.map +1 -0
  1113. package/dist/types/config/bits/articleEmbedBitConfig.d.ts +2 -0
  1114. package/dist/types/config/bits/articleEmbedBitConfig.d.ts.map +1 -0
  1115. package/dist/types/config/bits/articleLinkBitConfig.d.ts +2 -0
  1116. package/dist/types/config/bits/articleLinkBitConfig.d.ts.map +1 -0
  1117. package/dist/types/config/bits/assignmentBitConfig.d.ts +2 -0
  1118. package/dist/types/config/bits/assignmentBitConfig.d.ts.map +1 -0
  1119. package/dist/types/config/bits/audioBitConfig.d.ts +2 -0
  1120. package/dist/types/config/bits/audioBitConfig.d.ts.map +1 -0
  1121. package/dist/types/config/bits/audioEmbedBitConfig.d.ts +2 -0
  1122. package/dist/types/config/bits/audioEmbedBitConfig.d.ts.map +1 -0
  1123. package/dist/types/config/bits/audioLinkBitConfig.d.ts +2 -0
  1124. package/dist/types/config/bits/audioLinkBitConfig.d.ts.map +1 -0
  1125. package/dist/types/config/bits/bitAliasBitConfig.d.ts +2 -0
  1126. package/dist/types/config/bits/bitAliasBitConfig.d.ts.map +1 -0
  1127. package/dist/types/config/bits/bitBookEndingBitConfig.d.ts +2 -0
  1128. package/dist/types/config/bits/bitBookEndingBitConfig.d.ts.map +1 -0
  1129. package/dist/types/config/bits/bitBookSummaryBitConfig.d.ts +2 -0
  1130. package/dist/types/config/bits/bitBookSummaryBitConfig.d.ts.map +1 -0
  1131. package/dist/types/config/bits/blogArticleBitConfig.d.ts +2 -0
  1132. package/dist/types/config/bits/blogArticleBitConfig.d.ts.map +1 -0
  1133. package/dist/types/config/bits/bookBitConfig.d.ts +2 -0
  1134. package/dist/types/config/bits/bookBitConfig.d.ts.map +1 -0
  1135. package/dist/types/config/bits/botActionAnnounceBitConfig.d.ts +2 -0
  1136. package/dist/types/config/bits/botActionAnnounceBitConfig.d.ts.map +1 -0
  1137. package/dist/types/config/bits/botActionRatingNumberBitConfig.d.ts +2 -0
  1138. package/dist/types/config/bits/botActionRatingNumberBitConfig.d.ts.map +1 -0
  1139. package/dist/types/config/bits/botActionRemindBitConfig.d.ts +2 -0
  1140. package/dist/types/config/bits/botActionRemindBitConfig.d.ts.map +1 -0
  1141. package/dist/types/config/bits/botActionResponseBitConfig.d.ts +2 -0
  1142. package/dist/types/config/bits/botActionResponseBitConfig.d.ts.map +1 -0
  1143. package/dist/types/config/bits/botActionSaveBitConfig.d.ts +2 -0
  1144. package/dist/types/config/bits/botActionSaveBitConfig.d.ts.map +1 -0
  1145. package/dist/types/config/bits/botActionSendBitConfig.d.ts +2 -0
  1146. package/dist/types/config/bits/botActionSendBitConfig.d.ts.map +1 -0
  1147. package/dist/types/config/bits/botActionTrueFalseBitConfig.d.ts +2 -0
  1148. package/dist/types/config/bits/botActionTrueFalseBitConfig.d.ts.map +1 -0
  1149. package/dist/types/config/bits/botInterviewBitConfig.d.ts +2 -0
  1150. package/dist/types/config/bits/botInterviewBitConfig.d.ts.map +1 -0
  1151. package/dist/types/config/bits/browserImageBitConfig.d.ts +2 -0
  1152. package/dist/types/config/bits/browserImageBitConfig.d.ts.map +1 -0
  1153. package/dist/types/config/bits/bugBitConfig.d.ts +2 -0
  1154. package/dist/types/config/bits/bugBitConfig.d.ts.map +1 -0
  1155. package/dist/types/config/bits/card1BitConfig.d.ts +2 -0
  1156. package/dist/types/config/bits/card1BitConfig.d.ts.map +1 -0
  1157. package/dist/types/config/bits/chapterBitConfig.d.ts +2 -0
  1158. package/dist/types/config/bits/chapterBitConfig.d.ts.map +1 -0
  1159. package/dist/types/config/bits/chapterSubjectMatterBitConfig.d.ts +2 -0
  1160. package/dist/types/config/bits/chapterSubjectMatterBitConfig.d.ts.map +1 -0
  1161. package/dist/types/config/bits/chatBitConfig.d.ts +2 -0
  1162. package/dist/types/config/bits/chatBitConfig.d.ts.map +1 -0
  1163. package/dist/types/config/bits/clozeAndMultipleChoiceTextBitConfig.d.ts +2 -0
  1164. package/dist/types/config/bits/clozeAndMultipleChoiceTextBitConfig.d.ts.map +1 -0
  1165. package/dist/types/config/bits/clozeBitConfig.d.ts +2 -0
  1166. package/dist/types/config/bits/clozeBitConfig.d.ts.map +1 -0
  1167. package/dist/types/config/bits/clozeInstructionGroupedBitConfig.d.ts +2 -0
  1168. package/dist/types/config/bits/clozeInstructionGroupedBitConfig.d.ts.map +1 -0
  1169. package/dist/types/config/bits/clozeSolutionGroupedBitConfig.d.ts +2 -0
  1170. package/dist/types/config/bits/clozeSolutionGroupedBitConfig.d.ts.map +1 -0
  1171. package/dist/types/config/bits/codeBitConfig.d.ts +2 -0
  1172. package/dist/types/config/bits/codeBitConfig.d.ts.map +1 -0
  1173. package/dist/types/config/bits/conclusionBitConfig.d.ts +2 -0
  1174. package/dist/types/config/bits/conclusionBitConfig.d.ts.map +1 -0
  1175. package/dist/types/config/bits/conversationBitConfig.d.ts +2 -0
  1176. package/dist/types/config/bits/conversationBitConfig.d.ts.map +1 -0
  1177. package/dist/types/config/bits/correctionBitConfig.d.ts +2 -0
  1178. package/dist/types/config/bits/correctionBitConfig.d.ts.map +1 -0
  1179. package/dist/types/config/bits/dangerBitConfig.d.ts +2 -0
  1180. package/dist/types/config/bits/dangerBitConfig.d.ts.map +1 -0
  1181. package/dist/types/config/bits/details1BitConfig.d.ts +2 -0
  1182. package/dist/types/config/bits/details1BitConfig.d.ts.map +1 -0
  1183. package/dist/types/config/bits/detailsBitConfig.d.ts +2 -0
  1184. package/dist/types/config/bits/detailsBitConfig.d.ts.map +1 -0
  1185. package/dist/types/config/bits/documentBitConfig.d.ts +2 -0
  1186. package/dist/types/config/bits/documentBitConfig.d.ts.map +1 -0
  1187. package/dist/types/config/bits/documentDownloadBitConfig.d.ts +2 -0
  1188. package/dist/types/config/bits/documentDownloadBitConfig.d.ts.map +1 -0
  1189. package/dist/types/config/bits/documentEmbedBitConfig.d.ts +2 -0
  1190. package/dist/types/config/bits/documentEmbedBitConfig.d.ts.map +1 -0
  1191. package/dist/types/config/bits/documentLinkBitConfig.d.ts +2 -0
  1192. package/dist/types/config/bits/documentLinkBitConfig.d.ts.map +1 -0
  1193. package/dist/types/config/bits/documentUploadBitConfig.d.ts +2 -0
  1194. package/dist/types/config/bits/documentUploadBitConfig.d.ts.map +1 -0
  1195. package/dist/types/config/bits/editorialBitConfig.d.ts +2 -0
  1196. package/dist/types/config/bits/editorialBitConfig.d.ts.map +1 -0
  1197. package/dist/types/config/bits/essayBitConfig.d.ts +2 -0
  1198. package/dist/types/config/bits/essayBitConfig.d.ts.map +1 -0
  1199. package/dist/types/config/bits/exampleBitConfig.d.ts +2 -0
  1200. package/dist/types/config/bits/exampleBitConfig.d.ts.map +1 -0
  1201. package/dist/types/config/bits/featuredBitConfig.d.ts +2 -0
  1202. package/dist/types/config/bits/featuredBitConfig.d.ts.map +1 -0
  1203. package/dist/types/config/bits/flashcard1BitConfig.d.ts +2 -0
  1204. package/dist/types/config/bits/flashcard1BitConfig.d.ts.map +1 -0
  1205. package/dist/types/config/bits/flashcardBitConfig.d.ts +2 -0
  1206. package/dist/types/config/bits/flashcardBitConfig.d.ts.map +1 -0
  1207. package/dist/types/config/bits/focusImageBitConfig.d.ts +2 -0
  1208. package/dist/types/config/bits/focusImageBitConfig.d.ts.map +1 -0
  1209. package/dist/types/config/bits/footNoteBitConfig.d.ts +2 -0
  1210. package/dist/types/config/bits/footNoteBitConfig.d.ts.map +1 -0
  1211. package/dist/types/config/bits/generic/cardSetBitConfigs.d.ts +12 -0
  1212. package/dist/types/config/bits/generic/cardSetBitConfigs.d.ts.map +1 -0
  1213. package/dist/types/config/bits/generic/chainBitConfigs.d.ts +6 -0
  1214. package/dist/types/config/bits/generic/chainBitConfigs.d.ts.map +1 -0
  1215. package/dist/types/config/bits/generic/resourceChainBitConfigs.d.ts +25 -0
  1216. package/dist/types/config/bits/generic/resourceChainBitConfigs.d.ts.map +1 -0
  1217. package/dist/types/config/bits/generic/standardBitConfigs.d.ts +7 -0
  1218. package/dist/types/config/bits/generic/standardBitConfigs.d.ts.map +1 -0
  1219. package/dist/types/config/bits/groupBornBitConfig.d.ts +2 -0
  1220. package/dist/types/config/bits/groupBornBitConfig.d.ts.map +1 -0
  1221. package/dist/types/config/bits/groupDiedBitConfig.d.ts +2 -0
  1222. package/dist/types/config/bits/groupDiedBitConfig.d.ts.map +1 -0
  1223. package/dist/types/config/bits/helpBitConfig.d.ts +2 -0
  1224. package/dist/types/config/bits/helpBitConfig.d.ts.map +1 -0
  1225. package/dist/types/config/bits/highlightTextBitConfig.d.ts +2 -0
  1226. package/dist/types/config/bits/highlightTextBitConfig.d.ts.map +1 -0
  1227. package/dist/types/config/bits/hintBitConfig.d.ts +2 -0
  1228. package/dist/types/config/bits/hintBitConfig.d.ts.map +1 -0
  1229. package/dist/types/config/bits/imageBitConfig.d.ts +2 -0
  1230. package/dist/types/config/bits/imageBitConfig.d.ts.map +1 -0
  1231. package/dist/types/config/bits/imageLinkBitConfig.d.ts +2 -0
  1232. package/dist/types/config/bits/imageLinkBitConfig.d.ts.map +1 -0
  1233. package/dist/types/config/bits/imagePrototypeBitConfig.d.ts +2 -0
  1234. package/dist/types/config/bits/imagePrototypeBitConfig.d.ts.map +1 -0
  1235. package/dist/types/config/bits/imageSuperWideBitConfig.d.ts +2 -0
  1236. package/dist/types/config/bits/imageSuperWideBitConfig.d.ts.map +1 -0
  1237. package/dist/types/config/bits/imageZoomBitConfig.d.ts +2 -0
  1238. package/dist/types/config/bits/imageZoomBitConfig.d.ts.map +1 -0
  1239. package/dist/types/config/bits/infoBitConfig.d.ts +2 -0
  1240. package/dist/types/config/bits/infoBitConfig.d.ts.map +1 -0
  1241. package/dist/types/config/bits/internalLinkBitConfig.d.ts +2 -0
  1242. package/dist/types/config/bits/internalLinkBitConfig.d.ts.map +1 -0
  1243. package/dist/types/config/bits/interviewBitConfig.d.ts +2 -0
  1244. package/dist/types/config/bits/interviewBitConfig.d.ts.map +1 -0
  1245. package/dist/types/config/bits/interviewInstructionGroupedBitConfig.d.ts +2 -0
  1246. package/dist/types/config/bits/interviewInstructionGroupedBitConfig.d.ts.map +1 -0
  1247. package/dist/types/config/bits/learningPathBitConfig.d.ts +2 -0
  1248. package/dist/types/config/bits/learningPathBitConfig.d.ts.map +1 -0
  1249. package/dist/types/config/bits/markBitConfig.d.ts +2 -0
  1250. package/dist/types/config/bits/markBitConfig.d.ts.map +1 -0
  1251. package/dist/types/config/bits/matchBitConfig.d.ts +2 -0
  1252. package/dist/types/config/bits/matchBitConfig.d.ts.map +1 -0
  1253. package/dist/types/config/bits/messageBitConfig.d.ts +2 -0
  1254. package/dist/types/config/bits/messageBitConfig.d.ts.map +1 -0
  1255. package/dist/types/config/bits/multipleChoice1BitConfig.d.ts +2 -0
  1256. package/dist/types/config/bits/multipleChoice1BitConfig.d.ts.map +1 -0
  1257. package/dist/types/config/bits/multipleChoiceBitConfig.d.ts +2 -0
  1258. package/dist/types/config/bits/multipleChoiceBitConfig.d.ts.map +1 -0
  1259. package/dist/types/config/bits/multipleChoiceTextBitConfig.d.ts +2 -0
  1260. package/dist/types/config/bits/multipleChoiceTextBitConfig.d.ts.map +1 -0
  1261. package/dist/types/config/bits/multipleResponse1BitConfig.d.ts +2 -0
  1262. package/dist/types/config/bits/multipleResponse1BitConfig.d.ts.map +1 -0
  1263. package/dist/types/config/bits/multipleResponseBitConfig.d.ts +2 -0
  1264. package/dist/types/config/bits/multipleResponseBitConfig.d.ts.map +1 -0
  1265. package/dist/types/config/bits/newspaperArticleBitConfig.d.ts +2 -0
  1266. package/dist/types/config/bits/newspaperArticleBitConfig.d.ts.map +1 -0
  1267. package/dist/types/config/bits/noteAiBitConfig.d.ts +2 -0
  1268. package/dist/types/config/bits/noteAiBitConfig.d.ts.map +1 -0
  1269. package/dist/types/config/bits/noteBitConfig.d.ts +2 -0
  1270. package/dist/types/config/bits/noteBitConfig.d.ts.map +1 -0
  1271. package/dist/types/config/bits/notebookArticleBitConfig.d.ts +2 -0
  1272. package/dist/types/config/bits/notebookArticleBitConfig.d.ts.map +1 -0
  1273. package/dist/types/config/bits/pageBitConfig.d.ts +2 -0
  1274. package/dist/types/config/bits/pageBitConfig.d.ts.map +1 -0
  1275. package/dist/types/config/bits/photoBitConfig.d.ts +2 -0
  1276. package/dist/types/config/bits/photoBitConfig.d.ts.map +1 -0
  1277. package/dist/types/config/bits/preparationNoteBitConfig.d.ts +2 -0
  1278. package/dist/types/config/bits/preparationNoteBitConfig.d.ts.map +1 -0
  1279. package/dist/types/config/bits/question1BitConfig.d.ts +2 -0
  1280. package/dist/types/config/bits/question1BitConfig.d.ts.map +1 -0
  1281. package/dist/types/config/bits/quoteBitConfig.d.ts +2 -0
  1282. package/dist/types/config/bits/quoteBitConfig.d.ts.map +1 -0
  1283. package/dist/types/config/bits/ratingBitConfig.d.ts +2 -0
  1284. package/dist/types/config/bits/ratingBitConfig.d.ts.map +1 -0
  1285. package/dist/types/config/bits/recordAudioBitConfig.d.ts +2 -0
  1286. package/dist/types/config/bits/recordAudioBitConfig.d.ts.map +1 -0
  1287. package/dist/types/config/bits/releaseNoteBitConfig.d.ts +2 -0
  1288. package/dist/types/config/bits/releaseNoteBitConfig.d.ts.map +1 -0
  1289. package/dist/types/config/bits/releaseNotesSummaryBitConfig.d.ts +2 -0
  1290. package/dist/types/config/bits/releaseNotesSummaryBitConfig.d.ts.map +1 -0
  1291. package/dist/types/config/bits/remarkBitConfig.d.ts +2 -0
  1292. package/dist/types/config/bits/remarkBitConfig.d.ts.map +1 -0
  1293. package/dist/types/config/bits/sampleSolutionBitConfig.d.ts +2 -0
  1294. package/dist/types/config/bits/sampleSolutionBitConfig.d.ts.map +1 -0
  1295. package/dist/types/config/bits/screenshotBitConfig.d.ts +2 -0
  1296. package/dist/types/config/bits/screenshotBitConfig.d.ts.map +1 -0
  1297. package/dist/types/config/bits/selfAssessmentBitConfig.d.ts +2 -0
  1298. package/dist/types/config/bits/selfAssessmentBitConfig.d.ts.map +1 -0
  1299. package/dist/types/config/bits/sequenceBitConfig.d.ts +2 -0
  1300. package/dist/types/config/bits/sequenceBitConfig.d.ts.map +1 -0
  1301. package/dist/types/config/bits/sideNoteBitConfig.d.ts +2 -0
  1302. package/dist/types/config/bits/sideNoteBitConfig.d.ts.map +1 -0
  1303. package/dist/types/config/bits/statementBitConfig.d.ts +2 -0
  1304. package/dist/types/config/bits/statementBitConfig.d.ts.map +1 -0
  1305. package/dist/types/config/bits/stickyNoteBitConfig.d.ts +2 -0
  1306. package/dist/types/config/bits/stickyNoteBitConfig.d.ts.map +1 -0
  1307. package/dist/types/config/bits/stillImageFilmBitConfig.d.ts +2 -0
  1308. package/dist/types/config/bits/stillImageFilmBitConfig.d.ts.map +1 -0
  1309. package/dist/types/config/bits/stillImageFilmEmbedBitConfig.d.ts +2 -0
  1310. package/dist/types/config/bits/stillImageFilmEmbedBitConfig.d.ts.map +1 -0
  1311. package/dist/types/config/bits/stillImageFilmLinkBitConfig.d.ts +2 -0
  1312. package/dist/types/config/bits/stillImageFilmLinkBitConfig.d.ts.map +1 -0
  1313. package/dist/types/config/bits/summaryAiBitConfig.d.ts +2 -0
  1314. package/dist/types/config/bits/summaryAiBitConfig.d.ts.map +1 -0
  1315. package/dist/types/config/bits/summaryBitConfig.d.ts +2 -0
  1316. package/dist/types/config/bits/summaryBitConfig.d.ts.map +1 -0
  1317. package/dist/types/config/bits/survey1BitConfig.d.ts +2 -0
  1318. package/dist/types/config/bits/survey1BitConfig.d.ts.map +1 -0
  1319. package/dist/types/config/bits/surveyAnonymous1BitConfig.d.ts +2 -0
  1320. package/dist/types/config/bits/surveyAnonymous1BitConfig.d.ts.map +1 -0
  1321. package/dist/types/config/bits/surveyAnonymousBitConfig.d.ts +2 -0
  1322. package/dist/types/config/bits/surveyAnonymousBitConfig.d.ts.map +1 -0
  1323. package/dist/types/config/bits/surveyBitConfig.d.ts +2 -0
  1324. package/dist/types/config/bits/surveyBitConfig.d.ts.map +1 -0
  1325. package/dist/types/config/bits/takePictureBitConfig.d.ts +2 -0
  1326. package/dist/types/config/bits/takePictureBitConfig.d.ts.map +1 -0
  1327. package/dist/types/config/bits/tocBitConfig.d.ts +2 -0
  1328. package/dist/types/config/bits/tocBitConfig.d.ts.map +1 -0
  1329. package/dist/types/config/bits/trueFalse1BitConfig.d.ts +2 -0
  1330. package/dist/types/config/bits/trueFalse1BitConfig.d.ts.map +1 -0
  1331. package/dist/types/config/bits/trueFalseBitConfig.d.ts +2 -0
  1332. package/dist/types/config/bits/trueFalseBitConfig.d.ts.map +1 -0
  1333. package/dist/types/config/bits/vendorPadletEmbedBitConfig.d.ts +2 -0
  1334. package/dist/types/config/bits/vendorPadletEmbedBitConfig.d.ts.map +1 -0
  1335. package/dist/types/config/bits/videoBitConfig.d.ts +2 -0
  1336. package/dist/types/config/bits/videoBitConfig.d.ts.map +1 -0
  1337. package/dist/types/config/bits/videoEmbedBitConfig.d.ts +2 -0
  1338. package/dist/types/config/bits/videoEmbedBitConfig.d.ts.map +1 -0
  1339. package/dist/types/config/bits/videoLandscapeBitConfig.d.ts +2 -0
  1340. package/dist/types/config/bits/videoLandscapeBitConfig.d.ts.map +1 -0
  1341. package/dist/types/config/bits/videoLinkBitConfig.d.ts +2 -0
  1342. package/dist/types/config/bits/videoLinkBitConfig.d.ts.map +1 -0
  1343. package/dist/types/config/bits/videoPortraitBitConfig.d.ts +2 -0
  1344. package/dist/types/config/bits/videoPortraitBitConfig.d.ts.map +1 -0
  1345. package/dist/types/config/bits/warningBitConfig.d.ts +2 -0
  1346. package/dist/types/config/bits/warningBitConfig.d.ts.map +1 -0
  1347. package/dist/types/config/bits/websiteLinkBitConfig.d.ts +2 -0
  1348. package/dist/types/config/bits/websiteLinkBitConfig.d.ts.map +1 -0
  1349. package/dist/types/config/bits/workbookArticleBitConfig.d.ts +2 -0
  1350. package/dist/types/config/bits/workbookArticleBitConfig.d.ts.map +1 -0
  1351. package/dist/types/config/config.d.ts +173 -0
  1352. package/dist/types/config/config.d.ts.map +1 -0
  1353. package/dist/types/config/properties/actionPropertyConfig.d.ts +2 -0
  1354. package/dist/types/config/properties/actionPropertyConfig.d.ts.map +1 -0
  1355. package/dist/types/config/properties/ageRangePropertyConfig.d.ts +2 -0
  1356. package/dist/types/config/properties/ageRangePropertyConfig.d.ts.map +1 -0
  1357. package/dist/types/config/properties/aiGeneratedPropertyConfig.d.ts +2 -0
  1358. package/dist/types/config/properties/aiGeneratedPropertyConfig.d.ts.map +1 -0
  1359. package/dist/types/config/properties/authorPropertyConfig.d.ts +2 -0
  1360. package/dist/types/config/properties/authorPropertyConfig.d.ts.map +1 -0
  1361. package/dist/types/config/properties/bookPropertyConfig.d.ts +2 -0
  1362. package/dist/types/config/properties/bookPropertyConfig.d.ts.map +1 -0
  1363. package/dist/types/config/properties/botPropertyConfig.d.ts +2 -0
  1364. package/dist/types/config/properties/botPropertyConfig.d.ts.map +1 -0
  1365. package/dist/types/config/properties/caseSensitivePropertyConfig.d.ts +2 -0
  1366. package/dist/types/config/properties/caseSensitivePropertyConfig.d.ts.map +1 -0
  1367. package/dist/types/config/properties/computerLanguagePropertyConfig.d.ts +2 -0
  1368. package/dist/types/config/properties/computerLanguagePropertyConfig.d.ts.map +1 -0
  1369. package/dist/types/config/properties/coverImagePropertyConfig.d.ts +2 -0
  1370. package/dist/types/config/properties/coverImagePropertyConfig.d.ts.map +1 -0
  1371. package/dist/types/config/properties/datePropertyConfig.d.ts +2 -0
  1372. package/dist/types/config/properties/datePropertyConfig.d.ts.map +1 -0
  1373. package/dist/types/config/properties/deeplinkPropertyConfig.d.ts +2 -0
  1374. package/dist/types/config/properties/deeplinkPropertyConfig.d.ts.map +1 -0
  1375. package/dist/types/config/properties/durationPropertyConfig.d.ts +2 -0
  1376. package/dist/types/config/properties/durationPropertyConfig.d.ts.map +1 -0
  1377. package/dist/types/config/properties/examplePropertyConfig.d.ts +2 -0
  1378. package/dist/types/config/properties/examplePropertyConfig.d.ts.map +1 -0
  1379. package/dist/types/config/properties/externalIdPropertyConfig.d.ts +2 -0
  1380. package/dist/types/config/properties/externalIdPropertyConfig.d.ts.map +1 -0
  1381. package/dist/types/config/properties/externalLinkPropertyConfig.d.ts +2 -0
  1382. package/dist/types/config/properties/externalLinkPropertyConfig.d.ts.map +1 -0
  1383. package/dist/types/config/properties/externalLinkTextPropertyConfig.d.ts +2 -0
  1384. package/dist/types/config/properties/externalLinkTextPropertyConfig.d.ts.map +1 -0
  1385. package/dist/types/config/properties/focusXPropertyConfig.d.ts +2 -0
  1386. package/dist/types/config/properties/focusXPropertyConfig.d.ts.map +1 -0
  1387. package/dist/types/config/properties/focusYPropertyConfig.d.ts +2 -0
  1388. package/dist/types/config/properties/focusYPropertyConfig.d.ts.map +1 -0
  1389. package/dist/types/config/properties/idPropertyConfig.d.ts +2 -0
  1390. package/dist/types/config/properties/idPropertyConfig.d.ts.map +1 -0
  1391. package/dist/types/config/properties/isInfoOnlyPropertyConfig.d.ts +2 -0
  1392. package/dist/types/config/properties/isInfoOnlyPropertyConfig.d.ts.map +1 -0
  1393. package/dist/types/config/properties/isTrackedPropertyConfig.d.ts +2 -0
  1394. package/dist/types/config/properties/isTrackedPropertyConfig.d.ts.map +1 -0
  1395. package/dist/types/config/properties/kindPropertyConfig.d.ts +2 -0
  1396. package/dist/types/config/properties/kindPropertyConfig.d.ts.map +1 -0
  1397. package/dist/types/config/properties/labelFalsePropertyConfig.d.ts +2 -0
  1398. package/dist/types/config/properties/labelFalsePropertyConfig.d.ts.map +1 -0
  1399. package/dist/types/config/properties/labelTruePropertyConfig.d.ts +2 -0
  1400. package/dist/types/config/properties/labelTruePropertyConfig.d.ts.map +1 -0
  1401. package/dist/types/config/properties/languagePropertyConfig.d.ts +2 -0
  1402. package/dist/types/config/properties/languagePropertyConfig.d.ts.map +1 -0
  1403. package/dist/types/config/properties/levelPropertyConfig.d.ts +2 -0
  1404. package/dist/types/config/properties/levelPropertyConfig.d.ts.map +1 -0
  1405. package/dist/types/config/properties/listPropertyConfig.d.ts +2 -0
  1406. package/dist/types/config/properties/listPropertyConfig.d.ts.map +1 -0
  1407. package/dist/types/config/properties/locationPropertyConfig.d.ts +2 -0
  1408. package/dist/types/config/properties/locationPropertyConfig.d.ts.map +1 -0
  1409. package/dist/types/config/properties/longAnswerPropertyConfig.d.ts +2 -0
  1410. package/dist/types/config/properties/longAnswerPropertyConfig.d.ts.map +1 -0
  1411. package/dist/types/config/properties/padletIdPropertyConfig.d.ts +2 -0
  1412. package/dist/types/config/properties/padletIdPropertyConfig.d.ts.map +1 -0
  1413. package/dist/types/config/properties/partialAnswerPropertyConfig.d.ts +2 -0
  1414. package/dist/types/config/properties/partialAnswerPropertyConfig.d.ts.map +1 -0
  1415. package/dist/types/config/properties/partnerPropertyConfig.d.ts +2 -0
  1416. package/dist/types/config/properties/partnerPropertyConfig.d.ts.map +1 -0
  1417. package/dist/types/config/properties/progressPropertyConfig.d.ts +2 -0
  1418. package/dist/types/config/properties/progressPropertyConfig.d.ts.map +1 -0
  1419. package/dist/types/config/properties/publicationsPropertyConfig.d.ts +2 -0
  1420. package/dist/types/config/properties/publicationsPropertyConfig.d.ts.map +1 -0
  1421. package/dist/types/config/properties/publisherPropertyConfig.d.ts +2 -0
  1422. package/dist/types/config/properties/publisherPropertyConfig.d.ts.map +1 -0
  1423. package/dist/types/config/properties/quotedPersonPropertyConfig.d.ts +2 -0
  1424. package/dist/types/config/properties/quotedPersonPropertyConfig.d.ts.map +1 -0
  1425. package/dist/types/config/properties/reactionPropertyConfig.d.ts +2 -0
  1426. package/dist/types/config/properties/reactionPropertyConfig.d.ts.map +1 -0
  1427. package/dist/types/config/properties/referencePropertyConfig.d.ts +2 -0
  1428. package/dist/types/config/properties/referencePropertyConfig.d.ts.map +1 -0
  1429. package/dist/types/config/properties/releaseVersionPropertyConfig.d.ts +2 -0
  1430. package/dist/types/config/properties/releaseVersionPropertyConfig.d.ts.map +1 -0
  1431. package/dist/types/config/properties/resourcePropertyConfig.d.ts +2 -0
  1432. package/dist/types/config/properties/resourcePropertyConfig.d.ts.map +1 -0
  1433. package/dist/types/config/properties/sampleSolutionPropertyConfig.d.ts +2 -0
  1434. package/dist/types/config/properties/sampleSolutionPropertyConfig.d.ts.map +1 -0
  1435. package/dist/types/config/properties/shortAnswerPropertyConfig.d.ts +2 -0
  1436. package/dist/types/config/properties/shortAnswerPropertyConfig.d.ts.map +1 -0
  1437. package/dist/types/config/properties/spaceIdPropertyConfig.d.ts +2 -0
  1438. package/dist/types/config/properties/spaceIdPropertyConfig.d.ts.map +1 -0
  1439. package/dist/types/config/properties/subjectPropertyConfig.d.ts +2 -0
  1440. package/dist/types/config/properties/subjectPropertyConfig.d.ts.map +1 -0
  1441. package/dist/types/config/properties/subtypePropertyConfig.d.ts +2 -0
  1442. package/dist/types/config/properties/subtypePropertyConfig.d.ts.map +1 -0
  1443. package/dist/types/config/properties/textReferencePropertyConfig.d.ts +2 -0
  1444. package/dist/types/config/properties/textReferencePropertyConfig.d.ts.map +1 -0
  1445. package/dist/types/config/properties/themePropertyConfig.d.ts +2 -0
  1446. package/dist/types/config/properties/themePropertyConfig.d.ts.map +1 -0
  1447. package/dist/types/config/properties/thumbImagePropertyConfig.d.ts +2 -0
  1448. package/dist/types/config/properties/thumbImagePropertyConfig.d.ts.map +1 -0
  1449. package/dist/types/config/properties/tocPropertyConfig.d.ts +2 -0
  1450. package/dist/types/config/properties/tocPropertyConfig.d.ts.map +1 -0
  1451. package/dist/types/config/properties/videoCallLinkPropertyConfig copy.d.ts +2 -0
  1452. package/dist/types/config/properties/videoCallLinkPropertyConfig copy.d.ts.map +1 -0
  1453. package/dist/types/config/properties/videoCallLinkPropertyConfig.d.ts +2 -0
  1454. package/dist/types/config/properties/videoCallLinkPropertyConfig.d.ts.map +1 -0
  1455. package/dist/types/generated/build-info.d.ts +5 -0
  1456. package/dist/types/generated/build-info.d.ts.map +1 -0
  1457. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts +11 -0
  1458. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +1 -0
  1459. package/dist/types/generated/parser/text/text-peggy-parser.d.ts +11 -0
  1460. package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +1 -0
  1461. package/dist/types/generator/Generator.d.ts +6 -0
  1462. package/dist/types/generator/Generator.d.ts.map +1 -0
  1463. package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts +42 -0
  1464. package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts.map +1 -0
  1465. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +263 -0
  1466. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -0
  1467. package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts +31 -0
  1468. package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts.map +1 -0
  1469. package/dist/types/generator/json/JsonFileGenerator.d.ts +46 -0
  1470. package/dist/types/generator/json/JsonFileGenerator.d.ts.map +1 -0
  1471. package/dist/types/generator/json/JsonGenerator.d.ts +288 -0
  1472. package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -0
  1473. package/dist/types/generator/json/JsonObjectGenerator.d.ts +32 -0
  1474. package/dist/types/generator/json/JsonObjectGenerator.d.ts.map +1 -0
  1475. package/dist/types/generator/json/JsonStringGenerator.d.ts +30 -0
  1476. package/dist/types/generator/json/JsonStringGenerator.d.ts.map +1 -0
  1477. package/dist/types/generator/text/TextGenerator.d.ts +127 -0
  1478. package/dist/types/generator/text/TextGenerator.d.ts.map +1 -0
  1479. package/dist/types/index.d.ts +44 -0
  1480. package/dist/types/index.d.ts.map +1 -0
  1481. package/dist/types/init/init.d.ts +4 -0
  1482. package/dist/types/init/init.d.ts.map +1 -0
  1483. package/dist/types/model/ast/NodeType.d.ts +445 -0
  1484. package/dist/types/model/ast/NodeType.d.ts.map +1 -0
  1485. package/dist/types/model/ast/Nodes.d.ts +408 -0
  1486. package/dist/types/model/ast/Nodes.d.ts.map +1 -0
  1487. package/dist/types/model/ast/TextNodes.d.ts +73 -0
  1488. package/dist/types/model/ast/TextNodes.d.ts.map +1 -0
  1489. package/dist/types/model/config/TagData.d.ts +14 -0
  1490. package/dist/types/model/config/TagData.d.ts.map +1 -0
  1491. package/dist/types/model/enum/BitType.d.ts +385 -0
  1492. package/dist/types/model/enum/BitType.d.ts.map +1 -0
  1493. package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts +1 -0
  1494. package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts.map +1 -0
  1495. package/dist/types/model/enum/BitmarkParserType.d.ts +11 -0
  1496. package/dist/types/model/enum/BitmarkParserType.d.ts.map +1 -0
  1497. package/dist/types/model/enum/BitmarkVersion.d.ts +12 -0
  1498. package/dist/types/model/enum/BitmarkVersion.d.ts.map +1 -0
  1499. package/dist/types/model/enum/BodyBitType.d.ts +22 -0
  1500. package/dist/types/model/enum/BodyBitType.d.ts.map +1 -0
  1501. package/dist/types/model/enum/CardSetType.d.ts +21 -0
  1502. package/dist/types/model/enum/CardSetType.d.ts.map +1 -0
  1503. package/dist/types/model/enum/CardSetVersion.d.ts +11 -0
  1504. package/dist/types/model/enum/CardSetVersion.d.ts.map +1 -0
  1505. package/dist/types/model/enum/PropertyKey.d.ts +150 -0
  1506. package/dist/types/model/enum/PropertyKey.d.ts.map +1 -0
  1507. package/dist/types/model/enum/ResourceType.d.ts +76 -0
  1508. package/dist/types/model/enum/ResourceType.d.ts.map +1 -0
  1509. package/dist/types/model/enum/TagType.d.ts +35 -0
  1510. package/dist/types/model/enum/TagType.d.ts.map +1 -0
  1511. package/dist/types/model/enum/TextFormat.d.ts +13 -0
  1512. package/dist/types/model/enum/TextFormat.d.ts.map +1 -0
  1513. package/dist/types/model/enum/TextMarkType.d.ts +37 -0
  1514. package/dist/types/model/enum/TextMarkType.d.ts.map +1 -0
  1515. package/dist/types/model/enum/TextNodeType.d.ts +37 -0
  1516. package/dist/types/model/enum/TextNodeType.d.ts.map +1 -0
  1517. package/dist/types/model/enum/TextSection.d.ts +27 -0
  1518. package/dist/types/model/enum/TextSection.d.ts.map +1 -0
  1519. package/dist/types/model/json/BitJson.d.ts +187 -0
  1520. package/dist/types/model/json/BitJson.d.ts.map +1 -0
  1521. package/dist/types/model/json/BitWrapperJson.d.ts +8 -0
  1522. package/dist/types/model/json/BitWrapperJson.d.ts.map +1 -0
  1523. package/dist/types/model/json/BodyBitJson.d.ts +61 -0
  1524. package/dist/types/model/json/BodyBitJson.d.ts.map +1 -0
  1525. package/dist/types/model/json/ParserJson.d.ts +10 -0
  1526. package/dist/types/model/json/ParserJson.d.ts.map +1 -0
  1527. package/dist/types/model/json/ResourceJson.d.ts +252 -0
  1528. package/dist/types/model/json/ResourceJson.d.ts.map +1 -0
  1529. package/dist/types/model/parser/ParserData.d.ts +11 -0
  1530. package/dist/types/model/parser/ParserData.d.ts.map +1 -0
  1531. package/dist/types/model/parser/ParserError.d.ts +17 -0
  1532. package/dist/types/model/parser/ParserError.d.ts.map +1 -0
  1533. package/dist/types/model/parser/ParserInfo.d.ts +10 -0
  1534. package/dist/types/model/parser/ParserInfo.d.ts.map +1 -0
  1535. package/dist/types/model/parser/ParserLocation.d.ts +6 -0
  1536. package/dist/types/model/parser/ParserLocation.d.ts.map +1 -0
  1537. package/dist/types/model/parser/ParserLocationRange.d.ts +10 -0
  1538. package/dist/types/model/parser/ParserLocationRange.d.ts.map +1 -0
  1539. package/dist/types/parser/bitmark/BitmarkParser.d.ts +28 -0
  1540. package/dist/types/parser/bitmark/BitmarkParser.d.ts.map +1 -0
  1541. package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts +8 -0
  1542. package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts.map +1 -0
  1543. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +96 -0
  1544. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +1 -0
  1545. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +128 -0
  1546. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -0
  1547. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +261 -0
  1548. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -0
  1549. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +182 -0
  1550. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +1 -0
  1551. package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts +61 -0
  1552. package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts.map +1 -0
  1553. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +5 -0
  1554. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +1 -0
  1555. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +6 -0
  1556. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +1 -0
  1557. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +5 -0
  1558. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +1 -0
  1559. package/dist/types/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.d.ts +5 -0
  1560. package/dist/types/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.d.ts.map +1 -0
  1561. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +5 -0
  1562. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +1 -0
  1563. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +6 -0
  1564. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +1 -0
  1565. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +5 -0
  1566. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -0
  1567. package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts +5 -0
  1568. package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts.map +1 -0
  1569. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +5 -0
  1570. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -0
  1571. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +5 -0
  1572. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +1 -0
  1573. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +14 -0
  1574. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +1 -0
  1575. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +6 -0
  1576. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -0
  1577. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +6 -0
  1578. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +1 -0
  1579. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +5 -0
  1580. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +1 -0
  1581. package/dist/types/parser/json/JsonParser.d.ts +77 -0
  1582. package/dist/types/parser/json/JsonParser.d.ts.map +1 -0
  1583. package/dist/types/parser/text/TextParser.d.ts +19 -0
  1584. package/dist/types/parser/text/TextParser.d.ts.map +1 -0
  1585. package/dist/types/parser/text/peg/TextPegParser.d.ts +8 -0
  1586. package/dist/types/parser/text/peg/TextPegParser.d.ts.map +1 -0
  1587. package/dist/types/utils/ArrayUtils.d.ts +25 -0
  1588. package/dist/types/utils/ArrayUtils.d.ts.map +1 -0
  1589. package/dist/types/utils/BitUtils.d.ts +17 -0
  1590. package/dist/types/utils/BitUtils.d.ts.map +1 -0
  1591. package/dist/types/utils/BooleanUtils.d.ts +30 -0
  1592. package/dist/types/utils/BooleanUtils.d.ts.map +1 -0
  1593. package/dist/types/utils/FileUtils.d.ts +12 -0
  1594. package/dist/types/utils/FileUtils.d.ts.map +1 -0
  1595. package/dist/types/utils/NumberUtils.d.ts +16 -0
  1596. package/dist/types/utils/NumberUtils.d.ts.map +1 -0
  1597. package/dist/types/utils/ObjectUtils.d.ts +118 -0
  1598. package/dist/types/utils/ObjectUtils.d.ts.map +1 -0
  1599. package/dist/types/utils/StringUtils.d.ts +46 -0
  1600. package/dist/types/utils/StringUtils.d.ts.map +1 -0
  1601. package/dist/types/utils/UrlUtils.d.ts +7 -0
  1602. package/dist/types/utils/UrlUtils.d.ts.map +1 -0
  1603. package/dist/types/utils/env/Env.d.ts +39 -0
  1604. package/dist/types/utils/env/Env.d.ts.map +1 -0
  1605. package/dist/types/utils/env/Environment.d.ts +21 -0
  1606. package/dist/types/utils/env/Environment.d.ts.map +1 -0
  1607. package/dist/types/utils/env/Os.d.ts +19 -0
  1608. package/dist/types/utils/env/Os.d.ts.map +1 -0
  1609. package/dist/types/utils/env/Version.d.ts +10 -0
  1610. package/dist/types/utils/env/Version.d.ts.map +1 -0
  1611. package/dist/types/utils/env/userAgent.d.ts +11 -0
  1612. package/dist/types/utils/env/userAgent.d.ts.map +1 -0
  1613. package/dist/types/utils/polyfill/fs.d.ts +6 -0
  1614. package/dist/types/utils/polyfill/fs.d.ts.map +1 -0
  1615. package/package.json +127 -0
@@ -0,0 +1,2046 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __rest = (this && this.__rest) || function (s, e) {
11
+ var t = {};
12
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
+ t[p] = s[p];
14
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
+ t[p[i]] = s[p[i]];
18
+ }
19
+ return t;
20
+ };
21
+ import { Ast } from '../../ast/Ast';
22
+ import { NodeType } from '../../model/ast/NodeType';
23
+ import { BitType } from '../../model/enum/BitType';
24
+ import { BitmarkVersion, DEFAULT_BITMARK_VERSION } from '../../model/enum/BitmarkVersion';
25
+ import { BodyBitType } from '../../model/enum/BodyBitType';
26
+ import { PropertyKey } from '../../model/enum/PropertyKey';
27
+ import { ResourceType } from '../../model/enum/ResourceType';
28
+ import { TextFormat } from '../../model/enum/TextFormat';
29
+ import { TextParser } from '../../parser/text/TextParser';
30
+ import { ArrayUtils } from '../../utils/ArrayUtils';
31
+ import { StringUtils } from '../../utils/StringUtils';
32
+ import { UrlUtils } from '../../utils/UrlUtils';
33
+ const DEFAULT_OPTIONS = {
34
+ // debugGenerationInline: true,
35
+ };
36
+ /**
37
+ * Generate bitmark JSON from a bitmark AST
38
+ *
39
+ * TODO: NOT IMPLEMENTED!
40
+ */
41
+ class JsonGenerator {
42
+ /**
43
+ * Generate bitmark JSON from a bitmark AST
44
+ *
45
+ * @param writer - destination for the output
46
+ * @param options - JSON generation options
47
+ */
48
+ constructor(writer, options) {
49
+ var _a;
50
+ this.ast = new Ast();
51
+ this.textParser = new TextParser();
52
+ // State
53
+ this.json = [];
54
+ this.bitWrapperJson = {};
55
+ this.bitJson = {};
56
+ this.textDefault = '';
57
+ this.bodyDefault = '';
58
+ // Debug
59
+ this.printed = false;
60
+ this.bitmarkVersion = (_a = BitmarkVersion.fromValue(options === null || options === void 0 ? void 0 : options.bitmarkVersion)) !== null && _a !== void 0 ? _a : DEFAULT_BITMARK_VERSION;
61
+ this.options = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options === null || options === void 0 ? void 0 : options.jsonOptions);
62
+ this.jsonPrettifySpace = this.options.prettify === true ? 2 : this.options.prettify || undefined;
63
+ // Set defaults according to bitmark version
64
+ if (this.bitmarkVersion === BitmarkVersion.v2) {
65
+ if (this.options.textAsPlainText === undefined) {
66
+ this.options.textAsPlainText = true;
67
+ }
68
+ }
69
+ else {
70
+ if (this.options.textAsPlainText === undefined) {
71
+ this.options.textAsPlainText = false;
72
+ }
73
+ }
74
+ this.writer = writer;
75
+ this.enter = this.enter.bind(this);
76
+ this.between = this.between.bind(this);
77
+ this.exit = this.exit.bind(this);
78
+ this.leaf = this.leaf.bind(this);
79
+ this.generatePropertyHandlers();
80
+ }
81
+ /**
82
+ * Generate bitmark markup from bitmark AST
83
+ *
84
+ * @param ast bitmark AST
85
+ */
86
+ generate(ast) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ // Reset the state
89
+ this.resetState();
90
+ // Open the writer
91
+ yield this.writer.open();
92
+ // Walk the bitmark AST
93
+ this.walkAndWrite(ast);
94
+ // Write the JSON object to file
95
+ this.write(JSON.stringify(this.json, null, this.jsonPrettifySpace));
96
+ // Close the writer
97
+ yield this.writer.close();
98
+ });
99
+ }
100
+ /**
101
+ * Generate text from a bitmark text AST synchronously
102
+ *
103
+ * @param ast bitmark text AST
104
+ */
105
+ generateSync(ast) {
106
+ // Reset the state
107
+ this.resetState();
108
+ // Open the writer
109
+ this.writer.openSync();
110
+ // Walk the bitmark AST
111
+ this.walkAndWrite(ast);
112
+ // Close the writer
113
+ this.writer.closeSync();
114
+ }
115
+ resetState() {
116
+ this.json = [];
117
+ this.bitWrapperJson = {};
118
+ this.bitJson = {};
119
+ this.textDefault = this.options.textAsPlainText ? '' : [];
120
+ this.bodyDefault = this.options.textAsPlainText ? '' : [];
121
+ this.printed = false;
122
+ }
123
+ walkAndWrite(ast) {
124
+ // Walk the bitmark AST
125
+ this.ast.walk(ast, NodeType.bitmarkAst, this, undefined);
126
+ }
127
+ enter(node, parent, route) {
128
+ let res = void 0;
129
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
130
+ const gen = this;
131
+ const funcName = `enter_${node.key}`;
132
+ if (!this.printed) {
133
+ this.printed = true;
134
+ }
135
+ if (this.options.debugGenerationInline)
136
+ this.writeInlineDebug(node.key, { open: true });
137
+ if (typeof gen[funcName] === 'function') {
138
+ res = gen[funcName](node, parent, route);
139
+ }
140
+ return res;
141
+ }
142
+ between(node, left, right, parent, route) {
143
+ let res = void 0;
144
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
145
+ const gen = this;
146
+ const funcName = `between_${node.key}`;
147
+ if (this.options.debugGenerationInline)
148
+ this.writeInlineDebug(node.key, { single: true });
149
+ if (typeof gen[funcName] === 'function') {
150
+ res = gen[funcName](node, left, right, parent, route);
151
+ }
152
+ return res;
153
+ }
154
+ exit(node, parent, route) {
155
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
156
+ const gen = this;
157
+ const funcName = `exit_${node.key}`;
158
+ if (this.options.debugGenerationInline)
159
+ this.writeInlineDebug(node.key, { close: true });
160
+ if (typeof gen[funcName] === 'function') {
161
+ gen[funcName](node, parent, route);
162
+ }
163
+ }
164
+ leaf(node, parent, route) {
165
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
166
+ const gen = this;
167
+ const funcName = `leaf_${node.key}`;
168
+ if (this.options.debugGenerationInline)
169
+ this.writeInlineDebug(node.key, { open: true });
170
+ if (typeof gen[funcName] === 'function') {
171
+ gen[funcName](node, parent, route);
172
+ }
173
+ if (this.options.debugGenerationInline)
174
+ this.writeInlineDebug(node.key, { close: true });
175
+ }
176
+ //
177
+ // NODE HANDLERS
178
+ //
179
+ //
180
+ // Non-Terminal nodes (branches)
181
+ //
182
+ // bitmark
183
+ enter_bitmarkAst(_node, _parent, _route) {
184
+ // Reset the JSON
185
+ this.json = [];
186
+ }
187
+ // bitmarkAst -> bits
188
+ // bitmarkAst -> bits -> bitsValue
189
+ enter_bitsValue(node, _parent, _route) {
190
+ const bit = node.value;
191
+ // Reset
192
+ this.bitWrapperJson = {
193
+ //
194
+ };
195
+ this.json.push(this.bitWrapperJson);
196
+ this.bitJson = this.createBitJson(bit);
197
+ this.bitWrapperJson.bit = this.bitJson;
198
+ }
199
+ exit_bitsValue(_node, _parent, _route) {
200
+ // Clean up the bit JSON, removing any unwanted values
201
+ this.cleanAndSetDefaultsForBitJson(this.bitJson);
202
+ }
203
+ // bitmarkAst -> bits -> bitsValue -> partner
204
+ enter_partner(node, parent, _route) {
205
+ const partner = node.value;
206
+ // Ignore example that is not at the bit level as it are handled elsewhere
207
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
208
+ return;
209
+ const { name, avatarImage } = partner;
210
+ const partnerJson = {};
211
+ this.addProperty(partnerJson, 'name', name !== null && name !== void 0 ? name : '', true);
212
+ if (avatarImage) {
213
+ const res = this.parseResourceToJson(avatarImage);
214
+ if (res && res.type === ResourceType.image) {
215
+ partnerJson.avatarImage = res.image;
216
+ }
217
+ }
218
+ this.bitJson.partner = partnerJson;
219
+ }
220
+ // bitmarkAst -> bits -> bitsValue -> sampleSolution
221
+ enter_sampleSolution(node, _parent, _route) {
222
+ if (node.value != null)
223
+ this.addProperty(this.bitJson, 'sampleSolution', node.value, true);
224
+ }
225
+ // bitmarkAst -> bits -> bitsValue -> itemLead
226
+ enter_itemLead(node, parent, _route) {
227
+ const itemLead = node.value;
228
+ const { item, lead } = itemLead;
229
+ // Ignore item / lead that are not at the bit level as they are handled elsewhere
230
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
231
+ return;
232
+ if (item != null) {
233
+ this.bitJson.item = this.toTextAstOrString(item);
234
+ }
235
+ if (lead != null) {
236
+ this.bitJson.lead = this.toTextAstOrString(lead);
237
+ }
238
+ }
239
+ // bitmarkAst -> bits -> bitsValue -> extraProperties
240
+ enter_extraProperties(node, _parent, _route) {
241
+ const extraProperties = node.value;
242
+ if (!this.options.excludeUnknownProperties && extraProperties) {
243
+ for (const [key, values] of Object.entries(extraProperties)) {
244
+ let k = key;
245
+ if (Object.prototype.hasOwnProperty.call(this.bitJson, key)) {
246
+ k = `_${key}`;
247
+ }
248
+ this.addProperty(this.bitJson, k, values);
249
+ }
250
+ }
251
+ }
252
+ // bitmarkAst -> bits -> bitsValue -> body -> bodyParts
253
+ enter_bodyParts(node, _parent, route) {
254
+ const bodyParts = node.value;
255
+ const plainText = this.options.textAsPlainText;
256
+ const textFormat = this.getTextFormat(route);
257
+ let fullBodyTextStr = '';
258
+ let placeholderIndex = 0;
259
+ // Ensure body exists
260
+ if (this.bitJson.body == null)
261
+ this.bitJson.body = this.bodyDefault;
262
+ // Function for creating the placeholder keys
263
+ const createPlaceholderKeys = (i) => {
264
+ return {
265
+ // Old placeholder style (for backwards compatibility) = {0}
266
+ legacyPlaceholderKey: `{${i}}`,
267
+ // New placeholder style (cannot clash as bitmark parser would have removed it) = [!0]
268
+ placeholderKey: `[!${i}]`,
269
+ };
270
+ };
271
+ // Loop the text bodyParts creating full body text with the correct placeholders
272
+ //
273
+ // For text output 'fullBodyTextStr:
274
+ // - is created and written to the JSON
275
+ // - has placeholders inserted into 'fullBodyTextStr' in the format {0}
276
+ //
277
+ // For JSON output 'fullBodyTextStr:
278
+ // - is created and passed into the text parser to create the body text AST
279
+ // - has placeholders inserted into 'fullBodyTextStr' in the format [!0] to allow the text parser to identify
280
+ // where the body bits should be inserted
281
+ //
282
+ for (let i = 0; i < bodyParts.length; i++) {
283
+ const bodyPart = bodyParts[i];
284
+ const isText = bodyPart.type === BodyBitType.text;
285
+ if (isText) {
286
+ const asText = bodyPart;
287
+ const bodyTextPart = asText.data.bodyText;
288
+ // Append the text part to the full text body
289
+ fullBodyTextStr += bodyTextPart;
290
+ }
291
+ else {
292
+ const { legacyPlaceholderKey, placeholderKey } = createPlaceholderKeys(placeholderIndex);
293
+ // Append the placeholder to the full text body
294
+ fullBodyTextStr += plainText ? legacyPlaceholderKey : placeholderKey;
295
+ placeholderIndex++;
296
+ }
297
+ }
298
+ // Add string or AST to the body
299
+ this.bitJson.body = this.toTextAstOrString(fullBodyTextStr, textFormat);
300
+ const bodyAst = this.bitJson.body;
301
+ // Loop the body parts again to create the body bits:
302
+ // - For text output the body bits are inserted into the 'placeholders' object
303
+ // - For JSON output the body bits are inserted into body AST, replacing the placeholders created by the text parser
304
+ placeholderIndex = 0;
305
+ for (let i = 0; i < bodyParts.length; i++) {
306
+ const bodyPart = bodyParts[i];
307
+ // Skip text body parts as they are handled above
308
+ const isText = bodyPart.type === BodyBitType.text;
309
+ if (isText)
310
+ continue;
311
+ const bodyBit = bodyPart;
312
+ let bodyBitJson;
313
+ const { legacyPlaceholderKey } = createPlaceholderKeys(placeholderIndex);
314
+ switch (bodyPart.type) {
315
+ case BodyBitType.gap: {
316
+ const gap = bodyBit;
317
+ bodyBitJson = this.createGapJson(gap);
318
+ break;
319
+ }
320
+ case BodyBitType.select: {
321
+ const select = bodyBit;
322
+ bodyBitJson = this.createSelectJson(select);
323
+ break;
324
+ }
325
+ case BodyBitType.highlight: {
326
+ const highlight = bodyBit;
327
+ bodyBitJson = this.createHighlightJson(highlight);
328
+ break;
329
+ }
330
+ }
331
+ // Add the gap to the placeholders
332
+ if (bodyBitJson) {
333
+ if (plainText) {
334
+ // Ensure placeholders exists
335
+ if (!this.bitJson.placeholders)
336
+ this.bitJson.placeholders = {};
337
+ // Add the body bit to the placeholders
338
+ this.bitJson.placeholders[legacyPlaceholderKey] = bodyBitJson;
339
+ }
340
+ else {
341
+ // Insert the body bit into the body AST
342
+ this.replacePlaceholderWithBodyBit(bodyAst, bodyBitJson, placeholderIndex);
343
+ }
344
+ }
345
+ placeholderIndex++;
346
+ }
347
+ // Stop traversal of this branch for efficiency
348
+ return false;
349
+ }
350
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> elements
351
+ enter_elements(node, _parent, _route) {
352
+ const elements = node.value;
353
+ // Ignore elements that are not at the bit level as they are handled elsewhere as quizzes
354
+ // if (parent?.key !== NodeType.bitsValue) return;
355
+ if (elements && elements.length > 0) {
356
+ this.bitJson.elements = elements;
357
+ }
358
+ }
359
+ // bitmarkAst -> bits -> bitsValue -> statement
360
+ enter_statement(node, parent, _route) {
361
+ var _a, _b;
362
+ const statement = node.value;
363
+ // Ignore statement that is not at the bit level as it is handled elsewhere
364
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
365
+ return;
366
+ if (statement) {
367
+ this.bitJson.statement = (_a = statement.text) !== null && _a !== void 0 ? _a : '';
368
+ this.bitJson.isCorrect = (_b = statement.isCorrect) !== null && _b !== void 0 ? _b : false;
369
+ }
370
+ }
371
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> statements -> statementsValue
372
+ enter_statements(node, parent, _route) {
373
+ var _a, _b, _c, _d;
374
+ const statements = node.value;
375
+ // Ignore statements that are not at the card node level as they are handled elsewhere
376
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
377
+ return;
378
+ const statementsJson = [];
379
+ if (statements) {
380
+ for (const s of statements) {
381
+ // Create the statement
382
+ const statementJson = Object.assign(Object.assign({ statement: (_a = s.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = s.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(s)), this.toExampleAndIsExample(s.example));
383
+ // Delete unwanted properties
384
+ if (((_c = s.itemLead) === null || _c === void 0 ? void 0 : _c.item) == null)
385
+ delete statementJson.item;
386
+ if (((_d = s.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
387
+ delete statementJson.lead;
388
+ if ((s === null || s === void 0 ? void 0 : s.hint) == null)
389
+ delete statementJson.hint;
390
+ if ((s === null || s === void 0 ? void 0 : s.instruction) == null)
391
+ delete statementJson.instruction;
392
+ if ((s === null || s === void 0 ? void 0 : s.example) == null)
393
+ delete statementJson.example;
394
+ statementsJson.push(statementJson);
395
+ }
396
+ }
397
+ if (statementsJson.length > 0) {
398
+ this.bitJson.statements = statementsJson;
399
+ }
400
+ }
401
+ // bitmarkAst -> bits -> bitsValue -> choices
402
+ // X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> choices
403
+ enter_choices(node, parent, _route) {
404
+ var _a, _b, _c;
405
+ const choices = node.value;
406
+ // Ignore choices that are not at the bit level as they are handled elsewhere as quizzes
407
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
408
+ return;
409
+ const choicesJson = [];
410
+ if (choices) {
411
+ for (const c of choices) {
412
+ // Create the choice
413
+ const choiceJson = Object.assign({ choice: (_a = c.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = c.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(c));
414
+ // Delete unwanted properties
415
+ if (((_c = c.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
416
+ delete choiceJson.lead;
417
+ choicesJson.push(choiceJson);
418
+ }
419
+ }
420
+ if (choicesJson.length > 0) {
421
+ this.bitJson.choices = choicesJson;
422
+ }
423
+ }
424
+ // bitmarkAst -> bits -> bitsValue -> responses
425
+ // X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> responses
426
+ enter_responses(node, parent, _route) {
427
+ var _a, _b, _c;
428
+ const responses = node.value;
429
+ // Ignore responses that are not at the bit level as they are handled elsewhere as quizzes
430
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
431
+ return;
432
+ const responsesJson = [];
433
+ if (responses) {
434
+ for (const r of responses) {
435
+ // Create the response
436
+ const responseJson = Object.assign({ response: (_a = r.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = r.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(r));
437
+ // Delete unwanted properties
438
+ if (((_c = r.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
439
+ delete responseJson.lead;
440
+ responsesJson.push(responseJson);
441
+ }
442
+ }
443
+ if (responsesJson.length > 0) {
444
+ this.bitJson.responses = responsesJson;
445
+ }
446
+ }
447
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes
448
+ enter_quizzes(node, _parent, _route) {
449
+ var _a, _b, _c, _d, _e, _f, _g;
450
+ const quizzes = node.value;
451
+ const quizzesJson = [];
452
+ if (quizzes) {
453
+ for (const q of quizzes) {
454
+ // Choices
455
+ const choicesJson = [];
456
+ if (q.choices) {
457
+ for (const c of q.choices) {
458
+ // Create the choice
459
+ const choiceJson = Object.assign({ choice: (_a = c.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = c.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(c));
460
+ // Delete unwanted properties
461
+ if (((_c = q.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
462
+ delete choiceJson.lead;
463
+ choicesJson.push(choiceJson);
464
+ }
465
+ }
466
+ // Responses
467
+ const responsesJson = [];
468
+ if (q.responses) {
469
+ for (const c of q.responses) {
470
+ // Create the choice
471
+ const responseJson = Object.assign({ response: (_d = c.text) !== null && _d !== void 0 ? _d : '', isCorrect: (_e = c.isCorrect) !== null && _e !== void 0 ? _e : false }, this.toItemLeadHintInstruction(c));
472
+ // Delete unwanted properties
473
+ if (((_f = q.itemLead) === null || _f === void 0 ? void 0 : _f.lead) == null)
474
+ delete responseJson.lead;
475
+ responsesJson.push(responseJson);
476
+ }
477
+ }
478
+ // Create the quiz
479
+ const quizJson = Object.assign(Object.assign(Object.assign({}, this.toItemLeadHintInstruction(q)), this.toExampleAndIsExample(q.example)), { choices: q.choices ? choicesJson : undefined, responses: q.responses ? responsesJson : undefined });
480
+ // Delete unwanted properties
481
+ if (((_g = q.itemLead) === null || _g === void 0 ? void 0 : _g.lead) == null)
482
+ delete quizJson.lead;
483
+ quizzesJson.push(quizJson);
484
+ }
485
+ }
486
+ if (quizzesJson.length > 0) {
487
+ this.bitJson.quizzes = quizzesJson;
488
+ }
489
+ }
490
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> heading
491
+ enter_heading(node, _parent, _route) {
492
+ var _a, _b;
493
+ const heading = node.value;
494
+ // Ensure the heading is valid for writing out (it will be valid, but if it is empty, it should not be written)
495
+ let valid = false;
496
+ if (heading && heading.forKeys /*&& heading.forValues && heading.forValues.length > 0*/) {
497
+ valid = true;
498
+ }
499
+ if (!valid)
500
+ return false;
501
+ // Create the heading
502
+ const headingJson = {
503
+ forKeys: (_a = heading.forKeys) !== null && _a !== void 0 ? _a : '',
504
+ };
505
+ // TODO: Should probably check wether bit is a match or a matrix and add a string for match and array for matrix
506
+ if (Array.isArray(heading.forValues)) {
507
+ if (heading.forValues.length > 1) {
508
+ headingJson.forValues = heading.forValues;
509
+ }
510
+ else if (heading.forValues.length === 1) {
511
+ headingJson.forValues = heading.forValues[0];
512
+ }
513
+ else {
514
+ headingJson.forValues = heading.forValues;
515
+ }
516
+ }
517
+ else {
518
+ headingJson.forValues = (_b = heading.forValues) !== null && _b !== void 0 ? _b : '';
519
+ }
520
+ this.bitJson.heading = headingJson;
521
+ }
522
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> pairs
523
+ enter_pairs(node, _parent, _route) {
524
+ var _a, _b, _c, _d, _e;
525
+ const pairs = node.value;
526
+ const pairsJson = [];
527
+ if (pairs) {
528
+ for (const p of pairs) {
529
+ // Create the question
530
+ const pairJson = Object.assign(Object.assign(Object.assign({ key: (_a = p.key) !== null && _a !== void 0 ? _a : '', keyAudio: p.keyAudio ? this.addAudioResource(p.keyAudio) : undefined, keyImage: p.keyImage ? this.addImageResource(p.keyImage) : undefined, values: (_b = p.values) !== null && _b !== void 0 ? _b : [] }, this.toItemLeadHintInstruction(p)), this.toExampleAndIsExample(p.example)), { isCaseSensitive: (_c = p.isCaseSensitive) !== null && _c !== void 0 ? _c : true, isLongAnswer: (_d = !p.isShortAnswer) !== null && _d !== void 0 ? _d : false });
531
+ // Delete unwanted properties
532
+ if (((_e = p.itemLead) === null || _e === void 0 ? void 0 : _e.lead) == null)
533
+ delete pairJson.lead;
534
+ if (pairJson.key) {
535
+ delete pairJson.keyAudio;
536
+ delete pairJson.keyImage;
537
+ }
538
+ if (pairJson.keyAudio != null) {
539
+ delete pairJson.key;
540
+ delete pairJson.keyImage;
541
+ }
542
+ if (pairJson.keyImage != null) {
543
+ delete pairJson.key;
544
+ delete pairJson.keyAudio;
545
+ }
546
+ pairsJson.push(pairJson);
547
+ }
548
+ }
549
+ if (pairsJson.length > 0) {
550
+ this.bitJson.pairs = pairsJson;
551
+ }
552
+ }
553
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> matrix
554
+ enter_matrix(node, _parent, _route) {
555
+ var _a, _b, _c, _d, _e, _f;
556
+ const matrix = node.value;
557
+ const matrixJsonArray = [];
558
+ if (matrix) {
559
+ for (const m of matrix) {
560
+ // Choices
561
+ const matrixCellsJson = [];
562
+ if (m.cells) {
563
+ for (const c of m.cells) {
564
+ // Create the choice
565
+ const matrixCellJson = Object.assign(Object.assign({ values: (_a = c.values) !== null && _a !== void 0 ? _a : [] }, this.toItemLeadHintInstruction(c)), this.toExampleAndIsExample(c.example));
566
+ // Delete unwanted properties
567
+ if (((_b = c.itemLead) === null || _b === void 0 ? void 0 : _b.lead) == null)
568
+ delete matrixCellJson.lead;
569
+ if (c.hint == null)
570
+ delete matrixCellJson.hint;
571
+ if (c.example == null)
572
+ delete matrixCellJson.isExample;
573
+ if (c.example == null)
574
+ delete matrixCellJson.example;
575
+ matrixCellsJson.push(matrixCellJson);
576
+ }
577
+ }
578
+ // Create the matrix
579
+ const matrixJson = Object.assign(Object.assign(Object.assign({ key: (_c = m.key) !== null && _c !== void 0 ? _c : '', cells: matrixCellsJson !== null && matrixCellsJson !== void 0 ? matrixCellsJson : [] }, this.toItemLeadHintInstruction(m)), this.toExampleAndIsExample(m.example)), { isCaseSensitive: (_d = m.isCaseSensitive) !== null && _d !== void 0 ? _d : true, isLongAnswer: (_e = !m.isShortAnswer) !== null && _e !== void 0 ? _e : false });
580
+ // Delete unwanted properties
581
+ if (((_f = m.itemLead) === null || _f === void 0 ? void 0 : _f.lead) == null)
582
+ delete matrixJson.lead;
583
+ if (m.instruction == null)
584
+ delete matrixJson.instruction;
585
+ matrixJsonArray.push(matrixJson);
586
+ }
587
+ }
588
+ if (matrixJsonArray.length > 0) {
589
+ this.bitJson.matrix = matrixJsonArray;
590
+ }
591
+ }
592
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> questions
593
+ enter_questions(node, _parent, _route) {
594
+ var _a, _b, _c, _d, _e;
595
+ const questions = node.value;
596
+ const questionsJson = [];
597
+ if (questions) {
598
+ for (const q of questions) {
599
+ // Create the question
600
+ const questionJson = Object.assign(Object.assign(Object.assign({ question: (_a = q.question) !== null && _a !== void 0 ? _a : '', partialAnswer: (_b = ArrayUtils.asSingle(q.partialAnswer)) !== null && _b !== void 0 ? _b : '', sampleSolution: (_c = q.sampleSolution) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(q)), this.toExampleAndIsExample(q.example)), {
601
+ // isCaseSensitive: q.isCaseSensitive ?? true,
602
+ isShortAnswer: (_d = q.isShortAnswer) !== null && _d !== void 0 ? _d : true });
603
+ // Delete unwanted properties
604
+ if (((_e = q.itemLead) === null || _e === void 0 ? void 0 : _e.lead) == null)
605
+ delete questionJson.lead;
606
+ questionsJson.push(questionJson);
607
+ }
608
+ }
609
+ if (questionsJson.length > 0) {
610
+ this.bitJson.questions = questionsJson;
611
+ }
612
+ }
613
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> botResponses
614
+ enter_botResponses(node, parent, _route) {
615
+ var _a, _b, _c, _d;
616
+ const botResponses = node.value;
617
+ // Ignore responses that are not at the cardNode level as they are handled elsewhere
618
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
619
+ return;
620
+ const responsesJson = [];
621
+ if (botResponses) {
622
+ for (const r of botResponses) {
623
+ // Create the response
624
+ const responseJson = Object.assign({ response: (_a = r.response) !== null && _a !== void 0 ? _a : '', reaction: (_b = r.reaction) !== null && _b !== void 0 ? _b : '', feedback: (_c = r.feedback) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(r));
625
+ // Delete unwanted properties
626
+ if (((_d = r.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
627
+ delete responseJson.lead;
628
+ if (r.hint == null)
629
+ delete responseJson.hint;
630
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
631
+ delete responseJson.instruction;
632
+ responsesJson.push(responseJson);
633
+ }
634
+ }
635
+ if (responsesJson.length > 0) {
636
+ this.bitJson.responses = responsesJson;
637
+ }
638
+ }
639
+ // bitmarkAst -> bits -> bitsValue -> resource
640
+ enter_resource(node, _parent, _route) {
641
+ const resource = node.value;
642
+ // This is a resource - handle it with the common code
643
+ this.bitJson.resource = this.parseResourceToJson(resource);
644
+ }
645
+ //
646
+ // Terminal nodes (leaves)
647
+ //
648
+ // bitmarkAst -> bits -> bitsValue -> title
649
+ leaf_title(node, _parent, _route) {
650
+ this.bitJson.title = this.toTextAstOrString(node.value);
651
+ }
652
+ // bitmarkAst -> bits -> bitsValue -> subtitle
653
+ leaf_subtitle(node, _parent, _route) {
654
+ this.bitJson.subtitle = this.toTextAstOrString(node.value);
655
+ }
656
+ // // bitmarkAst -> bits -> bitsValue -> level
657
+ leaf_level(node, _parent, _route) {
658
+ var _a;
659
+ if (node.value != null)
660
+ this.addProperty(this.bitJson, 'level', (_a = node.value) !== null && _a !== void 0 ? _a : 1, true);
661
+ }
662
+ // bitmarkAst -> bits -> bitsValue -> book
663
+ leaf_book(node, _parent, _route) {
664
+ if (node.value != null)
665
+ this.addProperty(this.bitJson, 'book', node.value, true);
666
+ }
667
+ // bitmarkAst -> bits -> bitsValue -> anchor
668
+ leaf_anchor(node, _parent, _route) {
669
+ if (node.value != null)
670
+ this.addProperty(this.bitJson, 'anchor', node.value, true);
671
+ }
672
+ // bitmarkAst -> bits -> bitsValue -> reference
673
+ leaf_reference(node, _parent, _route) {
674
+ if (node.value != null)
675
+ this.addProperty(this.bitJson, 'reference', node.value, true);
676
+ }
677
+ // bitmarkAst -> bits -> bitsValue -> referenceEnd
678
+ leaf_referenceEnd(node, _parent, _route) {
679
+ if (node.value != null)
680
+ this.addProperty(this.bitJson, 'referenceEnd', node.value, true);
681
+ }
682
+ // bitmarkAst -> bits -> bitsValue -> * -> hint
683
+ leaf_hint(node, parent, _route) {
684
+ const hint = node.value;
685
+ // Ignore hint that is not at the bit level as it are handled elsewhere
686
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
687
+ return;
688
+ this.bitJson.hint = this.toTextAstOrString(hint);
689
+ }
690
+ // bitmarkAst -> bits -> bitsValue -> * -> instruction
691
+ leaf_instruction(node, parent, _route) {
692
+ const instruction = node.value;
693
+ // Ignore instruction that is not at the bit level as it are handled elsewhere
694
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
695
+ return;
696
+ this.bitJson.instruction = this.toTextAstOrString(instruction);
697
+ }
698
+ // bitmarkAst -> bits -> bitsValue -> example
699
+ leaf_example(node, parent, _route) {
700
+ const example = node.value;
701
+ // Ignore example that is not at the bit level as it are handled elsewhere
702
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
703
+ return;
704
+ const res = this.toExampleAndIsExample(example);
705
+ this.bitJson.isExample = res.isExample;
706
+ this.bitJson.example = res.example;
707
+ }
708
+ // bitmarkAst -> bits -> footer -> footerText
709
+ leaf_footerText(node, _parent, _route) {
710
+ const footer = node.value;
711
+ this.bitJson.footer = this.toTextAstOrString(footer);
712
+ }
713
+ // bitmarkAst -> bits -> bitsValue -> markup
714
+ leaf_markup(node, _parent, _route) {
715
+ const bitmark = node.value;
716
+ if (bitmark)
717
+ this.bitWrapperJson.bitmark = bitmark;
718
+ }
719
+ // bitmarkAst -> bits -> bitsValue -> parser
720
+ enter_parser(node, parent, _route) {
721
+ const parser = node.value;
722
+ if (parser) {
723
+ const { version, excessResources: parserExcessResources, warnings, errors } = parser, parserRest = __rest(parser, ["version", "excessResources", "warnings", "errors"]);
724
+ const bitmarkVersion = `${this.bitmarkVersion}`;
725
+ // Parse resources to JSON from AST
726
+ let excessResources;
727
+ if (Array.isArray(parserExcessResources) && parserExcessResources.length > 0) {
728
+ excessResources = [];
729
+ for (const r of parserExcessResources) {
730
+ const rJson = this.parseResourceToJson(r);
731
+ if (rJson)
732
+ excessResources.push(rJson);
733
+ }
734
+ }
735
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) === NodeType.bitsValue) {
736
+ // Bit level parser information
737
+ this.bitWrapperJson.parser = Object.assign(Object.assign({ version,
738
+ bitmarkVersion }, parserRest), { warnings,
739
+ errors,
740
+ excessResources });
741
+ if (!this.options.enableWarnings) {
742
+ // Remove warnings if not enabled
743
+ delete this.bitWrapperJson.parser.warnings;
744
+ }
745
+ }
746
+ else {
747
+ // Top level parser information (not specific to a bit)
748
+ // TODO - not sure where this error can be written
749
+ // this.bitWrapperJson.parser = {
750
+ // errors,
751
+ // };
752
+ }
753
+ }
754
+ }
755
+ // bitmarkAst -> errors
756
+ // protected enter_errors(node: NodeInfo, parent: NodeInfo | undefined, _route: NodeInfo[],
757
+ // context: Context): void {
758
+ // const errors = node.value as ParserError[] | undefined;
759
+ // if (errors && errors.length > 0) {
760
+ // // Complete bit is invalid
761
+ // // TODO - not sure where this error can be written
762
+ // // this.bitWrapperJson.parser = {
763
+ // // errors,
764
+ // // };
765
+ // }
766
+ // }
767
+ //
768
+ // Generated Node Handlers
769
+ //
770
+ /**
771
+ * Generate the handlers for properties, as they are mostly the same, but not quite
772
+ */
773
+ generatePropertyHandlers() {
774
+ var _a;
775
+ for (const key of PropertyKey.values()) {
776
+ const validatedKey = PropertyKey.fromValue(key);
777
+ const meta = (_a = PropertyKey.getMetadata(validatedKey)) !== null && _a !== void 0 ? _a : {};
778
+ const astKey = meta.astKey ? meta.astKey : key;
779
+ const funcName = `enter_${astKey}`;
780
+ // Special cases (handled outside of the automatically generated handlers)
781
+ if (astKey === PropertyKey.example)
782
+ continue;
783
+ if (astKey === PropertyKey.partner)
784
+ continue;
785
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
786
+ this[funcName] = (node, parent, _route) => {
787
+ const value = node.value;
788
+ if (value == null)
789
+ return;
790
+ // if (key === 'progress') debugger;
791
+ // Ignore any property that is not at the bit level as that will be handled by a different handler
792
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
793
+ return;
794
+ // Convert key as needed
795
+ let jsonKey = key;
796
+ if (meta.jsonKey)
797
+ jsonKey = meta.jsonKey;
798
+ // Add the property
799
+ this.addProperty(this.bitJson, jsonKey, value, meta.isSingle);
800
+ };
801
+ // Bind this
802
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
803
+ this[funcName] = this[funcName].bind(this);
804
+ }
805
+ }
806
+ // // END NODE HANDLERS
807
+ //
808
+ // HELPER FUNCTIONS
809
+ //
810
+ createGapJson(gap) {
811
+ var _a;
812
+ const data = gap.data;
813
+ // Create the gap
814
+ const gapJson = Object.assign(Object.assign(Object.assign({ type: 'gap', solutions: data.solutions }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example)), { isCaseSensitive: (_a = data.isCaseSensitive) !== null && _a !== void 0 ? _a : true });
815
+ // Remove unwanted properties
816
+ if (!gapJson.lead)
817
+ delete gapJson.lead;
818
+ return gapJson;
819
+ }
820
+ createSelectJson(select) {
821
+ var _a, _b, _c;
822
+ const data = select.data;
823
+ // Create the select options
824
+ const options = [];
825
+ for (const option of data.options) {
826
+ const optionJson = Object.assign(Object.assign({ text: option.text, isCorrect: (_a = option.isCorrect) !== null && _a !== void 0 ? _a : false }, this.toItemLeadHintInstruction(option)), this.toExampleAndIsExample(option.example));
827
+ // Remove unwanted properties
828
+ if (!optionJson.item)
829
+ delete optionJson.item;
830
+ if (!optionJson.lead)
831
+ delete optionJson.lead;
832
+ if (!optionJson.instruction)
833
+ delete optionJson.instruction;
834
+ if (!optionJson.example)
835
+ delete optionJson.example;
836
+ if (!optionJson.isExample)
837
+ delete optionJson.isExample;
838
+ if (!optionJson.isCaseSensitive)
839
+ delete optionJson.isCaseSensitive;
840
+ options.push(optionJson);
841
+ }
842
+ // Create the select
843
+ const selectJson = Object.assign(Object.assign({ type: 'select', prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', options, postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example));
844
+ // Remove unwanted properties
845
+ if (!selectJson.lead)
846
+ delete selectJson.lead;
847
+ return selectJson;
848
+ }
849
+ createHighlightJson(highlight) {
850
+ var _a, _b, _c, _d;
851
+ const data = highlight.data;
852
+ // Create the highlight options
853
+ const texts = [];
854
+ for (const text of data.texts) {
855
+ const textJson = Object.assign(Object.assign({ text: text.text, isCorrect: (_a = text.isCorrect) !== null && _a !== void 0 ? _a : false, isHighlighted: (_b = text.isHighlighted) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(text)), this.toExampleAndIsExample(text.example));
856
+ // Remove unwanted properties
857
+ if (!textJson.item)
858
+ delete textJson.item;
859
+ if (!textJson.lead)
860
+ delete textJson.lead;
861
+ if (!textJson.hint)
862
+ delete textJson.hint;
863
+ if (!textJson.example)
864
+ delete textJson.example;
865
+ if (!textJson.isExample)
866
+ delete textJson.isExample;
867
+ if (!textJson.isCaseSensitive)
868
+ delete textJson.isCaseSensitive;
869
+ texts.push(textJson);
870
+ }
871
+ // Create the select
872
+ const highlightJson = Object.assign(Object.assign({ type: 'highlight', prefix: (_c = data.prefix) !== null && _c !== void 0 ? _c : '', texts, postfix: (_d = data.postfix) !== null && _d !== void 0 ? _d : '' }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example));
873
+ // Remove unwanted properties
874
+ if (!highlightJson.lead)
875
+ delete highlightJson.lead;
876
+ return highlightJson;
877
+ }
878
+ parseResourceToJson(resource) {
879
+ if (!resource)
880
+ return undefined;
881
+ // All resources should now be valid as they are validated in the AST
882
+ // TODO: remove code below
883
+ // // Check if a resource has a value, if not, we should not write it (or any of its chained properties)
884
+ // let valid = false;
885
+ // if (resource.value) {
886
+ // valid = true;
887
+ // }
888
+ // // Resource is not valid, return undefined
889
+ // if (!valid) return undefined;
890
+ // // Resource is valid, write it.
891
+ let resourceJson;
892
+ switch (resource.type) {
893
+ case ResourceType.image:
894
+ resourceJson = {
895
+ type: ResourceType.image,
896
+ image: this.addImageResource(resource),
897
+ };
898
+ break;
899
+ case ResourceType.imageLink:
900
+ resourceJson = {
901
+ type: ResourceType.imageLink,
902
+ imageLink: this.addImageLinkResource(resource),
903
+ };
904
+ break;
905
+ case ResourceType.audio:
906
+ resourceJson = {
907
+ type: ResourceType.audio,
908
+ audio: this.addAudioResource(resource),
909
+ };
910
+ break;
911
+ case ResourceType.audioEmbed:
912
+ resourceJson = {
913
+ type: ResourceType.audioEmbed,
914
+ audioEmbed: this.addAudioEmbedResource(resource),
915
+ };
916
+ break;
917
+ case ResourceType.audioLink:
918
+ resourceJson = {
919
+ type: ResourceType.audioLink,
920
+ audioLink: this.addAudioLinkResource(resource),
921
+ };
922
+ break;
923
+ case ResourceType.video:
924
+ resourceJson = {
925
+ type: ResourceType.video,
926
+ video: this.addVideoResource(resource),
927
+ };
928
+ break;
929
+ case ResourceType.videoEmbed:
930
+ resourceJson = {
931
+ type: ResourceType.videoEmbed,
932
+ videoEmbed: this.addVideoEmbedResource(resource),
933
+ };
934
+ resourceJson.videoEmbed = this.addVideoLinkResource(resource);
935
+ break;
936
+ case ResourceType.videoLink:
937
+ resourceJson = {
938
+ type: ResourceType.videoLink,
939
+ videoLink: this.addVideoLinkResource(resource),
940
+ };
941
+ break;
942
+ case ResourceType.stillImageFilm: {
943
+ const stillImageFilmResource = resource;
944
+ // Only write the resource if it has both an image and audio
945
+ if (stillImageFilmResource.image.value != null && stillImageFilmResource.audio.value != null) {
946
+ resourceJson = {
947
+ type: ResourceType.stillImageFilm,
948
+ image: this.addImageResource(stillImageFilmResource.image),
949
+ audio: this.addAudioResource(stillImageFilmResource.audio),
950
+ };
951
+ }
952
+ break;
953
+ }
954
+ case ResourceType.stillImageFilmEmbed:
955
+ resourceJson = {
956
+ type: ResourceType.stillImageFilmEmbed,
957
+ stillImageFilmEmbed: this.addStillImageFilmEmbedResource(resource),
958
+ };
959
+ break;
960
+ case ResourceType.stillImageFilmLink:
961
+ resourceJson = {
962
+ type: ResourceType.stillImageFilmLink,
963
+ stillImageFilmLink: this.addStillImageFilmLinkResource(resource),
964
+ };
965
+ break;
966
+ case ResourceType.article:
967
+ resourceJson = {
968
+ type: ResourceType.article,
969
+ article: this.addArticleResource(resource),
970
+ };
971
+ break;
972
+ case ResourceType.document:
973
+ resourceJson = {
974
+ type: ResourceType.document,
975
+ document: this.addDocumentResource(resource),
976
+ };
977
+ break;
978
+ case ResourceType.documentEmbed:
979
+ resourceJson = {
980
+ type: ResourceType.documentEmbed,
981
+ documentEmbed: this.addDocumentEmbedResource(resource),
982
+ };
983
+ break;
984
+ case ResourceType.documentLink:
985
+ resourceJson = {
986
+ type: ResourceType.documentLink,
987
+ documentLink: this.addDocumentLinkResource(resource),
988
+ };
989
+ break;
990
+ case ResourceType.documentDownload:
991
+ resourceJson = {
992
+ type: ResourceType.documentDownload,
993
+ documentDownload: this.addDocumentDownloadResource(resource),
994
+ };
995
+ break;
996
+ case ResourceType.appLink:
997
+ resourceJson = {
998
+ type: ResourceType.appLink,
999
+ appLink: this.addAppLinkResource(resource),
1000
+ };
1001
+ break;
1002
+ case ResourceType.websiteLink:
1003
+ resourceJson = {
1004
+ type: ResourceType.websiteLink,
1005
+ websiteLink: this.addWebsiteLinkResource(resource),
1006
+ };
1007
+ break;
1008
+ default:
1009
+ }
1010
+ return resourceJson;
1011
+ }
1012
+ addImageResource(resource) {
1013
+ var _a, _b, _c;
1014
+ const resourceJson = {};
1015
+ if (StringUtils.isString(resource)) {
1016
+ const value = resource;
1017
+ resource = {
1018
+ type: ResourceType.image,
1019
+ value,
1020
+ format: UrlUtils.fileExtensionFromUrl(value),
1021
+ provider: UrlUtils.domainFromUrl(value),
1022
+ };
1023
+ }
1024
+ resource = resource; // Keep TS compiler happy
1025
+ if (resource.format != null)
1026
+ resourceJson.format = resource.format;
1027
+ if (resource.provider != null)
1028
+ resourceJson.provider = resource.provider;
1029
+ if (resource.value != null)
1030
+ resourceJson.src = resource.value;
1031
+ if (resource.src1x != null)
1032
+ resourceJson.src1x = resource.src1x;
1033
+ if (resource.src2x != null)
1034
+ resourceJson.src2x = resource.src2x;
1035
+ if (resource.src3x != null)
1036
+ resourceJson.src3x = resource.src3x;
1037
+ if (resource.src4x != null)
1038
+ resourceJson.src4x = resource.src4x;
1039
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1040
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1041
+ resourceJson.alt = (_c = resource.alt) !== null && _c !== void 0 ? _c : '';
1042
+ this.addGenericResourceProperties(resource, resourceJson);
1043
+ return resourceJson;
1044
+ }
1045
+ addImageLinkResource(resource) {
1046
+ var _a, _b, _c;
1047
+ const resourceJson = {};
1048
+ if (StringUtils.isString(resource)) {
1049
+ const value = resource;
1050
+ resource = {
1051
+ type: ResourceType.imageLink,
1052
+ value,
1053
+ format: UrlUtils.fileExtensionFromUrl(value),
1054
+ provider: UrlUtils.domainFromUrl(value),
1055
+ };
1056
+ }
1057
+ resource = resource; // Keep TS compiler happy
1058
+ if (resource.format != null)
1059
+ resourceJson.format = resource.format;
1060
+ if (resource.provider != null)
1061
+ resourceJson.provider = resource.provider;
1062
+ if (resource.value != null)
1063
+ resourceJson.url = resource.value;
1064
+ if (resource.src1x != null)
1065
+ resourceJson.src1x = resource.src1x;
1066
+ if (resource.src2x != null)
1067
+ resourceJson.src2x = resource.src2x;
1068
+ if (resource.src3x != null)
1069
+ resourceJson.src3x = resource.src3x;
1070
+ if (resource.src4x != null)
1071
+ resourceJson.src4x = resource.src4x;
1072
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1073
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1074
+ resourceJson.alt = (_c = resource.alt) !== null && _c !== void 0 ? _c : '';
1075
+ this.addGenericResourceProperties(resource, resourceJson);
1076
+ return resourceJson;
1077
+ }
1078
+ addAudioResource(resource) {
1079
+ const resourceJson = {};
1080
+ if (resource.format != null)
1081
+ resourceJson.format = resource.format;
1082
+ if (resource.provider != null)
1083
+ resourceJson.provider = resource.provider;
1084
+ if (resource.value != null)
1085
+ resourceJson.src = resource.value;
1086
+ if (resource.duration != null)
1087
+ resourceJson.duration = resource.duration;
1088
+ if (resource.mute != null)
1089
+ resourceJson.mute = resource.mute;
1090
+ if (resource.autoplay != null)
1091
+ resourceJson.autoplay = resource.autoplay;
1092
+ this.addGenericResourceProperties(resource, resourceJson);
1093
+ return resourceJson;
1094
+ }
1095
+ addAudioEmbedResource(resource) {
1096
+ const resourceJson = {};
1097
+ if (resource.format != null)
1098
+ resourceJson.format = resource.format;
1099
+ if (resource.provider != null)
1100
+ resourceJson.provider = resource.provider;
1101
+ if (resource.value != null)
1102
+ resourceJson.src = resource.value;
1103
+ if (resource.duration != null)
1104
+ resourceJson.duration = resource.duration;
1105
+ if (resource.mute != null)
1106
+ resourceJson.mute = resource.mute;
1107
+ if (resource.autoplay != null)
1108
+ resourceJson.autoplay = resource.autoplay;
1109
+ this.addGenericResourceProperties(resource, resourceJson);
1110
+ return resourceJson;
1111
+ }
1112
+ addAudioLinkResource(resource) {
1113
+ const resourceJson = {};
1114
+ if (resource.format != null)
1115
+ resourceJson.format = resource.format;
1116
+ if (resource.provider != null)
1117
+ resourceJson.provider = resource.provider;
1118
+ if (resource.value != null)
1119
+ resourceJson.url = resource.value;
1120
+ if (resource.duration != null)
1121
+ resourceJson.duration = resource.duration;
1122
+ if (resource.mute != null)
1123
+ resourceJson.mute = resource.mute;
1124
+ if (resource.autoplay != null)
1125
+ resourceJson.autoplay = resource.autoplay;
1126
+ this.addGenericResourceProperties(resource, resourceJson, true);
1127
+ return resourceJson;
1128
+ }
1129
+ addVideoResource(resource) {
1130
+ var _a, _b;
1131
+ const resourceJson = {};
1132
+ if (resource.format != null)
1133
+ resourceJson.format = resource.format;
1134
+ if (resource.provider != null)
1135
+ resourceJson.provider = resource.provider;
1136
+ if (resource.value != null)
1137
+ resourceJson.src = resource.value;
1138
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1139
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1140
+ if (resource.duration != null)
1141
+ resourceJson.duration = resource.duration;
1142
+ if (resource.mute != null)
1143
+ resourceJson.mute = resource.mute;
1144
+ if (resource.autoplay != null)
1145
+ resourceJson.autoplay = resource.autoplay;
1146
+ if (resource.allowSubtitles != null)
1147
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1148
+ if (resource.showSubtitles != null)
1149
+ resourceJson.showSubtitles = resource.showSubtitles;
1150
+ if (resource.alt != null)
1151
+ resourceJson.alt = resource.alt;
1152
+ if (resource.posterImage != null)
1153
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1154
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1155
+ resourceJson.thumbnails = [];
1156
+ for (const thumbnail of resource.thumbnails) {
1157
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1158
+ }
1159
+ }
1160
+ this.addGenericResourceProperties(resource, resourceJson);
1161
+ return resourceJson;
1162
+ }
1163
+ addVideoEmbedResource(resource) {
1164
+ var _a, _b;
1165
+ const resourceJson = {};
1166
+ if (resource.format != null)
1167
+ resourceJson.format = resource.format;
1168
+ if (resource.provider != null)
1169
+ resourceJson.provider = resource.provider;
1170
+ if (resource.value != null)
1171
+ resourceJson.src = resource.value;
1172
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1173
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1174
+ if (resource.duration != null)
1175
+ resourceJson.duration = resource.duration;
1176
+ if (resource.mute != null)
1177
+ resourceJson.mute = resource.mute;
1178
+ if (resource.autoplay != null)
1179
+ resourceJson.autoplay = resource.autoplay;
1180
+ if (resource.allowSubtitles != null)
1181
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1182
+ if (resource.showSubtitles != null)
1183
+ resourceJson.showSubtitles = resource.showSubtitles;
1184
+ if (resource.alt != null)
1185
+ resourceJson.alt = resource.alt;
1186
+ if (resource.posterImage != null)
1187
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1188
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1189
+ resourceJson.thumbnails = [];
1190
+ for (const thumbnail of resource.thumbnails) {
1191
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1192
+ }
1193
+ }
1194
+ this.addGenericResourceProperties(resource, resourceJson);
1195
+ return resourceJson;
1196
+ }
1197
+ addVideoLinkResource(resource) {
1198
+ var _a, _b;
1199
+ const resourceJson = {};
1200
+ if (resource.format != null)
1201
+ resourceJson.format = resource.format;
1202
+ if (resource.provider != null)
1203
+ resourceJson.provider = resource.provider;
1204
+ if (resource.value != null)
1205
+ resourceJson.url = resource.value;
1206
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1207
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1208
+ if (resource.duration != null)
1209
+ resourceJson.duration = resource.duration;
1210
+ if (resource.mute != null)
1211
+ resourceJson.mute = resource.mute;
1212
+ if (resource.autoplay != null)
1213
+ resourceJson.autoplay = resource.autoplay;
1214
+ if (resource.allowSubtitles != null)
1215
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1216
+ if (resource.showSubtitles != null)
1217
+ resourceJson.showSubtitles = resource.showSubtitles;
1218
+ if (resource.alt != null)
1219
+ resourceJson.alt = resource.alt;
1220
+ if (resource.posterImage != null)
1221
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1222
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1223
+ resourceJson.thumbnails = [];
1224
+ for (const thumbnail of resource.thumbnails) {
1225
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1226
+ }
1227
+ }
1228
+ this.addGenericResourceProperties(resource, resourceJson);
1229
+ return resourceJson;
1230
+ }
1231
+ addStillImageFilmEmbedResource(resource) {
1232
+ var _a, _b;
1233
+ const resourceJson = {};
1234
+ if (resource.format != null)
1235
+ resourceJson.format = resource.format;
1236
+ if (resource.provider != null)
1237
+ resourceJson.provider = resource.provider;
1238
+ if (resource.value != null)
1239
+ resourceJson.url = resource.value;
1240
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1241
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1242
+ if (resource.duration != null)
1243
+ resourceJson.duration = resource.duration;
1244
+ if (resource.mute != null)
1245
+ resourceJson.mute = resource.mute;
1246
+ if (resource.autoplay != null)
1247
+ resourceJson.autoplay = resource.autoplay;
1248
+ if (resource.allowSubtitles != null)
1249
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1250
+ if (resource.showSubtitles != null)
1251
+ resourceJson.showSubtitles = resource.showSubtitles;
1252
+ if (resource.alt != null)
1253
+ resourceJson.alt = resource.alt;
1254
+ if (resource.posterImage != null)
1255
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1256
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1257
+ resourceJson.thumbnails = [];
1258
+ for (const thumbnail of resource.thumbnails) {
1259
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1260
+ }
1261
+ }
1262
+ this.addGenericResourceProperties(resource, resourceJson);
1263
+ return resourceJson;
1264
+ }
1265
+ addStillImageFilmLinkResource(resource) {
1266
+ var _a, _b;
1267
+ const resourceJson = {};
1268
+ if (resource.format != null)
1269
+ resourceJson.format = resource.format;
1270
+ if (resource.provider != null)
1271
+ resourceJson.provider = resource.provider;
1272
+ if (resource.value != null)
1273
+ resourceJson.url = resource.value;
1274
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1275
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1276
+ if (resource.duration != null)
1277
+ resourceJson.duration = resource.duration;
1278
+ if (resource.mute != null)
1279
+ resourceJson.mute = resource.mute;
1280
+ if (resource.autoplay != null)
1281
+ resourceJson.autoplay = resource.autoplay;
1282
+ if (resource.allowSubtitles != null)
1283
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1284
+ if (resource.showSubtitles != null)
1285
+ resourceJson.showSubtitles = resource.showSubtitles;
1286
+ if (resource.alt != null)
1287
+ resourceJson.alt = resource.alt;
1288
+ if (resource.posterImage != null)
1289
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1290
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1291
+ resourceJson.thumbnails = [];
1292
+ for (const thumbnail of resource.thumbnails) {
1293
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1294
+ }
1295
+ }
1296
+ this.addGenericResourceProperties(resource, resourceJson);
1297
+ return resourceJson;
1298
+ }
1299
+ addArticleResource(resource) {
1300
+ const resourceJson = {};
1301
+ if (resource.format != null)
1302
+ resourceJson.format = resource.format;
1303
+ if (resource.provider != null)
1304
+ resourceJson.provider = resource.provider;
1305
+ if (resource.value != null)
1306
+ resourceJson.body = resource.value;
1307
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1308
+ this.addGenericResourceProperties(resource, resourceJson);
1309
+ return resourceJson;
1310
+ }
1311
+ addDocumentResource(resource) {
1312
+ const resourceJson = {};
1313
+ if (resource.format != null)
1314
+ resourceJson.format = resource.format;
1315
+ if (resource.provider != null)
1316
+ resourceJson.provider = resource.provider;
1317
+ if (resource.value != null)
1318
+ resourceJson.url = resource.value;
1319
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1320
+ this.addGenericResourceProperties(resource, resourceJson);
1321
+ return resourceJson;
1322
+ }
1323
+ addDocumentEmbedResource(resource) {
1324
+ const resourceJson = {};
1325
+ if (resource.format != null)
1326
+ resourceJson.format = resource.format;
1327
+ if (resource.provider != null)
1328
+ resourceJson.provider = resource.provider;
1329
+ if (resource.value != null)
1330
+ resourceJson.url = resource.value;
1331
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1332
+ this.addGenericResourceProperties(resource, resourceJson);
1333
+ return resourceJson;
1334
+ }
1335
+ addDocumentLinkResource(resource) {
1336
+ const resourceJson = {};
1337
+ if (resource.format != null)
1338
+ resourceJson.format = resource.format;
1339
+ if (resource.provider != null)
1340
+ resourceJson.provider = resource.provider;
1341
+ if (resource.value != null)
1342
+ resourceJson.url = resource.value;
1343
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1344
+ this.addGenericResourceProperties(resource, resourceJson);
1345
+ return resourceJson;
1346
+ }
1347
+ addDocumentDownloadResource(resource) {
1348
+ const resourceJson = {};
1349
+ if (resource.format != null)
1350
+ resourceJson.format = resource.format;
1351
+ if (resource.provider != null)
1352
+ resourceJson.provider = resource.provider;
1353
+ if (resource.value != null)
1354
+ resourceJson.url = resource.value;
1355
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1356
+ this.addGenericResourceProperties(resource, resourceJson);
1357
+ return resourceJson;
1358
+ }
1359
+ addAppLinkResource(resource) {
1360
+ const resourceJson = {};
1361
+ // if (resource.format != null) resourceJson.format = resource.format;
1362
+ if (resource.value != null)
1363
+ resourceJson.url = resource.value;
1364
+ this.addGenericResourceProperties(resource, resourceJson);
1365
+ return resourceJson;
1366
+ }
1367
+ addWebsiteLinkResource(resource) {
1368
+ const resourceJson = {};
1369
+ // if (resource.format != null) resourceJson.format = resource.format;
1370
+ if (resource.value != null)
1371
+ resourceJson.url = resource.value;
1372
+ if (resource.siteName != null)
1373
+ resourceJson.siteName = resource.siteName;
1374
+ this.addGenericResourceProperties(resource, resourceJson);
1375
+ return resourceJson;
1376
+ }
1377
+ addGenericResourceProperties(resource, resourceJson, noDefaults) {
1378
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1379
+ if (noDefaults) {
1380
+ if (resource.license != null)
1381
+ resourceJson.license = (_a = resource.license) !== null && _a !== void 0 ? _a : '';
1382
+ if (resource.copyright != null)
1383
+ resourceJson.copyright = (_b = resource.copyright) !== null && _b !== void 0 ? _b : '';
1384
+ if (resource.provider != null)
1385
+ resourceJson.provider = resource.provider;
1386
+ if (resource.showInIndex != null)
1387
+ resourceJson.showInIndex = (_c = resource.showInIndex) !== null && _c !== void 0 ? _c : false;
1388
+ if (resource.caption != null)
1389
+ resourceJson.caption = this.toTextAstOrString((_d = resource.caption) !== null && _d !== void 0 ? _d : '');
1390
+ }
1391
+ else {
1392
+ resourceJson.license = (_e = resource.license) !== null && _e !== void 0 ? _e : '';
1393
+ resourceJson.copyright = (_f = resource.copyright) !== null && _f !== void 0 ? _f : '';
1394
+ if (resource.provider != null)
1395
+ resourceJson.provider = resource.provider;
1396
+ resourceJson.showInIndex = (_g = resource.showInIndex) !== null && _g !== void 0 ? _g : false;
1397
+ resourceJson.caption = this.toTextAstOrString((_h = resource.caption) !== null && _h !== void 0 ? _h : '');
1398
+ }
1399
+ return resourceJson;
1400
+ }
1401
+ toItemLeadHintInstruction(item) {
1402
+ var _a, _b, _c, _d, _e, _f;
1403
+ return {
1404
+ item: this.toTextAstOrString((_b = (_a = item.itemLead) === null || _a === void 0 ? void 0 : _a.item) !== null && _b !== void 0 ? _b : ''),
1405
+ lead: this.toTextAstOrString((_d = (_c = item.itemLead) === null || _c === void 0 ? void 0 : _c.lead) !== null && _d !== void 0 ? _d : ''),
1406
+ hint: this.toTextAstOrString((_e = item.hint) !== null && _e !== void 0 ? _e : ''),
1407
+ instruction: this.toTextAstOrString((_f = item.instruction) !== null && _f !== void 0 ? _f : ''),
1408
+ };
1409
+ }
1410
+ toExampleAndIsExample(exampleIn) {
1411
+ let isExample = false;
1412
+ let example = this.textDefault;
1413
+ if (exampleIn === true) {
1414
+ isExample = true;
1415
+ }
1416
+ else if (exampleIn) {
1417
+ isExample = true;
1418
+ example = this.toTextAstOrString(exampleIn);
1419
+ }
1420
+ return {
1421
+ isExample,
1422
+ example,
1423
+ };
1424
+ }
1425
+ addProperty(
1426
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1427
+ target, name, values, singleWithoutArray) {
1428
+ if (values !== undefined) {
1429
+ if (!Array.isArray(values))
1430
+ values = [values];
1431
+ if (Array.isArray(values) && values.length > 0) {
1432
+ if (singleWithoutArray && values.length >= 1) {
1433
+ target[name] = values[values.length - 1];
1434
+ }
1435
+ else {
1436
+ target[name] = values;
1437
+ }
1438
+ }
1439
+ }
1440
+ }
1441
+ /**
1442
+ * Get the bit type from any node
1443
+ *
1444
+ * @param route the route to the node
1445
+ * @returns the bit type
1446
+ */
1447
+ getBitType(route) {
1448
+ for (const node of route) {
1449
+ if (node.key === NodeType.bitsValue) {
1450
+ const n = node.value;
1451
+ return BitType.fromValue(n === null || n === void 0 ? void 0 : n.bitType);
1452
+ }
1453
+ }
1454
+ return undefined;
1455
+ }
1456
+ /**
1457
+ * Get the text format from any node
1458
+ *
1459
+ * @param route the route to the node
1460
+ * @returns the text format
1461
+ */
1462
+ getTextFormat(route) {
1463
+ for (const node of route) {
1464
+ if (node.key === NodeType.bitsValue) {
1465
+ const n = node.value;
1466
+ return TextFormat.fromValue(n === null || n === void 0 ? void 0 : n.textFormat);
1467
+ }
1468
+ }
1469
+ return undefined;
1470
+ }
1471
+ /**
1472
+ * Convert parse a string to TextAst if required, otherwise just return the string as is.
1473
+ * @param text
1474
+ * @returns
1475
+ */
1476
+ toTextAstOrString(text, format = TextFormat.bitmarkMinusMinus) {
1477
+ if (!text)
1478
+ undefined;
1479
+ if (this.options.textAsPlainText) {
1480
+ return text;
1481
+ }
1482
+ // Use the text parser to parse the text
1483
+ const textAst = this.textParser.toAst(text, {
1484
+ textFormat: format,
1485
+ });
1486
+ return textAst;
1487
+ }
1488
+ /**
1489
+ * Walk the body AST to find the placeholder and replace it with the body bit.
1490
+ *
1491
+ * @param bodyAst the body AST
1492
+ * @param bodyBitJson the body bit json to insert at the placeholder position
1493
+ * @param index the index of the placeholder to replace
1494
+ */
1495
+ replacePlaceholderWithBodyBit(bodyAst, bodyBitJson, index) {
1496
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1497
+ const walkRecursive = (node, parent, parentKey) => {
1498
+ if (Array.isArray(node)) {
1499
+ // Walk the array of nodes
1500
+ for (let i = 0; i < node.length; i++) {
1501
+ const child = node[i];
1502
+ const done = walkRecursive(child, node, i);
1503
+ if (done)
1504
+ return true;
1505
+ }
1506
+ }
1507
+ else {
1508
+ if (node.type === 'bit' && node.index === index) {
1509
+ // Found the placeholder, replace it with the body bit
1510
+ parent[parentKey] = bodyBitJson;
1511
+ return true;
1512
+ }
1513
+ if (node.content) {
1514
+ // Walk the child content
1515
+ const done = walkRecursive(node.content, node, 'content');
1516
+ if (done)
1517
+ return true;
1518
+ }
1519
+ }
1520
+ return false;
1521
+ };
1522
+ walkRecursive(bodyAst, null, null);
1523
+ }
1524
+ //
1525
+ // WRITE FUNCTIONS
1526
+ //
1527
+ writeInlineDebug(key, state) {
1528
+ let tag = key;
1529
+ if (state.open) {
1530
+ tag = `<${key}>`;
1531
+ }
1532
+ else if (state.close) {
1533
+ tag = `</${key}>`;
1534
+ }
1535
+ else if (state.single) {
1536
+ tag = `<${key} />`;
1537
+ }
1538
+ this.writeString(tag);
1539
+ }
1540
+ writeString(s) {
1541
+ if (s != null)
1542
+ this.write(`${s}`);
1543
+ }
1544
+ /**
1545
+ * Create a new bit json object.
1546
+ * - This function defines the order of the properties in the json.
1547
+ *
1548
+ * @param bit
1549
+ * @returns
1550
+ */
1551
+ createBitJson(bit) {
1552
+ const bitJson = {
1553
+ type: bit.bitType,
1554
+ format: bit.textFormat,
1555
+ // Properties
1556
+ id: undefined,
1557
+ externalId: undefined,
1558
+ spaceId: undefined,
1559
+ padletId: undefined,
1560
+ AIGenerated: undefined,
1561
+ releaseVersion: undefined,
1562
+ book: undefined,
1563
+ ageRange: undefined,
1564
+ language: undefined,
1565
+ computerLanguage: undefined,
1566
+ subtype: undefined,
1567
+ coverImage: undefined,
1568
+ publisher: undefined,
1569
+ publications: undefined,
1570
+ author: undefined,
1571
+ subject: undefined,
1572
+ date: undefined,
1573
+ location: undefined,
1574
+ theme: undefined,
1575
+ kind: undefined,
1576
+ action: undefined,
1577
+ thumbImage: undefined,
1578
+ focusX: undefined,
1579
+ focusY: undefined,
1580
+ deeplink: undefined,
1581
+ externalLink: undefined,
1582
+ externalLinkText: undefined,
1583
+ videoCallLink: undefined,
1584
+ duration: undefined,
1585
+ list: undefined,
1586
+ textReference: undefined,
1587
+ isTracked: undefined,
1588
+ isInfoOnly: undefined,
1589
+ labelTrue: undefined,
1590
+ labelFalse: undefined,
1591
+ quotedPerson: undefined,
1592
+ partialAnswer: undefined,
1593
+ // Book data
1594
+ title: undefined,
1595
+ subtitle: undefined,
1596
+ level: undefined,
1597
+ toc: undefined,
1598
+ progress: undefined,
1599
+ anchor: undefined,
1600
+ reference: undefined,
1601
+ referenceEnd: undefined,
1602
+ // Item, Lead, Hint, Instruction
1603
+ item: undefined,
1604
+ lead: undefined,
1605
+ hint: undefined,
1606
+ instruction: undefined,
1607
+ // Example
1608
+ example: undefined,
1609
+ isExample: undefined,
1610
+ // Partner .conversion-xxx only
1611
+ partner: undefined,
1612
+ // Extra Properties
1613
+ extraProperties: undefined,
1614
+ // Body
1615
+ body: undefined,
1616
+ // Resource
1617
+ resource: undefined,
1618
+ // Children
1619
+ statement: undefined,
1620
+ isCorrect: undefined,
1621
+ sampleSolution: undefined,
1622
+ elements: undefined,
1623
+ statements: undefined,
1624
+ responses: undefined,
1625
+ quizzes: undefined,
1626
+ heading: undefined,
1627
+ pairs: undefined,
1628
+ matrix: undefined,
1629
+ choices: undefined,
1630
+ questions: undefined,
1631
+ // Placeholders
1632
+ placeholders: undefined,
1633
+ // Footer
1634
+ footer: undefined,
1635
+ };
1636
+ // Add the resource template if there should be a resource (indicated by resourceType) but there is none defined.
1637
+ // if (bit.resourceType && !bitJson.resource) {
1638
+ // const jsonKey = ResourceType.keyFromValue(bit.resourceType);
1639
+ // bitJson.resource = {
1640
+ // type: bit.resourceType,
1641
+ // } as ResourceJson;
1642
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any
1643
+ // if (jsonKey) (bitJson.resource as any)[jsonKey] = {};
1644
+ // }
1645
+ return bitJson;
1646
+ }
1647
+ /**
1648
+ * Remove wanted properties from bit json object.
1649
+ * - This function defines the defaults for properties in the json.
1650
+ *
1651
+ * @param bit
1652
+ * @returns
1653
+ */
1654
+ cleanAndSetDefaultsForBitJson(bitJson) {
1655
+ const plainText = this.options.textAsPlainText;
1656
+ // Clear 'item' which may be an empty string if 'lead' was set but item not
1657
+ // Only necessary because '.article' does not include a default value for 'item'
1658
+ // which is totally inconsistent, but maybe is wanted.
1659
+ if (!bitJson.item)
1660
+ bitJson.item = undefined;
1661
+ // Add default properties to the bit.
1662
+ // NOTE: Not all bits have the same default properties.
1663
+ // The properties used in the antlr parser are a bit random sometimes?
1664
+ switch (bitJson.type) {
1665
+ case BitType._error:
1666
+ break;
1667
+ case BitType.article:
1668
+ case BitType.highlightText:
1669
+ case BitType.message:
1670
+ case BitType.sampleSolution:
1671
+ case BitType.page:
1672
+ case BitType.statement:
1673
+ if (bitJson.body == null)
1674
+ bitJson.body = this.bodyDefault;
1675
+ break;
1676
+ default: // Most bits have these defaults, but there are special cases (not sure if that is by error or design)
1677
+ if (bitJson.item == null)
1678
+ bitJson.item = this.textDefault;
1679
+ if (bitJson.hint == null)
1680
+ bitJson.hint = this.textDefault;
1681
+ if (bitJson.isExample == null)
1682
+ bitJson.isExample = false;
1683
+ if (bitJson.example == null)
1684
+ bitJson.example = this.textDefault;
1685
+ if (bitJson.body == null)
1686
+ bitJson.body = this.bodyDefault;
1687
+ break;
1688
+ case BitType.multipleChoice1:
1689
+ case BitType.multipleResponse1:
1690
+ case BitType.sequence:
1691
+ if (bitJson.item == null)
1692
+ bitJson.item = this.textDefault;
1693
+ if (bitJson.hint == null)
1694
+ bitJson.hint = this.textDefault;
1695
+ if (bitJson.instruction == null)
1696
+ bitJson.instruction = this.textDefault;
1697
+ if (bitJson.isExample == null)
1698
+ bitJson.isExample = false;
1699
+ if (bitJson.example == null)
1700
+ bitJson.example = this.textDefault;
1701
+ if (bitJson.body == null)
1702
+ bitJson.body = this.bodyDefault;
1703
+ break;
1704
+ case BitType.essay:
1705
+ if (bitJson.item == null)
1706
+ bitJson.item = this.textDefault;
1707
+ if (bitJson.hint == null)
1708
+ bitJson.hint = this.textDefault;
1709
+ if (bitJson.instruction == null)
1710
+ bitJson.instruction = this.textDefault;
1711
+ if (bitJson.isExample == null)
1712
+ bitJson.isExample = false;
1713
+ if (bitJson.example == null)
1714
+ bitJson.example = this.textDefault;
1715
+ if (bitJson.body == null)
1716
+ bitJson.body = this.bodyDefault;
1717
+ if (bitJson.partialAnswer == null)
1718
+ bitJson.partialAnswer = '';
1719
+ // if (bitJson.sampleSolution == null) bitJson.sampleSolution = '';
1720
+ break;
1721
+ case BitType.trueFalse1:
1722
+ if (bitJson.item == null)
1723
+ bitJson.item = this.textDefault;
1724
+ if (bitJson.lead == null)
1725
+ bitJson.lead = this.textDefault;
1726
+ if (bitJson.hint == null)
1727
+ bitJson.hint = this.textDefault;
1728
+ if (bitJson.instruction == null)
1729
+ bitJson.instruction = this.textDefault;
1730
+ if (bitJson.isExample == null)
1731
+ bitJson.isExample = false;
1732
+ if (bitJson.isCorrect == null)
1733
+ bitJson.isCorrect = false;
1734
+ if (bitJson.body == null)
1735
+ bitJson.body = this.bodyDefault;
1736
+ break;
1737
+ case BitType.trueFalse:
1738
+ if (bitJson.item == null)
1739
+ bitJson.item = this.textDefault;
1740
+ if (bitJson.lead == null)
1741
+ bitJson.lead = this.textDefault;
1742
+ if (bitJson.hint == null)
1743
+ bitJson.hint = this.textDefault;
1744
+ if (bitJson.instruction == null)
1745
+ bitJson.instruction = this.textDefault;
1746
+ if (bitJson.labelFalse == null)
1747
+ bitJson.labelFalse = '';
1748
+ if (bitJson.labelTrue == null)
1749
+ bitJson.labelTrue = '';
1750
+ if (bitJson.body == null)
1751
+ bitJson.body = this.bodyDefault;
1752
+ break;
1753
+ case BitType.chapter:
1754
+ if (bitJson.item == null)
1755
+ bitJson.item = this.textDefault;
1756
+ if (bitJson.hint == null)
1757
+ bitJson.hint = this.textDefault;
1758
+ if (bitJson.isExample == null)
1759
+ bitJson.isExample = false;
1760
+ if (bitJson.example == null)
1761
+ bitJson.example = this.textDefault;
1762
+ if (bitJson.toc == null)
1763
+ bitJson.toc = true; // Always set on chapter bits?
1764
+ if (bitJson.progress == null)
1765
+ bitJson.progress = true; // Always set on chapter bits
1766
+ if (bitJson.level == null)
1767
+ bitJson.level = 1; // Set level 1 if none set (makes no sense, but in ANTLR parser)
1768
+ if (bitJson.body == null)
1769
+ bitJson.body = this.bodyDefault;
1770
+ break;
1771
+ case BitType.multipleChoice:
1772
+ case BitType.multipleResponse:
1773
+ if (bitJson.item == null)
1774
+ bitJson.item = this.textDefault;
1775
+ if (bitJson.hint == null)
1776
+ bitJson.hint = this.textDefault;
1777
+ if (bitJson.instruction == null)
1778
+ bitJson.instruction = this.textDefault;
1779
+ if (bitJson.body == null)
1780
+ bitJson.body = this.bodyDefault;
1781
+ if (bitJson.footer == null)
1782
+ bitJson.footer = this.textDefault;
1783
+ break;
1784
+ case BitType.interview:
1785
+ case BitType.interviewInstructionGrouped:
1786
+ if (bitJson.item == null)
1787
+ bitJson.item = this.textDefault;
1788
+ if (bitJson.hint == null)
1789
+ bitJson.hint = this.textDefault;
1790
+ if (bitJson.instruction == null)
1791
+ bitJson.instruction = this.textDefault;
1792
+ if (bitJson.body == null)
1793
+ bitJson.body = this.bodyDefault;
1794
+ if (bitJson.footer == null)
1795
+ bitJson.footer = this.textDefault;
1796
+ if (bitJson.questions == null)
1797
+ bitJson.questions = [];
1798
+ break;
1799
+ case BitType.match:
1800
+ case BitType.matchReverse:
1801
+ case BitType.matchSolutionGrouped:
1802
+ case BitType.matchAll:
1803
+ case BitType.matchAllReverse:
1804
+ if (bitJson.item == null)
1805
+ bitJson.item = this.textDefault;
1806
+ if (bitJson.heading == null)
1807
+ bitJson.heading = {};
1808
+ if (bitJson.body == null)
1809
+ bitJson.body = this.bodyDefault;
1810
+ break;
1811
+ case BitType.matchMatrix:
1812
+ if (bitJson.item == null)
1813
+ bitJson.item = this.textDefault;
1814
+ if (bitJson.body == null)
1815
+ bitJson.body = this.bodyDefault;
1816
+ break;
1817
+ case BitType.learningPathBook:
1818
+ case BitType.learningPathBotTraining:
1819
+ case BitType.learningPathClassroomEvent:
1820
+ case BitType.learningPathClassroomTraining:
1821
+ case BitType.learningPathClosing:
1822
+ case BitType.learningPathExternalLink:
1823
+ case BitType.learningPathFeedback:
1824
+ case BitType.learningPathLearningGoal:
1825
+ case BitType.learningPathLti:
1826
+ case BitType.learningPathSign:
1827
+ case BitType.learningPathStep:
1828
+ case BitType.learningPathVideoCall:
1829
+ if (bitJson.item == null)
1830
+ bitJson.item = this.textDefault;
1831
+ if (bitJson.hint == null)
1832
+ bitJson.hint = this.textDefault;
1833
+ if (bitJson.isExample == null)
1834
+ bitJson.isExample = false;
1835
+ if (bitJson.example == null)
1836
+ bitJson.example = this.textDefault;
1837
+ if (bitJson.isTracked == null)
1838
+ bitJson.isTracked = true;
1839
+ if (bitJson.isInfoOnly == null)
1840
+ bitJson.isInfoOnly = false;
1841
+ if (bitJson.body == null)
1842
+ bitJson.body = this.bodyDefault;
1843
+ break;
1844
+ case BitType.articleAi:
1845
+ case BitType.noteAi:
1846
+ case BitType.summaryAi:
1847
+ if (bitJson.AIGenerated == null)
1848
+ bitJson.AIGenerated = true;
1849
+ if (bitJson.item == null)
1850
+ bitJson.item = this.textDefault;
1851
+ if (bitJson.hint == null)
1852
+ bitJson.hint = this.textDefault;
1853
+ if (bitJson.isExample == null)
1854
+ bitJson.isExample = false;
1855
+ if (bitJson.example == null)
1856
+ bitJson.example = this.textDefault;
1857
+ if (bitJson.body == null)
1858
+ bitJson.body = this.bodyDefault;
1859
+ break;
1860
+ }
1861
+ // Remove unwanted properties
1862
+ // Properties
1863
+ if (bitJson.id == null)
1864
+ delete bitJson.id;
1865
+ if (bitJson.externalId == null)
1866
+ delete bitJson.externalId;
1867
+ if (bitJson.spaceId == null)
1868
+ delete bitJson.spaceId;
1869
+ if (bitJson.padletId == null)
1870
+ delete bitJson.padletId;
1871
+ if (bitJson.AIGenerated == null)
1872
+ delete bitJson.AIGenerated;
1873
+ if (bitJson.releaseVersion == null)
1874
+ delete bitJson.releaseVersion;
1875
+ if (bitJson.book == null)
1876
+ delete bitJson.book;
1877
+ if (bitJson.ageRange == null)
1878
+ delete bitJson.ageRange;
1879
+ if (bitJson.language == null)
1880
+ delete bitJson.language;
1881
+ if (bitJson.computerLanguage == null)
1882
+ delete bitJson.computerLanguage;
1883
+ if (bitJson.subtype == null)
1884
+ delete bitJson.subtype;
1885
+ if (bitJson.coverImage == null)
1886
+ delete bitJson.coverImage;
1887
+ if (bitJson.publisher == null)
1888
+ delete bitJson.publisher;
1889
+ if (bitJson.publications == null)
1890
+ delete bitJson.publications;
1891
+ if (bitJson.author == null)
1892
+ delete bitJson.author;
1893
+ if (bitJson.subject == null)
1894
+ delete bitJson.subject;
1895
+ if (bitJson.date == null)
1896
+ delete bitJson.date;
1897
+ if (bitJson.location == null)
1898
+ delete bitJson.location;
1899
+ if (bitJson.theme == null)
1900
+ delete bitJson.theme;
1901
+ if (bitJson.kind == null)
1902
+ delete bitJson.kind;
1903
+ if (bitJson.action == null)
1904
+ delete bitJson.action;
1905
+ if (bitJson.thumbImage == null)
1906
+ delete bitJson.thumbImage;
1907
+ if (bitJson.deeplink == null)
1908
+ delete bitJson.deeplink;
1909
+ if (bitJson.externalLink == null)
1910
+ delete bitJson.externalLink;
1911
+ if (bitJson.externalLinkText == null)
1912
+ delete bitJson.externalLinkText;
1913
+ if (bitJson.videoCallLink == null)
1914
+ delete bitJson.videoCallLink;
1915
+ if (bitJson.duration == null)
1916
+ delete bitJson.duration;
1917
+ if (bitJson.list == null)
1918
+ delete bitJson.list;
1919
+ if (bitJson.textReference == null)
1920
+ delete bitJson.textReference;
1921
+ if (bitJson.isTracked == null)
1922
+ delete bitJson.isTracked;
1923
+ if (bitJson.isInfoOnly == null)
1924
+ delete bitJson.isInfoOnly;
1925
+ if (bitJson.labelTrue == null)
1926
+ delete bitJson.labelTrue;
1927
+ if (bitJson.labelFalse == null)
1928
+ delete bitJson.labelFalse;
1929
+ if (bitJson.quotedPerson == null)
1930
+ delete bitJson.quotedPerson;
1931
+ // Book data
1932
+ if (bitJson.title == null)
1933
+ delete bitJson.title;
1934
+ if (bitJson.subtitle == null)
1935
+ delete bitJson.subtitle;
1936
+ if (bitJson.level == null)
1937
+ delete bitJson.level;
1938
+ if (bitJson.toc == null)
1939
+ delete bitJson.toc;
1940
+ if (bitJson.progress == null)
1941
+ delete bitJson.progress;
1942
+ if (bitJson.anchor == null)
1943
+ delete bitJson.anchor;
1944
+ if (bitJson.reference == null)
1945
+ delete bitJson.reference;
1946
+ if (bitJson.referenceEnd == null)
1947
+ delete bitJson.referenceEnd;
1948
+ // Item, Lead, Hint, Instruction
1949
+ if (bitJson.item == null)
1950
+ delete bitJson.item;
1951
+ if (bitJson.lead == null)
1952
+ delete bitJson.lead;
1953
+ if (bitJson.hint == null)
1954
+ delete bitJson.hint;
1955
+ if (bitJson.instruction == null)
1956
+ delete bitJson.instruction;
1957
+ // Example
1958
+ if (bitJson.example == null)
1959
+ delete bitJson.example;
1960
+ if (bitJson.isExample == null)
1961
+ delete bitJson.isExample;
1962
+ // Extra Properties
1963
+ if (bitJson.extraProperties == null)
1964
+ delete bitJson.extraProperties;
1965
+ // Body
1966
+ if (bitJson.body == null)
1967
+ delete bitJson.body;
1968
+ // Placeholders
1969
+ if (bitJson.placeholders == null || Object.keys(bitJson.placeholders).length === 0)
1970
+ delete bitJson.placeholders;
1971
+ // Resource
1972
+ if (bitJson.resource == null)
1973
+ delete bitJson.resource;
1974
+ // Children
1975
+ if (bitJson.statement == null)
1976
+ delete bitJson.statement;
1977
+ if (bitJson.isCorrect == null)
1978
+ delete bitJson.isCorrect;
1979
+ if (bitJson.sampleSolution == null)
1980
+ delete bitJson.sampleSolution;
1981
+ if (bitJson.partialAnswer == null)
1982
+ delete bitJson.partialAnswer;
1983
+ if (bitJson.elements == null)
1984
+ delete bitJson.elements;
1985
+ if (bitJson.statements == null)
1986
+ delete bitJson.statements;
1987
+ if (bitJson.responses == null)
1988
+ delete bitJson.responses;
1989
+ if (bitJson.quizzes == null)
1990
+ delete bitJson.quizzes;
1991
+ if (bitJson.heading == null)
1992
+ delete bitJson.heading;
1993
+ if (bitJson.pairs == null)
1994
+ delete bitJson.pairs;
1995
+ if (bitJson.matrix == null)
1996
+ delete bitJson.matrix;
1997
+ if (bitJson.choices == null)
1998
+ delete bitJson.choices;
1999
+ if (bitJson.questions == null)
2000
+ delete bitJson.questions;
2001
+ // Placeholders
2002
+ if (!plainText || bitJson.placeholders == null)
2003
+ delete bitJson.placeholders;
2004
+ // Footer
2005
+ if (bitJson.footer == null)
2006
+ delete bitJson.footer;
2007
+ return bitJson;
2008
+ }
2009
+ //
2010
+ // Writer interface
2011
+ //
2012
+ /**
2013
+ * Writes a string value to the output.
2014
+ * @param value - The string value to be written.
2015
+ */
2016
+ write(value) {
2017
+ this.writer.write(value);
2018
+ return this;
2019
+ }
2020
+ /**
2021
+ * Writes a new line to the output. The line is indented automatically. The line is ended with the endOfLineString.
2022
+ * @param value - The line to write. When omitted, only the endOfLineString is written.
2023
+ */
2024
+ writeLine(value) {
2025
+ this.writer.writeLine(value);
2026
+ return this;
2027
+ }
2028
+ /**
2029
+ * Writes a collection of lines to the output. Each line is indented automatically and ended with the endOfLineString.
2030
+ * @param values - The lines to write.
2031
+ * @param delimiter - An optional delimiter to be written at the end of each line, except for the last one.
2032
+ */
2033
+ writeLines(values, delimiter) {
2034
+ this.writer.writeLines(values, delimiter);
2035
+ return this;
2036
+ }
2037
+ /**
2038
+ * Writes a single whitespace character to the output.
2039
+ */
2040
+ writeWhiteSpace() {
2041
+ this.writer.writeWhiteSpace();
2042
+ return this;
2043
+ }
2044
+ }
2045
+ export { JsonGenerator };
2046
+ //# sourceMappingURL=JsonGenerator.js.map