@nfdi4plants/arctrl 3.2.2 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (470) hide show
  1. package/README.md +0 -64
  2. package/dist/ts/index.d.ts +44 -7
  3. package/dist/ts/index.d.ts.map +1 -1
  4. package/dist/ts/index.js +45 -8
  5. package/dist/ts/node_modules/@fable-org/fable-library-ts/Array.js +195 -92
  6. package/dist/ts/node_modules/@fable-org/fable-library-ts/Async.js +251 -30
  7. package/dist/ts/node_modules/@fable-org/fable-library-ts/AsyncBuilder.js +61 -11
  8. package/dist/ts/node_modules/@fable-org/fable-library-ts/BigInt.js +15 -5
  9. package/dist/ts/node_modules/@fable-org/fable-library-ts/BitConverter.js +139 -0
  10. package/dist/ts/node_modules/@fable-org/fable-library-ts/Date.js +1 -1
  11. package/dist/ts/node_modules/@fable-org/fable-library-ts/Decimal.js +68 -12
  12. package/dist/ts/node_modules/@fable-org/fable-library-ts/Double.js +24 -10
  13. package/dist/ts/node_modules/@fable-org/fable-library-ts/FSharp.Core.js +8 -2
  14. package/dist/ts/node_modules/@fable-org/fable-library-ts/Global.js +1 -1
  15. package/dist/ts/node_modules/@fable-org/fable-library-ts/Int32.js +11 -2
  16. package/dist/ts/node_modules/@fable-org/fable-library-ts/List.js +220 -155
  17. package/dist/ts/node_modules/@fable-org/fable-library-ts/Long.js +7 -2
  18. package/dist/ts/node_modules/@fable-org/fable-library-ts/Map.js +46 -39
  19. package/dist/ts/node_modules/@fable-org/fable-library-ts/MutableMap.js +75 -92
  20. package/dist/ts/node_modules/@fable-org/fable-library-ts/MutableSet.js +56 -76
  21. package/dist/ts/node_modules/@fable-org/fable-library-ts/NumberStyles.js +54 -0
  22. package/dist/ts/node_modules/@fable-org/fable-library-ts/Numeric.js +10 -5
  23. package/dist/ts/node_modules/@fable-org/fable-library-ts/Random.js +3 -4
  24. package/dist/ts/node_modules/@fable-org/fable-library-ts/Range.js +4 -3
  25. package/dist/ts/node_modules/@fable-org/fable-library-ts/RegExp.js +2 -2
  26. package/dist/ts/node_modules/@fable-org/fable-library-ts/Seq.js +128 -64
  27. package/dist/ts/node_modules/@fable-org/fable-library-ts/Seq2.js +4 -8
  28. package/dist/ts/node_modules/@fable-org/fable-library-ts/Set.js +64 -57
  29. package/dist/ts/node_modules/@fable-org/fable-library-ts/String.js +68 -21
  30. package/dist/ts/node_modules/@fable-org/fable-library-ts/System.Collections.Generic.js +3 -2
  31. package/dist/ts/node_modules/@fable-org/fable-library-ts/System.Text.js +2 -2
  32. package/dist/ts/node_modules/@fable-org/fable-library-ts/System.js +5 -5
  33. package/dist/ts/node_modules/@fable-org/fable-library-ts/Types.js +23 -12
  34. package/dist/ts/node_modules/@fable-org/fable-library-ts/Util.js +88 -49
  35. package/dist/ts/node_modules/@fable-org/fable-library-ts/lib/big.js +121 -74
  36. package/dist/ts/ts/ARC.d.ts +22 -5
  37. package/dist/ts/ts/ARC.d.ts.map +1 -1
  38. package/dist/ts/ts/ARC.js +282 -185
  39. package/dist/ts/ts/CWL/CWLKnownFieldNames.d.ts +0 -2
  40. package/dist/ts/ts/CWL/CWLKnownFieldNames.d.ts.map +1 -1
  41. package/dist/ts/ts/CWL/CWLKnownFieldNames.js +1 -7
  42. package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts +46 -27
  43. package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts.map +1 -1
  44. package/dist/ts/ts/CWL/CWLProcessingUnit.js +312 -123
  45. package/dist/ts/ts/CWL/CWLTypes.d.ts +481 -148
  46. package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -1
  47. package/dist/ts/ts/CWL/CWLTypes.js +887 -201
  48. package/dist/ts/ts/CWL/Decode.d.ts +480 -211
  49. package/dist/ts/ts/CWL/Decode.d.ts.map +1 -1
  50. package/dist/ts/ts/CWL/Decode.js +3614 -2462
  51. package/dist/ts/ts/CWL/DynamicObjHelpers.d.ts +9 -0
  52. package/dist/ts/ts/CWL/DynamicObjHelpers.d.ts.map +1 -1
  53. package/dist/ts/ts/CWL/DynamicObjHelpers.js +55 -5
  54. package/dist/ts/ts/CWL/Encode.d.ts +225 -85
  55. package/dist/ts/ts/CWL/Encode.d.ts.map +1 -1
  56. package/dist/ts/ts/CWL/Encode.js +1858 -970
  57. package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts +42 -28
  58. package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts.map +1 -1
  59. package/dist/ts/ts/CWL/ExpressionToolDescription.js +34 -13
  60. package/dist/ts/ts/CWL/HashHelpers.d.ts +38 -0
  61. package/dist/ts/ts/CWL/HashHelpers.d.ts.map +1 -1
  62. package/dist/ts/ts/CWL/HashHelpers.js +255 -6
  63. package/dist/ts/ts/CWL/Inputs.d.ts +127 -56
  64. package/dist/ts/ts/CWL/Inputs.d.ts.map +1 -1
  65. package/dist/ts/ts/CWL/Inputs.js +107 -16
  66. package/dist/ts/ts/CWL/OperationDescription.d.ts +41 -21
  67. package/dist/ts/ts/CWL/OperationDescription.d.ts.map +1 -1
  68. package/dist/ts/ts/CWL/OperationDescription.js +35 -9
  69. package/dist/ts/ts/CWL/Outputs.d.ts +93 -42
  70. package/dist/ts/ts/CWL/Outputs.d.ts.map +1 -1
  71. package/dist/ts/ts/CWL/Outputs.js +101 -19
  72. package/dist/ts/ts/CWL/ParameterReference.d.ts +11 -8
  73. package/dist/ts/ts/CWL/ParameterReference.d.ts.map +1 -1
  74. package/dist/ts/ts/CWL/ParameterReference.js +18 -25
  75. package/dist/ts/ts/CWL/ParameterValue.d.ts +15 -1
  76. package/dist/ts/ts/CWL/ParameterValue.d.ts.map +1 -1
  77. package/dist/ts/ts/CWL/ParameterValue.js +59 -35
  78. package/dist/ts/ts/CWL/Requirements.d.ts +240 -98
  79. package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -1
  80. package/dist/ts/ts/CWL/Requirements.js +462 -89
  81. package/dist/ts/ts/CWL/ScalarQuoting.d.ts +51 -0
  82. package/dist/ts/ts/CWL/ScalarQuoting.d.ts.map +1 -0
  83. package/dist/ts/ts/CWL/ScalarQuoting.js +250 -0
  84. package/dist/ts/ts/CWL/ToolDescription.d.ts +63 -50
  85. package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -1
  86. package/dist/ts/ts/CWL/ToolDescription.js +34 -13
  87. package/dist/ts/ts/CWL/WorkflowDescription.d.ts +45 -26
  88. package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -1
  89. package/dist/ts/ts/CWL/WorkflowDescription.js +38 -11
  90. package/dist/ts/ts/CWL/WorkflowSteps.d.ts +248 -65
  91. package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -1
  92. package/dist/ts/ts/CWL/WorkflowSteps.js +413 -43
  93. package/dist/ts/ts/CWLRunResolver.d.ts +30 -12
  94. package/dist/ts/ts/CWLRunResolver.d.ts.map +1 -1
  95. package/dist/ts/ts/CWLRunResolver.js +221 -86
  96. package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
  97. package/dist/ts/ts/Contract/ARC.js +13 -14
  98. package/dist/ts/ts/Contract/ArcAssay.d.ts.map +1 -1
  99. package/dist/ts/ts/Contract/ArcAssay.js +4 -4
  100. package/dist/ts/ts/Contract/ArcInvestigation.d.ts.map +1 -1
  101. package/dist/ts/ts/Contract/ArcInvestigation.js +3 -4
  102. package/dist/ts/ts/Contract/ArcRun.d.ts +12 -2
  103. package/dist/ts/ts/Contract/ArcRun.d.ts.map +1 -1
  104. package/dist/ts/ts/Contract/ArcRun.js +47 -20
  105. package/dist/ts/ts/Contract/ArcStudy.d.ts.map +1 -1
  106. package/dist/ts/ts/Contract/ArcStudy.js +4 -4
  107. package/dist/ts/ts/Contract/ArcWorkflow.d.ts +18 -4
  108. package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
  109. package/dist/ts/ts/Contract/ArcWorkflow.js +55 -17
  110. package/dist/ts/ts/Contract/Datamap.d.ts.map +1 -1
  111. package/dist/ts/ts/Contract/Datamap.js +16 -17
  112. package/dist/ts/ts/Contract/Git.js +1 -1
  113. package/dist/ts/ts/Contract/ValidationPackagesConfig.d.ts.map +1 -1
  114. package/dist/ts/ts/Contract/ValidationPackagesConfig.js +4 -5
  115. package/dist/ts/ts/ContractIO/ContractIO.d.ts +7 -0
  116. package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
  117. package/dist/ts/ts/ContractIO/ContractIO.js +95 -18
  118. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -0
  119. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
  120. package/dist/ts/ts/ContractIO/FileSystemHelper.js +12 -5
  121. package/dist/ts/ts/Conversion/Assay.d.ts.map +1 -1
  122. package/dist/ts/ts/Conversion/Assay.js +26 -18
  123. package/dist/ts/ts/Conversion/Basic.d.ts +4 -0
  124. package/dist/ts/ts/Conversion/Basic.d.ts.map +1 -1
  125. package/dist/ts/ts/Conversion/Basic.js +55 -31
  126. package/dist/ts/ts/Conversion/ColumnIndex.d.ts.map +1 -1
  127. package/dist/ts/ts/Conversion/ColumnIndex.js +2 -4
  128. package/dist/ts/ts/Conversion/DateTime.d.ts.map +1 -1
  129. package/dist/ts/ts/Conversion/DateTime.js +1 -2
  130. package/dist/ts/ts/Conversion/Investigation.d.ts.map +1 -1
  131. package/dist/ts/ts/Conversion/Investigation.js +15 -14
  132. package/dist/ts/ts/Conversion/Person.js +11 -11
  133. package/dist/ts/ts/Conversion/Process.d.ts +4 -2
  134. package/dist/ts/ts/Conversion/Process.d.ts.map +1 -1
  135. package/dist/ts/ts/Conversion/Process.js +134 -97
  136. package/dist/ts/ts/Conversion/Run.d.ts +36 -6
  137. package/dist/ts/ts/Conversion/Run.d.ts.map +1 -1
  138. package/dist/ts/ts/Conversion/Run.js +320 -136
  139. package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts.map +1 -1
  140. package/dist/ts/ts/Conversion/ScholarlyArticle.js +75 -9
  141. package/dist/ts/ts/Conversion/Study.d.ts.map +1 -1
  142. package/dist/ts/ts/Conversion/Study.js +23 -12
  143. package/dist/ts/ts/Conversion/Table.d.ts +3 -2
  144. package/dist/ts/ts/Conversion/Table.d.ts.map +1 -1
  145. package/dist/ts/ts/Conversion/Table.js +8 -8
  146. package/dist/ts/ts/Conversion/Workflow.d.ts +48 -9
  147. package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -1
  148. package/dist/ts/ts/Conversion/Workflow.js +655 -163
  149. package/dist/ts/ts/Conversion.js +6 -6
  150. package/dist/ts/ts/Core/ArcTypes.d.ts +73 -28
  151. package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
  152. package/dist/ts/ts/Core/ArcTypes.js +219 -129
  153. package/dist/ts/ts/Core/Comment.d.ts.map +1 -1
  154. package/dist/ts/ts/Core/Comment.js +2 -2
  155. package/dist/ts/ts/Core/CommentList.js +7 -7
  156. package/dist/ts/ts/Core/Conversion.d.ts.map +1 -1
  157. package/dist/ts/ts/Core/Conversion.js +68 -59
  158. package/dist/ts/ts/Core/Data.d.ts +6 -0
  159. package/dist/ts/ts/Core/Data.d.ts.map +1 -1
  160. package/dist/ts/ts/Core/Data.js +32 -12
  161. package/dist/ts/ts/Core/DataContext.d.ts +1 -1
  162. package/dist/ts/ts/Core/DataContext.d.ts.map +1 -1
  163. package/dist/ts/ts/Core/DataContext.js +4 -4
  164. package/dist/ts/ts/Core/DataFile.d.ts +11 -8
  165. package/dist/ts/ts/Core/DataFile.d.ts.map +1 -1
  166. package/dist/ts/ts/Core/DataFile.js +55 -61
  167. package/dist/ts/ts/Core/Datamap.d.ts.map +1 -1
  168. package/dist/ts/ts/Core/Datamap.js +2 -3
  169. package/dist/ts/ts/Core/Helper/Collections.d.ts.map +1 -1
  170. package/dist/ts/ts/Core/Helper/Collections.js +2 -4
  171. package/dist/ts/ts/Core/Helper/Identifier.d.ts.map +1 -1
  172. package/dist/ts/ts/Core/Helper/Identifier.js +12 -15
  173. package/dist/ts/ts/Core/Helper/ORCID.d.ts.map +1 -1
  174. package/dist/ts/ts/Core/Helper/ORCID.js +2 -3
  175. package/dist/ts/ts/Core/Helper/Regex.d.ts.map +1 -1
  176. package/dist/ts/ts/Core/Helper/Regex.js +52 -53
  177. package/dist/ts/ts/Core/Helper/SemVer.d.ts +13 -3
  178. package/dist/ts/ts/Core/Helper/SemVer.d.ts.map +1 -1
  179. package/dist/ts/ts/Core/Helper/SemVer.js +96 -6
  180. package/dist/ts/ts/Core/Helper/Url.d.ts.map +1 -1
  181. package/dist/ts/ts/Core/Helper/Url.js +1 -1
  182. package/dist/ts/ts/Core/OntologyAnnotation.js +22 -22
  183. package/dist/ts/ts/Core/Person.d.ts.map +1 -1
  184. package/dist/ts/ts/Core/Person.js +2 -2
  185. package/dist/ts/ts/Core/Process/ColumnIndex.d.ts.map +1 -1
  186. package/dist/ts/ts/Core/Process/ColumnIndex.js +10 -12
  187. package/dist/ts/ts/Core/Process/Component.d.ts.map +1 -1
  188. package/dist/ts/ts/Core/Process/Component.js +22 -22
  189. package/dist/ts/ts/Core/Process/Factor.d.ts.map +1 -1
  190. package/dist/ts/ts/Core/Process/Factor.js +7 -7
  191. package/dist/ts/ts/Core/Process/FactorValue.d.ts.map +1 -1
  192. package/dist/ts/ts/Core/Process/FactorValue.js +15 -15
  193. package/dist/ts/ts/Core/Process/Material.d.ts.map +1 -1
  194. package/dist/ts/ts/Core/Process/Material.js +2 -2
  195. package/dist/ts/ts/Core/Process/MaterialAttribute.d.ts.map +1 -1
  196. package/dist/ts/ts/Core/Process/MaterialAttribute.js +6 -6
  197. package/dist/ts/ts/Core/Process/MaterialAttributeValue.d.ts.map +1 -1
  198. package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +16 -16
  199. package/dist/ts/ts/Core/Process/Process.js +21 -21
  200. package/dist/ts/ts/Core/Process/ProcessInput.d.ts.map +1 -1
  201. package/dist/ts/ts/Core/Process/ProcessInput.js +2 -2
  202. package/dist/ts/ts/Core/Process/ProcessOutput.d.ts.map +1 -1
  203. package/dist/ts/ts/Core/Process/ProcessOutput.js +2 -2
  204. package/dist/ts/ts/Core/Process/ProcessParameterValue.d.ts.map +1 -1
  205. package/dist/ts/ts/Core/Process/ProcessParameterValue.js +17 -17
  206. package/dist/ts/ts/Core/Process/ProcessSequence.js +4 -4
  207. package/dist/ts/ts/Core/Process/Protocol.d.ts.map +1 -1
  208. package/dist/ts/ts/Core/Process/Protocol.js +9 -9
  209. package/dist/ts/ts/Core/Process/ProtocolParameter.d.ts.map +1 -1
  210. package/dist/ts/ts/Core/Process/ProtocolParameter.js +6 -6
  211. package/dist/ts/ts/Core/Publication.d.ts.map +1 -1
  212. package/dist/ts/ts/Core/Publication.js +3 -3
  213. package/dist/ts/ts/Core/ScalarValue.d.ts.map +1 -1
  214. package/dist/ts/ts/Core/ScalarValue.js +9 -13
  215. package/dist/ts/ts/Core/Table/ArcTable.d.ts.map +1 -1
  216. package/dist/ts/ts/Core/Table/ArcTable.js +18 -18
  217. package/dist/ts/ts/Core/Table/ArcTableAux.d.ts +1 -1
  218. package/dist/ts/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
  219. package/dist/ts/ts/Core/Table/ArcTableAux.js +59 -70
  220. package/dist/ts/ts/Core/Table/ArcTables.js +16 -16
  221. package/dist/ts/ts/Core/Table/CompositeCell.d.ts +4 -0
  222. package/dist/ts/ts/Core/Table/CompositeCell.d.ts.map +1 -1
  223. package/dist/ts/ts/Core/Table/CompositeCell.js +39 -2
  224. package/dist/ts/ts/Core/Table/CompositeHeader.d.ts.map +1 -1
  225. package/dist/ts/ts/Core/Table/CompositeHeader.js +5 -6
  226. package/dist/ts/ts/Core/Templates.d.ts.map +1 -1
  227. package/dist/ts/ts/Core/Templates.js +2 -2
  228. package/dist/ts/ts/FileSystem/Path.d.ts +13 -2
  229. package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
  230. package/dist/ts/ts/FileSystem/Path.js +37 -19
  231. package/dist/ts/ts/Json/Assay.js +22 -22
  232. package/dist/ts/ts/Json/Comment.js +9 -9
  233. package/dist/ts/ts/Json/Data.d.ts.map +1 -1
  234. package/dist/ts/ts/Json/Data.js +11 -11
  235. package/dist/ts/ts/Json/Datamap/DataContext.js +2 -2
  236. package/dist/ts/ts/Json/Decode.d.ts.map +1 -1
  237. package/dist/ts/ts/Json/Decode.js +3 -5
  238. package/dist/ts/ts/Json/Encode.js +2 -2
  239. package/dist/ts/ts/Json/Investigation.d.ts.map +1 -1
  240. package/dist/ts/ts/Json/Investigation.js +20 -20
  241. package/dist/ts/ts/Json/OntologyAnnotation.d.ts.map +1 -1
  242. package/dist/ts/ts/Json/OntologyAnnotation.js +18 -18
  243. package/dist/ts/ts/Json/OntologySourceReference.d.ts.map +1 -1
  244. package/dist/ts/ts/Json/OntologySourceReference.js +9 -9
  245. package/dist/ts/ts/Json/Person.d.ts.map +1 -1
  246. package/dist/ts/ts/Json/Person.js +20 -20
  247. package/dist/ts/ts/Json/Process/AssayMaterials.d.ts.map +1 -1
  248. package/dist/ts/ts/Json/Process/AssayMaterials.js +1 -2
  249. package/dist/ts/ts/Json/Process/Component.d.ts.map +1 -1
  250. package/dist/ts/ts/Json/Process/Component.js +5 -6
  251. package/dist/ts/ts/Json/Process/Factor.d.ts.map +1 -1
  252. package/dist/ts/ts/Json/Process/Factor.js +7 -7
  253. package/dist/ts/ts/Json/Process/FactorValue.d.ts.map +1 -1
  254. package/dist/ts/ts/Json/Process/FactorValue.js +2 -3
  255. package/dist/ts/ts/Json/Process/Material.d.ts.map +1 -1
  256. package/dist/ts/ts/Json/Process/Material.js +9 -10
  257. package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts.map +1 -1
  258. package/dist/ts/ts/Json/Process/MaterialAttribute.js +5 -6
  259. package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts.map +1 -1
  260. package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +2 -3
  261. package/dist/ts/ts/Json/Process/Process.d.ts.map +1 -1
  262. package/dist/ts/ts/Json/Process/Process.js +8 -9
  263. package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts.map +1 -1
  264. package/dist/ts/ts/Json/Process/ProcessParameterValue.js +1 -2
  265. package/dist/ts/ts/Json/Process/Protocol.d.ts.map +1 -1
  266. package/dist/ts/ts/Json/Process/Protocol.js +17 -17
  267. package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts.map +1 -1
  268. package/dist/ts/ts/Json/Process/ProtocolParameter.js +6 -6
  269. package/dist/ts/ts/Json/Process/Sample.d.ts.map +1 -1
  270. package/dist/ts/ts/Json/Process/Sample.js +9 -9
  271. package/dist/ts/ts/Json/Process/Source.d.ts.map +1 -1
  272. package/dist/ts/ts/Json/Process/Source.js +10 -11
  273. package/dist/ts/ts/Json/Process/StudyMaterials.d.ts.map +1 -1
  274. package/dist/ts/ts/Json/Process/StudyMaterials.js +1 -2
  275. package/dist/ts/ts/Json/PropertyValue.d.ts.map +1 -1
  276. package/dist/ts/ts/Json/PropertyValue.js +24 -24
  277. package/dist/ts/ts/Json/Publication.d.ts.map +1 -1
  278. package/dist/ts/ts/Json/Publication.js +10 -10
  279. package/dist/ts/ts/Json/ROCrate/LDContext.js +1 -2
  280. package/dist/ts/ts/Json/ROCrate/LDGraph.js +2 -2
  281. package/dist/ts/ts/Json/ROCrate/LDNode.js +5 -5
  282. package/dist/ts/ts/Json/Run.js +9 -9
  283. package/dist/ts/ts/Json/StringTable.d.ts.map +1 -1
  284. package/dist/ts/ts/Json/StringTable.js +4 -7
  285. package/dist/ts/ts/Json/Study.js +20 -20
  286. package/dist/ts/ts/Json/Table/CellTable.js +1 -2
  287. package/dist/ts/ts/Json/Table/OATable.js +1 -2
  288. package/dist/ts/ts/Json/Workflow.js +9 -9
  289. package/dist/ts/ts/Json.d.ts +121 -1
  290. package/dist/ts/ts/Json.d.ts.map +1 -1
  291. package/dist/ts/ts/Json.js +310 -2
  292. package/dist/ts/ts/JsonIO/Comment.d.ts +15 -0
  293. package/dist/ts/ts/JsonIO/Comment.d.ts.map +1 -0
  294. package/dist/ts/ts/JsonIO/Comment.js +67 -0
  295. package/dist/ts/ts/JsonIO/Data.d.ts +9 -0
  296. package/dist/ts/ts/JsonIO/Data.d.ts.map +1 -0
  297. package/dist/ts/ts/JsonIO/Data.js +49 -0
  298. package/dist/ts/ts/JsonIO/DataFile.d.ts +9 -0
  299. package/dist/ts/ts/JsonIO/DataFile.d.ts.map +1 -0
  300. package/dist/ts/ts/JsonIO/DataFile.js +48 -0
  301. package/dist/ts/ts/JsonIO/LDObject.d.ts +6 -0
  302. package/dist/ts/ts/JsonIO/LDObject.d.ts.map +1 -1
  303. package/dist/ts/ts/JsonIO/LDObject.js +173 -17
  304. package/dist/ts/ts/JsonIO/OntologySourceReference.d.ts +15 -0
  305. package/dist/ts/ts/JsonIO/OntologySourceReference.d.ts.map +1 -0
  306. package/dist/ts/ts/JsonIO/OntologySourceReference.js +67 -0
  307. package/dist/ts/ts/JsonIO/Publication.d.ts +15 -0
  308. package/dist/ts/ts/JsonIO/Publication.d.ts.map +1 -0
  309. package/dist/ts/ts/JsonIO/Publication.js +68 -0
  310. package/dist/ts/ts/JsonIO/Table/ArcTable.d.ts +9 -0
  311. package/dist/ts/ts/JsonIO/Table/ArcTable.d.ts.map +1 -0
  312. package/dist/ts/ts/JsonIO/Table/ArcTable.js +74 -0
  313. package/dist/ts/ts/JsonIO/Table/CompositeCell.d.ts +6 -0
  314. package/dist/ts/ts/JsonIO/Table/CompositeCell.d.ts.map +1 -0
  315. package/dist/ts/ts/JsonIO/Table/CompositeCell.js +29 -0
  316. package/dist/ts/ts/JsonIO/Table/CompositeHeader.d.ts +6 -0
  317. package/dist/ts/ts/JsonIO/Table/CompositeHeader.d.ts.map +1 -0
  318. package/dist/ts/ts/JsonIO/Table/CompositeHeader.js +29 -0
  319. package/dist/ts/ts/JsonIO/Table/IOType.d.ts +6 -0
  320. package/dist/ts/ts/JsonIO/Table/IOType.d.ts.map +1 -0
  321. package/dist/ts/ts/JsonIO/Table/IOType.js +29 -0
  322. package/dist/ts/ts/License.d.ts.map +1 -1
  323. package/dist/ts/ts/License.js +6 -6
  324. package/dist/ts/ts/ROCrate/LDContext.d.ts.map +1 -1
  325. package/dist/ts/ts/ROCrate/LDContext.js +31 -39
  326. package/dist/ts/ts/ROCrate/LDObject.d.ts.map +1 -1
  327. package/dist/ts/ts/ROCrate/LDObject.js +56 -49
  328. package/dist/ts/ts/ROCrate/LDTypes/Comment.js +2 -2
  329. package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +3 -3
  330. package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.js +2 -2
  331. package/dist/ts/ts/ROCrate/LDTypes/CreateAction.js +5 -5
  332. package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.d.ts +1 -0
  333. package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.d.ts.map +1 -1
  334. package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.js +3 -0
  335. package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -1
  336. package/dist/ts/ts/ROCrate/LDTypes/Dataset.js +22 -17
  337. package/dist/ts/ts/ROCrate/LDTypes/DefinedTerm.js +2 -2
  338. package/dist/ts/ts/ROCrate/LDTypes/File.js +5 -5
  339. package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.js +2 -2
  340. package/dist/ts/ts/ROCrate/LDTypes/LabProcess.js +9 -9
  341. package/dist/ts/ts/ROCrate/LDTypes/LabProtocol.js +4 -4
  342. package/dist/ts/ts/ROCrate/LDTypes/Organization.js +1 -1
  343. package/dist/ts/ts/ROCrate/LDTypes/Person.js +7 -7
  344. package/dist/ts/ts/ROCrate/LDTypes/PostalAddress.js +1 -1
  345. package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.d.ts.map +1 -1
  346. package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.js +45 -48
  347. package/dist/ts/ts/ROCrate/LDTypes/Sample.js +3 -3
  348. package/dist/ts/ts/ROCrate/LDTypes/ScholarlyArticle.js +4 -4
  349. package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.js +3 -3
  350. package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.js +3 -3
  351. package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.js +2 -2
  352. package/dist/ts/ts/ROCrateIO.d.ts +18 -4
  353. package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
  354. package/dist/ts/ts/ROCrateIO.js +49 -38
  355. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
  356. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +9 -10
  357. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.d.ts.map +1 -1
  358. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +7 -7
  359. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
  360. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +6 -8
  361. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +20 -20
  362. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
  363. package/dist/ts/ts/Spreadsheet/ArcAssay.js +7 -7
  364. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
  365. package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +10 -12
  366. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
  367. package/dist/ts/ts/Spreadsheet/ArcRun.js +5 -6
  368. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
  369. package/dist/ts/ts/Spreadsheet/ArcStudy.js +3 -3
  370. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
  371. package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +5 -6
  372. package/dist/ts/ts/Spreadsheet/CollectionAux.d.ts.map +1 -1
  373. package/dist/ts/ts/Spreadsheet/CollectionAux.js +10 -14
  374. package/dist/ts/ts/Spreadsheet/Datamap.js +1 -2
  375. package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapColumn.js +3 -3
  376. package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapHeader.js +10 -10
  377. package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.d.ts.map +1 -1
  378. package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.js +9 -10
  379. package/dist/ts/ts/Spreadsheet/Metadata/Assays.d.ts.map +1 -1
  380. package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +8 -10
  381. package/dist/ts/ts/Spreadsheet/Metadata/Comment.d.ts +8 -0
  382. package/dist/ts/ts/Spreadsheet/Metadata/Comment.d.ts.map +1 -1
  383. package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +18 -7
  384. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.d.ts.map +1 -1
  385. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +4 -6
  386. package/dist/ts/ts/Spreadsheet/Metadata/Factors.d.ts.map +1 -1
  387. package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +6 -8
  388. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.d.ts.map +1 -1
  389. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +5 -7
  390. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.d.ts.map +1 -1
  391. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +2 -4
  392. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.d.ts.map +1 -1
  393. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +7 -9
  394. package/dist/ts/ts/Spreadsheet/Metadata/Publication.d.ts.map +1 -1
  395. package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +6 -8
  396. package/dist/ts/ts/Spreadsheet/Metadata/Run.d.ts +1 -1
  397. package/dist/ts/ts/Spreadsheet/Metadata/Run.d.ts.map +1 -1
  398. package/dist/ts/ts/Spreadsheet/Metadata/Run.js +9 -11
  399. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
  400. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +17 -17
  401. package/dist/ts/ts/Spreadsheet/Metadata/Study.d.ts.map +1 -1
  402. package/dist/ts/ts/Spreadsheet/Metadata/Study.js +10 -12
  403. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
  404. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +7 -9
  405. package/dist/ts/ts/WorkflowGraph/Adapters.d.ts +1 -1
  406. package/dist/ts/ts/WorkflowGraph/Adapters.d.ts.map +1 -1
  407. package/dist/ts/ts/WorkflowGraph/Adapters.js +5 -6
  408. package/dist/ts/ts/WorkflowGraph/Builder.d.ts +25 -6
  409. package/dist/ts/ts/WorkflowGraph/Builder.d.ts.map +1 -1
  410. package/dist/ts/ts/WorkflowGraph/Builder.js +264 -138
  411. package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts +6 -0
  412. package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts.map +1 -1
  413. package/dist/ts/ts/WorkflowGraph/GraphTypes.js +4 -1
  414. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts +8 -5
  415. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts.map +1 -1
  416. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.js +27 -10
  417. package/dist/ts/ts/Xlsx.js +3 -3
  418. package/dist/ts/ts/Yaml/ValidationPackage.d.ts +3 -3
  419. package/dist/ts/ts/Yaml/ValidationPackage.d.ts.map +1 -1
  420. package/dist/ts/ts/Yaml/ValidationPackage.js +11 -23
  421. package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +3 -3
  422. package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts.map +1 -1
  423. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +11 -23
  424. package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/DynamicObj.fs.js +16 -20
  425. package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/FableJS.fs.js +1 -1
  426. package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/ReflectionUtils.fs.js +8 -8
  427. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +1 -2
  428. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.6.0/Http.fs.js +4 -4
  429. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Cells/FsCell.fs.js +8 -8
  430. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Cells/FsCellsCollection.fs.js +18 -18
  431. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsAddress.fs.js +3 -3
  432. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsWorkbook.fs.js +1 -1
  433. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsWorksheet.fs.js +7 -7
  434. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Json/Value.fs.js +3 -5
  435. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Json/Worksheet.fs.js +7 -7
  436. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Ranges/FsRangeBase.fs.js +1 -2
  437. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Tables/FsTable.fs.js +7 -7
  438. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.1/Cell.fs.js +2 -2
  439. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.1/Table.fs.js +1 -2
  440. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.9.1/Decode.fs.js +49 -71
  441. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.9.1/Encode.fs.js +1 -1
  442. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.5.0/Decode.fs.js +1 -2
  443. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Compare.fs.js +857 -0
  444. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/CoreSchema.fs.js +725 -0
  445. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Decode.fs.js +1175 -0
  446. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Encode.fs.js +123 -0
  447. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Layout.fs.js +282 -0
  448. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Lexeme.fs.js +203 -0
  449. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Lexer.fs.js +1502 -0
  450. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Model.fs.js +564 -0
  451. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Node.fs.js +453 -0
  452. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Parser.fs.js +2622 -0
  453. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Reader.fs.js +108 -0
  454. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Source.fs.js +649 -0
  455. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Tag.fs.js +32 -0
  456. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Validate.fs.js +1084 -0
  457. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Writer.fs.js +2927 -0
  458. package/package.json +5 -4
  459. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Decode.fs.js +0 -1669
  460. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Encode.fs.js +0 -57
  461. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Escapes.fs.js +0 -320
  462. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Interop/JsInterop.fs.js +0 -10
  463. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Persil.fs.js +0 -414
  464. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Preprocessing.fs.js +0 -319
  465. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Reader.fs.js +0 -1884
  466. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Regex.fs.js +0 -23
  467. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/RegexActivePatterns.fs.js +0 -313
  468. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Syntax.fs.js +0 -840
  469. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Writer.fs.js +0 -689
  470. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/YAMLiciousTypes.fs.js +0 -359
