@nfdi4plants/arctrl 3.0.0-beta.4 → 3.0.0-beta.6
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/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +894 -4
- package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +121 -3
- package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +279 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +101 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/Choice.js +187 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +156 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +183 -7
- package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +217 -5
- package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +154 -5
- package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +20 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Collections.js +30 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +68 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +6 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +98 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +18 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +601 -5
- package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +10 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +760 -16
- package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +26 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +18 -8
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +36 -4
- package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +35 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +26 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +355 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +21 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +133 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +543 -8
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +53 -4
- package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +673 -41
- package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +197 -4
- package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +128 -3
- package/dist/ts/node_modules/@fable-org/fable-library-js/SystemException.js +8 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/TimeSpan.js +180 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +20 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +406 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +2 -2
- package/dist/ts/ts/ARC.d.ts +12 -5
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +172 -93
- package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ARC.js +8 -1
- package/dist/ts/ts/Contract/ArcAssay.js +14 -5
- package/dist/ts/ts/Contract/ArcInvestigation.js +10 -1
- package/dist/ts/ts/Contract/ArcRun.js +19 -6
- package/dist/ts/ts/Contract/ArcStudy.js +19 -6
- package/dist/ts/ts/Contract/ArcWorkflow.js +19 -6
- package/dist/ts/ts/Contract/Contract.js +42 -1
- package/dist/ts/ts/Contract/Datamap.js +61 -17
- package/dist/ts/ts/Contract/Git.d.ts.map +1 -1
- package/dist/ts/ts/Contract/Git.js +22 -6
- package/dist/ts/ts/Contract/License.d.ts +5 -0
- package/dist/ts/ts/Contract/License.d.ts.map +1 -0
- package/dist/ts/ts/Contract/License.js +34 -0
- package/dist/ts/ts/Contract/ValidationPackagesConfig.js +31 -6
- package/dist/ts/ts/ContractIO/ContractIO.js +5 -5
- package/dist/ts/ts/ContractIO/FileSystemHelper.js +16 -4
- package/dist/ts/ts/Conversion.js +321 -48
- package/dist/ts/ts/Core/ArcTypes.js +216 -15
- package/dist/ts/ts/Core/Comment.js +11 -1
- package/dist/ts/ts/Core/CommentList.js +77 -2
- package/dist/ts/ts/Core/Conversion.js +123 -43
- package/dist/ts/ts/Core/Data.js +9 -2
- package/dist/ts/ts/Core/DataContext.js +19 -4
- package/dist/ts/ts/Core/DataFile.js +38 -1
- package/dist/ts/ts/Core/DataMap.js +111 -5
- package/dist/ts/ts/Core/Helper/Collections.js +106 -5
- package/dist/ts/ts/Core/Helper/HashCodes.js +4 -4
- package/dist/ts/ts/Core/Helper/Identifier.js +100 -2
- package/dist/ts/ts/Core/Helper/Regex.js +134 -2
- package/dist/ts/ts/Core/Helper/SemVer.js +23 -2
- package/dist/ts/ts/Core/IdentifierSetters.d.ts +3 -1
- package/dist/ts/ts/Core/IdentifierSetters.d.ts.map +1 -1
- package/dist/ts/ts/Core/IdentifierSetters.js +27 -1
- package/dist/ts/ts/Core/OntologyAnnotation.js +4 -1
- package/dist/ts/ts/Core/OntologySourceReference.js +8 -1
- package/dist/ts/ts/Core/Person.js +8 -1
- package/dist/ts/ts/Core/Process/ColumnIndex.js +121 -4
- package/dist/ts/ts/Core/Process/Component.js +37 -4
- package/dist/ts/ts/Core/Process/Factor.js +9 -4
- package/dist/ts/ts/Core/Process/FactorValue.js +61 -4
- package/dist/ts/ts/Core/Process/Material.js +14 -4
- package/dist/ts/ts/Core/Process/MaterialAttribute.js +41 -3
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +67 -4
- package/dist/ts/ts/Core/Process/MaterialType.js +15 -1
- package/dist/ts/ts/Core/Process/Process.js +150 -7
- package/dist/ts/ts/Core/Process/ProcessInput.js +48 -8
- package/dist/ts/ts/Core/Process/ProcessOutput.js +44 -7
- package/dist/ts/ts/Core/Process/ProcessParameterValue.js +10 -5
- package/dist/ts/ts/Core/Process/ProcessSequence.js +127 -6
- package/dist/ts/ts/Core/Process/Protocol.js +78 -4
- package/dist/ts/ts/Core/Process/ProtocolParameter.js +6 -2
- package/dist/ts/ts/Core/Process/Sample.js +21 -3
- package/dist/ts/ts/Core/Process/Source.js +13 -3
- package/dist/ts/ts/Core/Publication.js +8 -1
- package/dist/ts/ts/Core/Table/ArcTable.js +34 -25
- package/dist/ts/ts/Core/Table/ArcTableAux.js +150 -23
- package/dist/ts/ts/Core/Table/ArcTables.js +24 -15
- package/dist/ts/ts/Core/Table/CompositeCell.js +7 -3
- package/dist/ts/ts/Core/Table/CompositeColumn.js +8 -4
- package/dist/ts/ts/Core/Table/CompositeHeader.js +18 -15
- package/dist/ts/ts/Core/Template.js +12 -2
- package/dist/ts/ts/Core/Templates.js +8 -4
- package/dist/ts/ts/Core/Value.js +7 -3
- package/dist/ts/ts/CrossAsync.js +11 -1
- package/dist/ts/ts/FileSystem/Commit.js +18 -0
- package/dist/ts/ts/FileSystem/FileSystem.js +8 -3
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts +1 -0
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/FileSystemTree.js +20 -13
- package/dist/ts/ts/FileSystem/Path.d.ts +2 -0
- package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/Path.js +17 -3
- package/dist/ts/ts/Json/Assay.d.ts +1 -1
- package/dist/ts/ts/Json/Assay.js +28 -28
- package/dist/ts/ts/Json/Comment.js +10 -10
- package/dist/ts/ts/Json/Data.js +6 -6
- package/dist/ts/ts/Json/DataMap/DataContext.js +4 -4
- package/dist/ts/ts/Json/DataMap/DataMap.js +2 -2
- package/dist/ts/ts/Json/Decode.js +14 -9
- package/dist/ts/ts/Json/Encode.js +43 -11
- package/dist/ts/ts/Json/Investigation.js +40 -22
- package/dist/ts/ts/Json/OntologyAnnotation.js +5 -5
- package/dist/ts/ts/Json/OntologySourceReference.js +2 -2
- package/dist/ts/ts/Json/Person.js +26 -26
- package/dist/ts/ts/Json/Process/Component.d.ts +6 -4
- package/dist/ts/ts/Json/Process/Component.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Component.js +27 -7
- package/dist/ts/ts/Json/Process/Factor.js +3 -3
- package/dist/ts/ts/Json/Process/FactorValue.js +8 -8
- package/dist/ts/ts/Json/Process/Material.js +9 -9
- package/dist/ts/ts/Json/Process/MaterialAttribute.js +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +8 -8
- package/dist/ts/ts/Json/Process/Process.js +12 -12
- package/dist/ts/ts/Json/Process/ProcessInput.js +4 -4
- package/dist/ts/ts/Json/Process/ProcessOutput.js +3 -3
- package/dist/ts/ts/Json/Process/ProcessParameterValue.js +11 -8
- package/dist/ts/ts/Json/Process/Protocol.js +13 -13
- package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts +4 -2
- package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/ProtocolParameter.js +21 -12
- package/dist/ts/ts/Json/Process/Sample.js +14 -14
- package/dist/ts/ts/Json/Process/Source.js +9 -9
- package/dist/ts/ts/Json/Process/Value.js +1 -1
- package/dist/ts/ts/Json/PropertyValue.js +1 -1
- package/dist/ts/ts/Json/Publication.js +6 -6
- package/dist/ts/ts/Json/ROCrate/LDContext.js +1 -0
- package/dist/ts/ts/Json/ROCrate/LDGraph.js +3 -3
- package/dist/ts/ts/Json/ROCrate/LDNode.js +19 -19
- package/dist/ts/ts/Json/Run.d.ts +11 -0
- package/dist/ts/ts/Json/Run.d.ts.map +1 -0
- package/dist/ts/ts/Json/Run.js +76 -0
- package/dist/ts/ts/Json/StringTable.js +1 -1
- package/dist/ts/ts/Json/Study.js +34 -34
- package/dist/ts/ts/Json/Table/ArcTable.js +29 -29
- package/dist/ts/ts/Json/Table/CellTable.js +6 -6
- package/dist/ts/ts/Json/Table/CompositeCell.js +4 -4
- package/dist/ts/ts/Json/Table/CompositeHeader.js +2 -2
- package/dist/ts/ts/Json/Table/IOType.js +1 -1
- package/dist/ts/ts/Json/Table/OATable.js +7 -7
- package/dist/ts/ts/Json/Table/Templates.js +92 -6
- package/dist/ts/ts/Json/Workflow.d.ts +11 -0
- package/dist/ts/ts/Json/Workflow.d.ts.map +1 -0
- package/dist/ts/ts/Json/Workflow.js +93 -0
- package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +27 -1
- package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +17 -1
- package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +19 -1
- package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +27 -1
- package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +20 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +18 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +20 -1
- package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +16 -1
- package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +25 -1
- package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +24 -1
- package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +23 -1
- package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +20 -1
- package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +19 -1
- package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +19 -1
- package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +35 -1
- package/dist/ts/ts/Json/context/rocrate/rocrate_context.js +61 -0
- package/dist/ts/ts/Json.d.ts +34 -2
- package/dist/ts/ts/Json.d.ts.map +1 -1
- package/dist/ts/ts/Json.js +129 -2
- package/dist/ts/ts/JsonIO/Assay.js +15 -3
- package/dist/ts/ts/JsonIO/Investigation.js +15 -3
- package/dist/ts/ts/JsonIO/LDObject.js +17 -3
- package/dist/ts/ts/JsonIO/OntologyAnnotation.js +12 -2
- package/dist/ts/ts/JsonIO/Person.d.ts +16 -0
- package/dist/ts/ts/JsonIO/Person.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Person.js +67 -0
- package/dist/ts/ts/JsonIO/Run.d.ts +10 -0
- package/dist/ts/ts/JsonIO/Run.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Run.js +50 -0
- package/dist/ts/ts/JsonIO/Study.js +15 -3
- package/dist/ts/ts/JsonIO/Table/Compression.js +3 -3
- package/dist/ts/ts/JsonIO/Table/Templates.js +60 -5
- package/dist/ts/ts/JsonIO/Workflow.d.ts +10 -0
- package/dist/ts/ts/JsonIO/Workflow.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Workflow.js +50 -0
- package/dist/ts/ts/License.d.ts +39 -0
- package/dist/ts/ts/License.d.ts.map +1 -0
- package/dist/ts/ts/License.js +123 -0
- package/dist/ts/ts/ROCrate/Generic/Comment.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/CreativeWork.d.ts +69 -0
- package/dist/ts/ts/ROCrate/Generic/CreativeWork.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/Generic/CreativeWork.js +450 -0
- package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts +1 -0
- package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/Generic/Dataset.js +27 -1
- package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/File.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/LabProcess.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/Organization.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/Person.js +7 -2
- package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +19 -15
- package/dist/ts/ts/ROCrate/Generic/Sample.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +5 -1
- package/dist/ts/ts/ROCrate/LDContext.js +15 -6
- package/dist/ts/ts/ROCrate/LDObject.js +53 -17
- package/dist/ts/ts/ROCrateIO.d.ts +9 -3
- package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
- package/dist/ts/ts/ROCrateIO.js +67 -14
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +18 -15
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +5 -4
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +40 -17
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +4 -4
- package/dist/ts/ts/Spreadsheet/ArcAssay.js +30 -15
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +32 -18
- package/dist/ts/ts/Spreadsheet/ArcRun.js +23 -8
- package/dist/ts/ts/Spreadsheet/ArcStudy.js +22 -7
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +23 -8
- package/dist/ts/ts/Spreadsheet/CollectionAux.js +75 -5
- package/dist/ts/ts/Spreadsheet/DataMap.js +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +4 -4
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +8 -8
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +4 -4
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +6 -6
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +2 -2
- package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +6 -3
- package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +9 -3
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +6 -4
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +7 -5
- package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +10 -8
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +5 -5
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +6 -6
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +246 -10
- package/dist/ts/ts/Spreadsheet/Metadata/Study.js +19 -13
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +5 -5
- package/dist/ts/ts/Template.Web.js +5 -1
- package/dist/ts/ts/ValidationPackages/ValidationPackage.js +8 -1
- package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +10 -3
- package/dist/ts/ts/WebRequest/WebRequest.Node.js +1 -0
- package/dist/ts/ts/Xlsx.d.ts +21 -1
- package/dist/ts/ts/Xlsx.d.ts.map +1 -1
- package/dist/ts/ts/Xlsx.js +81 -1
- package/dist/ts/ts/Yaml/ValidationPackage.js +18 -2
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +5 -2
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +27 -4
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +14 -3
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +30 -4
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +5 -1
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +65 -2
- package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +257 -1
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +71 -1
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +11 -1
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +188 -11
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +80 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +63 -4
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +17 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/CellBuilder.fs.js +198 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/Expression.fs.js +46 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/RowBuilder.fs.js +131 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/Types.fs.js +307 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +38 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +11 -4
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +12 -5
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +9 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +14 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +31 -1
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Cell.fs.js +65 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Column.fs.js +38 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Row.fs.js +38 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Table.fs.js +34 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +49 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Workbook.fs.js +44 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Worksheet.fs.js +129 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +9 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +12 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +17 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +9 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +12 -5
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +12 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +2 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +42 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Json.fs.js +53 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +9 -9
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +1 -1
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +2 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +5 -1
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +730 -23
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +192 -7
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +45 -1
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +15 -2
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +1383 -15
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +45 -4
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Interop/JsInterop.fs.js +10 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +5 -5
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +16 -6
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +26 -23
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +1 -1
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +8 -8
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +18 -2
- package/package.json +1 -1
- package/dist/ts/ts/FileSystem/DefaultGitattributes.d.ts +0 -2
- package/dist/ts/ts/FileSystem/DefaultGitattributes.d.ts.map +0 -1
- package/dist/ts/ts/FileSystem/DefaultGitattributes.js +0 -3
- package/dist/ts/ts/FileSystem/DefaultGitignore.d.ts +0 -2
- package/dist/ts/ts/FileSystem/DefaultGitignore.d.ts.map +0 -1
- package/dist/ts/ts/FileSystem/DefaultGitignore.js +0 -3
|
@@ -1,16 +1,134 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { protectedCont, protectedBind, CancellationToken, OperationCanceledError, protectedReturn, Trampoline } from './AsyncBuilder.js';
|
|
2
|
+
import { Choice_makeChoice2Of2, Choice_makeChoice1Of2 } from './Choice.js';
|
|
3
|
+
import { TimeoutException } from './SystemException.js';
|
|
2
4
|
|
|
3
5
|
function emptyContinuation(_x) {
|
|
4
6
|
// NOP
|
|
5
7
|
}
|
|
8
|
+
// see AsyncBuilder.Delay
|
|
9
|
+
function delay(generator) {
|
|
10
|
+
return protectedCont((ctx) => generator()(ctx));
|
|
11
|
+
}
|
|
12
|
+
// MakeAsync: body:(AsyncActivation<'T> -> AsyncReturn) -> Async<'T>
|
|
13
|
+
function makeAsync(body) {
|
|
14
|
+
return body;
|
|
15
|
+
}
|
|
16
|
+
// Invoke: computation: Async<'T> -> ctxt:AsyncActivation<'T> -> AsyncReturn
|
|
17
|
+
function invoke(computation, ctx) {
|
|
18
|
+
return computation(ctx);
|
|
19
|
+
}
|
|
20
|
+
// CallThenInvoke: ctxt:AsyncActivation<'T> -> result1:'U -> part2:('U -> Async<'T>) -> AsyncReturn
|
|
21
|
+
function callThenInvoke(ctx, result1, part2) {
|
|
22
|
+
return part2(result1)(ctx);
|
|
23
|
+
}
|
|
24
|
+
// Bind: ctxt:AsyncActivation<'T> -> part1:Async<'U> -> part2:('U -> Async<'T>) -> AsyncReturn
|
|
25
|
+
function bind(ctx, part1, part2) {
|
|
26
|
+
return protectedBind(part1, part2)(ctx);
|
|
27
|
+
}
|
|
28
|
+
function createCancellationToken(arg) {
|
|
29
|
+
const token = new CancellationToken(typeof arg === "boolean" ? arg : false);
|
|
30
|
+
if (typeof arg === "number") {
|
|
31
|
+
setTimeout(() => { token.cancel(); }, arg);
|
|
32
|
+
}
|
|
33
|
+
return token;
|
|
34
|
+
}
|
|
35
|
+
function cancel(token) {
|
|
36
|
+
token.cancel();
|
|
37
|
+
}
|
|
38
|
+
function cancelAfter(token, ms) {
|
|
39
|
+
setTimeout(() => { token.cancel(); }, ms);
|
|
40
|
+
}
|
|
41
|
+
function isCancellationRequested(token) {
|
|
42
|
+
return token != null && token.isCancelled;
|
|
43
|
+
}
|
|
44
|
+
function throwIfCancellationRequested(token) {
|
|
45
|
+
if (token != null && token.isCancelled) {
|
|
46
|
+
throw new Error("Operation is cancelled");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function throwAfter(millisecondsDueTime) {
|
|
50
|
+
return protectedCont((ctx) => {
|
|
51
|
+
let tokenId;
|
|
52
|
+
const timeoutId = setTimeout(() => {
|
|
53
|
+
ctx.cancelToken.removeListener(tokenId);
|
|
54
|
+
ctx.onError(new TimeoutException());
|
|
55
|
+
}, millisecondsDueTime);
|
|
56
|
+
tokenId = ctx.cancelToken.addListener(() => {
|
|
57
|
+
clearTimeout(timeoutId);
|
|
58
|
+
ctx.onCancel(new OperationCanceledError());
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function startChild(computation, ms) {
|
|
63
|
+
if (ms) {
|
|
64
|
+
const computationWithTimeout = protectedBind(parallel2(computation, throwAfter(ms)), xs => protectedReturn(xs[0]));
|
|
65
|
+
return startChild(computationWithTimeout);
|
|
66
|
+
}
|
|
67
|
+
const promise = startAsPromise(computation);
|
|
68
|
+
// JS Promises are hot, computation has already started
|
|
69
|
+
// but we delay returning the result
|
|
70
|
+
return protectedCont((ctx) => protectedReturn(awaitPromise(promise))(ctx));
|
|
71
|
+
}
|
|
6
72
|
function awaitPromise(p) {
|
|
7
73
|
return fromContinuations((conts) => p.then(conts[0]).catch((err) => (err instanceof OperationCanceledError
|
|
8
74
|
? conts[2] : conts[1])(err)));
|
|
9
75
|
}
|
|
76
|
+
function cancellationToken() {
|
|
77
|
+
return protectedCont((ctx) => ctx.onSuccess(ctx.cancelToken));
|
|
78
|
+
}
|
|
10
79
|
const defaultCancellationToken = new CancellationToken();
|
|
80
|
+
function catchAsync(work) {
|
|
81
|
+
return protectedCont((ctx) => {
|
|
82
|
+
work({
|
|
83
|
+
onSuccess: (x) => ctx.onSuccess(Choice_makeChoice1Of2(x)),
|
|
84
|
+
onError: (ex) => ctx.onSuccess(Choice_makeChoice2Of2(ex)),
|
|
85
|
+
onCancel: ctx.onCancel,
|
|
86
|
+
cancelToken: ctx.cancelToken,
|
|
87
|
+
trampoline: ctx.trampoline,
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
11
91
|
function fromContinuations(f) {
|
|
12
92
|
return protectedCont((ctx) => f([ctx.onSuccess, ctx.onError, ctx.onCancel]));
|
|
13
93
|
}
|
|
94
|
+
function ignore(computation) {
|
|
95
|
+
return protectedBind(computation, (_x) => protectedReturn(void 0));
|
|
96
|
+
}
|
|
97
|
+
function parallel(computations) {
|
|
98
|
+
return delay(() => awaitPromise(Promise.all(Array.from(computations, (w) => startAsPromise(w)))));
|
|
99
|
+
}
|
|
100
|
+
function parallel2(a, b) {
|
|
101
|
+
return delay(() => awaitPromise(Promise.all([startAsPromise(a), startAsPromise(b)])));
|
|
102
|
+
}
|
|
103
|
+
function sequential(computations) {
|
|
104
|
+
function _sequential(computations) {
|
|
105
|
+
let pr = Promise.resolve([]);
|
|
106
|
+
for (const c of computations) {
|
|
107
|
+
pr = pr.then(results => startAsPromise(c).then(r => results.concat([r])));
|
|
108
|
+
}
|
|
109
|
+
return pr;
|
|
110
|
+
}
|
|
111
|
+
return delay(() => awaitPromise(_sequential(computations)));
|
|
112
|
+
}
|
|
113
|
+
function sleep(millisecondsDueTime) {
|
|
114
|
+
return protectedCont((ctx) => {
|
|
115
|
+
let tokenId;
|
|
116
|
+
const timeoutId = setTimeout(() => {
|
|
117
|
+
ctx.cancelToken.removeListener(tokenId);
|
|
118
|
+
ctx.onSuccess(void 0);
|
|
119
|
+
}, millisecondsDueTime);
|
|
120
|
+
tokenId = ctx.cancelToken.addListener(() => {
|
|
121
|
+
clearTimeout(timeoutId);
|
|
122
|
+
ctx.onCancel(new OperationCanceledError());
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function start(computation, cancellationToken) {
|
|
127
|
+
return startWithContinuations(computation, emptyContinuation, function (err) { throw err; }, emptyContinuation, cancellationToken);
|
|
128
|
+
}
|
|
129
|
+
function startImmediate(computation, cancellationToken) {
|
|
130
|
+
return start(computation, cancellationToken);
|
|
131
|
+
}
|
|
14
132
|
function startWithContinuations(computation, continuation, exceptionContinuation, cancellationContinuation, cancelToken) {
|
|
15
133
|
const trampoline = new Trampoline();
|
|
16
134
|
computation({
|
|
@@ -22,7 +140,7 @@ function startWithContinuations(computation, continuation, exceptionContinuation
|
|
|
22
140
|
});
|
|
23
141
|
}
|
|
24
142
|
function startAsPromise(computation, cancellationToken) {
|
|
25
|
-
return new Promise((resolve, reject) => startWithContinuations(computation, resolve, reject, reject, defaultCancellationToken));
|
|
143
|
+
return new Promise((resolve, reject) => startWithContinuations(computation, resolve, reject, reject, cancellationToken ? cancellationToken : defaultCancellationToken));
|
|
26
144
|
}
|
|
27
145
|
|
|
28
|
-
export { awaitPromise, defaultCancellationToken, fromContinuations, startAsPromise, startWithContinuations };
|
|
146
|
+
export { awaitPromise, bind, callThenInvoke, cancel, cancelAfter, cancellationToken, catchAsync, createCancellationToken, defaultCancellationToken, fromContinuations, ignore, invoke, isCancellationRequested, makeAsync, parallel, sequential, sleep, start, startAsPromise, startChild, startImmediate, startWithContinuations, throwIfCancellationRequested };
|
|
@@ -1,8 +1,286 @@
|
|
|
1
|
+
import { truncate, fromParts } from './Decimal.js';
|
|
2
|
+
import { bigintHash } from './Util.js';
|
|
3
|
+
|
|
4
|
+
const isBigEndian = false;
|
|
1
5
|
BigInt.prototype.toJSON = function () {
|
|
2
6
|
return `${this.toString()}`;
|
|
3
7
|
};
|
|
8
|
+
const zero = 0n;
|
|
9
|
+
const one = 1n;
|
|
10
|
+
const two = 2n;
|
|
11
|
+
const minusOne = -1n;
|
|
12
|
+
function isBigInt(x) {
|
|
13
|
+
return typeof x === "bigint";
|
|
14
|
+
}
|
|
15
|
+
function hash(x) {
|
|
16
|
+
return bigintHash(x);
|
|
17
|
+
}
|
|
18
|
+
function equals(x, y) {
|
|
19
|
+
return x === y;
|
|
20
|
+
}
|
|
21
|
+
function compare(x, y) {
|
|
22
|
+
return x < y ? -1 : x > y ? 1 : 0;
|
|
23
|
+
}
|
|
24
|
+
function abs(x) { return x < zero ? -x : x; }
|
|
25
|
+
function sign(x) { return x < zero ? -1 : x > zero ? 1 : 0; }
|
|
26
|
+
function max(x, y) { return x > y ? x : y; }
|
|
27
|
+
function min(x, y) { return x < y ? x : y; }
|
|
28
|
+
function maxMagnitude(x, y) { return abs(x) > abs(y) ? x : y; }
|
|
29
|
+
function minMagnitude(x, y) { return abs(x) < abs(y) ? x : y; }
|
|
30
|
+
function clamp(x, min, max) {
|
|
31
|
+
return x < min ? min : x > max ? max : x;
|
|
32
|
+
}
|
|
33
|
+
function add(x, y) { return x + y; }
|
|
34
|
+
function subtract(x, y) { return x - y; }
|
|
35
|
+
function multiply(x, y) { return x * y; }
|
|
36
|
+
function divide(x, y) { return x / y; }
|
|
37
|
+
function remainder(x, y) { return x % y; }
|
|
38
|
+
function negate(x) { return -x; }
|
|
39
|
+
function op_UnaryNegation(x) { return -x; }
|
|
40
|
+
function op_LogicalNot(x) { return ~x; }
|
|
41
|
+
function op_UnaryPlus(x) { return x; }
|
|
42
|
+
function op_Addition(x, y) { return x + y; }
|
|
43
|
+
function op_Subtraction(x, y) { return x - y; }
|
|
44
|
+
function op_Multiply(x, y) { return x * y; }
|
|
45
|
+
function op_Division(x, y) { return x / y; }
|
|
46
|
+
function op_Modulus(x, y) { return x % y; }
|
|
47
|
+
function op_RightShift(x, n) { return x >> BigInt(n); }
|
|
48
|
+
function op_LeftShift(x, n) { return x << BigInt(n); }
|
|
49
|
+
function op_BitwiseAnd(x, y) { return x & y; }
|
|
50
|
+
function op_BitwiseOr(x, y) { return x | y; }
|
|
51
|
+
function op_ExclusiveOr(x, y) { return x ^ y; }
|
|
52
|
+
function op_LessThan(x, y) { return x < y; }
|
|
53
|
+
function op_LessThanOrEqual(x, y) { return x <= y; }
|
|
54
|
+
function op_GreaterThan(x, y) { return x > y; }
|
|
55
|
+
function op_GreaterThanOrEqual(x, y) { return x >= y; }
|
|
56
|
+
function op_Equality(x, y) { return x === y; }
|
|
57
|
+
function op_Inequality(x, y) { return x !== y; }
|
|
58
|
+
function get_Zero() { return zero; }
|
|
59
|
+
function get_One() { return one; }
|
|
60
|
+
function get_MinusOne() { return minusOne; }
|
|
61
|
+
function get_IsZero(x) { return x === zero; }
|
|
62
|
+
function get_IsOne(x) { return x === one; }
|
|
63
|
+
function get_IsEven(x) { return isEvenInteger(x); }
|
|
64
|
+
function get_IsPowerOfTwo(x) { return isPow2(x); }
|
|
65
|
+
function get_Sign(x) { return sign(x); }
|
|
66
|
+
function isNegative(x) { return x < zero; }
|
|
67
|
+
function isPositive(x) { return x > zero; }
|
|
68
|
+
function isEvenInteger(x) { return (x % two) === zero; }
|
|
69
|
+
function isOddInteger(x) { return (x % two) !== zero; }
|
|
70
|
+
function isPow2(x) { return (x & (x - one)) === zero; }
|
|
71
|
+
function fromZero() { return zero; }
|
|
72
|
+
function fromOne() { return one; }
|
|
73
|
+
function fromInt8(n) { return BigInt(n); }
|
|
74
|
+
function fromUInt8(n) { return BigInt(n); }
|
|
75
|
+
function fromInt16(n) { return BigInt(n); }
|
|
76
|
+
function fromUInt16(n) { return BigInt(n); }
|
|
77
|
+
function fromInt32(n) { return BigInt(n); }
|
|
78
|
+
function fromUInt32(n) { return BigInt(n); }
|
|
79
|
+
function fromInt64(n) { return n; }
|
|
80
|
+
function fromUInt64(n) { return n; }
|
|
81
|
+
function fromInt128(n) { return n; }
|
|
82
|
+
function fromUInt128(n) { return n; }
|
|
83
|
+
function fromNativeInt(n) { return n; }
|
|
84
|
+
function fromUNativeInt(n) { return n; }
|
|
85
|
+
function fromFloat16(n) { return BigInt(Math.trunc(n)); }
|
|
86
|
+
function fromFloat32(n) { return BigInt(Math.trunc(n)); }
|
|
87
|
+
function fromFloat64(n) { return BigInt(Math.trunc(n)); }
|
|
88
|
+
function fromDecimal(d) { return BigInt(truncate(d).toString()); }
|
|
89
|
+
function fromBigInt(x) { return x; }
|
|
90
|
+
function fromBoolean(b) { return BigInt(b); }
|
|
91
|
+
function fromChar(c) { return BigInt(c.charCodeAt(0)); }
|
|
4
92
|
function fromString(s) { return BigInt(s); }
|
|
93
|
+
function fromByteArray(bytes) {
|
|
94
|
+
return fromSignedBytes(bytes, isBigEndian);
|
|
95
|
+
}
|
|
96
|
+
function toByteArray(value) {
|
|
97
|
+
return toSignedBytes(value, isBigEndian);
|
|
98
|
+
}
|
|
99
|
+
function toInt8(x) { return Number(BigInt.asIntN(8, x)); }
|
|
100
|
+
function toUInt8(x) { return Number(BigInt.asUintN(8, x)); }
|
|
101
|
+
function toInt16(x) { return Number(BigInt.asIntN(16, x)); }
|
|
102
|
+
function toUInt16(x) { return Number(BigInt.asUintN(16, x)); }
|
|
103
|
+
function toInt32(x) { return Number(BigInt.asIntN(32, x)); }
|
|
104
|
+
function toUInt32(x) { return Number(BigInt.asUintN(32, x)); }
|
|
5
105
|
function toInt64(x) { return BigInt.asIntN(64, x); }
|
|
6
106
|
function toUInt64(x) { return BigInt.asUintN(64, x); }
|
|
107
|
+
function toInt128(x) { return BigInt.asIntN(128, x); }
|
|
108
|
+
function toUInt128(x) { return BigInt.asUintN(128, x); }
|
|
109
|
+
function toNativeInt(x) { return BigInt.asIntN(64, x); }
|
|
110
|
+
function toUNativeInt(x) { return BigInt.asUintN(64, x); }
|
|
111
|
+
function toFloat16(x) { return Number(x); }
|
|
112
|
+
function toFloat32(x) { return Number(x); }
|
|
113
|
+
function toFloat64(x) { return Number(x); }
|
|
114
|
+
function toDecimal(x) {
|
|
115
|
+
const isNegative = x < zero;
|
|
116
|
+
const bits = abs(x);
|
|
117
|
+
const low = Number(BigInt.asUintN(32, bits));
|
|
118
|
+
const mid = Number(BigInt.asUintN(32, bits >> 32n));
|
|
119
|
+
const high = Number(BigInt.asUintN(32, bits >> 64n));
|
|
120
|
+
const scale = 0;
|
|
121
|
+
return fromParts(low, mid, high, isNegative, scale);
|
|
122
|
+
}
|
|
123
|
+
function toBigInt(x) { return x; }
|
|
124
|
+
function toBoolean(x) { return x !== zero; }
|
|
125
|
+
function toChar(x) {
|
|
126
|
+
return String.fromCharCode(toUInt16(x));
|
|
127
|
+
}
|
|
128
|
+
function toString(x) { return x.toString(); }
|
|
129
|
+
function tryParse(s, res) {
|
|
130
|
+
try {
|
|
131
|
+
res.contents = BigInt(s);
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function parse(s) {
|
|
139
|
+
return BigInt(s);
|
|
140
|
+
}
|
|
141
|
+
function pow(x, n) {
|
|
142
|
+
return x ** BigInt(n);
|
|
143
|
+
}
|
|
144
|
+
function modPow(x, e, m) {
|
|
145
|
+
return (x ** e) % m;
|
|
146
|
+
}
|
|
147
|
+
function divRem(x, y, out) {
|
|
148
|
+
const div = x / y;
|
|
149
|
+
const rem = x % y;
|
|
150
|
+
if (out === void 0) {
|
|
151
|
+
return [div, rem];
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
out.contents = rem;
|
|
155
|
+
return div;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function greatestCommonDivisor(x, y) {
|
|
159
|
+
while (y > zero) {
|
|
160
|
+
const q = x / y;
|
|
161
|
+
const r = x - q * y;
|
|
162
|
+
x = y;
|
|
163
|
+
y = r;
|
|
164
|
+
}
|
|
165
|
+
return x;
|
|
166
|
+
}
|
|
167
|
+
function getBitLength(x) {
|
|
168
|
+
return fromFloat64(x === zero ? 1 : log2(abs(x)) + 1);
|
|
169
|
+
}
|
|
170
|
+
function log2(x) {
|
|
171
|
+
const n = Number(x);
|
|
172
|
+
if (Number.isFinite(n))
|
|
173
|
+
return Math.log2(n); // fast path
|
|
174
|
+
if (x < zero)
|
|
175
|
+
return Number.NaN;
|
|
176
|
+
let shift = one;
|
|
177
|
+
while (x >= (one << shift)) {
|
|
178
|
+
shift = shift << one;
|
|
179
|
+
}
|
|
180
|
+
let log = zero;
|
|
181
|
+
while (shift > one) {
|
|
182
|
+
shift = shift >> one;
|
|
183
|
+
if (x >= (one << shift)) {
|
|
184
|
+
log = log + shift;
|
|
185
|
+
x = x >> shift;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return Number(log);
|
|
189
|
+
}
|
|
190
|
+
function log10(x) {
|
|
191
|
+
return log2(x) * Math.log10(2);
|
|
192
|
+
}
|
|
193
|
+
function ln(x) {
|
|
194
|
+
return log2(x) * Math.log(2);
|
|
195
|
+
}
|
|
196
|
+
function log(x, base) {
|
|
197
|
+
return log2(x) / Math.log2(base);
|
|
198
|
+
}
|
|
199
|
+
function ilog2(x) {
|
|
200
|
+
return BigInt(log2(x));
|
|
201
|
+
}
|
|
202
|
+
// export function copySign
|
|
203
|
+
// export function createChecked
|
|
204
|
+
// export function createSaturating
|
|
205
|
+
// export function createTruncating
|
|
206
|
+
// export function getByteCount
|
|
207
|
+
// export function leadingZeroCount
|
|
208
|
+
// export function popCount
|
|
209
|
+
// export function rotateLeft
|
|
210
|
+
// export function rotateRight
|
|
211
|
+
// export function trailingZeroCount
|
|
212
|
+
// export function tryFormat
|
|
213
|
+
// export function tryWriteBytes
|
|
214
|
+
// -------------------------------------------------
|
|
215
|
+
// Binary serialization
|
|
216
|
+
// -------------------------------------------------
|
|
217
|
+
const hexCodes = new Uint8Array([48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102]);
|
|
218
|
+
function fromHexCode(code) {
|
|
219
|
+
if (48 <= code && code <= 57)
|
|
220
|
+
return code - 48;
|
|
221
|
+
if (97 <= code && code <= 102)
|
|
222
|
+
return code - 97 + 10;
|
|
223
|
+
if (65 <= code && code <= 70)
|
|
224
|
+
return code - 65 + 10;
|
|
225
|
+
throw Error(`Invalid hex code: ${code}`);
|
|
226
|
+
}
|
|
227
|
+
function toSignedBytes(x, isBigEndian) {
|
|
228
|
+
const isNeg = x < 0n;
|
|
229
|
+
if (isNeg) {
|
|
230
|
+
const len = log2(-x);
|
|
231
|
+
const bits = len + (8 - len % 8);
|
|
232
|
+
const pow2 = (1n << BigInt(bits));
|
|
233
|
+
x = x + pow2; // two's complement
|
|
234
|
+
}
|
|
235
|
+
const hex = x.toString(16);
|
|
236
|
+
const len = hex.length;
|
|
237
|
+
const odd = len % 2;
|
|
238
|
+
const first = hex.charCodeAt(0);
|
|
239
|
+
const isLow = 48 <= first && first <= 55; // 0..7
|
|
240
|
+
const start = (isNeg && isLow) || (!isNeg && !isLow) ? 1 : 0;
|
|
241
|
+
const bytes = new Uint8Array(start + (len + odd) / 2);
|
|
242
|
+
const inc = isBigEndian ? 1 : -1;
|
|
243
|
+
let pos = isBigEndian ? 0 : bytes.length - 1;
|
|
244
|
+
if (start > 0) {
|
|
245
|
+
bytes[pos] = isNeg ? 255 : 0;
|
|
246
|
+
pos += inc;
|
|
247
|
+
}
|
|
248
|
+
if (odd > 0) {
|
|
249
|
+
bytes[pos] = fromHexCode(first);
|
|
250
|
+
pos += inc;
|
|
251
|
+
}
|
|
252
|
+
for (let i = odd; i < len; i += 2, pos += inc) {
|
|
253
|
+
const a = fromHexCode(hex.charCodeAt(i));
|
|
254
|
+
const b = fromHexCode(hex.charCodeAt(i + 1));
|
|
255
|
+
bytes[pos] = (a << 4) | b;
|
|
256
|
+
}
|
|
257
|
+
return bytes;
|
|
258
|
+
}
|
|
259
|
+
function fromSignedBytes(bytes, isBigEndian) {
|
|
260
|
+
if (bytes == null) {
|
|
261
|
+
throw new Error("bytes is null");
|
|
262
|
+
}
|
|
263
|
+
const len = bytes.length;
|
|
264
|
+
const first = isBigEndian ? 0 : len - 1;
|
|
265
|
+
const isNeg = bytes[first] > 127;
|
|
266
|
+
const codes = new Uint16Array(len * 2 + 2);
|
|
267
|
+
codes[0] = 48; // 0
|
|
268
|
+
codes[1] = 120; // x
|
|
269
|
+
const inc = isBigEndian ? 1 : -1;
|
|
270
|
+
let pos = isBigEndian ? 0 : len - 1;
|
|
271
|
+
for (let i = 0; i < bytes.length; i++, pos += inc) {
|
|
272
|
+
const byte = bytes[pos];
|
|
273
|
+
codes[2 * i + 2] = hexCodes[byte >> 4];
|
|
274
|
+
codes[2 * i + 3] = hexCodes[byte & 15];
|
|
275
|
+
}
|
|
276
|
+
const str = String.fromCharCode.apply(null, codes);
|
|
277
|
+
let x = BigInt(str);
|
|
278
|
+
if (isNeg) {
|
|
279
|
+
const bits = len * 8;
|
|
280
|
+
const pow2 = (1n << BigInt(bits));
|
|
281
|
+
x = x - pow2; // two's complement
|
|
282
|
+
}
|
|
283
|
+
return x;
|
|
284
|
+
}
|
|
7
285
|
|
|
8
|
-
export { fromString, toInt64, toUInt64 };
|
|
286
|
+
export { abs, add, clamp, compare, divRem, divide, equals, fromBigInt, fromBoolean, fromByteArray, fromChar, fromDecimal, fromFloat16, fromFloat32, fromFloat64, fromInt128, fromInt16, fromInt32, fromInt64, fromInt8, fromNativeInt, fromOne, fromString, fromUInt128, fromUInt16, fromUInt32, fromUInt64, fromUInt8, fromUNativeInt, fromZero, getBitLength, get_IsEven, get_IsOne, get_IsPowerOfTwo, get_IsZero, get_MinusOne, get_One, get_Sign, get_Zero, greatestCommonDivisor, hash, ilog2, isBigInt, isEvenInteger, isNegative, isOddInteger, isPositive, isPow2, ln, log, log10, log2, max, maxMagnitude, min, minMagnitude, modPow, multiply, negate, op_Addition, op_BitwiseAnd, op_BitwiseOr, op_Division, op_Equality, op_ExclusiveOr, op_GreaterThan, op_GreaterThanOrEqual, op_Inequality, op_LeftShift, op_LessThan, op_LessThanOrEqual, op_LogicalNot, op_Modulus, op_Multiply, op_RightShift, op_Subtraction, op_UnaryNegation, op_UnaryPlus, parse, pow, remainder, sign, subtract, toBigInt, toBoolean, toByteArray, toChar, toDecimal, toFloat16, toFloat32, toFloat64, toInt128, toInt16, toInt32, toInt64, toInt8, toNativeInt, toString, toUInt128, toUInt16, toUInt32, toUInt64, toUInt8, toUNativeInt, tryParse };
|
|
@@ -31,6 +31,7 @@ function getCategoryFunc() {
|
|
|
31
31
|
return categories$1[lo];
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
+
const isControlMask = 1 << 14 /* UnicodeCategory.Control */;
|
|
34
35
|
const isDigitMask = 1 << 8 /* UnicodeCategory.DecimalDigitNumber */;
|
|
35
36
|
const isLetterMask = 0
|
|
36
37
|
| 1 << 0 /* UnicodeCategory.UppercaseLetter */
|
|
@@ -38,21 +39,66 @@ const isLetterMask = 0
|
|
|
38
39
|
| 1 << 2 /* UnicodeCategory.TitlecaseLetter */
|
|
39
40
|
| 1 << 3 /* UnicodeCategory.ModifierLetter */
|
|
40
41
|
| 1 << 4 /* UnicodeCategory.OtherLetter */;
|
|
42
|
+
const isLetterOrDigitMask = isLetterMask | isDigitMask;
|
|
43
|
+
const isUpperMask = 1 << 0 /* UnicodeCategory.UppercaseLetter */;
|
|
44
|
+
const isLowerMask = 1 << 1 /* UnicodeCategory.LowercaseLetter */;
|
|
45
|
+
const isNumberMask = 0
|
|
46
|
+
| 1 << 8 /* UnicodeCategory.DecimalDigitNumber */
|
|
47
|
+
| 1 << 9 /* UnicodeCategory.LetterNumber */
|
|
48
|
+
| 1 << 10 /* UnicodeCategory.OtherNumber */;
|
|
49
|
+
const isPunctuationMask = 0
|
|
50
|
+
| 1 << 18 /* UnicodeCategory.ConnectorPunctuation */
|
|
51
|
+
| 1 << 19 /* UnicodeCategory.DashPunctuation */
|
|
52
|
+
| 1 << 20 /* UnicodeCategory.OpenPunctuation */
|
|
53
|
+
| 1 << 21 /* UnicodeCategory.ClosePunctuation */
|
|
54
|
+
| 1 << 22 /* UnicodeCategory.InitialQuotePunctuation */
|
|
55
|
+
| 1 << 23 /* UnicodeCategory.FinalQuotePunctuation */
|
|
56
|
+
| 1 << 24 /* UnicodeCategory.OtherPunctuation */;
|
|
57
|
+
const isSeparatorMask = 0
|
|
58
|
+
| 1 << 11 /* UnicodeCategory.SpaceSeparator */
|
|
59
|
+
| 1 << 12 /* UnicodeCategory.LineSeparator */
|
|
60
|
+
| 1 << 13 /* UnicodeCategory.ParagraphSeparator */;
|
|
61
|
+
const isSymbolMask = 0
|
|
62
|
+
| 1 << 25 /* UnicodeCategory.MathSymbol */
|
|
63
|
+
| 1 << 26 /* UnicodeCategory.CurrencySymbol */
|
|
64
|
+
| 1 << 27 /* UnicodeCategory.ModifierSymbol */
|
|
65
|
+
| 1 << 28 /* UnicodeCategory.OtherSymbol */;
|
|
66
|
+
const isWhiteSpaceMask = 0
|
|
67
|
+
| 1 << 11 /* UnicodeCategory.SpaceSeparator */
|
|
68
|
+
| 1 << 12 /* UnicodeCategory.LineSeparator */
|
|
69
|
+
| 1 << 13 /* UnicodeCategory.ParagraphSeparator */;
|
|
41
70
|
const unicodeCategoryFunc = getCategoryFunc();
|
|
42
71
|
function charCodeAt(s, index) {
|
|
43
|
-
if (index < s.length) {
|
|
72
|
+
if (index >= 0 && index < s.length) {
|
|
44
73
|
return s.charCodeAt(index);
|
|
45
74
|
}
|
|
46
75
|
else {
|
|
47
76
|
throw new Error("Index out of range.");
|
|
48
77
|
}
|
|
49
78
|
}
|
|
79
|
+
const getUnicodeCategory = (s) => getUnicodeCategory2(s, 0);
|
|
80
|
+
const isControl = (s) => isControl2(s, 0);
|
|
50
81
|
const isDigit = (s) => isDigit2(s, 0);
|
|
51
82
|
const isLetter = (s) => isLetter2(s, 0);
|
|
83
|
+
const isLetterOrDigit = (s) => isLetterOrDigit2(s, 0);
|
|
84
|
+
const isUpper = (s) => isUpper2(s, 0);
|
|
85
|
+
const isLower = (s) => isLower2(s, 0);
|
|
86
|
+
const isNumber = (s) => isNumber2(s, 0);
|
|
87
|
+
const isPunctuation = (s) => isPunctuation2(s, 0);
|
|
88
|
+
const isSeparator = (s) => isSeparator2(s, 0);
|
|
89
|
+
const isSymbol = (s) => isSymbol2(s, 0);
|
|
90
|
+
const isWhiteSpace = (s) => isWhiteSpace2(s, 0);
|
|
91
|
+
const isHighSurrogate = (s) => isHighSurrogate2(s, 0);
|
|
92
|
+
const isLowSurrogate = (s) => isLowSurrogate2(s, 0);
|
|
93
|
+
const isSurrogate = (s) => isSurrogate2(s, 0);
|
|
52
94
|
function getUnicodeCategory2(s, index) {
|
|
53
95
|
const cp = charCodeAt(s, index);
|
|
54
96
|
return unicodeCategoryFunc(cp);
|
|
55
97
|
}
|
|
98
|
+
function isControl2(s, index) {
|
|
99
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
100
|
+
return (test & isControlMask) !== 0;
|
|
101
|
+
}
|
|
56
102
|
function isDigit2(s, index) {
|
|
57
103
|
const test = 1 << getUnicodeCategory2(s, index);
|
|
58
104
|
return (test & isDigitMask) !== 0;
|
|
@@ -61,6 +107,59 @@ function isLetter2(s, index) {
|
|
|
61
107
|
const test = 1 << getUnicodeCategory2(s, index);
|
|
62
108
|
return (test & isLetterMask) !== 0;
|
|
63
109
|
}
|
|
110
|
+
function isLetterOrDigit2(s, index) {
|
|
111
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
112
|
+
return (test & isLetterOrDigitMask) !== 0;
|
|
113
|
+
}
|
|
114
|
+
function isUpper2(s, index) {
|
|
115
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
116
|
+
return (test & isUpperMask) !== 0;
|
|
117
|
+
}
|
|
118
|
+
function isLower2(s, index) {
|
|
119
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
120
|
+
return (test & isLowerMask) !== 0;
|
|
121
|
+
}
|
|
122
|
+
function isNumber2(s, index) {
|
|
123
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
124
|
+
return (test & isNumberMask) !== 0;
|
|
125
|
+
}
|
|
126
|
+
function isPunctuation2(s, index) {
|
|
127
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
128
|
+
return (test & isPunctuationMask) !== 0;
|
|
129
|
+
}
|
|
130
|
+
function isSeparator2(s, index) {
|
|
131
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
132
|
+
return (test & isSeparatorMask) !== 0;
|
|
133
|
+
}
|
|
134
|
+
function isSymbol2(s, index) {
|
|
135
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
136
|
+
return (test & isSymbolMask) !== 0;
|
|
137
|
+
}
|
|
138
|
+
function isWhiteSpace2(s, index) {
|
|
139
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
140
|
+
if ((test & isWhiteSpaceMask) !== 0) {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
const cp = charCodeAt(s, index);
|
|
144
|
+
return (0x09 <= cp && cp <= 0x0D) || cp === 0x85 || cp === 0xA0;
|
|
145
|
+
}
|
|
146
|
+
function isHighSurrogate2(s, index) {
|
|
147
|
+
const cp = charCodeAt(s, index);
|
|
148
|
+
return (0xD800 <= cp && cp <= 0xDBFF);
|
|
149
|
+
}
|
|
150
|
+
function isLowSurrogate2(s, index) {
|
|
151
|
+
const cp = charCodeAt(s, index);
|
|
152
|
+
return (0xDC00 <= cp && cp <= 0xDFFF);
|
|
153
|
+
}
|
|
154
|
+
function isSurrogate2(s, index) {
|
|
155
|
+
const cp = charCodeAt(s, index);
|
|
156
|
+
return (0xD800 <= cp && cp <= 0xDFFF);
|
|
157
|
+
}
|
|
158
|
+
function isSurrogatePair(s, index) {
|
|
159
|
+
return typeof index === "number"
|
|
160
|
+
? isHighSurrogate2(s, index) && isLowSurrogate2(s, index + 1)
|
|
161
|
+
: isHighSurrogate(s) && isLowSurrogate(index);
|
|
162
|
+
}
|
|
64
163
|
function parse(input) {
|
|
65
164
|
if (input.length === 1) {
|
|
66
165
|
return input[0];
|
|
@@ -70,4 +169,4 @@ function parse(input) {
|
|
|
70
169
|
}
|
|
71
170
|
}
|
|
72
171
|
|
|
73
|
-
export { getUnicodeCategory2, isDigit, isDigit2, isLetter, isLetter2, parse };
|
|
172
|
+
export { getUnicodeCategory, getUnicodeCategory2, isControl, isControl2, isDigit, isDigit2, isHighSurrogate, isHighSurrogate2, isLetter, isLetter2, isLetterOrDigit, isLetterOrDigit2, isLowSurrogate, isLowSurrogate2, isLower, isLower2, isNumber, isNumber2, isPunctuation, isPunctuation2, isSeparator, isSeparator2, isSurrogate, isSurrogate2, isSurrogatePair, isSymbol, isSymbol2, isUpper, isUpper2, isWhiteSpace, isWhiteSpace2, parse };
|