@fossa-app/bridge 0.1.5 → 0.1.7
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/Models/ApiModels.d.ts +199 -0
- package/dist/Models/ApiModels.js +350 -0
- package/dist/Models/ApiModels.js.map +1 -0
- package/dist/Services/Clients/BranchClient.d.ts +16 -0
- package/dist/Services/Clients/BranchClient.js +63 -0
- package/dist/Services/Clients/BranchClient.js.map +1 -0
- package/dist/Services/Clients/CompanyClient.d.ts +13 -0
- package/dist/Services/Clients/CompanyClient.js +36 -0
- package/dist/Services/Clients/CompanyClient.js.map +1 -0
- package/dist/Services/Clients/CompanyLicenseClient.d.ts +10 -0
- package/dist/Services/Clients/CompanyLicenseClient.js +28 -0
- package/dist/Services/Clients/CompanyLicenseClient.js.map +1 -0
- package/dist/Services/Clients/CompanySettingsClient.d.ts +13 -0
- package/dist/Services/Clients/CompanySettingsClient.js +36 -0
- package/dist/Services/Clients/CompanySettingsClient.js.map +1 -0
- package/dist/Services/Clients/DepartmentClient.d.ts +16 -0
- package/dist/Services/Clients/DepartmentClient.js +63 -0
- package/dist/Services/Clients/DepartmentClient.js.map +1 -0
- package/dist/Services/Clients/EmployeeClient.d.ts +18 -0
- package/dist/Services/Clients/EmployeeClient.js +87 -0
- package/dist/Services/Clients/EmployeeClient.js.map +1 -0
- package/dist/Services/Clients/IdentityClient.d.ts +9 -0
- package/dist/Services/Clients/IdentityClient.js +25 -0
- package/dist/Services/Clients/IdentityClient.js.map +1 -0
- package/dist/Services/Clients/SystemLicenseClient.d.ts +9 -0
- package/dist/Services/Clients/SystemLicenseClient.js +24 -0
- package/dist/Services/Clients/SystemLicenseClient.js.map +1 -0
- package/dist/Services/Endpoints.d.ts +10 -0
- package/dist/Services/Endpoints.js +14 -0
- package/dist/Services/Endpoints.js.map +1 -0
- package/dist/Services/IHttpTransport.d.ts +6 -0
- package/dist/Services/IHttpTransport.js +3 -0
- package/dist/Services/IHttpTransport.js.map +1 -0
- package/dist/Services/UrlHelpers.d.ts +1 -0
- package/dist/Services/UrlHelpers.js +19 -0
- package/dist/Services/UrlHelpers.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.d.ts +125 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.js +1371 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.d.ts +27 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.js +172 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.d.ts +59 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.js +194 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.d.ts +129 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.js +428 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.d.ts +27 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.js +165 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.d.ts +3 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.js +27 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.d.ts +66 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.js +271 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.d.ts +121 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.js +231 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.d.ts +8 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.js +192 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.d.ts +9 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.js +26 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.d.ts +70 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.js +812 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.d.ts +65 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.js +345 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.d.ts +18 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.js +143 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.d.ts +63 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.js +322 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.d.ts +11 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.js +60 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.d.ts +12 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.js +178 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.d.ts +31 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.js +109 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.d.ts +7 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.js +53 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.d.ts +12 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.js +38 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.d.ts +30 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.js +185 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.d.ts +45 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.js +33 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.d.ts +10 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.js +152 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.d.ts +29 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.js +148 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.d.ts +143 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.js +1404 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.d.ts +3 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.js +52 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.d.ts +25 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.js +104 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.d.ts +178 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.js +1525 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.d.ts +12 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.js +141 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.d.ts +52 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.js +355 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.d.ts +39 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.js +246 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.d.ts +3 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.js +18 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.d.ts +20 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.js +87 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.d.ts +32 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.js +128 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.d.ts +29 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.js +127 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.d.ts +38 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.js +186 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.d.ts +12 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.js +56 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.d.ts +119 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.js +529 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.d.ts +10 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.js +144 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.d.ts +38 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.js +191 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.d.ts +164 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.js +1501 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.d.ts +18 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.js +129 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.d.ts +190 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.js +1931 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.d.ts +59 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.js +677 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.d.ts +85 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.js +390 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.d.ts +40 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.js +204 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.d.ts +121 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.js +367 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.d.ts +15 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.js +138 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.d.ts +35 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.js +210 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.d.ts +19 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.js +72 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.d.ts +51 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.js +205 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.d.ts +2 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.js +8 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.d.ts +32 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.js +170 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.js.map +1 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.d.ts +243 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.js +903 -0
- package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.js.map +1 -0
- package/package.json +5 -2
- package/.build.ps1 +0 -307
- package/.github/dependabot.yml +0 -38
- package/.github/release-drafter.yml +0 -52
- package/.github/workflows/cicd.yml +0 -87
- package/.github/workflows/lint.yml +0 -34
- package/.github/workflows/release-drafter.yml +0 -27
- package/Fossa.Bridge.slnx +0 -8
- package/build.ps1 +0 -11
- package/dotnet-tools.json +0 -27
- package/format.ps1 +0 -11
- package/gig.ps1 +0 -16
- package/global.json +0 -6
- package/lint.ps1 +0 -20
- package/pack.ps1 +0 -11
- package/publish.ps1 +0 -11
- package/restore.ps1 +0 -11
- package/src/Fossa.Bridge/Fossa.Bridge.fsproj +0 -27
- package/src/Fossa.Bridge/Models/ApiModels.fs +0 -142
- package/src/Fossa.Bridge/Services/Clients/BranchClient.fs +0 -46
- package/src/Fossa.Bridge/Services/Clients/CompanyClient.fs +0 -24
- package/src/Fossa.Bridge/Services/Clients/CompanyLicenseClient.fs +0 -17
- package/src/Fossa.Bridge/Services/Clients/CompanySettingsClient.fs +0 -24
- package/src/Fossa.Bridge/Services/Clients/DepartmentClient.fs +0 -48
- package/src/Fossa.Bridge/Services/Clients/EmployeeClient.fs +0 -71
- package/src/Fossa.Bridge/Services/Clients/IdentityClient.fs +0 -9
- package/src/Fossa.Bridge/Services/Clients/SystemLicenseClient.fs +0 -11
- package/src/Fossa.Bridge/Services/Endpoints.fs +0 -13
- package/src/Fossa.Bridge/Services/IHttpTransport.fs +0 -10
- package/src/Fossa.Bridge/Services/UrlHelpers.fs +0 -18
- package/src/Fossa.Bridge/bin/Release/net8.0/Fossa.Bridge.deps.json +0 -98
- package/src/Fossa.Bridge/bin/Release/net8.0/Fossa.Bridge.fable-temp.deps.json +0 -41
- package/src/Fossa.Bridge/bin/Release/net8.0/Fossa.Bridge.xml +0 -6
- package/src/Fossa.Bridge/obj/Fossa.Bridge.fable-temp.csproj.nuget.dgspec.json +0 -83
- package/src/Fossa.Bridge/obj/Fossa.Bridge.fable-temp.csproj.nuget.g.props +0 -25
- package/src/Fossa.Bridge/obj/Fossa.Bridge.fable-temp.csproj.nuget.g.targets +0 -2
- package/src/Fossa.Bridge/obj/Fossa.Bridge.fsproj.nuget.dgspec.json +0 -86
- package/src/Fossa.Bridge/obj/Fossa.Bridge.fsproj.nuget.g.props +0 -29
- package/src/Fossa.Bridge/obj/Fossa.Bridge.fsproj.nuget.g.targets +0 -2
- package/src/Fossa.Bridge/obj/Release/Fossa.Bridge.0.1.5.nuspec +0 -20
- package/src/Fossa.Bridge/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +0 -4
- package/src/Fossa.Bridge/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.fs +0 -3
- package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.AssemblyInfo.fs +0 -18
- package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.fable-temp.AssemblyInfo.cs +0 -23
- package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.fable-temp.GeneratedMSBuildEditorConfig.editorconfig +0 -17
- package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.fable-temp.csproj.FileListAbsolute.txt +0 -4
- package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.fsproj.FileListAbsolute.txt +0 -14
- package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.sourcelink.json +0 -1
- package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.xml +0 -6
- package/src/Fossa.Bridge/obj/Release/net8.0/ILLink.Substitutions.xml +0 -15
- package/src/Fossa.Bridge/obj/project.assets.json +0 -230
- package/test.ps1 +0 -11
- package/tests/Fossa.Bridge.Tests/Fossa.Bridge.Tests.fsproj +0 -19
- package/tests/Fossa.Bridge.Tests/Main.fs +0 -7
- package/tests/Fossa.Bridge.Tests/UrlHelpersTests.fs +0 -33
- package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/.msCoverageSourceRootsMapping_Fossa.Bridge.Tests +0 -0
- package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/Fossa.Bridge.Tests +0 -0
- package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/Fossa.Bridge.Tests.deps.json +0 -806
- package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/Fossa.Bridge.Tests.runtimeconfig.json +0 -14
- package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/Fossa.Bridge.xml +0 -6
- package/tests/Fossa.Bridge.Tests/obj/Fossa.Bridge.Tests.fsproj.nuget.dgspec.json +0 -182
- package/tests/Fossa.Bridge.Tests/obj/Fossa.Bridge.Tests.fsproj.nuget.g.props +0 -30
- package/tests/Fossa.Bridge.Tests/obj/Fossa.Bridge.Tests.fsproj.nuget.g.targets +0 -11
- package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.fs +0 -3
- package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/Fossa.Br.E9949494.Up2Date +0 -0
- package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/Fossa.Bridge.Tests.AssemblyInfo.fs +0 -17
- package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/Fossa.Bridge.Tests.fsproj.FileListAbsolute.txt +0 -190
- package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/Fossa.Bridge.Tests.sourcelink.json +0 -1
- package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/ILLink.Substitutions.xml +0 -15
- package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/apphost +0 -0
- package/tests/Fossa.Bridge.Tests/obj/project.assets.json +0 -2023
- package/trigger.ps1 +0 -32
- package/tsconfig.json +0 -16
- package/version.ps1 +0 -11
|
@@ -0,0 +1,1501 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CachedSeq$1 = exports.Enumerator_FromFunctions$1 = exports.Enumerator_Seq = exports.SR_resetNotSupported = exports.SR_notEnoughElements = exports.SR_keyNotFoundAlt = exports.SR_inputSequenceTooLong = exports.SR_inputSequenceEmpty = exports.SR_enumerationNotStarted = exports.SR_enumerationAlreadyFinished = void 0;
|
|
4
|
+
exports.Enumerator_noReset = Enumerator_noReset;
|
|
5
|
+
exports.Enumerator_notStarted = Enumerator_notStarted;
|
|
6
|
+
exports.Enumerator_alreadyFinished = Enumerator_alreadyFinished;
|
|
7
|
+
exports.Enumerator_Seq_$reflection = Enumerator_Seq_$reflection;
|
|
8
|
+
exports.Enumerator_Seq_$ctor_673A07F2 = Enumerator_Seq_$ctor_673A07F2;
|
|
9
|
+
exports.Enumerator_FromFunctions$1_$reflection = Enumerator_FromFunctions$1_$reflection;
|
|
10
|
+
exports.Enumerator_FromFunctions$1_$ctor_58C54629 = Enumerator_FromFunctions$1_$ctor_58C54629;
|
|
11
|
+
exports.Enumerator_cast = Enumerator_cast;
|
|
12
|
+
exports.Enumerator_concat = Enumerator_concat;
|
|
13
|
+
exports.Enumerator_enumerateThenFinally = Enumerator_enumerateThenFinally;
|
|
14
|
+
exports.Enumerator_generateWhileSome = Enumerator_generateWhileSome;
|
|
15
|
+
exports.Enumerator_unfold = Enumerator_unfold;
|
|
16
|
+
exports.indexNotFound = indexNotFound;
|
|
17
|
+
exports.mkSeq = mkSeq;
|
|
18
|
+
exports.ofSeq = ofSeq;
|
|
19
|
+
exports.delay = delay;
|
|
20
|
+
exports.concat = concat;
|
|
21
|
+
exports.unfold = unfold;
|
|
22
|
+
exports.empty = empty;
|
|
23
|
+
exports.singleton = singleton;
|
|
24
|
+
exports.ofArray = ofArray;
|
|
25
|
+
exports.toArray = toArray;
|
|
26
|
+
exports.ofList = ofList;
|
|
27
|
+
exports.toList = toList;
|
|
28
|
+
exports.generate = generate;
|
|
29
|
+
exports.generateIndexed = generateIndexed;
|
|
30
|
+
exports.append = append;
|
|
31
|
+
exports.cast = cast;
|
|
32
|
+
exports.choose = choose;
|
|
33
|
+
exports.compareWith = compareWith;
|
|
34
|
+
exports.contains = contains;
|
|
35
|
+
exports.enumerateFromFunctions = enumerateFromFunctions;
|
|
36
|
+
exports.enumerateThenFinally = enumerateThenFinally;
|
|
37
|
+
exports.enumerateUsing = enumerateUsing;
|
|
38
|
+
exports.enumerateWhile = enumerateWhile;
|
|
39
|
+
exports.filter = filter;
|
|
40
|
+
exports.exists = exists;
|
|
41
|
+
exports.exists2 = exists2;
|
|
42
|
+
exports.exactlyOne = exactlyOne;
|
|
43
|
+
exports.tryExactlyOne = tryExactlyOne;
|
|
44
|
+
exports.tryFind = tryFind;
|
|
45
|
+
exports.find = find;
|
|
46
|
+
exports.tryFindBack = tryFindBack;
|
|
47
|
+
exports.findBack = findBack;
|
|
48
|
+
exports.tryFindIndex = tryFindIndex;
|
|
49
|
+
exports.findIndex = findIndex;
|
|
50
|
+
exports.tryFindIndexBack = tryFindIndexBack;
|
|
51
|
+
exports.findIndexBack = findIndexBack;
|
|
52
|
+
exports.fold = fold;
|
|
53
|
+
exports.foldBack = foldBack;
|
|
54
|
+
exports.fold2 = fold2;
|
|
55
|
+
exports.foldBack2 = foldBack2;
|
|
56
|
+
exports.forAll = forAll;
|
|
57
|
+
exports.forAll2 = forAll2;
|
|
58
|
+
exports.tryHead = tryHead;
|
|
59
|
+
exports.head = head;
|
|
60
|
+
exports.initialize = initialize;
|
|
61
|
+
exports.initializeInfinite = initializeInfinite;
|
|
62
|
+
exports.isEmpty = isEmpty;
|
|
63
|
+
exports.tryItem = tryItem;
|
|
64
|
+
exports.item = item;
|
|
65
|
+
exports.iterate = iterate;
|
|
66
|
+
exports.iterate2 = iterate2;
|
|
67
|
+
exports.iterateIndexed = iterateIndexed;
|
|
68
|
+
exports.iterateIndexed2 = iterateIndexed2;
|
|
69
|
+
exports.tryLast = tryLast;
|
|
70
|
+
exports.last = last;
|
|
71
|
+
exports.length = length;
|
|
72
|
+
exports.map = map;
|
|
73
|
+
exports.mapIndexed = mapIndexed;
|
|
74
|
+
exports.indexed = indexed;
|
|
75
|
+
exports.map2 = map2;
|
|
76
|
+
exports.mapIndexed2 = mapIndexed2;
|
|
77
|
+
exports.map3 = map3;
|
|
78
|
+
exports.readOnly = readOnly;
|
|
79
|
+
exports.CachedSeq$1_$reflection = CachedSeq$1_$reflection;
|
|
80
|
+
exports.CachedSeq$1_$ctor_Z7A8347D4 = CachedSeq$1_$ctor_Z7A8347D4;
|
|
81
|
+
exports.CachedSeq$1__Clear = CachedSeq$1__Clear;
|
|
82
|
+
exports.cache = cache;
|
|
83
|
+
exports.allPairs = allPairs;
|
|
84
|
+
exports.mapFold = mapFold;
|
|
85
|
+
exports.mapFoldBack = mapFoldBack;
|
|
86
|
+
exports.tryPick = tryPick;
|
|
87
|
+
exports.pick = pick;
|
|
88
|
+
exports.reduce = reduce;
|
|
89
|
+
exports.reduceBack = reduceBack;
|
|
90
|
+
exports.replicate = replicate;
|
|
91
|
+
exports.reverse = reverse;
|
|
92
|
+
exports.scan = scan;
|
|
93
|
+
exports.scanBack = scanBack;
|
|
94
|
+
exports.skip = skip;
|
|
95
|
+
exports.skipWhile = skipWhile;
|
|
96
|
+
exports.tail = tail;
|
|
97
|
+
exports.take = take;
|
|
98
|
+
exports.takeWhile = takeWhile;
|
|
99
|
+
exports.truncate = truncate;
|
|
100
|
+
exports.zip = zip;
|
|
101
|
+
exports.zip3 = zip3;
|
|
102
|
+
exports.collect = collect;
|
|
103
|
+
exports.where = where;
|
|
104
|
+
exports.pairwise = pairwise;
|
|
105
|
+
exports.splitInto = splitInto;
|
|
106
|
+
exports.windowed = windowed;
|
|
107
|
+
exports.transpose = transpose;
|
|
108
|
+
exports.sortWith = sortWith;
|
|
109
|
+
exports.sort = sort;
|
|
110
|
+
exports.sortBy = sortBy;
|
|
111
|
+
exports.sortDescending = sortDescending;
|
|
112
|
+
exports.sortByDescending = sortByDescending;
|
|
113
|
+
exports.sum = sum;
|
|
114
|
+
exports.sumBy = sumBy;
|
|
115
|
+
exports.maxBy = maxBy;
|
|
116
|
+
exports.max = max;
|
|
117
|
+
exports.minBy = minBy;
|
|
118
|
+
exports.min = min;
|
|
119
|
+
exports.average = average;
|
|
120
|
+
exports.averageBy = averageBy;
|
|
121
|
+
exports.permute = permute;
|
|
122
|
+
exports.chunkBySize = chunkBySize;
|
|
123
|
+
exports.insertAt = insertAt;
|
|
124
|
+
exports.insertManyAt = insertManyAt;
|
|
125
|
+
exports.removeAt = removeAt;
|
|
126
|
+
exports.removeManyAt = removeManyAt;
|
|
127
|
+
exports.updateAt = updateAt;
|
|
128
|
+
const System_ts_1 = require("./System.js");
|
|
129
|
+
const Util_ts_1 = require("./Util.js");
|
|
130
|
+
const Types_ts_1 = require("./Types.js");
|
|
131
|
+
const Reflection_ts_1 = require("./Reflection.js");
|
|
132
|
+
const Option_ts_1 = require("./Option.js");
|
|
133
|
+
const System_Collections_Generic_ts_1 = require("./System.Collections.Generic.js");
|
|
134
|
+
const FSharp_Core_ts_1 = require("./FSharp.Core.js");
|
|
135
|
+
const Array_ts_1 = require("./Array.js");
|
|
136
|
+
const List_ts_1 = require("./List.js");
|
|
137
|
+
const Global_ts_1 = require("./Global.js");
|
|
138
|
+
exports.SR_enumerationAlreadyFinished = "Enumeration already finished.";
|
|
139
|
+
exports.SR_enumerationNotStarted = "Enumeration has not started. Call MoveNext.";
|
|
140
|
+
exports.SR_inputSequenceEmpty = "The input sequence was empty.";
|
|
141
|
+
exports.SR_inputSequenceTooLong = "The input sequence contains more than one element.";
|
|
142
|
+
exports.SR_keyNotFoundAlt = "An index satisfying the predicate was not found in the collection.";
|
|
143
|
+
exports.SR_notEnoughElements = "The input sequence has an insufficient number of elements.";
|
|
144
|
+
exports.SR_resetNotSupported = "Reset is not supported on this enumerator.";
|
|
145
|
+
function Enumerator_noReset() {
|
|
146
|
+
throw (0, System_ts_1.NotSupportedException_$ctor_Z721C83C5)(exports.SR_resetNotSupported);
|
|
147
|
+
}
|
|
148
|
+
function Enumerator_notStarted() {
|
|
149
|
+
throw (0, System_ts_1.InvalidOperationException_$ctor_Z721C83C5)(exports.SR_enumerationNotStarted);
|
|
150
|
+
}
|
|
151
|
+
function Enumerator_alreadyFinished() {
|
|
152
|
+
throw (0, System_ts_1.InvalidOperationException_$ctor_Z721C83C5)(exports.SR_enumerationAlreadyFinished);
|
|
153
|
+
}
|
|
154
|
+
class Enumerator_Seq {
|
|
155
|
+
constructor(f) {
|
|
156
|
+
this.f = f;
|
|
157
|
+
}
|
|
158
|
+
toString() {
|
|
159
|
+
const xs = this;
|
|
160
|
+
let i = 0;
|
|
161
|
+
let str = "seq [";
|
|
162
|
+
const e = (0, Util_ts_1.getEnumerator)(xs);
|
|
163
|
+
try {
|
|
164
|
+
while ((i < 4) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
165
|
+
if (i > 0) {
|
|
166
|
+
str = (str + "; ");
|
|
167
|
+
}
|
|
168
|
+
str = (str + (0, Types_ts_1.toString)(e["System.Collections.Generic.IEnumerator`1.get_Current"]()));
|
|
169
|
+
i = ((i + 1) | 0);
|
|
170
|
+
}
|
|
171
|
+
if (i === 4) {
|
|
172
|
+
str = (str + "; ...");
|
|
173
|
+
}
|
|
174
|
+
return str + "]";
|
|
175
|
+
}
|
|
176
|
+
finally {
|
|
177
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
GetEnumerator() {
|
|
181
|
+
const x = this;
|
|
182
|
+
return x.f();
|
|
183
|
+
}
|
|
184
|
+
[Symbol.iterator]() {
|
|
185
|
+
return (0, Util_ts_1.toIterator)((0, Util_ts_1.getEnumerator)(this));
|
|
186
|
+
}
|
|
187
|
+
"System.Collections.IEnumerable.GetEnumerator"() {
|
|
188
|
+
const x = this;
|
|
189
|
+
return x.f();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
exports.Enumerator_Seq = Enumerator_Seq;
|
|
193
|
+
function Enumerator_Seq_$reflection(gen0) {
|
|
194
|
+
return (0, Reflection_ts_1.class_type)("SeqModule.Enumerator.Seq", [gen0], Enumerator_Seq);
|
|
195
|
+
}
|
|
196
|
+
function Enumerator_Seq_$ctor_673A07F2(f) {
|
|
197
|
+
return new Enumerator_Seq(f);
|
|
198
|
+
}
|
|
199
|
+
class Enumerator_FromFunctions$1 {
|
|
200
|
+
constructor(current, next, dispose) {
|
|
201
|
+
this.current = current;
|
|
202
|
+
this.next = next;
|
|
203
|
+
this.dispose = dispose;
|
|
204
|
+
}
|
|
205
|
+
"System.Collections.Generic.IEnumerator`1.get_Current"() {
|
|
206
|
+
const _ = this;
|
|
207
|
+
return _.current();
|
|
208
|
+
}
|
|
209
|
+
"System.Collections.IEnumerator.get_Current"() {
|
|
210
|
+
const _ = this;
|
|
211
|
+
return _.current();
|
|
212
|
+
}
|
|
213
|
+
"System.Collections.IEnumerator.MoveNext"() {
|
|
214
|
+
const _ = this;
|
|
215
|
+
return _.next();
|
|
216
|
+
}
|
|
217
|
+
"System.Collections.IEnumerator.Reset"() {
|
|
218
|
+
Enumerator_noReset();
|
|
219
|
+
}
|
|
220
|
+
Dispose() {
|
|
221
|
+
const _ = this;
|
|
222
|
+
_.dispose();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
exports.Enumerator_FromFunctions$1 = Enumerator_FromFunctions$1;
|
|
226
|
+
function Enumerator_FromFunctions$1_$reflection(gen0) {
|
|
227
|
+
return (0, Reflection_ts_1.class_type)("SeqModule.Enumerator.FromFunctions`1", [gen0], Enumerator_FromFunctions$1);
|
|
228
|
+
}
|
|
229
|
+
function Enumerator_FromFunctions$1_$ctor_58C54629(current, next, dispose) {
|
|
230
|
+
return new Enumerator_FromFunctions$1(current, next, dispose);
|
|
231
|
+
}
|
|
232
|
+
function Enumerator_cast(e) {
|
|
233
|
+
return Enumerator_FromFunctions$1_$ctor_58C54629(() => e["System.Collections.Generic.IEnumerator`1.get_Current"](), () => e["System.Collections.IEnumerator.MoveNext"](), () => {
|
|
234
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
function Enumerator_concat(sources) {
|
|
238
|
+
let outerOpt = undefined;
|
|
239
|
+
let innerOpt = undefined;
|
|
240
|
+
let started = false;
|
|
241
|
+
let finished = false;
|
|
242
|
+
let curr = undefined;
|
|
243
|
+
const finish = () => {
|
|
244
|
+
finished = true;
|
|
245
|
+
if (innerOpt != null) {
|
|
246
|
+
const inner = (0, Option_ts_1.value)(innerOpt);
|
|
247
|
+
try {
|
|
248
|
+
(0, Util_ts_1.disposeSafe)(inner);
|
|
249
|
+
}
|
|
250
|
+
finally {
|
|
251
|
+
innerOpt = undefined;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
if (outerOpt != null) {
|
|
255
|
+
const outer = (0, Option_ts_1.value)(outerOpt);
|
|
256
|
+
try {
|
|
257
|
+
(0, Util_ts_1.disposeSafe)(outer);
|
|
258
|
+
}
|
|
259
|
+
finally {
|
|
260
|
+
outerOpt = undefined;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
return Enumerator_FromFunctions$1_$ctor_58C54629(() => {
|
|
265
|
+
if (!started) {
|
|
266
|
+
Enumerator_notStarted();
|
|
267
|
+
}
|
|
268
|
+
else if (finished) {
|
|
269
|
+
Enumerator_alreadyFinished();
|
|
270
|
+
}
|
|
271
|
+
if (curr != null) {
|
|
272
|
+
return (0, Option_ts_1.value)(curr);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
return Enumerator_alreadyFinished();
|
|
276
|
+
}
|
|
277
|
+
}, () => {
|
|
278
|
+
if (!started) {
|
|
279
|
+
started = true;
|
|
280
|
+
}
|
|
281
|
+
if (finished) {
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
let res = undefined;
|
|
286
|
+
while (res == null) {
|
|
287
|
+
let copyOfStruct = undefined;
|
|
288
|
+
const outerOpt_1 = outerOpt;
|
|
289
|
+
const innerOpt_1 = innerOpt;
|
|
290
|
+
if (outerOpt_1 != null) {
|
|
291
|
+
if (innerOpt_1 != null) {
|
|
292
|
+
const inner_1 = (0, Option_ts_1.value)(innerOpt_1);
|
|
293
|
+
if (inner_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
294
|
+
curr = (0, Option_ts_1.some)(inner_1["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
295
|
+
res = true;
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
try {
|
|
299
|
+
(0, Util_ts_1.disposeSafe)(inner_1);
|
|
300
|
+
}
|
|
301
|
+
finally {
|
|
302
|
+
innerOpt = undefined;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
const outer_1 = (0, Option_ts_1.value)(outerOpt_1);
|
|
308
|
+
if (outer_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
309
|
+
const ie = outer_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
310
|
+
innerOpt = ((copyOfStruct = ie, (0, Util_ts_1.getEnumerator)(copyOfStruct)));
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
finish();
|
|
314
|
+
res = false;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
outerOpt = (0, Util_ts_1.getEnumerator)(sources);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return (0, Option_ts_1.value)(res);
|
|
323
|
+
}
|
|
324
|
+
}, () => {
|
|
325
|
+
if (!finished) {
|
|
326
|
+
finish();
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
function Enumerator_enumerateThenFinally(f, e) {
|
|
331
|
+
return Enumerator_FromFunctions$1_$ctor_58C54629(() => e["System.Collections.Generic.IEnumerator`1.get_Current"](), () => e["System.Collections.IEnumerator.MoveNext"](), () => {
|
|
332
|
+
try {
|
|
333
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
334
|
+
}
|
|
335
|
+
finally {
|
|
336
|
+
f();
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
function Enumerator_generateWhileSome(openf, compute, closef) {
|
|
341
|
+
let started = false;
|
|
342
|
+
let curr = undefined;
|
|
343
|
+
let state = (0, Option_ts_1.some)(openf());
|
|
344
|
+
const dispose = () => {
|
|
345
|
+
if (state != null) {
|
|
346
|
+
const x_1 = (0, Option_ts_1.value)(state);
|
|
347
|
+
try {
|
|
348
|
+
closef(x_1);
|
|
349
|
+
}
|
|
350
|
+
finally {
|
|
351
|
+
state = undefined;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
const finish = () => {
|
|
356
|
+
try {
|
|
357
|
+
dispose();
|
|
358
|
+
}
|
|
359
|
+
finally {
|
|
360
|
+
curr = undefined;
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
return Enumerator_FromFunctions$1_$ctor_58C54629(() => {
|
|
364
|
+
if (!started) {
|
|
365
|
+
Enumerator_notStarted();
|
|
366
|
+
}
|
|
367
|
+
if (curr != null) {
|
|
368
|
+
return (0, Option_ts_1.value)(curr);
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
return Enumerator_alreadyFinished();
|
|
372
|
+
}
|
|
373
|
+
}, () => {
|
|
374
|
+
if (!started) {
|
|
375
|
+
started = true;
|
|
376
|
+
}
|
|
377
|
+
if (state != null) {
|
|
378
|
+
const s = (0, Option_ts_1.value)(state);
|
|
379
|
+
let matchValue_1;
|
|
380
|
+
try {
|
|
381
|
+
matchValue_1 = compute(s);
|
|
382
|
+
}
|
|
383
|
+
catch (matchValue) {
|
|
384
|
+
finish();
|
|
385
|
+
throw matchValue;
|
|
386
|
+
}
|
|
387
|
+
if (matchValue_1 != null) {
|
|
388
|
+
curr = matchValue_1;
|
|
389
|
+
return true;
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
finish();
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
}, dispose);
|
|
400
|
+
}
|
|
401
|
+
function Enumerator_unfold(f, state) {
|
|
402
|
+
let curr = undefined;
|
|
403
|
+
let acc = state;
|
|
404
|
+
return Enumerator_FromFunctions$1_$ctor_58C54629(() => {
|
|
405
|
+
if (curr != null) {
|
|
406
|
+
const x = (0, Option_ts_1.value)(curr)[0];
|
|
407
|
+
const st = (0, Option_ts_1.value)(curr)[1];
|
|
408
|
+
return x;
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
return Enumerator_notStarted();
|
|
412
|
+
}
|
|
413
|
+
}, () => {
|
|
414
|
+
curr = f(acc);
|
|
415
|
+
if (curr != null) {
|
|
416
|
+
const x_1 = (0, Option_ts_1.value)(curr)[0];
|
|
417
|
+
const st_1 = (0, Option_ts_1.value)(curr)[1];
|
|
418
|
+
acc = st_1;
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
return false;
|
|
423
|
+
}
|
|
424
|
+
}, () => {
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
function indexNotFound() {
|
|
428
|
+
throw (0, System_Collections_Generic_ts_1.KeyNotFoundException_$ctor_Z721C83C5)(exports.SR_keyNotFoundAlt);
|
|
429
|
+
}
|
|
430
|
+
function mkSeq(f) {
|
|
431
|
+
return Enumerator_Seq_$ctor_673A07F2(f);
|
|
432
|
+
}
|
|
433
|
+
function ofSeq(xs) {
|
|
434
|
+
return (0, Util_ts_1.getEnumerator)((0, FSharp_Core_ts_1.Operators_NullArgCheck)("source", xs));
|
|
435
|
+
}
|
|
436
|
+
function delay(generator) {
|
|
437
|
+
return mkSeq(() => (0, Util_ts_1.getEnumerator)(generator()));
|
|
438
|
+
}
|
|
439
|
+
function concat(sources) {
|
|
440
|
+
return mkSeq(() => Enumerator_concat(sources));
|
|
441
|
+
}
|
|
442
|
+
function unfold(generator, state) {
|
|
443
|
+
return mkSeq(() => Enumerator_unfold(generator, state));
|
|
444
|
+
}
|
|
445
|
+
function empty() {
|
|
446
|
+
return delay(() => (new Array(0)));
|
|
447
|
+
}
|
|
448
|
+
function singleton(x) {
|
|
449
|
+
return delay(() => (0, Array_ts_1.singleton)(x));
|
|
450
|
+
}
|
|
451
|
+
function ofArray(arr) {
|
|
452
|
+
return arr;
|
|
453
|
+
}
|
|
454
|
+
function toArray(xs) {
|
|
455
|
+
if (xs instanceof List_ts_1.FSharpList) {
|
|
456
|
+
const a = xs;
|
|
457
|
+
return (0, List_ts_1.toArray)(a);
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
return Array.from(xs);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
function ofList(xs) {
|
|
464
|
+
return xs;
|
|
465
|
+
}
|
|
466
|
+
function toList(xs) {
|
|
467
|
+
if ((0, Util_ts_1.isArrayLike)(xs)) {
|
|
468
|
+
return (0, List_ts_1.ofArray)(xs);
|
|
469
|
+
}
|
|
470
|
+
else if (xs instanceof List_ts_1.FSharpList) {
|
|
471
|
+
return xs;
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
return (0, List_ts_1.ofSeq)(xs);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
function generate(create, compute, dispose) {
|
|
478
|
+
return mkSeq(() => Enumerator_generateWhileSome(create, compute, dispose));
|
|
479
|
+
}
|
|
480
|
+
function generateIndexed(create, compute, dispose) {
|
|
481
|
+
return mkSeq(() => {
|
|
482
|
+
let i = -1;
|
|
483
|
+
return Enumerator_generateWhileSome(create, (x) => {
|
|
484
|
+
i = ((i + 1) | 0);
|
|
485
|
+
return compute(i, x);
|
|
486
|
+
}, dispose);
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
function append(xs, ys) {
|
|
490
|
+
return concat([xs, ys]);
|
|
491
|
+
}
|
|
492
|
+
function cast(xs) {
|
|
493
|
+
return mkSeq(() => Enumerator_cast((0, Util_ts_1.getEnumerator)((0, FSharp_Core_ts_1.Operators_NullArgCheck)("source", xs))));
|
|
494
|
+
}
|
|
495
|
+
function choose(chooser, xs) {
|
|
496
|
+
return generate(() => ofSeq(xs), (e) => {
|
|
497
|
+
let curr = undefined;
|
|
498
|
+
while ((curr == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
499
|
+
curr = chooser(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
500
|
+
}
|
|
501
|
+
return curr;
|
|
502
|
+
}, (e_1) => {
|
|
503
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
function compareWith(comparer, xs, ys) {
|
|
507
|
+
const e1 = ofSeq(xs);
|
|
508
|
+
try {
|
|
509
|
+
const e2 = ofSeq(ys);
|
|
510
|
+
try {
|
|
511
|
+
let c = 0;
|
|
512
|
+
let b1 = e1["System.Collections.IEnumerator.MoveNext"]();
|
|
513
|
+
let b2 = e2["System.Collections.IEnumerator.MoveNext"]();
|
|
514
|
+
while (((c === 0) && b1) && b2) {
|
|
515
|
+
c = (comparer(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]()) | 0);
|
|
516
|
+
if (c === 0) {
|
|
517
|
+
b1 = e1["System.Collections.IEnumerator.MoveNext"]();
|
|
518
|
+
b2 = e2["System.Collections.IEnumerator.MoveNext"]();
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
return ((c !== 0) ? c : (b1 ? 1 : (b2 ? -1 : 0))) | 0;
|
|
522
|
+
}
|
|
523
|
+
finally {
|
|
524
|
+
(0, Util_ts_1.disposeSafe)(e2);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
finally {
|
|
528
|
+
(0, Util_ts_1.disposeSafe)(e1);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
function contains(value, xs, comparer) {
|
|
532
|
+
const e = ofSeq(xs);
|
|
533
|
+
try {
|
|
534
|
+
let found = false;
|
|
535
|
+
while (!found && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
536
|
+
found = comparer.Equals(value, e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
537
|
+
}
|
|
538
|
+
return found;
|
|
539
|
+
}
|
|
540
|
+
finally {
|
|
541
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function enumerateFromFunctions(create, moveNext, current) {
|
|
545
|
+
return generate(create, (x) => (moveNext(x) ? (0, Option_ts_1.some)(current(x)) : undefined), (x_1) => {
|
|
546
|
+
const matchValue = x_1;
|
|
547
|
+
if ((0, Util_ts_1.isDisposable)(matchValue)) {
|
|
548
|
+
const id = matchValue;
|
|
549
|
+
(0, Util_ts_1.disposeSafe)(id);
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
function enumerateThenFinally(source, compensation) {
|
|
554
|
+
const compensation_1 = compensation;
|
|
555
|
+
return mkSeq(() => {
|
|
556
|
+
try {
|
|
557
|
+
return Enumerator_enumerateThenFinally(compensation_1, ofSeq(source));
|
|
558
|
+
}
|
|
559
|
+
catch (matchValue) {
|
|
560
|
+
compensation_1();
|
|
561
|
+
throw matchValue;
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
function enumerateUsing(resource, source) {
|
|
566
|
+
const compensation = () => {
|
|
567
|
+
if (resource == null) {
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
let copyOfStruct = resource;
|
|
571
|
+
(0, Util_ts_1.disposeSafe)(copyOfStruct);
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
return mkSeq(() => {
|
|
575
|
+
try {
|
|
576
|
+
return Enumerator_enumerateThenFinally(compensation, ofSeq(source(resource)));
|
|
577
|
+
}
|
|
578
|
+
catch (matchValue_1) {
|
|
579
|
+
compensation();
|
|
580
|
+
throw matchValue_1;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
function enumerateWhile(guard, xs) {
|
|
585
|
+
return concat(unfold((i) => (guard() ? [xs, i + 1] : undefined), 0));
|
|
586
|
+
}
|
|
587
|
+
function filter(f, xs) {
|
|
588
|
+
return choose((x) => {
|
|
589
|
+
if (f(x)) {
|
|
590
|
+
return (0, Option_ts_1.some)(x);
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
return undefined;
|
|
594
|
+
}
|
|
595
|
+
}, xs);
|
|
596
|
+
}
|
|
597
|
+
function exists(predicate, xs) {
|
|
598
|
+
const e = ofSeq(xs);
|
|
599
|
+
try {
|
|
600
|
+
let found = false;
|
|
601
|
+
while (!found && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
602
|
+
found = predicate(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
603
|
+
}
|
|
604
|
+
return found;
|
|
605
|
+
}
|
|
606
|
+
finally {
|
|
607
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
function exists2(predicate, xs, ys) {
|
|
611
|
+
const e1 = ofSeq(xs);
|
|
612
|
+
try {
|
|
613
|
+
const e2 = ofSeq(ys);
|
|
614
|
+
try {
|
|
615
|
+
let found = false;
|
|
616
|
+
while ((!found && e1["System.Collections.IEnumerator.MoveNext"]()) && e2["System.Collections.IEnumerator.MoveNext"]()) {
|
|
617
|
+
found = predicate(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
618
|
+
}
|
|
619
|
+
return found;
|
|
620
|
+
}
|
|
621
|
+
finally {
|
|
622
|
+
(0, Util_ts_1.disposeSafe)(e2);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
finally {
|
|
626
|
+
(0, Util_ts_1.disposeSafe)(e1);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
function exactlyOne(xs) {
|
|
630
|
+
const e = ofSeq(xs);
|
|
631
|
+
try {
|
|
632
|
+
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
633
|
+
const v = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
634
|
+
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
635
|
+
throw new Util_ts_1.Exception((exports.SR_inputSequenceTooLong + "\\nParameter name: ") + "source");
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
return v;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
else {
|
|
642
|
+
throw new Util_ts_1.Exception((exports.SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
finally {
|
|
646
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
function tryExactlyOne(xs) {
|
|
650
|
+
const e = ofSeq(xs);
|
|
651
|
+
try {
|
|
652
|
+
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
653
|
+
const v = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
654
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? undefined : (0, Option_ts_1.some)(v);
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
return undefined;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
finally {
|
|
661
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
function tryFind(predicate, xs) {
|
|
665
|
+
const e = ofSeq(xs);
|
|
666
|
+
try {
|
|
667
|
+
let res = undefined;
|
|
668
|
+
while ((res == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
669
|
+
const c = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
670
|
+
if (predicate(c)) {
|
|
671
|
+
res = (0, Option_ts_1.some)(c);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
return res;
|
|
675
|
+
}
|
|
676
|
+
finally {
|
|
677
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
function find(predicate, xs) {
|
|
681
|
+
const matchValue = tryFind(predicate, xs);
|
|
682
|
+
if (matchValue == null) {
|
|
683
|
+
return indexNotFound();
|
|
684
|
+
}
|
|
685
|
+
else {
|
|
686
|
+
return (0, Option_ts_1.value)(matchValue);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
function tryFindBack(predicate, xs) {
|
|
690
|
+
return (0, Array_ts_1.tryFindBack)(predicate, toArray(xs));
|
|
691
|
+
}
|
|
692
|
+
function findBack(predicate, xs) {
|
|
693
|
+
const matchValue = tryFindBack(predicate, xs);
|
|
694
|
+
if (matchValue == null) {
|
|
695
|
+
return indexNotFound();
|
|
696
|
+
}
|
|
697
|
+
else {
|
|
698
|
+
return (0, Option_ts_1.value)(matchValue);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
function tryFindIndex(predicate, xs) {
|
|
702
|
+
const e = ofSeq(xs);
|
|
703
|
+
try {
|
|
704
|
+
const loop = (i_mut) => {
|
|
705
|
+
loop: while (true) {
|
|
706
|
+
const i = i_mut;
|
|
707
|
+
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
708
|
+
if (predicate(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) {
|
|
709
|
+
return i;
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
i_mut = (i + 1);
|
|
713
|
+
continue loop;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
else {
|
|
717
|
+
return undefined;
|
|
718
|
+
}
|
|
719
|
+
break;
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
return loop(0);
|
|
723
|
+
}
|
|
724
|
+
finally {
|
|
725
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
function findIndex(predicate, xs) {
|
|
729
|
+
const matchValue = tryFindIndex(predicate, xs);
|
|
730
|
+
if (matchValue == null) {
|
|
731
|
+
indexNotFound();
|
|
732
|
+
return -1;
|
|
733
|
+
}
|
|
734
|
+
else {
|
|
735
|
+
return (0, Option_ts_1.value)(matchValue) | 0;
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
function tryFindIndexBack(predicate, xs) {
|
|
739
|
+
return (0, Array_ts_1.tryFindIndexBack)(predicate, toArray(xs));
|
|
740
|
+
}
|
|
741
|
+
function findIndexBack(predicate, xs) {
|
|
742
|
+
const matchValue = tryFindIndexBack(predicate, xs);
|
|
743
|
+
if (matchValue == null) {
|
|
744
|
+
indexNotFound();
|
|
745
|
+
return -1;
|
|
746
|
+
}
|
|
747
|
+
else {
|
|
748
|
+
return (0, Option_ts_1.value)(matchValue) | 0;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
function fold(folder, state, xs) {
|
|
752
|
+
const e = ofSeq(xs);
|
|
753
|
+
try {
|
|
754
|
+
let acc = state;
|
|
755
|
+
while (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
756
|
+
acc = folder(acc, e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
757
|
+
}
|
|
758
|
+
return acc;
|
|
759
|
+
}
|
|
760
|
+
finally {
|
|
761
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
function foldBack(folder, xs, state) {
|
|
765
|
+
return (0, Array_ts_1.foldBack)(folder, toArray(xs), state);
|
|
766
|
+
}
|
|
767
|
+
function fold2(folder, state, xs, ys) {
|
|
768
|
+
const e1 = ofSeq(xs);
|
|
769
|
+
try {
|
|
770
|
+
const e2 = ofSeq(ys);
|
|
771
|
+
try {
|
|
772
|
+
let acc = state;
|
|
773
|
+
while (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) {
|
|
774
|
+
acc = folder(acc, e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
775
|
+
}
|
|
776
|
+
return acc;
|
|
777
|
+
}
|
|
778
|
+
finally {
|
|
779
|
+
(0, Util_ts_1.disposeSafe)(e2);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
finally {
|
|
783
|
+
(0, Util_ts_1.disposeSafe)(e1);
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
function foldBack2(folder, xs, ys, state) {
|
|
787
|
+
return (0, Array_ts_1.foldBack2)(folder, toArray(xs), toArray(ys), state);
|
|
788
|
+
}
|
|
789
|
+
function forAll(predicate, xs) {
|
|
790
|
+
return !exists((x) => !predicate(x), xs);
|
|
791
|
+
}
|
|
792
|
+
function forAll2(predicate, xs, ys) {
|
|
793
|
+
return !exists2((x, y) => !predicate(x, y), xs, ys);
|
|
794
|
+
}
|
|
795
|
+
function tryHead(xs) {
|
|
796
|
+
if ((0, Util_ts_1.isArrayLike)(xs)) {
|
|
797
|
+
return (0, Array_ts_1.tryHead)(xs);
|
|
798
|
+
}
|
|
799
|
+
else if (xs instanceof List_ts_1.FSharpList) {
|
|
800
|
+
return (0, List_ts_1.tryHead)(xs);
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
const e = ofSeq(xs);
|
|
804
|
+
try {
|
|
805
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
|
|
806
|
+
}
|
|
807
|
+
finally {
|
|
808
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
function head(xs) {
|
|
813
|
+
const matchValue = tryHead(xs);
|
|
814
|
+
if (matchValue == null) {
|
|
815
|
+
throw new Util_ts_1.Exception((exports.SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
|
|
816
|
+
}
|
|
817
|
+
else {
|
|
818
|
+
return (0, Option_ts_1.value)(matchValue);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
function initialize(count, f) {
|
|
822
|
+
return unfold((i) => ((i < count) ? [f(i), i + 1] : undefined), 0);
|
|
823
|
+
}
|
|
824
|
+
function initializeInfinite(f) {
|
|
825
|
+
return initialize(2147483647, f);
|
|
826
|
+
}
|
|
827
|
+
function isEmpty(xs) {
|
|
828
|
+
if ((0, Util_ts_1.isArrayLike)(xs)) {
|
|
829
|
+
const a = xs;
|
|
830
|
+
return a.length === 0;
|
|
831
|
+
}
|
|
832
|
+
else if (xs instanceof List_ts_1.FSharpList) {
|
|
833
|
+
return (0, List_ts_1.isEmpty)(xs);
|
|
834
|
+
}
|
|
835
|
+
else {
|
|
836
|
+
const e = ofSeq(xs);
|
|
837
|
+
try {
|
|
838
|
+
return !e["System.Collections.IEnumerator.MoveNext"]();
|
|
839
|
+
}
|
|
840
|
+
finally {
|
|
841
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
function tryItem(index, xs) {
|
|
846
|
+
if ((0, Util_ts_1.isArrayLike)(xs)) {
|
|
847
|
+
return (0, Array_ts_1.tryItem)(index, xs);
|
|
848
|
+
}
|
|
849
|
+
else if (xs instanceof List_ts_1.FSharpList) {
|
|
850
|
+
return (0, List_ts_1.tryItem)(index, xs);
|
|
851
|
+
}
|
|
852
|
+
else {
|
|
853
|
+
const e = ofSeq(xs);
|
|
854
|
+
try {
|
|
855
|
+
const loop = (index_1_mut) => {
|
|
856
|
+
loop: while (true) {
|
|
857
|
+
const index_1 = index_1_mut;
|
|
858
|
+
if (!e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
859
|
+
return undefined;
|
|
860
|
+
}
|
|
861
|
+
else if (index_1 === 0) {
|
|
862
|
+
return (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
863
|
+
}
|
|
864
|
+
else {
|
|
865
|
+
index_1_mut = (index_1 - 1);
|
|
866
|
+
continue loop;
|
|
867
|
+
}
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
return loop(index);
|
|
872
|
+
}
|
|
873
|
+
finally {
|
|
874
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
function item(index, xs) {
|
|
879
|
+
const matchValue = tryItem(index, xs);
|
|
880
|
+
if (matchValue == null) {
|
|
881
|
+
throw new Util_ts_1.Exception((exports.SR_notEnoughElements + "\\nParameter name: ") + "index");
|
|
882
|
+
}
|
|
883
|
+
else {
|
|
884
|
+
return (0, Option_ts_1.value)(matchValue);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
function iterate(action, xs) {
|
|
888
|
+
fold((unitVar, x) => {
|
|
889
|
+
action(x);
|
|
890
|
+
}, undefined, xs);
|
|
891
|
+
}
|
|
892
|
+
function iterate2(action, xs, ys) {
|
|
893
|
+
fold2((unitVar, x, y) => {
|
|
894
|
+
action(x, y);
|
|
895
|
+
}, undefined, xs, ys);
|
|
896
|
+
}
|
|
897
|
+
function iterateIndexed(action, xs) {
|
|
898
|
+
fold((i, x) => {
|
|
899
|
+
action(i, x);
|
|
900
|
+
return (i + 1) | 0;
|
|
901
|
+
}, 0, xs);
|
|
902
|
+
}
|
|
903
|
+
function iterateIndexed2(action, xs, ys) {
|
|
904
|
+
fold2((i, x, y) => {
|
|
905
|
+
action(i, x, y);
|
|
906
|
+
return (i + 1) | 0;
|
|
907
|
+
}, 0, xs, ys);
|
|
908
|
+
}
|
|
909
|
+
function tryLast(xs) {
|
|
910
|
+
const e = ofSeq(xs);
|
|
911
|
+
try {
|
|
912
|
+
const loop = (acc_mut) => {
|
|
913
|
+
loop: while (true) {
|
|
914
|
+
const acc = acc_mut;
|
|
915
|
+
if (!e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
916
|
+
return acc;
|
|
917
|
+
}
|
|
918
|
+
else {
|
|
919
|
+
acc_mut = e["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
920
|
+
continue loop;
|
|
921
|
+
}
|
|
922
|
+
break;
|
|
923
|
+
}
|
|
924
|
+
};
|
|
925
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? (0, Option_ts_1.some)(loop(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
|
|
926
|
+
}
|
|
927
|
+
finally {
|
|
928
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
function last(xs) {
|
|
932
|
+
const matchValue = tryLast(xs);
|
|
933
|
+
if (matchValue == null) {
|
|
934
|
+
throw new Util_ts_1.Exception((exports.SR_notEnoughElements + "\\nParameter name: ") + "source");
|
|
935
|
+
}
|
|
936
|
+
else {
|
|
937
|
+
return (0, Option_ts_1.value)(matchValue);
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
function length(xs) {
|
|
941
|
+
if ((0, Util_ts_1.isArrayLike)(xs)) {
|
|
942
|
+
const a = xs;
|
|
943
|
+
return a.length | 0;
|
|
944
|
+
}
|
|
945
|
+
else if (xs instanceof List_ts_1.FSharpList) {
|
|
946
|
+
return (0, List_ts_1.length)(xs) | 0;
|
|
947
|
+
}
|
|
948
|
+
else {
|
|
949
|
+
const e = ofSeq(xs);
|
|
950
|
+
try {
|
|
951
|
+
let count = 0;
|
|
952
|
+
while (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
953
|
+
count = ((count + 1) | 0);
|
|
954
|
+
}
|
|
955
|
+
return count | 0;
|
|
956
|
+
}
|
|
957
|
+
finally {
|
|
958
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
function map(mapping, xs) {
|
|
963
|
+
return generate(() => ofSeq(xs), (e) => (e["System.Collections.IEnumerator.MoveNext"]() ? (0, Option_ts_1.some)(mapping(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined), (e_1) => {
|
|
964
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
function mapIndexed(mapping, xs) {
|
|
968
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => (e["System.Collections.IEnumerator.MoveNext"]() ? (0, Option_ts_1.some)(mapping(i, e["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined), (e_1) => {
|
|
969
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
function indexed(xs) {
|
|
973
|
+
return mapIndexed((i, x) => [i, x], xs);
|
|
974
|
+
}
|
|
975
|
+
function map2(mapping, xs, ys) {
|
|
976
|
+
return generate(() => [ofSeq(xs), ofSeq(ys)], (tupledArg) => {
|
|
977
|
+
const e1 = tupledArg[0];
|
|
978
|
+
const e2 = tupledArg[1];
|
|
979
|
+
return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? (0, Option_ts_1.some)(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
|
|
980
|
+
}, (tupledArg_1) => {
|
|
981
|
+
try {
|
|
982
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[0]);
|
|
983
|
+
}
|
|
984
|
+
finally {
|
|
985
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[1]);
|
|
986
|
+
}
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
function mapIndexed2(mapping, xs, ys) {
|
|
990
|
+
return generateIndexed(() => [ofSeq(xs), ofSeq(ys)], (i, tupledArg) => {
|
|
991
|
+
const e1 = tupledArg[0];
|
|
992
|
+
const e2 = tupledArg[1];
|
|
993
|
+
return (e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) ? (0, Option_ts_1.some)(mapping(i, e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
|
|
994
|
+
}, (tupledArg_1) => {
|
|
995
|
+
try {
|
|
996
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[0]);
|
|
997
|
+
}
|
|
998
|
+
finally {
|
|
999
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[1]);
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
function map3(mapping, xs, ys, zs) {
|
|
1004
|
+
return generate(() => [ofSeq(xs), ofSeq(ys), ofSeq(zs)], (tupledArg) => {
|
|
1005
|
+
const e1 = tupledArg[0];
|
|
1006
|
+
const e2 = tupledArg[1];
|
|
1007
|
+
const e3 = tupledArg[2];
|
|
1008
|
+
return ((e1["System.Collections.IEnumerator.MoveNext"]() && e2["System.Collections.IEnumerator.MoveNext"]()) && e3["System.Collections.IEnumerator.MoveNext"]()) ? (0, Option_ts_1.some)(mapping(e1["System.Collections.Generic.IEnumerator`1.get_Current"](), e2["System.Collections.Generic.IEnumerator`1.get_Current"](), e3["System.Collections.Generic.IEnumerator`1.get_Current"]())) : undefined;
|
|
1009
|
+
}, (tupledArg_1) => {
|
|
1010
|
+
try {
|
|
1011
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[0]);
|
|
1012
|
+
}
|
|
1013
|
+
finally {
|
|
1014
|
+
try {
|
|
1015
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[1]);
|
|
1016
|
+
}
|
|
1017
|
+
finally {
|
|
1018
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[2]);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
function readOnly(xs) {
|
|
1024
|
+
return map((x) => x, (0, FSharp_Core_ts_1.Operators_NullArgCheck)("source", xs));
|
|
1025
|
+
}
|
|
1026
|
+
class CachedSeq$1 {
|
|
1027
|
+
constructor(cleanup, res) {
|
|
1028
|
+
this.cleanup = cleanup;
|
|
1029
|
+
this.res = res;
|
|
1030
|
+
}
|
|
1031
|
+
Dispose() {
|
|
1032
|
+
const _ = this;
|
|
1033
|
+
_.cleanup();
|
|
1034
|
+
}
|
|
1035
|
+
GetEnumerator() {
|
|
1036
|
+
const _ = this;
|
|
1037
|
+
return (0, Util_ts_1.getEnumerator)(_.res);
|
|
1038
|
+
}
|
|
1039
|
+
[Symbol.iterator]() {
|
|
1040
|
+
return (0, Util_ts_1.toIterator)((0, Util_ts_1.getEnumerator)(this));
|
|
1041
|
+
}
|
|
1042
|
+
"System.Collections.IEnumerable.GetEnumerator"() {
|
|
1043
|
+
const _ = this;
|
|
1044
|
+
return (0, Util_ts_1.getEnumerator)(_.res);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
exports.CachedSeq$1 = CachedSeq$1;
|
|
1048
|
+
function CachedSeq$1_$reflection(gen0) {
|
|
1049
|
+
return (0, Reflection_ts_1.class_type)("SeqModule.CachedSeq`1", [gen0], CachedSeq$1);
|
|
1050
|
+
}
|
|
1051
|
+
function CachedSeq$1_$ctor_Z7A8347D4(cleanup, res) {
|
|
1052
|
+
return new CachedSeq$1(cleanup, res);
|
|
1053
|
+
}
|
|
1054
|
+
function CachedSeq$1__Clear(_) {
|
|
1055
|
+
_.cleanup();
|
|
1056
|
+
}
|
|
1057
|
+
function cache(source) {
|
|
1058
|
+
const source_1 = (0, FSharp_Core_ts_1.Operators_NullArgCheck)("source", source);
|
|
1059
|
+
const prefix = [];
|
|
1060
|
+
let enumeratorR = undefined;
|
|
1061
|
+
return CachedSeq$1_$ctor_Z7A8347D4(() => {
|
|
1062
|
+
(0, FSharp_Core_ts_1.Operators_Lock)(prefix, () => {
|
|
1063
|
+
(0, Util_ts_1.clear)(prefix);
|
|
1064
|
+
let matchResult = undefined, e = undefined;
|
|
1065
|
+
if (enumeratorR != null) {
|
|
1066
|
+
if ((0, Option_ts_1.value)(enumeratorR) != null) {
|
|
1067
|
+
matchResult = 0;
|
|
1068
|
+
e = (0, Option_ts_1.value)((0, Option_ts_1.value)(enumeratorR));
|
|
1069
|
+
}
|
|
1070
|
+
else {
|
|
1071
|
+
matchResult = 1;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
else {
|
|
1075
|
+
matchResult = 1;
|
|
1076
|
+
}
|
|
1077
|
+
switch (matchResult) {
|
|
1078
|
+
case 0: {
|
|
1079
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
1080
|
+
break;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
enumeratorR = undefined;
|
|
1084
|
+
});
|
|
1085
|
+
}, unfold((i_1) => (0, FSharp_Core_ts_1.Operators_Lock)(prefix, () => {
|
|
1086
|
+
if (i_1 < prefix.length) {
|
|
1087
|
+
return [prefix[i_1], i_1 + 1];
|
|
1088
|
+
}
|
|
1089
|
+
else {
|
|
1090
|
+
if (i_1 >= prefix.length) {
|
|
1091
|
+
let optEnumerator_2;
|
|
1092
|
+
if (enumeratorR != null) {
|
|
1093
|
+
optEnumerator_2 = (0, Option_ts_1.value)(enumeratorR);
|
|
1094
|
+
}
|
|
1095
|
+
else {
|
|
1096
|
+
const optEnumerator = (0, Util_ts_1.getEnumerator)(source_1);
|
|
1097
|
+
enumeratorR = (0, Option_ts_1.some)(optEnumerator);
|
|
1098
|
+
optEnumerator_2 = optEnumerator;
|
|
1099
|
+
}
|
|
1100
|
+
if (optEnumerator_2 == null) {
|
|
1101
|
+
}
|
|
1102
|
+
else {
|
|
1103
|
+
const enumerator = (0, Option_ts_1.value)(optEnumerator_2);
|
|
1104
|
+
if (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1105
|
+
void (prefix.push(enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]()));
|
|
1106
|
+
}
|
|
1107
|
+
else {
|
|
1108
|
+
(0, Util_ts_1.disposeSafe)(enumerator);
|
|
1109
|
+
enumeratorR = (0, Option_ts_1.some)(undefined);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
if (i_1 < prefix.length) {
|
|
1114
|
+
return [prefix[i_1], i_1 + 1];
|
|
1115
|
+
}
|
|
1116
|
+
else {
|
|
1117
|
+
return undefined;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}), 0));
|
|
1121
|
+
}
|
|
1122
|
+
function allPairs(xs, ys) {
|
|
1123
|
+
const ysCache = cache(ys);
|
|
1124
|
+
return delay(() => concat(map((x) => map((y) => [x, y], ysCache), xs)));
|
|
1125
|
+
}
|
|
1126
|
+
function mapFold(mapping, state, xs) {
|
|
1127
|
+
const patternInput = (0, Array_ts_1.mapFold)(mapping, state, toArray(xs));
|
|
1128
|
+
return [readOnly(patternInput[0]), patternInput[1]];
|
|
1129
|
+
}
|
|
1130
|
+
function mapFoldBack(mapping, xs, state) {
|
|
1131
|
+
const patternInput = (0, Array_ts_1.mapFoldBack)(mapping, toArray(xs), state);
|
|
1132
|
+
return [readOnly(patternInput[0]), patternInput[1]];
|
|
1133
|
+
}
|
|
1134
|
+
function tryPick(chooser, xs) {
|
|
1135
|
+
const e = ofSeq(xs);
|
|
1136
|
+
try {
|
|
1137
|
+
let res = undefined;
|
|
1138
|
+
while ((res == null) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1139
|
+
res = chooser(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1140
|
+
}
|
|
1141
|
+
return res;
|
|
1142
|
+
}
|
|
1143
|
+
finally {
|
|
1144
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
function pick(chooser, xs) {
|
|
1148
|
+
const matchValue = tryPick(chooser, xs);
|
|
1149
|
+
if (matchValue == null) {
|
|
1150
|
+
return indexNotFound();
|
|
1151
|
+
}
|
|
1152
|
+
else {
|
|
1153
|
+
return (0, Option_ts_1.value)(matchValue);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
function reduce(folder, xs) {
|
|
1157
|
+
const e = ofSeq(xs);
|
|
1158
|
+
try {
|
|
1159
|
+
const loop = (acc_mut) => {
|
|
1160
|
+
loop: while (true) {
|
|
1161
|
+
const acc = acc_mut;
|
|
1162
|
+
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1163
|
+
acc_mut = folder(acc, e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1164
|
+
continue loop;
|
|
1165
|
+
}
|
|
1166
|
+
else {
|
|
1167
|
+
return acc;
|
|
1168
|
+
}
|
|
1169
|
+
break;
|
|
1170
|
+
}
|
|
1171
|
+
};
|
|
1172
|
+
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1173
|
+
return loop(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
throw new Util_ts_1.Exception(exports.SR_inputSequenceEmpty);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
finally {
|
|
1180
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
function reduceBack(folder, xs) {
|
|
1184
|
+
const arr = toArray(xs);
|
|
1185
|
+
if (arr.length > 0) {
|
|
1186
|
+
return arr.reduceRight(folder);
|
|
1187
|
+
}
|
|
1188
|
+
else {
|
|
1189
|
+
throw new Util_ts_1.Exception(exports.SR_inputSequenceEmpty);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
function replicate(n, x) {
|
|
1193
|
+
return initialize(n, (_arg) => x);
|
|
1194
|
+
}
|
|
1195
|
+
function reverse(xs) {
|
|
1196
|
+
return delay(() => ofArray((0, Array_ts_1.reverse)(toArray(xs))));
|
|
1197
|
+
}
|
|
1198
|
+
function scan(folder, state, xs) {
|
|
1199
|
+
return delay(() => {
|
|
1200
|
+
let acc = state;
|
|
1201
|
+
return concat([singleton(state), map((x) => {
|
|
1202
|
+
acc = folder(acc, x);
|
|
1203
|
+
return acc;
|
|
1204
|
+
}, xs)]);
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
function scanBack(folder, xs, state) {
|
|
1208
|
+
return delay(() => ofArray((0, Array_ts_1.scanBack)(folder, toArray(xs), state)));
|
|
1209
|
+
}
|
|
1210
|
+
function skip(count, source) {
|
|
1211
|
+
return mkSeq(() => {
|
|
1212
|
+
const e = ofSeq(source);
|
|
1213
|
+
try {
|
|
1214
|
+
for (let _ = 1; _ <= count; _++) {
|
|
1215
|
+
if (!e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1216
|
+
throw new Util_ts_1.Exception((exports.SR_notEnoughElements + "\\nParameter name: ") + "source");
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
return Enumerator_enumerateThenFinally(() => {
|
|
1220
|
+
}, e);
|
|
1221
|
+
}
|
|
1222
|
+
catch (matchValue) {
|
|
1223
|
+
(0, Util_ts_1.disposeSafe)(e);
|
|
1224
|
+
throw matchValue;
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
function skipWhile(predicate, xs) {
|
|
1229
|
+
return delay(() => {
|
|
1230
|
+
let skipped = true;
|
|
1231
|
+
return filter((x) => {
|
|
1232
|
+
if (skipped) {
|
|
1233
|
+
skipped = predicate(x);
|
|
1234
|
+
}
|
|
1235
|
+
return !skipped;
|
|
1236
|
+
}, xs);
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
function tail(xs) {
|
|
1240
|
+
return skip(1, xs);
|
|
1241
|
+
}
|
|
1242
|
+
function take(count, xs) {
|
|
1243
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => {
|
|
1244
|
+
if (i < count) {
|
|
1245
|
+
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1246
|
+
return (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1247
|
+
}
|
|
1248
|
+
else {
|
|
1249
|
+
throw new Util_ts_1.Exception((exports.SR_notEnoughElements + "\\nParameter name: ") + "source");
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
else {
|
|
1253
|
+
return undefined;
|
|
1254
|
+
}
|
|
1255
|
+
}, (e_1) => {
|
|
1256
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
function takeWhile(predicate, xs) {
|
|
1260
|
+
return generate(() => ofSeq(xs), (e) => ((e["System.Collections.IEnumerator.MoveNext"]() && predicate(e["System.Collections.Generic.IEnumerator`1.get_Current"]())) ? (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined), (e_1) => {
|
|
1261
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
function truncate(count, xs) {
|
|
1265
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => (((i < count) && e["System.Collections.IEnumerator.MoveNext"]()) ? (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined), (e_1) => {
|
|
1266
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
function zip(xs, ys) {
|
|
1270
|
+
return map2((x, y) => [x, y], xs, ys);
|
|
1271
|
+
}
|
|
1272
|
+
function zip3(xs, ys, zs) {
|
|
1273
|
+
return map3((x, y, z) => [x, y, z], xs, ys, zs);
|
|
1274
|
+
}
|
|
1275
|
+
function collect(mapping, xs) {
|
|
1276
|
+
return delay(() => concat(map(mapping, xs)));
|
|
1277
|
+
}
|
|
1278
|
+
function where(predicate, xs) {
|
|
1279
|
+
return filter(predicate, xs);
|
|
1280
|
+
}
|
|
1281
|
+
function pairwise(xs) {
|
|
1282
|
+
return delay(() => ofArray((0, Array_ts_1.pairwise)(toArray(xs))));
|
|
1283
|
+
}
|
|
1284
|
+
function splitInto(chunks, xs) {
|
|
1285
|
+
return delay(() => ofArray((0, Array_ts_1.splitInto)(chunks, toArray(xs))));
|
|
1286
|
+
}
|
|
1287
|
+
function windowed(windowSize, xs) {
|
|
1288
|
+
return delay(() => ofArray((0, Array_ts_1.windowed)(windowSize, toArray(xs))));
|
|
1289
|
+
}
|
|
1290
|
+
function transpose(xss) {
|
|
1291
|
+
return delay(() => ofArray((0, Array_ts_1.map)(ofArray, (0, Array_ts_1.transpose)((0, Array_ts_1.map)(toArray, toArray(xss))))));
|
|
1292
|
+
}
|
|
1293
|
+
function sortWith(comparer, xs) {
|
|
1294
|
+
return delay(() => {
|
|
1295
|
+
const arr = toArray(xs);
|
|
1296
|
+
arr.sort(comparer);
|
|
1297
|
+
return ofArray(arr);
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
function sort(xs, comparer) {
|
|
1301
|
+
return sortWith((x, y) => (comparer.Compare(x, y) | 0), xs);
|
|
1302
|
+
}
|
|
1303
|
+
function sortBy(projection, xs, comparer) {
|
|
1304
|
+
return sortWith((x, y) => (comparer.Compare(projection(x), projection(y)) | 0), xs);
|
|
1305
|
+
}
|
|
1306
|
+
function sortDescending(xs, comparer) {
|
|
1307
|
+
return sortWith((x, y) => ((comparer.Compare(x, y) * -1) | 0), xs);
|
|
1308
|
+
}
|
|
1309
|
+
function sortByDescending(projection, xs, comparer) {
|
|
1310
|
+
return sortWith((x, y) => ((comparer.Compare(projection(x), projection(y)) * -1) | 0), xs);
|
|
1311
|
+
}
|
|
1312
|
+
function sum(xs, adder) {
|
|
1313
|
+
return fold((acc, x) => adder.Add(acc, x), adder.GetZero(), xs);
|
|
1314
|
+
}
|
|
1315
|
+
function sumBy(f, xs, adder) {
|
|
1316
|
+
return fold((acc, x) => adder.Add(acc, f(x)), adder.GetZero(), xs);
|
|
1317
|
+
}
|
|
1318
|
+
function maxBy(projection, xs, comparer) {
|
|
1319
|
+
return reduce((x, y) => ((comparer.Compare(projection(y), projection(x)) > 0) ? y : x), xs);
|
|
1320
|
+
}
|
|
1321
|
+
function max(xs, comparer) {
|
|
1322
|
+
return reduce((x, y) => ((comparer.Compare(y, x) > 0) ? y : x), xs);
|
|
1323
|
+
}
|
|
1324
|
+
function minBy(projection, xs, comparer) {
|
|
1325
|
+
return reduce((x, y) => ((comparer.Compare(projection(y), projection(x)) > 0) ? x : y), xs);
|
|
1326
|
+
}
|
|
1327
|
+
function min(xs, comparer) {
|
|
1328
|
+
return reduce((x, y) => ((comparer.Compare(y, x) > 0) ? x : y), xs);
|
|
1329
|
+
}
|
|
1330
|
+
function average(xs, averager) {
|
|
1331
|
+
let count = 0;
|
|
1332
|
+
const total = fold((acc, x) => {
|
|
1333
|
+
count = ((count + 1) | 0);
|
|
1334
|
+
return averager.Add(acc, x);
|
|
1335
|
+
}, averager.GetZero(), xs);
|
|
1336
|
+
if (count === 0) {
|
|
1337
|
+
throw new Util_ts_1.Exception((exports.SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
|
|
1338
|
+
}
|
|
1339
|
+
else {
|
|
1340
|
+
return averager.DivideByInt(total, count);
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
function averageBy(f, xs, averager) {
|
|
1344
|
+
let count = 0;
|
|
1345
|
+
const total = fold((acc, x) => {
|
|
1346
|
+
count = ((count + 1) | 0);
|
|
1347
|
+
return averager.Add(acc, f(x));
|
|
1348
|
+
}, averager.GetZero(), xs);
|
|
1349
|
+
if (count === 0) {
|
|
1350
|
+
throw new Util_ts_1.Exception((exports.SR_inputSequenceEmpty + "\\nParameter name: ") + "source");
|
|
1351
|
+
}
|
|
1352
|
+
else {
|
|
1353
|
+
return averager.DivideByInt(total, count);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
function permute(f, xs) {
|
|
1357
|
+
return delay(() => ofArray((0, Array_ts_1.permute)(f, toArray(xs))));
|
|
1358
|
+
}
|
|
1359
|
+
function chunkBySize(chunkSize, xs) {
|
|
1360
|
+
return delay(() => ofArray((0, Array_ts_1.chunkBySize)(chunkSize, toArray(xs))));
|
|
1361
|
+
}
|
|
1362
|
+
function insertAt(index, y, xs) {
|
|
1363
|
+
let isDone = false;
|
|
1364
|
+
if (index < 0) {
|
|
1365
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1366
|
+
}
|
|
1367
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => {
|
|
1368
|
+
if ((isDone ? true : (i < index)) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1369
|
+
return (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1370
|
+
}
|
|
1371
|
+
else if (i === index) {
|
|
1372
|
+
isDone = true;
|
|
1373
|
+
return (0, Option_ts_1.some)(y);
|
|
1374
|
+
}
|
|
1375
|
+
else {
|
|
1376
|
+
if (!isDone) {
|
|
1377
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1378
|
+
}
|
|
1379
|
+
return undefined;
|
|
1380
|
+
}
|
|
1381
|
+
}, (e_1) => {
|
|
1382
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
function insertManyAt(index, ys, xs) {
|
|
1386
|
+
let status = -1;
|
|
1387
|
+
if (index < 0) {
|
|
1388
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1389
|
+
}
|
|
1390
|
+
return generateIndexed(() => [ofSeq(xs), ofSeq(ys)], (i, tupledArg) => {
|
|
1391
|
+
const e1 = tupledArg[0];
|
|
1392
|
+
const e2 = tupledArg[1];
|
|
1393
|
+
if (i === index) {
|
|
1394
|
+
status = 0;
|
|
1395
|
+
}
|
|
1396
|
+
let inserted;
|
|
1397
|
+
if (status === 0) {
|
|
1398
|
+
if (e2["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1399
|
+
inserted = (0, Option_ts_1.some)(e2["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1400
|
+
}
|
|
1401
|
+
else {
|
|
1402
|
+
status = 1;
|
|
1403
|
+
inserted = undefined;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
else {
|
|
1407
|
+
inserted = undefined;
|
|
1408
|
+
}
|
|
1409
|
+
if (inserted == null) {
|
|
1410
|
+
if (e1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1411
|
+
return (0, Option_ts_1.some)(e1["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1412
|
+
}
|
|
1413
|
+
else {
|
|
1414
|
+
if (status < 1) {
|
|
1415
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1416
|
+
}
|
|
1417
|
+
return undefined;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
else {
|
|
1421
|
+
return (0, Option_ts_1.some)((0, Option_ts_1.value)(inserted));
|
|
1422
|
+
}
|
|
1423
|
+
}, (tupledArg_1) => {
|
|
1424
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[0]);
|
|
1425
|
+
(0, Util_ts_1.disposeSafe)(tupledArg_1[1]);
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1428
|
+
function removeAt(index, xs) {
|
|
1429
|
+
let isDone = false;
|
|
1430
|
+
if (index < 0) {
|
|
1431
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1432
|
+
}
|
|
1433
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => {
|
|
1434
|
+
if ((isDone ? true : (i < index)) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1435
|
+
return (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1436
|
+
}
|
|
1437
|
+
else if ((i === index) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1438
|
+
isDone = true;
|
|
1439
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
|
|
1440
|
+
}
|
|
1441
|
+
else {
|
|
1442
|
+
if (!isDone) {
|
|
1443
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1444
|
+
}
|
|
1445
|
+
return undefined;
|
|
1446
|
+
}
|
|
1447
|
+
}, (e_1) => {
|
|
1448
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
function removeManyAt(index, count, xs) {
|
|
1452
|
+
if (index < 0) {
|
|
1453
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1454
|
+
}
|
|
1455
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => {
|
|
1456
|
+
if (i < index) {
|
|
1457
|
+
if (e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1458
|
+
return (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1459
|
+
}
|
|
1460
|
+
else {
|
|
1461
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
else {
|
|
1465
|
+
if (i === index) {
|
|
1466
|
+
for (let _ = 1; _ <= count; _++) {
|
|
1467
|
+
if (!e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1468
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "count");
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
return e["System.Collections.IEnumerator.MoveNext"]() ? (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]()) : undefined;
|
|
1473
|
+
}
|
|
1474
|
+
}, (e_1) => {
|
|
1475
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
function updateAt(index, y, xs) {
|
|
1479
|
+
let isDone = false;
|
|
1480
|
+
if (index < 0) {
|
|
1481
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1482
|
+
}
|
|
1483
|
+
return generateIndexed(() => ofSeq(xs), (i, e) => {
|
|
1484
|
+
if ((isDone ? true : (i < index)) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1485
|
+
return (0, Option_ts_1.some)(e["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
1486
|
+
}
|
|
1487
|
+
else if ((i === index) && e["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1488
|
+
isDone = true;
|
|
1489
|
+
return (0, Option_ts_1.some)(y);
|
|
1490
|
+
}
|
|
1491
|
+
else {
|
|
1492
|
+
if (!isDone) {
|
|
1493
|
+
throw new Util_ts_1.Exception((Global_ts_1.SR_indexOutOfBounds + "\\nParameter name: ") + "index");
|
|
1494
|
+
}
|
|
1495
|
+
return undefined;
|
|
1496
|
+
}
|
|
1497
|
+
}, (e_1) => {
|
|
1498
|
+
(0, Util_ts_1.disposeSafe)(e_1);
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1501
|
+
//# sourceMappingURL=Seq.js.map
|