@@ -0,0 +1,1084 @@
1
+ import { Record, toString } from '../../../node_modules/@fable-org/fable-library-ts/Types.js';
2
+ import { value } from '../../../node_modules/@fable-org/fable-library-ts/Option.js';
3
+ import { int32ToString, equals, getEnumerator, disposeSafe } from '../../../node_modules/@fable-org/fable-library-ts/Util.js';
4
+ import { record_type, option_type, string_type, int32_type } from '../../../node_modules/@fable-org/fable-library-ts/Reflection.js';
5
+ import { StringBuilder_$ctor, StringBuilder__Append_Z721C83C5 } from '../../../node_modules/@fable-org/fable-library-ts/System.Text.js';
6
+ import { item, fill, setItem } from '../../../node_modules/@fable-org/fable-library-ts/Array.js';
7
+ import { CollectionStyle, ChompingMode, PropertyName, Separation } from './Model.fs.js';
8
+ import { empty, isEmpty, head, exists, FSharpList__get_Tail, FSharpList__get_Head, length, filter, toArray, tryLast, last, ofSeq } from '../../../node_modules/@fable-org/fable-library-ts/List.js';
9
+ import { toList, delay, collect, empty as empty$1, singleton } from '../../../node_modules/@fable-org/fable-library-ts/Seq.js';
10
+ import { getCharAtIndex } from '../../../node_modules/@fable-org/fable-library-ts/String.js';
11
+ import { addToSet } from '../../../node_modules/@fable-org/fable-library-ts/MapUtil.js';
12
+ import { YamlNodeModule_isMissingValue, YamlNodeModule_isPropertyOnly } from './Node.fs.js';
13
+
14
+ class NodePath_PathInfo extends Record {
15
+ constructor(Parent, Segment, Depth) {
16
+ super();
17
+ this.Parent = Parent;
18
+ this.Segment = Segment;
19
+ this.Depth = Depth | 0;
20
+ }
21
+ }
22
+ function NodePath_PathInfo_$reflection() {
23
+ return record_type("YAMLicious.NodePath.PathInfo", [], NodePath_PathInfo, () => [["Parent", option_type(NodePath_PathInfo_$reflection())], ["Segment", string_type], ["Depth", int32_type]]);
24
+ }
25
+ const NodePath_fullPathDepth = 64;
26
+ const NodePath_tailSegments = 8;
27
+ function NodePath_materialize(path, head) {
28
+ const segments = [];
29
+ let current = path;
30
+ let remaining = path.Depth <= NodePath_fullPathDepth ? 2147483647 : NodePath_tailSegments;
31
+ while (remaining > 0 && current != null) {
32
+ const here = value(current);
33
+ void segments.push(here.Segment);
34
+ remaining = remaining - 1 | 0;
35
+ current = here.Parent;
36
+ }
37
+ const sb = StringBuilder_$ctor();
38
+ if (path.Depth > NodePath_fullPathDepth) {
39
+ StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(sb, head), "("), int32ToString(path.Depth)), ")");
40
+ }
41
+ for (let i = segments.length - 1; i >= 0; i--) {
42
+ StringBuilder__Append_Z721C83C5(sb, item(i, segments));
43
+ }
44
+ return toString(sb);
45
+ }
46
+ function NodePath_slotOf(path) {
47
+ return NodePath_materialize(path, "root");
48
+ }
49
+ function NodePath_child(parent, segment) {
50
+ return new NodePath_PathInfo(parent, segment, parent.Depth + 1);
51
+ }
52
+ const NodePath_rootPath = new NodePath_PathInfo(void 0, "root", 0);
53
+ function Validate_isBlockCollection(node) {
54
+ const matchValue = node.Kind;
55
+ switch (matchValue.tag) {
56
+ case /* Mapping */
57
+ 1:
58
+ return equals(matchValue.fields[0].Style, CollectionStyle.Block);
59
+ case /* Sequence */
60
+ 2:
61
+ return equals(matchValue.fields[0].Style, CollectionStyle.Block);
62
+ default:
63
+ return false;
64
+ }
65
+ }
66
+ function Validate_isBareBlockCollection(node) {
67
+ if (Validate_isBlockCollection(node) && node.Properties.Tag == null) {
68
+ return node.Properties.Anchor == null;
69
+ } else {
70
+ return false;
71
+ }
72
+ }
73
+ function Validate_isBlockScalar(scalar) {
74
+ if (scalar.Style.tag === /* Block */
75
+ 3) {
76
+ return true;
77
+ } else {
78
+ return false;
79
+ }
80
+ }
81
+ function Validate_followingOf(separation) {
82
+ let matchResult = void 0, lineBreak = void 0;
83
+ if (separation != null) {
84
+ if (separation.tag === /* NewLine */
85
+ 1) {
86
+ matchResult = 0;
87
+ lineBreak = separation.fields[0];
88
+ } else {
89
+ matchResult = 1;
90
+ }
91
+ } else {
92
+ matchResult = 1;
93
+ }
94
+ switch (matchResult) {
95
+ case 0:
96
+ return lineBreak.Following;
97
+ default:
98
+ return empty();
99
+ }
100
+ }
101
+ function Validate_startsWithBlankLine(lines) {
102
+ let matchResult = void 0;
103
+ if (!isEmpty(lines)) {
104
+ if (head(lines).tag === /* BlankLine */
105
+ 1) {
106
+ matchResult = 0;
107
+ } else {
108
+ matchResult = 1;
109
+ }
110
+ } else {
111
+ matchResult = 1;
112
+ }
113
+ switch (matchResult) {
114
+ case 0:
115
+ return true;
116
+ default:
117
+ return false;
118
+ }
119
+ }
120
+ function Validate_linesBehindRoot(document$, next) {
121
+ if (!isEmpty(document$.AfterRoot)) {
122
+ return document$.AfterRoot;
123
+ } else if (document$.EndMarker != null) {
124
+ return empty();
125
+ } else if (next == null) {
126
+ return empty();
127
+ } else {
128
+ const following = next;
129
+ if (exists((item) => {
130
+ if (item.tag === /* PreludeTrivia */
131
+ 1) {
132
+ return false;
133
+ } else {
134
+ return true;
135
+ }
136
+ }, following.Prelude)) {
137
+ return empty();
138
+ } else {
139
+ return toList(delay(() => collect((item_1) => {
140
+ const matchValue = item_1;
141
+ if (matchValue.tag === /* Directive */
142
+ 0) {
143
+ return empty$1();
144
+ } else {
145
+ return singleton(matchValue.fields[0]);
146
+ }
147
+ }, following.Prelude)));
148
+ }
149
+ }
150
+ }
151
+ function Validate_blankLineFollowsRoot(document$, next) {
152
+ return Validate_startsWithBlankLine(Validate_linesBehindRoot(document$, next));
153
+ }
154
+ function Validate_commentFollowsRoot(document$, next) {
155
+ let rest = Validate_linesBehindRoot(document$, next);
156
+ while (Validate_startsWithBlankLine(rest)) {
157
+ rest = FSharpList__get_Tail(rest);
158
+ }
159
+ let matchResult = void 0;
160
+ if (!isEmpty(rest)) {
161
+ if (head(rest).tag === /* FullLineComment */
162
+ 0) {
163
+ matchResult = 0;
164
+ } else {
165
+ matchResult = 1;
166
+ }
167
+ } else {
168
+ matchResult = 1;
169
+ }
170
+ switch (matchResult) {
171
+ case 0:
172
+ return true;
173
+ default:
174
+ return false;
175
+ }
176
+ }
177
+ function Validate_isNbChar(c) {
178
+ const code = ~~c.charCodeAt(0) | 0;
179
+ if ((((code === 9 ? true : code >= 32 && code <= 126) ? true : code === 133) ? true : code >= 160 && code <= 55295) ? true : code >= 57344 && code <= 65533 && code !== 65279) {
180
+ return true;
181
+ } else {
182
+ return code >= 65536;
183
+ }
184
+ }
185
+ function Validate_isNsChar(c) {
186
+ if (Validate_isNbChar(c) && c !== " ") {
187
+ return c !== " ";
188
+ } else {
189
+ return false;
190
+ }
191
+ }
192
+ function Validate_isFlowIndicatorChar(c) {
193
+ if (((c === "," ? true : c === "[") ? true : c === "]") ? true : c === "{") {
194
+ return true;
195
+ } else {
196
+ return c === "}";
197
+ }
198
+ }
199
+ function Validate_isAnchorChar(c) {
200
+ if (Validate_isNsChar(c)) {
201
+ return !Validate_isFlowIndicatorChar(c);
202
+ } else {
203
+ return false;
204
+ }
205
+ }
206
+ function Validate_allChars(accept, text) {
207
+ let ok = true;
208
+ let i = 0;
209
+ while (ok && i < text.length) {
210
+ const code = ~~getCharAtIndex(text, i).charCodeAt(0) | 0;
211
+ if (code >= 55296 && code <= 56319) {
212
+ if (i + 1 < text.length && ~~getCharAtIndex(text, i + 1).charCodeAt(0) >= 56320 && ~~getCharAtIndex(text, i + 1).charCodeAt(0) <= 57343) {
213
+ i = i + 2 | 0;
214
+ } else {
215
+ ok = false;
216
+ }
217
+ } else if (code >= 56320 && code <= 57343) {
218
+ ok = false;
219
+ } else if (accept(getCharAtIndex(text, i))) {
220
+ i = i + 1 | 0;
221
+ } else {
222
+ ok = false;
223
+ }
224
+ }
225
+ return ok;
226
+ }
227
+ function Validate_isCommentText(text) {
228
+ return Validate_allChars(Validate_isNbChar, text);
229
+ }
230
+ function Validate_isAnchorName(text) {
231
+ if (text.length > 0) {
232
+ return Validate_allChars(Validate_isAnchorChar, text);
233
+ } else {
234
+ return false;
235
+ }
236
+ }
237
+ function Validate_isDirectiveWord(text) {
238
+ if (text.length > 0) {
239
+ return Validate_allChars(Validate_isNsChar, text);
240
+ } else {
241
+ return false;
242
+ }
243
+ }
244
+ function Validate_isBlockChar(c) {
245
+ if (c === "\n") {
246
+ return true;
247
+ } else {
248
+ return Validate_isNbChar(c);
249
+ }
250
+ }
251
+ function Validate_isBlockText(text) {
252
+ return Validate_allChars(Validate_isBlockChar, text);
253
+ }
254
+ function Validate_blockChomping(value, stored, endsText) {
255
+ const n = value.length | 0;
256
+ let bodyEnd = n;
257
+ while (bodyEnd > 0 && getCharAtIndex(value, bodyEnd - 1) === "\n") {
258
+ bodyEnd = bodyEnd - 1 | 0;
259
+ }
260
+ const breaks = n - bodyEnd | 0;
261
+ const onlyBreaks = n > 0 && bodyEnd === 0;
262
+ const derived = breaks === 0 ? ChompingMode.Strip : onlyBreaks ? ChompingMode.Keep : breaks === 1 ? ChompingMode.Clip : ChompingMode.Keep;
263
+ const fits = stored.tag === /* Clip */
264
+ 1 ? (n === 0 ? true : breaks === 1 && !onlyBreaks) ? true : endsText : stored.tag === /* Keep */
265
+ 2 ? (n === 0 ? true : breaks >= 1) ? true : endsText : breaks === 0;
266
+ return [fits ? stored : derived, fits];
267
+ }
268
+ function Validate_storedKeepApplies(style, value) {
269
+ let matchResult = void 0;
270
+ if (style.tag === /* Block */
271
+ 3) {
272
+ if (style.fields[1].tag === /* Keep */
273
+ 2) {
274
+ matchResult = 0;
275
+ } else {
276
+ matchResult = 1;
277
+ }
278
+ } else {
279
+ matchResult = 1;
280
+ }
281
+ switch (matchResult) {
282
+ case 0:
283
+ if (Validate_isBlockText(value)) {
284
+ return Validate_blockChomping(value, ChompingMode.Keep, false)[1];
285
+ } else {
286
+ return false;
287
+ }
288
+ default:
289
+ return false;
290
+ }
291
+ }
292
+ const Validate_keepText = "a blank line directly behind a block scalar with the stored chomping Keep belongs to the value of the scalar when more content follows and the Keep fits the value, so the trivia cannot hold it (l-chomped-empty, [165] to [169])";
293
+ const Validate_followingText = "the trivia belong to the Before of the first entry or item of the block collection behind the line break (R2)";
294
+ const Validate_missingText = "the content behind the indicator is missing, so the trivia belong to the Before of the next entry or item, or to BeforeColon behind a question mark when a colon follows (R2)";
295
+ const Validate_endText = "the trivia behind a block collection belong to its End only when the collection is the last node of its document, and otherwise to the Before of the next entry or item (R4)";
296
+ const Validate_startsLaterText = "a block collection starts on a later line than its last property, so a line break follows that property (R1)";
297
+ const Validate_colonText = "a block collection without a property starts on a later line than the colon of an implicit entry, so a line break follows the colon (R1)";
298
+ const Validate_compactText = "a block collection that continues the line of an indicator has no trivia in front of its first entry or item, because they would stand in front of the indicator (R2, R4)";
299
+ const Validate_commentText = "a comment holds a character that a comment line cannot hold: a line break, a control character, a byte order mark or half of a surrogate pair (nb-char, [27])";
300
+ const Validate_nameText = "a name behind & or * has one or more ns-anchor-char characters ([102]), so it holds no blank, line break, flow indicator, control character or byte order mark";
301
+ const Validate_colonValueText = "an entry with a value has a colon, because the value indicator is omitted only behind a key without a value";
302
+ const Validate_tagText = "a named tag has a suffix of one or more characters, because a shorthand tag is a handle followed by ns-tag-char characters ([99]) and a verbatim tag holds a URI ([98])";
303
+ const Validate_endBlankText = "a blank line goes with the comment that follows it, so the End of a nested block collection ends with a comment unless it holds the last comment behind the last node (R4)";
304
+ const Validate_endAfterText = "the lines behind the last comment of the trivia behind the last node stay in the End that holds that comment, and trivia without a comment stay in the End of the root collection (R4)";
305
+ const Validate_implicitColonText = "the entry of a block mapping without a question mark has a colon, because its key stands on one line with the colon";
306
+ function Validate_checkComment(report, slot, comment) {
307
+ let matchResult = void 0, found_1 = void 0;
308
+ if (comment != null) {
309
+ if (!Validate_isCommentText(comment.Text)) {
310
+ matchResult = 0;
311
+ found_1 = comment;
312
+ } else {
313
+ matchResult = 1;
314
+ }
315
+ } else {
316
+ matchResult = 1;
317
+ }
318
+ switch (matchResult) {
319
+ case 0: {
320
+ report(slot, Validate_commentText);
321
+ break;
322
+ }
323
+ case 1: {
324
+ break;
325
+ }
326
+ }
327
+ }
328
+ function Validate_checkTrivia(report, slot, lines) {
329
+ let rest = lines;
330
+ let index = 0;
331
+ while (!isEmpty(rest)) {
332
+ const matchValue = FSharpList__get_Head(rest);
333
+ if (matchValue.tag === /* BlankLine */
334
+ 1) {
335
+ } else {
336
+ const found = matchValue.fields[0];
337
+ Validate_checkComment(report, slot + "[" + int32ToString(index) + "]", found);
338
+ }
339
+ rest = FSharpList__get_Tail(rest);
340
+ index = index + 1 | 0;
341
+ }
342
+ }
343
+ function Validate_checkSeparation(report, slot, separation) {
344
+ let matchResult = void 0, lineBreak = void 0;
345
+ if (separation != null) {
346
+ if (separation.tag === /* NewLine */
347
+ 1) {
348
+ matchResult = 0;
349
+ lineBreak = separation.fields[0];
350
+ } else {
351
+ matchResult = 1;
352
+ }
353
+ } else {
354
+ matchResult = 1;
355
+ }
356
+ switch (matchResult) {
357
+ case 0: {
358
+ Validate_checkComment(report, slot + ".Comment", lineBreak.Comment);
359
+ Validate_checkTrivia(report, slot + ".Following", lineBreak.Following);
360
+ break;
361
+ }
362
+ case 1: {
363
+ break;
364
+ }
365
+ }
366
+ }
367
+ function Validate_isWordChar(c) {
368
+ if ((c >= "0" && c <= "9" ? true : c >= "a" && c <= "z") ? true : c >= "A" && c <= "Z") {
369
+ return true;
370
+ } else {
371
+ return c === "-";
372
+ }
373
+ }
374
+ function Validate_isHexChar(c) {
375
+ if (c >= "0" && c <= "9" ? true : c >= "a" && c <= "f") {
376
+ return true;
377
+ } else if (c >= "A") {
378
+ return c <= "F";
379
+ } else {
380
+ return false;
381
+ }
382
+ }
383
+ function Validate_isUriPunctuation(c) {
384
+ if (((((((((((((((((((c === "#" ? true : c === ";") ? true : c === "/") ? true : c === "?") ? true : c === ":") ? true : c === "@") ? true : c === "&") ? true : c === "=") ? true : c === "+") ? true : c === "$") ? true : c === "_") ? true : c === ".") ? true : c === "~") ? true : c === "*") ? true : c === "'") ? true : c === "(") ? true : c === ")") ? true : c === "!") ? true : c === ",") ? true : c === "[") {
385
+ return true;
386
+ } else {
387
+ return c === "]";
388
+ }
389
+ }
390
+ function Validate_isTagHandle(handle) {
391
+ if (handle === "!" ? true : handle === "!!") {
392
+ return true;
393
+ } else if (handle.length >= 3 && getCharAtIndex(handle, 0) === "!" && getCharAtIndex(handle, handle.length - 1) === "!") {
394
+ let ok = true;
395
+ for (let i = 1; i <= handle.length - 2; i++) {
396
+ if (!Validate_isWordChar(getCharAtIndex(handle, i))) {
397
+ ok = false;
398
+ }
399
+ }
400
+ return ok;
401
+ } else {
402
+ return false;
403
+ }
404
+ }
405
+ function Validate_isTagPrefix(prefix) {
406
+ let ok = prefix.length > 0 && !((getCharAtIndex(prefix, 0) === "," ? true : getCharAtIndex(prefix, 0) === "[") ? true : getCharAtIndex(prefix, 0) === "]");
407
+ let i = 0;
408
+ while (ok && i < prefix.length) {
409
+ const c = getCharAtIndex(prefix, i);
410
+ if (c === "%") {
411
+ if (i + 2 < prefix.length && Validate_isHexChar(getCharAtIndex(prefix, i + 1)) && Validate_isHexChar(getCharAtIndex(prefix, i + 2))) {
412
+ i = i + 3 | 0;
413
+ } else {
414
+ ok = false;
415
+ }
416
+ } else if (Validate_isWordChar(c) ? true : Validate_isUriPunctuation(c)) {
417
+ i = i + 1 | 0;
418
+ } else {
419
+ ok = false;
420
+ }
421
+ }
422
+ return ok;
423
+ }
424
+ function Validate_checkPrelude(errors, prefix, prelude) {
425
+ const handles = /* @__PURE__ */ new Set([]);
426
+ let versions = 0;
427
+ let index = 0;
428
+ const enumerator = getEnumerator(prelude);
429
+ try {
430
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
431
+ const item = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
432
+ const slot = prefix + "Prelude[" + int32ToString(index) + "]";
433
+ const report = (suffix, text) => {
434
+ void errors.push(slot + suffix + ": " + text);
435
+ };
436
+ if (item.tag === /* Directive */
437
+ 0) {
438
+ const directive = item.fields[0];
439
+ Validate_checkComment(report, ".TrailingComment", directive.TrailingComment);
440
+ const matchValue = directive.Kind;
441
+ switch (matchValue.tag) {
442
+ case /* TagDirective */
443
+ 1: {
444
+ const tagPrefix = matchValue.fields[1];
445
+ const handle = matchValue.fields[0];
446
+ if (!Validate_isTagHandle(handle)) {
447
+ report(".Kind", "a tag handle is !, !! or a word between two !");
448
+ } else if (!addToSet(handle, handles)) {
449
+ report(".Kind", "a tag handle is declared once in a document");
450
+ }
451
+ if (!Validate_isTagPrefix(tagPrefix)) {
452
+ report(".Kind", "a tag prefix holds URI characters and no flow indicator at the start");
453
+ }
454
+ break;
455
+ }
456
+ case /* ReservedDirective */
457
+ 2: {
458
+ const name = matchValue.fields[0];
459
+ const arguments$ = matchValue.fields[1];
460
+ if ((!Validate_isDirectiveWord(name) ? true : name === "YAML") ? true : name === "TAG") {
461
+ report(".Kind", "a reserved directive has a name of ns-char characters that is neither YAML nor TAG");
462
+ }
463
+ const enumerator_1 = getEnumerator(arguments$);
464
+ try {
465
+ while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
466
+ const argument = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
467
+ if (!Validate_isDirectiveWord(argument) ? true : getCharAtIndex(argument, 0) === "#") {
468
+ report(".Kind", "a parameter of a reserved directive has ns-char characters and does not start with a # that would begin a comment");
469
+ }
470
+ }
471
+ } finally {
472
+ disposeSafe(enumerator_1);
473
+ }
474
+ break;
475
+ }
476
+ default: {
477
+ const minor = matchValue.fields[1] | 0;
478
+ const major = matchValue.fields[0] | 0;
479
+ versions = versions + 1 | 0;
480
+ if (versions > 1) {
481
+ report(".Kind", "a document has at most one %YAML directive");
482
+ }
483
+ if ((major !== 1 ? true : minor < 0) ? true : minor > 999999999) {
484
+ report(".Kind", "the %YAML directive names a version 1.x with a minor number of at most nine digits");
485
+ }
486
+ }
487
+ }
488
+ } else if (item.fields[0].tag === /* BlankLine */
489
+ 1) {
490
+ } else {
491
+ const found = item.fields[0].fields[0];
492
+ Validate_checkComment(report, "", found);
493
+ }
494
+ index = index + 1 | 0;
495
+ }
496
+ } finally {
497
+ disposeSafe(enumerator);
498
+ }
499
+ }
500
+ function Validate_checkCompact(report, slot, content) {
501
+ if (Validate_isBareBlockCollection(content)) {
502
+ const matchValue = content.Kind;
503
+ switch (matchValue.tag) {
504
+ case /* Mapping */
505
+ 1: {
506
+ const matchValue_1 = matchValue.fields[0].Items;
507
+ let matchResult = void 0, first_1 = void 0;
508
+ if (!isEmpty(matchValue_1)) {
509
+ if (!isEmpty(head(matchValue_1).Before)) {
510
+ matchResult = 0;
511
+ first_1 = head(matchValue_1);
512
+ } else {
513
+ matchResult = 1;
514
+ }
515
+ } else {
516
+ matchResult = 1;
517
+ }
518
+ switch (matchResult) {
519
+ case 0: {
520
+ report(slot + ".entries[0].Before", Validate_compactText);
521
+ break;
522
+ }
523
+ case 1: {
524
+ break;
525
+ }
526
+ }
527
+ break;
528
+ }
529
+ case /* Sequence */
530
+ 2: {
531
+ const matchValue_2 = matchValue.fields[0].Items;
532
+ let matchResult_1 = void 0, first_3 = void 0;
533
+ if (!isEmpty(matchValue_2)) {
534
+ if (!isEmpty(head(matchValue_2).Before)) {
535
+ matchResult_1 = 0;
536
+ first_3 = head(matchValue_2);
537
+ } else {
538
+ matchResult_1 = 1;
539
+ }
540
+ } else {
541
+ matchResult_1 = 1;
542
+ }
543
+ switch (matchResult_1) {
544
+ case 0: {
545
+ report(slot + ".items[0].Before", Validate_compactText);
546
+ break;
547
+ }
548
+ case 1: {
549
+ break;
550
+ }
551
+ }
552
+ break;
553
+ }
554
+ default:
555
+ }
556
+ }
557
+ }
558
+ function Validate_checkFollowing(report, slot, separation, content) {
559
+ if (!isEmpty(Validate_followingOf(separation))) {
560
+ if (Validate_isBareBlockCollection(content)) {
561
+ report(slot, Validate_followingText);
562
+ } else if (YamlNodeModule_isMissingValue(content)) {
563
+ report(slot, Validate_missingText);
564
+ }
565
+ }
566
+ }
567
+ function Validate_walkNode(errors, prefix, canEnd, blankAfterRoot, root) {
568
+ const stack = [];
569
+ void stack.push([root, NodePath_rootPath, false, canEnd, blankAfterRoot]);
570
+ while (stack.length > 0) {
571
+ let name_3 = void 0;
572
+ const last = stack.length - 1 | 0;
573
+ const patternInput = item(last, stack);
574
+ const path = patternInput[1];
575
+ const node = patternInput[0];
576
+ const isLastNode = patternInput[3];
577
+ const blankFollows = patternInput[4] | 0;
578
+ stack.splice(last, 1);
579
+ const report = (suffix, text) => {
580
+ void errors.push(prefix + NodePath_slotOf(path) + suffix + ": " + text);
581
+ };
582
+ const layoutCount = (name) => length(filter((placement) => equals(placement.Property, name), node.PropertyLayout)) | 0;
583
+ if (layoutCount(PropertyName.Tag) !== (node.Properties.Tag != null ? 1 : 0)) {
584
+ report(".PropertyLayout", "the layout names the tag once when the node has a tag and never otherwise");
585
+ }
586
+ if (layoutCount(PropertyName.Anchor) !== (node.Properties.Anchor != null ? 1 : 0)) {
587
+ report(".PropertyLayout", "the layout names the anchor once when the node has an anchor and never otherwise");
588
+ }
589
+ if ((Validate_isBlockCollection(node) ? true : YamlNodeModule_isPropertyOnly(node)) && !isEmpty(node.PropertyLayout)) {
590
+ const placements = toArray(node.PropertyLayout);
591
+ const lastIndex = placements.length - 1 | 0;
592
+ if (!isEmpty(Validate_followingOf(item(lastIndex, placements).After))) {
593
+ report(".PropertyLayout[" + int32ToString(lastIndex) + "].After.Following", Validate_isBlockCollection(node) ? Validate_followingText : Validate_missingText);
594
+ }
595
+ if (Validate_isBlockCollection(node) && equals(item(lastIndex, placements).After, Separation.Inline)) {
596
+ report(".PropertyLayout[" + int32ToString(lastIndex) + "].After", Validate_startsLaterText);
597
+ }
598
+ }
599
+ Validate_checkComment(report, ".TrailingComment", node.TrailingComment);
600
+ const matchValue = node.Properties.Anchor;
601
+ let matchResult = void 0, name_2 = void 0;
602
+ if (matchValue != null) {
603
+ if (!Validate_isAnchorName(matchValue)) {
604
+ matchResult = 0;
605
+ name_2 = matchValue;
606
+ } else {
607
+ matchResult = 1;
608
+ }
609
+ } else {
610
+ matchResult = 1;
611
+ }
612
+ switch (matchResult) {
613
+ case 0: {
614
+ report(".Properties.Anchor", Validate_nameText);
615
+ break;
616
+ }
617
+ }
618
+ const matchValue_1 = node.Properties.Tag;
619
+ let matchResult_1 = void 0, name_4 = void 0;
620
+ if (matchValue_1 != null) {
621
+ if (matchValue_1.tag === /* Named */
622
+ 1) {
623
+ if (name_3 = matchValue_1.fields[0], name_3.Suffix.length === 0) {
624
+ matchResult_1 = 0;
625
+ name_4 = matchValue_1.fields[0];
626
+ } else {
627
+ matchResult_1 = 1;
628
+ }
629
+ } else {
630
+ matchResult_1 = 1;
631
+ }
632
+ } else {
633
+ matchResult_1 = 1;
634
+ }
635
+ switch (matchResult_1) {
636
+ case 0: {
637
+ report(".Properties.Tag", Validate_tagText);
638
+ break;
639
+ }
640
+ }
641
+ let placementIndex = 0;
642
+ const enumerator = getEnumerator(node.PropertyLayout);
643
+ try {
644
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
645
+ const placement_1 = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
646
+ Validate_checkSeparation(report, ".PropertyLayout[" + int32ToString(placementIndex) + "].After", placement_1.After);
647
+ placementIndex = placementIndex + 1 | 0;
648
+ }
649
+ } finally {
650
+ disposeSafe(enumerator);
651
+ }
652
+ const matchValue_2 = node.Kind;
653
+ switch (matchValue_2.tag) {
654
+ case /* Scalar */
655
+ 0: {
656
+ const scalar = matchValue_2.fields[0];
657
+ Validate_checkComment(report, ".HeaderComment", scalar.HeaderComment);
658
+ if (scalar.HeaderComment != null && !Validate_isBlockScalar(scalar)) {
659
+ report(".HeaderComment", "only a block scalar has a header comment (R8)");
660
+ }
661
+ if (node.TrailingComment != null) {
662
+ if (Validate_isBlockScalar(scalar)) {
663
+ report(".TrailingComment", "a block scalar takes the comment behind its header as HeaderComment (R8)");
664
+ } else if (YamlNodeModule_isMissingValue(node)) {
665
+ report(".TrailingComment", "a missing value has no trailing comment, the comment belongs to the separation behind the indicator (R1)");
666
+ } else if (YamlNodeModule_isPropertyOnly(node) && !patternInput[2]) {
667
+ report(".TrailingComment", "a node with properties and no content has no trailing comment outside a flow collection, the comment belongs to the After of its last property (R1)");
668
+ }
669
+ }
670
+ if (blankFollows === 1 && Validate_storedKeepApplies(scalar.Style, scalar.Value)) {
671
+ report(".Style", Validate_keepText);
672
+ }
673
+ break;
674
+ }
675
+ case /* Mapping */
676
+ 1: {
677
+ const collection = matchValue_2.fields[0];
678
+ Validate_checkComment(report, ".OpeningComment", collection.OpeningComment);
679
+ Validate_checkTrivia(report, ".End", collection.End);
680
+ if (equals(collection.Style, CollectionStyle.Block)) {
681
+ if (node.TrailingComment != null) {
682
+ report(".TrailingComment", "a block mapping has no closing token to hang a trailing comment on (R8)");
683
+ }
684
+ if (collection.OpeningComment != null) {
685
+ report(".OpeningComment", "only a flow collection has an opening comment");
686
+ }
687
+ if (isEmpty(collection.Items)) {
688
+ report("", "an empty collection is a flow collection");
689
+ }
690
+ if (!isEmpty(collection.End) && !isLastNode) {
691
+ report(".End", Validate_endText);
692
+ }
693
+ }
694
+ const entries = toArray(collection.Items);
695
+ for (let i = 0; i <= entries.length - 1; i++) {
696
+ const entry = item(i, entries);
697
+ const at = ".entries[" + int32ToString(i) + "]";
698
+ Validate_checkTrivia(report, at + ".Before", entry.Before);
699
+ Validate_checkSeparation(report, at + ".Question", entry.Question);
700
+ Validate_checkTrivia(report, at + ".BeforeColon", entry.BeforeColon);
701
+ Validate_checkSeparation(report, at + ".Colon", entry.Colon);
702
+ if (entry.Colon == null && !YamlNodeModule_isMissingValue(entry.Value)) {
703
+ report(at + ".Colon", Validate_colonValueText);
704
+ } else if (equals(collection.Style, CollectionStyle.Block) && entry.Question == null && entry.Colon == null) {
705
+ report(at + ".Colon", Validate_implicitColonText);
706
+ }
707
+ Validate_checkFollowing(report, at + ".Question.Following", entry.Question, entry.Key);
708
+ Validate_checkFollowing(report, at + ".Colon.Following", entry.Colon, entry.Value);
709
+ if (equals(collection.Style, CollectionStyle.Block) && entry.Question == null && equals(entry.Colon, Separation.Inline) && Validate_isBareBlockCollection(entry.Value)) {
710
+ report(at + ".Colon", Validate_colonText);
711
+ }
712
+ if (equals(collection.Style, CollectionStyle.Block) && equals(entry.Question, Separation.Inline)) {
713
+ Validate_checkCompact(report, at + ".Key", entry.Key);
714
+ }
715
+ if (equals(collection.Style, CollectionStyle.Block) && entry.Question != null && equals(entry.Colon, Separation.Inline)) {
716
+ Validate_checkCompact(report, at + ".Value", entry.Value);
717
+ }
718
+ if (entry.Colon == null && !isEmpty(entry.BeforeColon)) {
719
+ report(at + ".BeforeColon", "an entry without a colon has no gap before it, the trivia belong to the Before of the next entry or item (R7)");
720
+ } else if (equals(collection.Style, CollectionStyle.Block) && entry.Question == null && !isEmpty(entry.BeforeColon)) {
721
+ report(at + ".BeforeColon", "the key of an entry without a question mark stands on one line with its colon in a block mapping (R7)");
722
+ }
723
+ }
724
+ const childInFlow = equals(collection.Style, CollectionStyle.Flow);
725
+ for (let i_1 = entries.length - 1; i_1 >= 0; i_1--) {
726
+ const at_1 = ".entries[" + int32ToString(i_1) + "]";
727
+ const lastEntry = isLastNode && !childInFlow && i_1 === entries.length - 1;
728
+ const blankBehind = (childInFlow ? 0 : i_1 < entries.length - 1 ? Validate_startsWithBlankLine(item(i_1 + 1, entries).Before) ? 1 : 0 : !isEmpty(collection.End) ? Validate_startsWithBlankLine(collection.End) ? 2 : 0 : blankFollows) | 0;
729
+ const blankBehindKey = (item(i_1, entries).Colon != null ? Validate_startsWithBlankLine(item(i_1, entries).BeforeColon) ? 1 : 0 : blankBehind) | 0;
730
+ void stack.push([item(i_1, entries).Value, NodePath_child(path, at_1 + ".Value"), childInFlow, lastEntry && item(i_1, entries).Colon != null, blankBehind]);
731
+ void stack.push([item(i_1, entries).Key, NodePath_child(path, at_1 + ".Key"), childInFlow, lastEntry && item(i_1, entries).Colon == null, blankBehindKey]);
732
+ }
733
+ break;
734
+ }
735
+ case /* Sequence */
736
+ 2: {
737
+ const collection_1 = matchValue_2.fields[0];
738
+ Validate_checkComment(report, ".OpeningComment", collection_1.OpeningComment);
739
+ Validate_checkTrivia(report, ".End", collection_1.End);
740
+ if (equals(collection_1.Style, CollectionStyle.Block)) {
741
+ if (node.TrailingComment != null) {
742
+ report(".TrailingComment", "a block sequence has no closing token to hang a trailing comment on (R8)");
743
+ }
744
+ if (collection_1.OpeningComment != null) {
745
+ report(".OpeningComment", "only a flow collection has an opening comment");
746
+ }
747
+ if (isEmpty(collection_1.Items)) {
748
+ report("", "an empty collection is a flow collection");
749
+ }
750
+ if (!isEmpty(collection_1.End) && !isLastNode) {
751
+ report(".End", Validate_endText);
752
+ }
753
+ }
754
+ const items = toArray(collection_1.Items);
755
+ for (let i_2 = 0; i_2 <= items.length - 1; i_2++) {
756
+ const item$1 = item(i_2, items);
757
+ const at_2 = ".items[" + int32ToString(i_2) + "]";
758
+ Validate_checkTrivia(report, at_2 + ".Before", item$1.Before);
759
+ Validate_checkSeparation(report, at_2 + ".Dash", item$1.Dash);
760
+ if (equals(collection_1.Style, CollectionStyle.Block) && item$1.Dash == null) {
761
+ report(at_2 + ".Dash", "an item of a block sequence has a dash");
762
+ } else if (equals(collection_1.Style, CollectionStyle.Flow) && item$1.Dash != null) {
763
+ report(at_2 + ".Dash", "an item of a flow sequence has no dash");
764
+ }
765
+ Validate_checkFollowing(report, at_2 + ".Dash.Following", item$1.Dash, item$1.Node);
766
+ if (equals(collection_1.Style, CollectionStyle.Block) && equals(item$1.Dash, Separation.Inline)) {
767
+ Validate_checkCompact(report, at_2 + ".Node", item$1.Node);
768
+ }
769
+ }
770
+ const childInFlow_1 = equals(collection_1.Style, CollectionStyle.Flow);
771
+ for (let i_3 = items.length - 1; i_3 >= 0; i_3--) {
772
+ const lastItem = isLastNode && !childInFlow_1 && i_3 === items.length - 1;
773
+ const blankBehind_1 = (childInFlow_1 ? 0 : i_3 < items.length - 1 ? Validate_startsWithBlankLine(item(i_3 + 1, items).Before) ? 1 : 0 : !isEmpty(collection_1.End) ? Validate_startsWithBlankLine(collection_1.End) ? 2 : 0 : blankFollows) | 0;
774
+ void stack.push([item(i_3, items).Node, NodePath_child(path, ".items[" + int32ToString(i_3) + "].Node"), childInFlow_1, lastItem, blankBehind_1]);
775
+ }
776
+ break;
777
+ }
778
+ default: {
779
+ const name_5 = matchValue_2.fields[0];
780
+ if ((node.Properties.Tag != null ? true : node.Properties.Anchor != null) ? true : !isEmpty(node.PropertyLayout)) {
781
+ report(".Properties", "an alias has no properties");
782
+ }
783
+ if (!Validate_isAnchorName(name_5)) {
784
+ report("", Validate_nameText);
785
+ }
786
+ }
787
+ }
788
+ }
789
+ }
790
+ function Validate_endsWithComment(lines) {
791
+ const matchValue = tryLast(lines);
792
+ let matchResult = void 0;
793
+ if (matchValue != null) {
794
+ if (matchValue.tag === /* FullLineComment */
795
+ 0) {
796
+ matchResult = 0;
797
+ } else {
798
+ matchResult = 1;
799
+ }
800
+ } else {
801
+ matchResult = 1;
802
+ }
803
+ switch (matchResult) {
804
+ case 0:
805
+ return true;
806
+ default:
807
+ return false;
808
+ }
809
+ }
810
+ function Validate_hasComment(lines) {
811
+ return exists((line) => {
812
+ if (line.tag === /* BlankLine */
813
+ 1) {
814
+ return false;
815
+ } else {
816
+ return true;
817
+ }
818
+ }, lines);
819
+ }
820
+ function Validate_checkEnds(errors, prefix, root) {
821
+ const ends = [];
822
+ let current = root;
823
+ let path = NodePath_rootPath;
824
+ let walking = true;
825
+ while (walking) {
826
+ let collection = void 0, collection_1 = void 0;
827
+ const matchValue = current.Kind;
828
+ let matchResult = void 0, collection_2 = void 0, collection_3 = void 0;
829
+ switch (matchValue.tag) {
830
+ case /* Mapping */
831
+ 1: {
832
+ if (collection = matchValue.fields[0], equals(collection.Style, CollectionStyle.Block) && !isEmpty(collection.Items)) {
833
+ matchResult = 0;
834
+ collection_2 = matchValue.fields[0];
835
+ } else {
836
+ matchResult = 2;
837
+ }
838
+ break;
839
+ }
840
+ case /* Sequence */
841
+ 2: {
842
+ if (collection_1 = matchValue.fields[0], equals(collection_1.Style, CollectionStyle.Block) && !isEmpty(collection_1.Items)) {
843
+ matchResult = 1;
844
+ collection_3 = matchValue.fields[0];
845
+ } else {
846
+ matchResult = 2;
847
+ }
848
+ break;
849
+ }
850
+ default:
851
+ matchResult = 2;
852
+ }
853
+ switch (matchResult) {
854
+ case 0: {
855
+ void ends.push([path, collection_2.End]);
856
+ const index = length(collection_2.Items) - 1 | 0;
857
+ const last$1 = last(collection_2.Items);
858
+ if (last$1.Colon != null) {
859
+ current = last$1.Value;
860
+ path = NodePath_child(path, ".entries[" + int32ToString(index) + "].Value");
861
+ } else {
862
+ current = last$1.Key;
863
+ path = NodePath_child(path, ".entries[" + int32ToString(index) + "].Key");
864
+ }
865
+ break;
866
+ }
867
+ case 1: {
868
+ void ends.push([path, collection_3.End]);
869
+ const index_1 = length(collection_3.Items) - 1 | 0;
870
+ current = last(collection_3.Items).Node;
871
+ path = NodePath_child(path, ".items[" + int32ToString(index_1) + "].Node");
872
+ break;
873
+ }
874
+ case 2: {
875
+ walking = false;
876
+ break;
877
+ }
878
+ }
879
+ }
880
+ let lastComment = -1;
881
+ for (let k = ends.length - 1; k >= 0; k--) {
882
+ if (Validate_hasComment(item(k, ends)[1])) {
883
+ lastComment = k | 0;
884
+ }
885
+ }
886
+ for (let k_1 = 0; k_1 <= ends.length - 1; k_1++) {
887
+ const patternInput = item(k_1, ends);
888
+ const lines = patternInput[1];
889
+ if (!isEmpty(lines)) {
890
+ const slot = prefix + NodePath_slotOf(patternInput[0]) + ".End: ";
891
+ if (lastComment < 0) {
892
+ if (k_1 > 0) {
893
+ void errors.push(slot + Validate_endAfterText);
894
+ }
895
+ } else if (k_1 < lastComment) {
896
+ void errors.push(slot + Validate_endAfterText);
897
+ } else if (k_1 > lastComment && !Validate_endsWithComment(lines)) {
898
+ void errors.push(slot + Validate_endBlankText);
899
+ }
900
+ }
901
+ }
902
+ }
903
+ function Validate_walkDocument(errors, prefix, next, document$) {
904
+ const root = document$.Root;
905
+ const followedByDocument = next != null;
906
+ const report = (slot, text) => {
907
+ void errors.push(prefix + slot + ": " + text);
908
+ };
909
+ const markerComment = (marker) => {
910
+ if (marker == null) {
911
+ return void 0;
912
+ } else {
913
+ return marker.TrailingComment;
914
+ }
915
+ };
916
+ Validate_checkPrelude(errors, prefix, document$.Prelude);
917
+ Validate_checkComment(report, "StartMarker.TrailingComment", markerComment(document$.StartMarker));
918
+ Validate_checkComment(report, "EndMarker.TrailingComment", markerComment(document$.EndMarker));
919
+ Validate_checkTrivia(report, "BeforeRoot", document$.BeforeRoot);
920
+ Validate_checkTrivia(report, "AfterRoot", document$.AfterRoot);
921
+ Validate_checkTrivia(report, "AfterEndMarker", document$.AfterEndMarker);
922
+ if (!isEmpty(document$.BeforeRoot) && Validate_isBareBlockCollection(root)) {
923
+ void errors.push(prefix + "BeforeRoot: the trivia belong to the Before of the first entry or item of the root collection (R3)");
924
+ }
925
+ const blankAfterRoot = (Validate_blankLineFollowsRoot(document$, next) ? 2 : 0) | 0;
926
+ const canEnd = !(followedByDocument && document$.EndMarker == null);
927
+ Validate_walkNode(errors, prefix, canEnd, blankAfterRoot, root);
928
+ if (canEnd) {
929
+ Validate_checkEnds(errors, prefix, root);
930
+ }
931
+ if (!isEmpty(document$.AfterRoot)) {
932
+ if (Validate_isBlockCollection(root)) {
933
+ void errors.push(prefix + "AfterRoot: the trivia behind a block collection belong to its End (R3)");
934
+ } else if (YamlNodeModule_isMissingValue(root)) {
935
+ void errors.push(prefix + "AfterRoot: a document whose root is missing keeps all its trivia in BeforeRoot (R3)");
936
+ } else if (followedByDocument && document$.EndMarker == null) {
937
+ void errors.push(prefix + "AfterRoot: the trivia in front of the next document belong to its Prelude when no `...` stands between (R3)");
938
+ }
939
+ }
940
+ if (!isEmpty(document$.AfterEndMarker)) {
941
+ if (document$.EndMarker == null) {
942
+ void errors.push(prefix + "AfterEndMarker: a document without a `...` keeps the trivia behind its root in AfterRoot or in the End of the root collection (R3)");
943
+ } else if (followedByDocument) {
944
+ void errors.push(prefix + "AfterEndMarker: the trivia in front of the next document belong to that document (R3)");
945
+ }
946
+ }
947
+ }
948
+ function Validate_document(document$) {
949
+ const errors = [];
950
+ Validate_walkDocument(errors, "", void 0, document$);
951
+ return ofSeq(errors);
952
+ }
953
+ function Validate_stream(stream) {
954
+ const errors = [];
955
+ const parts = toArray(stream.Parts);
956
+ const hasDocument = parts.some((part) => {
957
+ if (part.tag === /* Document */
958
+ 0) {
959
+ return true;
960
+ } else {
961
+ return false;
962
+ }
963
+ });
964
+ const following = fill(new Array(parts.length), 0, parts.length, void 0);
965
+ let next = void 0;
966
+ for (let i = parts.length - 1; i >= 0; i--) {
967
+ setItem(following, i, next);
968
+ const matchValue = item(i, parts);
969
+ if (matchValue.tag === /* Trivia */
970
+ 1) {
971
+ } else {
972
+ next = matchValue;
973
+ }
974
+ }
975
+ let previous = void 0;
976
+ for (let i_1 = 0; i_1 <= parts.length - 1; i_1++) {
977
+ let part_1 = void 0, document$_2 = void 0, matchValue_2 = void 0, next_1 = void 0;
978
+ const at = "Parts[" + int32ToString(i_1) + "]";
979
+ const matchValue_1 = item(i_1, parts);
980
+ switch (matchValue_1.tag) {
981
+ case /* ExtraEndMarker */
982
+ 2: {
983
+ Validate_checkComment((slot, text) => {
984
+ void errors.push(at + "." + slot + ": " + text);
985
+ }, "TrailingComment", matchValue_1.fields[0].TrailingComment);
986
+ let matchResult = void 0, part_3 = void 0;
987
+ if (previous != null) {
988
+ if (!(part_1 = previous, part_1.tag === /* ExtraEndMarker */
989
+ 2 ? true : part_1.tag === /* Trivia */
990
+ 1 ? false : part_1.fields[0].EndMarker != null)) {
991
+ matchResult = 0;
992
+ part_3 = previous;
993
+ } else {
994
+ matchResult = 1;
995
+ }
996
+ } else {
997
+ matchResult = 1;
998
+ }
999
+ switch (matchResult) {
1000
+ case 0: {
1001
+ void errors.push(at + ": an extra end marker stands at the start of the stream or behind a `...`, and behind a document without an end marker it is the end marker of that document (R3)");
1002
+ break;
1003
+ }
1004
+ }
1005
+ previous = item(i_1, parts);
1006
+ break;
1007
+ }
1008
+ case /* Trivia */
1009
+ 1: {
1010
+ const trivia = matchValue_1.fields[0];
1011
+ if (trivia.tag === /* BlankLine */
1012
+ 1) {
1013
+ } else {
1014
+ Validate_checkComment((slot_1, text_1) => {
1015
+ void errors.push(at + slot_1 + ": " + text_1);
1016
+ }, "", trivia.fields[0]);
1017
+ }
1018
+ let beforeDocument;
1019
+ const matchValue_3 = item(i_1, following);
1020
+ let matchResult_1 = void 0;
1021
+ if (matchValue_3 != null) {
1022
+ if (matchValue_3.tag === /* Document */
1023
+ 0) {
1024
+ matchResult_1 = 0;
1025
+ } else {
1026
+ matchResult_1 = 1;
1027
+ }
1028
+ } else {
1029
+ matchResult_1 = 1;
1030
+ }
1031
+ switch (matchResult_1) {
1032
+ case 0: {
1033
+ beforeDocument = true;
1034
+ break;
1035
+ }
1036
+ default:
1037
+ beforeDocument = false;
1038
+ }
1039
+ const behindExtraEndMarker = previous != null && previous.tag === /* ExtraEndMarker */
1040
+ 2;
1041
+ const behindEndMarker = previous != null && (previous.tag === /* Document */
1042
+ 0 && (document$_2 = previous.fields[0], document$_2.EndMarker != null));
1043
+ let beforeExtraEndMarker;
1044
+ const matchValue_4 = item(i_1, following);
1045
+ let matchResult_2 = void 0;
1046
+ if (matchValue_4 != null) {
1047
+ if (matchValue_4.tag === /* ExtraEndMarker */
1048
+ 2) {
1049
+ matchResult_2 = 0;
1050
+ } else {
1051
+ matchResult_2 = 1;
1052
+ }
1053
+ } else {
1054
+ matchResult_2 = 1;
1055
+ }
1056
+ switch (matchResult_2) {
1057
+ case 0: {
1058
+ beforeExtraEndMarker = previous == null;
1059
+ break;
1060
+ }
1061
+ default:
1062
+ beforeExtraEndMarker = false;
1063
+ }
1064
+ if (beforeDocument) {
1065
+ void errors.push(at + ": trivia in front of a document belong to that document (R3)");
1066
+ } else if (behindEndMarker) {
1067
+ void errors.push(at + ": trivia behind the `...` of a document belong to its AfterEndMarker (R3)");
1068
+ } else if (hasDocument && !behindExtraEndMarker && !beforeExtraEndMarker) {
1069
+ void errors.push(at + ": trivia stand in the stream only behind an extra end marker or at the start of the stream in front of one, and otherwise they belong to a document (R3)");
1070
+ }
1071
+ break;
1072
+ }
1073
+ default: {
1074
+ const document$_1 = matchValue_1.fields[0];
1075
+ Validate_walkDocument(errors, at + ".", (matchValue_2 = item(i_1, following), matchValue_2 != null ? matchValue_2.tag === /* Document */
1076
+ 0 ? (next_1 = matchValue_2.fields[0], next_1) : void 0 : void 0), document$_1);
1077
+ previous = item(i_1, parts);
1078
+ }
1079
+ }
1080
+ }
1081
+ return ofSeq(errors);
1082
+ }
1083
+
1084
+ export { NodePath_PathInfo, NodePath_PathInfo_$reflection, NodePath_child, NodePath_fullPathDepth, NodePath_materialize, NodePath_rootPath, NodePath_slotOf, NodePath_tailSegments, Validate_allChars, Validate_blankLineFollowsRoot, Validate_blockChomping, Validate_commentFollowsRoot, Validate_document, Validate_isAnchorChar, Validate_isAnchorName, Validate_isBlockText, Validate_isCommentText, Validate_isDirectiveWord, Validate_isNbChar, Validate_isNsChar, Validate_linesBehindRoot, Validate_startsWithBlankLine, Validate_storedKeepApplies, Validate_stream };