@nfdi4plants/arctrl 1.0.0-alpha6
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.
- package/ARCtrl.js +257 -0
- package/Contract/Contract.js +95 -0
- package/Contracts/Contracts.ARCtrl.js +35 -0
- package/Contracts/Contracts.ArcAssay.js +65 -0
- package/Contracts/Contracts.ArcInvestigation.js +58 -0
- package/Contracts/Contracts.ArcStudy.js +65 -0
- package/Contracts/Contracts.Git.js +91 -0
- package/FileSystem/Commit.js +18 -0
- package/FileSystem/DefaultGitignore.js +3 -0
- package/FileSystem/FileSystem.js +53 -0
- package/FileSystem/FileSystemTree.js +223 -0
- package/FileSystem/Path.js +38 -0
- package/FileSystemTree.js +51 -0
- package/ISA/ISA/ArcTypes/ArcTable.js +744 -0
- package/ISA/ISA/ArcTypes/ArcTableAux.js +1142 -0
- package/ISA/ISA/ArcTypes/ArcTables.js +380 -0
- package/ISA/ISA/ArcTypes/ArcTypes.js +2018 -0
- package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
- package/ISA/ISA/ArcTypes/CompositeColumn.js +42 -0
- package/ISA/ISA/ArcTypes/CompositeHeader.js +358 -0
- package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
- package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
- package/ISA/ISA/Builder/Types.js +243 -0
- package/ISA/ISA/Fable.js +50 -0
- package/ISA/ISA/Helper.js +326 -0
- package/ISA/ISA/Identifier.js +76 -0
- package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
- package/ISA/ISA/JsonTypes/Assay.js +620 -0
- package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
- package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
- package/ISA/ISA/JsonTypes/Comment.js +58 -0
- package/ISA/ISA/JsonTypes/CommentList.js +139 -0
- package/ISA/ISA/JsonTypes/Component.js +158 -0
- package/ISA/ISA/JsonTypes/Data.js +55 -0
- package/ISA/ISA/JsonTypes/DataFile.js +68 -0
- package/ISA/ISA/JsonTypes/Factor.js +128 -0
- package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
- package/ISA/ISA/JsonTypes/Investigation.js +204 -0
- package/ISA/ISA/JsonTypes/Material.js +66 -0
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
- package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
- package/ISA/ISA/JsonTypes/Person.js +137 -0
- package/ISA/ISA/JsonTypes/Process.js +401 -0
- package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
- package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
- package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
- package/ISA/ISA/JsonTypes/Protocol.js +277 -0
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
- package/ISA/ISA/JsonTypes/Publication.js +105 -0
- package/ISA/ISA/JsonTypes/Sample.js +71 -0
- package/ISA/ISA/JsonTypes/Source.js +54 -0
- package/ISA/ISA/JsonTypes/Study.js +942 -0
- package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
- package/ISA/ISA/JsonTypes/URI.js +19 -0
- package/ISA/ISA/JsonTypes/Value.js +210 -0
- package/ISA/ISA/Regex.js +588 -0
- package/ISA/ISA.Json/Assay.js +123 -0
- package/ISA/ISA.Json/Comment.js +84 -0
- package/ISA/ISA.Json/ConverterOptions.js +33 -0
- package/ISA/ISA.Json/Data.js +271 -0
- package/ISA/ISA.Json/Decode.js +46 -0
- package/ISA/ISA.Json/Factor.js +194 -0
- package/ISA/ISA.Json/GEncode.js +15 -0
- package/ISA/ISA.Json/Investigation.js +132 -0
- package/ISA/ISA.Json/Material.js +233 -0
- package/ISA/ISA.Json/Ontology.js +204 -0
- package/ISA/ISA.Json/Person.js +204 -0
- package/ISA/ISA.Json/Process.js +291 -0
- package/ISA/ISA.Json/Protocol.js +242 -0
- package/ISA/ISA.Json/Publication.js +92 -0
- package/ISA/ISA.Json/Study.js +230 -0
- package/ISA/ISA.Json/Validation/Fable.js +69 -0
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
- package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
- package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
- package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
- package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
- package/README.md +277 -0
- package/SemVer.js +60 -0
- package/Templates/Templates.Json.js +40 -0
- package/Templates/Templates.Spreadsheet.js +315 -0
- package/Templates/Templates.js +179 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
- package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
- package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
- package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
- package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Async.js +158 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
- package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
- package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
- package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
- package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
- package/fable_modules/fable-library.4.1.4/Char.js +169 -0
- package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
- package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
- package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
- package/fable_modules/fable-library.4.1.4/Date.js +451 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
- package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
- package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
- package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
- package/fable_modules/fable-library.4.1.4/Double.js +46 -0
- package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
- package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
- package/fable_modules/fable-library.4.1.4/Event.js +93 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
- package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
- package/fable_modules/fable-library.4.1.4/Global.js +8 -0
- package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
- package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
- package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
- package/fable_modules/fable-library.4.1.4/List.js +1273 -0
- package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Long.js +46 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
- package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
- package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
- package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Native.js +8 -0
- package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
- package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
- package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Option.js +96 -0
- package/fable_modules/fable-library.4.1.4/README.md +3 -0
- package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
- package/fable_modules/fable-library.4.1.4/Random.js +170 -0
- package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Range.js +45 -0
- package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
- package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
- package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
- package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
- package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
- package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
- package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
- package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
- package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
- package/fable_modules/fable-library.4.1.4/String.js +540 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
- package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
- package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
- package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
- package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
- package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
- package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
- package/fable_modules/fable-library.4.1.4/Types.js +208 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
- package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
- package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
- package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
- package/fable_modules/fable-library.4.1.4/Util.js +662 -0
- package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
- package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
- package/fable_modules/fable-library.4.1.4/package.json +23 -0
- package/fable_modules/project_cracked.json +1 -0
- package/package.json +22 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { reverse, cons, iterateIndexed, empty, map as map_1, toArray, initialize, singleton, length, ofArray } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
2
|
+
import { OntologyAnnotation } from "../../ISA/JsonTypes/OntologyAnnotation.js";
|
|
3
|
+
import { defaultArg, map } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
4
|
+
import { URIModule_fromString } from "../../ISA/JsonTypes/URI.js";
|
|
5
|
+
import { Option_fromValueWithDefault } from "./Conversions.js";
|
|
6
|
+
import { Publication } from "../../ISA/JsonTypes/Publication.js";
|
|
7
|
+
import { SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValue_11FD62A8, SparseTable__TryGetValueDefault_5BAE6133, SparseTable_GetEmptyComments_651559CC } from "./SparseTable.js";
|
|
8
|
+
import { Comment_toString, Comment_fromString } from "./Comment.js";
|
|
9
|
+
import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
|
|
10
|
+
import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
|
|
11
|
+
import { stringHash } from "../../../fable_modules/fable-library.4.1.4/Util.js";
|
|
12
|
+
|
|
13
|
+
export const pubMedIDLabel = "PubMed ID";
|
|
14
|
+
|
|
15
|
+
export const doiLabel = "DOI";
|
|
16
|
+
|
|
17
|
+
export const authorListLabel = "Author List";
|
|
18
|
+
|
|
19
|
+
export const titleLabel = "Title";
|
|
20
|
+
|
|
21
|
+
export const statusLabel = "Status";
|
|
22
|
+
|
|
23
|
+
export const statusTermAccessionNumberLabel = "Status Term Accession Number";
|
|
24
|
+
|
|
25
|
+
export const statusTermSourceREFLabel = "Status Term Source REF";
|
|
26
|
+
|
|
27
|
+
export const labels = ofArray([pubMedIDLabel, doiLabel, authorListLabel, titleLabel, statusLabel, statusTermAccessionNumberLabel, statusTermSourceREFLabel]);
|
|
28
|
+
|
|
29
|
+
export function fromString(pubMedID, doi, author, title, status, statusTermSourceREF, statusTermAccessionNumber, comments) {
|
|
30
|
+
const status_1 = OntologyAnnotation.fromString(status, statusTermSourceREF, statusTermAccessionNumber);
|
|
31
|
+
const arg = map(URIModule_fromString, pubMedID);
|
|
32
|
+
const arg_4 = Option_fromValueWithDefault(OntologyAnnotation.empty, status_1);
|
|
33
|
+
const arg_5 = Option_fromValueWithDefault([], comments);
|
|
34
|
+
return Publication.make(arg, doi, author, title, arg_4, arg_5);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function fromSparseTable(matrix) {
|
|
38
|
+
if ((matrix.ColumnCount === 0) && (length(matrix.CommentKeys) !== 0)) {
|
|
39
|
+
const comments = SparseTable_GetEmptyComments_651559CC(matrix);
|
|
40
|
+
return singleton(Publication.create(void 0, void 0, void 0, void 0, void 0, comments));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return initialize(matrix.ColumnCount, (i) => {
|
|
44
|
+
const comments_1 = toArray(map_1((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, i])), matrix.CommentKeys));
|
|
45
|
+
return fromString(SparseTable__TryGetValue_11FD62A8(matrix, [pubMedIDLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [doiLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [authorListLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [titleLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [statusLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [statusTermSourceREFLabel, i]), SparseTable__TryGetValue_11FD62A8(matrix, [statusTermAccessionNumberLabel, i]), comments_1);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function toSparseTable(publications) {
|
|
51
|
+
const matrix = SparseTable_Create_Z2192E64B(void 0, labels, void 0, length(publications) + 1);
|
|
52
|
+
let commentKeys = empty();
|
|
53
|
+
iterateIndexed((i, p) => {
|
|
54
|
+
const i_1 = (i + 1) | 0;
|
|
55
|
+
let s_1;
|
|
56
|
+
const s = defaultArg(p.Status, OntologyAnnotation.empty);
|
|
57
|
+
s_1 = OntologyAnnotation.toString(s, true);
|
|
58
|
+
addToDict(matrix.Matrix, [pubMedIDLabel, i_1], defaultArg(p.PubMedID, ""));
|
|
59
|
+
addToDict(matrix.Matrix, [doiLabel, i_1], defaultArg(p.DOI, ""));
|
|
60
|
+
addToDict(matrix.Matrix, [authorListLabel, i_1], defaultArg(p.Authors, ""));
|
|
61
|
+
addToDict(matrix.Matrix, [titleLabel, i_1], defaultArg(p.Title, ""));
|
|
62
|
+
addToDict(matrix.Matrix, [statusLabel, i_1], s_1.TermName);
|
|
63
|
+
addToDict(matrix.Matrix, [statusTermAccessionNumberLabel, i_1], s_1.TermAccessionNumber);
|
|
64
|
+
addToDict(matrix.Matrix, [statusTermSourceREFLabel, i_1], s_1.TermSourceREF);
|
|
65
|
+
const matchValue = p.Comments;
|
|
66
|
+
if (matchValue != null) {
|
|
67
|
+
const array = matchValue;
|
|
68
|
+
array.forEach((comment) => {
|
|
69
|
+
const patternInput = Comment_toString(comment);
|
|
70
|
+
const n = patternInput[0];
|
|
71
|
+
commentKeys = cons(n, commentKeys);
|
|
72
|
+
addToDict(matrix.Matrix, [n, i_1], patternInput[1]);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}, publications);
|
|
76
|
+
return new SparseTable(matrix.Matrix, matrix.Keys, reverse(List_distinct(commentKeys, {
|
|
77
|
+
Equals: (x, y) => (x === y),
|
|
78
|
+
GetHashCode: stringHash,
|
|
79
|
+
})), matrix.ColumnCount);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function fromRows(prefix, lineNumber, rows) {
|
|
83
|
+
const tupledArg = (prefix == null) ? SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber) : SparseTable_FromRows_Z5579EC29(rows, labels, lineNumber, prefix);
|
|
84
|
+
return [tupledArg[0], tupledArg[1], tupledArg[2], fromSparseTable(tupledArg[3])];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function toRows(prefix, publications) {
|
|
88
|
+
const m = toSparseTable(publications);
|
|
89
|
+
if (prefix == null) {
|
|
90
|
+
return SparseTable_ToRows_6A3D4534(m);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
return SparseTable_ToRows_6A3D4534(m, prefix);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
import { append as append_1, delay, tryItem, length as length_1, isEmpty, iterate, fold, tryPick, maxBy, initialize, choose, map, indexed } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
2
|
+
import { defaultArg, map as map_1 } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
3
|
+
import { tryFind, ofSeq } from "../../../fable_modules/fable-library.4.1.4/Map.js";
|
|
4
|
+
import { arrayHash, equalArrays, equals, comparePrimitives } from "../../../fable_modules/fable-library.4.1.4/Util.js";
|
|
5
|
+
import { RowBuilder_get_Empty, RowBuilder__Combine_19F30600, RowBuilder_$ctor } from "../../../fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js";
|
|
6
|
+
import { CellBuilder_$ctor, CellBuilder__AsCellElement_825BA8D } from "../../../fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js";
|
|
7
|
+
import { Messages_format, SheetEntity$1_some_2B595 } from "../../../fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js";
|
|
8
|
+
import { DataType } from "../../../fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js";
|
|
9
|
+
import { map as map_2, toArray, initialize as initialize_1, exists, find, cons, append, empty, singleton } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
10
|
+
import { ColumnIndex, RowElement } from "../../../fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js";
|
|
11
|
+
import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
12
|
+
import { record_type, list_type, class_type, tuple_type, int32_type, string_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
13
|
+
import { Seq_trySkip, Dictionary_tryGetValue } from "../CollectionAux.js";
|
|
14
|
+
import { addToDict, getItemFromDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
|
|
15
|
+
import { Dictionary } from "../../../fable_modules/fable-library.4.1.4/MutableMap.js";
|
|
16
|
+
import { printf, toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
|
|
17
|
+
import { Comment$, Remark } from "../../ISA/JsonTypes/Comment.js";
|
|
18
|
+
import { Comment_wrapCommentKey, Comment_$007CComment$007C_$007C, Remark_$007CRemark$007C_$007C } from "./Comment.js";
|
|
19
|
+
|
|
20
|
+
export function SparseRowModule_fromValues(v) {
|
|
21
|
+
return indexed(v);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function SparseRowModule_getValues(i) {
|
|
25
|
+
return map((tuple) => tuple[1], i);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function SparseRowModule_fromAllValues(v) {
|
|
29
|
+
return choose((tupledArg) => map_1((v_1) => [tupledArg[0], v_1], tupledArg[1]), indexed(v));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function SparseRowModule_getAllValues(i) {
|
|
33
|
+
const m = ofSeq(i, {
|
|
34
|
+
Compare: comparePrimitives,
|
|
35
|
+
});
|
|
36
|
+
return initialize(maxBy((tuple) => tuple[0], i, {
|
|
37
|
+
Compare: comparePrimitives,
|
|
38
|
+
})[0] + 1, (i_1) => tryFind(i_1, m));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function SparseRowModule_fromFsRow(r) {
|
|
42
|
+
return choose((c) => {
|
|
43
|
+
if (c.Value === "") {
|
|
44
|
+
return void 0;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return [c.ColumnNumber - 1, c.Value];
|
|
48
|
+
}
|
|
49
|
+
}, r.Cells);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function SparseRowModule_tryGetValueAt(i, vs) {
|
|
53
|
+
return tryPick((tupledArg) => {
|
|
54
|
+
if (tupledArg[0] === i) {
|
|
55
|
+
return tupledArg[1];
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return void 0;
|
|
59
|
+
}
|
|
60
|
+
}, vs);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function SparseRowModule_toDSLRow(vs) {
|
|
64
|
+
const builder$0040 = RowBuilder_$ctor();
|
|
65
|
+
let this$_9;
|
|
66
|
+
const arg = map((_arg) => {
|
|
67
|
+
const v = _arg;
|
|
68
|
+
if (v == null) {
|
|
69
|
+
let c_1;
|
|
70
|
+
const this$_5 = CellBuilder__AsCellElement_825BA8D(CellBuilder_$ctor(), SheetEntity$1_some_2B595(singleton([new DataType(0, []), ""])));
|
|
71
|
+
let matchResult, errs_1, f_1, ms_2_1;
|
|
72
|
+
switch (this$_5.tag) {
|
|
73
|
+
case 1: {
|
|
74
|
+
if (equals(this$_5.fields[0], empty())) {
|
|
75
|
+
matchResult = 1;
|
|
76
|
+
ms_2_1 = this$_5.fields[0];
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
matchResult = 2;
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case 2: {
|
|
84
|
+
if (equals(this$_5.fields[0], empty())) {
|
|
85
|
+
matchResult = 1;
|
|
86
|
+
ms_2_1 = this$_5.fields[0];
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
matchResult = 2;
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
default: {
|
|
94
|
+
matchResult = 0;
|
|
95
|
+
errs_1 = this$_5.fields[1];
|
|
96
|
+
f_1 = this$_5.fields[0];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
switch (matchResult) {
|
|
100
|
+
case 0: {
|
|
101
|
+
c_1 = f_1;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
case 1: {
|
|
105
|
+
throw new Error("SheetEntity does not contain Value.");
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
default: {
|
|
109
|
+
let matchResult_1, ms_3_1;
|
|
110
|
+
switch (this$_5.tag) {
|
|
111
|
+
case 1: {
|
|
112
|
+
matchResult_1 = 0;
|
|
113
|
+
ms_3_1 = this$_5.fields[0];
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case 2: {
|
|
117
|
+
matchResult_1 = 0;
|
|
118
|
+
ms_3_1 = this$_5.fields[0];
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
default:
|
|
122
|
+
matchResult_1 = 1;
|
|
123
|
+
}
|
|
124
|
+
switch (matchResult_1) {
|
|
125
|
+
case 0: {
|
|
126
|
+
throw new Error(`SheetEntity does not contain Value:
|
|
127
|
+
${Messages_format(ms_3_1)}`);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
default:
|
|
131
|
+
throw new Error("Match failure: FsSpreadsheet.DSL.SheetEntity`1");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return SheetEntity$1_some_2B595(singleton((c_1[1] == null) ? (new RowElement(1, [c_1[0]])) : (new RowElement(0, [new ColumnIndex(c_1[1]), c_1[0]]))));
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
const v_1 = v;
|
|
139
|
+
let c;
|
|
140
|
+
const this$_2 = CellBuilder__AsCellElement_825BA8D(CellBuilder_$ctor(), SheetEntity$1_some_2B595(singleton([new DataType(0, []), v_1])));
|
|
141
|
+
let matchResult_2, errs, f, ms_2;
|
|
142
|
+
switch (this$_2.tag) {
|
|
143
|
+
case 1: {
|
|
144
|
+
if (equals(this$_2.fields[0], empty())) {
|
|
145
|
+
matchResult_2 = 1;
|
|
146
|
+
ms_2 = this$_2.fields[0];
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
matchResult_2 = 2;
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
case 2: {
|
|
154
|
+
if (equals(this$_2.fields[0], empty())) {
|
|
155
|
+
matchResult_2 = 1;
|
|
156
|
+
ms_2 = this$_2.fields[0];
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
matchResult_2 = 2;
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
default: {
|
|
164
|
+
matchResult_2 = 0;
|
|
165
|
+
errs = this$_2.fields[1];
|
|
166
|
+
f = this$_2.fields[0];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
switch (matchResult_2) {
|
|
170
|
+
case 0: {
|
|
171
|
+
c = f;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
case 1: {
|
|
175
|
+
throw new Error("SheetEntity does not contain Value.");
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
default: {
|
|
179
|
+
let matchResult_3, ms_3;
|
|
180
|
+
switch (this$_2.tag) {
|
|
181
|
+
case 1: {
|
|
182
|
+
matchResult_3 = 0;
|
|
183
|
+
ms_3 = this$_2.fields[0];
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
case 2: {
|
|
187
|
+
matchResult_3 = 0;
|
|
188
|
+
ms_3 = this$_2.fields[0];
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
default:
|
|
192
|
+
matchResult_3 = 1;
|
|
193
|
+
}
|
|
194
|
+
switch (matchResult_3) {
|
|
195
|
+
case 0: {
|
|
196
|
+
throw new Error(`SheetEntity does not contain Value:
|
|
197
|
+
${Messages_format(ms_3)}`);
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
default:
|
|
201
|
+
throw new Error("Match failure: FsSpreadsheet.DSL.SheetEntity`1");
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return SheetEntity$1_some_2B595(singleton((c[1] == null) ? (new RowElement(1, [c[0]])) : (new RowElement(0, [new ColumnIndex(c[1]), c[0]]))));
|
|
206
|
+
}
|
|
207
|
+
}, SparseRowModule_getAllValues(vs));
|
|
208
|
+
this$_9 = fold((state, we) => RowBuilder__Combine_19F30600(builder$0040, state, we), RowBuilder_get_Empty(), arg);
|
|
209
|
+
let matchResult_4, errs_2, f_3, ms_2_2;
|
|
210
|
+
switch (this$_9.tag) {
|
|
211
|
+
case 1: {
|
|
212
|
+
if (equals(this$_9.fields[0], empty())) {
|
|
213
|
+
matchResult_4 = 1;
|
|
214
|
+
ms_2_2 = this$_9.fields[0];
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
matchResult_4 = 2;
|
|
218
|
+
}
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
case 2: {
|
|
222
|
+
if (equals(this$_9.fields[0], empty())) {
|
|
223
|
+
matchResult_4 = 1;
|
|
224
|
+
ms_2_2 = this$_9.fields[0];
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
matchResult_4 = 2;
|
|
228
|
+
}
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
default: {
|
|
232
|
+
matchResult_4 = 0;
|
|
233
|
+
errs_2 = this$_9.fields[1];
|
|
234
|
+
f_3 = this$_9.fields[0];
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
switch (matchResult_4) {
|
|
238
|
+
case 0:
|
|
239
|
+
return f_3;
|
|
240
|
+
case 1:
|
|
241
|
+
throw new Error("SheetEntity does not contain Value.");
|
|
242
|
+
default: {
|
|
243
|
+
let matchResult_5, ms_3_2;
|
|
244
|
+
switch (this$_9.tag) {
|
|
245
|
+
case 1: {
|
|
246
|
+
matchResult_5 = 0;
|
|
247
|
+
ms_3_2 = this$_9.fields[0];
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
case 2: {
|
|
251
|
+
matchResult_5 = 0;
|
|
252
|
+
ms_3_2 = this$_9.fields[0];
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
default:
|
|
256
|
+
matchResult_5 = 1;
|
|
257
|
+
}
|
|
258
|
+
switch (matchResult_5) {
|
|
259
|
+
case 0:
|
|
260
|
+
throw new Error(`SheetEntity does not contain Value:
|
|
261
|
+
${Messages_format(ms_3_2)}`);
|
|
262
|
+
default:
|
|
263
|
+
throw new Error("Match failure: FsSpreadsheet.DSL.SheetEntity`1");
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function SparseRowModule_readFromSheet(sheet) {
|
|
270
|
+
return map(SparseRowModule_fromFsRow, sheet.Rows);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export function SparseRowModule_writeToSheet(rowI, row, sheet) {
|
|
274
|
+
const fsRow = sheet.Row(rowI);
|
|
275
|
+
iterate((tupledArg) => {
|
|
276
|
+
const v = tupledArg[1];
|
|
277
|
+
if (v.trim() !== "") {
|
|
278
|
+
fsRow.Item(tupledArg[0] + 1).SetValueAs(v);
|
|
279
|
+
}
|
|
280
|
+
}, row);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export class SparseTable extends Record {
|
|
284
|
+
constructor(Matrix, Keys, CommentKeys, ColumnCount) {
|
|
285
|
+
super();
|
|
286
|
+
this.Matrix = Matrix;
|
|
287
|
+
this.Keys = Keys;
|
|
288
|
+
this.CommentKeys = CommentKeys;
|
|
289
|
+
this.ColumnCount = (ColumnCount | 0);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export function SparseTable_$reflection() {
|
|
294
|
+
return record_type("ARCtrl.ISA.Spreadsheet.SparseTable", [], SparseTable, () => [["Matrix", class_type("System.Collections.Generic.Dictionary`2", [tuple_type(string_type, int32_type), string_type])], ["Keys", list_type(string_type)], ["CommentKeys", list_type(string_type)], ["ColumnCount", int32_type]]);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export function SparseTable__TryGetValue_11FD62A8(this$, key) {
|
|
298
|
+
return Dictionary_tryGetValue(key, this$.Matrix);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export function SparseTable__TryGetValueDefault_5BAE6133(this$, defaultValue, key) {
|
|
302
|
+
if (this$.Matrix.has(key)) {
|
|
303
|
+
return getItemFromDict(this$.Matrix, key);
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
return defaultValue;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export function SparseTable_Create_Z2192E64B(matrix, keys, commentKeys, length) {
|
|
311
|
+
return new SparseTable(defaultArg(matrix, new Dictionary([], {
|
|
312
|
+
Equals: equalArrays,
|
|
313
|
+
GetHashCode: arrayHash,
|
|
314
|
+
})), defaultArg(keys, empty()), defaultArg(commentKeys, empty()), defaultArg(length, 0));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export function SparseTable_AddRow(key, values, matrix) {
|
|
318
|
+
iterate((tupledArg) => {
|
|
319
|
+
addToDict(matrix.Matrix, [key, tupledArg[0]], tupledArg[1]);
|
|
320
|
+
}, values);
|
|
321
|
+
const length = (isEmpty(values) ? 0 : (1 + maxBy((tuple) => tuple[0], values, {
|
|
322
|
+
Compare: comparePrimitives,
|
|
323
|
+
})[0])) | 0;
|
|
324
|
+
return new SparseTable(matrix.Matrix, append(matrix.Keys, singleton(key)), matrix.CommentKeys, (length > matrix.ColumnCount) ? length : matrix.ColumnCount);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export function SparseTable_AddEmptyComment(key, matrix) {
|
|
328
|
+
return new SparseTable(matrix.Matrix, matrix.Keys, append(matrix.CommentKeys, singleton(key)), matrix.ColumnCount);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export function SparseTable_AddComment(key, values, matrix) {
|
|
332
|
+
if (length_1(values) === 0) {
|
|
333
|
+
return SparseTable_AddEmptyComment(key, matrix);
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
iterate((tupledArg) => {
|
|
337
|
+
addToDict(matrix.Matrix, [key, tupledArg[0]], tupledArg[1]);
|
|
338
|
+
}, values);
|
|
339
|
+
const length = (isEmpty(values) ? 0 : (1 + maxBy((tuple) => tuple[0], values, {
|
|
340
|
+
Compare: comparePrimitives,
|
|
341
|
+
})[0])) | 0;
|
|
342
|
+
return new SparseTable(matrix.Matrix, matrix.Keys, append(matrix.CommentKeys, singleton(key)), (length > matrix.ColumnCount) ? length : matrix.ColumnCount);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export function SparseTable_FromRows_Z5579EC29(en, labels, lineNumber, prefix) {
|
|
347
|
+
try {
|
|
348
|
+
const prefix_1 = (prefix == null) ? "" : (prefix + " ");
|
|
349
|
+
const loop = (matrix_mut, remarks_mut, lineNumber_1_mut) => {
|
|
350
|
+
let v_2, k_1;
|
|
351
|
+
loop:
|
|
352
|
+
while (true) {
|
|
353
|
+
const matrix = matrix_mut, remarks = remarks_mut, lineNumber_1 = lineNumber_1_mut;
|
|
354
|
+
if (en["System.Collections.IEnumerator.MoveNext"]()) {
|
|
355
|
+
const row = map((tupledArg) => [tupledArg[0] - 1, tupledArg[1]], en["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
356
|
+
const matchValue = map_1((tuple) => tuple[1], tryItem(0, row));
|
|
357
|
+
const vals = Seq_trySkip(1, row);
|
|
358
|
+
const key = matchValue;
|
|
359
|
+
let matchResult, k, v_1;
|
|
360
|
+
const activePatternResult = Comment_$007CComment$007C_$007C(key);
|
|
361
|
+
if (activePatternResult != null) {
|
|
362
|
+
if (vals != null) {
|
|
363
|
+
matchResult = 0;
|
|
364
|
+
k = activePatternResult;
|
|
365
|
+
v_1 = vals;
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
matchResult = 1;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
matchResult = 1;
|
|
373
|
+
}
|
|
374
|
+
switch (matchResult) {
|
|
375
|
+
case 0: {
|
|
376
|
+
matrix_mut = SparseTable_AddComment(k, v_1, matrix);
|
|
377
|
+
remarks_mut = remarks;
|
|
378
|
+
lineNumber_1_mut = (lineNumber_1 + 1);
|
|
379
|
+
continue loop;
|
|
380
|
+
}
|
|
381
|
+
default: {
|
|
382
|
+
let matchResult_1, k_2, k_3, v_3, k_4;
|
|
383
|
+
const activePatternResult_1 = Remark_$007CRemark$007C_$007C(key);
|
|
384
|
+
if (activePatternResult_1 != null) {
|
|
385
|
+
matchResult_1 = 0;
|
|
386
|
+
k_2 = activePatternResult_1;
|
|
387
|
+
}
|
|
388
|
+
else if (key != null) {
|
|
389
|
+
if (vals != null) {
|
|
390
|
+
if ((v_2 = vals, (k_1 = key, exists((label) => (k_1 === (prefix_1 + label)), labels)))) {
|
|
391
|
+
matchResult_1 = 1;
|
|
392
|
+
k_3 = key;
|
|
393
|
+
v_3 = vals;
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
matchResult_1 = 2;
|
|
397
|
+
k_4 = key;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
matchResult_1 = 2;
|
|
402
|
+
k_4 = key;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
matchResult_1 = 3;
|
|
407
|
+
}
|
|
408
|
+
switch (matchResult_1) {
|
|
409
|
+
case 0: {
|
|
410
|
+
matrix_mut = matrix;
|
|
411
|
+
remarks_mut = cons(Remark.make(lineNumber_1, k_2), remarks);
|
|
412
|
+
lineNumber_1_mut = (lineNumber_1 + 1);
|
|
413
|
+
continue loop;
|
|
414
|
+
}
|
|
415
|
+
case 1: {
|
|
416
|
+
matrix_mut = SparseTable_AddRow(find((label_1) => (k_3 === (prefix_1 + label_1)), labels), v_3, matrix);
|
|
417
|
+
remarks_mut = remarks;
|
|
418
|
+
lineNumber_1_mut = (lineNumber_1 + 1);
|
|
419
|
+
continue loop;
|
|
420
|
+
}
|
|
421
|
+
case 2:
|
|
422
|
+
return [k_4, lineNumber_1, remarks, matrix];
|
|
423
|
+
default:
|
|
424
|
+
return [void 0, lineNumber_1, remarks, matrix];
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
return [void 0, lineNumber_1, remarks, matrix];
|
|
431
|
+
}
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
return loop(SparseTable_Create_Z2192E64B(), empty(), lineNumber);
|
|
436
|
+
}
|
|
437
|
+
catch (err) {
|
|
438
|
+
const arg_9 = err.message;
|
|
439
|
+
return toFail(printf("Error parsing block in investigation file starting from line number %i: %s"))(lineNumber)(arg_9);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export function SparseTable_ToRows_6A3D4534(matrix, prefix) {
|
|
444
|
+
const prefix_1 = (prefix == null) ? "" : (prefix + " ");
|
|
445
|
+
return delay(() => append_1(map((key) => SparseRowModule_fromValues(cons(prefix_1 + key, initialize_1(matrix.ColumnCount - 1, (i) => SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [key, i + 1])))), matrix.Keys), delay(() => map((key_1) => SparseRowModule_fromValues(cons(Comment_wrapCommentKey(key_1), initialize_1(matrix.ColumnCount - 1, (i_1) => SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [key_1, i_1 + 1])))), matrix.CommentKeys))));
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export function SparseTable_GetEmptyComments_651559CC(matrix) {
|
|
449
|
+
return toArray(map_2((key) => Comment$.create(void 0, key), matrix.CommentKeys));
|
|
450
|
+
}
|
|
451
|
+
|