@nfdi4plants/arctrl 3.0.0-beta.3 → 3.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/README.md +2 -0
  2. package/dist/ts/index.js +63 -0
  3. package/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +354 -0
  4. package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +28 -0
  5. package/dist/ts/node_modules/@fable-org/fable-library-js/AsyncBuilder.js +186 -0
  6. package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +8 -0
  7. package/dist/ts/node_modules/@fable-org/fable-library-js/Boolean.js +24 -0
  8. package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +73 -0
  9. package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +31 -0
  10. package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +574 -0
  11. package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +59 -0
  12. package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +65 -0
  13. package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +30 -0
  14. package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +5 -0
  15. package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +5 -0
  16. package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +48 -0
  17. package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +120 -0
  18. package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +680 -0
  19. package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +40 -0
  20. package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +655 -0
  21. package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +105 -0
  22. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +320 -0
  23. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +204 -0
  24. package/dist/ts/node_modules/@fable-org/fable-library-js/Native.js +10 -0
  25. package/dist/ts/node_modules/@fable-org/fable-library-js/Numeric.js +73 -0
  26. package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +65 -0
  27. package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +23 -0
  28. package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +111 -0
  29. package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +114 -0
  30. package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +36 -0
  31. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +846 -0
  32. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +65 -0
  33. package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +1160 -0
  34. package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +364 -0
  35. package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +40 -0
  36. package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +193 -0
  37. package/dist/ts/node_modules/@fable-org/fable-library-js/Unicode.13.0.0.js +6 -0
  38. package/dist/ts/node_modules/@fable-org/fable-library-js/Uri.js +160 -0
  39. package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +367 -0
  40. package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +825 -0
  41. package/dist/ts/ts/ARC.js +914 -0
  42. package/dist/ts/ts/Contract/ARC.js +52 -0
  43. package/dist/ts/ts/Contract/ArcAssay.js +80 -0
  44. package/dist/ts/ts/Contract/ArcInvestigation.js +57 -0
  45. package/dist/ts/ts/Contract/ArcRun.js +76 -0
  46. package/dist/ts/ts/Contract/ArcStudy.js +76 -0
  47. package/dist/ts/ts/Contract/ArcWorkflow.js +77 -0
  48. package/dist/ts/ts/Contract/Contract.js +45 -0
  49. package/dist/ts/ts/Contract/Datamap.js +221 -0
  50. package/dist/ts/ts/Contract/Git.js +57 -0
  51. package/dist/ts/ts/Contract/ValidationPackagesConfig.js +57 -0
  52. package/dist/ts/ts/ContractIO/ContractIO.js +202 -0
  53. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -1
  54. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
  55. package/dist/ts/ts/ContractIO/FileSystemHelper.js +273 -0
  56. package/dist/ts/ts/Conversion.js +1247 -0
  57. package/dist/ts/ts/Core/ArcTypes.js +3393 -0
  58. package/dist/ts/ts/Core/Comment.js +91 -0
  59. package/dist/ts/ts/Core/CommentList.js +27 -0
  60. package/dist/ts/ts/Core/Conversion.js +923 -0
  61. package/dist/ts/ts/Core/Data.js +179 -0
  62. package/dist/ts/ts/Core/DataContext.js +108 -0
  63. package/dist/ts/ts/Core/DataFile.js +50 -0
  64. package/dist/ts/ts/Core/DataMap.js +53 -0
  65. package/dist/ts/ts/Core/Helper/Collections.js +323 -0
  66. package/dist/ts/ts/Core/Helper/HashCodes.js +35 -0
  67. package/dist/ts/ts/Core/Helper/Identifier.js +96 -0
  68. package/dist/ts/ts/Core/Helper/ORCID.js +34 -0
  69. package/dist/ts/ts/Core/Helper/Regex.js +296 -0
  70. package/dist/ts/ts/Core/Helper/SemVer.js +31 -0
  71. package/dist/ts/ts/Core/Helper/Url.js +32 -0
  72. package/dist/ts/ts/Core/IdentifierSetters.d.ts +3 -1
  73. package/dist/ts/ts/Core/IdentifierSetters.d.ts.map +1 -1
  74. package/dist/ts/ts/Core/IdentifierSetters.js +11 -0
  75. package/dist/ts/ts/Core/OntologyAnnotation.js +207 -0
  76. package/dist/ts/ts/Core/OntologySourceReference.js +84 -0
  77. package/dist/ts/ts/Core/Person.js +183 -0
  78. package/dist/ts/ts/Core/Process/ColumnIndex.js +73 -0
  79. package/dist/ts/ts/Core/Process/Component.js +121 -0
  80. package/dist/ts/ts/Core/Process/Factor.js +104 -0
  81. package/dist/ts/ts/Core/Process/FactorValue.js +68 -0
  82. package/dist/ts/ts/Core/Process/Material.js +49 -0
  83. package/dist/ts/ts/Core/Process/MaterialAttribute.js +30 -0
  84. package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +68 -0
  85. package/dist/ts/ts/Core/Process/MaterialType.js +28 -0
  86. package/dist/ts/ts/Core/Process/Process.js +136 -0
  87. package/dist/ts/ts/Core/Process/ProcessInput.js +207 -0
  88. package/dist/ts/ts/Core/Process/ProcessOutput.js +178 -0
  89. package/dist/ts/ts/Core/Process/ProcessParameterValue.js +135 -0
  90. package/dist/ts/ts/Core/Process/ProcessSequence.js +56 -0
  91. package/dist/ts/ts/Core/Process/Protocol.js +54 -0
  92. package/dist/ts/ts/Core/Process/ProtocolParameter.js +69 -0
  93. package/dist/ts/ts/Core/Process/Sample.js +44 -0
  94. package/dist/ts/ts/Core/Process/Source.js +38 -0
  95. package/dist/ts/ts/Core/Publication.js +108 -0
  96. package/dist/ts/ts/Core/Table/ArcTable.js +889 -0
  97. package/dist/ts/ts/Core/Table/ArcTableAux.js +993 -0
  98. package/dist/ts/ts/Core/Table/ArcTables.js +415 -0
  99. package/dist/ts/ts/Core/Table/CompositeCell.js +334 -0
  100. package/dist/ts/ts/Core/Table/CompositeColumn.js +52 -0
  101. package/dist/ts/ts/Core/Table/CompositeHeader.js +792 -0
  102. package/dist/ts/ts/Core/Template.js +180 -0
  103. package/dist/ts/ts/Core/Templates.js +75 -0
  104. package/dist/ts/ts/Core/URI.js +8 -0
  105. package/dist/ts/ts/Core/Value.js +194 -0
  106. package/dist/ts/ts/CrossAsync.js +20 -0
  107. package/dist/ts/ts/FileSystem/DefaultGitattributes.js +3 -0
  108. package/dist/ts/ts/FileSystem/DefaultGitignore.js +3 -0
  109. package/dist/ts/ts/FileSystem/FileSystem.js +48 -0
  110. package/dist/ts/ts/FileSystem/FileSystemTree.js +339 -0
  111. package/dist/ts/ts/FileSystem/Path.js +36 -0
  112. package/dist/ts/ts/Json/Assay.d.ts +2 -2
  113. package/dist/ts/ts/Json/Assay.js +221 -0
  114. package/dist/ts/ts/Json/Comment.d.ts +1 -1
  115. package/dist/ts/ts/Json/Comment.js +112 -0
  116. package/dist/ts/ts/Json/Data.d.ts +1 -1
  117. package/dist/ts/ts/Json/Data.js +138 -0
  118. package/dist/ts/ts/Json/DataFile.d.ts +1 -1
  119. package/dist/ts/ts/Json/DataFile.js +55 -0
  120. package/dist/ts/ts/Json/DataMap/DataContext.d.ts +1 -1
  121. package/dist/ts/ts/Json/DataMap/DataContext.js +39 -0
  122. package/dist/ts/ts/Json/DataMap/DataMap.d.ts +1 -1
  123. package/dist/ts/ts/Json/DataMap/DataMap.js +27 -0
  124. package/dist/ts/ts/Json/Decode.d.ts +2 -2
  125. package/dist/ts/ts/Json/Decode.js +209 -0
  126. package/dist/ts/ts/Json/Encode.d.ts +1 -1
  127. package/dist/ts/ts/Json/Encode.js +65 -0
  128. package/dist/ts/ts/Json/IDTable.d.ts +1 -1
  129. package/dist/ts/ts/Json/IDTable.js +28 -0
  130. package/dist/ts/ts/Json/Investigation.d.ts +1 -1
  131. package/dist/ts/ts/Json/Investigation.js +229 -0
  132. package/dist/ts/ts/Json/OntologyAnnotation.d.ts +1 -1
  133. package/dist/ts/ts/Json/OntologyAnnotation.js +194 -0
  134. package/dist/ts/ts/Json/OntologySourceReference.d.ts +1 -1
  135. package/dist/ts/ts/Json/OntologySourceReference.js +119 -0
  136. package/dist/ts/ts/Json/Person.d.ts +1 -1
  137. package/dist/ts/ts/Json/Person.js +316 -0
  138. package/dist/ts/ts/Json/Process/AssayMaterials.d.ts +1 -1
  139. package/dist/ts/ts/Json/Process/AssayMaterials.js +21 -0
  140. package/dist/ts/ts/Json/Process/Component.d.ts +6 -4
  141. package/dist/ts/ts/Json/Process/Component.d.ts.map +1 -1
  142. package/dist/ts/ts/Json/Process/Component.js +58 -0
  143. package/dist/ts/ts/Json/Process/Factor.d.ts +1 -1
  144. package/dist/ts/ts/Json/Process/Factor.js +53 -0
  145. package/dist/ts/ts/Json/Process/FactorValue.d.ts +1 -1
  146. package/dist/ts/ts/Json/Process/FactorValue.js +44 -0
  147. package/dist/ts/ts/Json/Process/Material.d.ts +1 -1
  148. package/dist/ts/ts/Json/Process/Material.js +112 -0
  149. package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts +1 -1
  150. package/dist/ts/ts/Json/Process/MaterialAttribute.js +43 -0
  151. package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts +1 -1
  152. package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +44 -0
  153. package/dist/ts/ts/Json/Process/MaterialType.d.ts +1 -1
  154. package/dist/ts/ts/Json/Process/MaterialType.js +45 -0
  155. package/dist/ts/ts/Json/Process/Process.d.ts +1 -1
  156. package/dist/ts/ts/Json/Process/Process.js +103 -0
  157. package/dist/ts/ts/Json/Process/ProcessInput.d.ts +1 -1
  158. package/dist/ts/ts/Json/Process/ProcessInput.js +42 -0
  159. package/dist/ts/ts/Json/Process/ProcessOutput.d.ts +1 -1
  160. package/dist/ts/ts/Json/Process/ProcessOutput.js +35 -0
  161. package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts +1 -1
  162. package/dist/ts/ts/Json/Process/ProcessParameterValue.js +28 -0
  163. package/dist/ts/ts/Json/Process/Protocol.d.ts +1 -1
  164. package/dist/ts/ts/Json/Process/Protocol.js +166 -0
  165. package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts +5 -3
  166. package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts.map +1 -1
  167. package/dist/ts/ts/Json/Process/ProtocolParameter.js +52 -0
  168. package/dist/ts/ts/Json/Process/Sample.d.ts +1 -1
  169. package/dist/ts/ts/Json/Process/Sample.js +165 -0
  170. package/dist/ts/ts/Json/Process/Source.d.ts +1 -1
  171. package/dist/ts/ts/Json/Process/Source.js +133 -0
  172. package/dist/ts/ts/Json/Process/StudyMaterials.d.ts +1 -1
  173. package/dist/ts/ts/Json/Process/StudyMaterials.js +23 -0
  174. package/dist/ts/ts/Json/Process/Value.d.ts +1 -1
  175. package/dist/ts/ts/Json/Process/Value.js +41 -0
  176. package/dist/ts/ts/Json/PropertyValue.d.ts +1 -1
  177. package/dist/ts/ts/Json/PropertyValue.js +280 -0
  178. package/dist/ts/ts/Json/Publication.d.ts +1 -1
  179. package/dist/ts/ts/Json/Publication.js +123 -0
  180. package/dist/ts/ts/Json/ROCrate/LDContext.d.ts +1 -1
  181. package/dist/ts/ts/Json/ROCrate/LDContext.js +115 -0
  182. package/dist/ts/ts/Json/ROCrate/LDGraph.d.ts +1 -1
  183. package/dist/ts/ts/Json/ROCrate/LDGraph.js +83 -0
  184. package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -1
  185. package/dist/ts/ts/Json/ROCrate/LDNode.js +190 -0
  186. package/dist/ts/ts/Json/ROCrate/LDRef.d.ts +1 -1
  187. package/dist/ts/ts/Json/ROCrate/LDRef.js +24 -0
  188. package/dist/ts/ts/Json/ROCrate/LDValue.d.ts +1 -1
  189. package/dist/ts/ts/Json/ROCrate/LDValue.js +63 -0
  190. package/dist/ts/ts/Json/Run.d.ts +11 -0
  191. package/dist/ts/ts/Json/Run.d.ts.map +1 -0
  192. package/dist/ts/ts/Json/Run.js +76 -0
  193. package/dist/ts/ts/Json/StringTable.d.ts +1 -1
  194. package/dist/ts/ts/Json/StringTable.js +66 -0
  195. package/dist/ts/ts/Json/Study.d.ts +1 -1
  196. package/dist/ts/ts/Json/Study.js +326 -0
  197. package/dist/ts/ts/Json/Table/ArcTable.d.ts +1 -1
  198. package/dist/ts/ts/Json/Table/ArcTable.js +210 -0
  199. package/dist/ts/ts/Json/Table/CellTable.d.ts +1 -1
  200. package/dist/ts/ts/Json/Table/CellTable.js +53 -0
  201. package/dist/ts/ts/Json/Table/CompositeCell.d.ts +1 -1
  202. package/dist/ts/ts/Json/Table/CompositeCell.js +106 -0
  203. package/dist/ts/ts/Json/Table/CompositeHeader.d.ts +1 -1
  204. package/dist/ts/ts/Json/Table/CompositeHeader.js +121 -0
  205. package/dist/ts/ts/Json/Table/IOType.d.ts +1 -1
  206. package/dist/ts/ts/Json/Table/IOType.js +15 -0
  207. package/dist/ts/ts/Json/Table/OATable.d.ts +1 -1
  208. package/dist/ts/ts/Json/Table/OATable.js +50 -0
  209. package/dist/ts/ts/Json/Table/Templates.d.ts +1 -1
  210. package/dist/ts/ts/Json/Table/Templates.js +15 -0
  211. package/dist/ts/ts/Json/Workflow.d.ts +11 -0
  212. package/dist/ts/ts/Json/Workflow.d.ts.map +1 -0
  213. package/dist/ts/ts/Json/Workflow.js +93 -0
  214. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.d.ts +1 -1
  215. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +61 -0
  216. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.d.ts +1 -1
  217. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +29 -0
  218. package/dist/ts/ts/Json/context/rocrate/isa_data_context.d.ts +1 -1
  219. package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +41 -0
  220. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.d.ts +1 -1
  221. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +69 -0
  222. package/dist/ts/ts/Json/context/rocrate/isa_material_context.d.ts +1 -1
  223. package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +37 -0
  224. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.d.ts +1 -1
  225. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +37 -0
  226. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.d.ts +1 -1
  227. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +41 -0
  228. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.d.ts +1 -1
  229. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +25 -0
  230. package/dist/ts/ts/Json/context/rocrate/isa_person_context.d.ts +1 -1
  231. package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +86 -0
  232. package/dist/ts/ts/Json/context/rocrate/isa_process_context.d.ts +1 -1
  233. package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +57 -0
  234. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.d.ts +1 -1
  235. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +61 -0
  236. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.d.ts +1 -1
  237. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +45 -0
  238. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.d.ts +1 -1
  239. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +33 -0
  240. package/dist/ts/ts/Json/context/rocrate/isa_source_context.d.ts +1 -1
  241. package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +33 -0
  242. package/dist/ts/ts/Json/context/rocrate/isa_study_context.d.ts +1 -1
  243. package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +77 -0
  244. package/dist/ts/ts/Json/context/rocrate/property_value_context.d.ts +1 -1
  245. package/dist/ts/ts/Json/context/rocrate/property_value_context.js +61 -0
  246. package/dist/ts/ts/Json/context/rocrate/rocrate_context.d.ts +1 -1
  247. package/dist/ts/ts/Json.d.ts +21 -1
  248. package/dist/ts/ts/Json.d.ts.map +1 -1
  249. package/dist/ts/ts/Json.js +211 -0
  250. package/dist/ts/ts/JsonIO/Assay.js +77 -0
  251. package/dist/ts/ts/JsonIO/Investigation.js +77 -0
  252. package/dist/ts/ts/JsonIO/LDObject.js +77 -0
  253. package/dist/ts/ts/JsonIO/OntologyAnnotation.js +56 -0
  254. package/dist/ts/ts/JsonIO/Run.d.ts +10 -0
  255. package/dist/ts/ts/JsonIO/Run.d.ts.map +1 -0
  256. package/dist/ts/ts/JsonIO/Run.js +44 -0
  257. package/dist/ts/ts/JsonIO/Study.js +77 -0
  258. package/dist/ts/ts/JsonIO/Table/Compression.d.ts +1 -1
  259. package/dist/ts/ts/JsonIO/Table/Compression.js +39 -0
  260. package/dist/ts/ts/JsonIO/Table/Templates.d.ts +1 -1
  261. package/dist/ts/ts/JsonIO/Table/Templates.js +25 -0
  262. package/dist/ts/ts/JsonIO/Workflow.d.ts +10 -0
  263. package/dist/ts/ts/JsonIO/Workflow.d.ts.map +1 -0
  264. package/dist/ts/ts/JsonIO/Workflow.js +44 -0
  265. package/dist/ts/ts/ROCrate/Generic/Comment.js +103 -0
  266. package/dist/ts/ts/ROCrate/Generic/Dataset.js +624 -0
  267. package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +103 -0
  268. package/dist/ts/ts/ROCrate/Generic/File.js +184 -0
  269. package/dist/ts/ts/ROCrate/Generic/LabProcess.js +222 -0
  270. package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +257 -0
  271. package/dist/ts/ts/ROCrate/Generic/Organization.js +63 -0
  272. package/dist/ts/ts/ROCrate/Generic/Person.js +377 -0
  273. package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +143 -0
  274. package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +512 -0
  275. package/dist/ts/ts/ROCrate/Generic/Sample.js +131 -0
  276. package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +173 -0
  277. package/dist/ts/ts/ROCrate/Helper.js +7 -0
  278. package/dist/ts/ts/ROCrate/LDContext.js +288 -0
  279. package/dist/ts/ts/ROCrate/LDObject.js +855 -0
  280. package/dist/ts/ts/ROCrate/ROCrateContext.js +39 -0
  281. package/dist/ts/ts/ROCrateIO.d.ts +1 -1
  282. package/dist/ts/ts/ROCrateIO.js +58 -0
  283. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +2 -2
  284. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
  285. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +149 -0
  286. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +63 -0
  287. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +2 -2
  288. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
  289. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +108 -0
  290. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +410 -0
  291. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts +2 -2
  292. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
  293. package/dist/ts/ts/Spreadsheet/ArcAssay.js +169 -0
  294. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts +2 -2
  295. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
  296. package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +316 -0
  297. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts +2 -2
  298. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
  299. package/dist/ts/ts/Spreadsheet/ArcRun.js +136 -0
  300. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts +2 -2
  301. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
  302. package/dist/ts/ts/Spreadsheet/ArcStudy.js +92 -0
  303. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts +2 -2
  304. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
  305. package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +125 -0
  306. package/dist/ts/ts/Spreadsheet/CollectionAux.js +34 -0
  307. package/dist/ts/ts/Spreadsheet/DataMap.d.ts +1 -1
  308. package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +1 -1
  309. package/dist/ts/ts/Spreadsheet/DataMap.js +33 -0
  310. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts +2 -2
  311. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts.map +1 -1
  312. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +41 -0
  313. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts +1 -1
  314. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts.map +1 -1
  315. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +418 -0
  316. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts +3 -3
  317. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +1 -1
  318. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +85 -0
  319. package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +90 -0
  320. package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +58 -0
  321. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +85 -0
  322. package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +133 -0
  323. package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +15 -0
  324. package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +74 -0
  325. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +58 -0
  326. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +62 -0
  327. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +94 -0
  328. package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +81 -0
  329. package/dist/ts/ts/Spreadsheet/Metadata/Run.js +91 -0
  330. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts +3 -3
  331. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
  332. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +193 -0
  333. package/dist/ts/ts/Spreadsheet/Metadata/Study.js +238 -0
  334. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +105 -0
  335. package/dist/ts/ts/Template.Web.js +22 -0
  336. package/dist/ts/ts/ValidationPackages/ValidationPackage.js +53 -0
  337. package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +78 -0
  338. package/dist/ts/ts/WebRequest/WebRequest.Node.js +13 -0
  339. package/dist/ts/ts/WebRequest/WebRequest.js +19 -0
  340. package/dist/ts/ts/Xlsx.d.ts +22 -2
  341. package/dist/ts/ts/Xlsx.d.ts.map +1 -1
  342. package/dist/ts/ts/Xlsx.js +131 -0
  343. package/dist/ts/ts/Yaml/Encode.js +8 -0
  344. package/dist/ts/ts/Yaml/ValidationPackage.js +26 -0
  345. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +40 -0
  346. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +344 -0
  347. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +103 -0
  348. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +19 -0
  349. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +17 -0
  350. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +7 -0
  351. package/dist/ts/ts/fable_modules/Fable.Exceljs.1.6.0/ExcelJs.fs.js +5 -0
  352. package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +18 -0
  353. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +44 -0
  354. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +5 -0
  355. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +142 -0
  356. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +76 -0
  357. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +359 -0
  358. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +344 -0
  359. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +154 -0
  360. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +116 -0
  361. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +126 -0
  362. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +135 -0
  363. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +422 -0
  364. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +5 -0
  365. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +25 -0
  366. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +28 -0
  367. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -0
  368. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +69 -0
  369. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +42 -0
  370. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +29 -0
  371. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +348 -0
  372. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +86 -0
  373. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +68 -0
  374. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +12 -0
  375. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +54 -0
  376. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +33 -0
  377. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +63 -0
  378. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +66 -0
  379. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +544 -0
  380. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +31 -0
  381. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +38 -0
  382. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +79 -0
  383. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Encode.fs.js +57 -0
  384. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +235 -0
  385. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +16 -0
  386. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +45 -0
  387. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +89 -0
  388. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +480 -0
  389. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +11 -0
  390. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +212 -0
  391. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +164 -0
  392. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +136 -0
  393. package/package.json +10 -7
  394. package/dist/ts/__vite-browser-external-2447137e.js +0 -4
  395. package/dist/ts/__vite-browser-external-b3701507.cjs +0 -1
  396. package/dist/ts/arctrl.cjs.js +0 -5691
  397. package/dist/ts/arctrl.es.js +0 -35562
  398. package/dist/ts/arctrl.umd.js +0 -5691
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
  # ARCtrl
