@nfdi4plants/arctrl 3.0.0-beta.3 → 3.0.0-beta.4
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/README.md +2 -0
- package/dist/ts/index.js +63 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +354 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +28 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/AsyncBuilder.js +186 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +8 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Boolean.js +24 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +73 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +31 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +574 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +59 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +30 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +5 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +5 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +48 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +120 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +680 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +40 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +655 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +105 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +320 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +204 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Native.js +10 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Numeric.js +73 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +23 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +111 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +114 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +36 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +846 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +1160 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +364 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +40 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +193 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Unicode.13.0.0.js +6 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Uri.js +160 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +367 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +825 -0
- package/dist/ts/ts/ARC.js +914 -0
- package/dist/ts/ts/Contract/ARC.js +52 -0
- package/dist/ts/ts/Contract/ArcAssay.js +80 -0
- package/dist/ts/ts/Contract/ArcInvestigation.js +57 -0
- package/dist/ts/ts/Contract/ArcRun.js +76 -0
- package/dist/ts/ts/Contract/ArcStudy.js +76 -0
- package/dist/ts/ts/Contract/ArcWorkflow.js +77 -0
- package/dist/ts/ts/Contract/Contract.js +45 -0
- package/dist/ts/ts/Contract/Datamap.js +221 -0
- package/dist/ts/ts/Contract/Git.js +57 -0
- package/dist/ts/ts/Contract/ValidationPackagesConfig.js +57 -0
- package/dist/ts/ts/ContractIO/ContractIO.js +202 -0
- package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -1
- package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/FileSystemHelper.js +273 -0
- package/dist/ts/ts/Conversion.js +1247 -0
- package/dist/ts/ts/Core/ArcTypes.js +3393 -0
- package/dist/ts/ts/Core/Comment.js +91 -0
- package/dist/ts/ts/Core/CommentList.js +27 -0
- package/dist/ts/ts/Core/Conversion.js +923 -0
- package/dist/ts/ts/Core/Data.js +179 -0
- package/dist/ts/ts/Core/DataContext.js +108 -0
- package/dist/ts/ts/Core/DataFile.js +50 -0
- package/dist/ts/ts/Core/DataMap.js +53 -0
- package/dist/ts/ts/Core/Helper/Collections.js +323 -0
- package/dist/ts/ts/Core/Helper/HashCodes.js +35 -0
- package/dist/ts/ts/Core/Helper/Identifier.js +96 -0
- package/dist/ts/ts/Core/Helper/ORCID.js +34 -0
- package/dist/ts/ts/Core/Helper/Regex.js +296 -0
- package/dist/ts/ts/Core/Helper/SemVer.js +31 -0
- package/dist/ts/ts/Core/Helper/Url.js +32 -0
- package/dist/ts/ts/Core/IdentifierSetters.js +9 -0
- package/dist/ts/ts/Core/OntologyAnnotation.js +207 -0
- package/dist/ts/ts/Core/OntologySourceReference.js +84 -0
- package/dist/ts/ts/Core/Person.js +183 -0
- package/dist/ts/ts/Core/Process/ColumnIndex.js +73 -0
- package/dist/ts/ts/Core/Process/Component.js +121 -0
- package/dist/ts/ts/Core/Process/Factor.js +104 -0
- package/dist/ts/ts/Core/Process/FactorValue.js +68 -0
- package/dist/ts/ts/Core/Process/Material.js +49 -0
- package/dist/ts/ts/Core/Process/MaterialAttribute.js +30 -0
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +68 -0
- package/dist/ts/ts/Core/Process/MaterialType.js +28 -0
- package/dist/ts/ts/Core/Process/Process.js +136 -0
- package/dist/ts/ts/Core/Process/ProcessInput.js +207 -0
- package/dist/ts/ts/Core/Process/ProcessOutput.js +178 -0
- package/dist/ts/ts/Core/Process/ProcessParameterValue.js +135 -0
- package/dist/ts/ts/Core/Process/ProcessSequence.js +56 -0
- package/dist/ts/ts/Core/Process/Protocol.js +54 -0
- package/dist/ts/ts/Core/Process/ProtocolParameter.js +69 -0
- package/dist/ts/ts/Core/Process/Sample.js +44 -0
- package/dist/ts/ts/Core/Process/Source.js +38 -0
- package/dist/ts/ts/Core/Publication.js +108 -0
- package/dist/ts/ts/Core/Table/ArcTable.js +889 -0
- package/dist/ts/ts/Core/Table/ArcTableAux.js +993 -0
- package/dist/ts/ts/Core/Table/ArcTables.js +415 -0
- package/dist/ts/ts/Core/Table/CompositeCell.js +334 -0
- package/dist/ts/ts/Core/Table/CompositeColumn.js +52 -0
- package/dist/ts/ts/Core/Table/CompositeHeader.js +792 -0
- package/dist/ts/ts/Core/Template.js +180 -0
- package/dist/ts/ts/Core/Templates.js +75 -0
- package/dist/ts/ts/Core/URI.js +8 -0
- package/dist/ts/ts/Core/Value.js +194 -0
- package/dist/ts/ts/CrossAsync.js +20 -0
- package/dist/ts/ts/FileSystem/DefaultGitattributes.js +3 -0
- package/dist/ts/ts/FileSystem/DefaultGitignore.js +3 -0
- package/dist/ts/ts/FileSystem/FileSystem.js +48 -0
- package/dist/ts/ts/FileSystem/FileSystemTree.js +339 -0
- package/dist/ts/ts/FileSystem/Path.js +36 -0
- package/dist/ts/ts/Json/Assay.d.ts +1 -1
- package/dist/ts/ts/Json/Assay.js +221 -0
- package/dist/ts/ts/Json/Comment.d.ts +1 -1
- package/dist/ts/ts/Json/Comment.js +112 -0
- package/dist/ts/ts/Json/Data.d.ts +1 -1
- package/dist/ts/ts/Json/Data.js +138 -0
- package/dist/ts/ts/Json/DataFile.d.ts +1 -1
- package/dist/ts/ts/Json/DataFile.js +55 -0
- package/dist/ts/ts/Json/DataMap/DataContext.d.ts +1 -1
- package/dist/ts/ts/Json/DataMap/DataContext.js +39 -0
- package/dist/ts/ts/Json/DataMap/DataMap.d.ts +1 -1
- package/dist/ts/ts/Json/DataMap/DataMap.js +27 -0
- package/dist/ts/ts/Json/Decode.d.ts +2 -2
- package/dist/ts/ts/Json/Decode.js +209 -0
- package/dist/ts/ts/Json/Encode.d.ts +1 -1
- package/dist/ts/ts/Json/Encode.js +65 -0
- package/dist/ts/ts/Json/IDTable.d.ts +1 -1
- package/dist/ts/ts/Json/IDTable.js +28 -0
- package/dist/ts/ts/Json/Investigation.d.ts +1 -1
- package/dist/ts/ts/Json/Investigation.js +229 -0
- package/dist/ts/ts/Json/OntologyAnnotation.d.ts +1 -1
- package/dist/ts/ts/Json/OntologyAnnotation.js +194 -0
- package/dist/ts/ts/Json/OntologySourceReference.d.ts +1 -1
- package/dist/ts/ts/Json/OntologySourceReference.js +119 -0
- package/dist/ts/ts/Json/Person.d.ts +1 -1
- package/dist/ts/ts/Json/Person.js +316 -0
- package/dist/ts/ts/Json/Process/AssayMaterials.d.ts +1 -1
- package/dist/ts/ts/Json/Process/AssayMaterials.js +21 -0
- package/dist/ts/ts/Json/Process/Component.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Component.js +41 -0
- package/dist/ts/ts/Json/Process/Factor.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Factor.js +53 -0
- package/dist/ts/ts/Json/Process/FactorValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/FactorValue.js +44 -0
- package/dist/ts/ts/Json/Process/Material.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Material.js +112 -0
- package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttribute.js +43 -0
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +44 -0
- package/dist/ts/ts/Json/Process/MaterialType.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialType.js +45 -0
- package/dist/ts/ts/Json/Process/Process.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Process.js +103 -0
- package/dist/ts/ts/Json/Process/ProcessInput.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessInput.js +42 -0
- package/dist/ts/ts/Json/Process/ProcessOutput.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessOutput.js +35 -0
- package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessParameterValue.js +28 -0
- package/dist/ts/ts/Json/Process/Protocol.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Protocol.js +166 -0
- package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProtocolParameter.js +43 -0
- package/dist/ts/ts/Json/Process/Sample.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Sample.js +165 -0
- package/dist/ts/ts/Json/Process/Source.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Source.js +133 -0
- package/dist/ts/ts/Json/Process/StudyMaterials.d.ts +1 -1
- package/dist/ts/ts/Json/Process/StudyMaterials.js +23 -0
- package/dist/ts/ts/Json/Process/Value.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Value.js +41 -0
- package/dist/ts/ts/Json/PropertyValue.d.ts +1 -1
- package/dist/ts/ts/Json/PropertyValue.js +280 -0
- package/dist/ts/ts/Json/Publication.d.ts +1 -1
- package/dist/ts/ts/Json/Publication.js +123 -0
- package/dist/ts/ts/Json/ROCrate/LDContext.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDContext.js +115 -0
- package/dist/ts/ts/Json/ROCrate/LDGraph.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDGraph.js +83 -0
- package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDNode.js +190 -0
- package/dist/ts/ts/Json/ROCrate/LDRef.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDRef.js +24 -0
- package/dist/ts/ts/Json/ROCrate/LDValue.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDValue.js +63 -0
- package/dist/ts/ts/Json/StringTable.d.ts +1 -1
- package/dist/ts/ts/Json/StringTable.js +66 -0
- package/dist/ts/ts/Json/Study.d.ts +1 -1
- package/dist/ts/ts/Json/Study.js +326 -0
- package/dist/ts/ts/Json/Table/ArcTable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/ArcTable.js +210 -0
- package/dist/ts/ts/Json/Table/CellTable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CellTable.js +53 -0
- package/dist/ts/ts/Json/Table/CompositeCell.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CompositeCell.js +106 -0
- package/dist/ts/ts/Json/Table/CompositeHeader.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CompositeHeader.js +121 -0
- package/dist/ts/ts/Json/Table/IOType.d.ts +1 -1
- package/dist/ts/ts/Json/Table/IOType.js +15 -0
- package/dist/ts/ts/Json/Table/OATable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/OATable.js +50 -0
- package/dist/ts/ts/Json/Table/Templates.d.ts +1 -1
- package/dist/ts/ts/Json/Table/Templates.js +15 -0
- package/dist/ts/ts/Json/context/rocrate/isa_assay_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/isa_comment_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +29 -0
- package/dist/ts/ts/Json/context/rocrate/isa_data_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +41 -0
- package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +69 -0
- package/dist/ts/ts/Json/context/rocrate/isa_material_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +37 -0
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +37 -0
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +41 -0
- package/dist/ts/ts/Json/context/rocrate/isa_organization_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +25 -0
- package/dist/ts/ts/Json/context/rocrate/isa_person_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +86 -0
- package/dist/ts/ts/Json/context/rocrate/isa_process_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +57 -0
- package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/isa_publication_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +45 -0
- package/dist/ts/ts/Json/context/rocrate/isa_sample_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +33 -0
- package/dist/ts/ts/Json/context/rocrate/isa_source_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +33 -0
- package/dist/ts/ts/Json/context/rocrate/isa_study_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +77 -0
- package/dist/ts/ts/Json/context/rocrate/property_value_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/property_value_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/rocrate_context.d.ts +1 -1
- package/dist/ts/ts/Json.js +171 -0
- package/dist/ts/ts/JsonIO/Assay.js +77 -0
- package/dist/ts/ts/JsonIO/Investigation.js +77 -0
- package/dist/ts/ts/JsonIO/LDObject.js +77 -0
- package/dist/ts/ts/JsonIO/OntologyAnnotation.js +56 -0
- package/dist/ts/ts/JsonIO/Study.js +77 -0
- package/dist/ts/ts/JsonIO/Table/Compression.d.ts +1 -1
- package/dist/ts/ts/JsonIO/Table/Compression.js +39 -0
- package/dist/ts/ts/JsonIO/Table/Templates.d.ts +1 -1
- package/dist/ts/ts/JsonIO/Table/Templates.js +25 -0
- package/dist/ts/ts/ROCrate/Generic/Comment.js +103 -0
- package/dist/ts/ts/ROCrate/Generic/Dataset.js +624 -0
- package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +103 -0
- package/dist/ts/ts/ROCrate/Generic/File.js +184 -0
- package/dist/ts/ts/ROCrate/Generic/LabProcess.js +222 -0
- package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +257 -0
- package/dist/ts/ts/ROCrate/Generic/Organization.js +63 -0
- package/dist/ts/ts/ROCrate/Generic/Person.js +377 -0
- package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +143 -0
- package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +512 -0
- package/dist/ts/ts/ROCrate/Generic/Sample.js +131 -0
- package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +173 -0
- package/dist/ts/ts/ROCrate/Helper.js +7 -0
- package/dist/ts/ts/ROCrate/LDContext.js +288 -0
- package/dist/ts/ts/ROCrate/LDObject.js +855 -0
- package/dist/ts/ts/ROCrate/ROCrateContext.js +39 -0
- package/dist/ts/ts/ROCrateIO.d.ts +1 -1
- package/dist/ts/ts/ROCrateIO.js +58 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +149 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +63 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +108 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +410 -0
- package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcAssay.js +169 -0
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +316 -0
- package/dist/ts/ts/Spreadsheet/ArcRun.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcRun.js +136 -0
- package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcStudy.js +92 -0
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +125 -0
- package/dist/ts/ts/Spreadsheet/CollectionAux.js +34 -0
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts +1 -1
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMap.js +33 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +41 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +418 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts +3 -3
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +85 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +90 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +58 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +85 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +133 -0
- package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +15 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +74 -0
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +58 -0
- package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +62 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +94 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +81 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +91 -0
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts +3 -3
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +193 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Study.js +238 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +105 -0
- package/dist/ts/ts/Template.Web.js +22 -0
- package/dist/ts/ts/ValidationPackages/ValidationPackage.js +53 -0
- package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +78 -0
- package/dist/ts/ts/WebRequest/WebRequest.Node.js +13 -0
- package/dist/ts/ts/WebRequest/WebRequest.js +19 -0
- package/dist/ts/ts/Xlsx.d.ts +1 -1
- package/dist/ts/ts/Xlsx.d.ts.map +1 -1
- package/dist/ts/ts/Xlsx.js +91 -0
- package/dist/ts/ts/Yaml/Encode.js +8 -0
- package/dist/ts/ts/Yaml/ValidationPackage.js +26 -0
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +40 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +344 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +103 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +19 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +17 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +7 -0
- package/dist/ts/ts/fable_modules/Fable.Exceljs.1.6.0/ExcelJs.fs.js +5 -0
- package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +18 -0
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +44 -0
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +5 -0
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +142 -0
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +76 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +359 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +344 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +154 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +116 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +126 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +135 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +422 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +5 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +25 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +28 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +69 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +42 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +29 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +348 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +86 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +68 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +12 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +54 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +33 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +63 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +66 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +544 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +31 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +38 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +79 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Encode.fs.js +57 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +235 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +16 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +45 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +89 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +480 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +11 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +212 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +164 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +136 -0
- package/package.json +10 -7
- package/dist/ts/__vite-browser-external-2447137e.js +0 -4
- package/dist/ts/__vite-browser-external-b3701507.cjs +0 -1
- package/dist/ts/arctrl.cjs.js +0 -5691
- package/dist/ts/arctrl.es.js +0 -35562
- package/dist/ts/arctrl.umd.js +0 -5691
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DateTimeOffset functions.
|
|
3
|
+
*
|
|
4
|
+
* Note: DateOffset instances are always DateObjects in local
|
|
5
|
+
* timezone (because JS dates are all kinds of messed up).
|
|
6
|
+
* A local date returns UTC epoch when `.getTime()` is called.
|
|
7
|
+
*
|
|
8
|
+
* However, this means that in order to construct an UTC date
|
|
9
|
+
* from a DateOffset with offset of +5 hours, you first need
|
|
10
|
+
* to subtract those 5 hours, than add the "local" offset.
|
|
11
|
+
* As said, all kinds of messed up.
|
|
12
|
+
*
|
|
13
|
+
* Basically; invariant: date.getTime() always return UTC time.
|
|
14
|
+
*/
|
|
15
|
+
function DateTimeOffset(value, offset) {
|
|
16
|
+
checkOffsetInRange(offset);
|
|
17
|
+
const d = new Date(value);
|
|
18
|
+
d.offset = offset != null ? offset : new Date().getTimezoneOffset() * -6e4;
|
|
19
|
+
return d;
|
|
20
|
+
}
|
|
21
|
+
function offset(value) {
|
|
22
|
+
return value.offset || 0;
|
|
23
|
+
}
|
|
24
|
+
function checkOffsetInRange(offset) {
|
|
25
|
+
if (offset != null && offset !== 0) {
|
|
26
|
+
if (offset % 60000 !== 0) {
|
|
27
|
+
throw new Error("Offset must be specified in whole minutes.");
|
|
28
|
+
}
|
|
29
|
+
if (Math.abs(offset / 3600000) > 14) {
|
|
30
|
+
throw new Error("Offset must be within plus or minus 14 hours.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function fromDate(date, offset) {
|
|
35
|
+
let offset2 = 0;
|
|
36
|
+
switch (date.kind) {
|
|
37
|
+
case 1 /* DateKind.UTC */:
|
|
38
|
+
offset2 = 0;
|
|
39
|
+
break;
|
|
40
|
+
case 2 /* DateKind.Local */:
|
|
41
|
+
offset2 = date.getTimezoneOffset() * -6e4;
|
|
42
|
+
break;
|
|
43
|
+
case 0 /* DateKind.Unspecified */:
|
|
44
|
+
default:
|
|
45
|
+
{
|
|
46
|
+
offset2 = date.getTimezoneOffset() * -6e4;
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
return DateTimeOffset(date.getTime(), offset2);
|
|
51
|
+
}
|
|
52
|
+
function add(d, ts) {
|
|
53
|
+
return DateTimeOffset(d.getTime() + ts, (d.offset ?? 0));
|
|
54
|
+
}
|
|
55
|
+
function op_Addition(x, y) {
|
|
56
|
+
return add(x, y);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { add, DateTimeOffset as default, fromDate, offset, op_Addition };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Big } from './lib/big.js';
|
|
2
|
+
import { symbol } from './Numeric.js';
|
|
3
|
+
import { FSharpRef } from './Types.js';
|
|
4
|
+
import { combineHashCodes } from './Util.js';
|
|
5
|
+
|
|
6
|
+
Big.prototype.GetHashCode = function () {
|
|
7
|
+
return combineHashCodes([this.s, this.e].concat(this.c));
|
|
8
|
+
};
|
|
9
|
+
Big.prototype.Equals = function (x) {
|
|
10
|
+
return !this.cmp(x);
|
|
11
|
+
};
|
|
12
|
+
Big.prototype.CompareTo = function (x) {
|
|
13
|
+
return this.cmp(x);
|
|
14
|
+
};
|
|
15
|
+
Big.prototype[symbol] = function () {
|
|
16
|
+
const _this = this;
|
|
17
|
+
return {
|
|
18
|
+
multiply: (y) => _this.mul(y),
|
|
19
|
+
toPrecision: (sd) => _this.toPrecision(sd),
|
|
20
|
+
toExponential: (dp) => _this.toExponential(dp),
|
|
21
|
+
toFixed: (dp) => _this.toFixed(dp),
|
|
22
|
+
toHex: () => (Number(_this) >>> 0).toString(16),
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const get_Zero = new Big(0);
|
|
26
|
+
new Big(1);
|
|
27
|
+
new Big(-1);
|
|
28
|
+
new Big("79228162514264337593543950335");
|
|
29
|
+
new Big("-79228162514264337593543950335");
|
|
30
|
+
function tryParse(str, defValue) {
|
|
31
|
+
try {
|
|
32
|
+
defValue.contents = new Big(str.trim());
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function parse(str) {
|
|
40
|
+
const defValue = new FSharpRef(get_Zero);
|
|
41
|
+
if (tryParse(str, defValue)) {
|
|
42
|
+
return defValue.contents;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw new Error(`The input string ${str} was not in a correct format.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// export function makeRangeStepFunction(step: Decimal, last: Decimal) {
|
|
49
|
+
// const stepComparedWithZero = step.cmp(get_Zero);
|
|
50
|
+
// if (stepComparedWithZero === 0) {
|
|
51
|
+
// throw new Error("The step of a range cannot be zero");
|
|
52
|
+
// }
|
|
53
|
+
// const stepGreaterThanZero = stepComparedWithZero > 0;
|
|
54
|
+
// return (x: Decimal) => {
|
|
55
|
+
// const comparedWithLast = x.cmp(last);
|
|
56
|
+
// if ((stepGreaterThanZero && comparedWithLast <= 0)
|
|
57
|
+
// || (!stepGreaterThanZero && comparedWithLast >= 0)) {
|
|
58
|
+
// return [x, op_Addition(x, step)];
|
|
59
|
+
// } else {
|
|
60
|
+
// return undefined;
|
|
61
|
+
// }
|
|
62
|
+
// };
|
|
63
|
+
// }
|
|
64
|
+
|
|
65
|
+
export { Big as default, get_Zero, parse, tryParse };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FSharpRef } from './Types.js';
|
|
2
|
+
|
|
3
|
+
function tryParse(str, defValue) {
|
|
4
|
+
// TODO: test if value is valid and in range
|
|
5
|
+
if (str != null && /\S/.test(str)) {
|
|
6
|
+
const v = +str.replace("_", "");
|
|
7
|
+
if (!Number.isNaN(v)) {
|
|
8
|
+
defValue.contents = v;
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
function parse(str) {
|
|
15
|
+
const defValue = new FSharpRef(0);
|
|
16
|
+
if (tryParse(str, defValue)) {
|
|
17
|
+
return defValue.contents;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
throw new Error(`The input string ${str} was not in a correct format.`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function max(x, y) {
|
|
24
|
+
return x > y ? x : y;
|
|
25
|
+
}
|
|
26
|
+
function min(x, y) {
|
|
27
|
+
return x < y ? x : y;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { max, min, parse, tryParse };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const SR_indexOutOfBounds = "The index was outside the range of elements in the collection.";
|
|
2
|
+
const SR_inputWasEmpty = "Collection was empty.";
|
|
3
|
+
const SR_keyNotFoundAlt = "An index satisfying the predicate was not found in the collection.";
|
|
4
|
+
|
|
5
|
+
export { SR_indexOutOfBounds, SR_inputWasEmpty, SR_keyNotFoundAlt };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { trim } from './String.js';
|
|
2
|
+
|
|
3
|
+
// RFC 4122 compliant. From https://stackoverflow.com/a/13653180/3922220
|
|
4
|
+
// const guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
5
|
+
// Relax GUID parsing, see #1637
|
|
6
|
+
const guidRegex = /^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/;
|
|
7
|
+
const guidRegexNoHyphen = /^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/;
|
|
8
|
+
const guidRegexHex = /^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;
|
|
9
|
+
/** Validates UUID as specified in RFC4122 (versions 1-5). */
|
|
10
|
+
function parse(str) {
|
|
11
|
+
function hyphenateGuid(str) {
|
|
12
|
+
return str.replace(guidRegexNoHyphen, "$1-$2-$3-$4-$5");
|
|
13
|
+
}
|
|
14
|
+
const wsTrimAndLowered = str.trim().toLowerCase();
|
|
15
|
+
if (guidRegex.test(wsTrimAndLowered)) {
|
|
16
|
+
return trim(wsTrimAndLowered, "{", "}", "(", ")");
|
|
17
|
+
}
|
|
18
|
+
else if (guidRegexNoHyphen.test(wsTrimAndLowered)) {
|
|
19
|
+
return hyphenateGuid(wsTrimAndLowered);
|
|
20
|
+
}
|
|
21
|
+
else if (guidRegexHex.test(wsTrimAndLowered)) {
|
|
22
|
+
return hyphenateGuid(wsTrimAndLowered.replace(/[\{\},]|0x/g, ''));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function tryParse(str, defValue) {
|
|
29
|
+
try {
|
|
30
|
+
defValue.contents = parse(str);
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// From https://gist.github.com/LeverOne/1308368
|
|
38
|
+
function newGuid() {
|
|
39
|
+
let b = "";
|
|
40
|
+
for (let a = 0; a++ < 36;) {
|
|
41
|
+
b += a * 51 & 52
|
|
42
|
+
? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString(16)
|
|
43
|
+
: "-";
|
|
44
|
+
}
|
|
45
|
+
return b;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { newGuid, parse, tryParse };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
var NumberStyles;
|
|
2
|
+
(function (NumberStyles) {
|
|
3
|
+
// None = 0x00000000,
|
|
4
|
+
// AllowLeadingWhite = 0x00000001,
|
|
5
|
+
// AllowTrailingWhite = 0x00000002,
|
|
6
|
+
// AllowLeadingSign = 0x00000004,
|
|
7
|
+
// AllowTrailingSign = 0x00000008,
|
|
8
|
+
// AllowParentheses = 0x00000010,
|
|
9
|
+
// AllowDecimalPoint = 0x00000020,
|
|
10
|
+
// AllowThousands = 0x00000040,
|
|
11
|
+
// AllowExponent = 0x00000080,
|
|
12
|
+
// AllowCurrencySymbol = 0x00000100,
|
|
13
|
+
NumberStyles[NumberStyles["AllowHexSpecifier"] = 512] = "AllowHexSpecifier";
|
|
14
|
+
// Integer = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign,
|
|
15
|
+
// HexNumber = AllowLeadingWhite | AllowTrailingWhite | AllowHexSpecifier,
|
|
16
|
+
// Number = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
|
|
17
|
+
// AllowTrailingSign | AllowDecimalPoint | AllowThousands,
|
|
18
|
+
// Float = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
|
|
19
|
+
// AllowDecimalPoint | AllowExponent,
|
|
20
|
+
// Currency = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
|
|
21
|
+
// AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol,
|
|
22
|
+
// Any = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
|
|
23
|
+
// AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol | AllowExponent,
|
|
24
|
+
})(NumberStyles || (NumberStyles = {}));
|
|
25
|
+
function validResponse(regexMatch, radix) {
|
|
26
|
+
const [/*all*/ , sign, prefix, digits] = regexMatch;
|
|
27
|
+
return {
|
|
28
|
+
sign: sign || "",
|
|
29
|
+
prefix: prefix || "",
|
|
30
|
+
digits,
|
|
31
|
+
radix,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function getRange(unsigned, bitsize) {
|
|
35
|
+
switch (bitsize) {
|
|
36
|
+
case 8: return unsigned ? [0, 255] : [-128, 127];
|
|
37
|
+
case 16: return unsigned ? [0, 65535] : [-32768, 32767];
|
|
38
|
+
case 32: return unsigned ? [0, 4294967295] : [-2147483648, 2147483647];
|
|
39
|
+
default: throw new Error("Invalid bit size.");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function getInvalidDigits(radix) {
|
|
43
|
+
switch (radix) {
|
|
44
|
+
case 2: return /[^0-1]/;
|
|
45
|
+
case 8: return /[^0-7]/;
|
|
46
|
+
case 10: return /[^0-9]/;
|
|
47
|
+
case 16: return /[^0-9a-fA-F]/;
|
|
48
|
+
default:
|
|
49
|
+
throw new Error("Invalid Base.");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function getPrefix(radix) {
|
|
53
|
+
switch (radix) {
|
|
54
|
+
case 2: return "0b";
|
|
55
|
+
case 8: return "0o";
|
|
56
|
+
case 10: return "";
|
|
57
|
+
case 16: return "0x";
|
|
58
|
+
default: return "";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function getRadix(prefix, style) {
|
|
62
|
+
if (style & NumberStyles.AllowHexSpecifier) {
|
|
63
|
+
return 16;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
switch (prefix) {
|
|
67
|
+
case "0b":
|
|
68
|
+
case "0B": return 2;
|
|
69
|
+
case "0o":
|
|
70
|
+
case "0O": return 8;
|
|
71
|
+
case "0x":
|
|
72
|
+
case "0X": return 16;
|
|
73
|
+
default: return 10;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function isValid(str, style, radix) {
|
|
78
|
+
const integerRegex = /^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/;
|
|
79
|
+
const res = integerRegex.exec(str.replace(/_/g, ""));
|
|
80
|
+
if (res != null) {
|
|
81
|
+
const [/*all*/ , /*sign*/ , prefix, digits] = res;
|
|
82
|
+
radix = radix || getRadix(prefix, style);
|
|
83
|
+
const invalidDigits = getInvalidDigits(radix);
|
|
84
|
+
if (!invalidDigits.test(digits)) {
|
|
85
|
+
return validResponse(res, radix);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
function parse(str, style, unsigned, bitsize, radix) {
|
|
91
|
+
const res = isValid(str, style, radix);
|
|
92
|
+
if (res != null) {
|
|
93
|
+
let v = Number.parseInt(res.sign + res.digits, res.radix);
|
|
94
|
+
if (!Number.isNaN(v)) {
|
|
95
|
+
const [umin, umax] = getRange(true, bitsize);
|
|
96
|
+
if (!unsigned && res.radix !== 10 && v >= umin && v <= umax) {
|
|
97
|
+
v = v << (32 - bitsize) >> (32 - bitsize);
|
|
98
|
+
}
|
|
99
|
+
const [min, max] = getRange(unsigned, bitsize);
|
|
100
|
+
if (v >= min && v <= max) {
|
|
101
|
+
return v;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
throw new Error(`The input string ${str} was not in a correct format.`);
|
|
106
|
+
}
|
|
107
|
+
function tryParse(str, style, unsigned, bitsize, defValue) {
|
|
108
|
+
try {
|
|
109
|
+
defValue.contents = parse(str, style, unsigned, bitsize);
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function op_UnaryNegation_Int32(x) {
|
|
117
|
+
return x === -2147483648 ? x : -x;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export { NumberStyles, getPrefix, getRadix, isValid, op_UnaryNegation_Int32, parse, tryParse };
|