5
5
 
6
+ [![DOI](https://img.shields.io/badge/Cite%20Us-10.5281%2Fzenodo.15194394-008273?logo=zenodo&logoColor=C70039)](https://doi.org/10.5281/zenodo.15194394)
7
+
6
8
  > **ARCtrl** the easy way to read, manipulate and write ARCs in __.NET__, __JavaScript__ and __Python__! ❤️
7
9
 
8
10
  | Version | Downloads |
@@ -0,0 +1,63 @@
1
+ export { ARC } from './ts/ARC.js';
2
+ export { ArcAssay, ArcInvestigation, ArcRun, ArcStudy, ArcWorkflow } from './ts/Core/ArcTypes.js';
3
+ export { CompositeCell } from './ts/Core/Table/CompositeCell.js';
4
+ export { CompositeHeader, IOType } from './ts/Core/Table/CompositeHeader.js';
5
+ export { CompositeColumn } from './ts/Core/Table/CompositeColumn.js';
6
+ export { ArcTable } from './ts/Core/Table/ArcTable.js';
7
+ export { Organisation, Template } from './ts/Core/Template.js';
8
+ export { Templates } from './ts/Core/Templates.js';
9
+ export { JsonController } from './ts/Json.js';
10
+ export { XlsxController } from './ts/Xlsx.js';
11
+ export { Person } from './ts/Core/Person.js';
12
+ export { Publication } from './ts/Core/Publication.js';
13
+ export { OntologyAnnotation } from './ts/Core/OntologyAnnotation.js';
14
+ export { Comment$ as Comment } from './ts/Core/Comment.js';
15
+ export { Contract } from './ts/Contract/Contract.js';
16
+ export { WebController } from './ts/Template.Web.js';
17
+ export { FileSystem } from './ts/FileSystem/FileSystem.js';
18
+ export { FileSystemTree } from './ts/FileSystem/FileSystemTree.js';
19
+ import { LDRef, LDValue, LDGraph, LDNode } from './ts/ROCrate/LDObject.js';
20
+ import { LDContext } from './ts/ROCrate/LDContext.js';
21
+ import { initBioschemasContext, initV1_2DRAFT, initV1_1 } from './ts/ROCrate/ROCrateContext.js';
22
+ import { LDComment } from './ts/ROCrate/Generic/Comment.js';
23
+ import { LDDefinedTerm } from './ts/ROCrate/Generic/DefinedTerm.js';
24
+ import { LDFile } from './ts/ROCrate/Generic/File.js';
25
+ import { LDLabProcess } from './ts/ROCrate/Generic/LabProcess.js';
26
+ import { LDLabProtocol } from './ts/ROCrate/Generic/LabProtocol.js';
27
+ import { LDOrganization } from './ts/ROCrate/Generic/Organization.js';
28
+ import { LDPerson } from './ts/ROCrate/Generic/Person.js';
29
+ import { LDPostalAddress } from './ts/ROCrate/Generic/PostalAddress.js';
30
+ import { LDPropertyValue } from './ts/ROCrate/Generic/PropertyValue.js';
31
+ import { LDSample } from './ts/ROCrate/Generic/Sample.js';
32
+ import { LDScholarlyArticle } from './ts/ROCrate/Generic/ScholarlyArticle.js';
33
+ import { LDDataset } from './ts/ROCrate/Generic/Dataset.js';
34
+ import { LDNodeExtensions_PyJsInterop, LDGraphExtensions_PyJsInterop } from './ts/JsonIO/LDObject.js';
35
+ import { TypeExtensions_Conversion } from './ts/Conversion.js';
36
+
37
+ const ROCrate = {
38
+ LDNode,
39
+ LDGraph,
40
+ LDValue,
41
+ LDRef,
42
+ LDContext,
43
+ initV1_1,
44
+ initV1_2DRAFT,
45
+ initBioschemasContext,
46
+ LDComment,
47
+ LDDefinedTerm,
48
+ LDFile,
49
+ LDLabProcess,
50
+ LDLabProtocol,
51
+ LDOrganization,
52
+ LDPerson,
53
+ LDPostalAddress,
54
+ LDPropertyValue,
55
+ LDSample,
56
+ LDScholarlyArticle,
57
+ LDDataset,
58
+ LDGraphIO: LDGraphExtensions_PyJsInterop,
59
+ LDNodeIO: LDNodeExtensions_PyJsInterop,
60
+ Conversion: TypeExtensions_Conversion
61
+ };
62
+
63
+ export { ROCrate };
@@ -0,0 +1,354 @@
1
+ import { Helpers_allocateArrayFromCons } from './Native.js';
2
+ import { value, some, defaultArg, map as map$1 } from './Option.js';
3
+ import { equals, defaultOf, getEnumerator, disposeSafe } from './Util.js';
4
+
5
+ function differentLengths() {
6
+ throw new Error("Arrays had different lengths");
7
+ }
8
+ function append(array1, array2, cons) {
9
+ const len1 = array1.length | 0;
10
+ const len2 = array2.length | 0;
11
+ const newArray = Helpers_allocateArrayFromCons(cons, len1 + len2);
12
+ for (let i = 0; i <= (len1 - 1); i++) {
13
+ setItem(newArray, i, item(i, array1));
14
+ }
15
+ for (let i_1 = 0; i_1 <= (len2 - 1); i_1++) {
16
+ setItem(newArray, i_1 + len1, item(i_1, array2));
17
+ }
18
+ return newArray;
19
+ }
20
+ function fill(target, targetIndex, count, value) {
21
+ const start = targetIndex | 0;
22
+ return target.fill(value, start, (start + count));
23
+ }
24
+ function mapIndexed(f, source, cons) {
25
+ const len = source.length | 0;
26
+ const target = Helpers_allocateArrayFromCons(cons, len);
27
+ for (let i = 0; i <= (len - 1); i++) {
28
+ setItem(target, i, f(i, item(i, source)));
29
+ }
30
+ return target;
31
+ }
32
+ function map(f, source, cons) {
33
+ const len = source.length | 0;
34
+ const target = Helpers_allocateArrayFromCons(cons, len);
35
+ for (let i = 0; i <= (len - 1); i++) {
36
+ setItem(target, i, f(item(i, source)));
37
+ }
38
+ return target;
39
+ }
40
+ function map3(f, source1, source2, source3, cons) {
41
+ if ((source1.length !== source2.length) ? true : (source2.length !== source3.length)) {
42
+ throw new Error("Arrays had different lengths");
43
+ }
44
+ const result = Helpers_allocateArrayFromCons(cons, source1.length);
45
+ for (let i = 0; i <= (source1.length - 1); i++) {
46
+ setItem(result, i, f(item(i, source1), item(i, source2), item(i, source3)));
47
+ }
48
+ return result;
49
+ }
50
+ function concat(arrays, cons) {
51
+ const arrays_1 = Array.isArray(arrays) ? arrays : (Array.from(arrays));
52
+ const matchValue = arrays_1.length | 0;
53
+ switch (matchValue) {
54
+ case 0:
55
+ return Helpers_allocateArrayFromCons(cons, 0);
56
+ case 1:
57
+ return item(0, arrays_1);
58
+ default: {
59
+ let totalIdx = 0;
60
+ let totalLength = 0;
61
+ for (let idx = 0; idx <= (arrays_1.length - 1); idx++) {
62
+ const arr_1 = item(idx, arrays_1);
63
+ totalLength = ((totalLength + arr_1.length) | 0);
64
+ }
65
+ const result = Helpers_allocateArrayFromCons(cons, totalLength);
66
+ for (let idx_1 = 0; idx_1 <= (arrays_1.length - 1); idx_1++) {
67
+ const arr_2 = item(idx_1, arrays_1);
68
+ for (let j = 0; j <= (arr_2.length - 1); j++) {
69
+ setItem(result, totalIdx, item(j, arr_2));
70
+ totalIdx = ((totalIdx + 1) | 0);
71
+ }
72
+ }
73
+ return result;
74
+ }
75
+ }
76
+ }
77
+ function collect(mapping, array, cons) {
78
+ return concat(map(mapping, array, defaultOf()), cons);
79
+ }
80
+ function indexOf(array, item_1, start, count, eq) {
81
+ const start_1 = defaultArg(start, 0) | 0;
82
+ const end$0027 = defaultArg(map$1((c) => (start_1 + c), count), array.length) | 0;
83
+ const loop = (i_mut) => {
84
+ loop: while (true) {
85
+ const i = i_mut;
86
+ if (i >= end$0027) {
87
+ return -1;
88
+ }
89
+ else if (eq.Equals(item_1, item(i, array))) {
90
+ return i | 0;
91
+ }
92
+ else {
93
+ i_mut = (i + 1);
94
+ continue loop;
95
+ }
96
+ }
97
+ };
98
+ return loop(start_1) | 0;
99
+ }
100
+ function contains(value, array, eq) {
101
+ return indexOf(array, value, undefined, undefined, eq) >= 0;
102
+ }
103
+ function singleton(value, cons) {
104
+ const ar = Helpers_allocateArrayFromCons(cons, 1);
105
+ setItem(ar, 0, value);
106
+ return ar;
107
+ }
108
+ function initialize(count, initializer, cons) {
109
+ if (count < 0) {
110
+ throw new Error("The input must be non-negative\\nParameter name: count");
111
+ }
112
+ const result = Helpers_allocateArrayFromCons(cons, count);
113
+ for (let i = 0; i <= (count - 1); i++) {
114
+ setItem(result, i, initializer(i));
115
+ }
116
+ return result;
117
+ }
118
+ function skip(count, array, cons) {
119
+ if (count > array.length) {
120
+ throw new Error("count is greater than array length\\nParameter name: count");
121
+ }
122
+ if (count === array.length) {
123
+ return Helpers_allocateArrayFromCons(cons, 0);
124
+ }
125
+ else {
126
+ const count_1 = (count) | 0;
127
+ return array.slice(count_1);
128
+ }
129
+ }
130
+ function addInPlace(x, array) {
131
+ array.push(x);
132
+ }
133
+ function addRangeInPlace(range, array) {
134
+ const enumerator = getEnumerator(range);
135
+ try {
136
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
137
+ addInPlace(enumerator["System.Collections.Generic.IEnumerator`1.get_Current"](), array);
138
+ }
139
+ }
140
+ finally {
141
+ disposeSafe(enumerator);
142
+ }
143
+ }
144
+ function insertRangeInPlace(index, range, array) {
145
+ let index_1;
146
+ let i = index;
147
+ const enumerator = getEnumerator(range);
148
+ try {
149
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
150
+ const x = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
151
+ (index_1 = (i | 0), array.splice(index_1, 0, x));
152
+ i = ((i + 1) | 0);
153
+ }
154
+ }
155
+ finally {
156
+ disposeSafe(enumerator);
157
+ }
158
+ }
159
+ function removeInPlace(item_1, array, eq) {
160
+ const i = indexOf(array, item_1, undefined, undefined, eq) | 0;
161
+ if (i > -1) {
162
+ array.splice(i, 1);
163
+ return true;
164
+ }
165
+ else {
166
+ return false;
167
+ }
168
+ }
169
+ function tryFind(predicate, array) {
170
+ return array.find(predicate);
171
+ }
172
+ function tryFindIndex(predicate, array) {
173
+ const matchValue = (array.findIndex(predicate)) | 0;
174
+ if (matchValue > -1) {
175
+ return matchValue;
176
+ }
177
+ else {
178
+ return undefined;
179
+ }
180
+ }
181
+ function tryPick(chooser, array) {
182
+ const loop = (i_mut) => {
183
+ loop: while (true) {
184
+ const i = i_mut;
185
+ if (i >= array.length) {
186
+ return undefined;
187
+ }
188
+ else {
189
+ const matchValue = chooser(item(i, array));
190
+ if (matchValue == null) {
191
+ i_mut = (i + 1);
192
+ continue loop;
193
+ }
194
+ else {
195
+ return matchValue;
196
+ }
197
+ }
198
+ }
199
+ };
200
+ return loop(0);
201
+ }
202
+ function choose(chooser, array, cons) {
203
+ const res = [];
204
+ for (let i = 0; i <= (array.length - 1); i++) {
205
+ const matchValue = chooser(item(i, array));
206
+ if (matchValue != null) {
207
+ const y = value(matchValue);
208
+ res.push(y);
209
+ }
210
+ }
211
+ if (equals(cons, defaultOf())) {
212
+ return res;
213
+ }
214
+ else {
215
+ return map((x) => x, res, cons);
216
+ }
217
+ }
218
+ function fold(folder, state, array) {
219
+ const folder_1 = folder;
220
+ return array.reduce((folder_1), state);
221
+ }
222
+ function iterateIndexed(action, array) {
223
+ for (let i = 0; i <= (array.length - 1); i++) {
224
+ action(i, item(i, array));
225
+ }
226
+ }
227
+ function forAll(predicate, array) {
228
+ return array.every(predicate);
229
+ }
230
+ function sortBy(projection, xs, comparer) {
231
+ const xs_1 = xs.slice();
232
+ xs_1.sort((x, y) => comparer.Compare(projection(x), projection(y)));
233
+ return xs_1;
234
+ }
235
+ function sortDescending(xs, comparer) {
236
+ const xs_1 = xs.slice();
237
+ xs_1.sort((x, y) => (comparer.Compare(x, y) * -1));
238
+ return xs_1;
239
+ }
240
+ function unzip(array) {
241
+ const len = array.length | 0;
242
+ const res1 = new Array(len);
243
+ const res2 = new Array(len);
244
+ iterateIndexed((i, tupledArg) => {
245
+ setItem(res1, i, tupledArg[0]);
246
+ setItem(res2, i, tupledArg[1]);
247
+ }, array);
248
+ return [res1, res2];
249
+ }
250
+ function equalsWith(equals, array1, array2) {
251
+ if (array1 == null) {
252
+ if (array2 == null) {
253
+ return true;
254
+ }
255
+ else {
256
+ return false;
257
+ }
258
+ }
259
+ else if (array2 == null) {
260
+ return false;
261
+ }
262
+ else {
263
+ let i = 0;
264
+ let result = true;
265
+ const length1 = array1.length | 0;
266
+ const length2 = array2.length | 0;
267
+ if (length1 > length2) {
268
+ return false;
269
+ }
270
+ else if (length1 < length2) {
271
+ return false;
272
+ }
273
+ else {
274
+ while ((i < length1) && result) {
275
+ result = equals(item(i, array1), item(i, array2));
276
+ i = ((i + 1) | 0);
277
+ }
278
+ return result;
279
+ }
280
+ }
281
+ }
282
+ function head(array) {
283
+ if (array.length === 0) {
284
+ throw new Error("The input array was empty\\nParameter name: array");
285
+ }
286
+ else {
287
+ return item(0, array);
288
+ }
289
+ }
290
+ function tryHead(array) {
291
+ if (array.length === 0) {
292
+ return undefined;
293
+ }
294
+ else {
295
+ return some(item(0, array));
296
+ }
297
+ }
298
+ function tail(array) {
299
+ if (array.length === 0) {
300
+ throw new Error("Not enough elements\\nParameter name: array");
301
+ }
302
+ return array.slice(1);
303
+ }
304
+ function item(index, array) {
305
+ if ((index < 0) ? true : (index >= array.length)) {
306
+ throw new Error("Index was outside the bounds of the array.\\nParameter name: index");
307
+ }
308
+ else {
309
+ return array[index];
310
+ }
311
+ }
312
+ function setItem(array, index, value) {
313
+ if ((index < 0) ? true : (index >= array.length)) {
314
+ throw new Error("Index was outside the bounds of the array.\\nParameter name: index");
315
+ }
316
+ else {
317
+ array[index] = value;
318
+ }
319
+ }
320
+ function tryItem(index, array) {
321
+ if ((index < 0) ? true : (index >= array.length)) {
322
+ return undefined;
323
+ }
324
+ else {
325
+ return some(array[index]);
326
+ }
327
+ }
328
+ function foldBack(folder, array, state) {
329
+ return array.reduceRight(((delegateArg, delegateArg_1) => folder(delegateArg_1, delegateArg)), state);
330
+ }
331
+ function transpose(arrays, cons) {
332
+ const arrays_1 = Array.isArray(arrays) ? arrays : (Array.from(arrays));
333
+ const len = arrays_1.length | 0;
334
+ if (len === 0) {
335
+ return new Array(0);
336
+ }
337
+ else {
338
+ const firstArray = item(0, arrays_1);
339
+ const lenInner = firstArray.length | 0;
340
+ if (!forAll((a) => (a.length === lenInner), arrays_1)) {
341
+ differentLengths();
342
+ }
343
+ const result = new Array(lenInner);
344
+ for (let i = 0; i <= (lenInner - 1); i++) {
345
+ setItem(result, i, Helpers_allocateArrayFromCons(cons, len));
346
+ for (let j = 0; j <= (len - 1); j++) {
347
+ item(i, result)[j] = item(i, item(j, arrays_1));
348
+ }
349
+ }
350
+ return result;
351
+ }
352
+ }
353
+
354
+ export { addInPlace, addRangeInPlace, append, choose, collect, concat, contains, equalsWith, fill, fold, foldBack, forAll, head, indexOf, initialize, insertRangeInPlace, item, iterateIndexed, map, map3, mapIndexed, removeInPlace, setItem, singleton, skip, sortBy, sortDescending, tail, transpose, tryFind, tryFindIndex, tryHead, tryItem, tryPick, unzip };
@@ -0,0 +1,28 @@
1
+ import { Trampoline, CancellationToken, protectedCont, OperationCanceledError } from './AsyncBuilder.js';
2
+
3
+ function emptyContinuation(_x) {
4
+ // NOP
5
+ }
6
+ function awaitPromise(p) {
7
+ return fromContinuations((conts) => p.then(conts[0]).catch((err) => (err instanceof OperationCanceledError
8
+ ? conts[2] : conts[1])(err)));
9
+ }
10
+ const defaultCancellationToken = new CancellationToken();
11
+ function fromContinuations(f) {
12
+ return protectedCont((ctx) => f([ctx.onSuccess, ctx.onError, ctx.onCancel]));
13
+ }
14
+ function startWithContinuations(computation, continuation, exceptionContinuation, cancellationContinuation, cancelToken) {
15
+ const trampoline = new Trampoline();
16
+ computation({
17
+ onSuccess: continuation ? continuation : emptyContinuation,
18
+ onError: exceptionContinuation,
19
+ onCancel: cancellationContinuation,
20
+ cancelToken: cancelToken ? cancelToken : defaultCancellationToken,
21
+ trampoline,
22
+ });
23
+ }
24
+ function startAsPromise(computation, cancellationToken) {
25
+ return new Promise((resolve, reject) => startWithContinuations(computation, resolve, reject, reject, defaultCancellationToken));
26
+ }
27
+
28
+ export { awaitPromise, defaultCancellationToken, fromContinuations, startAsPromise, startWithContinuations };
@@ -0,0 +1,186 @@
1
+ import { ensureErrorOrException } from './Types.js';
2
+
3
+ class CancellationToken {
4
+ constructor(cancelled = false) {
5
+ this._id = 0;
6
+ this._cancelled = cancelled;
7
+ this._listeners = new Map();
8
+ }
9
+ get isCancelled() {
10
+ return this._cancelled;
11
+ }
12
+ cancel() {
13
+ if (!this._cancelled) {
14
+ this._cancelled = true;
15
+ for (const [, listener] of this._listeners) {
16
+ listener();
17
+ }
18
+ }
19
+ }
20
+ addListener(f) {
21
+ const id = this._id;
22
+ this._listeners.set(this._id++, f);
23
+ return id;
24
+ }
25
+ removeListener(id) {
26
+ return this._listeners.delete(id);
27
+ }
28
+ register(f, state) {
29
+ const $ = this;
30
+ const id = this.addListener(state == null ? f : () => f(state));
31
+ return { Dispose() { $.removeListener(id); } };
32
+ }
33
+ Dispose() {
34
+ // Implement IDisposable for compatibility but do nothing
35
+ // According to docs, calling Dispose does not trigger cancellation
36
+ // https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtokensource.dispose?view=net-6.0
37
+ }
38
+ }
39
+ class OperationCanceledError extends Error {
40
+ constructor() {
41
+ super("The operation was canceled");
42
+ Object.setPrototypeOf(this, OperationCanceledError.prototype);
43
+ }
44
+ }
45
+ class Trampoline {
46
+ static get maxTrampolineCallCount() {
47
+ return 2000;
48
+ }
49
+ constructor() {
50
+ this.callCount = 0;
51
+ }
52
+ incrementAndCheck() {
53
+ return this.callCount++ > Trampoline.maxTrampolineCallCount;
54
+ }
55
+ hijack(f) {
56
+ this.callCount = 0;
57
+ setTimeout(f, 0);
58
+ }
59
+ }
60
+ function protectedCont(f) {
61
+ return (ctx) => {
62
+ if (ctx.cancelToken.isCancelled) {
63
+ ctx.onCancel(new OperationCanceledError());
64
+ }
65
+ else if (ctx.trampoline.incrementAndCheck()) {
66
+ ctx.trampoline.hijack(() => {
67
+ try {
68
+ f(ctx);
69
+ }
70
+ catch (err) {
71
+ ctx.onError(ensureErrorOrException(err));
72
+ }
73
+ });
74
+ }
75
+ else {
76
+ try {
77
+ f(ctx);
78
+ }
79
+ catch (err) {
80
+ ctx.onError(ensureErrorOrException(err));
81
+ }
82
+ }
83
+ };
84
+ }
85
+ function protectedBind(computation, binder) {
86
+ return protectedCont((ctx) => {
87
+ computation({
88
+ onSuccess: (x) => {
89
+ try {
90
+ binder(x)(ctx);
91
+ }
92
+ catch (err) {
93
+ ctx.onError(ensureErrorOrException(err));
94
+ }
95
+ },
96
+ onError: ctx.onError,
97
+ onCancel: ctx.onCancel,
98
+ cancelToken: ctx.cancelToken,
99
+ trampoline: ctx.trampoline,
100
+ });
101
+ });
102
+ }
103
+ function protectedReturn(value) {
104
+ return protectedCont((ctx) => ctx.onSuccess(value));
105
+ }
106
+ class AsyncBuilder {
107
+ Bind(computation, binder) {
108
+ return protectedBind(computation, binder);
109
+ }
110
+ Combine(computation1, computation2) {
111
+ return this.Bind(computation1, () => computation2);
112
+ }
113
+ Delay(generator) {
114
+ return protectedCont((ctx) => generator()(ctx));
115
+ }
116
+ For(sequence, body) {
117
+ const iter = sequence[Symbol.iterator]();
118
+ let cur = iter.next();
119
+ return this.While(() => !cur.done, this.Delay(() => {
120
+ const res = body(cur.value);
121
+ cur = iter.next();
122
+ return res;
123
+ }));
124
+ }
125
+ Return(value) {
126
+ return protectedReturn(value);
127
+ }
128
+ ReturnFrom(computation) {
129
+ return computation;
130
+ }
131
+ TryFinally(computation, compensation) {
132
+ return protectedCont((ctx) => {
133
+ computation({
134
+ onSuccess: (x) => {
135
+ compensation();
136
+ ctx.onSuccess(x);
137
+ },
138
+ onError: (x) => {
139
+ compensation();
140
+ ctx.onError(x);
141
+ },
142
+ onCancel: (x) => {
143
+ compensation();
144
+ ctx.onCancel(x);
145
+ },
146
+ cancelToken: ctx.cancelToken,
147
+ trampoline: ctx.trampoline,
148
+ });
149
+ });
150
+ }
151
+ TryWith(computation, catchHandler) {
152
+ return protectedCont((ctx) => {
153
+ computation({
154
+ onSuccess: ctx.onSuccess,
155
+ onCancel: ctx.onCancel,
156
+ cancelToken: ctx.cancelToken,
157
+ trampoline: ctx.trampoline,
158
+ onError: (ex) => {
159
+ try {
160
+ catchHandler(ex)(ctx);
161
+ }
162
+ catch (err) {
163
+ ctx.onError(ensureErrorOrException(err));
164
+ }
165
+ },
166
+ });
167
+ });
168
+ }
169
+ Using(resource, binder) {
170
+ return this.TryFinally(binder(resource), () => resource.Dispose());
171
+ }
172
+ While(guard, computation) {
173
+ if (guard()) {
174
+ return this.Bind(computation, () => this.While(guard, computation));
175
+ }
176
+ else {
177
+ return this.Return(void 0);
178
+ }
179
+ }
180
+ Zero() {
181
+ return protectedCont((ctx) => ctx.onSuccess(void 0));
182
+ }
183
+ }
184
+ const singleton = new AsyncBuilder();
185
+
186
+ export { AsyncBuilder, CancellationToken, OperationCanceledError, Trampoline, protectedBind, protectedCont, protectedReturn, singleton };
@@ -0,0 +1,8 @@
1
+ BigInt.prototype.toJSON = function () {
2
+ return `${this.toString()}`;
3
+ };
4
+ function fromString(s) { return BigInt(s); }
5
+ function toInt64(x) { return BigInt.asIntN(64, x); }
6
+ function toUInt64(x) { return BigInt.asUintN(64, x); }
7
+
8
+ export { fromString, toInt64, toUInt64 };
@@ -0,0 +1,24 @@
1
+ import { FSharpRef } from './Types.js';
2
+
3
+ function tryParse(str, defValue) {
4
+ if (str != null && str.match(/^\s*true\s*$/i)) {
5
+ defValue.contents = true;
6
+ return true;
7
+ }
8
+ else if (str != null && str.match(/^\s*false\s*$/i)) {
9
+ defValue.contents = false;
10
+ return true;
11
+ }
12
+ return false;
13
+ }
14
+ function parse(str) {
15
+ const defValue = new FSharpRef(false);
16
+ if (tryParse(str, defValue)) {
17
+ return defValue.contents;
18
+ }
19
+ else {
20
+ throw new Error(`String '${str}' was not recognized as a valid Boolean.`);
21
+ }
22
+ }
23
+
24
+ export { parse, tryParse };